query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
ebd001d82c54ed0abe3d6cc7812b24d0
Gets the public 'form.type.submit' shared service.
[ { "docid": "237dadfff5c30a62adf5f1458f84d6ad", "score": "0.7727345", "text": "protected function getForm_Type_SubmitService()\n {\n @trigger_error('The \"form.type.submit\" service is deprecated since Symfony 3.1 and will be removed in 4.0.', E_USER_DEPRECATED);\n\n return $this->services['form.type.submit'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType();\n }", "title": "" } ]
[ { "docid": "bf76a49e1bdda0f9b222141c7be14c05", "score": "0.8258432", "text": "protected function getForm_Type_SubmitService()\n {\n return $this->services['form.type.submit'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType();\n }", "title": "" }, { "docid": "b468aab21cb5cc95f549403c68a485b3", "score": "0.67704237", "text": "public function getSubmitType() {\n\t\t/** @var WireInput $input */\n\t\t$input = $this->wire('input');\n\t\t$formName = $this->processor->formName;\n\t\tif(!$input->requestMethod('POST')) {\n\t\t\t$valid = self::submitTypeNone;\n\t\t} else if($input->post($formName . \"_submit_next\")) {\n\t\t\t$valid = self::submitTypeNext;\n\t\t} else if($input->post($formName . \"_submit_prev\")) {\n\t\t\t$valid = self::submitTypePrev;\n\t\t} else if($input->post($formName . \"_submit_jump\")) {\n\t\t\t$valid = self::submitTypeJump;\n\t\t} else if($input->post($formName . \"_submit\")) {\n\t\t\t$valid = self::submitTypeFinal; // true\n\t\t} else {\n\t\t\t$valid = self::submitTypeNone;\n\t\t}\n\t\tif($valid === true && !$this->processor->validSubmitKey()) {\n\t\t\t// validate submit key only at final submit (submit===true)\n\t\t\t$valid = self::submitTypeInvalid;\n\t\t}\n\t\t\n\t\treturn $valid;\n\t}", "title": "" }, { "docid": "014f4b8b60c1218b887e6eb3d7293435", "score": "0.6644316", "text": "public function getSubmitHandler();", "title": "" }, { "docid": "e3e71663317e91fd7b7934aa2e6c132a", "score": "0.65749073", "text": "protected function getForm_TypeExtension_Submit_ValidatorService()\n {\n return $this->services['form.type_extension.submit.validator'] = new \\Symfony\\Component\\Form\\Extension\\Validator\\Type\\SubmitTypeValidatorExtension();\n }", "title": "" }, { "docid": "e3e71663317e91fd7b7934aa2e6c132a", "score": "0.65749073", "text": "protected function getForm_TypeExtension_Submit_ValidatorService()\n {\n return $this->services['form.type_extension.submit.validator'] = new \\Symfony\\Component\\Form\\Extension\\Validator\\Type\\SubmitTypeValidatorExtension();\n }", "title": "" }, { "docid": "82aac5ccb20e1e77783157edfda2b45d", "score": "0.6135344", "text": "public function type()\n {\n return 'formio/submission';\n }", "title": "" }, { "docid": "48181978725fa5f3b8538def76a9ad1a", "score": "0.6117139", "text": "protected abstract function getSubmitAction();", "title": "" }, { "docid": "48181978725fa5f3b8538def76a9ad1a", "score": "0.6117139", "text": "protected abstract function getSubmitAction();", "title": "" }, { "docid": "48181978725fa5f3b8538def76a9ad1a", "score": "0.6117139", "text": "protected abstract function getSubmitAction();", "title": "" }, { "docid": "1452254fbd62678ffd9d88fa13e8992b", "score": "0.6009342", "text": "function expose_submit($form, &$form_state) { }", "title": "" }, { "docid": "e293a0ad879315ebe6b72dde21c315c7", "score": "0.59838074", "text": "function exposed_submit(&$form, &$form_state) { }", "title": "" }, { "docid": "8cb6ea72878c6346fd9c1e91bc471201", "score": "0.59249693", "text": "public static function createSubmitType(StringOutput $oOutput)\n {\n $oField = new FormField($oOutput);\n return $oField->addPrimitive('type','submit');\n }", "title": "" }, { "docid": "b2b62afc6968c3158903bffc78028c53", "score": "0.59202826", "text": "protected function getForm_Type_ButtonService()\n {\n return $this->services['form.type.button'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\ButtonType();\n }", "title": "" }, { "docid": "c50a3776ff1302ad3b318a1798e5106f", "score": "0.5908963", "text": "public function getSubmitButton(): IElement;", "title": "" }, { "docid": "99d4025c7f8c034016d7b7268c6191e0", "score": "0.5870204", "text": "public function getSubmitValue(): string\n {\n return $this->submitValue;\n }", "title": "" }, { "docid": "f7c59d16ca93662ce494775f6e8cd793", "score": "0.5818957", "text": "public function provide_formSubmit ( )\n {\n return array(\n 'simple test' =>array(\n '<p class=\"medium primary btn normarg\"><input type=\"submit\" name=\"name\" id=\"name\" value=\"value\"></p>', 'name', 'value',\n ),\n\n 'disable test' =>array(\n '<p class=\"medium primary btn normarg\"><input type=\"submit\" name=\"name\" id=\"name\" value=\"value\" disabled=\"disabled\"></p>', 'name', 'value', array(\n 'disable' => true\n )\n ),\n );\n\n }", "title": "" }, { "docid": "d811446e5659deeac5c1fdff2e26fb95", "score": "0.5796737", "text": "public function getFormSubmitButtonClasses();", "title": "" }, { "docid": "be9da989c65e270eee987367a28d7a57", "score": "0.56968546", "text": "public function get_submitter_type()\n {\n return Request::get(\\Chamilo\\Application\\Weblcms\\Tool\\Implementation\\Assignment\\Manager::PARAM_SUBMITTER_TYPE);\n }", "title": "" }, { "docid": "30b44a0f87487b3d2ec67e12959d6166", "score": "0.5673109", "text": "protected function getSubmitAction() {\n $action = '';\n\n if (isset($this->preferences['submitAction'])) {\n $action = $this->preferences['submitAction'];\n } else {\n $action = $this->basePreferences['submitAction'];\n }\n\n return $action;\n }", "title": "" }, { "docid": "b41ea9e59e46fba7c6acc748f1264643", "score": "0.56722414", "text": "public function getWebformSubmission();", "title": "" }, { "docid": "10381f334a9b723dd6c0aa0d237c2982", "score": "0.5644512", "text": "public function submit();", "title": "" }, { "docid": "a37af5d2c04f3c4ebf9fd0a7e7d53253", "score": "0.56024355", "text": "public function submit(string $text, ?string $type = 'input', ?string $class = ''): string;", "title": "" }, { "docid": "d01d3d47b6d02f14e6d8b908b0a563a5", "score": "0.55676764", "text": "protected function getType(ElementInterface $element): string\n {\n return 'submit';\n }", "title": "" }, { "docid": "d408468829d393c6c66d6cdc6513449d", "score": "0.55613315", "text": "public function getFormMethod(): string;", "title": "" }, { "docid": "492fc585cd93f77a06d120ede8ebda93", "score": "0.554139", "text": "abstract protected function getFormType();", "title": "" }, { "docid": "b2b9382dbcd97d22f13a34eac367931c", "score": "0.551172", "text": "public function addSubmitButton()\n\t{\n\t\tif (! $this->hasElement('submit')) {\n\t\t\t$this->addElement('submitButton', 'submit', array(\n\t\t\t\t'required' => false,\n\t\t\t\t'ignore' => true,\n\t\t\t\t'label' => \"Submit\",\n\t\t\t\t'class' => \"fat\",\n\t\t\t\t'value' => 'submit',\n\t\t\t\t'decorators' => array('DijitElement')\n\t\t\t));\n\t\t}\n\t\t\n\t\treturn $this->getElement('submit');\n\t}", "title": "" }, { "docid": "47891d036e50ec142e8e59bcdcc87bc4", "score": "0.550945", "text": "public function main() {\n if(count($_POST)){\n if(isset($_POST['get_submit'])){ \n return $this->getRequest();\n }\n elseif(isset($_POST['post_submit'])){\n return $this->postRequest();\n }\n }\n }", "title": "" }, { "docid": "b224f05851103ca4dd080c92ca181278", "score": "0.54410946", "text": "public function submitInput()\r\r\n\t{\r\r\n\t\treturn $this->blnSubmitInput;\r\r\n\t}", "title": "" }, { "docid": "ca93345e19343aae3abfa1c7abf616d2", "score": "0.54361814", "text": "protected function getSubmitAction(){\n\t\treturn \"add_titulo\";\n\t}", "title": "" }, { "docid": "ecc694aad8b44f790b6a2ce275d344f1", "score": "0.541527", "text": "abstract protected function getSubmitButtonLabel();", "title": "" }, { "docid": "30941407ac95af3addfdcf284349526a", "score": "0.5412459", "text": "public abstract function getFormClass();", "title": "" }, { "docid": "eccfabb122a94c4a5b510a044f7b0396", "score": "0.54064745", "text": "protected function getSubmissionServiceService()\n {\n return $this->privates['App\\\\Service\\\\SubmissionService'] = new \\App\\Service\\SubmissionService(($this->services['doctrine.orm.default_entity_manager'] ?? $this->getDoctrine_Orm_DefaultEntityManagerService()), ($this->privates['monolog.logger'] ?? $this->getMonolog_LoggerService()), ($this->privates['App\\\\Service\\\\DOMJudgeService'] ?? $this->getDOMJudgeServiceService()), ($this->services['App\\\\Service\\\\ConfigurationService'] ?? $this->getConfigurationServiceService()), ($this->privates['App\\\\Service\\\\EventLogService'] ?? $this->getEventLogServiceService()), ($this->privates['App\\\\Service\\\\ScoreboardService'] ?? $this->getScoreboardServiceService()));\n }", "title": "" }, { "docid": "2bd0e90baab368e36d6d7f8765835605", "score": "0.5391799", "text": "public function getFormAction()\n {\n return $this->getUrl('requestquoteform/index/submitform');\n }", "title": "" }, { "docid": "e87b475d40a7bf1d967f3f4dce270995", "score": "0.5382849", "text": "public function getForm()\n {\n return $this->formClass;\n }", "title": "" }, { "docid": "ed0cbca49a98bbffb560099dcd17eb5c", "score": "0.5373525", "text": "public function getFormType(){\n\t\treturn $this->getTypeInstance()->getFormType();\n\t}", "title": "" }, { "docid": "ecaf0f565617b8aa14ae253010fac1fd", "score": "0.5360929", "text": "abstract public function getFormTypeClass();", "title": "" }, { "docid": "b25c31df060429d9edd972b44b5b9393", "score": "0.53399706", "text": "public function submit($theme = NULL) {\n return View::factory('gaps/' . $this->_theme($theme) . '/submit')->render();\n }", "title": "" }, { "docid": "39010123b79b7f3aa951b10633d33868", "score": "0.533446", "text": "abstract protected function _submit( \\Hotlink\\Framework\\Model\\Api\\Request $request );", "title": "" }, { "docid": "119af3aa2f7a306744d252a72c0ad5bf", "score": "0.5324911", "text": "protected function getForm_Type_FormService()\n {\n return $this->services['form.type.form'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType(${($_ = isset($this->services['property_accessor']) ? $this->services['property_accessor'] : $this->get('property_accessor')) && false ?: '_'});\n }", "title": "" }, { "docid": "446ab9ef4714891c079844fe86d08de7", "score": "0.5311965", "text": "abstract function default_submit_url();", "title": "" }, { "docid": "8839cacd2b458d5400f8856dbda3bd74", "score": "0.531127", "text": "public final function setSubmit()\n {\n $this->_buttonName = 'submit';\n }", "title": "" }, { "docid": "c24fafaefca392dcd10e8230028eb1e8", "score": "0.52918476", "text": "public abstract function run($form, $action = \"\", $method = \"\", $submit_text = \"\");", "title": "" }, { "docid": "ad1d72ab6be9c379ea2f21d45d14da8a", "score": "0.5264897", "text": "public function isSubmitted(): bool;", "title": "" }, { "docid": "12d4b60d8a6a72076b7670b7a294eb99", "score": "0.5239121", "text": "protected function getForm_Type_ButtonService()\n {\n @trigger_error('The \"form.type.button\" service is deprecated since Symfony 3.1 and will be removed in 4.0.', E_USER_DEPRECATED);\n\n return $this->services['form.type.button'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\ButtonType();\n }", "title": "" }, { "docid": "ae90fadb6683653d3d60cec23e2bff95", "score": "0.5228159", "text": "public function makeSubmitKey(InputfieldForm $form, array $options = array()) {\n\t\t\n\t\t$defaults = array(\n\t\t\t'numFields' => 0,\n\t\t\t'formName' => $this->processor->formName,\n\t\t\t'sessionKey' => '',\n\t\t\t'submitVal' => '',\n\t\t\t'getArray' => false,\n\t\t);\n\t\t\n\t\tif($this->submitKey && empty($options)) return $this->submitKey;\n\t\t\n\t\t$options = array_merge($defaults, $options);\n\t\t$numFields = empty($options['numFields']) ? count($form->children) : $options['numFields'];\n\t\t\n\t\tif(!$this->processor->skipSessionKey) {\n\t\t\t// if we're also using a sessionKey, then append it to the submitKey and remember in session\n\t\t\tif(!empty($options['sessionKey'])) {\n\t\t\t\t$sessionKey = $options['sessionKey'];\n\t\t\t} else if(wireClassExists('WireRandom')) {\n\t\t\t\t$random = new WireRandom();\n\t\t\t\t$sessionKey = $random->alphanumeric(0, array(\n\t\t\t\t\t'minLength' => 21,\n\t\t\t\t\t'maxLength' => 32,\n\t\t\t\t\t'fast' => true\n\t\t\t\t));\n\t\t\t} else {\n\t\t\t\t$sessionKey = md5(mt_rand() . microtime() . mt_rand());\n\t\t\t}\n\t\t\t$this->processor->sessionSet('sessionKey', $sessionKey);\n\t\t} else {\n\t\t\t$form->protectCSRF = false;\n\t\t\t$sessionKey = '0';\n\t\t}\n\t\t\n\t\t$formName = empty($options['formName']) ? $this->processor->formName : $options['formName'];\n\t\t$submitVal = empty($options['submitVal']) ? $this->makeSubmitVal($sessionKey, $numFields) : $options['submitVal'];\n\t\t$submitKey = \"$numFields:$formName:$sessionKey:$submitVal\";\n\t\t\n\t\t$this->submitKey = $submitKey;\n\t\t\n\t\tif($options['getArray']) return array(\n\t\t\t'numFields' => $numFields,\n\t\t\t'formName' => $formName, \n\t\t\t'sessionKey' => $sessionKey,\n\t\t\t'submitVal' => $submitVal,\n\t\t\t'submitKey' => $submitKey\n\t\t);\n\t\t\n\t\treturn $submitKey;\n\t}", "title": "" }, { "docid": "d69576a5907905ef3f3d1cf9f0f6680c", "score": "0.5224333", "text": "abstract public function formSubmitted(\\IForm $form);", "title": "" }, { "docid": "db371fbab0f1436bb414cbfccd5ef134", "score": "0.5219805", "text": "public function getForm();", "title": "" }, { "docid": "db371fbab0f1436bb414cbfccd5ef134", "score": "0.5219805", "text": "public function getForm();", "title": "" }, { "docid": "45d8680c0ff281310625bd90a84bad17", "score": "0.52069485", "text": "public function submit( $value = null, $attributes = array() ) {\n\t\treturn $this->input( 'submit', null, $value, $attributes );\n\t}", "title": "" }, { "docid": "485901604a20e431d90b42fd75a04b5d", "score": "0.52053803", "text": "function submitForm(array &$form, FormStateInterface $form_state ){\nreturn;\n\t}", "title": "" }, { "docid": "66f803bc860e935cfe933f07346ae073", "score": "0.52037346", "text": "protected function getForm_Type_PercentService()\n {\n return $this->services['form.type.percent'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\PercentType();\n }", "title": "" }, { "docid": "588bbebd5cdeb4296adbaaca223f8512", "score": "0.5203726", "text": "public function getForm($type = 'create');", "title": "" }, { "docid": "588bbebd5cdeb4296adbaaca223f8512", "score": "0.5203726", "text": "public function getForm($type = 'create');", "title": "" }, { "docid": "d712310359d4766ee6f07f0d085b2a89", "score": "0.5198391", "text": "public function formButtonSubmit(array $form, array &$form_state) {\n $button_name = $form_state['triggering_element']['#name'];\n if ($button_name == 'op') {\n for ($i = 1; isset($this->options['fields']['search_api_aggregation_' . $i]); ++$i) {\n }\n $this->options['fields']['search_api_aggregation_' . $i] = array(\n 'name' => '',\n 'type' => 'fulltext',\n 'fields' => array(),\n );\n }\n else {\n $field = substr($button_name, 34);\n unset($this->options['fields'][$field]);\n }\n $form_state['rebuild'] = TRUE;\n $this->changes = TRUE;\n }", "title": "" }, { "docid": "a39efe551ebdd24638debad80c571157", "score": "0.5176301", "text": "function set_submit_normal()\n {\n \t$this->_submit_type = \"application/x-www-form-urlencoded\";\n \treturn $this;\n }", "title": "" }, { "docid": "08d93bcf77bade81e4d40fd49c93da15", "score": "0.5171892", "text": "function get_submit_button() {\r\n echo '<p>';\r\n echo '<input type=\"hidden\" name=\"posted\" value=\"1\" />';\r\n echo '<input type=submit';\r\n if ($this->locking->get_count($this->lc_id, 'NULL', $this->term_id)!=0) {\r\n echo ' disabled';\r\n }\r\n echo ' value=\"Save\" />';\r\n echo '</p>';\r\n }", "title": "" }, { "docid": "8a27e9919957acfebaa1161ce89f8fb5", "score": "0.5168994", "text": "function button($value) {\n $this->submit_btn = form_submit('pp_submit', $value);\n }", "title": "" }, { "docid": "85c92e0aedc91ed08e81dc9e6a2490cc", "score": "0.5168589", "text": "public function getForm()\n {\n return 'App\\Core\\V201\\Forms\\Activity\\Budgets';\n }", "title": "" }, { "docid": "93d4dd06355c3bba4d165492421e575c", "score": "0.5159795", "text": "protected function getForm_Type_UrlService()\n {\n return $this->services['form.type.url'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\UrlType();\n }", "title": "" }, { "docid": "f177c64ffa7caa51d643d4af47a1e709", "score": "0.51387656", "text": "public function get_form() { return $this->form; }", "title": "" }, { "docid": "96554cf5cb75eb9b8dd7635b625cfc30", "score": "0.5134368", "text": "protected function addSubmit()\r\r\n\t{\r\r\n\t\tif (!$this->addSubmit)\r\r\n\t\t{\r\r\n\t\t\treturn '';\r\r\n\t\t}\r\r\n\r\r\n\t\treturn sprintf(' <input type=\"submit\" id=\"ctrl_%s_submit\" class=\"submit\" value=\"%s\" />',\r\r\n\t\t\t\t\t\t$this->strId,\r\r\n\t\t\t\t\t\tspecialchars($this->slabel));\r\r\n\t}", "title": "" }, { "docid": "c3f5c5625b2bf41e0ec35a9264db85fb", "score": "0.5133606", "text": "public function getSubmitUrl()\n {\n return $this->getUrl('currency/index/post');\n }", "title": "" }, { "docid": "820b4751c558cb4fcead819eae204d47", "score": "0.51251835", "text": "protected function getForm_Type_FormService()\n {\n return $this->services['form.type.form'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType($this->get('property_accessor'));\n }", "title": "" }, { "docid": "9e24aa4d377193405dee15823ece924f", "score": "0.5124554", "text": "protected function get_form_type()\n {\n return $this->form_type;\n }", "title": "" }, { "docid": "2373be0dd8adef38d585fe7ef598d68c", "score": "0.51209164", "text": "function intoto_site_settings_type_form_submit(&$form, &$form_state) {\n // Automatically get edited entity type from the form and save it.\n // @see entity_ui_form_submit_build_entity()\n $entity_type = entity_ui_form_submit_build_entity($form, $form_state);\n entity_save('intoto_site_settings_type', $entity_type);\n\n // Redirect user.\n $form_state['redirect'] = 'admin/structure/intoto_site_settings';\n}", "title": "" }, { "docid": "c53f44a7b44807f1af58d8ad8e11045e", "score": "0.51180416", "text": "function form_field_submit($button_value = 'Submit', $button_name = 'submit', $button_attributes = '')\n {\n $_field_html = form_submit($button_name, $button_value, $button_attributes);\n\n // --------------------------------------------------------------------------\n\n$_out = <<<EOT\n\n <div class=\"field submit\">\n <span class=\"label\">&nbsp;</span>\n <span class=\"input\">\n $_field_html\n </span>\n </div>\n\nEOT;\n\n // --------------------------------------------------------------------------\n\n return $_out;\n }", "title": "" }, { "docid": "2a54f06454ee75db162c7bae88ec632d", "score": "0.51179653", "text": "protected function getSubmitButtontitle() {\n $title = '';\n\n if (isset($this->preferences['submitButtonTitle'])) {\n $title = $this->preferences['submitButtonTitle'];\n } else {\n $title = $this->basePreferences['submitButtonTitle'];\n }\n\n return $title;\n }", "title": "" }, { "docid": "011d1e484712e365030adaba10e1737e", "score": "0.5103947", "text": "function views_ui_config_type_form_submit($form, &$form_state) {\n $types = views_object_types();\n $display = &$form_state['view']->display[$form_state['display_id']];\n\n // Store in cache\n views_ui_cache_set($form_state['view']);\n}", "title": "" }, { "docid": "ef0607687c66fc8e8771ba4a3333d71f", "score": "0.50793463", "text": "public function submit($value = 'Submit', $attributes = [])\n\t{\n\t\treturn $this->input('submit', null, $value, $attributes);\n\t}", "title": "" }, { "docid": "c8449575b235646300ac7fa4a647a642", "score": "0.507431", "text": "public function autoIncludeSubmit()\n {\n return $this->_autoIncludeSubmit;\n }", "title": "" }, { "docid": "6604c18ac97e345b56575d4e21c0ea88", "score": "0.50720924", "text": "protected function getForm_Type_ResetService()\n {\n return $this->services['form.type.reset'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\ResetType();\n }", "title": "" }, { "docid": "3e6f89a32d3de58bed1a61ccc331a3ff", "score": "0.5067796", "text": "function modSubmit ($submit)\n\t{\n\t\t$submit=str_replace(\"TYPE=SUBMIT\", \"type=\\\"button\\\" onclick=\\\"procesarAjax();\\\"\",$submit);\n\t\t$submit=str_replace(\"TYPE=\\\"SUBMIT\\\"\", \"type=\\\"button\\\" onclick=\\\"procesarAjax();\\\"\",$submit);\n\t\t$submit=str_replace(\"type=\\\"submit\\\"\",\"type=\\\"button\\\" onclick=\\\"procesarAjax();\\\"\",$submit);\n\t\t$submit=str_replace(\"TYPE=\\\"PASSWORD\\\"\",\" TYPE=\\\"PASSWORD\\\" onKeyPress=\\\"if (isEnter(event) == true) { procesarAjax(); }\\\"\", $submit);\n\t\t$submit=str_replace(\"TYPE=\\\"RADIO\\\"\",\" TYPE=\\\"RADIO\\\" onclick=\\\"javascript:pago(this.value);\\\" \", $submit);\n\t\t$submit=str_replace(\"parent.history.back()\",\"iniProcesarMenu('autorizacionsua', '');\",$submit);\n\t\treturn $submit;\n\t}", "title": "" }, { "docid": "32a3b40ef10e11e2d0a7232aa0f5a31c", "score": "0.5053913", "text": "protected function createSubmitButton() {\n\t\treturn '<p><button class=\"submitButton '. $this->action . '\">' .\n\t\t\t'<p>' . $this->getSubmitButtonLabel() . '</p></button></p>';\n\t}", "title": "" }, { "docid": "b38eae5e7570b333beb9290d33ae763f", "score": "0.5042924", "text": "function getForm()\n {\n\n return $this->form;\n }", "title": "" }, { "docid": "7a954d8b5c3e98cc909cb4de72ae6ea0", "score": "0.50428677", "text": "public function getFormActionFromPostVariables()\n {\n $piVars = $this->getController()->getExtensionConfigurationManager()->getPiVars();\n $formName = AbstractController::getFormName();\n if (isset($piVars[$formName])) {\n return $piVars[$formName]['formAction'];\n } else {\n return '';\n }\n }", "title": "" }, { "docid": "f25a0bb1e9754ba5ab35aecc9f24d6b2", "score": "0.5038616", "text": "protected static function getFacadeAccessor() { return 'form'; }", "title": "" }, { "docid": "e670d98342521c6fb23b0c1cc04f57ed", "score": "0.5023944", "text": "function add_submit() {\n $mform =& $this->_form;\n $mform->addElement('submit', 'submitbutton', get_string('updateticket', 'block_helpdesk'));\n }", "title": "" }, { "docid": "22cfa21e5a706b91637ee7f852cbb0b2", "score": "0.50202745", "text": "function form_submit_button($button, $form)\n{\n return \"<button type='submit' class='redButton' id='gform_submit_button_{$form[\"id\"]}'><span>Submit</span></button>\";\n}", "title": "" }, { "docid": "e8cdb947fdcb91aca80349baa62068e7", "score": "0.50193727", "text": "public static function getGlobalSearchFormClassName()\n {\n return null;\n }", "title": "" }, { "docid": "be6e610114bcf0d602be3d18352f5fc9", "score": "0.50193554", "text": "protected function getForm_Type_TextService()\n {\n return $this->services['form.type.text'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\TextType();\n }", "title": "" }, { "docid": "deca4d8c052375182bdaae503af18ab3", "score": "0.501561", "text": "public function render()\n {\n return view('components.submit-button');\n }", "title": "" }, { "docid": "3de2c503f961d24ea4bb6501389041d1", "score": "0.5010105", "text": "public function submit($value, $attributes = array())\n\t{\n\t\treturn $this->input('submit', null, $value, $attributes);\n\t}", "title": "" }, { "docid": "6931a8ebad4e2c12314932480118fef8", "score": "0.5004585", "text": "public function getForm()\r\n {\r\n return $this->form;\r\n }", "title": "" }, { "docid": "3e7895250af8fa22bf244db6228f06e3", "score": "0.5000122", "text": "function get_action(){\n // submit buttons can be named with the action i.e. \"__update\" or \"__delete\";\n // look at the names/key posted to see if there's an action requested\n\n static $action;\n\n if(isset($action))\n return $action;\n\n $post_get = array_merge($_POST, $_GET);\n\n if(mb_strlen(@$post_get['action']) > 0)\n return $post_get['action'];\n\n foreach($post_get as $key => $val)\n if(mb_substr($key, 0, 2) == '__')\n return mb_substr($key, 2);\n\n }", "title": "" }, { "docid": "b449c8517c94b2ae7617b923c94f1686", "score": "0.49972257", "text": "public function submit() {\n\t\treturn $this->surround('<button type=\"submit\">Envoyer</button>');\n\t}", "title": "" }, { "docid": "547e5b80b53991a110e0d296ef7968ed", "score": "0.49954695", "text": "public function getGoogleSiteSearchForm()\n {\n if ($page = GoogleSiteSearchPage::get()->first()) {\n $label = Config::inst()->get('GoogleSiteSearchDefaultFormExtension', 'submit_button_label');\n $formLabel = Config::inst()->get('GoogleSiteSearchDefaultFormExtension', 'input_label');\n\n $form = new Form(\n $this,\n 'GoogleSiteSearchForm',\n new FieldList(new TextField('q', $formLabel)),\n new FieldList(new FormAction('doSearch', $label))\n );\n\n $form->setFormMethod('GET');\n $form->setFormAction($page->Link());\n $form->disableSecurityToken();\n $form->loadDataFrom($_GET);\n\n return $form;\n }\n }", "title": "" }, { "docid": "0c35c72e3d4d672ac93ab2d8b5912ff7", "score": "0.49943006", "text": "public function getSubmittedFormField()\n {\n return SubmittedFormField::create();\n }", "title": "" }, { "docid": "fa8a74b6ba0886688991ce895c0901ef", "score": "0.49932992", "text": "function set_submit_multipart()\n {\n \t$this->_submit_type = \"multipart/form-data\";\n \treturn $this;\n }", "title": "" }, { "docid": "b96911e009807a452d5ba26d7cc8091d", "score": "0.4983872", "text": "function getForm()\n {\n return $this->get('gravity_cms.form.view');\n }", "title": "" }, { "docid": "1306ac329f35ca862bfba2e500bfbda1", "score": "0.49792194", "text": "public function getSubmittedValue()\n {\n if(!$this->_form->isSubmitted()){\n return NULL;\n }\n $submittedValues = $this->_form->getSuperglobal();\n return (isset($submittedValues[$this->getName()])) ? $submittedValues[$this->getName()] : FALSE;\n }", "title": "" }, { "docid": "e6776f3d47c2d1138975b1b6d57d2122", "score": "0.49716017", "text": "private function createSubmit()\n\t{\n\t\t$this->formContent .= '<button name=\"' .$this->groupName .'\" type=\"submit\"' .$this->groupClasses .$this->groupID .$this->groupDisabled .'>' .$this->groupValue .'</button>' .$this->groupHelp;\n\t}", "title": "" }, { "docid": "73924cdc667cca63a9f89f82c5658afd", "score": "0.49641785", "text": "protected function getForm(): string\n {\n return UserType::class;\n }", "title": "" }, { "docid": "cd94983d14f6a6c144d9637ada743f12", "score": "0.49627802", "text": "public function getWebform();", "title": "" }, { "docid": "3ebfdf95921d66105811d177908bab59", "score": "0.4961281", "text": "public function getRegistrationSubmitButtonPath()\n {\n return \"//button[@type='submit'][\" .\n Menta_Util_Div::contains($this->__('Submit'), 'title') . \"]\";\n }", "title": "" }, { "docid": "124e7d7c48ca80ae3ab7e82882eca46c", "score": "0.49584293", "text": "function addSubmit($value, $name = null, $extra_attributes='') {\n return addInputField('submit', $name, $value, $extra_attributes);\n}", "title": "" }, { "docid": "9eedb013f48e387cc026cff320d80d13", "score": "0.49565446", "text": "public static function get_form_method()\n {\n if (empty(self::$form_method)) {\n self::$form_method = $_POST;\n }\n return self::$form_method;\n }", "title": "" }, { "docid": "aa53117046db44562cde6585ed6a7ebe", "score": "0.4955301", "text": "public function getFirstForm() : IForm;", "title": "" }, { "docid": "e1fb8a893b5260e4d635bf04a9939fd2", "score": "0.49551594", "text": "public static function submit($value){\n return '<input type=\"submit\" value=\"'.$value.'\"/>';\n }", "title": "" }, { "docid": "e10a84ec313c173f1d93f4156662835f", "score": "0.49527276", "text": "public function setSubmit($name){\n\t\t$this->submit = $name;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "597cd23a7217a1c3ce7dddf71cbe38f9", "score": "0.49449408", "text": "public static function getPrepareAMCommonInstance() {\n return MLHelper::gi('controller_widget_form_prepareamcommon');\n }", "title": "" } ]
4d9bbbf3cba6fa1bb4cdc7717913bd37
Determine if the user is authorized to make this request.
[ { "docid": "2d8722c1de2468c6134716ac14f389b9", "score": "0.0", "text": "public function authorize()\n\t{\n\t\treturn true;\n\t}", "title": "" } ]
[ { "docid": "fd3ff688fd162563089590c7bad4145e", "score": "0.8316634", "text": "public function authorize()\n {\n // Validate that the user can access the user object\n // that they want to see (eg. themselves).\n return Auth::user()->id === $this->user->id;\n }", "title": "" }, { "docid": "34a6a0df94cc2696351f4886776bd19f", "score": "0.82418275", "text": "public function authorize()\n {\n $user = Auth::user();\n\n if ($user = $this->owner_id) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "f29b65e3ad800650ec916179342feb76", "score": "0.82025534", "text": "public function authorize()\n {\n $authUser = auth()->user();\n $user = $this->user ?? new User;\n\n switch ($this->method()) {\n default:\n return $user->id == $authUser->id;\n break;\n }\n }", "title": "" }, { "docid": "348501c453e219a1b37fd6ffd62875a0", "score": "0.8201813", "text": "public function authorize()\n {\n return $this->user()->isCompany() && $this->user()->id === (int) $this->route('user');\n }", "title": "" }, { "docid": "b7d4fd6d4592daafb5a4d249fd65499a", "score": "0.8091309", "text": "public function authorize()\n {\n // Authorization parameters.\n $isLoggedIn = Auth::check();\n $belongsToReviewTeam = Auth::user()->isPartOfAuthoringTeam($this->resource->id);\n $isTeamOwner = $this->team->owner_id === Auth::user()->id;\n return $isLoggedIn && ($belongsToReviewTeam || $isTeamOwner);\n }", "title": "" }, { "docid": "ee7af7835fdae0f354ca4a681cfddbe7", "score": "0.8070438", "text": "public function isAuthorized();", "title": "" }, { "docid": "bab24f9bdca48cb54dc95d07f39cf85e", "score": "0.8041545", "text": "public function authorize()\n {\n return null === $this->user();\n }", "title": "" }, { "docid": "b74a0a6577b4e508e1c46aae5a1adff6", "score": "0.80296624", "text": "public function authorize()\n {\n if (Auth::user()->hasRole('admin')) {\n return true;\n }\n\n if (Auth::user()->id == $this->getUserId()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "bc45c134a44221d8a79e7ea002b4a57c", "score": "0.80141574", "text": "public function authorize(): bool\n {\n return $this->hasAccess();\n }", "title": "" }, { "docid": "780d7997c348e948424c7a28eb64d4d2", "score": "0.7979924", "text": "public function authorize()\n {\n $accessor = $this->user();\n $user = $this->route('user');\n\n return $accessor->isAdmin() || \n ($accessor->isCommittee() && $accessor->hasKey('put-users')) || \n ($accessor->isEntrant() && $accessor->entry->id === $user->entry_id) || \n $accessor->id === $user->id;\n }", "title": "" }, { "docid": "8e64a8c8c86463cae319675933f00c0b", "score": "0.7974814", "text": "public function authorize()\n {\n if ($this->hasHeader('Authorization')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "8e64a8c8c86463cae319675933f00c0b", "score": "0.7974814", "text": "public function authorize()\n {\n if ($this->hasHeader('Authorization')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "d39cd74dd19725b319038fd93b77c139", "score": "0.7939632", "text": "public function authorize()\n {\n return !$this->user();\n }", "title": "" }, { "docid": "bcc4ee298230edabd05b3e294e753647", "score": "0.7933094", "text": "public function authorize()\n {\n // get the document from the URL parameter\n /** @var Document $document */\n $document = $this->route('document');\n\n // only authorize if the document is owned by the current authenticated user\n return (int)Auth::user()->id === (int)$document->user_id;\n }", "title": "" }, { "docid": "68cbbf2a944e943c11bb4d48842aef74", "score": "0.7932432", "text": "public function authorize()\r\n {\r\n if (! isset(Auth::user()->id)) {\r\n return false;\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "f41a1c22d956ea6f69470f616b9011a7", "score": "0.7925379", "text": "public function authorize()\n {\n if (!\\Auth::user()) return false;\n\n return true;\n }", "title": "" }, { "docid": "1b032eed3b8e92ae20fb2d8d5e712728", "score": "0.79232615", "text": "public function authorize()\n {\n return $this->user()->ownsTeam($this->merchant) || $this->user()->roleOn($this->merchant) === 'owner';\n }", "title": "" }, { "docid": "55ea5eb65a38f39b777e775b81513c73", "score": "0.78765327", "text": "public function authorize()\n {\n return (bool) session('user');\n }", "title": "" }, { "docid": "6101bf6a623fa89dde5c439291bb7778", "score": "0.7871892", "text": "public function authorized()\n {\n if (! $user = $this->user()) {\n return false;\n }\n\n return $this->laravel[\n \\Ignite\\Application\\Kernel::class\n ]->authorize($user);\n }", "title": "" }, { "docid": "c9d8ac530e8faff9ae7c9bdcb3972122", "score": "0.78673655", "text": "public function authorize()\n {\n if($this->isMethod('post')) {\n return ($this->user());\n }\n return true;\n }", "title": "" }, { "docid": "af9c9a14e34f423d8358a3cda69e782a", "score": "0.78563964", "text": "public function authorize()\n {\n return $this->user()->isMember();\n }", "title": "" }, { "docid": "340d335aaf485d507323dbdd50bd4d12", "score": "0.78414804", "text": "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "title": "" }, { "docid": "340d335aaf485d507323dbdd50bd4d12", "score": "0.78414804", "text": "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "title": "" }, { "docid": "86bf6d581c6840ee3b030b9d58e4de7b", "score": "0.78370017", "text": "public function authorize()\n {\n return Auth::user()->user_role === config('settings.roles.user');\n }", "title": "" }, { "docid": "54dfb30584f15ff135cc161a62a0949d", "score": "0.7831078", "text": "public function authorize()\n {\n return ($this->user()->ownsTeam($this->team) || $this->user()->onTeam($this->team));\n }", "title": "" }, { "docid": "4ec73613993002d512777b70d5e26322", "score": "0.78120255", "text": "public function authorize()\n {\n if ($this->isGet()) {\n return true;\n }\n\n if ($this->isPut()) {\n return false;\n }\n\n if ($this->isDelete()) {\n return auth()->user()->can('delete', $this->route('order'));\n }\n\n return true;\n }", "title": "" }, { "docid": "624b3b9a018ac46aae0f02666c345c51", "score": "0.7802283", "text": "function isAuthorized() {\n return $this->__permitted($this->name, $this->action);\n }", "title": "" }, { "docid": "5cd739f76ced8e7361226bb13cd2f058", "score": "0.7799382", "text": "public function authorize()\n\t{\n\t\treturn request()->invoice->user_id == request()->user()->id;\n\t}", "title": "" }, { "docid": "5cd22e33ce6a0fdb767fd4849141aec5", "score": "0.7797541", "text": "public function authorize()\n {\n if (Auth::user()->isAdministrator()) {\n return true;\n }\n\n if (Auth::user()->isModerator()) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "07116c48ada1c6785196b221f5c7f3f9", "score": "0.7788291", "text": "public function isAuthorized()\n {\n return $this->authorized;\n }", "title": "" }, { "docid": "d6d1211a3aa6c3cfb70419246f369e2a", "score": "0.7763308", "text": "public function authorize()\n {\n return is_client_or_staff();\n }", "title": "" }, { "docid": "d6d1211a3aa6c3cfb70419246f369e2a", "score": "0.7763308", "text": "public function authorize()\n {\n return is_client_or_staff();\n }", "title": "" }, { "docid": "478d69cb43da81608656c7049f66c898", "score": "0.7761384", "text": "public function authorize()\n {\n if ($this->user_id == auth()->user()->id) { //Usuario autenticado\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "857b9caa6893ef6923f27d41ab568583", "score": "0.77446187", "text": "public function authorize()\n {\n if (Auth::user()->can('show-person')) return true;\n if ($this->userPersonOwns()) return true;\n return false;\n }", "title": "" }, { "docid": "3921ed55137de9c2512eb5493b937142", "score": "0.7737409", "text": "public function authorize()\n {\n if(Auth::user()) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "f1ea3ac29476bcd809b037f814df6a11", "score": "0.77254355", "text": "public function isAuthorised()\n {\n return (bool) $this->getField('AccessToken');\n }", "title": "" }, { "docid": "08484497785af91b6a0b744446c4bd98", "score": "0.77189934", "text": "public function isAuthorized(): bool\n {\n return is_null($this->apiKey) || $this->apiKey === $this->getTokenForRequest();\n }", "title": "" }, { "docid": "f95db51206e3cb2d7e9d88f6d7da1b37", "score": "0.7718805", "text": "public function authorize()\n {\n return $this->route('plans')->user_id === $this->user()->id;\n }", "title": "" }, { "docid": "977c162efbb9ce6cf5f45729c4416c11", "score": "0.7717961", "text": "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "title": "" }, { "docid": "7e1ccff54c713eb88e069c5a9d4b3a7e", "score": "0.77153224", "text": "public function authorize()\n {\n if ($this->idea->isAssignedToUser() && $this->idea->isApprovalAction()) {\n return true;\n } \n else {\n return false;\n }\n }", "title": "" }, { "docid": "502b47a5252f1cebb4ef712348fc56dd", "score": "0.77141184", "text": "public function authorize()\n {\n return Auth::check() && Auth::user()->isOwner();\n }", "title": "" }, { "docid": "9ae370975f6e15393247202f9f8a63dc", "score": "0.7712271", "text": "public function authorize()\n {\n if (User::find(Auth::id())) {\n return true;\n }\n }", "title": "" }, { "docid": "20b55879b6210ef8d63582930a1a4785", "score": "0.77078456", "text": "public function authorize()\n {\n return (Auth::user() != null);\n }", "title": "" }, { "docid": "7572c857607dd6bf2eba3e6802950835", "score": "0.7703274", "text": "public function isAuthorized() : bool;", "title": "" }, { "docid": "30a20a155c414c2f8aa945501ae38837", "score": "0.77029854", "text": "public function authorize()\n {\n return $this->route('comments')->user_id === $this->user()->id or $this->user()->hasRole('admin');\n }", "title": "" }, { "docid": "5d734afb04629c34e126e8f27ce0e2e0", "score": "0.7700584", "text": "public function authorize()\n {\n $article = $this->route('article');\n\n return $article->user_id == auth()->id();\n }", "title": "" }, { "docid": "1ed2d82a999694f941e3d64c888c5b12", "score": "0.76931214", "text": "public function authorize()\n {\n return auth()->user() && auth()->id() === $this->post->user_id;\n }", "title": "" }, { "docid": "e4c124cc5fe7599183ade2af2ab487b1", "score": "0.76906025", "text": "public function authorize()\n {\n $project = Project::find($this->project_id);\n return Auth::user()->id == $project->user_id;\n }", "title": "" }, { "docid": "d83ef02943b1b7ac86cb0e962ab7f243", "score": "0.76609355", "text": "public function authorize()\n {\n $song = Song::find($this->id);\n\n if (!$song) {\n abort(404);\n }\n\n return $song->user_id == $this->user()->id;\n }", "title": "" }, { "docid": "1ad1bf69a7c3d659cd33ce54aa623a10", "score": "0.7660643", "text": "public function authorize()\n {\n //verify if the user is logged in\n if ( ! \\Auth::check() )\n {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "9177d507e146b0cce2bb199d1caf7b78", "score": "0.7654033", "text": "public function authorize()\n {\n $note = Note::find($this->route('note'));\n return $note->user_id == Auth::id();\n }", "title": "" }, { "docid": "7cc2b30abc40dabdb5036a5662a74a5a", "score": "0.76524013", "text": "public function authorize()\n {\n if (property_exists($this, 'right')) {\n return auth()->user()->hasRight($this->right);\n }\n\n if (property_exists($this, 'scope')) {\n return auth()->user()->tokenCan($this->scope);\n }\n\n return true;\n }", "title": "" }, { "docid": "4fec6c640f34899b2442e74325200da6", "score": "0.7651618", "text": "public function authorize()\n {\n // make it true to mark user as authorized by default\n return true;\n }", "title": "" }, { "docid": "5a8e2f536a7056e9f71e6f17c4df79e7", "score": "0.7646542", "text": "public function authorize()\n {\n return $this->user() && $this->user()->can('view_clients_list', $this->partnerId);\n }", "title": "" }, { "docid": "2b76c490dd02b07e68bbfab6d03576b8", "score": "0.76431626", "text": "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "title": "" }, { "docid": "893fefcaa8f0bbabe2639b6e2fc59c84", "score": "0.76401085", "text": "public function authorize()\n {\n if (Auth::check()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "b982760a34fabec6eac70b63cf03621d", "score": "0.76382285", "text": "public function authorize()\n {\n if (auth()->user()->role_id == 1) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "4878eee6520e0a08bdaaea84585687be", "score": "0.76351017", "text": "public function authorize() {\n\t\t\t\n\t\t\treturn $this->user()->id == $this->route('apartment')->owner()->id;\n\t\t}", "title": "" }, { "docid": "2fe827d9d9140e8d266098a7f2ecd6fa", "score": "0.762643", "text": "public function authorize(): bool\n {\n if ($this->user() && $this->user()->hasRole('Admin')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "887df57bffd1719000d1168d8265094c", "score": "0.76207817", "text": "public function authorize()\n {\n if ($this->path() == 'account/profile')\n {\n return true;\n } else {\n return false;\n }\n // return false;\n }", "title": "" }, { "docid": "1c7186888e48b1402fd46c6261b42b82", "score": "0.7617843", "text": "public function authorize()\n {\n if (!__me()) {\n return false;\n }\n\n if (__me()->role === 'client') {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "dedd9095f571d210cdbaecbf89a29b33", "score": "0.75845", "text": "public function authorize()\n\t{\n\t\tif($this->auth->guest()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4c54020c6c60ab51e81a9670d68b022b", "score": "0.7582351", "text": "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser', 'hrassistant'])) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "5c3054de36bf03a81372df44a9b89490", "score": "0.7579089", "text": "public function authorize()\n {\n return $this->player->id === $this->user()->player->id;\n }", "title": "" }, { "docid": "7fc38f803c2fc845adf98a44bc225bf0", "score": "0.75681597", "text": "public function authorize()\n {\n if (!parent::authorize()) {\n return false;\n }\n\n if (!$this->isMethod('post')) {\n return false;\n }\n\n if (is_null($this->getStudentIdFromSession())) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "b8b88b38c2d1a985b96069c589d40b44", "score": "0.7567378", "text": "public function authorize()\n {\n // An admin, org owner and org admin can upload contactss\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "649ecd8a04a105031eac55c89f4e49eb", "score": "0.7560174", "text": "public function authorize()\n {\n if($this->user_id == auth()->user()->id){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "2f003a517bea0d57faf74870a3b3acfd", "score": "0.75596505", "text": "public function authorize()\n {\n $article = Article::find($this->route('article_id'));\n return $article && Auth::user()->id === $article->author_id;\n }", "title": "" }, { "docid": "3fa5ee1df664605bb17b3bfa40ec28b7", "score": "0.7549135", "text": "public function isAuth()\n {\n return $this->verifyPermission();\n }", "title": "" }, { "docid": "a49eccec61b8bac41f9f3234427040af", "score": "0.7543172", "text": "public function authorize()\n {\n return $this->user()->isadmin();\n }", "title": "" }, { "docid": "34d8ab2e8805f3f042df40e6b2babbe2", "score": "0.7542835", "text": "public function authorize()\n {\n return $this->user('api')->can('viewAny', finder()->findClass(finder()->currentResource()));\n }", "title": "" }, { "docid": "74b33e77a0e2b75921bd831822c73d0b", "score": "0.7539183", "text": "public function authorize()\n\t{\n // Fetch the user from the database.\n //\n $user = $this->fetchRecord();\n\n // The user must be logged in, the user record must exist, and the\n // user trying to edit the record must be the account holder.\n //\n return Auth::check() && $user && $user->isAccountHolder();\n\t}", "title": "" }, { "docid": "b58c3a135dcc547b6bc60cf41aeb48c0", "score": "0.7539085", "text": "public function authorize()\n {\n return $this->user()->can('viewAny', $this->route('update'));\n }", "title": "" }, { "docid": "794a084d80fcd37dd578968b6a90ddfa", "score": "0.75349283", "text": "public function authorize()\n {\n $post = $this->route('post');\n return $post->user_id == auth()->user()->id;\n }", "title": "" }, { "docid": "ecefe5c79260c348240bfd0df54cf820", "score": "0.7531557", "text": "public function authorize()\n {\n $batch = Batch::find($this->route('batch_id'));\n return $batch && $batch->owner_id == Auth::ownerId();\n }", "title": "" }, { "docid": "610cc97bc06d9a75e91195ad48404e59", "score": "0.75308484", "text": "public function authorize()\n {\n $team = $this->route('team');\n\n $member = $this->route('team_member');\n\n return ($this->user()->ownsTeam($team) && $this->user()->id !== $member->id) ||\n (! $this->user()->ownsTeam($team) && $this->user()->id !== $member->id);\n }", "title": "" }, { "docid": "b1ae796968ef1d83cd65fd804c750672", "score": "0.75280696", "text": "public function authorize()\n {\n return $this->container['auth']->check();\n }", "title": "" }, { "docid": "9553cf4077a4efedd5d69e2f775199fc", "score": "0.7525143", "text": "public function authorize()\n {\n if(auth()->check())return true;\n return false;\n }", "title": "" }, { "docid": "9b61fec3e7a69ac4cfb7dc190a1651b5", "score": "0.75190693", "text": "public function authorize()\n\t{\n\t\t// only allow updates if the user is logged in\n\t\treturn \\Auth::check();\n\t}", "title": "" }, { "docid": "7d8f6561352ed47a2d063e7d341a6ad5", "score": "0.75169873", "text": "public function authorize()\n {\n if (Auth::user()->roles()->first()->role == 'admin' && Auth::check()) return true;\n\n return false;\n }", "title": "" }, { "docid": "63b722e3507fccc9ed6815168a337646", "score": "0.7516394", "text": "public function authorize()\n {\n return $this->can('edit-resident')\n || (!empty($this->resident_id) && $this->user()->resident && $this->resident_id == $this->user()->resident->id);\n }", "title": "" }, { "docid": "12ec45746bcaed1634532b2424547923", "score": "0.75000906", "text": "public function authorized()\n {\n return true;\n }", "title": "" }, { "docid": "b6f47f66b14ee579d3e6b1a9a1c83500", "score": "0.7497433", "text": "public function authorize()\n {\n $user = app( 'auth' )->user();\n $el = Musicalbum::findOrFail( $this->route('id') );\n\n return $user->isId( $el->user_id );\n }", "title": "" }, { "docid": "80d8aeb4c1ed5e261236983e64dc0d29", "score": "0.74937385", "text": "public function authorize()\n {\n if ( ! \\Auth::check() )\n {\n return false;\n }\n\n $routeParams = \\Route::current()->parameters();\n\n $flightIdTable = new FlightID();\n $selectedFlight = $flightIdTable->find($routeParams['flights']);\n\n if ($selectedFlight->fleet_id != \\Auth::user()->org_id)\n {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "abf58876ed25b8a80cce4f879ed3bba7", "score": "0.7492277", "text": "public function authorize()\n {\n return Auth::check() ? true : false;\n }", "title": "" }, { "docid": "d1d129a44bb9c7b664aec08f062ef03f", "score": "0.74920726", "text": "public function authorize()\n {\n return !empty($this->user()->company);\n }", "title": "" }, { "docid": "2dd74b5d2c706ae12ce8d6167ec9510f", "score": "0.7491949", "text": "public function authorize()\n {\n if (auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "72914acb0198bc54c343122b30392285", "score": "0.74898624", "text": "public function authorize()\n {\n return $this->user()->can(\n 'update',\n $this->route('professional') ? $this->route('professional') : $this->user()\n );\n }", "title": "" }, { "docid": "592807267efc77cd9e6af3c89de6b8fe", "score": "0.748952", "text": "public function authorize()\n\t{\n if (\\Auth::check())\n {\n return true;\n }\n\n return false;\n\t}", "title": "" }, { "docid": "f9c31ff6fa6d8d53e9149d07d8489ae1", "score": "0.74845606", "text": "public function authorize()\n {\n // TODO I am just returning true for now\n return true;\n }", "title": "" }, { "docid": "63f1b94c22dbb79942e6eacee4655b96", "score": "0.7478443", "text": "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "title": "" }, { "docid": "e6f3b3d0957fba948d39da6748caf251", "score": "0.74733174", "text": "public function authorize()\n {\n $person_id = $this->route('id');\n\n return Auth::user()->isFriend($person_id) || Auth::user()->isGuest();\n }", "title": "" }, { "docid": "7c346768ea98baf86426671339aa4d81", "score": "0.74726367", "text": "public function authorize()\n {\n return $this->user()->isSuperAdmin();\n }", "title": "" }, { "docid": "ea1439b16c717357e51c5b1a5932b783", "score": "0.7470864", "text": "public function authorize() : bool\n {\n $user = Auth::user();\n\n switch ($this->get(\"role\")) {\n\n case User::ROLE_ADMINISTRATOR:\n return $user->can(\"viewAdministrators\", User::class);\n\n case User::ROLE_VIEWER:\n return $user->can(\"viewViewers\", User::class);\n\n case User::ROLE_STUDENT:\n return $user->can(\"viewStudents\", User::class);\n\n default:\n return true;\n\n }\n }", "title": "" }, { "docid": "6f8cb1bf5643537fc982e657278a299b", "score": "0.74703294", "text": "public function authorize()\n {\n if(Auth::check()) return true;\n return false;\n }", "title": "" }, { "docid": "ca04baba823e5d24ced850676977b129", "score": "0.7464126", "text": "public function authorize(){\n if($this->method() == 'POST'){\n return Auth::user()->can('user.create');\n }\n if($this->method() == 'PUT'){\n return Auth::user()->can('user.update');\n }\n return false;\n }", "title": "" }, { "docid": "583ca956e7b8aebc9310315b86d4f7e3", "score": "0.7460991", "text": "public function authorize()\n {\n return User::where('id', $this->id)\n ->where('id', Auth::id())->exists();\n }", "title": "" }, { "docid": "76221bc9a79a6d21c14e431698edbfe4", "score": "0.7452535", "text": "function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // View the dashboard for the specified CO?\n $p['dashboard'] = ($roles['cmadmin'] || $roles['coadmin'] || $roles['comember']);\n \n $this->set('permissions', $p);\n return $p[$this->action];\n }", "title": "" }, { "docid": "642d177a20d90527729292ca598ee9fc", "score": "0.7450775", "text": "public function authorize()\n {\n // TODO: make sure to only allow users with the correct permissions\n // instead of just leaving this as true\n return true;\n }", "title": "" }, { "docid": "45d363020b1cd4e2157a088f18167b51", "score": "0.74485254", "text": "public function authorize() : bool\n {\n if (Auth::user() && Auth::user()->hasPermissionTo('manage users')) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "d38ffa6d0bf7d48725c3f51b0ba93375", "score": "0.74419856", "text": "public function authorize()\n {\n return Auth::check() && $this->user()->isAdmin();\n }", "title": "" } ]
3e630e17492b784e0a28780301916615
Test for delete method with exception.
[ { "docid": "37e90e4c5f6f2b92311d9c9c4cbf5028", "score": "0.8003957", "text": "public function testDeleteWithException()\n {\n $structure = $this->getMockBuilder(\\Magento\\Company\\Model\\Structure::class)\n ->disableOriginalConstructor()->getMock();\n $structure->expects($this->atLeastOnce())->method('getId')->willReturn(1);\n $this->structureResource->expects($this->once())\n ->method('delete')->with($structure)->willThrowException(new \\Exception());\n $this->structureRepository->delete($structure);\n }", "title": "" } ]
[ { "docid": "4b68f223afeb71717a175a8780a440af", "score": "0.8323582", "text": "public function testDelete()\n {\n $this->assertTrue($this->provider->delete(123));\n\n // Second call catches exception and returns true when the queue\n // does not exists\n $this->assertTrue($this->provider->delete(456));\n\n // Last call throws an exception if there is an exception outside\n // of a HTTP 404\n $this->setExpectedException('Exception');\n $this->provider->delete(789);\n }", "title": "" }, { "docid": "f13b93d4c7a26fdf2431a33c3422a5c8", "score": "0.8036172", "text": "public function testDeleteValidation()\n\t{\n\t\t$adapter = new MogileFS_File_Mapper_Adapter_Tracker();\n\t\ttry {\n\t\t\t$adapter->delete(null); // Not valid value\n\t\t} catch (MogileFS_Exception $exc) {\n\t\t\t$this->assertLessThan(200, $exc->getCode(), 'Got unexpected exception code');\n\t\t\t$this->assertGreaterThanOrEqual(100, $exc->getCode(), 'Got unexpected exception code');\n\t\t\treturn;\n\t\t}\n\t\t$this->fail('Did not get MogileFS_Exception exception');\n\t}", "title": "" }, { "docid": "9b8094fe18788e401a141515d6a4a4e5", "score": "0.8028872", "text": "abstract public function testDelete();", "title": "" }, { "docid": "6716be909da35c09c2217a7f07831145", "score": "0.7967815", "text": "function test_delete_fail_4()\n {\n // $this->do_request('/tipo-elemento/', [], [], status::$NO_CONTENT, 'DELETE');\t\t\n }", "title": "" }, { "docid": "d3c0e840eba1f333a024c95d165491b4", "score": "0.78813523", "text": "function test_delete_fail_3()\n {\n // $this->do_request('/tipo-elemento/', garbage_data::$unidad_gestion, array(), status::$NO_CONTENT, 'DELETE');\t\t\n }", "title": "" }, { "docid": "6b0b08ff29059a299b6195bdd8dd527a", "score": "0.78322196", "text": "function test_delete_fail_6()\n {\n $this->do_request('/tipo-elementos/' . garbage_data::$tipo_elemento_otro['tipo_elemento'], garbage_data::$unidad_gestion_otro, [], status::$NOT_FOUND, 'DELETE');\n }", "title": "" }, { "docid": "5ea51924a6bb5b480548355956a356a8", "score": "0.7771712", "text": "public function delete ()\n {\n throw new Exception(__METHOD__);\n }", "title": "" }, { "docid": "ffe5597e7c0cd2c92a857e8fa7546ec7", "score": "0.77229476", "text": "function test_delete_fail_2()\n {\n $this->do_request('/elementos/' . garbage_data::$tipo_elemento_initial[\"tipo_elemento\"], [], [], status::$BAD_REQUEST, 'DELETE');\n }", "title": "" }, { "docid": "45cce8aa69714b8cdd6a22dacc220761", "score": "0.7717102", "text": "function test_delete_fail_5()\n {\n $this->do_request('/tipo-elementos/' . garbage_data::$tipo_elemento_error[\"tipo_elemento\"], garbage_data::$unidad_gestion, [], status::$NOT_FOUND, 'DELETE');\n }", "title": "" }, { "docid": "a3037d60bda6e8e069f45018a01ece03", "score": "0.77128506", "text": "public function testDeleteFail()\n {\n $this->browse(function (Browser $browser) {\n factory(User::class, 10)->create();\n factory(Order::class, 5)->create();\n $browser->loginAs(1)\n ->visit('/orders');\n DB::table('orders')->delete(2);\n $browser->click('tbody tr:nth-child(2) .fa-trash')\n ->waitForText('Delete Order')\n ->assertSee('Are you want delete it?')\n ->click('#btn-modal-submit')\n ->assertSee('Order Not Found');\n });\n }", "title": "" }, { "docid": "e7203d9d68c6099222335562c7daef73", "score": "0.7658902", "text": "public function testDeleteDocumentUsingDelete()\n {\n }", "title": "" }, { "docid": "6f58f6c16dc40c8ed9cbab5d52b736e8", "score": "0.7627346", "text": "public function testDelete()\n {\n $this->deleteTest(2);\n }", "title": "" }, { "docid": "ad4b184e6c8608566e1b36b41e0272cd", "score": "0.7585692", "text": "public function testGetDeleteActionGivenDatabaseError()\r\n {\r\n $builder = m::mock('\\Illuminate\\Database\\Eloquent\\Builder')->makePartial();\r\n $user = m::mock('\\Antares\\Model\\User');\r\n\r\n $builder->shouldReceive('findOrFail')->once()->with('foo')->andReturn($user);\r\n $user->shouldReceive('getAttribute')->once()->with('id')->andReturn('foo')\r\n ->shouldReceive('delete')->once()->andThrow('\\Exception');\r\n\r\n\r\n\r\n DB::shouldReceive('transaction')->once()\r\n ->with(m::type('Closure'))->andReturnUsing(function ($c) {\r\n $c();\r\n });\r\n $this->assertInstanceOf(ModelNotFoundException::class, $this->call('GET', 'antares/users/999/delete')->exception);\r\n }", "title": "" }, { "docid": "65db0125c1f9a6400ad85c0944a11d98", "score": "0.75700027", "text": "public function testDeleteOrderUsingDelete()\n {\n }", "title": "" }, { "docid": "aff0efe64eb293bc2ea06b66592c1fd5", "score": "0.75445634", "text": "public function testDeleteClientUsingDelete()\n {\n }", "title": "" }, { "docid": "4dcec5eb0152be8d76a7b184b9cd5680", "score": "0.75327456", "text": "function test_delete_fail_7()\n {\n $this->do_request('/tipo-elementos/' . garbage_data::$tipo_elemento_initial['tipo_elemento2'], garbage_data::$unidad_gestion, [], status::$ERROR_SERVER, 'DELETE');\n \n }", "title": "" }, { "docid": "863d1fbd780024b11c8b6672598a31e5", "score": "0.74821854", "text": "public function testDeleteOneWithInvalidPrimary()\n {\n $this->expectException(NotFoundException::class);\n $this->crudTable->deleteOne(10000);\n }", "title": "" }, { "docid": "57085dfe4a316b33e3561ccde63b7332", "score": "0.747454", "text": "public function testDeleteKeyException()\r\n {\r\n $user = new tabs\\api\\core\\ApiUser();\r\n $user->setKey('unknownuser');\r\n $user->delete();\r\n }", "title": "" }, { "docid": "35ef8c29b8ca9563fe4fb5eed2e89340", "score": "0.7408314", "text": "public function testDeleteClientStatusUsingDelete()\n {\n }", "title": "" }, { "docid": "d495933d27d51574994189a7953a42b7", "score": "0.7377702", "text": "public function testDelete()\n {\n $dataLoader = $this->getDataLoader();\n $data = $dataLoader->getOne();\n $this->deleteTest($data['user']);\n }", "title": "" }, { "docid": "51a81f6d48ccb8b1f0997182a033f316", "score": "0.7361944", "text": "public function testDeleteFail() {\n\t\tRolesControllerTest::login($this);\n\n\t\t$this->controller->NetCommonsBlock->expects($this->once())\n\t\t\t->method('validateBlockId')\n\t\t\t->will($this->returnValue(false));\n\n\t\t$this->controller->expects($this->once())\n\t\t\t->method('throwBadRequest');\n\n\t\t$data = [\n\t\t\t'Blog' => [\n\t\t\t\t'key' => 'blog1',\n\t\t\t],\n\t\t\t'Block' => [\n\t\t\t\t'id' => 5,\n\t\t\t\t'key' => 'block_5',\n\t\t\t]\n\t\t];\n\t\t$this->testAction(\n\t\t\t'/blogs/blog_blocks/delete/1/5',\n\t\t\tarray(\n\t\t\t\t'method' => 'delete',\n\t\t\t\t'data' => $data,\n\t\t\t)\n\t\t);\n\n\t\tAuthGeneralControllerTest::logout($this);\n\t}", "title": "" }, { "docid": "282b62981823da9c7826a545ce49466e", "score": "0.7360564", "text": "public function testDeleteItemById()\n {\n }", "title": "" }, { "docid": "591c49f6d617c0f33ccf5ec488fd46ec", "score": "0.73548096", "text": "public function testFailDelete()\n {\n $image = $this->repo->deleteByBasename('abc', 'password');\n $this->assertNull($image);\n }", "title": "" }, { "docid": "bb1b7b10a88939d028ca9244d2360053", "score": "0.7315906", "text": "public function testDeleteOrderTrackUsingDelete()\n {\n }", "title": "" }, { "docid": "d39899a090d10b12ad11a2fcad795ef9", "score": "0.72846717", "text": "public function testDelete()\n {\n $model = $this->model();\n\n $this->doDelete($model)->assertDeleteResponse();\n $this->assertModelDeleted($model);\n }", "title": "" }, { "docid": "0ff6038c80795b430f990db9d17170e4", "score": "0.72660846", "text": "abstract public function testDeleteMultiple();", "title": "" }, { "docid": "845d0fe1acd83eb21450aeb7ae03554d", "score": "0.7221341", "text": "public function testFilelinkDeleteException()\n {\n $mock_response = new MockHttpResponse(404);\n\n $stub_http_client = $this->createMock(\\GuzzleHttp\\Client::class);\n $stub_http_client->method('request')\n ->willReturn($mock_response);\n\n $this->expectException(FilestackException::class);\n $this->expectExceptionCode(404);\n\n $filelink = new Filelink('gQNI9RF1SG2nRmvmQDMU', $this->test_api_key,\n $this->test_security, $stub_http_client);\n\n $filelink->delete();\n }", "title": "" }, { "docid": "c61e7035cc24c741f1ee2147adb6768f", "score": "0.7204205", "text": "public function testDeleteInvalid()\n {\n $user = factory(User::class)->create();\n\n $this->actingAs($user)\n ->seeIsAuthenticatedAs($user)\n ->get(route('category.delete', ['id' => 1000]))\n ->assertStatus(404)\n ->assertSessionMissing([\n 'flash_notification.0.level' => 'success',\n 'flash_notification.0.message' => trans('category.flash-delete')\n ]);\n }", "title": "" }, { "docid": "6cc238b436a9ffed956686aea777d900", "score": "0.719624", "text": "public function testDeleteClientHydroUsingDelete()\n {\n }", "title": "" }, { "docid": "5484dffcc177934dd6aa8751c6256906", "score": "0.7171249", "text": "public function testDeleteNotificationClientUsingDelete()\n {\n }", "title": "" }, { "docid": "3c457afc9a9f62f9661c144736bc31f1", "score": "0.7170706", "text": "public function testDeleteNotDeleteMethod() {\n\t\tRolesControllerTest::login($this);\n\n\t\t$this->controller->NetCommonsBlock->expects($this->once())\n\t\t\t->method('validateBlockId')\n\t\t\t->will($this->returnValue(true));\n\n\t\t$this->controller->expects($this->once())\n\t\t\t->method('throwBadRequest');\n\n\t\t$data = [\n\t\t\t'Blog' => [\n\t\t\t\t'key' => 'blog1',\n\t\t\t],\n\t\t\t'Block' => [\n\t\t\t\t'id' => 5,\n\t\t\t\t'key' => 'block_5',\n\t\t\t]\n\t\t];\n\t\t$this->testAction(\n\t\t\t'/blogs/blog_blocks/delete/1/5',\n\t\t\tarray(\n\t\t\t\t'method' => 'get',\n\t\t\t\t'data' => $data,\n\t\t\t)\n\t\t);\n\n\t\tAuthGeneralControllerTest::logout($this);\n\t}", "title": "" }, { "docid": "a658aabfde77ebd94e471fad70ad9e9c", "score": "0.71703523", "text": "public function testDeleteCompanyUsingDELETE()\n {\n }", "title": "" }, { "docid": "77d517d2b111c74a5a32b5eb10d40144", "score": "0.7134948", "text": "public function testDeleteByAnyExceptionOnDelete()\n {\n $ids = [1, 2, 3];\n\n /**\n * @var \\Magento\\SalesRule\\Model\\Coupon $coupon\n */\n $className = \\Magento\\SalesRule\\Model\\Coupon::class;\n $coupon = $this->createMock($className);\n $coupon->expects($this->any())->method('delete')->willThrowException(new \\Exception());\n\n /**\n * @var \\Magento\\SalesRule\\Model\\ResourceModel\\Coupon\\Collection $couponCollection\n */\n $className = \\Magento\\SalesRule\\Model\\ResourceModel\\Coupon\\Collection::class;\n $couponCollection = $this->createMock($className);\n $couponCollection->expects($this->once())->method('addFieldToFilter')->willReturnSelf();\n $couponCollection->expects($this->once())->method('getItems')->willReturn([$coupon, $coupon, $coupon]);\n $this->collectionFactory->expects($this->once())->method('create')->willReturn($couponCollection);\n\n $this->couponMassDeleteResult->expects($this->once())->method('setFailedItems')->willReturnSelf();\n $this->couponMassDeleteResult->expects($this->once())->method('setMissingItems')->willReturnSelf();\n\n $this->model->deleteByIds($ids, true);\n }", "title": "" }, { "docid": "eef8c0dcf1e142c9d3de64d7b3933d6f", "score": "0.71223354", "text": "public function testCarDeleteTest()\n {\n $car = Car::all()->find(6);\n $car->delete();\n $this->assertDatabaseMissing('cars', ['id' => $car->id]);\n }", "title": "" }, { "docid": "1a29d9ec9f72e3f2dc2b008643c897f2", "score": "0.7109956", "text": "public function testDeleteECUE()\n {\n }", "title": "" }, { "docid": "d8ff1d0ca54fc92af47d377a8d42cc66", "score": "0.70914036", "text": "public function testDeleteNotificationUsingDelete()\n {\n }", "title": "" }, { "docid": "a376d0412d4ef2a7f5e8bfe1a55c998b", "score": "0.7088951", "text": "public function testDeleteRecords()\n {\n }", "title": "" }, { "docid": "a1d824a53287de98281264362b21e919", "score": "0.7082967", "text": "public function testDeleteOrderStatusUsingDelete()\n {\n }", "title": "" }, { "docid": "0915727e310e7d2231699f5d41cbc4cd", "score": "0.70664686", "text": "public function testDeleteSupplier()\n {\n }", "title": "" }, { "docid": "655c4e4d37fef24498341be6e38098ce", "score": "0.7041766", "text": "public function test_delete()\n\t{\n\t\t$db = $this->DI->get('database');\n\t\t$db->shouldReceive('remove')->once();\n\n\t\t$entity = $this->DI->get('entity')->load('Wasp\\Test\\Entity\\Entities\\Test');\n\t\t$entity->Id = 1;\n\t\t$entity->name = 'test';\n\t\t$entity->delete();\n\t}", "title": "" }, { "docid": "a2637dec19895dbade22f338d3ae3d76", "score": "0.702949", "text": "public function testDeletePaymentMethod()\n {\n try {\n self::$client->billing->deletePaymentMethod('primary');\n\n $this->assertTrue(true);\n } catch (\\Exception $exception) {\n $this->fail('Exception thrown when we expected no error');\n }\n }", "title": "" }, { "docid": "27c186a7e9e0594a44a3c56f8a34fe77", "score": "0.70263976", "text": "public function test_delete_worksForNonExisting() {\n Subscription::fromData(4711, '[email protected]')->delete();\n }", "title": "" }, { "docid": "97d5d3e7b6838015a6742a2327318207", "score": "0.7022572", "text": "public function testFailDeleteWrongPassword()\n {\n $data = Image::factory()\n ->has(Comment::factory()->count(10))\n ->create([\n 'basename' => 'xyz',\n 'delkey' => 'abc'\n ]);\n $image = $this->repo->deleteByBasename('xyz', 'colibri');\n $this->assertNull($image);\n }", "title": "" }, { "docid": "bed0f0cf89f329db57f22e4d696c2cb0", "score": "0.6954593", "text": "abstract public function delete();", "title": "" }, { "docid": "bed0f0cf89f329db57f22e4d696c2cb0", "score": "0.6954593", "text": "abstract public function delete();", "title": "" }, { "docid": "220953ac17571be099e1f5ea6ab66f3c", "score": "0.69534874", "text": "public function testFailOnDeleteAll() {\n\t\t$this->setExpectedException('InternalErrorException');\n\n\t\t$this->Faq = $this->getMockForModel('Faqs.Faq', array('deleteAll'));\n\t\t$this->Faq->expects($this->any())\n\t\t\t->method('deleteAll')\n\t\t\t->will($this->returnValue(false));\n\n\t\t//テストデータ生成\n\t\t$data = $this->__defaultData;\n\n\t\t//事前チェック\n\t\t$this->__initAssert($data);\n\n\t\t//実施\n\t\t$this->Faq->deleteFaq($data);\n\t}", "title": "" }, { "docid": "8cc3269734d3560647cf0d38fc0154bd", "score": "0.6951978", "text": "public function testDeleteOrder()\n {\n\n }", "title": "" }, { "docid": "7b48f104a96db5a3cd96f0062bbddf08", "score": "0.69429433", "text": "protected function _delete()\n\t{\n\t}", "title": "" }, { "docid": "7314a9f54f802be5ee4316f5c096f1d6", "score": "0.6942055", "text": "protected function delete()\n {\n }", "title": "" }, { "docid": "519aded79e6ecec78e9b6a718912d710", "score": "0.6932607", "text": "abstract protected function delete();", "title": "" }, { "docid": "99e0cdf0957dea2ac8e01050648e0786", "score": "0.69241315", "text": "public function testDelete(){\n \n $id = 21;\n UlogaController::delete($id);\n\n $provjera = Uloga::all();\n $result = true;\n foreach ($provjera as $redak ) {\n if($redak->id == $id){\n $result = false;\n }\n }\n \n \n $this->assertTrue($result == true, \"Uloga not deleted.\");\n }", "title": "" }, { "docid": "02000bb1464d183f17282f6ca0166b01", "score": "0.69154", "text": "public function test_can_delete_todo_not_found() {\n $todo = factory(Todo::class)->create();\n Todo::truncate();\n $this->post(route('todos.destroy', $todo->id))\n ->assertStatus(404)\n ->assertJson(['message' => 'Todo Not Found']);\n }", "title": "" }, { "docid": "7bf9c10f6b902a85bee13a4bf8df9287", "score": "0.69036156", "text": "public abstract function delete();", "title": "" }, { "docid": "67823517296ed5fbff8ef81d7f43856f", "score": "0.69005704", "text": "public function testSearchesV3Delete()\n {\n }", "title": "" }, { "docid": "80d758912d20086fb67cb3682acd4807", "score": "0.68961596", "text": "public function assertDeleteGranted($entity): void;", "title": "" }, { "docid": "8316d8a8a3177fde313011426b214100", "score": "0.6890357", "text": "public function testReleaseDelete()\n {\n }", "title": "" }, { "docid": "ee3e84ed15c976f96be0a0cae1264825", "score": "0.6886516", "text": "public function testDeleteNotificationSettingUsingDelete()\n {\n }", "title": "" }, { "docid": "aa3c1809e4e78b259138b8abdc0588d0", "score": "0.68840855", "text": "public function testDeleteNotFound()\n {\n factory(Category::class, 10)->create();\n $this->browse(function (Browser $browser) {\n $element = $browser->visit('/admin/category')->elements('#table-contain tbody tr');\n $category = Category::find(10);\n $browser->assertSee($category->name)\n ->assertSee($category->id);\n $this->assertCount(10, $element);\n $browser->assertSee('List Categories')\n ->press('#table-contain tbody tr:nth-child(1) td:nth-child(3) button');\n $category->delete();\n $this->assertSoftDeleted('categories', ['id'=>'10']);\n $browser->waitFor(null, '1')\n ->waitForText('Confirm deletion!')\n ->press('Delete')\n ->assertSee('404 - Page Not found');\n });\n }", "title": "" }, { "docid": "79f06021178a9aaa8bc17e8ffac3fd8e", "score": "0.6882372", "text": "public function test_can_delete_todo() {\n $todo = factory(Todo::class)->create();\n $this->post(route('todos.destroy', $todo->id))\n ->assertStatus(200)\n ->assertJson(['message' => 'Todo has been deleted']);\n }", "title": "" }, { "docid": "0698f93249c988ff7bcb3438197517ed", "score": "0.68808943", "text": "public function testDeleteUser()\n {\n\n }", "title": "" }, { "docid": "2a7e8c1831f2c34036b63ac9c1e3d1aa", "score": "0.6880213", "text": "public function testGrantsDeleteThrowsException()\n {\n $api = new Management( '__test_api_token__', '__test_domain__' );\n\n try {\n $caught_exception = false;\n $api->grants()->delete( '' );\n } catch (CoreException $e) {\n $caught_exception = $this->errorHasString( $e, 'Empty or invalid \"id\" parameter' );\n }\n\n $this->assertTrue( $caught_exception );\n\n try {\n $caught_exception = false;\n $api->grants()->delete( [ '__not_empty__' ] );\n } catch (CoreException $e) {\n $caught_exception = $this->errorHasString( $e, 'Empty or invalid \"id\" parameter' );\n }\n\n $this->assertTrue( $caught_exception );\n }", "title": "" }, { "docid": "3ff52469d2a93ff2b1b6b8f07b69d36f", "score": "0.68768084", "text": "public function testDeleteWrongUser(): void\n {\n $this->requestAuthenticated(\n '[email protected]',\n 'DELETE',\n self::USERS_LIST_URI.'/'.self::BAD_USER_ID\n );\n $this->assertSame(Response::HTTP_FORBIDDEN,$this->client->getResponse()->getStatusCode());\n }", "title": "" }, { "docid": "828ee254aa1af8d371add01573537bf0", "score": "0.68765527", "text": "public function testDeleteWillReturnFalse()\n\t{\n\t\t$user = new User();\n\n\t\t$this->assertFalse($user->delete());\n\t}", "title": "" }, { "docid": "21543a261dd7a7e9602b874190dabba1", "score": "0.6870682", "text": "public function testDeleteFollow()\n {\n }", "title": "" }, { "docid": "ede9ee88182eff14d100aeda33ccf928", "score": "0.6860645", "text": "public function deleteAction()\n\t{\n\t\ttry\n\t\t{\n\t\t\tthrow new Exception('Not implemented', 2);\n\t\t} \n\t\tcatch (Exception $e) \n\t\t{\n\t\t\t$this->_displayError($e);\n\t\t}\n\t}", "title": "" }, { "docid": "9384926283dc7a597c8f8931028f44c9", "score": "0.6858815", "text": "public function testDeleteTodo()\n {\n $todo = factory(Todo::class)->create();\n $response = $this->json('DELETE', '/api/todo/'.$todo->id);\n $response\n ->assertStatus(204);\n $this->assertSoftDeleted('todos', [\n 'id'=> $todo->id,\n ]);\n }", "title": "" }, { "docid": "d1ea29f05b9f8f472acc225fcbbd709e", "score": "0.6856727", "text": "public function testDeleteIdentity()\n {\n\n }", "title": "" }, { "docid": "d069ab6fc28feccdb20e62f547834c97", "score": "0.6855787", "text": "public function test_ShouldThrowException_IfOfferDoesntExists_WhenDelete($id)\n {\n $response = $this->deleteOffer(-1);\n $this->assertError($response);\n }", "title": "" }, { "docid": "7b036b05e1e4f7d00b8383201e2e61b1", "score": "0.68422127", "text": "function test_delete_ok_1()\n {\n $result = $this->do_request('/tipo-elementos/' . garbage_data::$tipo_elemento_initial[\"tipo_elemento\"], garbage_data::$unidad_gestion, [], status::$NO_CONTENT, 'DELETE');\n //Valido que el resultado sea una cadena vacia\n $this->assertEquals(\"\", $result);\n }", "title": "" }, { "docid": "61035910207a712eeccd708196905722", "score": "0.6829067", "text": "public function test_should_not_delete_developer()\n {\n $response = $this->delete($this->baseUrl.'/10000');\n\n $response->assertStatus(400);\n }", "title": "" }, { "docid": "e32a6c33aec632624d2e132b523500ec", "score": "0.68278", "text": "public function testDestroyFailure()\n {\n $response = $this->json('DELETE', '/api/v1/users/999999');\n\n $response->assertStatus(400);\n $response->assertJson(['success' => false]);\n }", "title": "" }, { "docid": "ace582273a1064cdc953f49bf07e5823", "score": "0.68152016", "text": "public function testDeleteSection()\n {\n\n }", "title": "" }, { "docid": "90fb05ba65cd9218fbff6f426cf2971b", "score": "0.6805297", "text": "public function testRegularDeleteFailsIfWingsReturnsError()\n {\n $server = $this->createServerModel();\n\n $this->expectException(DaemonConnectionException::class);\n\n $this->daemonServerRepository->expects('setServer->delete')->withNoArgs()->andThrows(\n new DaemonConnectionException(new BadResponseException('Bad request', new Request('GET', '/test'), new Response()))\n );\n\n $this->getService()->handle($server);\n\n $this->assertDatabaseHas('servers', ['id' => $server->id]);\n }", "title": "" }, { "docid": "045b8f1596eb24951e37c5b2d2679101", "score": "0.68052024", "text": "public function testExceptionWhileDeletingStopsProcess()\n {\n $server = $this->createServerModel();\n $host = DatabaseHost::factory()->create();\n\n /** @var \\Pterodactyl\\Models\\Database $db */\n $db = Database::factory()->create(['database_host_id' => $host->id, 'server_id' => $server->id]);\n\n $server->refresh();\n\n $this->daemonServerRepository->expects('setServer->delete')->withNoArgs()->andReturnUndefined();\n $this->databaseManagementService->expects('delete')->with(Mockery::on(function ($value) use ($db) {\n return $value instanceof Database && $value->id === $db->id;\n }))->andThrows(new Exception());\n\n $this->expectException(Exception::class);\n $this->getService()->handle($server);\n\n $this->assertDatabaseHas('servers', ['id' => $server->id]);\n $this->assertDatabaseHas('databases', ['id' => $db->id]);\n }", "title": "" }, { "docid": "41a2abfe0001781c575b4fa09abe8e0c", "score": "0.67862815", "text": "public function testDeleteActionDeny()\n {\n $client = $this->createAuthenticatedClient('user');\n $client->request('GET', '/users/2/delete');\n $this->assertSame(403, $client->getResponse()->getStatusCode());\n }", "title": "" }, { "docid": "176d42971370e4c91e826d827dfeac33", "score": "0.67769647", "text": "public function testDeleteRTPBankLinkUsingDelete()\n {\n }", "title": "" }, { "docid": "7435e541b44e65703cbdc46961b1f984", "score": "0.67765456", "text": "public function testRenderActionButtonDeleteWithInvalidArgumentException() {\n\n $obj = new TestDataTablesProvider($this->router, $this->translator, $this->buttonTwigExtension);\n\n try {\n\n $obj->renderActionButtonDelete($this, \"route\");\n } catch (Exception $ex) {\n\n $this->assertInstanceOf(InvalidArgumentException::class, $ex);\n $this->assertEquals(\"The entity must implements DataTablesEntityInterface or declare a getId() method\", $ex->getMessage());\n }\n }", "title": "" }, { "docid": "ea97a3d1f2a946afca371cd0cfb4e972", "score": "0.677345", "text": "public function testDeleteLead()\n {\n }", "title": "" }, { "docid": "88e8b6dad1bf4271b155953ab30e9608", "score": "0.67689013", "text": "public function testProjectProjectsIdContactsContactIdDelete()\n {\n\n }", "title": "" }, { "docid": "e067968ecb7e68c8b588d4eb166d548c", "score": "0.6761566", "text": "public function testDeleteuser()\n {\n //$user = User::find(51);\n //$user-> delete();\n DB::table('users')->where('id', '>', 50)->delete();\n //$users = User::all();\n $this->assertDatabaseMissing('users', ['id' => '51']);\n }", "title": "" }, { "docid": "2046df2172924df953aaf869916e755c", "score": "0.67614496", "text": "public function testDelete() {\n $file = file_get_contents('tests/mock-api/delete-image.json');\n $data = json_decode($file, true);\n\n // Create stub\n $this->stub->method('delete')\n ->willReturn($data);\n\n // Perform call\n $res = $this->stub->delete('842F09CAF954298C6A4BCD25E1CA3689');\n\n // Assert\n $this->assertEquals($res['state'], 'REMOVING');\n\n }", "title": "" }, { "docid": "ae128fcbcd68d8362293ac71aedf447b", "score": "0.6758274", "text": "public function testCommentDeleteAccess() {\n $path = new Path(\n 'comment/' . self::$articleCommentObject->getId() . '/delete'\n );\n $this->assertFalse(\n $path->hasAccess(),\n \"Authenticated user is able to delete his own comment.\"\n );\n }", "title": "" }, { "docid": "17af24a5627dd8472f2ff6a3a47650dd", "score": "0.6753022", "text": "public function deleteFailure(FunctionalTester $I)\n {\n $I->wantTo('Unsuccessfully delete guideline section');\n\n $regularUser = User::findOne(1002);\n $superUser = User::findOne(['status' => User::STATUS['ACTIVE'], 'type' => User::TYPE['SUPER']]);\n\n $I->amGoingTo('try accessing the action unauthorized');\n $I->sendDELETE('/guideline-sections/1006');\n $I->seeUnauthorizedResponse();\n\n $I->amGoingTo('authorize as regular user and try to delete guideline section owned by another user');\n $I->haveHttpHeader('Authorization', 'Bearer ' . $regularUser->generateAccessToken());\n $I->sendDELETE('/guideline-sections/1006');\n $I->seeNotFoundResponse();\n\n $I->amGoingTo('authorize as super user and try to delete unexisting guideline section');\n $I->haveHttpHeader('Authorization', 'Bearer ' . $superUser->generateAccessToken());\n $I->sendDELETE('/guideline-sections/123456');\n $I->seeNotFoundResponse();\n }", "title": "" }, { "docid": "0bbcb01e412edc5c68ecc5259225dd59", "score": "0.67507994", "text": "public function testDelete()\n\t{\n\t\t$fitter_related = $this->fitters[0];\n\n\t\t$this->assertDatabaseHas('client_fitter', [\n\t\t\t'fitter_id' => $fitter_related->id,\n\t\t\t'client_id' => $this->client->id,\n\t\t]);\n\n\t\t$this->actingAs($this->clientUser, 'api')\n\t\t\t ->delete('/api/v1/client/my-fitters/' . $fitter_related->id)\n\t\t\t ->assertStatus(200)\n\t\t\t ->assertJson([\n\t\t\t\t 'success' => true,\n\t\t\t ]);\n\n\t\t$this->assertDatabaseMissing('client_fitter', [\n\t\t\t'fitter_id' => $fitter_related->id,\n\t\t\t'client_id' => $this->client->id,\n\t\t]);\n\t}", "title": "" }, { "docid": "b62c7590452c48535cc2d6037a3b5c49", "score": "0.67491096", "text": "public function testDelete()\n {\n // no vars\n $apiCall = new ApiCall();\n $result = $apiCall->delete($this->endpoint, array());\n $this->assertEquals(418, $result['statusCode']);\n $this->assertEquals(\"I'm a teapot\", $result['response']);\n\n // with vars\n $apiCall = new ApiCall();\n $result = $apiCall->delete($this->endpoint, array('var1'=>1, 'var2'=>6));\n $this->assertEquals(418, $result['statusCode']);\n $this->assertEquals(\"I'm a teapot\", $result['response']);\n }", "title": "" }, { "docid": "536bc5abdafa5bce16c232686fa64b60", "score": "0.6731019", "text": "public function testDeleteNotFound()\n {\n $id = 0;\n $route = $this->getUrl('api_get_article', ['id' => $id, '_format' => 'json']);\n\n $this->createAuthenticatedClient();\n $this->client->request(\n 'DELETE',\n $route,\n [],\n [],\n [\n 'CONTENT_TYPE' => 'application/json',\n ]\n );\n\n $response = $this->client->getResponse();\n $this->assertJsonResponse($response, Response::HTTP_NOT_FOUND);\n }", "title": "" }, { "docid": "f3758dca19d2532b11f614fc652436c3", "score": "0.67270344", "text": "public function deleteOrFail(): bool\n {\n if (!parent::delete()) {\n $this->throwErrorMessages();\n }\n\n return true;\n }", "title": "" }, { "docid": "284bfc4d8429b8997c1749a92c8b5927", "score": "0.6723863", "text": "public function testDelete()\n {\n // On interroge le client Http pour supprimer un utilisateur\n $response = $this->client->delete('/app_test.php/users/[email protected]');\n\n // On vérifie la réponse\n $this->assertEquals(204, $response->getStatusCode());\n }", "title": "" }, { "docid": "be6ef49c8867ceb2af5c3c9d56b33002", "score": "0.67196274", "text": "public function testDeletePet()\n {\n }", "title": "" }, { "docid": "4d1fd0929cbb0328b7aad35b60510a92", "score": "0.670821", "text": "public function testFilesDocumentIDDelete()\n {\n }", "title": "" }, { "docid": "672e0d75685baec9411e7597c9060740", "score": "0.6695903", "text": "public function testAddressDeleteItem()\n {\n }", "title": "" }, { "docid": "39eeaede1a86f67f8f0cbe135b36c973", "score": "0.6692394", "text": "public function testDelete() {\n\t\t$this->testAction(\n\t\t\t'/logs/admin_delete/1',\n\t\t\tarray('method' => 'post')\n\t\t);\n\t\t$logModel = ClassRegistry::init('DatabaseLog.Log');\n\t\t$count = $logModel->find('count');\n\n\t\t$this->assertSame(0, $count);\n\t}", "title": "" }, { "docid": "6f831f0e09877e524cd1bb1fce713668", "score": "0.6685975", "text": "public function testDelete()\n {\n $structure = $this->getMockBuilder(\\Magento\\Company\\Model\\Structure::class)\n ->disableOriginalConstructor()->getMock();\n $structure->expects($this->atLeastOnce())->method('getId')->willReturn(1);\n $this->structureResource->expects($this->once())->method('delete')->with($structure)->willReturnSelf();\n $this->assertTrue($this->structureRepository->delete($structure));\n }", "title": "" }, { "docid": "66ecd5f09b46dcaf4f21220cb7a42fda", "score": "0.66851735", "text": "public function test_deletar_um_documento()\n {\n $this->withoutExceptionHandling();\n factory(Documento::class, 3)->create();\n $id_to_be_deleted = random_int(1, 5);\n $this->delete(\"/api/documento/$id_to_be_deleted\");\n $this->assertDatabaseMissing('documentos', ['id' => $id_to_be_deleted]);\n }", "title": "" }, { "docid": "5d8895a69bbe33fc91bd76fc86d30c9b", "score": "0.6682242", "text": "public function testDelete()\n {\n $affected_rows = $this->connection->delete('writers');\n\n $this->assertEquals(3, $affected_rows);\n $this->assertEquals(0, $this->connection->executeFirstCell('SELECT COUNT(`id`) AS \"row_count\" FROM `writers` WHERE `name` = ?', 'Anton Chekhov'));\n }", "title": "" }, { "docid": "ce14d185d2e098426e3577db97fc608e", "score": "0.66775006", "text": "public function testTodoDelete()\n {\n $this->app['session']->set('user', [\n 'id' => 1,\n 'username' => 'user1',\n 'password' => 'user1',\n ]);\n\n $db = $this->mockDb(['executeUpdate']);\n\n $db->expects($this->any())\n ->method('executeUpdate')\n ->with(\"DELETE FROM todos WHERE id = ? and user_id = ?\", [\n 123,\n 1,\n ]);\n $this->app['db'] = $db;\n\n $client = $this->createClient();\n $uri = '';\n $client->request('POST', '/api/v1/todo/delete/123', [], [], ['CONTENT_TYPE' => 'application/json']);\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertEquals('{\"success\":true}', $client->getResponse()->getContent());\n }", "title": "" }, { "docid": "33abd70e21bd4431cb7f037b2cbc460f", "score": "0.6674409", "text": "public function testDelete()\n {\n\n // Create user.\n $user = $this->__user();\n\n // Create NLW exhibit, get parent exhibit.\n $exhibit = $this->__exhibit($user);\n $parentExhibit = $exhibit->getExhibit();\n\n // Get counts.\n $webExhibitsCount = $this->_webExhibitsTable->count();\n $nealineExhibitsCount = $this->_exhibitsTable->count();\n\n // Delete web exhibit.\n $exhibit->delete();\n\n // Web exhibit deleted.\n $this->assertEquals(\n $this->_webExhibitsTable->count(),\n $webExhibitsCount - 1\n );\n\n // Check for absence.\n $this->assertNull(\n $this->_webExhibitsTable->find($parentExhibit->id)\n );\n\n // Neatline exhibit deleted.\n $this->assertEquals(\n $this->_exhibitsTable->count(),\n $nealineExhibitsCount - 1\n );\n\n // Check for absence.\n $this->assertNull(\n $this->_exhibitsTable->find($exhibit->id)\n );\n\n }", "title": "" }, { "docid": "5486ac9cff28e100b79c67d13c590c43", "score": "0.66730374", "text": "public function testDeleteAccounts()\n {\n Admin_Controller_User::getInstance()->delete($this->objects['user']->accountId);\n \n $this->setExpectedException('Exception');\n Tinebase_User::getInstance()->getUserById($this->objects['user']->getId);\n }", "title": "" }, { "docid": "6d5d80e9e54e776445304ade8ad50fb2", "score": "0.6672548", "text": "public function testDeleteById()\n {\n\n // Existing internship\n $this->json('DELETE', '/internships/3')\n ->seeJsonEquals([\n 'status_code' => 200,\n 'status' => 'OK',\n 'message' => 'Resource deleted',\n ])\n ->seeStatusCode(200)\n ->notSeeInDatabase('internships', ['id' => 3]);\n\n }", "title": "" }, { "docid": "9fab5bde54ab05ef52ecc039e482b714", "score": "0.66697085", "text": "public function delete()\n\t{\n\t\tthrow new DAV\\Exception\\NotImplemented();\n\t}", "title": "" } ]
dadad3f3e92c31c8cca6fa32019311df
Obtiene el listado de usuarios existentes en bd
[ { "docid": "4c9bdc7b552f831aba1475195346b98b", "score": "0.0", "text": "public function getUsers() {\n $data = DB::table('cms_users')\n ->select('id','name')\n ->get();\n\n return $data;\n }", "title": "" } ]
[ { "docid": "995ad0ed581da0d7d0d40aa0cf807b70", "score": "0.73870844", "text": "public static function getList() {\n $Conn = new Conn();\n return $Conn -> select(\"SELECT * FROM tb_usuarios ORDER BY deslogin\");\n }", "title": "" }, { "docid": "750bd3befd12b8a35b62134948cf92d6", "score": "0.7175837", "text": "public function getUsuarios() {\r\n $result = $this->mysqli->query('SELECT * FROM usuarios');\r\n $users = $result->fetch_all(MYSQLI_ASSOC);\r\n $result->close();\r\n return $users;\r\n }", "title": "" }, { "docid": "2b6c61c8b0b2830fd9f6fc017a7d01fb", "score": "0.7152973", "text": "function afficherUsers(){\n\t\t$sql=\"SElECT * from user\";\n\t\t$db = Config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "title": "" }, { "docid": "e8e5367b5eed0f89077cd4688cd37ecd", "score": "0.714713", "text": "function listUsers() {\n\t\tglobal $userdb;\n\t\treturn $userdb->getCol(\"SELECT username FROM authenticate ORDER BY username\");\n\t}", "title": "" }, { "docid": "7b6563b57480e95aefa57bc9a9f1613f", "score": "0.7135098", "text": "public function getList()\r\n {\r\n\r\n $sql = \"SELECT * FROM USUARIO\";\r\n $users = array();\r\n if (!$resultado = pg_Exec($this->conexion, $sql));\r\n\r\n\r\n while ($row = pg_fetch_array($resultado)) {\r\n $user = new User();\r\n $user->setCod_usuario($row[0]);\r\n $user->setCod_t_usuario($row[1]);\r\n $user->setCorreo($row[2]);\r\n $user->setPassword($row[3]);\r\n $user->setNombre($row[4]);\r\n $user->setEstado($row[5]);\r\n $user->setCantidad_documentos($row[6]);\r\n $user->setDireccion($row[7]);\r\n $user->setTelefono($row[8]);\r\n $user->setCantidad_reservas_hechas($row[9]);\r\n\r\n $users[] = $user;\r\n }\r\n return $users;\r\n }", "title": "" }, { "docid": "1ab40ecfb2a3d7daa54dd8b925921d88", "score": "0.70584464", "text": "public function obtenerUsuarios(){\n\n $this->db->query(\"SELECT * FROM usuarios\");\n\n return $this->db->registers();\n }", "title": "" }, { "docid": "00a4ddd77583015b6aac3fe58750fdba", "score": "0.70463353", "text": "public function listarUsuarios(){\n\t\t\t$sql=\"SELECT u.*,a.ceco,a.nombreArea FROM usuario AS u LEFT JOIN area AS a ON u.idarea=a.id WHERE u.activo='si' AND u.id <> '1'\";\n\t\t\t$datos= $this->cmd->Ejecuta($sql);\n\t\t\treturn $datos;\n\t\t}", "title": "" }, { "docid": "d7a1d10b420ad204cc5cdb55362b8431", "score": "0.7019351", "text": "public function getAll(){\n\t\t$sql = $this->db->query(\"SELECT * FROM usuarios\");\n\t\treturn $sql->fetchAll(PDO::FETCH_ASSOC);\n\t}", "title": "" }, { "docid": "89aa710834d44d11b00f93e847a03538", "score": "0.70099187", "text": "function obtener_usuarios(){\n $con = conexion();\n $usuarios = $con->query(\"SELECT * FROM Usuarios\");\n if(!$usuarios){\n die($con->error);\n }else{\n $con->close();\n return $usuarios;\n }\n }", "title": "" }, { "docid": "aa28e1561449b958d3527ffb3e58c7e2", "score": "0.69956964", "text": "public function listar() \n {\n $sql = \"SELECT * FROM usuarios\";\n return ejecutarConsulta($sql); \n }", "title": "" }, { "docid": "cf99dc5dce05df5c02f497f7e4f85c00", "score": "0.6993814", "text": "public function getUsers() {\n\n\t\ttry{\n\n\t\t\t$query = $this->con->prepare('SELECT * FROM public.usuario');\n\t\t\t$query->execute();\n\t\t\t$this->con->close_con();\n\t\t\treturn $query->fetchAll(PDO::FETCH_ASSOC);\n\t\t\n\t\t} catch(PDOException $e) {\n\n\t echo $e->getMessage(); \n\n\t }\n\n\t}", "title": "" }, { "docid": "f505a78b9752624af1c975445449edd0", "score": "0.69825417", "text": "public function list_users()\r\n\t{\r\n\t\t// \t$list = $this->db->query(\"SELECT * FROM users WHERE id = '\".$_SESSION['id'].\"'\");\r\n\t\t// else if($_SESSION['is_admin'] == 1)\r\n\t\t// \t$list = $this->db->query(\"SELECT * FROM users WHERE 1\");\r\n\t\t$list = $this->db->query(\"SELECT * FROM users WHERE 1\");\r\n\t\treturn $list;\r\n\t}", "title": "" }, { "docid": "dcc5f4492a4fc12ec171f22306ea0b55", "score": "0.69805515", "text": "public function getUsersList()\n\t{\n\t $sql = \"SELECT * FROM `users` where username <> 'blank' and status =1 ORDER BY `name`\";\n\t\treturn $this->opasa->query($sql);\n\t}", "title": "" }, { "docid": "2a015638a119ff154e6b1ebb0e898d13", "score": "0.6972105", "text": "function ConsultarUsuarios() {\n $this->ConectarBD();\n $sql = \"SELECT username FROM USUARIO\";\n\n if (!($resultado = $this->mysqli->query($sql))) {\n return 'Error en la consulta sobre la base de datos.';\n } else {\n $toret = array();\n $i = 0;\n while ($fila = $resultado->fetch_array()) {\n $toret[$i] = $fila;\n $i++;\n }\n return $toret;\n }\n }", "title": "" }, { "docid": "fdbe2224a9cb9d4723ce93f194243ad8", "score": "0.6956185", "text": "public function todosUsuarios()\n {\n $stmt = $this->db->query('SELECT * FROM `bmel_usuarios`');\n\n while ($filas = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $this->usuarios[] = $filas;\n }\n\n return $this->usuarios;\n }", "title": "" }, { "docid": "529b5c7a9db90ce61f5891d45d523170", "score": "0.6950552", "text": "function getUsuarios() {\n $con = getConnection();\n if($con !== null) {\n $sql = \"SELECT * FROM usuarios LEFT JOIN info_usuario ON info_usuario.idusuario = usuarios.idusuarios where tipo = 2 ORDER BY creado_el DESC\";\n $result = $con->query($sql);\n if($result && $result->num_rows>0){\n return $result->fetch_all(MYSQLI_ASSOC);\n }\n return [];\n }\n return false;\n}", "title": "" }, { "docid": "a272cc493e2c88e0045c91626608a7a6", "score": "0.6949408", "text": "public function fetchAllUsuario()\n {\n \n $sql = 'SELECT * FROM user';\n\n return $this->mysqli->query($sql);\n }", "title": "" }, { "docid": "332c5e4bed2176ad5072f44bbdbbce18", "score": "0.69467336", "text": "function listarUsuarios()\n{\n\tglobal $tbl_usuario;\n\ttry \n\t{\n\t\t$rs = doQuery( getSelect( $tbl_usuario ) );\n\t\t# var_dump( $rs );\n\t\treturn array( 'usuarios' => $rs );\n\t} \n\tcatch ( PDOException $ex ) \n\t{\n\t\tshow_app_error( $ex );\n\t\tdie();\n\t}\n}", "title": "" }, { "docid": "23a9d85da8d0725c4e638a6ee2603699", "score": "0.69092953", "text": "public function usuarios(){\n return SeguridadUsuario::reporte(\"rol_id=\".$this -> id);\n }", "title": "" }, { "docid": "0b68a24dac09338f7ad45c58b93d4549", "score": "0.6891215", "text": "public function getListUser() {\n $stmt = $this->conn->prepare(\"SELECT user_id, email, api_key, fullname, phone, personalID, \n personalID_img, link_avatar, status, created_at, locked FROM user\");\n if ($stmt->execute()) {\n // $user = $stmt->get_result()->fetch_assoc();\n $users = $stmt->get_result();\n $stmt->close();\n return $users;\n } else {\n return NULL;\n }\n }", "title": "" }, { "docid": "3d5be898758dc67f0afd4e14eb3e1d95", "score": "0.6890426", "text": "function listarusuario(){\n\n\t\t\t# variabele en donde estara sentencia SQL\n\t\t\t$sql = \"SELECT * FROM `usuarios`;\";\n\t\t\t# se prepara el stament para la ejecucion de la consulta\n\t\t\t$stmt = $this->AbrirConexion->prepare($sql);\n\n\t\t\ttry {\n\t\t\t\t# ejecutamos el stament\n\t\t\t\t$stmt->execute();\n\t\t\t\t# solicitamos la consulta en un arreglo asociativo\n\t\t\t\t$result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t} catch (PDOException $e) {\n\t\t\t\t# capturamos el error\n\t\t\t\t$result = $e->getMesage();\n\t\t\t}\n\t\t\t# libera la conexion con la base de datos\n\t\t\t$stmt->closeCursor();\n\n\t\t\t# retornamos el resultado de la consulta.\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "74a3643dee50a6eddb635684e7da3e26", "score": "0.6879211", "text": "function user_list($fields = 'UId,Login') {\r\n\t\t\t$result = $this->parent->mysql->query(\"SELECT \" . $this->parent->mysql->escape($fields) . \" FROM user\");\r\n\t\t\twhile ($user = $this->parent->mysql->fetch_object($result)) {\r\n\t\t\t\t$users[] = $user;\r\n\t\t\t}\r\n\t\t\treturn $users;\r\n\t\t}", "title": "" }, { "docid": "29265e7983ef0cce0fbe8cc4095b4cda", "score": "0.6871228", "text": "function getUsuarios(){ // Revidada\n\n\t\t$usuarios = null;\n\n\t\t//CONSULTA PARA OBTENER A TODOS LOS USUARIOS\n\t\t$query = \"SELECT * from usuarios\";\n\n\t\t//HACEMOS LA CONSULTA A LA DB\n\t\tif($consulta = $this->conectar->query($query)){\n\t\t\t\n\t\t\t//LEEMOS LINEA A LINEA Y GUARDAMOS LOS DATOS\n\t\t\twhile ($row = $consulta->fetch_assoc()) {\n\t\n\t\t\t\t$usuarios[] = $row;\n\t\n\t\t\t}\n\t\t\t//RETORNAMOS LOS USUARIOS\n\t\t\treturn $usuarios;\n\n\t\t}else throw new UsuarioException( \"Problema al importar usuarios. Consulta mal realizada\" );\n\t\t\n\t}", "title": "" }, { "docid": "d57ca430819848dea7df73754721f634", "score": "0.68698436", "text": "public function listadoUsuarios(){\n\t #\n\t \t$view = new VistaPersona;\n\t\t\tif(in_array(SeguridadRepository::getInstance()->getRol(), $this->getRolPermitido())){ # Verifica su Rol\n\t\t\t\t$uH = PersonaRepository::getInstance()->listadoUsuariosHabilitados(); #Solicita a la BD el Listado de Usuarios Habilitados.\n\t\t\t\t$uD = PersonaRepository::getInstance()->listadoUsuariosDeshabilitados(); #Solicita a la BD el Listado de Usuarios Deshabilitados.\n\t\t\t\t$view->showListadoUsuarios($uH,$uD);\n\t\t\t}else{\n\t\t\t\t$view->showError('Usted no es Administrador'); #Si No Cumple con el Rol se ejecuta una Alerta\n\t\t\t}\n\t }", "title": "" }, { "docid": "33536202a9b78a3b751da25a878e6ba7", "score": "0.6862832", "text": "public function getUsuarios(){\n $sql = \"SELECT id_usuario, nombres, apellidos, tipo_usuario, usuario, correo FROM usuarios INNER JOIN tipo_usuario USING(id_tipo)\";\n $params = array(null);\n return Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "6b9aca95ad959be2eccb459350908c44", "score": "0.6810139", "text": "public static function getUsuarios() {\n try {\n $conexion = new Conexion();\n $sql = \"SELECT nombre_completo,telefono,correo,img_url_perfil,usuario_id FROM \" . self::TABLA . \"\";\n $consulta = $conexion->prepare($sql);\n $consulta->execute();\n $registros = $consulta->fetchAll();\n return $registros;\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n }\n }", "title": "" }, { "docid": "d124c666edfb949813ace85553009500", "score": "0.6809694", "text": "public function getUsuarios()\n {\n $stmt = $this->db->query(\"SELECT *\n\t\t\t\t\t\t\t\t FROM usuario\");\n $toret_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\n \n $users = array();\n \n foreach ($toret_db as $user) {\n array_push($users, new User($user['login'], $user['nombre'], $user['apellidos'], $user['pass'], $user['rol'], $user['genero']));\n }\n \n return $users;\n }", "title": "" }, { "docid": "3149a5dee01a8c3f4caccc19b35867fb", "score": "0.68027467", "text": "function get_usuarios() {\n\n $data = array();\n\n //$res = mysql_query(\"SELECT L.*,P.nombre as plan_name,P.image as plan_image FROM label AS L INNER JOIN plan as P ON L.plan = P.id WHERE L.administrador = 0 ORDER BY L.activo DESC, L.record_label ASC \");\n $res = mysql_query(\"SELECT * FROM usuarios\");\n\n while ($row = mysql_fetch_array($res)) {\n $data[] = $row;\n }\n\n return $data;\n\n //Devuelve un array con todos los usuarios y dentro de ese array todos los valores de los campos de la base de datos\n }", "title": "" }, { "docid": "33c1bbfe8a761803984f854e05fb1119", "score": "0.67950726", "text": "public function getUsers(){\n $sql = \"Select * FROM users\";\n return $this->db->query($sql, PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "e5605d02b886736a3412e8c361754a6b", "score": "0.6784921", "text": "public function listarUsuarios()\n {\n return User::where('is_admin', false)->orderBy('username')->paginate(10);\n }", "title": "" }, { "docid": "5e2eacfa0155d4409213417b1dc555f6", "score": "0.6773433", "text": "function get_user_list(){\n $sql = \"SELECT * FROM user;\";\n\t\treturn get_result($sql);\n\t}", "title": "" }, { "docid": "286324617875c2148d9ea50894416c9e", "score": "0.67623955", "text": "public function showUsers(){\n\t\t\t//Toma el resultado de la consulta\n\t\t\t$resultado=null;\n\t\t\t//CONECTION DATA BASE\n\t\t\t$modelo= new conexion();\n\t\t\t$conexion=$modelo->post_conexion();\n\t\t\t//QUERY SQL\n\t\t\t$sql=\"SELECT * FROM user\"; \n\t\t\t$result=$conexion->prepare($sql);\n\t\t\t//PDO\n\t\t\t$result->execute();\n\n\t\t\t//Cargar el resultado a la variable resultado\n\t\t\twhile ($f=$result->fetch()) {\n\t\t\t\t$resultado[]=$f;\n\t\t\t}\n\n\t\t\treturn $resultado;\n\t\t}", "title": "" }, { "docid": "67d205275518651355e522acbc290b78", "score": "0.6756943", "text": "public function getUsersList()\n\t{\n\t\t$db = $this->getDbTable()->getAdapter();\n\t\t$select = $db->select()\n\t\t\t->from(array('u' => 'users'), \n\t\t\t\tarray('login', 'password', 'name', 'surname', 'patronymic'))\n\t\t\t->joinLeft(array('ur' => 'users_roles'), \n\t\t\t\t'u.user_id = ur.user_id',\n\t\t\t\tarray())\n\t\t\t->joinLeft(array('r' => 'roles'), \n\t\t\t\t'ur.role_id = r.role_id',\n\t\t\t\tarray('role_name', 'active'))\n\t\t\t->joinLeft(array('sm' => 'system_modules'), \n\t\t\t\t'sm.id = r.default_module', \n\t\t\t\tarray('module_name'))\n\t\t\t->joinLeft(array('ud' => 'users_departments'), \n\t\t\t\t'u.user_id = ud.user_id', \n\t\t\t\tarray())\n\t\t\t->joinLeft(array('d' => 'departments'), \n\t\t\t\t'd.department_id = ud.department_id', \n\t\t\t\tarray('department_name'))\n\t\t\t->order('d.department_id ASC');\t\n\t\treturn $db->fetchAll($select);\t\t\n\t}", "title": "" }, { "docid": "b10aae107268e7ee8dd6b7a56b1170d7", "score": "0.675401", "text": "public function get_all_users()\n {\n $query = $this->db->query('SELECT uid, usuario, perfil, nombres, apellidos, correo, cargo, estado, fecha_registro FROM usuarios');\n \n $usuarios = array();\n if(!empty($query->result()))\n {\n foreach ($query->result() as $row)\n {\n $usuarios[$uid] = $row;\n }\n }\n return $usuarios;\n }", "title": "" }, { "docid": "590fa59f81337377452fb68069e97b54", "score": "0.67376655", "text": "public function getUsers(){\n\t\t\t/**\n\t\t\t*\t@var array $result - rezultat selekcije iz tabele users\n\t\t\t*/\n\t\t\t$result = $this->db->get(\"users\");\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "3a2777f492bcd606bf6600953b0e7bf4", "score": "0.67343533", "text": "public function get_list_users()\n\t{\n\t\treturn DB::select('*')\n\t\t\t\t->from(self::$_table_name)\n\t\t\t\t->execute()\n\t\t\t\t->as_array();\n\t}", "title": "" }, { "docid": "e0a4c7da512af3fde38814719db469b5", "score": "0.67307925", "text": "public function listDbUsers() {\n $ret = $this->_db->mgListUsers();\n return $ret;\n }", "title": "" }, { "docid": "c9d73f94aab88369424fbb6cd7f6c738", "score": "0.67305744", "text": "function consultaAdministradores($conexao)\n{\n $buscarUsuarios = 'SELECT * FROM usuario ORDER BY Nome';\n\n $resultado = mysqli_query($conexao, $buscarUsuarios);\n\n $usuarios = array();\n\n while ($user = mysqli_fetch_assoc($resultado)) {\n\n $usuarios[] = $user;\n }\n\n return $usuarios;\n}", "title": "" }, { "docid": "05ed7e08adf8d5883527495fc5e8e10e", "score": "0.67253333", "text": "static function getUsers(){\n\n $result = conn::db()->query(\"SELECT * FROM transcript.tblUsers\")->fetchAll();\n if($result){\n $users = array();\n foreach($result as $row)\n {\n array_push($users, $row['UserName']);\n }\n return $users;\n }\n else{\n\n return false;\n }\n }", "title": "" }, { "docid": "11902179e248cb05c0d40fd6c3993870", "score": "0.6723913", "text": "public static function getUsuario()\n {\n $conn = Database::getInstance()->getDatabase();\n $ssql = \"SELECT * FROM Usuarios\";\n $query = $conn->prepare($ssql);\n $query->execute();\n return $query->fetchAll();\n }", "title": "" }, { "docid": "880dfd527cef7310b03e0f663e9ed6b8", "score": "0.67064494", "text": "public function getAllUsers()\n {\n $users = array();\n $stmt2 = $this->pdo->query('SELECT * FROM user');\n if ($stmt2) {\n while ($row = $stmt2->fetch(PDO::FETCH_ASSOC)) {\n array_push($users, $row);\n }\n return $users;\n }\n return false;\n }", "title": "" }, { "docid": "b73d41d3d332b8921e1969462d976df0", "score": "0.6705772", "text": "public function get_users()\n\t{\n\t\t$query = $this->db->query(\"SELECT * FROM usuarios ORDER BY apellido, nombre ASC;\");\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "5988cc162803d501191cf04007673632", "score": "0.66923743", "text": "public function listar_usuarios(){\n\t\t\t\t$model = UsuarioRepository::getInstance()->listar_usuarios();\n\t\t\t\t$view = new Listar_usuarios();\n\t\t\t\t$view -> show($model);\n\t\t\t}", "title": "" }, { "docid": "369e2695e40607f0f034a48e4c702dec", "score": "0.66876864", "text": "public function getBindUsers()\n {\n return $this->dao->select('account,ranzhi')->from(TABLE_USER)->where('ranzhi')->ne('')->andWhere('deleted')->eq('0')->fetchPairs('ranzhi', 'account');\n }", "title": "" }, { "docid": "73a9c2aed4d87043447dd7cfa59b1439", "score": "0.66656363", "text": "private function selectUsers() {\n $result = array();\n try {\n $this->sUsers->execute();\n while (($rs = $this->sUsers->fetch(PDO::FETCH_ASSOC)) !== false) {\n array_push($result, $this->getUser((int) $rs[\"ID\"]));\n }\n } catch (PDOException $ex) {\n echo \"PDOEXCEPTION ===========================\";\n var_dump($ex);\n }\n return $result;\n }", "title": "" }, { "docid": "8b347a9e28de9d1a19d6192f318071ac", "score": "0.666333", "text": "public function listar(){\n $db = new Database();\n \n $sqlUsuario = $db->consulta(\"SELECT * FROM Usuario\");\n $arrayUsuario = array();\n while ($row_usuario = mysqli_fetch_assoc($sqlUsuario))\n $arrayUsuario[] = $row_usuario;\n \n $db->desconectar();\n return $arrayUsuario;\n }", "title": "" }, { "docid": "f7d9d6f090153882907cf5fcda7f3476", "score": "0.6658448", "text": "public function getUsers() {\n $getUsers = $this->pdo->prepare(\n \"SELECT User FROM mysql.user;\"\n );\n $getUsers->execute();\n $result = $getUsers->fetchAll();\n return $result;\n }", "title": "" }, { "docid": "4c7329f4514aee8062617aa40e9986f0", "score": "0.66538537", "text": "public function listar()\n {\n $usuario = new Usuario();\n return $usuario->Login(\"fdsfs\", \"dfs\");\n }", "title": "" }, { "docid": "a4f3a73196fd299c507faba3770bea70", "score": "0.6651283", "text": "function Listar(){\n\t\tinclude(\"Conexion.php\");\n\n\t\t$consulta=\"SELECT * FROM usuario\";\n\t\t$resultado=$conexion->query($consulta);\n\n\t\tif(mysqli_num_rows($resultado)>=1){\n\t\t\twhile($usuarios=$resultado->fetch_array(MYSQLI_BOTH)){\n\t\t\t\techo \"<tr><td class='name'>\".$usuarios['id_usuario'].\"</td><td>\".$usuarios['nombre'].\"</td><td>\".$usuarios['apellido'].\"</td><td>\".$usuarios['telefono'].\"</td><td>\".$usuarios['direccion'].\"</td><td>\".$usuarios['correo'].\"</td><td>\".$usuarios['password'].\"</td></tr>\";\n\t\t\t}\n\t\t}else{\n\t\t\t\techo \"no hay registros para listar\";\n\t\t}\n\t\n\n\t\t/*while($usuarios=$resultado->fetch_array(MYSQLI_BOTH)){\n\t\t\t\techo $usuarios[2].\"<br>\";\n\t\t}*/\n\t}", "title": "" }, { "docid": "c61230554fe6e9d0716b3ab54988ac53", "score": "0.66464394", "text": "function consultar_usuarios(){\n\t\t//Conectar a la BD\n\t\tglobal $mysqli;\n\t\t//Realizar consulta\n\t\t$sql = \"SELECT * FROM usuarios\";\n\t\t$rsl = $mysqli->query($sql);\n\t\t$array = [];\n\t\twhile ($row = mysqli_fetch_array($rsl)) {\n\t\t\tarray_push($array, $row);\n\t\t}\n\t\techo json_encode($array); //Imprime Json encodeado\t\t\n\t}", "title": "" }, { "docid": "e3fecd20bb6463d1029aaf603278a321", "score": "0.664514", "text": "public function readUsuarios()\n\t{\n\t\t$sql = 'SELECT user_id, name_client, last_name, e_mail, user_name FROM table_clients ORDER BY last_name';\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t}", "title": "" }, { "docid": "be1b64c80caa0d08b9473dbb02874971", "score": "0.66407186", "text": "public function fetchAllUsers()\n {\n $db = $this->getPDO();\n $sql = \"SELECT * FROM utilisateurs\";\n $users = $db->query($sql);\n return $users;\n }", "title": "" }, { "docid": "825d59599ea21364aabe28bcef931e20", "score": "0.6639639", "text": "function getUserList()\n\t{\n\t\t$this->_db->setQuery(\"SELECT username FROM #__users\");\n\t\treturn $this->_db->loadAssocList();\n\t}", "title": "" }, { "docid": "825d59599ea21364aabe28bcef931e20", "score": "0.6639639", "text": "function getUserList()\n\t{\n\t\t$this->_db->setQuery(\"SELECT username FROM #__users\");\n\t\treturn $this->_db->loadAssocList();\n\t}", "title": "" }, { "docid": "de90a286c61679851ccb2140b30bf9d8", "score": "0.66335344", "text": "function get_all(){\n\t\tglobal $conn;\n\t\t$sql = 'SELECT * FROM usuario';\n\t\t$r = $conn->query($sql);\n\t\tif($r->num_rows)\n\t\t\treturn $r;\n\t\treturn [];\n\t}", "title": "" }, { "docid": "3138a193b74e3461e95e47e0a01cef9e", "score": "0.6633011", "text": "public function getAllUsers(){\r\n\t\t$this->connect();\r\n\t\t$sql=\"SELECT * from users\";\r\n\t\t$result = mysql_query($sql);\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "f4d738d74747045675a185fa0fece07b", "score": "0.6629081", "text": "function doGetUsers(){\n $res = null;\n $res = $this->doDatabaseQuery(\"SELECT * FROM fe_users WHERE NOT deleted = 1 AND NOT disable = 1\");\n return $res;\n }", "title": "" }, { "docid": "447759fa482b073be3636860b9b3964d", "score": "0.66273934", "text": "function getUsers () {\n\t\t/**\n\t\t * Are we connected?\n\t\t */\n\t\tif (!$this -> _isconnected()) {\n\t\t\t$this -> _error(E_USER_NOTICE, 'Not connected');\n\t\t\treturn false;\n\t\t} \n\n\t\t/**\n\t\t * Read in user database\n\t\t */\n\t\tif (($DATA = $this -> _readFile(\"$this->_LIBPATH/txtsql/user.MYI\")) === false) {\n\t\t\t$this -> _error(E_USER_WARNING, 'Database file is corrupted!');\n\t\t\treturn false;\n\t\t} \n\n\t\t$users = array();\n\t\tforeach ($DATA as $key => $value) {\n\t\t\t$users[] = $key;\n\t\t} \n\t\treturn $users;\n\t}", "title": "" }, { "docid": "d07130e3fb8f3e0d178d10c5ee7e4d1a", "score": "0.661307", "text": "public function getUsuarios()\n {\n $sql = $this->_db->query(\"SELECT u.*, r.role \"\n . \"FROM \"\n . \"usuarios u, roles r WHERE u.role = r.idrole\");\n \n $usuarios = $sql->fetchAll(PDO::FETCH_ASSOC);\n return $usuarios;\n }", "title": "" }, { "docid": "8b7484343a073f7c758d0e4e4635cd94", "score": "0.6612547", "text": "public static function obtenerUsuarios() {\n $conexion = new Conexion();\n $sql = \"SELECT user.telefono,user.nombre_completo, user.correo, \"\n . \"user.fecha_ingreso,estado, tp.tipo_usuario,user.img_url_perfil FROM \" . self::TABLA . \" as user\"\n . \" INNER JOIN tipos_usuarios as tp ON(user.tipo_usuario_id=tp.tipo_usuario_id); \";\n $consulta = $conexion->prepare($sql);\n $consulta->execute();\n $registros = $consulta->fetchAll();\n return $registros;\n }", "title": "" }, { "docid": "d5d8ac92b8126698988d698ff65007a1", "score": "0.6609876", "text": "public function listar() {\r\n $sql = \"SELECT * FROM usuario\";\r\n return ejecutarConsulta($sql);\r\n }", "title": "" }, { "docid": "b4ce95b3ad63a3d9cfb6bde49b63bd4d", "score": "0.66015077", "text": "function getUsers(){\n\n $result = '';\n\n if( isset($_SESSION['login_user']) && $_SESSION['login_user']['role'] === \"admin\" ){\n\n $sql= \"select * from {$this->db->_dbName}.{$this->db->_usersTable} order by company\";\n\n $pdo = $this->db->openDB();\n $stmt= $pdo->prepare($sql);\n $stmt->execute( );\n $result= $stmt->fetchAll(\\PDO::FETCH_ASSOC); \n\n }\n\n return $result; \n }", "title": "" }, { "docid": "f9c6f8d6a60ca14941e25dbd75684613", "score": "0.65982574", "text": "function getAllUsers(){\n\t\t\n\t\t$db = new Application_Table_dbUser();\n\t\t\n\t\t$rows = $db->getAllUsers();\n\t\t\n\t\treturn $rows;\n\t\t\n\t}", "title": "" }, { "docid": "8ae80a5074cf3973fb071d504bb78cce", "score": "0.65975523", "text": "public function get_user_list() {\n $params = array(array('sessionId' => $this->session));\n $result = $this->request('userList', $params);\n return $result;\n }", "title": "" }, { "docid": "eeb06a8659071cc6b1dfd5658b0573fd", "score": "0.6597105", "text": "function find_all_users() {\n\t\tglobal $connection;\n\t\t\n\t\t$query = \"SELECT * \";\n\t\t$query .= \"FROM yb_users \";\n\t\t$query .= \"ORDER BY username ASC\";\n\t\t$user_set = mysqli_query($connection, $query);\n\t\tconfirm_query($user_set);\n\t\treturn $user_set;\n\t}", "title": "" }, { "docid": "839592da4eeff7ee03d9bec671121f05", "score": "0.6596235", "text": "function getUsers() {\r\n require $this->sRessourcesFile;\r\n if (in_array(\"users\", $this->aSelectedFields)) {\r\n $aParams['sSchemaFramework'] = array('value' => $this->aProperties['schema_framework'], 'type' => 'schema_name');\r\n $aParams['sSchemaVmap'] = array('value' => $this->aProperties['schema_vmap'], 'type' => 'schema_name');\r\n $aParams['printstyle_id'] = array('value' => $this->aValues['my_vitis_id'], 'type' => 'number');\r\n $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getPrintStyleUsers'], $aParams);\r\n $sListUserId = \"\";\r\n $aListUserLogin = array();\r\n while ($aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult)) {\r\n if ($sListUserId == \"\") {\r\n $sListUserId = $aLigne[\"user_id\"];\r\n } else {\r\n $sListUserId .= \"|\" . $aLigne[\"user_id\"];\r\n }\r\n $aListUserLogin[] = $aLigne[\"login\"];\r\n }\r\n $oPDOresult = $this->oConnection->oBd->fermeResultat();\r\n $this->aFields['users'] = $sListUserId;\r\n $this->aFields['users_label'] = implode(',', $aListUserLogin);\r\n }\r\n }", "title": "" }, { "docid": "b0fe816e3ecaee2495cb0926e12e6b68", "score": "0.65961486", "text": "public function allUsers(){\n\n $this->database->query('select * from users');\n \n return $this->database->loadObjectList();\n }", "title": "" }, { "docid": "06d7ef4130b877bf01f21bc7316d9a57", "score": "0.6575783", "text": "function getUsers(){\n\treturn dbSelect('users');\n}", "title": "" }, { "docid": "458a842dd3c16203997ce0d58eedf9a0", "score": "0.65732455", "text": "public function get_users() {\r\n\t\t$db = new Database();\r\n\t\t$connection = $db->open_connection(\"1153791\");\r\n\t\t$getusers = \"SELECT `email` FROM accounts\";\r\n\t\t$foundUsers = $db->queryDb($connection, $getusers);\r\n\t\tif(!$foundUsers) {\r\n\t\t\ttrigger_error('Ivalid query: ' . $connection->error);\r\n\t\t}\r\n\t\treturn $foundUsers;\r\n\t}", "title": "" }, { "docid": "0d5a23f7260c7551aafd8e89c4dce7a8", "score": "0.65669394", "text": "function summon_get_users() {\n\tglobal $bbdb;\n\t// maybe cached in future versions.\n\t$users = $bbdb->get_results(\"SELECT ID, user_login FROM $bbdb->users ORDER BY user_login\");\n\t\n\treturn $users;\n}", "title": "" }, { "docid": "aeb32087ac5bc4329167b016686f2f7d", "score": "0.65624833", "text": "public function getAllUsers();", "title": "" }, { "docid": "aeb32087ac5bc4329167b016686f2f7d", "score": "0.65624833", "text": "public function getAllUsers();", "title": "" }, { "docid": "a54701a3a52a7d1c4ffa4b573d7b35b2", "score": "0.6558409", "text": "public function getList()\r\n {\r\n $users = [];\r\n\r\n $q = $this->_db->query('SELECT id, lastname, firstname, mail, log, password, nickname, role FROM user ORDER BY id');\r\n\r\n while ($donnees = $q->fetch(PDO::FETCH_ASSOC))\r\n {\r\n $users[] = new userClass($donnees);\r\n }\r\n\r\n return $users;\r\n }", "title": "" }, { "docid": "ef707ec35d17f69d4cb8351aa575d8a4", "score": "0.65549314", "text": "public function getUsers()\n {\n return $this->db->query(\"SELECT\n users.id AS id,\n users.login AS login,\n users.email AS email,\n roles.name AS role,\n statuses.name AS status\nFROM users\n JOIN statuses ON users.statusId = statuses.id\n JOIN roles ON users.roleId = roles.id\")->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "8999ea8b65bfcc62e463127b598fb5fe", "score": "0.6551165", "text": "public function getAllUsers()\n {\n $query = \"select * from users\";\n $statement = $this->conn->prepare($query);\n $statement->execute();\n $users = $statement->fetchAll();\n return $users;\n }", "title": "" }, { "docid": "c04fe20adc528ea436582dd20aa95186", "score": "0.654829", "text": "public static function getUsers() {\r\n\t\t$res = null;\r\n\t\t$res = self::dbQuery('SELECT * FROM fe_users WHERE NOT deleted = 1 AND NOT disable = 1');\r\n\t\treturn $res;\r\n\t}", "title": "" }, { "docid": "e7c32ca21f342ad98bbba300a0174596", "score": "0.65394604", "text": "public function listAllUsers() {\n\t\t$data = $this->_db->get('users', array('id', '<>', '0'))->results();\n\t\t$return = \"\";\n\t\t$i = 1;\n\n\t\tforeach($data as $item){\n\t\t\tif($i != count($data)){\n\t\t\t\t$return .= '\"' . $item->username . '\",';\n\t\t\t} else {\n\t\t\t\t$return .= '\"' . $item->username . '\"';\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "1e544623d5262fabd9ce22b010e1cbaf", "score": "0.6533792", "text": "static function getUserList()\n {\n return User::all();\n }", "title": "" }, { "docid": "9ef0e369028417d0865a8698fc5bde2b", "score": "0.65231127", "text": "public function getUsers() {\n\t \t$users = array();\n\t \ttry {\n\t \t\t$connect = new PDO( OPAL_DB_DSN, OPAL_DB_USERNAME, OPAL_DB_PASSWORD );\n\t \t\t$connect->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n\n\t \t\t$sql = \"\n\t\t \t\tSELECT DISTINCT\n\t\t\t \t\tOAUser.OAUserSerNum,\n\t\t\t \t\tOAUser.Username,\n\t\t\t \t\tRole.RoleName,\n\t\t\t \t\tOAUser.Language\n\t\t \t\tFROM\n\t\t\t \t\tOAUser,\n\t\t\t \t\tOAUserRole,\n\t\t\t \t\tRole\n\t\t \t\tWHERE\n\t\t \t\t\tOAUser.OAUserSerNum \t= OAUserRole.OAUserSerNum\n\t\t \t\tAND OAUserRole.RoleSerNum\t= Role.RoleSerNum\n\t \t\t\"; \n\t \t\t$query = $connect->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));\n\t \t\t$query->execute();\n\n\t \t\twhile ($data = $query->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) {\n\n\t \t\t\t$serial \t= $data[0];\n\t \t\t\t$name \t= $data[1];\n\t \t\t\t$role \t\t= $data[2];\n\t \t\t\t$language \t= $data[3];\n\n\t \t\t\t$userArray = array(\n\t \t\t\t\t'serial' \t=> $serial,\n\t \t\t\t\t'username' => $name,\n\t \t\t\t\t'role'\t\t\t=> $role,\n\t \t\t\t\t'language' \t\t=> $language\n\t \t\t\t\t);\n\t \t\t\tarray_push($users, $userArray);\n\t \t\t}\n\t \t\treturn $users;\n\t \t} catch (PDOException $e) {\n\t \t\techo $e->getMessage();\n\t \t\treturn $users;\n\t \t}\n\t }", "title": "" }, { "docid": "27bac8752fc82c971741db7cb20ef9de", "score": "0.65230334", "text": "function getUsers(){\r\n require_once 'a2-helper.php';\r\n require_once 'configa2.inc.php';\r\n $conn = DatabaseHelper::createConnection(array(DBCONNSTRING,DBUSER, DBPASS));\r\n $users = new UserDB($conn);\r\n $userList = $users->getAllUsers();\r\n return $userList; \r\n }", "title": "" }, { "docid": "b24575c46e202666c5889cfae390722a", "score": "0.651205", "text": "public function getAllUsers() {\r\n \r\n return $this->createQueryBuilder('u')->getQuery()->getResult();\r\n \r\n \r\n }", "title": "" }, { "docid": "50989acb45341d1e1508a79a8a36c737", "score": "0.6509622", "text": "public function listarUsuarios(){\n $db =db::conectar();\n $listarUsuarios = [];\n //Define la consulta\n $sql = $db->query('SELECT u.*, t.nombreUsuario FROM usuario AS u INNER JOIN tipousuario AS t ON (u.tipoUsuario = t.idTipoUsuario)');\n //Ejecute la consulta\n $sql->execute();\n foreach($sql->fetchAll() as $usuario){\n $usu = new usuarioModelo();\n $usu->setIdUsuario($usuario['idUsuario']);\n $usu->setNombre($usuario['nombre']);\n $usu->setApellido($usuario['apellido']);\n $usu->setCedula($usuario['cedula']);\n $usu->setCelular($usuario['celular']);\n $usu->setCorreo($usuario['correo']);\n $usu->setDireccion($usuario['direccion']);\n $usu->setFechaNacimiento($usuario['fechaNacimiento']);\n $usu->setTipoUsuario($usuario['nombreUsuario']);\n $usu->setContrasena($usuario['contrasena']);\n $usu->setEstado($usuario['estado']);\n \n // echo $usuario['nombres'];\n $listarUsuarios[] = $usu; //Asignar a la lista el objeto.\n }\n db::cerrarConexion($db); //Llmar el método para cerrar la conexión.\n return $listarUsuarios; //Retornar el array con objetos.\n }", "title": "" }, { "docid": "bd216b6d58250d536117afb20f163759", "score": "0.64979374", "text": "function getUsers($dbc) {\n\n\t$stmt = $dbc->query('SELECT * FROM users');\n\n\t$rows = array();\n\twhile ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n\t\t$rows[] = $row;\n\t}\n\n\treturn $rows;\n}", "title": "" }, { "docid": "38b4ba2bd884e06125d3ec54584f37f8", "score": "0.6495239", "text": "public function getUsers(){\n $result = package::$pdb->prepare(\"\n SELECT `userID`\n FROM `lttx1_user_group_connections`\n WHERE `groupID` = ?\");\n $result->execute(array($this->ID));\n if($result->rowCount() < 1)\n return false;\n $return = array();\n foreach($result as $user){\n $return[] = new user($user[0]);\n }\n return $return;\n }", "title": "" }, { "docid": "b478b61a3fd3de4934abb3f01f3de109", "score": "0.6493658", "text": "public static function getAllUsers(){\n\n\t\t// on récupère l'instance PDO\n\t\t$db = SPDO::getInstance();\n\n\t\t//Connexion à la base de données\n\t\ttry {\n\n\t\t// preparation de la requete\n\t\t$q = $db->prepare(\n\t\t\t\t\t\t\t\t\t\t\t'SELECT *\n\t\t\t\t\t\t\t\t\t\t\tFROM utilisateurM\n\t\t\t\t\t\t\t\t\t\t\tORDER BY nom ASC'\n\t\t\t\t\t\t\t\t\t\t );\n\n\t\t// execution de la requete\n\n\t\t$q->execute();\n\n\t\t$result = array();\n\n\t\twhile ($_line = $q->fetch(PDO::FETCH_ASSOC)) {\n\n\t\t\t$o_utilisateurM = new UtilisateurM($_line);\n\n\t\t\tarray_push($result, $o_utilisateurM);\n\n\t\t}\n\n\t\treturn $result;\n\n\t\t} catch (PDOException $e) {\n\n\t\t\t\techo 'Error dans la classe ' . __CLASS__ . '::' . __FUNCTION__ . '::' . $e->getMessage(),'error';\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "d2140a31102124ed9872f4e8c9abbb5b", "score": "0.64923924", "text": "public static function listaUsuarios ($filtroNome,$filtroTipoUsuario,$filtroPerfil) {\r\n $conn = mysqli_connect('localhost', 'root', 'root', 'sistemadesubmissao');\r\n mysqli_set_charset($conn, \"utf8\");\r\n \r\n \r\n $result = mysqli_query($conn, \"SELECT u.uuid, u.name, u.permission, u.email, u.picture, u.cpf_suap FROM User u WHERE u.name LIKE '%\".$filtroNome.\"%' ORDER BY name\");\r\n $users = array();\r\n while ($consulta = mysqli_fetch_array($result)) {\r\n $user = new UsuarioPedrina();\r\n $user->setUuid($consulta['uuid']);\r\n $user->setName($consulta['name']);\r\n $user->setPermission($consulta['permission']);\r\n $user->setCpf($consulta['cpf_suap']);\r\n $user->setEmail($consulta['email']);\r\n $user->setPicture($consulta['picture']);\r\n \r\n if ($user->permission == \"ADMIN\") $user->setIdPerfil (1);\r\n else if ($user->permission == \"ATTENDEE\") $user->setIdPerfil (2);\r\n else $user->setIdPerfil (3);\r\n \r\n array_push($users, $user);\r\n }\r\n mysqli_close($conn);\r\n return $users;\r\n }", "title": "" }, { "docid": "49a716af2ddc97bfa281dcb255fb10f5", "score": "0.64854914", "text": "private function getUserList()\n {\n return $this->getModel()->getUserList();\n }", "title": "" }, { "docid": "d05afff6854a43ea10b1123850e7217b", "score": "0.6478855", "text": "public function userList()\n {\n return \\app\\models\\User::getUserList();\n }", "title": "" }, { "docid": "26eb651791f14d859f90b64dc362069a", "score": "0.6472635", "text": "private function cargarUsuarios()\n\t{\n\t\t$this->usuarios = array();\n\t\tif(!$this->EstaRegistrado)\n\t\t\tthrow new Exception('El grupo no está registrado');\n\t\t$conexionBd = new ConectorBaseDatos();\n\t\t\t$conexionBd->Sentencia = sprintf(\"SELECT Usuario FROM UsuarioGrupo WHERE Grupo = %s\",\n\t\t\t$conexionBd->Escapar($this->Id)\n\t\t);\n\t\t$idUsuarios = $conexionBd->EjecutarConsulta();\n\t\tif($idUsuarios != null && count($idUsuarios) >= 1)\n\t\t\tforeach($idUsuarios as $idUsuario)\n\t\t\t\t$this->usuarios[] = new UsuarioFacebook($idUsuario['Usuario']);\n\t\t$conexionBd->Desconectar();\n\t}", "title": "" }, { "docid": "afd75a0eb83545651a386d3042396090", "score": "0.64697456", "text": "public static function getAllUsers(){\n $sql_query = \"SELECT * FROM user\";\n $result_set = self::$db->query($sql_query);\n $users = array();\n if(mysqli_num_rows($result_set) > 0) {\n while($row = mysqli_fetch_array($result_set)) {\n $user = new User();\n $user->setUser($row['id'], $row['username'], $row['password'], $row['admin'], $row['email'], $row['address'], $row['lat'], $row['lng']);\n $users[] = $user;\n }\n }\n return $users;\n }", "title": "" }, { "docid": "4148a77329140bafdf876bc66d931aa0", "score": "0.64695424", "text": "public function GetAllUsers()\r\n {\r\n $connection = $this->GetConnection();\r\n if (!$connection){\r\n return false;\r\n }\r\n\r\n $sql = 'SELECT `id`, `login`, `role` FROM `users`';\r\n $res = $connection->query($sql);\r\n\r\n if (!empty($res) && $res != false){\r\n $users = [];\r\n while ($row = $res->fetch(PDO::FETCH_ASSOC)){\r\n $users[] = new User($row['id'], $row['login'], $row['role']);\r\n }\r\n return $users;\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "377f764b721b2b876395fa02f9ec8172", "score": "0.6467201", "text": "public function ShowUsers(){\n\n\n $query = \"SELECT `id`, `username`, `level`, `email` FROM users\";\n $result = $this->connect()->query($query);\n while($row = $result->fetch_assoc()){\n $array[] = $row;\n }\n return $array;\n }", "title": "" }, { "docid": "40678201d244d11cad73bb553c766b8d", "score": "0.64655113", "text": "public function getBD_usuarioss(){\n\t$sql=\"select * from usuarios\";\n\t$con=Conexion::conectar();\n\t$res=$con->query($sql);\n\t$cont=0;\n\t$vec=array();\n\twhile($linea=$res->fetch_assoc()){\n\t\t$vec[$cont]=$linea; //seria como $vec[]=$linea\n\t\t$cont++;\n\t}\n\tConexion::desconectar($con);\n\t$this->usuarioss=$vec;\n\treturn $this->usuarioss;\n}", "title": "" }, { "docid": "4b6628703c45211760501e3400ff533f", "score": "0.6453043", "text": "public function users() {\n $userTable = $this->modx->getTableName('disUser');\n $sql = \"SELECT count(*) as xpdo_count FROM {$userTable}\";\n $criteria = new xPDOCriteria($this->modx, $sql);\n $criteria->prepare();\n $criteria->stmt->execute();\n $out['users'] = $criteria->stmt->fetchColumn(0);\n return $out;\n }", "title": "" }, { "docid": "c00c5ec8086f8c532c92de7a600dc632", "score": "0.64488894", "text": "public function usuarios($id){\n $sql=\"SELECT u.id, u.id_oficina, o.oficina, u.username, u.nombre, u.last_login,u.mosca,u.cargo,u.email,u.logins, u.fecha_creacion,u.genero,n.nivel FROM users u\n INNER JOIN oficinas o ON u.id_oficina=o.id\n INNER JOIN niveles n ON u.nivel=n.id\n WHERE u.id <> '$id'\";\n return $this->_db->query(Database::SELECT, $sql, TRUE);\n }", "title": "" }, { "docid": "636b8578c82841da64f3c6e7a570f3ef", "score": "0.6443577", "text": "public function allUsers()\n {\n $query = 'SELECT * \n FROM \n users';\n\n\n $stmt = static::$dbh->query($query);\n\n $result = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\n return $result;\n }", "title": "" }, { "docid": "34e3346fd617cc8453d10ec9c0b8ec81", "score": "0.6442367", "text": "function find_all_users() {\n global $db;\n\n $sql = \"SELECT * FROM user \";\n $sql .= \"ORDER BY id ASC\";\n $result = mysqli_query($db, $sql);\n return $result;\n }", "title": "" }, { "docid": "49c40cd33bb871dfa0dcc3539f22de03", "score": "0.6440949", "text": "function getAllUsers()\n {\n $query = $this->db->get('sys_users');\n return $query->result();\n }", "title": "" }, { "docid": "c7829931cd886f7e90543f81cbb5d6a8", "score": "0.6440683", "text": "public function obtenerUsuarios() {\r\r\n $sql = \"SELECT * FROM USUARIO\";\r\r\n\t\t\tif(!$result = mysqli_query($this->con, $sql)) die();\r\r\n\t\t\t$usuarios = array();\r\r\n\t\t\twhile ($row = mysqli_fetch_array($result)) {\r\r\n\t\t\t\tif($row[4] != null) {\r\r\n $tarjetaDAO = new TarjetaDAO($this->con);\r\r\n $tarjeta = $tarjetaDAO->consultarTarjeta($row[4]);\r\r\n } else {\r\r\n $tarjeta = null;\r\r\n }\r\r\n\r\r\n $tipoUsuarioDAO = new TipoUsuarioDAO($this->con);\r\r\n $tipoUsuario = $tipoUsuarioDAO->consultarTipoUsuario($row[5]);\r\r\n\r\r\n $preguntaDAO = new PreguntaDAO($this->con);\r\r\n $pregunta = $preguntaDAO->consultarPregunta($row[6]);\r\r\n\r\r\n $cargoDAO = new CargoDAO($this->con);\r\r\n $cargo = $cargoDAO->consultarCargo($row[9]);\r\r\n\r\r\n $usuario[] = new Usuario($row[0], $row[1], $row[2], $row[3], $tarjeta, $tipoUsuario, $pregunta, $row[7], $row[8],\r\r\n $cargo, $row[10]);\r\r\n\t\t\t}\r\r\n\t\t\treturn $usuarios;\r\r\n }", "title": "" }, { "docid": "f6d71c8758038403bd4b9d9a269434f2", "score": "0.643189", "text": "public function getUsers(){ \n $data = array();\n $query = \"SELECT IdUser, UserName, UserPassword, Fk_idRoll \"\n . \"FROM User_System;\";\n $users = pg_query($query) or die('La consulta fallo: ' . pg_last_error());\n \n while ($line = pg_fetch_array($users, null, PGSQL_ASSOC)) {\n $data[] = $line;\n }\n \n return $data; \n }", "title": "" }, { "docid": "efccebae89851f753f0cd36a7fc710ce", "score": "0.64304405", "text": "public function getList()\n {\n return $this->dao->select('*')->from(TABLE_USER)->where('deleted')->eq(0)->orderBy('account')->fetchAll();\n }", "title": "" } ]
83f02c72add507d09c5c8564f6e3bceb
Close the current session and free resources.
[ { "docid": "423136ee9e15313c7f298ef59adfb53c", "score": "0.0", "text": "public function close ()\n\t{\n\t\tforeach ( $this->ch as $ch ) {\n\t\t\tcurl_multi_remove_handle($this->mh, $ch);\n\t\t}\n\t\tcurl_multi_close($this->mh);\n\t}", "title": "" } ]
[ { "docid": "f428cd7b22aafcfab1f729a2dd457d97", "score": "0.8418698", "text": "public function close(){\n\t\t$this->_session->destroy();\n\t}", "title": "" }, { "docid": "ee2ba425969ecdde9d630f8f01f7bcd0", "score": "0.8252848", "text": "public static function closeSession(){\n session_unset();\n session_destroy();\n \n }", "title": "" }, { "docid": "d61843ad5121bc36de981d235355cbbe", "score": "0.8231925", "text": "public static function close() {\n @session_write_close();\n }", "title": "" }, { "docid": "bd5263e71ce4e98c8d0b409f85b5c197", "score": "0.81542206", "text": "public static function close() {\n\n\t\tsession_write_close();\n\t}", "title": "" }, { "docid": "fc19015468aab04be3ae8f14794826fe", "score": "0.80738837", "text": "public static function close () {\n session_name(self :: SESSION_NAME);\n session_start();\n session_regenerate_id(true);\n setCookie(self :: SESSION_NAME, '/', time() - 3600);\n session_destroy();\n }", "title": "" }, { "docid": "9402653fce62ddb5fac101ab2ce2cccf", "score": "0.8067627", "text": "protected function CloseSession() {\n\n $this->GetDriver()->Close();\n }", "title": "" }, { "docid": "c566606c6b298857c91f6cadddbcf8a3", "score": "0.8042788", "text": "public function closeSession()\n {\n curl_close($this->session);\n $this->connected = false;\n }", "title": "" }, { "docid": "4afe80fb99240a594131ba3a12dd518c", "score": "0.78912044", "text": "function close_session() {\r\n\r\n\t\tsession_start();\r\n\t\tsession_unset();\r\n\t\tsession_destroy();\r\n\t}", "title": "" }, { "docid": "cf9a135afa94e728b8f28cdb62b7ec4f", "score": "0.7846429", "text": "public function close()\n {\n $this->logger->log('Pre-emptively closing the session');\n }", "title": "" }, { "docid": "2338f2cdc6d6c4a6405d6e9cd1cec862", "score": "0.78039545", "text": "public function __destruct() {\n\t\t$this->closeSession();\n\t}", "title": "" }, { "docid": "93d3625dd235daa0bea7af9d53f97aa4", "score": "0.7637602", "text": "function close(){\n if (session_id() != false) session_unset();\n\t}", "title": "" }, { "docid": "00e3396237d0391c62df53bd1176c3d9", "score": "0.7532669", "text": "function close_session()\n\t{\n\tdecho(\"Closing session ...<BR>\\n\");\n\tsession_unset();\n\tsession_destroy();\n\t}", "title": "" }, { "docid": "488181b3c75e9faa0921dd7807e99d17", "score": "0.75059325", "text": "public function __destruct()\n {\n if (version_compare(PHP_VERSION, '5.3.3', '<')) {\n session_write_close();\n }\n }", "title": "" }, { "docid": "a56a998add1b5b633c4126ba00734a87", "score": "0.7454841", "text": "public function __destruct()\n {\n session_write_close();\n }", "title": "" }, { "docid": "a56a998add1b5b633c4126ba00734a87", "score": "0.7454841", "text": "public function __destruct()\n {\n session_write_close();\n }", "title": "" }, { "docid": "a56a998add1b5b633c4126ba00734a87", "score": "0.7454841", "text": "public function __destruct()\n {\n session_write_close();\n }", "title": "" }, { "docid": "31e6d008b11de6b3b5c1bfd0c5a00c15", "score": "0.73272514", "text": "function close()\n\t{\n\t\t//close curl session and free up resources\n\t\tcurl_close($this->ch);\n\t}", "title": "" }, { "docid": "90f9e6d95b9cb8d8f5b769be5808b487", "score": "0.7304222", "text": "function session_close(){\n session_destroy();\n}", "title": "" }, { "docid": "a53bbc5c7673d41c2cbeac61f7f0eaa5", "score": "0.7274841", "text": "function end_session()\n\t{\n\t\tsession_destroy();\n\t\tsession_unset();\n\t}", "title": "" }, { "docid": "f9b1732d0440a0b2259e48d1e9821573", "score": "0.7263449", "text": "public function __destruct() {\n\t\tsession_write_close();\n\t}", "title": "" }, { "docid": "ccb5aa3bdb5d5501578fe35f620e06eb", "score": "0.7259816", "text": "public function __destruct()\n\t\t\t{\n\t\t\t\tsession_write_close();\n\t\t\t}", "title": "" }, { "docid": "27f4cd2975b828c7e403b3fde948fa51", "score": "0.71838695", "text": "final public function destroy()\n\t\t{\n\t\t\t$_SESSION = array();\n\t\t\tsession_destroy();\n\t\t}", "title": "" }, { "docid": "2c65bd3accafcaf2c44d6192b943fde4", "score": "0.7182332", "text": "public function end_session(){\r\n\t\tif( session_id() ) session_destroy();\r\n\t}", "title": "" }, { "docid": "47538fcb510b0d1fd09a7672a044ae76", "score": "0.7178692", "text": "public function sessionClose()\r\n\t{\r\n\t\treturn TRUE;\r\n\t}", "title": "" }, { "docid": "222723cb361d33c37a8c49493161b3a5", "score": "0.71553314", "text": "public function close() {\n\n if ($this->writeable()) {\n session_write_close();\n }\n $this->status = Session::NONE;\n return $this;\n\t}", "title": "" }, { "docid": "764c6e559777a7a69f858b430756480f", "score": "0.71469396", "text": "Function SessionClose()\n {\n global $CNK;\n static $_sSQL='';\n \n if ( $this->__sMethod == 'fs' )\n {\n $CNK->__oLs->RemoveFiles( \n $CNK->__oStd->RelativeToReal( $this->__sSessSt ).$this->__sSessId.'.sid' );\n }\n elseif ( $this->__sMethod == 'db' )\n {\n $_sSQL = \"\n DELETE FROM {$this->__sSessSt} \n WHERE session_id = '{$this->__sSessId}'\n \";\n $CNK->__oDb->ExecQuery( $_sSQL );\n }\n \n return true; \n }", "title": "" }, { "docid": "a956271ce2c0ae4858214997e25e06ec", "score": "0.71245235", "text": "static public function finalizeSession() {\r\n\t\tsession_destroy();\r\n\t}", "title": "" }, { "docid": "33c32973c69b3826fab5921672281ec1", "score": "0.7123993", "text": "public function sess_close()\r\n {\r\n return(true);\r\n }", "title": "" }, { "docid": "59a6a6b69c4e272a26ff03c97fe82268", "score": "0.71106637", "text": "function end_session() {\n if(isset($_SESSION)) {\n session_destroy();\n }\n }", "title": "" }, { "docid": "4869b9b3df93d52015f94be91079e938", "score": "0.709323", "text": "function sessionEnd() {\n session_unset();\n session_destroy();\n }", "title": "" }, { "docid": "bca406eccef87419f65ea86617ece049", "score": "0.7072089", "text": "public static function destroy(){\r\n\t\tunset($_SESSION);\r\n\t\tsession_destroy();\r\n\t}", "title": "" }, { "docid": "393d2f45bffb48ee5cc9668426d9dc13", "score": "0.70691466", "text": "public function terminateSession();", "title": "" }, { "docid": "29c5b5448982921d34028e4c3005826a", "score": "0.70575917", "text": "public function closeBrowser()\n {\n if ($this->session) {\n $this->session->close();\n }\n }", "title": "" }, { "docid": "40cf3fe888e4398be933599c2d760b03", "score": "0.70500344", "text": "public function close() {\n unset($_SESSION['file_manager_data']);\n session_destroy(); \n session_unset($_SESSION['session_id']);\n \n header(\"location:/\");\n \n }", "title": "" }, { "docid": "6cc786e312c7215538f51f63d60bddbd", "score": "0.70492804", "text": "public function destroy()\n\t{\n\t\tunset( $this->session );\n\t\t\n\t}", "title": "" }, { "docid": "4bddfe0e97a7bbda29187ce72a6eed2e", "score": "0.70441717", "text": "public function destroy()\n\t{\n\t\tunset($_SESSION[$this->sessionId]);\n\t\t$this->session = null;\n\t}", "title": "" }, { "docid": "e09c2484fa01c95d729e214d6ed7b618", "score": "0.702784", "text": "public function close() {\r\n $this->session->sess_destroy();\r\n redirect('home');\r\n }", "title": "" }, { "docid": "c52df71f50f659151912385589ff01df", "score": "0.7027593", "text": "public function end()\n {\n if (isset(self::$session)) {\n setcookie(session_name(), \"\", time() - 42000, \"/\");\n $_SESSION = array();\n session_destroy();\n self::$session = null;\n } else {\n throw new FrameworkException('Session is not started');\n }\n }", "title": "" }, { "docid": "36686f6a7c2eaeeebe734da8f56d3094", "score": "0.6998123", "text": "public function end_session() {\n\t\t\n\t\t$_SESSION[PFX_MLG . 'user'] \t= \"\";\n\t\t\n\t\t$_SESSION[PFX_SYS . 'name'] \t= \"\";\n\t\t$_SESSION[PFX_SYS . 'user'] \t= \"\";\n\t\t$_SESSION[PFX_SYS . 'id'] \t\t= \"\";\n\t\t$_SESSION[PFX_SYS . 'profile'] \t= 0; \n\t\t\n\t\tsetcookie(PFX_SYS . \"user\",\t\t'', time() - 3600 );\n\t\tsetcookie(PFX_SYS . \"token\",\t'', time() - 3600 );\n\t\t\n\t\tsession_destroy();\n\t\tsession_start();\n\t\t\n\t\t$this->user = \"\";\n\t\t$this->name = \"\";\n\t\t$this->profile = 0;\n\t\t$this->id = \"\";\n\t}", "title": "" }, { "docid": "381845a5ec524a863784326f957891c6", "score": "0.698314", "text": "private function closeCurrentSession(){\n if (isset($this->pstring2)) {\n if($this->pstring2 === 'logout'){\n if (isset($_SESSION['email_pr']) AND isset($_SESSION['keyuniqid_pr'])){\n $this->closeSession();\n session_unset();\n $_SESSION = array();\n session_destroy();\n session_start();\n $uriparams = array('level'=>'login');\n header('location: '. $this->seoURLProfil(frontend_model_template::current_Language(),$uriparams));\n }\n }\n }\n }", "title": "" }, { "docid": "af072f1781783457f71ae9b126ca19d9", "score": "0.6979809", "text": "public static function close()\r\n {\r\n \tif( self::$_open === TRUE){\r\n \t\ttry{\r\n \t\t\t$self = self::getInstance();\r\n \t\t\t\r\n \t\t\t// destruct support session of UserManager\r\n \t\t\tSessionManager::destroySession('user_session');\r\n \t\t\t\r\n \t\t\t// destroy managed object\r\n \t\t\tforeach( $self->managed as $k=>$o){\r\n \t\t\t\t$self->detach($k);\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\t// destroy instance\r\n \t\t\tself::$_instance = null;\r\n \t\t}\r\n \t\tcatch( UserManagerException $e){}\r\n \t}\r\n }", "title": "" }, { "docid": "2ca3f9b9a4229f2d3b6fd7b20f57d1cd", "score": "0.69723624", "text": "public function _close_session() {\n $_SESSION[\"statut_connection\"] = -1;\n $_SESSION[\"id_utilisateur\"] = -1;\n\t\t\t$_SESSION[\"id_etatnorma\"] = null;\n $_SESSION[\"login\"] = null;\n $_SESSION[\"mdp\"] = null;\n $_SESSION[\"type\"] = 0;\n }", "title": "" }, { "docid": "48d92c593c01951551b04e4b22dc9765", "score": "0.69699615", "text": "public static function destroy()\n {\n session_destroy();\n }", "title": "" }, { "docid": "8a877d2401fefb0afc6e4bfe148827fc", "score": "0.69689703", "text": "public function sessionClose() : object\n {\n $arguments = [\n 'arguments' => [],\n 'method' => 'session-close'\n ];\n return $this->request($arguments);\n }", "title": "" }, { "docid": "d06b7d407fca5b39823396633a40630a", "score": "0.695102", "text": "public function endLoginSession() {\n unset($_SESSION[self::$sessionName]); \n session_destroy(); \n }", "title": "" }, { "docid": "18b69bd0d1bc2d936a8596bab53f2516", "score": "0.6941699", "text": "function session_destroy()\n\t{\n\t\t$this->session->sess_destroy();\n\t}", "title": "" }, { "docid": "8adc0b854093b26790fcd2446f039450", "score": "0.69189", "text": "function end_session() {\r\n\t// and all versions of PHP.\r\n\tsession_unset();\r\n session_destroy();\r\n}", "title": "" }, { "docid": "108c858c4f10218e5482fec403d2a1f7", "score": "0.69178283", "text": "public static function destroy(): void\n {\n session_destroy();\n }", "title": "" }, { "docid": "770c8fece665beea709c502bc47fcaf8", "score": "0.6915299", "text": "function close() {\n\t\t$this->disconnect ();\n\t}", "title": "" }, { "docid": "8baec5814fff21002c610fd1aec27630", "score": "0.69136834", "text": "public static function destroy() {\n\t\tsession_destroy();\n\t}", "title": "" }, { "docid": "8e8186a752f2b8da801dd9dc94d467e0", "score": "0.6911049", "text": "public function close() {}", "title": "" }, { "docid": "8e8186a752f2b8da801dd9dc94d467e0", "score": "0.6911049", "text": "public function close() {}", "title": "" }, { "docid": "8e8186a752f2b8da801dd9dc94d467e0", "score": "0.6911049", "text": "public function close() {}", "title": "" }, { "docid": "8e8186a752f2b8da801dd9dc94d467e0", "score": "0.6911049", "text": "public function close() {}", "title": "" }, { "docid": "8e8186a752f2b8da801dd9dc94d467e0", "score": "0.6911049", "text": "public function close() {}", "title": "" }, { "docid": "8e8186a752f2b8da801dd9dc94d467e0", "score": "0.6911049", "text": "public function close() {}", "title": "" }, { "docid": "8e8186a752f2b8da801dd9dc94d467e0", "score": "0.6911049", "text": "public function close() {}", "title": "" }, { "docid": "a621571fd8b29916530ffb5e3c2d35c6", "score": "0.6904438", "text": "static function endSession() {\n foreach ($_SESSION as $key => $value) {\n unset($_SESSION[$key]);\n }\n foreach ($_COOKIE as $key => $value) {\n setcookie($key, \"\", (time() - 500000), \"/\", $_SERVER[\"HTTP_HOST\"]);\n }\n session_destroy();\n }", "title": "" }, { "docid": "ae04bed01ca16a1e83f5969983ced149", "score": "0.68977046", "text": "protected function _disconnect()\n {\n // Make sure the session gets closed\n $this->quit();\n parent::_disconnect();\n }", "title": "" }, { "docid": "f1e67a7867adfc368567b603a15dc6bd", "score": "0.6863996", "text": "public function close() {\n if( !$this->backend->is_connected() ) {\n return;\n }\n $this->backend->close();\n }", "title": "" }, { "docid": "21bea11ddfba041d3e03b06909ccefdf", "score": "0.6863919", "text": "function endSession()\n{\n session_unset();\n\n // destroy the session\n session_destroy();\n}", "title": "" }, { "docid": "d699a7ba22d91250d3c7bc33c1ef9537", "score": "0.6856759", "text": "public function __destroy() {\n session_destroy();\n }", "title": "" }, { "docid": "ce0b53869cd99c250f175ce76678eff0", "score": "0.6844952", "text": "function sess_close() {\n $this->storage->close();\n return true;\n }", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.68434215", "text": "public function close();", "title": "" }, { "docid": "8f4fb3bbc3e7741c5a253cc9a30e4596", "score": "0.6837324", "text": "public function endApplicationSession() {\n unset($_SESSION[self::$application]);\n session_destroy(); \n }", "title": "" }, { "docid": "8bb2459513bdd9510ffc74b84fb28bde", "score": "0.6816212", "text": "public function close() {\n $this->con->close();\n self::$instance = null;\n }", "title": "" }, { "docid": "5f6541dd77d1f4661c0672d02c4ebe5a", "score": "0.68153757", "text": "public function SessionLogout()\r\n\t{\r\n\t\t$this->DeleteSession();\r\n\t}", "title": "" }, { "docid": "315420713572b59f15bb8b2e8fa931dd", "score": "0.68151486", "text": "function destroy() {\n\t\tif ($this->started()) {\n\t\t\tsession_destroy();\n\t\t}\n\t\t$_SESSION = null;\n\t\t$this->__construct($this->path);\n\t\t$this->start();\n\t\t$this->renew();\n\t\t$this->_checkValid();\n\t}", "title": "" }, { "docid": "e059cd56db8442751e58e7c68f6f12e8", "score": "0.68123066", "text": "public function sessionDestroyAll()\n {\n session_destroy();\n }", "title": "" }, { "docid": "b851d3de7edfbd8f2f5cb435e6c1cbf5", "score": "0.6804357", "text": "public function destroy()\n {\n \n session_destroy();\n }", "title": "" }, { "docid": "4e8879166debca264cacb98320f704b6", "score": "0.67945135", "text": "public function destroy()\n\t\t\t{\n\t\t\t\tforeach ($_SESSION as $var => $val) {\n\t\t\t\t\t$_SESSION[$var] = null;\n\t\t\t\t}\n\n\t\t\t\tsession_destroy();\n\t\t\t}", "title": "" }, { "docid": "a56f3b22f382833c7fe4aa69e31c4fc7", "score": "0.6784779", "text": "public function destroySession()\n {\n }", "title": "" }, { "docid": "effee04c5c8cb2650edb90748d286640", "score": "0.67839223", "text": "public function __destruct(){\r\n\r\n if( !is_null($this->session) ){\r\n unset($this->session);\r\n }\r\n\r\n }", "title": "" }, { "docid": "2ac3900a756241389939dc7fc60e9b08", "score": "0.6783732", "text": "public static function destroy() {\n $_SESSION = [];\n if ( ini_get(\"session.use_cookies\") ) {\n $params = session_get_cookie_params();\n setcookie(session_name(), '', time() - 42000,\n $params[\"path\"], $params[\"domain\"],\n $params[\"secure\"], $params[\"httponly\"]\n );\n }\n session_destroy();\n }", "title": "" }, { "docid": "e9f83629e23eeca01ad05f602ff8ac49", "score": "0.67651284", "text": "public function close() {\n\t\t$this->connection = null;\n\t\t$this->isConnected = false;\n\t}", "title": "" }, { "docid": "6f3ff0e07b0c5bbdc7ea3afc3e03e946", "score": "0.6753668", "text": "public static function destroy()\n\t{\n\t\treturn session_destroy();\n\t}", "title": "" }, { "docid": "0e04c7b1e457d95fd4877efbc05ae69e", "score": "0.6751242", "text": "public static function destroy()\n {\n unset($_SESSION);\n\n if (ini_get(\"session.use_cookies\")) {\n $params = session_get_cookie_params();\n setcookie(session_name(), '', time() - 42000,\n $params[\"path\"], $params[\"domain\"],\n $params[\"secure\"], $params[\"httponly\"]\n );\n }\n session_destroy();\n }", "title": "" } ]
b0311c373ab81c7e5491f8a87c4d70cf
Check if row was deleted (not found in new rows).
[ { "docid": "7bb3641a8959ce4e4dee311fd14b4157", "score": "0.6976574", "text": "protected function isDeletedRow($row, $attribute)\n {\n $rowAttribute = $row;\n unset($rowAttribute[$this->relationalData[$attribute]['junctionColumn']]);\n\n foreach ($this->relationalData[$attribute]['newRows'] as $newRow) {\n $newRowAttributes = $newRow;\n unset($newRowAttributes[$this->relationalData[$attribute]['junctionColumn']]);\n if ($newRowAttributes == $rowAttribute) {\n return false;\n }\n }\n\n return true;\n }", "title": "" } ]
[ { "docid": "1b49c214da30907bc6beb91b64d0ef37", "score": "0.7252595", "text": "public function is_deleted()\n {\n return $this->{static::SOFT_DEL_COL_NAME} == ROW_STATUS_DELETED;\n }", "title": "" }, { "docid": "59ec1331c23da230ba395b1238fcbc5b", "score": "0.6891256", "text": "public function hasDelete(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "e9270617e6fd31ee9eb55c5566a25e38", "score": "0.67998725", "text": "function delete()\n\t{\n\t\t$this->db->delete(self::TABLE,$this->as_array(-1,true),__LINE__,__FILE__,'etemplate');\n\n\t\treturn $this->db->affected_rows();\n\t}", "title": "" }, { "docid": "cbfab29bfded677fc0129e2199fef757", "score": "0.66581756", "text": "public function delete() { \n global $database;\n $sql = \"DELETE FROM \" . static::$table_name;\n $sql .= \" WHERE id='\" . $database->escape_value($this->id);\n $sql .= \"' LIMIT 1\";\n $database->query($sql);\n \n return ($database->affected_rows() == 1) ? true : false; \n }", "title": "" }, { "docid": "b5747c65b2cc3b284f23c8d2ed14b3e5", "score": "0.66500527", "text": "public function isDeleted(): bool;", "title": "" }, { "docid": "b5747c65b2cc3b284f23c8d2ed14b3e5", "score": "0.66500527", "text": "public function isDeleted(): bool;", "title": "" }, { "docid": "048f03f717ce7fbd5f25eaf1cd177de4", "score": "0.66408736", "text": "public function delete(){\n\t\t\n\t $sql = \"DELETE FROM \".static::$table_name.\" \";\n\t $sql .= \"WHERE \".static::$id_field.\"=\". static::db()->escape_value($this->{static::$id_field});\n\t $sql .= \" AND ROWNUM=1\";\n \n\t static::db()->query($sql);\n static::db()->free_statement();\n\t return (static::db()->affected_rows() == 1) ? true : false;\n\t //after deletion from db object instance still exist and we can communicate\n //to user deletion event with additional info (properties of object which was deleted)\n \t\n }", "title": "" }, { "docid": "7c428353cccead3619da4e5d49efb8d6", "score": "0.66344684", "text": "public function delete() {\n\t\t\tglobal $database;\n\t\t\t\n\t\t\t$sql = \"DELETE FROM \" . self::$table . \" \";\n\t\t\t$sql .= \"WHERE id = \" . $database->escape_value($this->id) . \" \";\n\t\t\t$sql .= \"LIMIT 1\";\n\t\t\t\n\t\t\t$database->query($sql);\n\t\t\treturn ($database->affected_rows() == 1) ? true : false;\n\t\t}", "title": "" }, { "docid": "5a5ec51844281e826d0f761db6b25934", "score": "0.6619643", "text": "protected function isRecordDeleted() {\n if ( $this->record->isDeleted() ) {\n $this->redirect('journal/restore/' . $this->record->get('id'));\n }\n }", "title": "" }, { "docid": "78742d31c308008688c3a00ea4cc3f52", "score": "0.65749806", "text": "public function delete(){\n\n $this->con->delete(\n $this->tableName,\n $this->_where\n );\n\n return $this->con->rowCount();\n }", "title": "" }, { "docid": "6aa346ed7b8e76f0bbc9fcdf0642b6fb", "score": "0.653955", "text": "abstract protected function checkExistingRow(array $row);", "title": "" }, { "docid": "06d3fe86222d66c44c54e70b63f53d39", "score": "0.65277123", "text": "public function testDelete()\n {\n $table = $this->_getTableObject();\n $id = $table->insert(array('data' => 'testUpdate1'));\n $this->assertEquals(1, $this->_countTableRecords($this->_tableName));\n \n // without CR\n $table->delete('id = ' . $id);\n $this->assertEquals(0, $this->_countTableRecords($this->_tableName));\n \n // with CR\n $table->setContingency(true);\n $id = $table->insert(array('data' => 'testUpdate2'));\n $this->assertEquals(1, $this->_countTableRecords($this->_tableName));\n \n $table->delete('id = ' . $id);\n $this->assertEquals(2, $this->_countTableRecords($this->_tableName));\n \n $this->assertNull($table->find($id)->current());\n }", "title": "" }, { "docid": "082ec1dab6f7bd4a36afa0b4206b7104", "score": "0.64942086", "text": "public function delete()\r\n\t{\r\n\t\tglobal $database;\r\n\r\n\t\t$sql = \"DELETE FROM \" . static::$table_name . \"WHERE id=\";\r\n\t\t$sql .= $database.escape_value($this->id) . \" LIMIT 1\";\r\n\r\n\t\t$database->query($sql);\r\n\r\n\t\treturn ($database->affected_rows() == 1) ? true : false;\r\n\t}", "title": "" }, { "docid": "882bbd7eca5c8e9e321774d78d07b17d", "score": "0.6487316", "text": "public function delete(): int\n {\n $query = \"DELETE FROM {$this->table} \";\n $query .= $this->conditions ?? '';\n\n $this->mysqli->query($query);\n return $this->mysqli->affected_rows;\n }", "title": "" }, { "docid": "d4c9a2246f98baa88141ea6b851b6d6b", "score": "0.6477604", "text": "public function delete() {\n global $database;\n\n $sql = \"DELETE FROM \".static::$table_name.\" \";\n $sql .= \"WHERE `id`=\". $database->escape_value($this->id);\n $sql .= \" LIMIT 1\";\n\n $database->query($sql);\n return ($database->affected_rows() == 1) ? true : false;\n }", "title": "" }, { "docid": "4801dafc7412ec417c3ab10e248cad0c", "score": "0.6451355", "text": "final public function delete(){\n $id=empty($this->rs[static::$primary_key]) ? $this->id : $this->rs[static::$primary_key];\n if($this->Db->delete(static::$table_name,\"WHERE \".static::$primary_key.\" = $id\")){\n $this->clear();\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "8800c36870e4996ce9b0a32d2ae5a8b9", "score": "0.6448688", "text": "public function isDelete() {\n return ($this->getAction() == Wsu_Auditing_Helper_Data::ACTION_DELETE);\n }", "title": "" }, { "docid": "7f54d62bef392b06e1942ddc25cd01c5", "score": "0.644562", "text": "public function delete(){\n\t\t$this->resetError();\n\t\tif(!$this->beforeDelete()){\n\t\t\treturn false;\n\t\t}\n\t\t$query= \"DELETE FROM \". $this->table;\n\t\tif($this->isPkeySet()){\n\t\t\t$where= $this->getPkey();\n\t\t}else{\n\t\t\t$where= $this->getWhere();\n\t\t}\n\n\t\t$query.= $where->toString();\n\t\t$stm= $this->db->prepare($query);\n\t\t$success= db_run_query($stm, $where->getValues());\n\t\t$this->lastOperation= self::OP_DELETE;\n\t\tif(!$success){\n\t\t\t$this->lastError= $stm->errorInfo();\n\t\t\t$this->lastError['query']= $query;\n\t\t\t$this->lastError['params']= $where->getValues();\n\t\t}\n\t\t$this->afterDelete($success);\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "4540b8c5d31d1b9c72044156e54849ea", "score": "0.6436441", "text": "public function delete() {\n\t\t\tglobal $db;\n\t\t\t\n\t\t\t$db->where('id', $this->id);\n\t\t\t$db->delete(self::$table);\n\t\t\treturn ($db->affected_rows() == 1) ? true : false;\n\t\t}", "title": "" }, { "docid": "a5163eda837828fdba2ca78eae4f6bc3", "score": "0.64255786", "text": "protected function beforeDelete() {\n $retVal = true;\n return $retVal;\n }", "title": "" }, { "docid": "2158041d48f2dd7c93a58c868bd82079", "score": "0.6406355", "text": "public function rowsDelete($tablename, $where) {\n\n if ($this->db->delete($tablename, $where)) {\n\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "592c39380e7ae5a5c60c6c3c2c86379f", "score": "0.6345137", "text": "public function testDelete()\n {\n $this->testUpdate();\n $affected = self::$_test_instance->query(Database::DELETE, \"DELETE FROM somerows WHERE varcharfield = 'the answer for life, universe and everything'\");\n\n $this->assertEquals($affected, 1);\n }", "title": "" }, { "docid": "16a7c047a8c85a7f54701920eb76a627", "score": "0.6344265", "text": "public function isDeleted() {\n\t\t\n\t\t$latest = DataObject::get_by_id('Variation', $this->ID);\n\t\treturn (!$latest || !$latest->exists());\n\t}", "title": "" }, { "docid": "3b10eae8e66dac896a78bf3a5bd2ac85", "score": "0.63285863", "text": "public function canDelete();", "title": "" }, { "docid": "fc0468f6026854720110b8ea5f0df042", "score": "0.6321912", "text": "public function delete()\n {\n $sql = \"DELETE FROM $this->_tableName\n WHERE $this->_idField=$this->_id\n LIMIT 1;\";\n if ( !$this->_DbConnection->execute($sql) ) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "cccdd19514fcce445ce734b6ade17069", "score": "0.6316891", "text": "public function rowDelete(array $identifier):bool\n {\n $connection=$this->model->getConnectionName();\n $table=$this->model->getTable();\n $fields=$this->model->base_Field;\n\n if(count($identifier) < 2){\n //dd(reset($identifier));\n goto a;\n //$objFields=collect($fields)->where(array_key_first($identifier),reset($identifier) );\n }else{\n a:\n $objFields=collect($fields)->where('name',array_key_first($identifier))->count();\n if ($objFields > 0){\n \\DB::connection($connection)->table($table)->where(array_key_first($identifier),reset($identifier))->delete();\n return true;\n }\n\n }\n\n return false;\n\n }", "title": "" }, { "docid": "6bf5c79dbdb07776406a9bbac6df338d", "score": "0.6310933", "text": "function DeleteRows() {\n\t\tglobal $Language, $Security;\n\t\tif (!$Security->CanDelete()) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoDeletePermission\")); // No delete permission\n\t\t\treturn FALSE;\n\t\t}\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $this->SQL();\n\t\t$conn = &$this->Connection();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\n\t\t//} else {\n\t\t//\t$this->LoadRowValues($rs); // Load row values\n\n\t\t}\n\t\t$rows = ($rs) ? $rs->GetRows() : array();\n\t\t$conn->BeginTrans();\n\n\t\t// Clone old rows\n\t\t$rsold = $rows;\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['sn'];\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Set up error message\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t// Use the message, do nothing\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$this->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}", "title": "" }, { "docid": "e44ae64bc8ac80dc1e05a95822b9f4a4", "score": "0.6307148", "text": "function isDeleted()\n {\n return (!empty($this->deleted) && strtotime($this->deleted) <= time());\n }", "title": "" }, { "docid": "092a572b3dc62ee28a06fb5c565edc84", "score": "0.62996507", "text": "public static function deleteRow(dbRow &$row){\n\t\t$ret = false;\n\t\t$pkField = $row->getPrimaryKeyFieldName();\n\t\t$table = $row->getTableName();\n\t\tif(isset($row->$pkField)){\n\t\t\t$pkValue = $row->$pkField;\n\t\t\t$ret = dbHelper::deleteQry($table,array($pkField=>$pkValue));\n\t\t\tif($ret){\n\t\t\t\tdbData::emptyRow($table,$pkField,$pkValue);\n\t\t\t}\n\t\t\t$row = null;\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "6742872efb14fa2575e1f9aee79a1bfc", "score": "0.6292246", "text": "public function delete()\n\t{\n\t\t$sql = 'DELETE FROM ' . $this->tableName() . ' WHERE ' . $this->pkColumnName() . '=? LIMIT 1';\n\t\t$sth = $this->getDb()->prepare($sql);\n\t\t\n\t\tif ($sth->execute(array($this->{$this->pkColumnName()})) === true) {\n\t\t\tunset($this->{$this->pkColumnName()});\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "33c4966099ae81f748545f4dd412ae00", "score": "0.6292177", "text": "public function isDeleted()\n {\n return !file_exists($this->path);\n }", "title": "" }, { "docid": "9fdeb510d58326a767975f48f07a28a6", "score": "0.6284874", "text": "public function delete(): bool\n {\n if (!isset($this->id)) {\n return false;\n }\n\n $stmt = DB::instance()->prepare(\"DELETE FROM {$this->table} WHERE ID=? LIMIT 1\");\n $stmt->bind_param('s', $this->id);\n\n return (bool)$stmt->execute();\n }", "title": "" }, { "docid": "af3946c07d9bf27f771cfad3909e4160", "score": "0.6269066", "text": "public function isForceDeleting();", "title": "" }, { "docid": "ab513a83d4920716c2975d3684145c7e", "score": "0.6257021", "text": "function DeleteCheck($DelQuery)\n\t\t\t{\n\t\t\t$query = $this->SelectQuery($DelQuery, \"master\");\n\t\t\treturn mysql_affected_rows();\n\t\t\t}", "title": "" }, { "docid": "a9aa8fb3c941ef673352bb03d87fd4fb", "score": "0.62526464", "text": "function DeleteRows() {\n\t\tglobal $Language, $Security;\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $this->SQL();\n\t\t$conn = &$this->Connection();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\n\t\t//} else {\n\t\t//\t$this->LoadRowValues($rs); // Load row values\n\n\t\t}\n\t\t$rows = ($rs) ? $rs->GetRows() : array();\n\t\t$conn->BeginTrans();\n\n\t\t// Clone old rows\n\t\t$rsold = $rows;\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['SHEET'];\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['NOMOR'];\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Set up error message\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t// Use the message, do nothing\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$this->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}", "title": "" }, { "docid": "75bd14485676e97da88b763b381c2376", "score": "0.6248095", "text": "public function isDeleted()\n\t{\n\t\treturn ($this->get('state') == self::STATE_DELETED);\n\t}", "title": "" }, { "docid": "031cbcb2e41348d14e5d6da005ace1f0", "score": "0.6226004", "text": "function delete( $sql ) {\n\t\t$this->test_connection();\n\t\tmysql_query( $sql, $this->dblink )\n\t\t\tor die( \"Query problem:\\n\" . $sql . \"\\n\\n\" . $this->error() );\n\t\t\n\t\treturn $this->affected_rows();\n\t}", "title": "" }, { "docid": "713189d9956dac8b3be68303ed3e93a8", "score": "0.6221113", "text": "function delete() {\n $cids = JRequest::getVar('cid', array(0), 'post', 'array');\n\n $row = & $this->getTable();\n\n if (count($cids)) {\n foreach ($cids as $cid) {\n if (!$row->delete($cid)) {\n $this->setError($row->getErrorMsg());\n return false;\n }\n }\n }\n return true;\n }", "title": "" }, { "docid": "713189d9956dac8b3be68303ed3e93a8", "score": "0.6221113", "text": "function delete() {\n $cids = JRequest::getVar('cid', array(0), 'post', 'array');\n\n $row = & $this->getTable();\n\n if (count($cids)) {\n foreach ($cids as $cid) {\n if (!$row->delete($cid)) {\n $this->setError($row->getErrorMsg());\n return false;\n }\n }\n }\n return true;\n }", "title": "" }, { "docid": "877f95ecda3be52e54ae2844367712da", "score": "0.6217869", "text": "private function checkDeleted()\n {\n $result = false;\n if (!empty(Yii::$app->request->post('delete')[$this->attribute]) && !$this->owner->isAttributeRequired($this->attribute)) {\n if ($this->isAttributeChanged()) {\n $this->deleteFile($this->getOldAttribute());\n } else {\n $this->deleteFile($this->getAttribute());\n }\n $this->owner->setAttribute($this->attribute, null);\n $result = true;\n }\n return $result;\n }", "title": "" }, { "docid": "eb4fe4bff120f028244de652f8fba1a3", "score": "0.62119496", "text": "public function isDeleted(): bool\n {\n return self::STATE_DELETED === $this->state;\n }", "title": "" }, { "docid": "0c534e6580730bf6c70c0e84056ea9a8", "score": "0.61917657", "text": "public function customDelete(array $where): bool\n {\n \t// var_dump($where);\n\t\t\t// echo $this->getThisTable();\n $this->db->delete($this->getThisTable(), $where);\n // echo $this->db->last_query;\n\t\t\t// die();\n return $this->db->affected_rows() ? true : false;\n }", "title": "" }, { "docid": "414402a4e1b868fa6805f754983db465", "score": "0.61909974", "text": "public function depleteRows() /*: void*/;", "title": "" }, { "docid": "b9746e2fc0825a578c8dd42c4c6260bc", "score": "0.61842906", "text": "public function isDelete()\n {\n return in_array($this->getAction(), $this->actions['delete']);\n }", "title": "" }, { "docid": "18c285824dbb55d1599ab8d762366baa", "score": "0.6181803", "text": "public function delete(): bool\n {\n return parent::delete()\n and Db::getInstance()->delete(Location::$definition['table'], \"id_slider = $this->id\")\n and Db::getInstance()->delete(self::$definition['table'].'_item', \"id_slider = $this->id\");\n }", "title": "" }, { "docid": "ea510a40df7bf071f8396a175acb5551", "score": "0.61733264", "text": "public function isDelete() {\n return $this->_method == 'DELETE';\n }", "title": "" }, { "docid": "2925e5d09294e7fe5b867e260f16b88d", "score": "0.6169714", "text": "function affected_rows()\n {\n return false;\n }", "title": "" }, { "docid": "3033f07615eaa08e79b4b6c99bd57114", "score": "0.61693126", "text": "function DeleteRows() {\n\t\tglobal $Language, $Security;\n\t\tif (!$Security->CanDelete()) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoDeletePermission\")); // No delete permission\n\t\t\treturn FALSE;\n\t\t}\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $this->SQL();\n\t\t$conn = &$this->Connection();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\n\t\t//} else {\n\t\t//\t$this->LoadRowValues($rs); // Load row values\n\n\t\t}\n\t\t$rows = ($rs) ? $rs->GetRows() : array();\n\t\t$conn->BeginTrans();\n\t\tif ($this->AuditTrailOnDelete) $this->WriteAuditTrailDummy($Language->Phrase(\"BatchDeleteBegin\")); // Batch delete begin\n\n\t\t// Clone old rows\n\t\t$rsold = $rows;\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['jdwkrjpeg_id'];\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Set up error message\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t// Use the message, do nothing\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t\tif ($this->AuditTrailOnDelete) $this->WriteAuditTrailDummy($Language->Phrase(\"BatchDeleteSuccess\")); // Batch delete success\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t\tif ($this->AuditTrailOnDelete) $this->WriteAuditTrailDummy($Language->Phrase(\"BatchDeleteRollback\")); // Batch delete rollback\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$this->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}", "title": "" }, { "docid": "4ec2bc48e6a8c7196dd5d0c199e88dbf", "score": "0.61684954", "text": "public function delete()\n\t{\n\t\t$result = false;\n\t\tif ($this->exists())\n\t\t{\n\t\t\t// delete self\n\t\t\t$this->where($this->primary_key, $this->stored[$this->primary_key]);\n\t\t\t$result = $this->db->delete($this->table);\n\t\t}\n\t\t$this->reset();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "705b193d6b3df98d5cc3d86ad38e6549", "score": "0.61638975", "text": "public function isDeleted($id) { /* {{{ */\n\t\treturn false;\n\t}", "title": "" }, { "docid": "40fd59d5b1d27a172c8abf518443de16", "score": "0.61614925", "text": "public function getIsDeletedRecord()\n {\n return $this->_deleted;\n }", "title": "" }, { "docid": "87d7f5f126b0cfb89074655060e62e52", "score": "0.6157625", "text": "function DeleteRows() {\n\t\tglobal $conn, $Language, $Security;\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $this->SQL();\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\n\t\t//} else {\n\t\t//\t$this->LoadRowValues($rs); // Load row values\n\n\t\t}\n\t\t$conn->BeginTrans();\n\n\t\t// Clone old rows\n\t\t$rsold = ($rs) ? $rs->GetRows() : array();\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['socio_nro'];\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Set up error message\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t// Use the message, do nothing\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$this->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}", "title": "" }, { "docid": "10e87ae1e0387e79e915e86e48364664", "score": "0.6157575", "text": "function DeleteRows() {\n\t\tglobal $conn, $Language, $Security;\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $this->SQL();\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\n\t\t//} else {\n\t\t//\t$this->LoadRowValues($rs); // Load row values\n\n\t\t}\n\t\t$conn->BeginTrans();\n\n\t\t// Clone old rows\n\t\t$rsold = ($rs) ? $rs->GetRows() : array();\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['id'];\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Set up error message\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t// Use the message, do nothing\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$this->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}", "title": "" }, { "docid": "b1f61db2d9b5ff9623cc8a679da78744", "score": "0.6138617", "text": "public function delete(): bool\r\n {\r\n try {\r\n $this->pdo->query(\"DELETE FROM {$this->getTableName()} WHERE {$this->getPrimaryKeyColumn()} = {$this->getModelId()}\");\r\n } catch (\\PDOException $a) {\r\n return false;\r\n } finally {\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "c98617ef78512c485937e8230a1572ce", "score": "0.61364126", "text": "public function isDelete(): bool {\n return $this->getMethod() === 'DELETE';\n }", "title": "" }, { "docid": "90dfab59c0155aa9c0d6822c9e54aefb", "score": "0.61341506", "text": "public function getIsDeletedRecord()\n\t{\n\t\treturn $this->_deleted;\n\t}", "title": "" }, { "docid": "94599ccc69dd25b7417cc24196e0e34b", "score": "0.6132137", "text": "function delete()\r\n\t{\r\n\t\t// $this->idOrder : order id to delete\r\n\t\t// Return true if deleting is ok, false if not\r\n\t}", "title": "" }, { "docid": "ef30d2e48b5dbd3c968e5f887f7860d6", "score": "0.61096734", "text": "public function delete(): bool\r\n {\r\n // Se o id do registro a ser deletado for informado\r\n if (isset($this->content[$this->idField])) {\r\n // Criando uma declaração para apagar um registro\r\n $stmt = 'DELETE FROM '.DATABASE['name'].\".`{$this->table}` `{$this->table[3]}` WHERE\";\r\n $stmt .= \" `{$this->table[3]}`.`{$this->idField}` = {$this->content[$this->idField]};\";\r\n\r\n // Se for possível realizar a conexão com o banco de dados\r\n if ($connection = ClassDatabase::getInstance()) {\r\n // Retorna o resultado verdadeiro\r\n return $connection->exec($stmt);\r\n }\r\n\r\n // Se não for possível conectar-se ao banco de dados\r\n // Lançar exceção e interromper o script\r\n throw new RuntimeException('Não há conexão com Banco de dados!');\r\n }\r\n\r\n // Se o id do registro a ser removido não for informado\r\n return false;\r\n }", "title": "" }, { "docid": "90ee09c27acf5bc741d616d7c3fbab90", "score": "0.61019284", "text": "public function checkDeleted()\n\t{\n\t\t$q = $this->database->query('SELECT * FROM tweets_arc WHERE DATETIME(updated_on,\\'unixepoch\\') < :id AND obsolete = 0 AND deleted IS NULL',array(':id' => date('Y-m-d H:i:s',time()-180)));\n\t\tforeach($q as $t){\n\t\t\t$this->database->updateRows('tweets_arc', ['deleted'=>1,'deleted_at'=>time()], ['tweet_id=%s', intval($t['tweet_id'])]);\n\t\t\t$this->pb->allDevices()->pushNote(\"I've found a deleted tweet for \".$this->target.\"!\", \"Tweeted [\".date('Y-m-d H:i:s',$t['date']).\"]: \".$t['tweet_body']);\n\t\t}\n\t}", "title": "" }, { "docid": "26eeebae8f48341ca075ef291a52e7ec", "score": "0.6096878", "text": "function PersonalData_Deleted($row) {\n\n\t//echo \"PersonalData Deleted\";\n}", "title": "" }, { "docid": "d7ca7cc15f85408cda39e25af2b29001", "score": "0.60958904", "text": "function delete() {\n //TBD: do nothing\n return true;\n }", "title": "" }, { "docid": "d8fcb79623cb9d2fd60aa6d2ddbaa408", "score": "0.60949844", "text": "function remove() {\n\n if (($this->check(self::$tableName, \"WHERE Id = $this->Id\", 'EXIST'))\n && ($this->DatabaseDelete(self::$tableName, \"WHERE Id = $this->Id\"))) {\n return TRUE;\n \n } else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "70d1913c4b5b2a248db051364d23f40a", "score": "0.6094534", "text": "public function deleted()\n {\n return ($this->status == IMAGE_DELETED && $this->id > 0);\n }", "title": "" }, { "docid": "3cf186d74db9e61358fc7d8fae70d466", "score": "0.6091767", "text": "public function isDelete(): bool\n {\n return ('DELETE' == $this->getMethod());\n }", "title": "" }, { "docid": "6af37f00322e95a1dc41c9955c32c799", "score": "0.6079647", "text": "function DeleteRows() {\n\t\tglobal $conn, $Language, $Security, $t_lichcongtac;\n\t\t$DeleteRows = TRUE;\n\t\t$sWrkFilter = $t_lichcongtac->CurrentFilter;\n\n\t\t// Set up filter (SQL WHERE clause) and get return SQL\n\t\t// SQL constructor in t_lichcongtac class, t_lichcongtacinfo.php\n\n\t\t$t_lichcongtac->CurrentFilter = $sWrkFilter;\n\t\t$sSql = $t_lichcongtac->SQL();\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\t\t}\n\t\t$conn->BeginTrans();\n\n\t\t// Clone old rows\n\t\t$rsold = ($rs) ? $rs->GetRows() : array();\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $t_lichcongtac->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= EW_COMPOSITE_KEY_SEPARATOR;\n\t\t\t\t$sThisKey .= $row['C_CADENLAR_ID'];\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t\t\t$DeleteRows = $conn->Execute($t_lichcongtac->DeleteSQL($row)); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Set up error message\n\t\t\tif ($t_lichcongtac->CancelMessage <> \"\") {\n\t\t\t\t$this->setMessage($t_lichcongtac->CancelMessage);\n\t\t\t\t$t_lichcongtac->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$t_lichcongtac->Row_Deleted($row);\n\t\t\t}\t\n\t\t}\n\t\treturn $DeleteRows;\n\t}", "title": "" }, { "docid": "5e0e78d329e14fa4b6b04e765ada2b0e", "score": "0.6075412", "text": "public function isDelete(): bool\n {\n return $this->method() == 'DELETE' || $this->get('_method') == 'DELETE';\n }", "title": "" }, { "docid": "b7b46b829781f6565260b562c167911f", "score": "0.6071799", "text": "public function delete_row($id,$tablename){\r\n\t $this->db->where('id', $id);\t \r\n\t $this->db->delete($tablename);\r\n\t $result = $this->db->affected_rows();\r\n\t if ($result>0)\r\n\t\t $result=TRUE;\r\n\t else\r\n\t\t $result=FALSE;\r\n\t return $result;\r\n }", "title": "" }, { "docid": "9efe5e64c27703e20613ee43f80ca7f6", "score": "0.6068772", "text": "function delete()\r\n\t{\r\n\t\t$ids = $this->input->get('id', 0, 'ARRAY');\r\n\t\t$row = $this->getTable('entry', 'EasyFrontendSeoTable');\r\n\r\n\t\tforeach($ids as $id)\r\n\t\t{\r\n\t\t\tif(!$row->delete($id))\r\n\t\t\t{\r\n\t\t\t\t$this->error = 'database';\r\n\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "76737b42acda0d80c72d818dd8809bf1", "score": "0.60581505", "text": "public function isDeleted()\n {\n return (self::STATUS_DELETED === $this->status);\n }", "title": "" }, { "docid": "ca3e5f3621caddbb9dc420108e5b477b", "score": "0.60566914", "text": "function DeleteRows() {\n\t\tglobal $Language, $Security;\n\t\tif (!$Security->CanDelete()) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoDeletePermission\")); // No delete permission\n\t\t\treturn FALSE;\n\t\t}\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $this->SQL();\n\t\t$conn = &$this->Connection();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\t\t}\n\t\t$rows = ($rs) ? $rs->GetRows() : array();\n\t\t$conn->BeginTrans();\n\n\t\t// Clone old rows\n\t\t$rsold = $rows;\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['company_id'];\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['country_id'];\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['province_id'];\n\n\t\t\t\t// Delete old files\n\t\t\t\t$this->LoadDbValues($row);\n\t\t\t\t$this->com_logo->OldUploadPath = \"../uploads/company\";\n\t\t\t\t$OldFiles = ew_Empty($row['com_logo']) ? array() : array($row['com_logo']);\n\t\t\t\t$OldFileCount = count($OldFiles);\n\t\t\t\tfor ($i = 0; $i < $OldFileCount; $i++) {\n\t\t\t\t\tif (file_exists($this->com_logo->OldPhysicalUploadPath() . $OldFiles[$i]))\n\t\t\t\t\t\t@unlink($this->com_logo->OldPhysicalUploadPath() . $OldFiles[$i]);\n\t\t\t\t}\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t}\n\t\tif (!$DeleteRows) {\n\n\t\t\t// Set up error message\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t// Use the message, do nothing\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$this->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}", "title": "" }, { "docid": "17f93094da4304ee2772e6edd485de71", "score": "0.6053785", "text": "public function hardDelete()\n {\n return parent::delete() !== false;\n }", "title": "" }, { "docid": "da4723b96cdcf9103d01bf34494bf3f0", "score": "0.6052261", "text": "public function hasOnDelete()\n {\n return self::NONE !== $this->onDelete;\n }", "title": "" }, { "docid": "333fd28e4ee29797e9aca7521ba04d31", "score": "0.6050705", "text": "function delete(&$d) {\r\n\r\n\t\t$record_id = $d[\"order_id\"];\r\n\r\n\t\tif( is_array( $record_id)) {\r\n\t\t\tforeach( $record_id as $record) {\r\n\t\t\t\tif( !$this->delete_record( $record, $d ))\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn $this->delete_record( $record_id, $d );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e428a42e9667fad2de7992f55eaf79fc", "score": "0.6028757", "text": "public function test_delete()\n\t{\n\t\t$affected = $this->model->delete(1);\n\t\t$this->assertSame(1, $affected);\n\t}", "title": "" }, { "docid": "0a3cbca3ba1e20e733b3f4fddb2c5c68", "score": "0.6028025", "text": "public function testDelete( ) {\n\t\t$deletesql = \"DELETE FROM `member` WHERE id =1\";\n\t\t$this->assertSame(1,$this->db->delete($deletesql));\n\t\t\n\t\t$deletesql = \"DELETE FROM `member` WHERE id >0\";\n\t\t$this->assertGreaterThan(1,$this->db->delete($deletesql));\n\t\t\n\t\ttry {\n $deletesql = \"DELETE FROM `member` WHERE notacolumn =notanumber\";\n\t\t\t$this->db->update($deletesql);//This should fail\n }\n \n catch (Exception $expected) {\n return;\n }\n \n $this->fail('An expected exception has not been raised by the delete.');\n\t}", "title": "" }, { "docid": "a0818c44c4d20f66e7dc270722d43782", "score": "0.6024922", "text": "public function hasDeletions() {\n\t\treturn $this->_index->hasDeletions ();\n\t}", "title": "" }, { "docid": "619378ce6e9172971dcc4d68d8b27b28", "score": "0.6015829", "text": "public function isDELETE() {\n\t\treturn $this->method() == self::DELETE;\n\t}", "title": "" }, { "docid": "493975888eb044a3aa99eef80395f6c1", "score": "0.59979177", "text": "public function testDelete()\n {\n $this->_populateSpecialColsTable();\n $model = $this->_catalog->getModel('TestSolarSpecialCols');\n \n $id = 7;\n \n $record = $model->fetch($id);\n $this->assertEquals($record->id, $id);\n \n $model->delete(array('id = ?' => $id));\n \n // the record should not allow modification now\n try {\n $record->name = 'foo';\n $this->fail('should not have been able to modify deleted record');\n } catch (Solar_Exception $e) {\n // this is the expected case\n }\n \n // should not be able to retrieve the record\n $record = $model->fetch($id);\n $this->assertNull($record);\n }", "title": "" }, { "docid": "aab175f836ffec0371255136ff0dc2c4", "score": "0.59862816", "text": "public function delete()\r\n\t\t{\r\n $this->sql = 'DELETE FROM ' . $this->table . $this->where;\r\n $this->initialization();\r\n $res = $this->db->exec($this->sql);\r\n\r\n\r\n\t\t\treturn $res;\r\n\t\t}", "title": "" }, { "docid": "f941468cca233459f78fc0c188663efa", "score": "0.5958795", "text": "public function delete(): bool\n {\n if ($this->isSoftDeleteEnabled ?? false) {\n return $this->executeSoftDelete();\n }\n\n return $this->execute('delete');\n }", "title": "" }, { "docid": "ecf2ab97f57a41fb90301b8e5f3076b8", "score": "0.5952327", "text": "public function delete()\n {\n $result = false;\n if ($this->beforeDelete()) {\n if ($this->hasProperty('isDeleted', true, false)) {\n $this->isDeleted = self::DELETED;\n $result = $this->update();\n } else {\n $result = $this->deleteInternal();\n }\n\n $this->afterDelete();\n }\n\n return $result;\n }", "title": "" }, { "docid": "d725e63d0ed1c3bf6d1d125ca7b345cc", "score": "0.5948217", "text": "public function deleteRowById($id)\n {\n $sql = \"DELETE FROM `\" . $this->name . \"` WHERE `id` = ? ;\";\n\n if ($affected = $this->connection->update($sql, array($id))) {\n return $affected;\n } else {\n $this->error = $this->connection->error;\n return false;\n }\n }", "title": "" }, { "docid": "88d272da700ca63a5f1f9cc38fd33543", "score": "0.5938827", "text": "public function delete()\n {\n try {\n $query = $this->connection->prepare(\"DELETE FROM \".static::$table.\" WHERE id=:id LIMIT 1\");\n $query->bindParam(':id', $this->id);\n $query->execute();\n } catch (PDOException $e) {\n return false;\n }\n\n }", "title": "" }, { "docid": "cab66f399560f4c5b370345105ade825", "score": "0.5933382", "text": "function DeleteRows() {\r\n\t\tglobal $conn, $Language, $Security, $usuarios;\r\n\t\t$DeleteRows = TRUE;\r\n\t\t$sSql = $usuarios->SQL();\r\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\r\n\t\t$rs = $conn->Execute($sSql);\r\n\t\t$conn->raiseErrorFn = '';\r\n\t\tif ($rs === FALSE) {\r\n\t\t\treturn FALSE;\r\n\t\t} elseif ($rs->EOF) {\r\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\r\n\t\t\t$rs->Close();\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t$conn->BeginTrans();\r\n\r\n\t\t// Clone old rows\r\n\t\t$rsold = ($rs) ? $rs->GetRows() : array();\r\n\t\tif ($rs)\r\n\t\t\t$rs->Close();\r\n\r\n\t\t// Call row deleting event\r\n\t\tif ($DeleteRows) {\r\n\t\t\tforeach ($rsold as $row) {\r\n\t\t\t\t$DeleteRows = $usuarios->Row_Deleting($row);\r\n\t\t\t\tif (!$DeleteRows) break;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($DeleteRows) {\r\n\t\t\t$sKey = \"\";\r\n\t\t\tforeach ($rsold as $row) {\r\n\t\t\t\t$sThisKey = \"\";\r\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= EW_COMPOSITE_KEY_SEPARATOR;\r\n\t\t\t\t$sThisKey .= $row['idUsuario'];\r\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\r\n\t\t\t\t$DeleteRows = $conn->Execute($usuarios->DeleteSQL($row)); // Delete\r\n\t\t\t\t$conn->raiseErrorFn = '';\r\n\t\t\t\tif ($DeleteRows === FALSE)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\r\n\t\t\t\t$sKey .= $sThisKey;\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\t// Set up error message\r\n\t\t\tif ($usuarios->CancelMessage <> \"\") {\r\n\t\t\t\t$this->setFailureMessage($usuarios->CancelMessage);\r\n\t\t\t\t$usuarios->CancelMessage = \"\";\r\n\t\t\t} else {\r\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($DeleteRows) {\r\n\t\t\t$conn->CommitTrans(); // Commit the changes\r\n\t\t} else {\r\n\t\t\t$conn->RollbackTrans(); // Rollback changes\r\n\t\t}\r\n\r\n\t\t// Call Row Deleted event\r\n\t\tif ($DeleteRows) {\r\n\t\t\tforeach ($rsold as $row) {\r\n\t\t\t\t$usuarios->Row_Deleted($row);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $DeleteRows;\r\n\t}", "title": "" }, { "docid": "30cc1ec04a3787798b1a7acc2932497a", "score": "0.5925686", "text": "public function isDeleted($id) {\n\t\treturn $this->_index->isDeleted ( $id );\n\t}", "title": "" }, { "docid": "96b2bb6434336cfb493b8d1ad65cdd93", "score": "0.59226733", "text": "public function delete(){\r\n\t \t $sql = \"DELETE FROM empleados WHERE id={$this->getId()};\";\r\n\t\t $delete = $this->db->query($sql);\r\n\t\t //en la base de dato se crea la restriccion con ondelte cascada para que borre los registro de una tabla y otra\t\r\n\t\t $result = false;\r\n\t\t \t if($delete){\r\n\t\t\t $result = true;\t\t\t\t\r\n\t\t \t }\r\n //echo $sql;\t\t\t\r\n\t\t return $result;\t\t\t\r\n }", "title": "" }, { "docid": "9effcabcbd93da80bd4f8dacdc962fb8", "score": "0.59199506", "text": "public function delete()\n {\n if ( ! $this->beforeDelete()) return false;\n \n $sql = 'DELETE FROM '.self::tableNameFromClassName(get_class($this))\n . ' WHERE id='.self::$__CONN__->quote($this->id);\n\n // Run it !!...\n $return = self::$__CONN__->exec($sql) !== false;\n if ( ! $this->afterDelete())\n {\n $this->save();\n return false;\n }\n \n self::logQuery($sql);\n \n return $return;\n }", "title": "" }, { "docid": "a35ef0a83d8b4424aa690c77b0702f09", "score": "0.5916703", "text": "function DeleteRows() {\n\t\tglobal $conn, $Language, $Security, $ref_hda_inactivepursuitofhigherdegree;\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $ref_hda_inactivepursuitofhigherdegree->SQL();\n\t\t$conn->raiseErrorFn = 'up_ErrorFn';\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\t\t}\n\t\tif (!$Security->CanDelete()) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoDeletePermission\")); // No delete permission\n\t\t\treturn FALSE;\n\t\t}\n\t\t$conn->BeginTrans();\n\t\t$this->WriteAuditTrailDummy($Language->Phrase(\"BatchDeleteBegin\")); // Batch delete begin\n\n\t\t// Clone old rows\n\t\t$rsold = ($rs) ? $rs->GetRows() : array();\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $ref_hda_inactivepursuitofhigherdegree->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= UP_COMPOSITE_KEY_SEPARATOR;\n\t\t\t\t$sThisKey .= $row['hda_ID'];\n\t\t\t\t$conn->raiseErrorFn = 'up_ErrorFn';\n\t\t\t\t$DeleteRows = $conn->Execute($ref_hda_inactivepursuitofhigherdegree->DeleteSQL($row)); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Set up error message\n\t\t\tif ($ref_hda_inactivepursuitofhigherdegree->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($ref_hda_inactivepursuitofhigherdegree->CancelMessage);\n\t\t\t\t$ref_hda_inactivepursuitofhigherdegree->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t\tif ($DeleteRows) {\n\t\t\t\tforeach ($rsold as $row)\n\t\t\t\t\t$this->WriteAuditTrailOnDelete($row);\n\t\t\t}\n\t\t\t$this->WriteAuditTrailDummy($Language->Phrase(\"BatchDeleteSuccess\")); // Batch delete success\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t\t$this->WriteAuditTrailDummy($Language->Phrase(\"BatchDeleteRollback\")); // Batch delete rollback\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$ref_hda_inactivepursuitofhigherdegree->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}", "title": "" }, { "docid": "cae1221db506ae174627da7db836cd92", "score": "0.59165305", "text": "protected function beforeDelete() {\n $retVal = parent::beforeDelete();\n // Check relation\n if (!empty($this->rDetails)) {\n foreach ($this->rDetails as $detail) {\n $detail->delete();\n }\n }\n return $retVal;\n }", "title": "" }, { "docid": "ff23982c1020439f1c373fee7a42c859", "score": "0.59143156", "text": "function deleteTable() {\n $deleted = false;\n $table =& $this->getTable();\n if($table !== null) {\n $reviewerFactory =& $this->_getReviewerFactory($table, $this->item);\n $dao =& $this->_getDao();\n $deleted = $dao->deleteTable($table->getId());\n if($deleted) {\n $deleted = $reviewerFactory->deleteTable();\n $table = null;\n $this->table = null;\n }\n }\n return $deleted;\n }", "title": "" }, { "docid": "de98ab54dbe94455256e20a69df05846", "score": "0.59141135", "text": "protected function after_delete() {\n\t\t\n\t\treturn false;\n\t\t\n\t}", "title": "" }, { "docid": "4215b1557f3faa5ddb91835b47e03bbd", "score": "0.59123003", "text": "public function isDelete()\n {\n return $this->isMethod('DELETE');\n }", "title": "" }, { "docid": "c40554b8c239efa391652aa05d762955", "score": "0.5904138", "text": "public function isDeleted() {\n return $this->_isDeleted();\n }", "title": "" }, { "docid": "25e33a0699c00dfa9a3d52d44aebb413", "score": "0.589585", "text": "public function CanDelete()\n\t{\treturn $this->id && !$this->GetProducts();\n\t}", "title": "" }, { "docid": "9e379f0b63bec1bc527a49d29dbacfd1", "score": "0.5894964", "text": "function deleteEntry()\n {\n return true;\n }", "title": "" }, { "docid": "e4dd613d424d6c49ee6a9ddbcf814290", "score": "0.5891854", "text": "public function _affectedRows() {\r\n return pg_affected_rows();\r\n }", "title": "" }, { "docid": "d1b34d47e577e01e462156698e8cb110", "score": "0.5885587", "text": "function delete($where){\n if(!$where) return false;\n $this->db->where($where);\n return $this->db->delete($this->table);\n }", "title": "" }, { "docid": "1adda5093fb38a7d95d35d2f42855151", "score": "0.5879844", "text": "function delete() {\n $query = \"DELETE FROM \" . $this->table_name . \" WHERE id = ?\";\n\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n\n // bind parameter\n $stmt->bindParam(1, $this->id);\n\n // execute query\n if ($stmt->execute()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "a3272d40973414e1e5cc2a7707230280", "score": "0.58784", "text": "public function deleteRow($id) {\n\t\t$result = false;\n\t\t$this->conn->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\t\ttry {\n\t\t\t$sql = \"DELETE FROM \".$this->_name.\" WHERE id=:id\";\n\t\t\t$smtp = $this->conn->prepare($sql);\n\t\t\t$smtp->bindValue(':id', $id);\n\t\t\t$result = $smtp->execute();\n\t\t\t$smtp->closeCursor();\n\t\t}catch (\\PDOException $ex) {\n\t\t\terror_log($ex->getMessage());\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "6e9e116d5408692ed10f20f0eb35c613", "score": "0.5870024", "text": "protected function isExistingRow($row, $attribute)\n {\n $rowAttributes = $row;\n unset($rowAttributes[$this->relationalData[$attribute]['junctionColumn']]);\n\n foreach ($this->relationalData[$attribute]['oldRows'] as $oldRow) {\n $oldModelAttributes = $oldRow;\n unset($oldModelAttributes[$this->relationalData[$attribute]['junctionColumn']]);\n if ($oldModelAttributes == $rowAttributes) {\n return true;\n }\n }\n\n return false;\n }", "title": "" } ]
9ea8b92c96b5de7aa37c3b935f0f3473
getYouTubeRefreshToken Returns the data member $yt_refresh_token.
[ { "docid": "5ffbc9636cd62a3a193bfde0d414b98c", "score": "0.88571167", "text": "public function getYouTubeRefreshToken()\n {\n return $this->yt_refresh_token;\n }", "title": "" } ]
[ { "docid": "920751162d4020d82031c761b063889d", "score": "0.7897985", "text": "public function getRefreshToken()\n {\n return $this->refresh_token;\n }", "title": "" }, { "docid": "1134ed8cd0bef6db30ae889941905f5e", "score": "0.7784241", "text": "public function getRefreshToken()\n {\n return $this->_refreshToken;\n }", "title": "" }, { "docid": "7293567a65b05ac2106c652d7a90f4c0", "score": "0.7773626", "text": "public function getRefreshToken()\n {\n return $this->refreshToken;\n }", "title": "" }, { "docid": "7293567a65b05ac2106c652d7a90f4c0", "score": "0.7773626", "text": "public function getRefreshToken()\n {\n return $this->refreshToken;\n }", "title": "" }, { "docid": "7293567a65b05ac2106c652d7a90f4c0", "score": "0.7773626", "text": "public function getRefreshToken()\n {\n return $this->refreshToken;\n }", "title": "" }, { "docid": "7293567a65b05ac2106c652d7a90f4c0", "score": "0.7773626", "text": "public function getRefreshToken()\n {\n return $this->refreshToken;\n }", "title": "" }, { "docid": "19c6be69a1ab3bcf3a9e764446d2033b", "score": "0.7632384", "text": "public function getRefreshToken()\n {\n return $this->get('RefreshToken');\n }", "title": "" }, { "docid": "19c6be69a1ab3bcf3a9e764446d2033b", "score": "0.7632384", "text": "public function getRefreshToken()\n {\n return $this->get('RefreshToken');\n }", "title": "" }, { "docid": "b5ced797e89a1560e20b54452de84369", "score": "0.7299094", "text": "public function getRefreshToken()\n {\n // TODO: Implement getRefreshToken() method.\n }", "title": "" }, { "docid": "aa0127625935874e01cb4b9207b37659", "score": "0.7271236", "text": "public function getRefreshToken() : ?auth\\Token\n {\n return $this->refreshToken;\n }", "title": "" }, { "docid": "5ab06c91c0559aca2f84c2a76e438332", "score": "0.7149275", "text": "public function get_refresh_token() {\n\t\treturn get_option( 'fitbit_refresh_token', '' );\n\t}", "title": "" }, { "docid": "a82af7d1ff5f7f772214c7d4c4443dd6", "score": "0.71362436", "text": "public function getNewRefreshToken()\n {\n return $this->get('NewRefreshToken');\n }", "title": "" }, { "docid": "a82af7d1ff5f7f772214c7d4c4443dd6", "score": "0.71362436", "text": "public function getNewRefreshToken()\n {\n return $this->get('NewRefreshToken');\n }", "title": "" }, { "docid": "c04391e3496dc06ffe63dced62a23c5b", "score": "0.71064204", "text": "public function getRefreshToken(): string|null\n {\n return $this->refreshToken;\n }", "title": "" }, { "docid": "7a7d662e05c55ecc2a1ce8f9cb9d8d40", "score": "0.6986009", "text": "protected function getRefreshToken($refresh_token) {\n return NULL;\n }", "title": "" }, { "docid": "00f96685b26014c9029ec744d104f986", "score": "0.69276553", "text": "public static function getClientRefreshToken()\n {\n return static::$clientRefreshToken;\n }", "title": "" }, { "docid": "9c21b42164c64b14dd0f1af621ef39de", "score": "0.69058627", "text": "public function refresh_token() {\n\t\tif (!isset($this->auth_details['refresh_token']))\n\t\t\ttrigger_error('Error refreshing token. There is no refresh token set on this object.', E_USER_ERROR);\n\t\t$params = array(\n\t\t\t'grant_type' => 'refresh_token',\n\t\t\t'refresh_token' => $this->auth_details['refresh_token']\n\t\t);\n\t\treturn $this->_request('oauth', $params, self::OAUTH_TOKEN_URL);\n\t}", "title": "" }, { "docid": "294c356e3160b6be5e9c52ade90bd7c3", "score": "0.68366784", "text": "public function getRefreshToken($refresh_token)\n {\n $results = $this->getEventManager()->trigger(\n __FUNCTION__,\n $this,\n [\n 'refresh_token' => $refresh_token,\n ]\n );\n if ($results->stopped()) {\n return $results->last();\n }\n\n $doctrineRefreshTokenField =\n $this->getConfig()->mapping->RefreshToken->mapping->refresh_token->name;\n $doctrineExpiresField =\n $this->getConfig()->mapping->RefreshToken->mapping->expires->name;\n\n $queryBuilder = $this->getObjectManager()->createQueryBuilder();\n $queryBuilder->select('refreshToken')\n ->from($this->getConfig()->mapping->RefreshToken->entity, 'refreshToken')\n ->andwhere(\"refreshToken.$doctrineRefreshTokenField = :token\")\n ->andwhere(\"refreshToken.$doctrineExpiresField > :now\")\n ->setParameter('token', $refresh_token)\n ->setParameter('now', new DateTime());\n\n try {\n $refreshToken = $queryBuilder->getQuery()->getSingleResult();\n\n $mapper = $this->getMapperManager()->get('RefreshToken');\n $mapper->exchangeDoctrineArray($refreshToken->getArrayCopy());\n\n return $mapper->getOAuth2ArrayCopy();\n } catch (Exception $e) {\n // no result ok\n }\n\n return false;\n }", "title": "" }, { "docid": "f9f639c4dd3189fc8e549f9abbad1a69", "score": "0.6764442", "text": "public function setYouTubeRefreshToken($yt_refresh_token)\n {\n # Check if the passed value is empty.\n if (!empty($yt_refresh_token)) {\n # Clean it up.\n $yt_refresh_token = trim($yt_refresh_token);\n\n # Set the data member.\n $this->yt_refresh_token = $yt_refresh_token;\n } else {\n # Explicitly set the data member to NULL.\n $this->yt_refresh_token = null;\n }\n }", "title": "" }, { "docid": "5be94e11f4334464835af3b00f78d674", "score": "0.6635133", "text": "public function getSpotifyRefreshToken($id)\r\n {\r\n $statement = self::prepare(\"SELECT spotify_refresh_token FROM users WHERE id = :id\");\r\n $statement->bindValue(\":id\", $id);\r\n $statement->execute();\r\n return $statement->fetch();\r\n }", "title": "" }, { "docid": "a7a3d23af2b1657ccd86ee2fd7e4854d", "score": "0.6608688", "text": "public function getRefreshToken($refreshToken)\n\t{\n\t\treturn RefreshToken::where('token', $refreshToken)->first();\n\t}", "title": "" }, { "docid": "f6b623ce194a1e1ca640953fb6fd0db3", "score": "0.658834", "text": "private function getTokenRefresh() {\n if (!array_key_exists('refresh_token',$this->token)\n || empty($this->token['refresh_token']))\n {\n throw new Exception(__METHOD__.\": access refresh token was not specified\");\n }\n\n // Get HTTP request parameters for fetching access token.\n $data = array(\n 'refresh_token' => $this->token['refresh_token'],\n );\n $httpParams = $this->prepareTokenRequest(\n 'refresh_token',\n isset($this->token['scope']) ? $this->token['scope'] : null,\n $data);\n\n // Make the http request.\n try {\n $request = new HTTPRequest($this->params['token_endpoint'],$httpParams);\n $response = $request->makeRequest();\n } catch (Exception $e) {\n throw new OAuth2Exception(\n $e->getMessage(),\n OAuth2Exception::OAUTH_EXCEPTION_BAD_REQUEST);\n }\n\n // Throw exception if response was not 200.\n if ($response->statusCode != 200) {\n $message = __METHOD__ . ': remote server did not refresh access token: '\n . \"got $response->statusCode\";\n $ex = new OAuth2Exception($message,OAuth2Exception::OAUTH_EXCEPTION_FAILED_REQUEST);\n $ex->errorData = json_decode($response->data);\n throw $ex;\n }\n\n // Decode the response payload as a PHP array.\n $tok = json_decode($response->data,true);\n\n // Calculate the token's expiration time.\n $tok['expiration_time'] = $_SERVER['REQUEST_TIME'] + $tok['expires_in'];\n\n return $tok;\n }", "title": "" }, { "docid": "ace19d916b9e92594324cbf0ae179a62", "score": "0.65675414", "text": "public function getRefreshToken($refresh_token)\n {\n\n try {\n $token = $this->db->get($this->config['refresh_token_prefix'] . $refresh_token);\n return json_decode($token, true);\n } catch (\\Exception $e) {\n $this->logException('warning', $e);\n return false;\n }\n }", "title": "" }, { "docid": "4f02848ecdf80bb6dd193c2e49ff77b1", "score": "0.6383052", "text": "public function generateRefreshToken(): string;", "title": "" }, { "docid": "25ff8e9a426d2ba6fbdd6b9ee5192e5d", "score": "0.62346154", "text": "public function refreshToken();", "title": "" }, { "docid": "ba094f252d8dcafad098c260ef87d6d3", "score": "0.62257713", "text": "public function getNewRefreshToken(){\n return new RefreshTokenEntity();\n }", "title": "" }, { "docid": "700f7660f9cd503a5f719c3aa195f67f", "score": "0.62008274", "text": "public function refreshToken(){\n $creds = $this->getAuth()->getCredentials();\n if (isset($creds['client_id']) &&\n isset($creds['client_secret'])){\n return $this->getAuth()->refresh();\n }\n return FALSE;\n }", "title": "" }, { "docid": "7fa5208237a8cdcfcee2148aefe82ec9", "score": "0.61613756", "text": "public function refresh_token() {\n\t\t$args = [\n\t\t\t'body' => [\n\t\t\t\t'grant_type' => 'refresh_token',\n\t\t\t\t'refresh_token' => $this->refresh_token,\n\t\t\t\t'client_id' => $this->client_id,\n\t\t\t\t'client_secret' => $this->client_secret,\n\t\t\t]\n\t\t];\n\t\t$result = wp_remote_post( self::TOKEN_URI, $args );\n\t\tif ( is_wp_error( $result ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$response = json_decode( wp_remote_retrieve_body( $result ) );\n\t\tif ( 200 === wp_remote_retrieve_response_code( $result ) ) {\n\t\t\t$this->set_access_token( $response );\n\t\t\t$this->set_refresh_token( $response );\n\t\t}\n\t}", "title": "" }, { "docid": "f783846f7ee788144f3f1e4001cff4ae", "score": "0.61561984", "text": "public function refreshAccessToken($refresh_token = '')\n {\n $refresh_token = empty($refresh_token) ? $this->refresh_token : $refresh_token;\n\n $params = array();\n $params['client_id'] = $this->client_id;\n $params['client_secret'] = $this->client_secret;\n $params['grant_type'] = 'refresh_token';\n $params['refresh_token'] = $refresh_token;\n\n $response = $this->sendRequest($this->getTokenEndpoint(), $params, 'POST');\n $this->afterGetAccessToken($response);\n\n return $this->access_token;\n }", "title": "" }, { "docid": "a9ad66428461b2fb6125fc24f6bc5408", "score": "0.6138544", "text": "public function getRefreshTokenExpiration()\n\t{\n\t\treturn $this->accessTokenExpiration;\n\t}", "title": "" }, { "docid": "2e333910cca87127c0925ab82b5c8644", "score": "0.6082544", "text": "public function getNewRefreshToken()\n {\n $refreshToken = new RefreshTokenEntity;\n $refreshToken->setRevoked(false);\n\n return $refreshToken;\n }", "title": "" }, { "docid": "071de186964edd01aab312c7bd592d44", "score": "0.60796565", "text": "private function ga_auth_refresh_access_token( $refresh_token ) {\r\n\t\t$request = array(\r\n\t\t\t'refresh_token' => $refresh_token,\r\n\t\t\t'grant_type' => 'refresh_token',\r\n\t\t\t'client_id' => $this->config['client_id'],\r\n\t\t\t'client_secret' => $this->config['client_secret']\r\n\t\t);\r\n\r\n\t\ttry {\r\n\t\t$response = Ga_Lib_Api_Request::get_instance()->make_request( self::OAUTH2_TOKEN_ENDPOINT,\r\n\t\t\t$request, false, true );\r\n\t\t} catch (Ga_Lib_Api_Request_Exception $e) {\r\n\t\t\tthrow new Ga_Lib_Google_Api_Client_RefreshToken_Exception( $e->getMessage() );\r\n\t\t}\r\n\r\n\t\treturn new Ga_Lib_Api_Response( $response );\r\n\t}", "title": "" }, { "docid": "98a49ccec523899f09a94052e65393f8", "score": "0.6062197", "text": "public function getDefaultRefreshToken();", "title": "" }, { "docid": "35e4c6da1c24acb2056829ef38b5af5d", "score": "0.6048151", "text": "public function generateAccessTokenFromRefreshToken()\n {\n\n $parameter_array = array(\n 'grant_type' => 'refresh_token',\n 'client_id' => $this->credentials[ NF_ZohoCRM()->constants->client_id ],\n 'client_secret' => $this->credentials[ NF_ZohoCRM()->constants->client_secret ],\n 'refresh_token' => $this->credentials[ NF_ZohoCRM()->constants->refresh_token ]\n );\n\n $post_args = $this->returnDefaultPostArgs();\n\n $query_string = http_build_query($parameter_array);\n\n $response = wp_remote_post($this->token_url . '?' . $query_string, $post_args);\n\n self::handleTokenResponse($response);\n }", "title": "" }, { "docid": "406e230506be97983473d81e142a0076", "score": "0.60256743", "text": "public function refresh()\n {\n $token = null;\n $res = $this->api->accessToken()->create([\n 'grant_type' => 'client_credentials',\n 'client_id' => RetsRabbit::$plugin->getSettings()->clientId,\n 'client_secret' => RetsRabbit::$plugin->getSettings()->clientSecret\n ]);\n\n if ($res->wasSuccessful()) {\n $token = $res->token();\n RetsRabbit::$plugin->getCache()->set('access_token', $token->access_token, $token->expires_in);\n } else {\n Craft::warning('Could not fetch the access token.', __METHOD__);\n }\n\n return $token;\n }", "title": "" }, { "docid": "9feddf1664ed086d5704640a2d719e7c", "score": "0.59946454", "text": "private static function get_cached_refresh_token(): ?string {\n\t\tif ( ! \\file_exists( self::CACHED_TOKENS_FILE_PATH ) ) {\n\t\t\tif ( \\defined( 'PRESSABLE_API_REFRESH_TOKEN' ) ) {\n\t\t\t\tconsole_writeln( 'Using PRESSABLE_API_REFRESH_TOKEN from config.json file.', OutputInterface::VERBOSITY_DEBUG );\n\t\t\t\treturn PRESSABLE_API_REFRESH_TOKEN;\n\t\t\t}\n\n\t\t\tconsole_writeln( '❌ No PRESSABLE_API_REFRESH_TOKEN found. Please check your config.json file.' );\n\t\t\treturn null;\n\t\t}\n\n\t\t$data = decode_json_content( \\file_get_contents( self::CACHED_TOKENS_FILE_PATH ) );\n\t\tif ( \\is_null( $data ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $data->refresh_token;\n\t}", "title": "" }, { "docid": "dd64dcb68c5fe39e800a472b195124dd", "score": "0.59887576", "text": "private function refreshTokenIfNeeded()\n {\n if ($this->isAccessTokenExpired()) {\n $this->fetchAccessTokenWithRefreshToken($this->getRefreshToken());\n $token = $this->getAccessToken();\n $this->setBothAccessToken($token);\n\n return $token;\n }\n\n return $this->token;\n }", "title": "" }, { "docid": "8bd83085af356fcbe79c01d28093bbc2", "score": "0.5974516", "text": "public function setRefreshToken($token);", "title": "" }, { "docid": "78e41a8629d75caab917364e9463b667", "score": "0.5968319", "text": "protected function refreshTokenIfPossible()\n {\n // Check if the oauth token is valid\n if ($this->isTokenValid()) {\n return $this->accessToken;\n }\n\n // Check if a refresh token is defined\n if ($this->hasFreshToken()) {\n // Use refresh token to retrieve new oauth token\n\n // Dispatch event to listeners\n $this->dispatchEvent(static::EVENT_ACCESS_TOKEN, $this->accessToken);\n\n return $this->accessToken;\n }\n\n return null;\n }", "title": "" }, { "docid": "817d0396d07ff15f737f01cd1a6a792a", "score": "0.59610015", "text": "function refreshToken()\n {\n if (empty($this->refreshToken)) {\n throw new OAuth2InvalidRefreshTokenException();\n }\n\n $grant = new RefreshTokenGrant();\n $token = $this->provider->getAccessToken($grant, ['refresh_token' => $this->refreshToken]);\n\n $this->accessToken = $token->getToken();\n $this->refreshToken = $token->getRefreshToken();\n $this->expires = $token->getExpires();\n }", "title": "" }, { "docid": "bd807ad31774995265cf21b53c8917d9", "score": "0.5871036", "text": "public function getToken(): string\n {\n if ($this->access_token == '') {\n $this->refreshToken();\n }\n return $this->access_token;\n }", "title": "" }, { "docid": "ba42555a90bd52c5ba2d4e6ecd7fab6f", "score": "0.58470225", "text": "function refresh($token) {\r\n\t $header = ['Content-Type: application/x-www-form-urlencoded'];\r\n\t $data = [\r\n\t \"grant_type\" => \"refresh_token\",\r\n\t \"refresh_token\" => $token,\r\n\t \"$clientId\" => self::$clientId,\r\n\t \"$clientSecret\" => self::$clientSecret\r\n\t ];\r\n\t $response = $this->sendCURL(self::TOKEN_URL, $header, 'POST', $data);\r\n\t return $response;\r\n\t }", "title": "" }, { "docid": "59eb0d563c3de4c1a52a90cb266152a0", "score": "0.58247095", "text": "protected function refreshToken() {\n\t\t$now = round(microtime(true) * 1000);\n\t\t$notExpired = $this->tokenKeyExpires != null && $this->tokenKeyExpires > $now;\n\t\t$canRefresh = $this->tokenKeyNextRefresh != null &&\n\t\t\t\t($this->tokenKeyNextRefresh < $now || $this->tokenKeyNextRefresh > $this->tokenKeyExpires);\n\t\t// token present and NOT expired\n\t\tif ($this->tokenKey != null && $notExpired && $canRefresh) {\n\t\t\t$result = $this->getEntity($this->invokeGet(self::JWT_PATH));\n\t\t\tif ($result != null && array_key_exists(\"user\", $result) && array_key_exists(\"jwt\", $result)) {\n\t\t\t\t$jwtData = $result[\"jwt\"];\n\t\t\t\t$this->tokenKey = $jwtData[\"access_token\"];\n\t\t\t\t$this->tokenKeyExpires = $jwtData[\"expires\"];\n\t\t\t\t$this->tokenKeyNextRefresh = $jwtData[\"refresh\"];\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t$this->clearAccessToken();\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "128a52a78c421223f96000ca434b0778", "score": "0.58223325", "text": "public function getToken($forceRefresh = false)\n {\n $cacheKey = $this->getCacheKey();\n $cached = $this->getCache()->fetch($cacheKey);\n\n if ($forceRefresh || empty($cached)) {\n $token = $this->getTokenFromServer();\n\n // XXX: T_T... 7200 - 1500\n $this->getCache()->save($cacheKey, $token['authorizer_access_token'], $token['expires_in'] - 1500);\n Log::debug('Get token:', $token);\n return $token['authorizer_access_token'];\n }\n Log::debug('Get token from cache:', [$cached]);\n return $cached;\n }", "title": "" }, { "docid": "aee832553792c2ff4f8f89b45e37025f", "score": "0.5821967", "text": "protected function _od_refreshToken()\n {\n if (!property_exists($this->token, 'expires') || $this->token->expires < time()) {\n if (!$this->options['client_id']) {\n $this->options['client_id'] = ELFINDER_ONEDRIVE_CLIENTID;\n }\n\n if (!$this->options['client_secret']) {\n $this->options['client_secret'] = ELFINDER_ONEDRIVE_CLIENTSECRET;\n }\n\n if (empty($this->token->data->refresh_token)) {\n throw new \\Exception(elFinder::ERROR_REAUTH_REQUIRE);\n } else {\n $refresh_token = $this->token->data->refresh_token;\n $initialToken = $this->_od_getInitialToken();\n }\n\n $url = self::TOKEN_URL;\n\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n // General options.\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POST => true, // i am sending post data\n CURLOPT_POSTFIELDS => 'client_id=' . urlencode($this->options['client_id'])\n . '&client_secret=' . urlencode($this->options['client_secret'])\n . '&grant_type=refresh_token'\n . '&refresh_token=' . urlencode($this->token->data->refresh_token),\n\n CURLOPT_URL => $url,\n ));\n\n $result = elFinder::curlExec($curl);\n\n $decoded = json_decode($result);\n\n if (!$decoded) {\n throw new \\Exception('json_decode() failed');\n }\n\n if (empty($decoded->access_token)) {\n if ($this->aTokenFile) {\n if (is_file($this->aTokenFile)) {\n unlink($this->aTokenFile);\n }\n }\n $err = property_exists($decoded, 'error')? ' ' . $decoded->error : '';\n $err .= property_exists($decoded, 'error_description')? ' ' . $decoded->error_description : '';\n throw new \\Exception($err? $err : elFinder::ERROR_REAUTH_REQUIRE);\n }\n\n $token = (object)array(\n 'expires' => time() + $decoded->expires_in - 30,\n 'initialToken' => $initialToken,\n 'data' => $decoded,\n );\n\n $this->token = $token;\n $json = json_encode($token);\n\n if (!empty($decoded->refresh_token)) {\n if (empty($this->options['netkey']) && $this->aTokenFile) {\n file_put_contents($this->aTokenFile, json_encode($token));\n $this->options['accessToken'] = $json;\n } else if (!empty($this->options['netkey'])) {\n // OAuth2 refresh token can be used only once,\n // so update it if it is the same as the token file\n $aTokenFile = $this->_od_getATokenFile();\n if ($aTokenFile && is_file($aTokenFile)) {\n if ($_token = json_decode(file_get_contents($aTokenFile))) {\n if ($_token->data->refresh_token === $refresh_token) {\n file_put_contents($aTokenFile, $json);\n }\n }\n }\n $this->options['accessToken'] = $json;\n // update session value\n elFinder::$instance->updateNetVolumeOption($this->options['netkey'], 'accessToken', $this->options['accessToken']);\n $this->session->set('OneDriveTokens', $token);\n } else {\n throw new \\Exception(elFinder::ERROR_CREATING_TEMP_DIR);\n }\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "f094345b75871f2180fe211fbdd4d5db", "score": "0.5819857", "text": "private function getAccessToken(bool $refresh = false): string\n {\n if ($refresh) {\n $this->cache->delete(self::CACHE_ACCESS_TOKEN_KEY);\n }\n\n return $this->cache->get(self::CACHE_ACCESS_TOKEN_KEY, function (ItemInterface $item) {\n $response = $this->client->post(\n 'oauth/token',\n [\n 'form_params' => [\n 'client_id' => $this->clientId,\n 'client_secret' => $this->clientSecret,\n 'grant_type' => 'refresh_token',\n 'refresh_token' => $this->refreshToken,\n ],\n ]\n );\n\n $response = Utils::jsonDecode((string) $response->getBody(), true);\n\n $item->expiresAfter($response['expires_in']);\n\n return $response['access_token'];\n });\n }", "title": "" }, { "docid": "7a20e167bbd417304668623919fc02de", "score": "0.5809073", "text": "function refreshToken($refresh = null) {\n\tif ($refresh === null) {\n\t\t$refresh = \"7fa5f6fe89566b79304969a469a4df05e530975fd3bc63cfe29fd72c198eb68e\";\n\t} else {\n\t\t$refresh = get_option('dsb_refresh_token');\n\t}\n\t$ch = curl_init();\n\t$data = array\n\t(\n\t \"client_id\" => \"e248015a15608834c3a39c5eac6c6ba4db86334d1b38a85583f46980859949ee\",\n\t \"client_secret\" => \"b7d449295120bb212bbbc262b763f04ef44aa7a95187593ef031a919071d329e\",\n\t \"refresh_token\" => $refresh,\n\t \"grant_type\" => \"refresh_token\",\n\t \"redirect_uri\" => \"urn:ietf:wg:oauth:2.0:oob\"\n\t);\n\t$data_string = json_encode($data);\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Authorization: Bearer cOkustgdj7MmKEQBAjBUK0no9EOs\", \"Content-Type: application/json\", \"Accept: application/json\"));\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);\n\tcurl_setopt($ch, CURLOPT_URL, \"https://www.bookingsync.com/oauth/token\");\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n\t$response = curl_exec($ch);\n\tcurl_close($ch);\n\t$response_arr = json_decode($response);\n\tupdate_option('dsb_access_token', $response_arr['access_token']);\n\tupdate_option('dsb_refresh_token', $response_arr['refresh_token']);\n\treturn $response_arr['access_token'];\n}", "title": "" }, { "docid": "c7abe64b951a43a78374d32713e3c5e0", "score": "0.5804391", "text": "public function refresh_access_token($refresh_token, $user_id) {\n global $wpdb;\n $token = $this->create_access_token($user_id);\n if ($wpdb->query($wpdb->prepare(\"UPDATE \" . $wpdb->base_prefix . \"user_tokens\n SET access_token = %s,\n access_token_valid = %s\", $token['token'], $token['expires_datetime'])))\n {\n return [\n 'access_token' => $token['token'],\n 'expires_in' => $token['expires_in']\n ];\n }\n return false;\n }", "title": "" }, { "docid": "e378d4081e1255cbbc9b488b9a50c612", "score": "0.57999796", "text": "public function refreshAccessToken(Token $token){\n\t\treturn $token;\n\t}", "title": "" }, { "docid": "599b8c22d7bc521db8615326c2db1703", "score": "0.5781488", "text": "public function refreshToken($refreshToken)\n {\n $provider = $this->getProvider();\n $grant = new \\League\\OAuth2\\Client\\Grant\\RefreshToken;\n $token = $provider->getAccessToken($grant, ['refresh_token' => $refreshToken]);\n\n $this->client->setToken((string) $token);\n\n return $token;\n }", "title": "" }, { "docid": "487ff7d9fcdd880e969346a10d5c026a", "score": "0.57693684", "text": "protected function refreshToken()\n {\n $payload = [\n ['name' => 'client_id', 'contents' => $this->client_id],\n ['name' => 'client_secret', 'contents' => $this->client_secret],\n ['name' => 'refresh_token', 'contents' => $this->refresh_token],\n ['name' => 'grant_type', 'contents' => 'refresh_token'],\n ];\n $response = $this->post('https://cloud.merchantos.com/oauth/access_token.php', [\n 'multipart' => $payload\n ]);\n $token = json_decode($response->getBody(), true)['access_token'];\n if ($token) {\n $this->access_token = $token;\n error_log('New Access Token: '. substr($token, 0, 8) . '************', 0);\n }\n }", "title": "" }, { "docid": "aa013d9f3ffd9fe10e240b9483c7ab5c", "score": "0.57604694", "text": "public static function retrieve(bool $refresh = false): string\n\t{\n\t\t$config = config('Reddit');\n\t\t$curl = (new RedditRequest($config))\n\t\t\t->setHeader('Expect', '')\n\t\t\t->setAuth($config->clientId, $config->clientSecret);\n\n\t\t// Execute the cURL request\n\t\ttry\n\t\t{\n\t\t\t/** @var RedditResponse $response */\n\t\t\t$response = $curl->post($config->tokenURL, [\n\t\t\t\t'form_params' => [\n\t\t\t\t\t'grant_type' => 'password',\n\t\t\t\t\t'username' => $config->username,\n\t\t\t\t\t'password' => $config->password,\n\t\t\t\t]\n\t\t\t]);\n\t\t}\n\t\tcatch (HTTPException $e)\n\t\t{\n\t\t\tthrow new TokensException($e->getMessage(), $e->getCode(), $e);\n\t\t}\n\n\t\t// Decode the response\n\t\ttry\n\t\t{\n\t\t\t$result = $response->getResult();\n\t\t}\n\t\tcatch (\\Throwable $e)\n\t\t{\n\t\t\tthrow new TokensException($e->getMessage(), $e->getCode(), $e);\n\t\t}\n\n\t\tif (empty($result->access_token))\n\t\t{\n\t\t\tthrow new TokensException('Indecipherable response: ' . $response->getBody());\n\t\t}\n\n\t\treturn $result->access_token;\n\t}", "title": "" }, { "docid": "e3ca2b91ec955a8a2fb468defe668d4a", "score": "0.5758594", "text": "public function getRefreshToken($target);", "title": "" }, { "docid": "92cbe8c7ba4686458bde3cc5fcc4c836", "score": "0.5743347", "text": "private function refreshToken(){\n global $refreshToken;\n \n $api_key = 'AIzaSyDO-JXjcrO9x5sSX30mLQdSpu3_r7yI9gY';\n $url = 'https://securetoken.googleapis.com/v1/token?key='.$api_key.'';\n $dataPayload = [\n 'grant_type'=> \"refresh_token\",\n 'refresh_token' => $refreshToken,\n 'returnSecureToken' => true\n ];\n\n try{\n $curl = curl_init($url);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($dataPayload));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n } catch( Exception $e){\n return($e->getMessage());\n }\n\n\n if(http_response_code() == 200){\n $obj = json_decode($response, true); //convert json to array\n if (isset ($obj['id_token'])){ \n global $idToken, $refreshToken, $expiryTime;\n $idToken = $obj['id_token'];\n $refreshToken = $obj['refresh_token'];\n $expiryTime = time() + intval($obj['expires_in']);\n return 200; //query has been submited successfully\n }\n else if (isset($obj[\"error\"][\"message\"])) { //Checks in order to detect an unsuccessful submit request\n global $errorMessage;\n $errorMessage = $obj[\"error\"][\"message\"];\n return $errorMessage;\n }\n } else {\n return(http_response_code());\n }\n\n }", "title": "" }, { "docid": "ecbafcaeecd0e23f1701ad2e417daae6", "score": "0.5714987", "text": "public function getUserUsingRefreshToken($refreshToken) {\n global $base_url;\n\n $auth0Api = new Authentication($this->getAuthDomain(), $this->clientId, $this->clientSecret);\n\n try {\n $tokens = $auth0Api->oauth_token([\n 'grant_type' => 'refresh_token',\n 'client_id' => $this->clientId,\n 'client_secret' => $this->clientSecret,\n 'refresh_token' => $refreshToken,\n ]);\n\n return $this->validateIdToken($tokens->idToken);\n }\n catch (\\Exception $e) {\n throw new RefreshTokenFailedException($e);\n }\n }", "title": "" }, { "docid": "644f2f17f8fce8a145cd6545c7795272", "score": "0.5707956", "text": "public function getToken($videoManagerId = null)\n {\n $logger = $this->getLogger();\n $this->logTokenData();\n\n // Access token has expired, but expiration token has not expired.\n // Issue ourselves a new access token for the same video manager.\n if (!is_null($this->accessToken)\n && $this->accessToken->expired()\n && !$this->refreshToken->expired()) {\n $logger->info('Access token has expired - getting new one for same video manager with refresh token');\n $tokenData = $this->createAccessTokenFromRefreshToken(\n $this->refreshToken,\n $this->accessToken->getVideoManagerId()\n );\n\n $this->accessToken = $tokenData['accessToken'];\n } elseif (is_null($this->accessToken)\n || (!is_null($this->refreshToken) && $this->refreshToken->expired())) {\n // Either we have no token, or the refresh token has expired\n // so we will need to generate completely new tokens\n $logger->info('No access token, or refresh token has expired - generate completely new ones');\n $tokenData = $this->createNewTokens();\n\n $this->accessToken = $tokenData['accessToken'];\n $this->refreshToken = $tokenData['refreshToken'];\n }\n\n // Video manager is not matching with the one that our token\n // was generated with - issue ourselves a token for the video manager\n // we need.\n if (!is_null($videoManagerId)\n && isset($this->accessToken)\n && $this->accessToken->getVideoManagerId() != $videoManagerId) {\n $logger->info('Attempting to use token for different video manager - generate valid access token');\n $this->accessToken = $this->createAccessTokenFromRefreshToken($this->refreshToken, $videoManagerId);\n }\n\n return $this->accessToken->getTokenString();\n }", "title": "" }, { "docid": "6846f7cbc4d832acbc975654a20e2f50", "score": "0.56953573", "text": "public function get_token() {\n\t\treturn $this->access_token;\n\t}", "title": "" }, { "docid": "f4a0e30392a9ceeab824cb4e037f5e13", "score": "0.5685926", "text": "public function updateSpotifyRefreshToken($id, $r_token)\r\n {\r\n $statement = self::prepare(\"UPDATE users SET spotify_refresh_token = :r_token WHERE id = :id\");\r\n $statement->bindValue(\":r_token\", $r_token);\r\n $statement->bindValue(\":id\", $id);\r\n $statement->execute();\r\n return $statement->fetch();\r\n }", "title": "" }, { "docid": "fd95e852e0746df6ad8fa8d88f88b54a", "score": "0.5673446", "text": "public function refresh()\n {\n $this->parseToken();\n\n return JWTAuth::refresh();\n }", "title": "" }, { "docid": "c6d2f0d65b663b37f8be8fc1bc34f087", "score": "0.5663818", "text": "public function refreshToken()\n {\n $settings = InstagramBasicDisplay::$plugin->getSettings();\n\n $client = new Client([\n 'base_uri' => $settings['api'],\n ]);\n try {\n $response = $client->request('GET', $settings['refresh_endpoint'], [\n 'query' => [\n 'grant_type' => 'ig_refresh_token',\n 'access_token' => $this->_getAccessToken()\n ]\n ]);\n\n $token = json_decode($response->getBody(), true)['access_token'];\n $expires_in = json_decode($response->getBody(), true)['expires_in'];\n $exp_time = (new Datetime())->add(DateTimeHelper::secondsToInterval($expires_in))->format('Y-m-d H:i:s');\n\n // $exp_time = (new Datetime())->add(new DateInterval(\"PT{$expires_in}S\"))->format('Y-m-d H:i:s');\n\n try {\n $exists = (new Query())\n ->select(['access_token'])\n ->from('instagram_access_token')\n ->limit(1)\n ->all();\n\n if ($exists) {\n (new Query())\n ->createCommand()\n ->update('instagram_access_token', [\n 'access_token' => serialize($token),\n 'token_expiration_time' => $exp_time\n ])->execute();\n }\n } catch (Exception $e) {\n Craft::error($e->getMessage(), __METHOD__);\n echo $e->getMessage();\n die();\n }\n echo \"\\n\" . $response->getBody() . \"\\n\" . \"\\n\";\n return true;\n } catch (GuzzleException $e) {\n return $e->getMessage();\n }\n }", "title": "" }, { "docid": "8c65391b7c6bcddf517609546ce46eb9", "score": "0.56550944", "text": "public function getYouTubeClientSecret()\n {\n return $this->yt_client_secret;\n }", "title": "" }, { "docid": "1abe302ad4ea64243a8f701e208b2ed7", "score": "0.5654755", "text": "public function refresh_token($refresh_token)\r\n {\r\n $this->client->refreshToken($refresh_token);\r\n }", "title": "" }, { "docid": "19d88c38572bed206957b356eb3520bf", "score": "0.5654375", "text": "public function setRefreshToken($value)\n {\n return $this->set('RefreshToken', $value);\n }", "title": "" }, { "docid": "19d88c38572bed206957b356eb3520bf", "score": "0.5654375", "text": "public function setRefreshToken($value)\n {\n return $this->set('RefreshToken', $value);\n }", "title": "" }, { "docid": "5784250027b17652ccefcc6ff79c7c31", "score": "0.565362", "text": "private function refreshToken() {\n\n $body = array(\"refresh\" => $this->authtokens[\"refresh\"]); \n $ch = curl_init($this->endpoints[\"refresh\"]);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Otherwise reponse=1\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 7); //Timeout after 7 seconds\n curl_setopt($ch, CURLINFO_HEADER_OUT, false);\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body));\n curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);\n\n $result = curl_exec($ch);\n $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n if ($statusCode != 200) {\n $this->logError(sprintf(\"Unable to refresh auth token %s:\\n%s\\n\", $statusCode, $result));\n } else {\n $respObj = json_decode($result);\n if ($respObj->access != null) {\n $this->authtokens[\"access\"] = $respObj->access;\n }\n }\n }", "title": "" }, { "docid": "4ae022c99e15144979bb0cc227d4e279", "score": "0.5647972", "text": "public function setRefreshToken($token) : oauth2\\Token\n {\n // For any type other than an auth\\Token instance, instantiate a auth\\Token.\n // However, only strings are actually accepted in this scenario (the constructor will throw\n // on invalid types).\n if (!$token instanceof auth\\Token) {\n $token = new auth\\Token($token);\n }\n\n $this->refreshToken = $token;\n\n return $this;\n }", "title": "" }, { "docid": "4da74316a28b44089911e88c3485d04e", "score": "0.5641442", "text": "public function refresh_token($refresh_token) {\r\n $response = $this->ecobee(\r\n 'POST',\r\n 'token',\r\n array(\r\n 'grant_type' => 'refresh_token',\r\n 'refresh_token' => $refresh_token\r\n )\r\n );\r\n\r\n if(isset($response['access_token']) === false || isset($response['refresh_token']) === false) {\r\n throw new \\Exception('Could not grant token');\r\n }\r\n\r\n $access_token_escaped = $this->mysqli->real_escape_string($response['access_token']);\r\n $refresh_token_escaped = $this->mysqli->real_escape_string($response['refresh_token']);\r\n $query = 'insert into token(`access_token`, `refresh_token`) values(\"' . $access_token_escaped . '\", \"' . $refresh_token_escaped . '\")';\r\n $this->mysqli->query($query) or die($this->mysqli->error);\r\n\r\n return $response;\r\n }", "title": "" }, { "docid": "735ecb6c03be4753aa87b74ded29f319", "score": "0.5633561", "text": "public function getRefreshTokenByWebshopId($webshop_id)\n {\n $q = 'SELECT ws.id, ga.refreshtoken AS refreshtoken\n FROM webshop ws, webshopgoogleaccount wsga, googleaccount ga\n WHERE ws.id = wsga.webshop_id\n AND ga.id = wsga.googleaccount_id\n AND ws.id = ' . $webshop_id .'\n ORDER BY ga.id ASC\n LIMIT 0, 1';\n\n $results = R::getAll($q);\n $result = R::convertToBeans('googleaccount', $results);\n\n // Since its always 1, just return it.\n foreach ($result as $row)\n {\n return $row->refreshtoken;\n }\n }", "title": "" }, { "docid": "ed92d0e3648c93d219c1f4469b985c93", "score": "0.560083", "text": "public static function refresh()\n {\n $token = static::guard()->refresh();\n return static::tokenResponse($token);\n }", "title": "" }, { "docid": "b5deae931bac97b50e6916dc83bf904a", "score": "0.55935836", "text": "public function getToken() {\n if ($this->verbose) {\n echo \"AuthToken->getToken() => \\n\";\n var_dump($this->payload->access_token);\n }\n return $this->payload->access_token;\n }", "title": "" }, { "docid": "00c0bf7a8283e7307bc48226d7c5b8fc", "score": "0.55900824", "text": "public static function findByRefreshToken(string $token): ?self\n {\n return static::findOne(['refresh_token' => $token]);\n }", "title": "" }, { "docid": "650b43afe86f77c40cb0aa2f390d3bb7", "score": "0.5585882", "text": "public function refreshLongLivedToken($token) {\n // Prepare data\n $data = [\n \"grant_type\" => \"ig_refresh_token\",\n \"access_token\" => $token,\n ];\n\n // Prepare Guzzle\n $client = new \\GuzzleHttp\\Client([\n 'base_uri' => $this->graphBaseURI,\n 'http_errors' => false,\n ]);\n\n // Send request\n try {\n $response = $client->request('GET', $this->endpoints['refresh_long_lived_token'], [\n 'query' => $data\n ]);\n\n // Return body data\n $data = Json::decode((string)$response->getBody()); // access_token, token_type, expires_in, \n return $data;\n } catch (Exception $e) {\n $this->addError(\"Exception: \".$e);\n return false;\n }\n }", "title": "" }, { "docid": "3352836cf59907a90f7a392d8653d471", "score": "0.5580319", "text": "public function getRefreshToken(ClientInterface $client, string $token): ?RefreshTokenInterface;", "title": "" }, { "docid": "1a728cb1388bd1a41f6f05eeae1655af", "score": "0.5569012", "text": "public function getToken()\n {\n return $this->accessToken;\n }", "title": "" }, { "docid": "1a728cb1388bd1a41f6f05eeae1655af", "score": "0.5569012", "text": "public function getToken()\n {\n return $this->accessToken;\n }", "title": "" }, { "docid": "844a475a73814b553e1881bc1486a6aa", "score": "0.5567257", "text": "public function getOauthToken()\n {\n return ($this->connection and isset($this->connection->token)) ? $this->connection->token : null;\n }", "title": "" }, { "docid": "a09d6b72fe62c53cf8356fe1ccb1b5d8", "score": "0.555636", "text": "protected function getToken($token, $isRefresh = true) {\n\n if (!$token) return false;\n\n $instance = $isRefresh ? $this->oauthrefresh : $this->oauthaccess;\n $tokenName = $isRefresh ? 'refresh_token' : 'oauth_token';\n\n $data = $instance->field(\"oauth_token AS $tokenName, client_id, expires, scope, user_id\")->where(\"oauth_token='$token'\")->fetchRow();\n\n if ($data) return $data;\n return false;\n }", "title": "" }, { "docid": "81d01a6dd62a1cf514abd3846f30cfb5", "score": "0.55382544", "text": "public function refresh_token(){\n\t\t$this->server->addGrantType(new OAuth2\\GrantType\\RefreshToken($this->storage, array(\n\t\t\t\"always_issue_new_refresh_token\" => true,\n\t\t\t\"unset_refresh_token_after_use\" => true,\n\t\t\t\"refresh_token_lifetime\" => 2419200,\n\t\t)));\n\t\t$this->server->handleTokenRequest($this->request)->send();\n\t}", "title": "" }, { "docid": "40d2f3a6ba07c314e2f5125a29874384", "score": "0.5516153", "text": "public static function saveRefreshToken($refresh_token) {\n $token = MyObToken::all()->first();\n \n //if doesn't exists, then create new\n if (is_null($token)) {\n $token = new MyObToken();\n }\n \n $token->refresh_token = $refresh_token;\n $token->save();\n }", "title": "" }, { "docid": "6bf4c02bae7047e38045a1ec5eca28c1", "score": "0.55052805", "text": "protected function getTokenByRefreshRequest($grant_request_refresh)\n {\n // verify the required parameter 'grant_request_refresh' is set\n if ($grant_request_refresh === null || (is_array($grant_request_refresh) && count($grant_request_refresh) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $grant_request_refresh when calling getTokenByRefresh'\n );\n }\n\n $resourcePath = '/oauth2/token?Refresh';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($grant_request_refresh)) {\n $_tempBody = $grant_request_refresh;\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('access_token');\n if ($apiKey !== null) {\n $queryParams['access_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\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "6bf4c02bae7047e38045a1ec5eca28c1", "score": "0.55052805", "text": "protected function getTokenByRefreshRequest($grant_request_refresh)\n {\n // verify the required parameter 'grant_request_refresh' is set\n if ($grant_request_refresh === null || (is_array($grant_request_refresh) && count($grant_request_refresh) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $grant_request_refresh when calling getTokenByRefresh'\n );\n }\n\n $resourcePath = '/oauth2/token?Refresh';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($grant_request_refresh)) {\n $_tempBody = $grant_request_refresh;\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('access_token');\n if ($apiKey !== null) {\n $queryParams['access_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\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "2b0865520423248a1d2f36ff4ca5f335", "score": "0.5490608", "text": "public function refresh_user_token() {\n $params = array(\n 'grant_type' => 'refresh_token',\n 'client_id' => $this->app_id,\n 'client_secret' => $this->app_secret,\n );\n $this->_update_token($params);\n return $this->access_token != null;\n }", "title": "" }, { "docid": "6c8b5e0c55ae37b5dc935c8c4b54faef", "score": "0.54889816", "text": "public function refresh_access_token( $refresh_token ) {\r\n\t\t// Request for a new Access Token\r\n\t\t$response = $this->call_api_method( 'ga_auth_refresh_access_token', array( $refresh_token ) );\r\n\r\n\t\tGa_Admin::save_access_token( $response, $refresh_token );\r\n\r\n\t\t// Set new access token\r\n\t\t$token = Ga_Helper::get_option( Ga_Admin::GA_OAUTH_AUTH_TOKEN_OPTION_NAME );\r\n\t\t$this->set_access_token( json_decode( $token, true ) );\r\n\t}", "title": "" }, { "docid": "dd633d38fcbd2f7d1f119ddde3104162", "score": "0.54788446", "text": "public function get_new_accesstoken($refresh_token){\n\t\t$url = self::AUTHSUB_TOKEN_URI;\n\t\t$ch = $this->curlPostHandle($url);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, sprintf(\"client_id=%s&client_secret=%s&grant_type=%s&refresh_token=%s\", urlencode($this->client_id), urlencode($this->client_secret), 'refresh_token', urlencode($refresh_token)));\n\t\t$response = curl_exec($ch);\n\t\t$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\t\tcurl_close($ch);\n\t\t\n\t\tif($http_code == 200){\n\t\t\treturn json_decode($response);\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "9c9e434637179ebf41a3d05c85557a6d", "score": "0.5478352", "text": "public function get_session_token(){\n $content = $this->get(google_authsub_request::AUTHSESSION_URL);\n\n if( preg_match('/token=(.*)/i', $content, $matches) ){\n return $matches[1];\n }else{\n throw new moodle_exception('could not upgrade google authtoken to session token');\n }\n }", "title": "" }, { "docid": "13d977f5643c919488e4039dab0a8349", "score": "0.5474609", "text": "public function getToken()\n {\n return $this->app['access_token']->getToken()['access_token'];\n }", "title": "" }, { "docid": "85aa974d158c905596cda6af5e842019", "score": "0.5465889", "text": "public function get_user_id_from_refresh_token($token) {\n global $wpdb;\n return $wpdb->get_var($wpdb->prepare('SELECT user_id\n FROM ' . $wpdb->base_prefix . 'user_tokens\n WHERE refresh_token = %s', $token));\n }", "title": "" }, { "docid": "f89408b5054278edde0df789c0f517c8", "score": "0.5443977", "text": "protected function refreshToken() {\n $refresh_token = $this->getRefreshToken();\n if (empty($refresh_token)) {\n throw new SalesforceException(t('There is no refresh token.'));\n }\n\n $data = drupal_http_build_query(array(\n 'grant_type' => 'refresh_token',\n 'refresh_token' => $refresh_token,\n 'client_id' => $this->consumer_key,\n 'client_secret' => $this->consumer_secret,\n ));\n\n $url = $this->login_url . '/services/oauth2/token';\n $headers = array(\n // This is an undocumented requirement on Salesforce's end.\n 'Content-Type' => 'application/x-www-form-urlencoded',\n );\n $response = $this->httpRequest($url, $data, $headers, 'POST');\n\n if ($response->code != 200) {\n // @TODO: Deal with error better.\n throw new SalesforceException(t('Unable to get a Salesforce access token.'), $response->code);\n }\n\n $data = drupal_json_decode($response->data);\n\n if (isset($data['error'])) {\n throw new SalesforceException($data['error_description'], $data['error']);\n }\n\n $this->setAccessToken($data['access_token']);\n $this->setIdentity($data['id']);\n $this->setInstanceUrl($data['instance_url']);\n }", "title": "" }, { "docid": "bbf0e2cdbca5eb795c31ea2cfe0fdda1", "score": "0.5441665", "text": "public function refreshAccessToken()\n {\n\n if ($this->refresh_token) {\n $body = array(\n \"grant_type\" => \"refresh_token\",\n \"client_id\" => $this->client_id,\n \"client_secret\" => $this->client_secret,\n \"refresh_token\" => $this->refresh_token\n );\n\n $opts = array(\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => $body\n );\n\n // Cancel if the access_token is set, the call for refresh with it\n // FIXED BY: Matias Azar - [email protected]\n $this->call_with_token = false;\n $request = $this->execute(self::$OAUTH_URL, $opts);\n\n if ($request[\"httpCode\"] == 200) {\n $this->access_token = $request[\"body\"]->access_token;\n\n if ($request[\"body\"]->refresh_token)\n $this->refresh_token = $request[\"body\"]->refresh_token;\n\n return $request;\n\n } else {\n return $request;\n }\n } else {\n $result = array(\n 'error' => 'Offline-Access is not allowed.',\n 'httpCode' => null\n );\n return $result;\n }\n }", "title": "" }, { "docid": "d6e29fd4846900361e9b359f794edb81", "score": "0.54266936", "text": "public function getRefresh()\n {\n return $this->refreshSeconds;\n }", "title": "" }, { "docid": "6e5b7c27273773f17d79d0230c00da49", "score": "0.54247516", "text": "public function refreshAccessToken()\n\t{\n\t\t$refreshToken = Redis::get('hubspot:refreshtoken');\n\t\t$client = new Client();\n\t $response = $client->request('POST', $this->hubspotUrl.'/oauth/v1/token', [\n\t 'headers' => [\n\t 'Content-Type' => 'application/x-www-form-urlencoded;charset=utf-8'\n\t ],\n\t 'form_params' => [\n\t 'grant_type' => 'refresh_token',\n\t 'client_id' => $this->hubspotClientId,\n\t 'client_secret' => $this->hubspotClientSecret,\n\t 'redirect_uri' => $this->hubspotRedirectUrl,\n\t 'refresh_token' => $refreshToken\n\t ]\n\t ]);\n\t $response = json_decode($response->getBody());\n\t Redis::del('hubspot:accesstoken');\n\t\tRedis::del('hubspot:refreshtoken');\n\t\tRedis::del('hubspot:accesstokentime');\n\t Redis::set('hubspot:accesstoken', $response->access_token);\n\t Redis::set('hubspot:refreshtoken', $response->refresh_token);\n\t Redis::set('hubspot:accesstokentime', $response->expires_in);\n\t return $response;\n\t}", "title": "" }, { "docid": "b6833ee26c8a0a0b11e1f38b38757af3", "score": "0.5418787", "text": "public function refreshToken(string $refreshToken) : State;", "title": "" }, { "docid": "82d80893fda72a7134c9ccb1c7824592", "score": "0.5415597", "text": "protected function getSecurity_Firewall_Map_Context_ApiTokenRefreshService()\n {\n $a = ${($_ = isset($this->services['security.token_storage']) ? $this->services['security.token_storage'] : $this->get('security.token_storage')) && false ?: '_'};\n $b = ${($_ = isset($this->services['monolog.logger.security']) ? $this->services['monolog.logger.security'] : $this->get('monolog.logger.security', ContainerInterface::NULL_ON_INVALID_REFERENCE)) && false ?: '_'};\n\n return $this->services['security.firewall.map.context.api_token_refresh'] = new \\Symfony\\Bundle\\SecurityBundle\\Security\\FirewallContext(array(0 => ${($_ = isset($this->services['security.channel_listener']) ? $this->services['security.channel_listener'] : $this->getSecurity_ChannelListenerService()) && false ?: '_'}, 1 => new \\Symfony\\Component\\Security\\Http\\Firewall\\AnonymousAuthenticationListener($a, '5da21d6fb1c1d2.71455373', $b, ${($_ = isset($this->services['security.authentication.manager']) ? $this->services['security.authentication.manager'] : $this->getSecurity_Authentication_ManagerService()) && false ?: '_'}), 2 => ${($_ = isset($this->services['security.access_listener']) ? $this->services['security.access_listener'] : $this->getSecurity_AccessListenerService()) && false ?: '_'}), new \\Symfony\\Component\\Security\\Http\\Firewall\\ExceptionListener($a, ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.http_utils']) ? $this->services['security.http_utils'] : $this->getSecurity_HttpUtilsService()) && false ?: '_'}, 'api_token_refresh', NULL, NULL, NULL, $b, true), new \\Symfony\\Bundle\\SecurityBundle\\Security\\FirewallConfig('api_token_refresh', 'security.user_checker', 'security.request_matcher.bc5225be894e901e543ffcf3380500276da6125173096f94adf786461ce2e0f193452c7f', true, true, 'fos_user.user_provider.username', NULL, NULL, NULL, NULL, array(0 => 'anonymous')));\n }", "title": "" }, { "docid": "8fe8f8d2937da2cefeaa442b5e850cfb", "score": "0.5414145", "text": "function sb_dialogflow_get_token() {\n $token = sb_get_setting('dialogflow-token');\n if (empty($token)) {\n return new SBError('dialogflow-refresh-token-not-found', 'sb_dialogflow_get_token');\n }\n $response = sb_download('https://board.support/synch/dialogflow.php?refresh-roken=' . $token);\n if ($response != 'api-dialogflow-error' && $response != false) {\n $token = json_decode($response, true);\n if (isset($token['access_token'])) {\n return $token['access_token'];\n }\n }\n return new SBError('dialogflow-refresh-token-error', 'sb_dialogflow_get_token', $response);\n}", "title": "" }, { "docid": "e24f8adb30d38cdb90a18345bc7ff49c", "score": "0.5411195", "text": "protected function getToken($token, $isRefresh = true)\n {\n try {\n $tableName = $isRefresh ? self::TABLE_REFRESH : self::TABLE_TOKENS;\n $tokenName = $isRefresh ? 'refresh_token' : 'oauth_token';\n\n $sql = \"SELECT oauth_token AS $tokenName, client_id, expires, scope, user_id\n FROM $tableName\n WHERE oauth_token = :token\";\n $stmt = $this->db->prepare($sql);\n $stmt->bindParam(':token', $token, PDO::PARAM_STR);\n $stmt->execute();\n\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n return $result !== false ? $result : null;\n } catch (PDOException $e) {\n $this->handleException($e);\n }\n }", "title": "" }, { "docid": "b9490ef07ea7144d5f3142607edbbfe5", "score": "0.53933114", "text": "public function refreshAccessToken($token)\n {\n try {\n return $this->clientOAuth->getAccessToken('refresh_token', [\n 'refresh_token' => $token\n ]);\n } catch (\\League\\OAuth2\\Client\\Provider\\Exception\\IdentityProviderException $error) {\n $this->interpretationExceptionProvider($error, 'refreshAccessToken');\n }\n }", "title": "" }, { "docid": "603abc03e4e5d57c61199e8ff1c7fc86", "score": "0.53904057", "text": "function getUserToken($refresh = false, $return = false)\r\n {\r\n $response = \"\";\r\n $url = $this->tokenURL . \"/iam/tokens\";\r\n $param = array(\r\n \"clientSecret\" => $this->clientSecret,\r\n \"realmName\" => $this->realmName,\r\n );\r\n if ($refresh && isset($this->token->refresh_token) && !empty($this->token->refresh_token)) {\r\n $param[\"grantType\"] = \"refresh_token\";\r\n $param[\"refreshToken\"] = $this->token->refresh_token;\r\n } else {\r\n $param[\"grantType\"] = \"client_credentials\";\r\n }\r\n $response = $this->getCurlResponse($url, \"post\", json_encode($param), array(\r\n \"Content-Type: application/json\"\r\n ));\r\n if (empty($response)) throw new Exception(\"Empty returned\");\r\n $response = json_decode($response);\r\n if (!is_object($response)) throw new Exception(\"Data format not supported.\");\r\n if (isset($response->error)) {\r\n throw new Exception(\"!!ERROR: $response->error \\n Description: $response->message\");\r\n } elseif (isset($response->access_token) && !empty($response->access_token)) {\r\n $this->token = $response;\r\n if ($return) return $response->access_token;\r\n }\r\n else throw new Exception(\"Token Not Found\");\r\n }", "title": "" }, { "docid": "c8fb56804bf1359164c8b3435b4e927e", "score": "0.535928", "text": "public function set_refresh_token( $response ) {\n\t\tupdate_option( 'fitbit_refresh_token', $response->refresh_token );\n\t\t$this->refresh_token = $response->refresh_token;\n\t}", "title": "" }, { "docid": "8f8153bd5a7524e0092f1587892067ac", "score": "0.5346997", "text": "public function getApiToken()\n {\n return $this->token;\n }", "title": "" }, { "docid": "7b2dc27313a0b6410b56b7986c16c186", "score": "0.53403664", "text": "protected function unsetRefreshToken($refresh_token) {\n return;\n }", "title": "" } ]
ccbac23fe5060d65630b19e5693a41e9
Get the validation rules that apply to the request.
[ { "docid": "b8b82a1a0b2e646290867d9d54923691", "score": "0.0", "text": "public function rules()\n {\n return [\n 'name' => 'required',\n 'unit' => 'required',\n 'origin' => 'required|regex:/[A-Za-z]/',\n 'expiry_date' => 'required|numeric',\n 'amount' => 'required|numeric',\n 'input_date'=> 'required',\n 'unit_price' => 'required|numeric',\n 'image' => 'required',\n ];\n }", "title": "" } ]
[ { "docid": "22661db8dde56c23a89087f21f08827f", "score": "0.83513695", "text": "public function rules()\n {\n // dd($this->request->all());\n $rules = $this->custom_rules();\n return $rules;\n }", "title": "" }, { "docid": "fbfcab70342d40a351f21f930cac2460", "score": "0.8053294", "text": "protected function getValidationRules()\r\n {\r\n return $this->rules;\r\n }", "title": "" }, { "docid": "9f44fb39c76a5414da5b594d168bf460", "score": "0.79721034", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n {\n return $this->getQueryRules();\n break;\n }\n case 'POST':\n {\n return $this->getRequestRules();\n break;\n }\n case 'PUT':\n {\n return $this->getRequestRules();\n break;\n }\n case 'PATCH':\n {\n return $this->getRequestRules();\n break;\n }\n case 'DELETE':\n {\n return $this->getRequestRules();\n break;\n }\n default:break;\n }\n }", "title": "" }, { "docid": "304b3dabf4dce24372e250d7a8640198", "score": "0.79545623", "text": "public function rules()\n {\n return $this->object->getValidationRules();\n }", "title": "" }, { "docid": "674f48033c4da89ffa7685260cca729a", "score": "0.79247683", "text": "public function rules()\n {\n return $this->validationRules;\n }", "title": "" }, { "docid": "189c95c1a6c72dca026ecc25b6debb47", "score": "0.79020095", "text": "public function rules(){\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PATCH':\n return $this->getPutRules();\n default:\n return $this->rules;\n }\n }", "title": "" }, { "docid": "fc99891a0d03307f2b0025bb7d140e8e", "score": "0.7880665", "text": "public function getValidationRules(): array\n {\n return $this->validationRules;\n }", "title": "" }, { "docid": "b788bc26e9f11342d45de5103a8d2f19", "score": "0.784257", "text": "public function getRequestRules()\n {\n return $this->request_rules = array_merge($this->request_rules, $this->reserved_request_rules);\n }", "title": "" }, { "docid": "64233c461e5c312c55d39de520ba50e7", "score": "0.7829227", "text": "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [\n 'per_page' => 'min:1|integer',\n ];\n\n case 'POST':\n return [\n 'name' => 'required|max:255',\n 'unit' => 'required|max:255',\n 'category_id' => 'required|integer|max:255',\n 'frequency' => 'required|max:255',\n ];\n\n case 'PUT':\n case 'PATCH':\n return [\n 'record_id' => 'required|integer|max:255',\n 'frequency' => 'required|max:255',\n 'completed' => 'required|boolean',\n ];\n\n default:\n return [\n //\n ];\n }\n }", "title": "" }, { "docid": "924c11ffc113fcd9c3f27d9a3e1ba518", "score": "0.77675736", "text": "public function getValidationRules () {\n\t\treturn $this->validationRulesOnCreate;\n\t}", "title": "" }, { "docid": "9687617c25b5d8c9b4d6d8c54b76801e", "score": "0.77308065", "text": "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UploadType' => array(\n\t\t\t\t'inArray' => array('values' => array(self::UPLOADTYPE_NDA),),\n\t\t\t),\n\t\t\t'_FileName' => array(\n\t\t\t\t'string' => array('min' => 1,'max' => 255,),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'inArray' => array('values' => array(self::STATUS_APPROVED, self::STATUS_REJECTED, self::STATUS_PENDING),),\n\t\t\t),\n\t\t\t'_PreferredLanguage' => array(\n\t\t\t\t'string' => array('min' => 1,'max' => 5,),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "2180e7156956f995d79e98a14296ec88", "score": "0.7728593", "text": "protected function _validationRules()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "13459339bf1907cec62fae99209e187a", "score": "0.7702997", "text": "public function rules()\n {\n $validation = array();\n $validation['service_id'] = 'required';\n $validation['date_maturity'] = 'required';\n $validation['status'] = 'required';\n\n switch(request()->method()){\n case 'POST':\n\n break;\n case 'PUT':\n\n break;\n }\n\n return $validation;\n }", "title": "" }, { "docid": "54189267b931be93bab91ff0dedaaefb", "score": "0.76996154", "text": "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_Id' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Title' => array(\n\t\t\t\t'string' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Sent' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "cb37ae332016d9aa874746ae9acf5b3c", "score": "0.76954824", "text": "private function getValidateRules()\n {\n return [\n 'name' => 'required|string|max:64',\n 'phone' => 'required|string|max:32',\n 'address' => 'required|string|max:256',\n 'message' => 'nullable|string|max:256',\n ];\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7681417", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7681417", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7681417", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7681417", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7681417", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7681417", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7681417", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "bc8481ba2b2bc2414633cc874cbd3bb1", "score": "0.7652956", "text": "public function returnValidationRules()\n {\n return $this->_validationRules;\n }", "title": "" }, { "docid": "12d37bd7f67c920351167111444cb5ab", "score": "0.76334345", "text": "public function rules()\n {\n $rules = [];\n switch ($this->method()) {\n case 'POST':\n case 'PUT';\n $rules = [\n 'title' => 'sometimes|required|min:3|max:30',\n 'category_id' => 'sometimes|required',\n 'body' => 'sometimes|required|min:5',\n 'captcha' => 'sometimes|required|captcha',\n 'upload_file' => 'sometimes|max:1024'\n ];\n }\n return $rules;\n }", "title": "" }, { "docid": "464e9694a3c15a180d690f8eb4f318c2", "score": "0.7615347", "text": "public function rules()\n {\n switch ($this->method()){\n case 'GET':\n $validator = [];\n if ($this->request->get('start_time')) {\n $time = [\n 'start_time' => [\n 'array'\n ],\n 'start_time.0' => [\n 'required',\n 'date',\n ],\n 'start_time.1' => [\n 'required',\n 'date',\n 'after:start_time.0'\n ],\n ];\n $validator = array_merge($validator,$time);\n }\n if ($this->request->get('src')) {\n $validator = array_merge($validator,['src' => 'integer']);\n }\n if ($this->request->get('dst')) {\n $validator = array_merge($validator,['dst' => 'integer']);\n }\n if ($this->request->get('answered')) {\n $validator = array_merge($validator,['answered' => 'boolean']);\n }\n if ($this->request->get('direct')) {\n $validator = array_merge($validator,['direct' => 'in:come,out,inside,turn']);\n }\n return $validator;\n default:\n return [\n\n ];\n }\n\n }", "title": "" }, { "docid": "792f68aced72f732af33f1380ec84053", "score": "0.7609302", "text": "private function getValidationRules() {\n $rules = array(\n 'name' => ['required', 'string', 'max:191'],\n 'login' => ['required', 'string', 'max:31', 'unique:users', 'alpha_num'],\n 'email' => ['required', 'string', 'email', 'max:191', 'unique:users'],\n 'password' => ['required', 'string', 'min:8', 'confirmed']\n );\n return $rules;\n }", "title": "" }, { "docid": "5fd01dbbd4ae37c1c4f693224d641939", "score": "0.7597024", "text": "public function rules()\n {\n $rules = $this->rules;\n\n return $rules;\n }", "title": "" }, { "docid": "fbe82a26e235ac452c3a8774f12fbac2", "score": "0.75963116", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'PATCH':\n return $this->getUpdateRules();\n break;\n\n case 'DELETE':\n return $this->getDeleteRules();\n break;\n\n default:\n return $this->getCreateRules();\n break;\n }\n }", "title": "" }, { "docid": "46c6c2c400d0f453c57ac97779a3de35", "score": "0.7595482", "text": "public function rules(): array\n {\n switch ($this->getMethod()) {\n case 'PUT':\n return [\n 'status' => ['bail', 'required', Rule::in([-1, 1])],\n 'id' => ['required'],\n ];\n case 'POST':\n return [\n 'email' => [\n 'bail',\n 'required',\n 'email',\n ]\n ];\n case 'GET':\n return [\n 'email' => ['bail', 'required', 'email'],\n 'key' => ['required'],\n 'code' => ['required'],\n ];\n }\n }", "title": "" }, { "docid": "7dcbff841d1eb37aa09254894f2d8675", "score": "0.7574683", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n {\n return [\n 'start' => 'required',\n 'end' => 'required|after:start',\n 'location' => 'required',\n ];\n }\n case 'PUT':\n case 'PATCH':\n {\n return [\n 'start' => 'required',\n 'end' => 'required|after:start',\n 'location' => 'required',\n ];\n }\n default:break;\n }\n }", "title": "" }, { "docid": "3505b0f11cec928f36de19f9d4337c42", "score": "0.7571676", "text": "private function storeRequestValidationRules()\n {\n $rules = [\n 'name' => 'required|max:255',\n 'username' => 'max:100',\n 'email' => 'email|required|max:255|unique:users',\n 'password' => 'required|min:5|max:255',\n 'gender' => 'numeric|min:1|max:3',\n 'address' => 'max:255',\n 'phone' => 'max:45',\n 'profile_picture' => 'max:255',\n 'roles' => 'required|array|in:' . implode(',', config('common.users.roles')),\n 'is_active' => 'required|numeric|min:0|max:1',\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "958afbe78ddb5ae634b7ad1fc2167fc0", "score": "0.7570104", "text": "public function rules() {\n\t\t\treturn $this->rules;\n\t}", "title": "" }, { "docid": "7ee4ec71711c87a8dc475ac1b566679c", "score": "0.7569507", "text": "public function rules()\n\t{\n\t\treturn $this->rules;\n\t}", "title": "" }, { "docid": "6ca414cdbab522cb90d8e81e1159aba8", "score": "0.7567308", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'to_name' => ['required','max:191'],\n 'mobile' => ['required','max:11','min:11'],\n 'address' => ['required','string'],\n 'detail' => ['required','max:191'],\n 'postcode' => ['nullable','max:6'],\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "title": "" }, { "docid": "026ad5323e67ffe17732671122fefcb8", "score": "0.75656646", "text": "public function rules()\n {\n $all_rules = [\n 'email' => [\n 'required',\n 'email',\n 'max:255',\n Rule::unique($this->repository->getModelTable())\n ->where(function ($query) {\n $query->whereNull('deleted_at')\n ->where('id', '<>', $this->user()->id);\n }),\n ],\n 'name' => 'required|string|max:255',\n 'password' => 'required|confirmed|string|min:6|max:255',\n ];\n\n // Get input\n $input = $this->all();\n\n // Get necessary rules based on input (same keys basically)\n $rules = array_intersect_key($all_rules, $input);\n\n return $rules;\n }", "title": "" }, { "docid": "85e51d31fc873bf179b6e86544c844ba", "score": "0.7562358", "text": "public function rules()\n {\n $validation = [];\n $validation['name'] = ['required', 'min:2', 'max:100'];\n $validation['email'] = ['required', Rule::unique('users')->ignore($this->user)];\n\n if(strtolower($this->method()) == 'post' || (strtolower($this->method()) == 'put' && strlen($this->password) >= 1)) {\n $validation['password'] = ['required', 'min:6'];\n }\n\n return $validation;\n }", "title": "" }, { "docid": "dc37dcb613b0926de6db7cba76b52b91", "score": "0.7558382", "text": "public function getRules() {\n return [\n 'provider_id' => 'required',\n 'rfc' => 'required',\n 'name' => 'required',\n 'address' => 'required',\n 'postal_code' => 'required',\n ];\n }", "title": "" }, { "docid": "00cd38a3fd794a34bf3df189c868e0af", "score": "0.7558172", "text": "public function rules(): array\n {\n switch ($this->getMethod())\n {\n case 'POST':\n $rules = [\n 'phone' => 'required_without:email',\n 'email' => 'required_without:phone|email',\n 'password' => 'required',\n ];\n\n return $rules;\n break;\n }\n }", "title": "" }, { "docid": "2115869f626037f9df0a1c3568effab2", "score": "0.754768", "text": "public function getValidationRules()\n {\n return [\n 'ADR' => '*',\n 'ANNIVERSARY' => '?',\n 'BDAY' => '?',\n 'CALADRURI' => '*',\n 'CALURI' => '*',\n 'CATEGORIES' => '*',\n 'CLIENTPIDMAP' => '*',\n 'EMAIL' => '*',\n 'FBURL' => '*',\n 'IMPP' => '*',\n 'GENDER' => '?',\n 'GEO' => '*',\n 'KEY' => '*',\n 'KIND' => '?',\n 'LANG' => '*',\n 'LOGO' => '*',\n 'MEMBER' => '*',\n 'N' => '?',\n 'NICKNAME' => '*',\n 'NOTE' => '*',\n 'ORG' => '*',\n 'PHOTO' => '*',\n 'PRODID' => '?',\n 'RELATED' => '*',\n 'REV' => '?',\n 'ROLE' => '*',\n 'SOUND' => '*',\n 'SOURCE' => '*',\n 'TEL' => '*',\n 'TITLE' => '*',\n 'TZ' => '*',\n 'URL' => '*',\n 'VERSION' => '1',\n 'XML' => '*',\n\n // FN is commented out, because it's already handled by the\n // validate function, which may also try to repair it.\n // 'FN' => '+',\n 'UID' => '?',\n ];\n }", "title": "" }, { "docid": "4271cd8c9f9fbe155df88643004cf75c", "score": "0.75328785", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required|min:6|max:255',\n 'email' => 'required|email|min:6|max:255|unique:users',\n 'address' => 'required',\n 'phone' => 'required',\n 'identity_number' => 'required',\n ];\n\n switch ($this->method()) {\n case 'POST':\n break;\n\n case 'PUT':\n $rules['email'] = 'required|email|min:6|max:255|unique:users,email,' . $this->get('user_id');\n break;\n \n default:\n # code...\n break;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "d707bb0769e974c2f417a897389d069a", "score": "0.75138915", "text": "public function rules()\n {\n return static::$rules;\n }", "title": "" }, { "docid": "7a2bfe86a5d3b74e851190116cc6c804", "score": "0.75132424", "text": "public function rules()\n {\n $rules = [];\n switch($this->method())\n {\n case 'POST':\n {\n $rules = [ \n 'template_id' => [\n 'required',\n Rule::in(Template::pluck('id')->toArray()),\n ],\n 'published_at' => 'required|date',\n 'user_id' => [\n 'required',\n Rule::in(User::employee()->pluck('id')->toArray()),\n ],\n ];\n break;\n }\n case 'PUT':\n case 'PATCH':\n {\n $rules = [ \n 'template_id' => [\n 'required',\n Rule::in(Template::pluck('id')->toArray()),\n ],\n 'published_at' => 'required|date',\n 'user_id' => [\n 'required',\n Rule::in(User::employee()->pluck('id')->toArray()),\n ],\n ];\n }\n default: break;\n }\n \n return $rules; \n }", "title": "" }, { "docid": "51b658b83f9851eb4b1716f6add97a06", "score": "0.75101525", "text": "public function rules()\n {\n parent::rules();\n $method = $this->method();\n if (null !== $this->get('_method', null)) {\n $method = $this->get('_method');\n }\n $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n $this->rules = [];\n break;\n\n case 'POST':\n\n break;\n // in case of edit\n case 'PUT':\n case 'PATCH':\n\n break;\n default:\n break;\n }\n\n return $this->rules;\n }", "title": "" }, { "docid": "b7d2a7469638be79d9de5fd8c80554ac", "score": "0.750966", "text": "public function rules()\n {\n switch ($this->method()){\n case 'POST':\n return [\n 'title' => 'required|string',\n 'mission_amount' => 'required|numeric|gt:0',\n 'start_at' => 'required|date',\n 'end_at' => 'required|date',\n 'done_at' => 'date',\n 'cancel_at' => 'date',\n ];\n break;\n case 'PATCH':\n return [\n 'title' => 'string',\n 'accomplish_amount' => 'numeric',\n 'start_at' => 'date',\n 'end_at' => 'date',\n 'cancel_at' => 'date',\n ];\n break;\n }\n }", "title": "" }, { "docid": "f03865f30441fcf975ed53e31245c14b", "score": "0.75054044", "text": "public function rules()\n {\n $rules = [];\n\n $method = $this->route()->getActionMethod();\n switch ($method) {\n case 'chatRecords':\n $rules = [\n 'type' => ['required', Rule::in(['friend', 'group'])],\n 'model_id' => ['required'],\n ];\n break;\n default:\n break;\n\n }\n return $rules;\n }", "title": "" }, { "docid": "c24f4d4d305b08a1554f3174674b9623", "score": "0.75037014", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'email' => 'required|email'\n ];\n\n $isPost = ( !is_null($this->method) && $this->method === 'POST' )\n || $this->server('REQUEST_METHOD') === 'POST';\n\n if ( $isPost ) {\n $rules['password'] = 'required|min:6|confirmed';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "bb4066568b7c6f4650b96a080a2f40a7", "score": "0.75031805", "text": "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()) {\n case \"GET\":\n // todo\n break;\n case \"POST\":\n $rules = [\n 'name' => 'required|unique:statuses',\n 'priority' => 'required|numeric|unique:statuses',\n 'status_type_id' => 'required|exists:status_types,id',\n 'status_category_id' => 'required|exists:status_categories,id',\n ];\n break;\n case \"PATCH\":\n case \"PUT\":\n $rules = [\n 'name' => 'required|unique:statuses,name,' . $this->route('status')->id,\n 'priority' => 'required|numeric|unique:statuses,priority,' . $this->route('status')->id,\n 'status_type_id' => 'required|exists:status_types,id',\n 'status_category_id' => 'required|exists:status_categories,id',\n ];\n break;\n case \"DELETE\":\n default:\n break;\n }\n return $rules;\n }", "title": "" }, { "docid": "318c7d6aa64c3fec3b77769e085a0f2b", "score": "0.7499059", "text": "public function rules()\n {\n $user = $this->route('user');\n\n $rules = collect([\n 'name' => 'required|string|max:255',\n 'username' => 'required|string|max:255|unique:users',\n 'password' => 'required|string|min:6|confirmed',\n 'type' => 'required|in:1,2',\n 'phone' => 'required_if:type,2',\n ]);\n\n switch ($this->method()) {\n case 'POST':\n return $rules->toArray();\n case 'PUT':\n case 'PATCH':\n return $rules->merge([\n 'username' => 'required|string|max:255|unique:users,username,'.$user->id,\n 'password' => '',\n ])->toArray();\n }\n }", "title": "" }, { "docid": "861e46d431fd6db9d59d58919d65485b", "score": "0.7497064", "text": "public function getValidationRules()\n {\n return [\n 'TZID' => 1,\n\n 'LAST-MODIFIED' => '?',\n 'TZURL' => '?',\n\n // At least 1 STANDARD or DAYLIGHT must appear.\n //\n // The validator is not specific yet to pick this up, so these\n // rules are too loose.\n 'STANDARD' => '*',\n 'DAYLIGHT' => '*',\n ];\n }", "title": "" }, { "docid": "288a48ea723113f3c2531a77671b1912", "score": "0.7485127", "text": "public function getValidationRules()\n {\n return $this->getAllSettingFields()\n ->pluck('rules', 'name')\n ->reject(function ($val) {\n return is_null($val);\n })\n ->toArray();\n }", "title": "" }, { "docid": "328c0ccab8c45d0b1d7939821b2997bd", "score": "0.7484027", "text": "abstract protected function getValidationRules();", "title": "" }, { "docid": "6be0666a2a4496a0c9c0f97a4985e045", "score": "0.74806714", "text": "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'store':\n $this->authorize = in_array(Auth::user()->role, [User::Role_Admin, User::Role_School, User::Role_Educator, User::Role_Laboratory]);\n return $this->store();\n case 'update':\n return $this->update();\n case 'resetPwd':\n return ['password' => 'required|min:6'];\n default:\n {\n return [];\n }\n }\n }", "title": "" }, { "docid": "6ec9d103a18182c74322044d65c59b2d", "score": "0.7477739", "text": "public function getValidationRules()\n {\n return [\n 'name' => 'required',\n 'user' => 'required|exists:users,id',\n 'products' => 'array'\n ];\n }", "title": "" }, { "docid": "fa6ce6742efe8e37e756ffe1df2ce115", "score": "0.747393", "text": "public function rules()\n {\n return $this->customRules;\n // return $this->parseRules($rules); \n }", "title": "" }, { "docid": "2ac6c42c853fd673a0ee882a55464f62", "score": "0.74728256", "text": "public function rules()\n {\n $routeName = $this->route()->getName();\n switch ($routeName) {\n case \"api.material.in.store\":\n $rule = [\n \"warehouse_name\" => \"required\",\n \"in_number\" => \"required\",\n \"origin\" => \"required\",\n \"batch_number\" => \"required\",\n \"in_time\" => \"required|integer\",\n \"operator\" => \"required\",\n \"material_id\" => \"required|exists:material,id\",\n \"amount\" => \"required\",\n // \"in_material\" => \"required\",\n ];\n break;\n case \"api.material.in.delete\":\n $rule = [\n \"ids\" => \"required\",\n ];\n break;\n case \"\":\n $rule = [];\n break;\n };\n\n return $rule;\n }", "title": "" }, { "docid": "d946cd7a09a395d4cea44a6978c8966e", "score": "0.7468989", "text": "public function rules()\n {\n switch($this->method()) {\n case 'POST':\n return [\n 'name' => 'required|string',\n 'gi' => 'required|string',\n 'energy' => 'required|integer',\n 'carbohydrate' => 'required|integer',\n 'axunge' => 'required|integer',\n 'protein' => 'required|integer',\n ];\n break;\n case 'PATCH':\n return [\n 'id' => 'required|integer',\n 'name' => 'required|string',\n 'gi' => 'required|string',\n 'energy' => 'required|integer',\n 'carbohydrate' => 'required|integer',\n 'axunge' => 'required|integer',\n 'protein' => 'required|integer',\n ];\n break;\n case 'DELETE':\n return [\n 'id' => 'required|integer',\n ];\n }\n }", "title": "" }, { "docid": "16f073c94b6ed296352fe1c5aedf9d32", "score": "0.7458418", "text": "public function rules()\n {\n $path = preg_replace('/api\\//', '', $this->path());\n\n $rules = [];\n\n switch ($path) {\n case self::PASSWORD_UPDATE:\n $rules = [\n 'old_password' => ['required', 'string', new MatchOldPassword],\n 'password' => [\n 'required', 'string', 'confirmed', 'min:8', new CheckSamePassword\n ],\n ];\n break;\n\n case self::PROFILE_UPDATE:\n $rules = [\n 'name' => ['sometimes', 'string', 'max:255'],\n 'bio' => ['string', 'nullable'],\n 'phone' => ['sometimes', 'string', 'size:11', 'nullable'],\n 'image' => [\n 'sometimes',\n 'mimes:jpeg,gif,bmp,png', 'max:1000', 'nullable'\n ],\n ];\n break;\n\n default:\n break;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "b9f8f8fb76d3c947db4fc0fb9b9c678b", "score": "0.7458117", "text": "public function rules()\n {\n $form = $this->route('form');\n\n switch ($form->id) {\n case 1:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'phone' => 'required|max:15',\n 'city' => 'required|max:255',\n 'state' => 'required|max:255',\n 'subject' => 'required|max:255',\n 'message' => 'required|max:1000',\n ];\n break;\n\n case 2:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n ];\n break;\n\n case 3:\n $rules = [\n 'resume' => 'required',\n ];\n break;\n \n default:\n $rules = [\n \t'teste' => 'required'\n ];\n break;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "add382121e495302f70579ba8a80fdd8", "score": "0.744686", "text": "public function rules()\n {\n $rules = $this->rules;\n\n if ($this->method() === 'PATCH') {\n $rules['email'] .= ',' . $this->employee->id;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "b34dff7740c7694886cd7ba2d05ecaf6", "score": "0.74247247", "text": "public function rules()\n {\n if($this->isMethod('patch')){\n return [\n 'question' => 'required'\n ];\n }\n\n /*\n * validation rules for creating a poll\n * */\n return [\n 'question' => 'present|required',\n 'options.0' => 'present|required',\n 'options.1' => 'present|required',\n ];\n }", "title": "" }, { "docid": "0f9e4555e0438bad03b32c0cc0d9b290", "score": "0.74235296", "text": "public function rules(Request $request)\n {\n\t\t$action = $request->post('action');\n\t\tswitch($action) {\n\t\t\tcase 'activity':\n\t\t\t\treturn [\n\t\t\t\t\t'activity' => 'required'\n\t\t\t\t];\n\t\t\tbreak;\n\t\t\tcase 'certificate':\n\t\t\t\treturn [\n\t\t\t\t\t'certificate' => 'required'\n\t\t\t\t];\n\t\t\tbreak;\n\t\t\tcase 'profile':\n\t\t\t\treturn [\n\t\t\t\t\t'uname' => 'required',\n\t\t\t\t\t'designation' => 'required',\n\t\t\t\t\t'dept' => 'required',\n\t\t\t\t\t'manager' => 'required',\n\t\t\t\t\t'about' => 'required',\n\t\t\t\t\t'aspirations' => 'required',\n\t\t\t\t\t'availability' => 'required'\n\t\t\t\t];\n\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\treturn [\n\t\t\t\t\t'focus' => 'required'\n\t\t\t\t];\n\t\t\tbreak;\n\t\t\tcase '1':\n\t\t\t\treturn [\n\t\t\t\t\t'skills' => 'required'\n\t\t\t\t];\n\t\t\tbreak;\n\t\t}\n \n }", "title": "" }, { "docid": "2fa13c036188d84174cd4b0f83627007", "score": "0.74135303", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'email|nullable|max:60',\n 'phone' => 'required|numeric',\n 'state' => 'required|max:120',\n 'city' => 'required|max:120',\n 'address' => 'required|max:120',\n 'is_default' => 'integer|min:0|max:1',\n ];\n\n if (count(EcommerceHelper::getAvailableCountries()) > 1) {\n $rules['country'] = 'required|' . Rule::in(array_keys(EcommerceHelper::getAvailableCountries()));\n } else {\n $this->merge(['country' => Arr::first(array_keys(EcommerceHelper::getAvailableCountries()))]);\n }\n\n if (EcommerceHelper::isZipCodeEnabled()) {\n $rules['zip_code'] = 'required|max:20';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "1f0d6361414449190d69ef7c93e3cb6b", "score": "0.7409884", "text": "public function fetchRequestRules()\n {\n if (($this->mainRequest->all())) {\n return array_intersect_key($this->rules, $this->mainRequest->all());\n }\n\n return;\n }", "title": "" }, { "docid": "2c1d5be8682acc033bd2f55d9229bbaf", "score": "0.74070156", "text": "public function rules()\n {\n Validator::extendImplicit(\n 'diff',\n function ($attribute, $value, $parameters, $validator) {\n return false;\n }\n );\n\n $req = $this;\n $this->reporting_organization_info = $req->get('reporting_organization_info')[0];\n $rules = [];\n foreach ($this->reporting_organization_info as $key => $val) {\n $rules[\"reporting_organization_info.0.$key\"] = 'required';\n $rules[\"reporting_organization_info.0.narrative\"] = \"unique_lang|unique_default_lang\";\n }\n $rules[\"reporting_organization_info.0.narrative.0.narrative\"] = 'required';\n $rules[\"default_field_values.0.linked_data_uri\"] = 'url';\n $rules[\"default_field_values.0.default_currency\"] = 'required';\n $rules[\"default_field_values.0.default_language\"] = 'required';\n $rules[\"default_field_values.0.default_hierarchy\"] = 'numeric';\n\n $rules = array_merge($rules, $this->getRulesForReportingOrganization($this->reporting_organization_info));\n\n return $rules;\n }", "title": "" }, { "docid": "d2931c3ecef4f6c75afd3efdef8a4cbf", "score": "0.74042267", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required'\n ];\n\n if($this->get('price')) {\n $rules['minimun_time'] = 'required';\n $rules['price'] = 'required';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "80e6d3fea2e201b6403bb02ee24dd1ad", "score": "0.74024266", "text": "public function getValidationRules()\n {\n $validationRules = [\n\n [\n 'field' => 'nama_barang',\n 'label' => 'Nama Barang',\n 'rules' => 'trim|required|min_length[3]|max_length[100]|alpha|callback_nama_barang_unik'\n ],\n [\n 'field' => 'harga_beli',\n 'label' => 'Harga Beli',\n 'rules' => 'trim|required|numeric|greater_than[0]|max_length[20]'\n ],\n [\n 'field' => 'harga_jual',\n 'label' => 'Harga Jual',\n 'rules' => 'trim|required|numeric|greater_than[0]|max_length[20]'\n ],\n [\n 'field' => 'stok',\n 'label' => 'Stok',\n 'rules' => 'trim|required|numeric|greater_than[0]|max_length[20]'\n ],\n ];\n\n return $validationRules;\n }", "title": "" }, { "docid": "7d2132da6f56f8c37d578cb0e924482a", "score": "0.740199", "text": "public function rules()\n {\n if ($this->provider == 'mailgun')\n return $this->mailgunRules();\n elseif ($this->provider == 'amazon_ses')\n return $this->amazonSesRules();\n else\n return [ 'provider' => 'required' ];\n }", "title": "" }, { "docid": "19c375846ce65d32d9930ff2c8226c63", "score": "0.73969364", "text": "public function getRules()\n\t{\n\t\t$rules['warehouse_id']\t\t= ['required', 'integer', 'exists:'. app()->make(Warehouse::class)->getTable() . ',id'];\n\t\t$rules['ref_id']\t\t\t= ['required', 'integer'];\n\t\t$rules['ref_type']\t\t\t= ['required', 'string'];\n\t\t$rules['product_id']\t\t= ['required', 'integer', 'exists:'. app()->make(Product::class)->getTable() . ',id'];\n\t\t$rules['qty'] \t= ['required', 'numeric'];\n\t\t$rules['date'] \t\t= ['required', 'date'];\n\t\t$rules['sku'] \t= ['required', 'string'];\n\t\t$rules['expired_at'] = ['nullable', 'date'];\n\t\t\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "869d12763e9ea84d01e52be3dc9aa3af", "score": "0.7395317", "text": "public function rules()\n {\n if( $this->isMethod('POST') ){\n return $this->createRules();\n }elseif( $this->isMethod('PUT') ){\n return $this->updateRules();\n }\n }", "title": "" }, { "docid": "e7b0626ebdc93b01844cb7ffcf7dfcf0", "score": "0.7393823", "text": "public function rules(): array\n {\n return $this->rules;\n }", "title": "" }, { "docid": "e7b0626ebdc93b01844cb7ffcf7dfcf0", "score": "0.7393823", "text": "public function rules(): array\n {\n return $this->rules;\n }", "title": "" }, { "docid": "18df03047090c2bab575a819b773ebd4", "score": "0.7393576", "text": "public function rules()\n {\n $rules = [\n 'first_name' => 'required|min:2|max:20',\n 'last_name' => 'required|min:2|max:20',\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n ];\n\n if($this->method() == 'PUT') {\n $rules['email'] = 'required|email|unique:users,email,' . $this->user->_id . ',_id';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "a3ce367026754a804a3bf44044d81a5c", "score": "0.7385635", "text": "public function rules()\n {\n if ($this->method() == 'POST'){\n return [\n 'vcc_id' => 'required',\n 'group_id' => 'required',\n 'ip' => 'required',\n 'opt_platform' => 'required',\n 'action_url' => 'required',\n 'land_page' => 'required',\n 'land_page_title' => 'required',\n ];\n }else{\n return [\n\n ];\n }\n }", "title": "" }, { "docid": "180fbd82972aa5d40e96513fb73805a6", "score": "0.73834974", "text": "public function rules()\n {\n if($this->isMethod('post')){\n\n return $this->createRules();\n\n }elseif($this->isMethod('put')){\n\n return $this->updateRules();\n\n }\n }", "title": "" }, { "docid": "6173d86a7390441863b4c44bde5d7085", "score": "0.73826104", "text": "public function rules()\n {\n $request = $this->instance()->all();\n $rules = [\n 'format' => 'required',\n 'assign' => 'required'\n ];\n $files = $request['files'];\n $files_rules = 'required';\n if (count($files) > 0) {\n foreach ($files as $key => $file) {\n $rules['files.'.$key] = $files_rules;\n }\n }\n return $rules;\n\n }", "title": "" }, { "docid": "91ef45d95e094aee32f5ce9b170955bd", "score": "0.7380219", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'PUT':\n case 'PATCH':\n case 'POST': {\n $rules = [\n 'contract.number' => 'sometimes|nullable|string|max:255',\n 'contract.service_contragent_id' => 'sometimes|nullable|exists:contragents,id',\n 'contract.esb_contragent_id' => 'sometimes|nullable|exists:contragents,id',\n 'contract.date' => 'required|date_format:\"d.m.Y\"',\n ];\n\n return $rules;\n }\n default:\n return [];\n }\n }", "title": "" }, { "docid": "6ef534462dc563e5df62ba3fa034d946", "score": "0.73780656", "text": "protected static function buildValidationRules()\n {\n if ( static::$_validationRules === null )\n {\n $all_rules = static::$validationRules;\n foreach ( $all_rules as $field => $rules )\n {\n // Process string rules (e.g. int|min:5)\n if ( is_string($rules) )\n {\n $all_rules[$field] = static::processStringRules($rules);\n }\n // For arrays, make sure the keys are the rules.\n elseif ( is_array($rules) )\n {\n $all_rules[$field] = static::processArrayRules($rules);\n }\n }\n static::$_validationRules = $all_rules;\n }\n return static::$_validationRules;\n }", "title": "" }, { "docid": "d8ad3e1309290526e72851092c08103c", "score": "0.73753804", "text": "public function rules()\n {\n if($this->is('api/todo/*'))\n $rules = [\n 'content' => 'required|string|min:3',\n 'todo_id' => 'required|integer|min:1',\n 'priority' => 'integer'\n ];\n else\n $rules = [\n 'content' => 'string|min:3',\n 'todo_id' => 'integer|min:1',\n 'priority' => 'integer'\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "bff72c83bad3c31eb9d7273af8b81dfd", "score": "0.73703086", "text": "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'store':\n return [\n 'admin_name' => 'required|exists:admins,name',\n 'on_duty' => 'nullable|boolean',\n 'status' => 'nullable|boolean',\n 'sort' => 'nullable|integer|min:0',\n 'start_worked_at' => 'date_format:\"H:i:s\"',\n 'end_worked_at' => 'date_format:\"H:i:s\"',\n ];\n break;\n\n case 'update':\n return [\n 'id' => 'nullable|exists:crm_bo_admins,id',\n 'status' => 'nullable|boolean',\n 'on_duty' => 'nullable|boolean',\n 'sort' => 'nullable|integer|min:0',\n 'end_worked_at' => 'nullable|date_format:\"H:i:s\"',\n 'start_worked_at' => 'nullable|date_format:\"H:i:s\"',\n ];\n break;\n case 'index':\n case 'destroy':\n case 'show':\n case 'audit':\n return [];\n break;\n }\n\n return [];\n }", "title": "" }, { "docid": "ff86fec2ae2d228a6a4bc8b4b8d2d96b", "score": "0.7361847", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'title' => 'required|max:191',\n ];\n break;\n case 'PUT':\n return [\n 'title' => 'required|max:191',\n ];\n break;\n }\n }", "title": "" }, { "docid": "899b83b112da19b76079d1d80c15c04c", "score": "0.736152", "text": "public function rules()\n {\n $rules = [];\n\n if($this->exists('search')) {\n $rules['search'] = 'required|min:2|max:20|string|regex:/(^[A-Za-z]+$)+/';\n }\n if($this->exists('kicking_foot')) {\n $rules['kicking_foot'] = 'required|in:right,left';\n }\n if($this->exists('max_transfer_cost')) {\n $rules['max_transfer_cost'] = ['required','numeric','regex:/^(?=.+)(?:[1-9]\\d*|0)?(?:\\.\\d+)?$/'];\n }\n if($this->exists('min_transfer_cost')) {\n $rules['min_transfer_cost'] = ['required','numeric','regex:/^(?=.+)(?:[1-9]\\d*|0)?(?:\\.\\d+)?$/'];\n }\n return $rules;\n }", "title": "" }, { "docid": "1ef9a232a0c61aa0bcf084ab70831a46", "score": "0.7356362", "text": "public function rules()\n {\n $rules = [];\n if (!$this->route('referrer_type')) {\n // is custom\n $rules['name'] = 'required';\n $rules['domain'] = 'required';\n $rules['background_color'] = 'required';\n $rules['text_color'] = 'required';\n }\n $rules['header'] = 'required';\n\n return $rules;\n }", "title": "" }, { "docid": "b1b4b8813699d0a65f916d02f72aafe3", "score": "0.7354389", "text": "public function rules()\n {\n $rules = array();\n\n switch ($this->method()) {\n case 'POST':\n {\n $rules['name'] = 'required|max:255';\n $rules['email'] = 'required|unique:tbladmins';\n $rules['password'] = 'required|confirmed';\n $rules['password_confirmation'] = 'required';\n $rules['file'] = 'required|image|mimes:png,jpg,jpeg,gif,svg|max:2048';\n }\n case 'PUT':\n case 'PATCH':\n {\n $rules['name'] = 'required|max:255';\n $rules['email'] = 'required|unique:tbladmins,email,'.Request::segment(3);\n $rules['file'] = 'image|mimes:png,jpg,jpeg,gif,svg|max:2048';\n }\n }\n return $rules;\n }", "title": "" }, { "docid": "91ed1e7530aad465f0fb549644726522", "score": "0.73514706", "text": "public function rules()\n {\n $rules = [\n 'region_id' => 'required_without:district_id',\n 'district_id' => 'required_without:region_id',\n 'delivery_fee' => 'required',\n ];\n\n if (request()->get('branch_type') == BranchTypes::RETAILER) {\n $rules[\"delivery_sla\"] = \"required\";\n }\n\n return $rules;\n }", "title": "" }, { "docid": "f6d45a2a26a857b1c93b9915d2e93e0a", "score": "0.7342744", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST': {\n return [\n 'entity' => '',\n 'entity_id' => '',\n 'title' => 'required|string|max:250',\n 'body' => 'required|string|max:5000',\n ];\n }\n case 'PUT': {\n return [\n 'entity' => '',\n 'entity_id' => '',\n 'title' => 'required|string|max:250',\n 'body' => 'required|string|max:5000',\n ];\n }\n }\n\n return [];\n }", "title": "" }, { "docid": "490c5ebf62753f635a6a6bd840b15654", "score": "0.7342696", "text": "public function rules()\n {\n switch ($this->routeName) {\n case 'admin.roles.store':\n return [\n 'name' => 'required|min:2|max:45',\n 'key' => 'required|max:16',\n 'description' => 'required|max:255',\n 'permissions' => 'required',\n ];\n break;\n case 'admin.roles.update':\n return [\n 'name' => 'required|min:2|max:45',\n 'description' => 'required|max:255',\n 'permissions' => 'required',\n ];\n break;\n }\n }", "title": "" }, { "docid": "9bb8128690c6170948ad7d863ebd7d68", "score": "0.7337763", "text": "public function rules()\n {\n $rules = [];\n switch($this->method())\n {\n case 'POST':\n {\n $rules = [\n 'published_at' => 'required|date',\n 'answers' => 'required|array',\n 'answers.*.question_id' => 'required|string|max:255',\n 'answers.*.answer' => 'required|min:1|max:255',\n 'answers.*.answer.*' => 'required|max:255|min:1',\n ];\n break;\n }\n case 'PUT':\n case 'PATCH':\n {\n $rules = [\n 'published_at' => 'required|date',\n 'answers' => 'required|array',\n 'answers.*.id' => 'required|string|min:1|max:255',\n 'answers.*.answer' => 'required|min:1|max:255',\n 'answers.*.answer.*' => 'required|max:255|min:1',\n ];\n break;\n }\n default: break;\n }\n \n return $rules; \n }", "title": "" }, { "docid": "2a5def87632dddc2bb617ae82ff88d4e", "score": "0.7330385", "text": "public function rules()\n {\n $actionMethod = Request::route()->getActionMethod();\n $rule = [];\n if ($actionMethod == 'store') {\n $rule = [\n 'postId' => 'required|exists:posts,id',\n 'content' => 'required',\n ];\n }\n\n if ($actionMethod == 'update') {\n $rule = [\n 'content' => 'required',\n ];\n }\n return $rule;\n }", "title": "" }, { "docid": "3c873c8d149aed22ae6ef2077619885a", "score": "0.73185223", "text": "public function rules()\n {\n return $this->_rules === null ? [] : $this->_rules;\n }", "title": "" }, { "docid": "a1ae1beb494416000c0c2393b4686ce0", "score": "0.7316206", "text": "public function rules()\n {\n return $this->calculateRule([\n 'id' => 'nullable|integer',\n 'action' => 'required|string',\n 'description' => 'required|string',\n 'user' => 'nullable|string',\n 'admin_id' => 'nullable|integer',\n 'data' => 'nullable|JSON',\n 'filter' => 'array',\n 'orderBy' => 'array',\n 'page' => 'integer',\n 'rowPerPage' => 'integer'\n ]);\n }", "title": "" }, { "docid": "d48afcf44c3426660fa1457c25f5453e", "score": "0.73149556", "text": "public function rules()\n {\n $rules = [\n 'start_station_id' => 'required',\n 'destination_station_id' => 'required',\n 'start_time' => 'required',\n 'destination_time' => 'required',\n 'phone' => 'numeric|nullable',\n 'number_preset_date' => 'required|numeric',\n 'status' => 'required',\n ];\n\n if ($this->method() == 'POST') {\n $rules['company_id'] = 'required';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "51c98012f217651b3b7014688a314ee8", "score": "0.7298893", "text": "public function rules()\n {\n $rules = array (\n 'title' => 'required',\n 'intro' => 'required',\n 'active' => 'boolean',\n 'image' => 'required|image:jpeg,jpg,png|max:5120'\n );\n\n if($this->getRequestUri() == \"/admin/homepage/website/sample/store\"){\n // Special Rule for New Sample Website Post Request\n $rules['image'] = 'required|mimes:jpeg,bmp,png,jpg';\n }\n else{\n // Special Rule for Edit Request\n $rules['image'] = 'mimes:jpeg,bmp,png,jpg';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "e68fb3c9f9b25eb1e8a1ceb172541433", "score": "0.72925806", "text": "protected function getRules()\n {\n $rules = parent::getRules();\n if($this->data['enquiryType'] == 'Product complaint') {\n\n foreach($this->additionalReqs as $name) {\n $rules[$name] = array('required');\n }\n }\n\n return $rules;\n }", "title": "" }, { "docid": "5976505195e7a9fd037f3b7e0bd05635", "score": "0.7291941", "text": "public function rules()\n {\n $rules = [\n 'date' => 'required',\n 'network_id' => 'required',\n 'quantity' => 'required',\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "e9b906baf8b5057123ea5029d9120159", "score": "0.72862774", "text": "public function rules()\n {\n $rules = [\n 'full_name' => ['required', 'max:100'],\n 'cpf' => ['required', 'size:14'],\n 'email' => ['required', 'max:100', 'email'],\n 'phone' => ['required', 'size:15'],\n 'address' => ['required', 'max:255'],\n 'number' => ['required', 'max:20'],\n 'neighborhood' => ['required', 'max:50'],\n 'city' => ['required', 'max:50'],\n 'state' => ['required', 'size:2'],\n 'zip_code' => ['required', new ValidateZipCode($this->service)],\n 'photo' => ['image'],\n ];\n\n if ($this->isMethod('post')) {\n $rules['photo'] = ['required', 'image'];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "d789f84bfb98aa994998bae293bf2665", "score": "0.7285699", "text": "public function rules() {\n $rules = [\n 'name' => 'required',\n 'user_id' => 'required',\n 'location' => 'required',\n 'category' => 'required',\n ];\n return $rules;\n }", "title": "" }, { "docid": "9d1c6a1288e2b0a7a02e88b17e7063f6", "score": "0.72797865", "text": "public function rules()\n {\n if ($this->method() == 'POST'){\n return [\n 'total' => 'required|integer|min:1',\n 'expires_at' => 'nullable|date|after_or_equal:today'\n ];\n }\n\n\n if ($this->method() == 'PUT'){\n $invitation = $this->route('link_invitation');\n return [\n 'total' => 'required|integer|min:' .$invitation->remaining,\n 'expires_at' => 'nullable|date|after_or_equal:today'\n ];\n }\n\n }", "title": "" }, { "docid": "c673c44d89d164d6a522ec09502c3baf", "score": "0.7279309", "text": "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'inviteTeacher':\n return [\n 'school_id' => ['required', 'integer', function ($attribute, $value, $fail) {\n $where = [\n ['teacher_id', Auth::id()],\n ];\n if (!School::query()->where($where)->where('status', true)->find($this->get('school_id'))) {\n return $fail('该学校不存在 或 未通过审核');\n }\n if (!SchoolTeacher::query()->where($where)->where('is_admin', true)->exists()) {\n return $fail('非管理员无权限邀请他人');\n }\n }],\n 'email' => ['required', 'email']\n ];\n case 'store':\n return [\n 'name' => ['required'],\n 'cover' => ['required']\n ];\n }\n }", "title": "" }, { "docid": "c8d5a5a341d6544c268d466816ea2a8b", "score": "0.72724587", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n case 'POST':\n return [\n 'nombre' => 'required|max:255',\n 'apellidos' => 'required|max:255',\n 'telefono' => 'required|max:9|regex:/^[0-9]+$/',\n 'doctype_id' => 'required',\n 'numdoc' => 'required|max:9|regex:/^[0-9a-zA-Z]+$/',\n 'membertype_id' => 'required',\n 'paymenttype_id' => 'required',\n 'email' => 'required|email|unique:users,email',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'nombre' => 'required|max:255',\n 'apellidos' => 'required|max:255',\n 'telefono' => 'required|max:9|regex:/^[0-9]+$/',\n 'doctype_id' => 'required',\n 'numdoc' => 'required|max:9|regex:/^[0-9a-zA-Z]+$/',\n 'membertype_id' => 'required',\n 'paymenttype_id' => 'required',\n ];\n default:\n break;\n }\n\n return [];\n }", "title": "" }, { "docid": "e9bcdc13ac45f0c6ba9ed59d680a6ab7", "score": "0.72692734", "text": "public function rules(): array\n {\n return $this->getRules();\n }", "title": "" }, { "docid": "51a8c3d87011b069d54ebc4f4ef312c8", "score": "0.7264129", "text": "public function rules()\n {\n \\Log::info('rules()');\n return [\n 'test' => 'required',\n ];\n }", "title": "" } ]
ca52014f17f3333e1f10986b5d8ba8bd
Return the Trailer object
[ { "docid": "9fafff86be75368b3bf79521b358fd27", "score": "0.6436864", "text": "public function getTrailer(): Trailer\n {\n return $this->trailer;\n }", "title": "" } ]
[ { "docid": "57f2fa928d1b2e6d972acb822c643a9c", "score": "0.5366244", "text": "public function getTrailers() {\n\t\treturn $this->_data['trailers'];\n\t}", "title": "" }, { "docid": "ff0c0ed2e76a3ff986d362ba8793aa96", "score": "0.5313904", "text": "public function get_megapiler()\n\t{\n\t\treturn $this->_megapiler;\n\t}", "title": "" }, { "docid": "bc75ad2315021778b23f3a27e23da7ec", "score": "0.51393497", "text": "public function index()\n {\n $trailers = Trailer::orderBy('id', 'DESC')\n //->where('user_id', auth()->user()->id)\n ->paginate();\n\n return view('admin.trailers.index', compact('trailers'));\n }", "title": "" }, { "docid": "454c7bea796416638a865825f9ce3f35", "score": "0.5132988", "text": "public function getTrailer()\n {\n $data = ['src' => ''];\n $get = new GetBag();\n $id = $get->fetchInt('id');\n\n if (0 < $id) {\n $result = $this->mysql()->query(\"SELECT `hd480`, `hd720`, `hd1080`, `source` FROM `trailer` WHERE `id` = {$id} LIMIT 1\");\n if ($row = $result->fetch_assoc()) {\n if (empty($data['src']) && !empty($row['hd720'])) {\n $data['src'] = $row['hd720'];\n }\n if (!empty($row['hd1080'])) {\n $data['src'] = $row['hd1080'];\n }\n if (empty($data['src']) && !empty($row['hd480'])) {\n $data['src'] = $row['hd480'];\n }\n }\n }\n\n $this->setContent(json_encode($data));\n }", "title": "" }, { "docid": "db058e295b77160e15ed67b246b4dd8f", "score": "0.5120813", "text": "public function getTariff()\n {\n if ($this->app->user->isGuest) {\n $seller = $this->app->user->seller;\n $client_id = null;\n } else {\n $seller = $this->app->user->identity->seller;\n $client_id = $this->app->user->id;\n }\n\n return $this->app->get('cache')->getOrSet([__METHOD__, $seller, $client_id], function () use ($seller, $client_id) {\n $res = Tariff::find()\n ->action('get-available-info')\n ->joinWith('resources')\n ->andFilterWhere(['type' => 'domain'])\n ->andFilterWhere(['seller' => $seller])\n ->andWhere(['with_resources' => true])\n ->all();\n\n if (is_array($res) && !empty($res)) {\n return reset($res);\n }\n\n return null;\n }, 3600);\n }", "title": "" }, { "docid": "9d1801c5da9a081b1200df8276acd267", "score": "0.5117268", "text": "public function getTraverser(): TraverserInterface;", "title": "" }, { "docid": "d77409f6f16d938c5148a85f5fc9b009", "score": "0.50919145", "text": "public function show($id)\n {\n $trailer = Trailer::find($id);\n //$this->authorize('pass', $trailer);\n return view('admin.trailers.show', compact('trailer'));\n }", "title": "" }, { "docid": "efbf9623a681a3cf20e1ced88f1a5b75", "score": "0.5045317", "text": "public function getSpotlight(){\r\n\r\n\t\t/* Prepare */\r\n\t\t$spotlight = new stdClass();\r\n\r\n\t\t/* Get data from cache or db. */\r\n\t\t$record = $this->_cache->get('blog_spotlight');\r\n\t\tif ($record === false){\r\n\t\t\t$query = \"SELECT *\r\n\t\t\t\tFROM `images` AS `i`\r\n\t\t\t\tWHERE i.imageOwner = '-2'\r\n\t\t\t\tORDER BY i.uploadDate DESC\";\r\n\t\t\t$this->_db->setQuery($query, 0, 1);\r\n\t\t\t$record = $this->_db->loadAssoc();\r\n\t\t\t$this->_cache->set('blog_spotlight', $record);\r\n\t\t}\r\n\r\n\t\t/* Set variables */\r\n\t\t$spotlight->title = $record['title'];\r\n\t\t$spotlight->description = $record['description'];\r\n\t\t$spotlight->url = $record['url'];\r\n\t\t$spotlight->image = $record['articleImageUrl'];\r\n\r\n\t\t/* Exit */\r\n\t\treturn $spotlight;\r\n\r\n\t}", "title": "" }, { "docid": "b81c46e5ccb8322a405438909c7c3fbc", "score": "0.4963646", "text": "public function getTokenizer()\r\n\t{\r\n\t\t$secret = null;\r\n\t\tswitch ($this->protocol)\r\n\t\t{\r\n\t\tcase PlaybackProtocol::HTTP:\t\t\t\r\n\t\t\tif (@$this->params['http_auth_salt'])\r\n\t\t\t{\r\n\t\t\t $storageProfile = StorageProfilePeer::retrieveByPK($this->storageProfileId);\r\n\t\t\t\tif ($storageProfile)\r\n\t\t\t\t{\r\n\t\t\t\t\t// get parameters\r\n\t\t\t\t\t$window = $this->params['http_auth_seconds'];\r\n\t\t\t\t\t$secret = $this->params['http_auth_salt'];\r\n\t\t\t\t\t$useDummyHost = false;\t\r\n\t\t\t\t\t$httpBaseUrl = rtrim($storageProfile->getDeliveryHttpBaseUrl(), '/');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase PlaybackProtocol::RTMP:\r\n\t\t\tif (@$this->params['rtmp_auth_salt'])\r\n\t\t\t{\r\n\t\t\t\t$window = $this->params['rtmp_auth_seconds'];\r\n\t\t\t\t$secret = $this->params['rtmp_auth_salt'];\r\n\t\t\t\t$useDummyHost = true; \t\r\n\t\t\t\t$httpBaseUrl = '';\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif ($secret)\r\n\t\t{\r\n\t\t\tif (is_null($window) || !is_int($window))\r\n\t\t\t{\r\n\t\t\t\t$window = self::DEFAULT_ACCESS_WINDOW_SECONDS;\r\n\t\t\t}\t\t\r\n\t\t\treturn new kMirrorImageUrlTokenizer($window, $secret, $useDummyHost, $httpBaseUrl);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "title": "" }, { "docid": "8689c1654c324938d3319b9e3ae9a011", "score": "0.49380553", "text": "public function getTraineeInstance()\n {\n if (!$this->_traineeInstance) {\n $this->_traineeInstance = Mage::getSingleton('bs_traineedoc/traineedoc_trainee');\n }\n return $this->_traineeInstance;\n }", "title": "" }, { "docid": "082115c01d8392a7326e6119ab06d15e", "score": "0.49188113", "text": "function filters() { return $this->_filters; }", "title": "" }, { "docid": "bf8fd16fafe33dd733fc02877324340b", "score": "0.49151555", "text": "public function getSpoilerAttribute() : array\n {\n return json_decode($this->attributes['spoiler'], true);\n }", "title": "" }, { "docid": "6c4adea0ba1aa2ba23d52f97aedff3d6", "score": "0.48743552", "text": "public function getFilter();", "title": "" }, { "docid": "c44b839f3c1eb3fb325193616ee2998b", "score": "0.48503852", "text": "public function index()\r\n {\r\n //\r\n //$trailer = Trailer::latest()->paginate(2);\r\n\r\n //return $this->sendResponse($trailer, 'Trailer list');\r\n $trailer = Trailer::orderBy('license_plate')->get();\r\n\r\n return response()->json($trailer);\r\n }", "title": "" }, { "docid": "b82e4d6b306c299ef0b0aa64e70a26bb", "score": "0.48044413", "text": "public static function getFilter()\n { \n // get session\n // session('key');\n // session('direction');\n\n // default\n return (object) [\n 'key' => 'votes',\n 'direction' => 'desc'\n ];\n }", "title": "" }, { "docid": "6ae69298a217aa38966018fcb66cabec", "score": "0.47830313", "text": "public function getFiler($attribute)\n {\n return $this->filers[$attribute];\n }", "title": "" }, { "docid": "7466dd2297be2170a229c923cb016f99", "score": "0.47733682", "text": "public function getTrailer()\n {\n return $this->trailer;\n }", "title": "" }, { "docid": "c6be8e069fcc8c0ca6356a32a6ac0d99", "score": "0.47731453", "text": "public function getTrailer() {\n\t\t$trailers = $this->getTrailers();\n\t\t//var_dump($trailers);\n\t\ttry{\n\t\t\treturn $trailers['youtube'][0]['source'];\n\t\t}catch(Exception $e){}\n\t}", "title": "" }, { "docid": "c443f141731792e300d5539027f96019", "score": "0.47527653", "text": "public function crawler(): Crawler\n {\n return $this->crawler;\n }", "title": "" }, { "docid": "647d38f14264e090723585e3f72670b9", "score": "0.47507393", "text": "public function getCrawler();", "title": "" }, { "docid": "25b75a3ee25fdc45e6e1369d96ca9e7f", "score": "0.47328418", "text": "public function getRiders()\n {\n $element = new Lib_Form_Element_Riders('riders', $this->_object);\n $element->setLabel(ucfirst(Globals::getTranslate()->_('riders')))\n ->addPrefixPath('Lib_Filter', 'Lib/Filter', 'Filter')\n ->addFilter('HTMLPurifier');\n return $element;\n }", "title": "" }, { "docid": "7b0ef5593f8b910a99597a194cec05f4", "score": "0.4709948", "text": "public function build() {\n return new \\Bonder\\Filters\\CrafterFilterChainProvider(\n $this->controllerProviderBuilder->build(), \n $this->filtersProviderBuilder->build());\n }", "title": "" }, { "docid": "b6bc6587e6ab7f5480416bf0a1c02918", "score": "0.47098413", "text": "protected function getFilters(){\n $inputFilter = new InputFilter();\n \n return $inputFilter;\n }", "title": "" }, { "docid": "ecbad52e9ea07fe3e3304bdddfab03d6", "score": "0.47091782", "text": "public function getTokenizer()\n {\n if (!isset($this->tokenizer)) {\n $this->tokenizer = new Mustache_Tokenizer();\n }\n\n return $this->tokenizer;\n }", "title": "" }, { "docid": "9ebe8dce2542ce8ad23df8c0c2524fd0", "score": "0.469983", "text": "function chain(Reader $reader) {\n $newFilter = new MustacheRender($reader);\n $newFilter->setParams($this->getParams());\n $newFilter->setInitialized(true);\n $newFilter->setProject($this->getProject());\n return $newFilter;\n }", "title": "" }, { "docid": "812f1bf8ff99d4e6fec030b0f92c8c18", "score": "0.46697342", "text": "public function getDecoratedObject()\n {\n return $this->_object;\n }", "title": "" }, { "docid": "3d4b8ce2f6246b4328f79bf89f3156a8", "score": "0.46615145", "text": "public function getTraiteEditer() {\n return $this->traiteEditer;\n }", "title": "" }, { "docid": "1ed7312c29ffa8a9e441b46fa9975e3f", "score": "0.46575132", "text": "protected function getFilters(){\n $inputFilter = new InputFilter();\n return $inputFilter;\n }", "title": "" }, { "docid": "faa38cca1baea36ac511b2495973afdf", "score": "0.46516898", "text": "public function filter()\n {\n $filter = resolve(FilterInterface::class);\n return $this->belongsTo(get_class($filter), 'filter_id', $filter->getIdPropertyName());\n }", "title": "" }, { "docid": "2396108947952d810501a7a95af8365b", "score": "0.46327955", "text": "public function getWatchlist()\n {\n return $this->watchlist;\n }", "title": "" }, { "docid": "6171dcf8fc8eddff63c2551ada878cc9", "score": "0.46288466", "text": "public function getTrails()\n {\n return static::hasMany(AuditTrail::className(), ['entry_id' => 'id']);\n }", "title": "" }, { "docid": "9f37539f801cf9e3304173456e11a9c7", "score": "0.46281564", "text": "public function filters()\n {\n }", "title": "" }, { "docid": "681154cbe914ed544a2b82dc80c600f6", "score": "0.4622998", "text": "public function getSmartfilters();", "title": "" }, { "docid": "7baae746949511dd429d2c383ea1a588", "score": "0.46180642", "text": "private function getDocBlockFilter()\n {\n return DocBlockGenerator::fromArray([\n 'shortDescription' => 'Filter for Entity Categoria',\n 'longDescription' => 'This is a class generated with Generator for skeleton-zend. By Diego-Mi'\n ]);\n }", "title": "" }, { "docid": "378ae1f0e23afccbd5d7c5c9c4eda78d", "score": "0.46077654", "text": "protected function createNewFilter() {\n\t\treturn new SimpleEntityFilter();\n\t}", "title": "" }, { "docid": "77b63bf8a3013f47de4a85a950a69f5a", "score": "0.46066704", "text": "public function filterChain()\n {\n return $this->_filter;\n }", "title": "" }, { "docid": "e42f7b41085f0ac9ac4bc69a8a0ed88c", "score": "0.46019396", "text": "function &getFirstFilter()\n {\n return $this->headFilter;\n }", "title": "" }, { "docid": "a2ad353f23db57b5d69c7cafc57436c2", "score": "0.45944685", "text": "private function listingController($data) {\n return ($data[\"disableCache\"] ? GetRETS::getRETSListing() : GetRETS::getListing());\n }", "title": "" }, { "docid": "d7645abd658a4bb4470267d9ee96da90", "score": "0.45813945", "text": "public function getViewers()\n {\n return $this->hasMany('App\\Viewer', 'user_id', 'id');\n }", "title": "" }, { "docid": "f8dcf26b2877e991ad1212a687b7fde0", "score": "0.45807275", "text": "public function index()\n {\n if (\\Gate::allows('isAdmin') || \\Gate::allows('isAuthor')) {\n return Trainer::latest()->with('user')->with('company')->paginate(10);\n\n }\n }", "title": "" }, { "docid": "5bc77495c0150217d11db7c1bacce75e", "score": "0.45709494", "text": "public function getFilteredRequests();", "title": "" }, { "docid": "a68aeb6f48fe305fbb71806cdff0420e", "score": "0.45675257", "text": "public function getListData()\n { \n $result = new \\stdClass();\n\n if(isset($this->listFilter['search']) && $this->listFilter['search'] != '')\n {\n\n /* Put listing query with search here.. */\n\n $searchby = $this->listTableHead[ $this->listFilter['searchby'] ]['tableName'].'.'.$this->listTableHead[ $this->listFilter['searchby'] ]['tableField'];\n\n $response = $this->client->post('transaction/settlement/get/list',\n [\n 'json' => [\n 'page' => $this->listFilter['page'] != null ? $this->listFilter['page'] : 1,\n 'perpage' => $this->listFilter['perpage'],\n 'filter' => [\n \"lower(\".$searchby.\")\" => [\n 'like' => '%'.strtolower($this->listFilter['search']).'%'\n ]\n ]\n ],\n 'headers' => [\n 'Accept' => 'application/json',\n 'x-access-token' => $this->getToken()\n ]\n ]\n );\n\n $result->dataQuery = json_decode($response->getBody());\n\n }else{\n\n /* Put listing query without search word here.. */\n $response = $this->client->post('transaction/settlement/get/list', \n [\n 'json' => [\n 'page' => $this->listFilter['page'] != null ? $this->listFilter['page'] : 1,\n 'perpage' => $this->listFilter['perpage']\n ],\n 'headers' => [\n 'Accept' => 'application/json',\n 'x-access-token' => $this->getToken()\n ]\n ]\n );\n\n $result->dataQuery = json_decode($response->getBody());\n }\n\n return $result;\n \n }", "title": "" }, { "docid": "4bfffe80dad8c835d854dff09511d578", "score": "0.45574722", "text": "protected function getExtendingFilterMock()\n {\n $filter = new Tx_PtExtlist_Tests_Domain_Model_Filter_Stubs_FilterStub('testFilter');\n return $filter;\n }", "title": "" }, { "docid": "5750f13a60d68ab16972e8f88d73cf23", "score": "0.4550283", "text": "public function get_editor_object()\n {\n // check updater first\n if (in_array('updated_by', $this->metadata_fields) and $this->updated_by) {\n return $this->get_updater_object();\n }\n\n // use inserter\n return $this->get_inserter_object();\n }", "title": "" }, { "docid": "29d6cf95a2b76a04c0532eb47e76e93e", "score": "0.45469916", "text": "function getFilter()\n\t{\n\t\treturn $this->_filter;\n\t}", "title": "" }, { "docid": "8c2a740599049ecfcdd5004a9f4a5d81", "score": "0.45469093", "text": "public function getList() {\n /** @var DataList $list */\n $list = parent::getList();\n $classes = array(\n 'ElementLink',\n 'ElementLinkGroup',\n );\n\n if(in_array($this->modelClass, $classes) && class_exists('Subsite')) {\n $list = $list->filter('SubsiteID', Subsite::currentSubsiteID());\n }\n\n return $list;\n }", "title": "" }, { "docid": "0f4b0a82fa65287ec163045041592bc7", "score": "0.45399466", "text": "public function current()\n {\n if ($this->getFlags() & WebFilesystemIterator::CURRENT_AS_WEBFILEINFO) {\n /*\n if ($this->isLink()) {\n return new WebFileInfo($this->getPathname());\n } else {\n $realpath = $this->getRealPath();\n $path = $this->getPathname();\n return new WebFileInfo($path, str_replace($path, '', $realpath));\n }\n*/\n return new WebFileInfo(\n DirectoryHelper::slashDirname($this->original_path).$this->getFilename()\n );\n }\n return parent::current();\n }", "title": "" }, { "docid": "5c6b4da436df83a2a641d0012fc7c314", "score": "0.45331582", "text": "function trainer_view()\n {\n $ob = new model();\n $show_trainer=$ob->trainer_view_sql();\n return $show_trainer;\n }", "title": "" }, { "docid": "5c6b4da436df83a2a641d0012fc7c314", "score": "0.45331582", "text": "function trainer_view()\n {\n $ob = new model();\n $show_trainer=$ob->trainer_view_sql();\n return $show_trainer;\n }", "title": "" }, { "docid": "96ed42614433faf6ae7c5bf73ec369b2", "score": "0.45317823", "text": "public function getDecoratableObject();", "title": "" }, { "docid": "b81548d27680b5ad7cee686e176a22a1", "score": "0.45305872", "text": "public function get_importers_instance() {\n\t\treturn $this->importers;\n\t}", "title": "" }, { "docid": "de25fec015a990d3adb4936f102f206e", "score": "0.45193487", "text": "public function getFilters() {\n return [\n // compatibility with fractal path\n new \\Twig_SimpleFilter('path', [$this, 'path']), \n // remove HTML comments from markup\n new \\Twig_SimpleFilter('nocomment', [$this, 'removeHtmlComments']),\n // an alternate image style (from https://www.drupal.org/files/issues/twig_image_style-2361299-31.patch)\n new \\Twig_SimpleFilter('resize', [$this, 'getImageFieldWithStyle']),\n // smart truncate\n new \\Twig_SimpleFilter('smarttrim', [$this, 'smartTrim']),\n // get an alias for an entity\n new \\Twig_SimpleFilter('alias', [$this, 'entityAlias']),\n // check if a view has any content\n new \\Twig_SimpleFilter('has_rows', [$this, 'viewHasRows']),\n // remove empty items from an array\n new \\Twig_SimpleFilter('array_filter', 'array_filter'),\n // remove duplications from an array\n new \\Twig_SimpleFilter('array_unique', 'array_unique'),\n // run the builder on an entity\n new \\Twig_SimpleFilter('entity_view', [$this, 'entityView']),\n // run builder on a field\n new \\Twig_SimpleFilter('field_view', [$this, 'fieldView']),\n // html_decode_entities\n new \\Twig_SimpleFilter('unescape', [$this, 'unescape']),\n // child elements\n new \\Twig_SimpleFilter('children', [$this, 'children']),\n // social media matcher\n new \\Twig_SimpleFilter('matchsocial', [$this, 'socialMatcher']),\n // convert a list of rendered links to a link = { url: '', title = '' }\n new \\Twig_SimpleFilter('linkobjects', [$this, 'linkObjects']),\n // inject a class in a render array\n new \\Twig_SimpleFilter('injectclass', [$this, 'injectClass']),\n // inject an attribute\n new \\Twig_SimpleFilter('set_attr', [$this, 'setAttr']),\n // attribute splitter\n new \\Twig_SimpleFilter('attr_list', [$this, 'attrList']),\n // data splitter\n new \\Twig_SimpleFilter('data_list', [$this, 'dataList']),\n // array reorganization\n new \\Twig_SimpleFilter('remap', [$this, 'remap']),\n // remap the item.content format of a field into an array of children\n new \\Twig_SimpleFilter('itemcontent', [$this, 'itemContent']),\n // fetch field values from a reference field (like get term names from a reference field)\n new \\Twig_SimpleFilter('map_entity_field', [$this, 'mapEntityField']),\n // sort an entity reference by values on the target entity\n new \\Twig_SimpleFilter('sort_entity_field', [$this, 'sortEntityField']),\n // striptags, but on a render array key\n new \\Twig_SimpleFilter('striptags_key', [$this, 'striptagsKey']),\n // wrap output in a particular tag\n new \\Twig_SimpleFilter('tagwrap', [$this, 'tagwrap'], ['is_safe' => ['html']]),\n // change a view mode for an entity\n new \\Twig_SimpleFilter('viewmode', [$this, 'changeViewMode']),\n // hide label in a render array\n new \\Twig_SimpleFilter('hidelabel', [$this, 'hideLabel']),\n // build a full_html markup build\n new \\Twig_SimpleFilter('full_html', [$this, 'fullHtml']), \n // extract media source\n new \\Twig_SimpleFilter('image_src', [$this, 'imageSrc']),\n // Format a date, but only if the date is numeric first\n new \\Twig_SimpleFilter('safely_format_date', [$this, 'safelyFormatDate']),\n // Change the view mode of children in an array, useful for cases\n // where there are options on how to view embedded paragraphs.\n new \\Twig_SimpleFilter('change_view_modes', [$this, 'changeViewModes']),\n // Convert text to a machine name using the same strategy as the Pomona Fractal implementation\n new \\Twig_SimpleFilter('machine_name', [$this, 'machineName'])\n ];\n }", "title": "" }, { "docid": "f00e32eb893ff27fac9568c73cdf1d61", "score": "0.4517983", "text": "private function listifyList()\n {\n $model = new self();\n $model->setListifyConfig('scope', $this->scopeCondition());\n\n return $model->listifyScope();\n }", "title": "" }, { "docid": "0dfc4cc30fddd49c053a370eebbb2af0", "score": "0.4517402", "text": "public function getInstanceFilter()\n {\n return $this->instance_filter;\n }", "title": "" }, { "docid": "f615e19468169797a494d5247eeb62b3", "score": "0.45058563", "text": "public function filterable()\n {\n return $this->morphTo();\n }", "title": "" }, { "docid": "1c328402fcf7e2891ab78552feb86666", "score": "0.45008847", "text": "public static function getObject()\r\n {\r\n return new HDChain(self::getJson());\r\n }", "title": "" }, { "docid": "cdc7712fc787e7662675853ffe9feeeb", "score": "0.4500043", "text": "public function cached() {\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "da8b1718a02ecf70b68e0e40d6e976f1", "score": "0.4494263", "text": "public function setTrailer($trailer)\n {\n $this->trailer = $trailer;\n\n return $this;\n }", "title": "" }, { "docid": "6c4a6c3122910fee1748119f717363bf", "score": "0.44935158", "text": "public function retrieveMetadetail()\n {\n $metadetails = collect((new MetadetailService)->find('type',['site_url','dir_images','analytics_code','analytics_anonymize_ip','site_name']));\n // cache included\n $this->cacheAsEntities($metadetails->get('included',[]));\n // return as collections\n return (new LaravelCollection($metadetails->get('data', [])))->map(function($item){\n return new LaravelCollection($item);\n });\n }", "title": "" }, { "docid": "3d863680a2b8428c94ea8621310049ec", "score": "0.44856548", "text": "public function getObject()\n {\n return $this->object;\n }", "title": "" }, { "docid": "3d863680a2b8428c94ea8621310049ec", "score": "0.44856548", "text": "public function getObject()\n {\n return $this->object;\n }", "title": "" }, { "docid": "3d863680a2b8428c94ea8621310049ec", "score": "0.44856548", "text": "public function getObject()\n {\n return $this->object;\n }", "title": "" }, { "docid": "3d863680a2b8428c94ea8621310049ec", "score": "0.44856548", "text": "public function getObject()\n {\n return $this->object;\n }", "title": "" }, { "docid": "3d863680a2b8428c94ea8621310049ec", "score": "0.44856548", "text": "public function getObject()\n {\n return $this->object;\n }", "title": "" }, { "docid": "3d863680a2b8428c94ea8621310049ec", "score": "0.44856548", "text": "public function getObject()\n {\n return $this->object;\n }", "title": "" }, { "docid": "3d863680a2b8428c94ea8621310049ec", "score": "0.44856548", "text": "public function getObject()\n {\n return $this->object;\n }", "title": "" }, { "docid": "3d863680a2b8428c94ea8621310049ec", "score": "0.44856548", "text": "public function getObject()\n {\n return $this->object;\n }", "title": "" }, { "docid": "3d863680a2b8428c94ea8621310049ec", "score": "0.44856548", "text": "public function getObject()\n {\n return $this->object;\n }", "title": "" }, { "docid": "d9d480cd5f5f2eebf6d8a8cff2073c23", "score": "0.44838044", "text": "public function trails() {\r\n\t\treturn $this->belongsToMany('Trail', 'media_trail', 'media_id', 'trail_id');\r\n\t}", "title": "" }, { "docid": "cb72b46ab67bfb28ffe4b6d472d420d1", "score": "0.44825462", "text": "public function seoTagsProvider()\n {\n return new CsvFileIterator(self::SEO_FILE_CSV);\n }", "title": "" }, { "docid": "dd81efd70877f4a9fbee8e60cfd1b8d7", "score": "0.44824916", "text": "public function getFilter()\r\n {\r\n return $this->filter;\r\n }", "title": "" }, { "docid": "1e40551bb389f4aff23bdb7531205d5d", "score": "0.44808018", "text": "private function cache()\n {\n return $this->cache;\n }", "title": "" }, { "docid": "b9a62daf19cf8a49843684fc46b4b8a1", "score": "0.44806078", "text": "public function trailerUrl($index=0){\n\n\t\t$trailers = $this->get('trailers');\n\t\tif(empty($trailers)) return false;\n\n\t\t$trailers = explode(\"\\n\", trim($trailers));\n\n\t\tforeach($trailers as $n => $e){\n\t\t\t$trailers[$n] = new Trailer($e);\n\t\t}\n\n\t\treturn (func_num_args() == 0) ? $trailers : $trailers[$index];\n\t}", "title": "" }, { "docid": "458f56a079c7d1f8a5db9581ac5d5a66", "score": "0.4473031", "text": "public function mine()\n {\n return \\Auth::user()->requests->load(['artist']);\n }", "title": "" }, { "docid": "8e51e3699c2110a9ba5947031a17c0af", "score": "0.4471678", "text": "public function filter()\n {\n $limit = request()->input('limit', 15);\n $model = $this->paginate($limit);\n\n return $model;\n }", "title": "" }, { "docid": "1acf89f7ecf5a789f09d78a08197e7be", "score": "0.44670308", "text": "function &singleton ()\n {\n\t\tstatic $instance;\n\n if (! isset($instance)) {\n $instance = new FilterChain;\n }\n\n return $instance;\n }", "title": "" }, { "docid": "012d6f962a4528c0e3a4838810e7eb1f", "score": "0.44602916", "text": "function Shibbir_Listing() {\n return Shibbir_Listing::init();\n}", "title": "" }, { "docid": "a1d0bea1e1c7113d95f9c88f81422324", "score": "0.4458411", "text": "function readTrailers() {\n\t\t$query = \"SELECT * FROM \" . $this->table_name;\n\n // prepare query statement\n\t\t$stmt = $this->conn->prepare( $query );\n\n\t\t// execute query\n\t\t$stmt->execute();\n\n\t\t// return values\n\t\treturn $stmt;\n }", "title": "" }, { "docid": "44bfb19d9655aa3543d15341ac898d59", "score": "0.4456266", "text": "public function Get(){\n $currentAbsPath = $this->rootPath;\n $currentAbsPath .= empty($this->currentPath) ? '' : $this->currentPath;\n return $this->GetFilteredFileList($currentAbsPath);\n }", "title": "" }, { "docid": "95ceaf0237ad093386bec8afda8dd47d", "score": "0.44562572", "text": "private function GetFilterData()\n {\n // If we have the data alread, just return it\n if($this->filter_data !== null)\n return $this->filter_data;\n \n // Otherwise look it up\n $url = new URL();\n $url->SetCategory('filters');\n $url->AddID($this->filter_id);\n \n $this->filter_data = API::GetJSON($url);\n return $this->filter_data;\n }", "title": "" }, { "docid": "26d1f10c9065ed3f623b7d82cb19e2e0", "score": "0.44555238", "text": "public static function getInstance() {\n if(self::$instance === NULL) self::$instance = new tx_tendflickr();\n return self::$instance;\n }", "title": "" }, { "docid": "cd63430012d17101d6d3d5c18d1636d4", "score": "0.44507724", "text": "public function getObject(){\r\n return $this->obj;\r\n }", "title": "" }, { "docid": "9dcb081bd4a4d3b1ea9b815e686226af", "score": "0.44502294", "text": "public function cleanCache()\n\t{\n\t\treturn (self::$_capture_tags) ? $this : parent::cleanCache();\n\t}", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.44493118", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.44493118", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.44493118", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.44493118", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.44493118", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.44493118", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.44493118", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.44493118", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.44493118", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.44493118", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.44493118", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.44493118", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "fc51cad83d42682b1ec94d28f01d13b8", "score": "0.44442698", "text": "public function getObject();", "title": "" }, { "docid": "fc51cad83d42682b1ec94d28f01d13b8", "score": "0.44442698", "text": "public function getObject();", "title": "" }, { "docid": "dfdf45d45e24b81b57c1fdee53c64fe6", "score": "0.44382015", "text": "protected function getContentFilter()\n {\n return null;\n }", "title": "" }, { "docid": "acf49a5ebf7665b134f94719dd4deac0", "score": "0.44377285", "text": "protected function _loadModel()\n {\n $this->setFilter(Mage::getModel('extrarestful/api2_block_filter', $this));\n return parent::_loadModel();\n }", "title": "" }, { "docid": "a6ddd8d089ff5a9b3e42441c297e8809", "score": "0.44369048", "text": "public function getFilter()\n\t{\n\t return $this->filter;\n\t}", "title": "" } ]
7b9c03370e88de7f45dbfafcfa5feea8
Show the most spent
[ { "docid": "e430e60b338225b9009c1757b0f24f63", "score": "0.6758149", "text": "function ssi_smfg_mostSpent($title=1, $limit=5, $output_method = 'echo')\n{\n global $smfgSettings, $txt, $scripturl, $db_prefix, $modSettings; \n \n // Load garage settings\n loadSmfgConfig();\n loadLanguage('Garage');\n \n $output = '';\n \n $output .= '\n <div style=\"width: 100%;\">';\n if($title) $output .= '<div style=\"margin-bottom: 2px;\">\n <h3 style=\"margin: 0; font-size: 1em; padding: 5px;\">'.$txt['smfg_most_spent2'].'</h3>';\n \n // *************************************************************\n // WARNING: The query check is being disabled to allow for the following subselect.\n // It is imperative this is turned back on for security reasons.\n // *************************************************************\n $modSettings['disableQueryCheck'] = 1;\n // *************************************************************\n \n // Get the five vehicles with the most money spent\n // Get the VIDs first\n $request = db_query(\"\n SELECT v.id, IFNULL(m.total_mods,0) + IFNULL(s.total_service,0) AS total_spent\n FROM {$db_prefix}garage_vehicles AS v\n LEFT OUTER JOIN (\n SELECT vehicle_id, SUM(price) + SUM(install_price) AS total_mods\n FROM {$db_prefix}garage_modifications AS m1, {$db_prefix}garage_business AS b, {$db_prefix}garage_products AS p\n WHERE m1.manufacturer_id = b.id\n AND m1.product_id = p.id\n AND b.pending != '1'\n AND m1.pending != '1'\n AND p.pending != '1'\n GROUP BY vehicle_id) AS m ON v.id = m.vehicle_id\n LEFT OUTER JOIN (\n SELECT vehicle_id, SUM(price) AS total_service\n FROM {$db_prefix}garage_service_history AS s1, {$db_prefix}garage_business AS b1\n WHERE s1.garage_id = b1.id\n AND b1.pending != '1'\n GROUP BY vehicle_id) AS s ON v.id = s.vehicle_id, {$db_prefix}garage_makes AS mk, {$db_prefix}garage_models AS md\n WHERE v.make_id = mk.id\n AND v.model_id = md.id\n AND mk.pending != '1'\n AND md.pending != '1'\n AND v.pending != '1'\n GROUP BY total_spent\n ORDER BY total_spent DESC\n LIMIT 0, \".$limit,__FILE__,__LINE__);\n $count = 0;\n while($row = mysql_fetch_row($request)) {\n list($context['most_spent'][$count]['id'],\n $context['most_spent'][$count]['total_spent']) = $row;\n $context['most_spent'][$count]['total_spent'] = number_format($context['most_spent'][$count]['total_spent'], 2, '.', ','); \n // Now collect data for each vehicle\n $request2 = db_query(\"\n SELECT v.user_id, CONCAT_WS( ' ', v.made_year, mk.make, md.model), u.realName, c.title AS currency\n FROM {$db_prefix}garage_vehicles AS v, {$db_prefix}garage_makes AS mk, {$db_prefix}garage_models AS md, {$db_prefix}garage_currency AS c, {$db_prefix}members AS u\n WHERE v.id = \".$context['most_spent'][$count]['id'].\"\n AND v.user_id = u.ID_MEMBER\n AND v.make_id = mk.id\n AND v.model_id = md.id\n AND v.currency = c.id\",__FILE__,__LINE__);\n list($context['most_spent'][$count]['user_id'],\n $context['most_spent'][$count]['vehicle'],\n $context['most_spent'][$count]['memberName'],\n $context['most_spent'][$count]['currency']) = mysql_fetch_row($request2);\n mysql_free_result($request2);\n \n $output .= '\n <div class=\"smalltext\"><a href=\"'.$scripturl.'?action=garage;sa=view_vehicle;VID='.$context['most_spent'][$count]['id'].'\">'.$context['most_spent'][$count]['vehicle'].'</a></div>\n <div class=\"smalltext\">'.$txt['smfg_owner'].': <b><a href=\"'.$scripturl.'?action=profile;u='.$context['most_spent'][$count]['user_id'].'\">'.$context['most_spent'][$count]['memberName'].'</a></b></div>\n <div class=\"smalltext\">'.$txt['smfg_total'].': <b>'.$context['most_spent'][$count]['total_spent'].' '.$context['most_spent'][$count]['currency'].'</b></div>';\n \n $count++;\n\n if ($count < $limit) $output .= '<hr />';\n }\n mysql_free_result($request);\n \n // *************************************************************\n // WARNING: The query check is being enabled, this MUST BE DONE!\n // *************************************************************\n $modSettings['disableQueryCheck'] = 0;\n // *************************************************************\n \n if($title) $output .= '</div>';\n $output .= '</div>';\n \n if($output_method == 'echo') echo $output;\n else if($output_method == 'array') return $context['most_spent'];\n}", "title": "" } ]
[ { "docid": "117bec554d3d0d457f6723606a28f8d6", "score": "0.6053574", "text": "public function top(){\n\t\t$data = DB::table('teams_stats')\n\t\t->select(DB::raw('name, goals_for - goals_against AS goal_difference'))\n\t\t->orderBy('goal_difference', 'desc')\n\t\t->get();\n\t\treturn response()->json($data);\t\n\t}", "title": "" }, { "docid": "79c25f8e843ea00bb6e99cd54ec3468e", "score": "0.5983072", "text": "public function getTopRated();", "title": "" }, { "docid": "edf092ac33e38904ec42574d90af8ff1", "score": "0.59479266", "text": "function shd_stats_most()\n{\n\tglobal $smcFunc;\n\n\t$actions = array(\n\t\tTICKET_STATUS_NEW => array('newticket'),\n\t\tTICKET_STATUS_CLOSED => array('resolve')\n\t);\n\n\t$most = array(\n\t\tTICKET_STATUS_NEW => array(0, 0),\n\t\tTICKET_STATUS_CLOSED => array(0, 0),\n\t);\n\n\tforeach ($actions as $action)\n\t{\n\t\t$request = $smcFunc['db_query']('', '\n\t\t\tSELECT COUNT(la.id_ticket) AS count, t.status, log_time\n\t\t\tFROM {db_prefix}helpdesk_log_action AS la\n\t\t\t\tINNER JOIN {db_prefix}helpdesk_tickets AS t ON (la.id_ticket = t.id_ticket)\n\t\t\tWHERE la.action IN ({array_string:actions})\n\t\t\tGROUP BY unix_timestamp() - log_time < {int:24hrs} AND unix_timestamp() - log_time + {int:24hrs} > 0\n\t\t\tORDER BY count DESC\n\t\t\tLIMIT 1',\n\t\t\tarray(\n\t\t\t\t'actions' => $action,\n\t\t\t\t'24hrs' => 86400,\n\t\t));\n\n\t\twhile ($row = $smcFunc['db_fetch_assoc']($request))\n\t\t\t$most[$row['status']] = array($row['count'], $row['log_time']);\n\t\t$smcFunc['db_free_result']($request);\n\t}\n\n\treturn $most;\n}", "title": "" }, { "docid": "05efab1215c4bfb4d30f64234737812a", "score": "0.57095706", "text": "public function showLastStats()\n {\n /** @var User $user */\n $user = $this->getUser();\n /** @var Survey $survey */\n $survey = $user->getUserSurveys()->last()->getSurvey();\n /** @var Collection|SurveyQuestion[] $questions */\n $questions = $survey->getQuestions();\n $questionsStat = [];\n $questionsStat2 = [];\n foreach ($questions as $question) {\n $questionsStat[$question->getId()] = $this->getDoctrine()->getRepository(SurveyAnswer::class)\n ->getAnswersMeanValue($question);\n $questionsStat2[$question->getId()] = $this->getDoctrine()->getRepository(SurveyAnswer::class)\n ->getStatsByValues($question);\n }\n\n return $this->render('main/stats.html.twig', [\n 'survey_name' => $survey->getName(),\n 'questions' => $questions,\n 'dataset' => implode(\",\", $questionsStat),\n 'dataset2' => $questionsStat2,\n ]);\n\n }", "title": "" }, { "docid": "31b817fb879bb1858445c5a780512b2d", "score": "0.56974095", "text": "public function actionTop()\n {\n $listado = TopValoraciones::find()\n ->orderBy('avg DESC, totales DESC');\n $pages = new Pagination([\n 'totalCount' => $listado->count(),\n 'pageSize' => 10,\n ]);\n\n $models = $listado->offset($pages->offset)\n ->limit($pages->limit)\n ->all();\n\n return $this->render('top', [\n 'listado' => $models,\n 'pages' => $pages\n ]);\n }", "title": "" }, { "docid": "38d8a56923ebe49ed90d93e411688172", "score": "0.5664653", "text": "function report_for_human() {\n $new_tr_count = count($this->collection);\n $report = \"$new_tr_count transactions\";\n /*\n $grouped = EbayTransactionHelper::group_by_itemid($this->collection);\n print_r($grouped);\n foreach($grouped as $itemid=>$TransactionsArray) {\n $item_title = $TransactionsArray[0]->Item->title;\n $item_trs_count = count($TransactionsArray);\n $report .= \", $item_title: $item_trs_count\";\n }*/\n return $report;\n }", "title": "" }, { "docid": "4c269b10fd8dc7d9165c760fff9f0a90", "score": "0.561837", "text": "private function showUsedTime() {\n\t\t// make sure we are logged in\n\t\tif (!$_SESSION['logged'])\n\t\t\treturn;\n\n\t\t$user_id = $_SESSION['uid'];\n\t\t$manager = SapphireWavesManager::getInstance();\n\n\t\t// get data for user\n\t\t$data = $manager->getSingleItem(\n\t\t\t\t\t\t\t\t$manager->getFieldNames(),\n\t\t\t\t\t\t\t\tarray('user' => $user_id)\n\t\t\t\t\t\t\t);\n\n\t\tif (is_object($data)) {\n\t\t\tprint gmdate('z', $data->total_time).'d '.gmdate('H:i:s', $data->total_time);\n\n\t\t} else {\n\t\t\tprint '0d 00:00:00';\n\t\t}\n\t}", "title": "" }, { "docid": "f502b90f68532537222303bbe87ed6bf", "score": "0.56047976", "text": "public function total_topup()\n {\n $this->db->select_sum('nominal');\n $this->db->where('status_bayar', 'Success');\n $query = $this->db->get('topup');\n if ($query->num_rows() > 0) {\n return $query->row()->nominal;\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "19fe9fefb059bac6cc0e3886cf08c0ce", "score": "0.55445147", "text": "function getTopScore (){\nreturn 4;\n}", "title": "" }, { "docid": "2105350780416531bd52d133add53db2", "score": "0.5505158", "text": "function getMostPopularItem(){\n if( !isset($_COOKIE['orders'])){\n return;\n };\n $orderedItems = (explode(',', $_COOKIE['orders']));\n $vals = array_count_values($orderedItems); //Counts all the (same) values of an array\n\n $mostPopularItem = '';\n $highestRate = 0;\n foreach ($vals as $key => $val){\n\n if ($val > $highestRate){\n $highestRate = $val;\n $mostPopularItem = $key;\n\n }\n }\n\n return '<h5 class=\"popular-order\"> Most popular item, you have odered is: ' .$mostPopularItem . '.</h5>\n <h5 class=\"popular-order\">You have ordered it '. $highestRate .' times. </h5>';\n\n\n}", "title": "" }, { "docid": "0fa1c8e9e02ae11c3cb5c5ca42ab9218", "score": "0.55017", "text": "public function newsMostPopular()\n {\n $sth = Database::getInstance()->prepare('SELECT n.title, n.id, COUNT( * ) as occurrence FROM news as n LEFT JOIN comments as cm ON n.id = cm.id_news GROUP BY n.id ORDER BY occurrence DESC LIMIT 1');\n if ($sth->execute()) {\n $count = $sth->fetch(PDO::FETCH_OBJ);\n if ($count) {\n $this->idNewsMostPopular = $count->id;\n $this->titleNewsMostPopular = $count->title;\n $this->countNewsMostPopular = $count->occurrence;\n }\n }\n }", "title": "" }, { "docid": "27912112f26d4f88a7dacaf99631a858", "score": "0.5497017", "text": "public function getTop($amount = 10) {\n $date = $this->mostRecent(time());\n\n return $this->getCharts(self::CHART, $date, $amount);\n }", "title": "" }, { "docid": "e3f68a130d15ad9eb7a1fbad8947b66d", "score": "0.54835105", "text": "function getTopTen()\n {\n $members = PlResult::getTopTen();\n return view('result/leader-list',['members' => $members]);\n }", "title": "" }, { "docid": "1d8e664d580c7cfbfa413f278b952700", "score": "0.5463045", "text": "public function getDisplayAmount();", "title": "" }, { "docid": "93b8f9c072ca18a1135373a86148d10e", "score": "0.54553396", "text": "public function displayTopCard(): string\n {\n return 'Top cards is: '.$this->getTopCard()->display().'<br>';\n }", "title": "" }, { "docid": "5356dfc337a71afba9028a266bba949a", "score": "0.5449834", "text": "public function topRanking()\n {\n $objRanking = new RankingDAO();\n $objRanking->selectRanking();\n }", "title": "" }, { "docid": "145bf5efbedc1018a18f7a1304b2dbac", "score": "0.5424685", "text": "private function summary()\n {\n $summary = new Summary();\n $summary = $summary->findSummaryAuth();\n $text = empty($summary) ? \"\" : \"<br><br><strong>Resumo</strong><br>\"; \n $text .= empty($summary->description) ? '' : ' '.$summary->description;\n return $text;\n }", "title": "" }, { "docid": "9b20e004c69c9f308b9ad536fbd1f49c", "score": "0.5406496", "text": "public function getAmountDisplay();", "title": "" }, { "docid": "f14f042020c528fceda4414ec35d24e1", "score": "0.5406489", "text": "public function mostPopularSnack(){\n\n $orders = Order::select(DB::raw('count(*) as Frequency, snack_id'))\n //->where('status', 'SUCCESS')\n ->groupBy('snack_id')\n ->orderBy(DB::raw('count(snack_id)'),'acs')\n ->limit(3)\n ->get();\n\n return $this->addSnackNameToCollection($orders, 'Frequency');\n }", "title": "" }, { "docid": "2d50ff5f30d52348a741137a403ba221", "score": "0.5396993", "text": "public function showTiempoTotal()\n {\n $t = $this->getTiempoTotal();\n $result = sprintf(\"%02d:%02d\", floor($t / 3600), (floor($t / 60) % 60));\n return $result;\n }", "title": "" }, { "docid": "25b2a28ec341fd4bfcd2f5c3e381f993", "score": "0.5375309", "text": "public function message()\n {\n return 'No puedes aplicar más que el total restante';\n }", "title": "" }, { "docid": "2687518c97fa5e0cdda180639b290c67", "score": "0.5334675", "text": "public function limit() {\r\n $show = ceil($this->current * $this->display) - $this->display;\r\n return \" LIMIT \" . +$show . \",\" . $this->display . \" ;\";\r\n }", "title": "" }, { "docid": "9652d853c2fbf982170136a3c7a8bc40", "score": "0.5329157", "text": "function find_higest_using_vehicle($limit){\n global $db;\n $sql = \"SELECT p.modelo, COUNT(s.vehiculo_id) AS totalSold\";\n $sql .= \" FROM viajes s\";\n $sql .= \" LEFT JOIN vehiculos p ON p.id = s.vehiculo_id \";\n $sql .= \" GROUP BY s.vehiculo_id\";\n $sql .= \" ORDER BY p.id DESC LIMIT \".$db->escape((int)$limit);\n return $db->query($sql);\n }", "title": "" }, { "docid": "69b11af091e177e165bdb527067c4f73", "score": "0.53266233", "text": "function displayTop100Data($startDate,$endDate,$year){\n\n //echo \"hi i am in \".$month;\n $lines=\"<div style='margin-left:10px'>\";\n $lines.=\"<H2>Displaying top results for \".$year .\"</H2><br/>\";\n\n // $lines='';\n $query=\"SELECT SKU,Title,SUM(QTY) AS output,SellingPrice,SUM(SellingPrice*Qty),ItemId FROM EbayTransactions Where SKU!='' AND SellingPrice > 0.00 AND CreationDate <='\".$endDate.\"'and CreationDate >='\".$startDate.\"' GROUP BY Title ORDER BY `output` DESC\";\n //echo $query;\n $result= mysql_query($query);\n $rowsnum = mysql_num_rows($result);\n if($rowsnum==0)\n {\n $lines.= \"No results found\";\n //return;\n }\n else\n {\n $lines.=\"<table border='1'><tr><th>Sno</th><th>SKU</th><th>Item</th><th>ItemId</th><th>Quantity Sold</th><th>Selling Price</th><th>Amount</th></tr>\";\n\n $count=1;\n $total=0.0;\n for($j=0;$j<$rowsnum;$j++)\n {\n $row=mysql_fetch_row($result);\n// if($j==100)\n// break;\n\n // $lines.=\"<tr><td>\".$count++.\"</td><td>\".$row[0].\"</td><td>\".$row[1].\"</td><td>\".$row[2].\"</td></tr>\";\n $lines.=\"<tr><td>\".$count++.\"</td><td>\".$row[0].\"</td><td>\".$row[1].\"</td><td>\".$row[5].\"</td><td>\".$row[2].\"</td><td>\".$row[3].\"</td><td>\".$row[4].\"</td></tr>\";\n $total+=floatval($row[4]);\n }\n\n $lines.=\"<tr><td></td><td></td><td></td><td></td><td><b>Total Selling:</b></td><td><b>\".$total.\"$</b></td></tr>\";\n $lines.=\"</table>\";\n }\n $lines.=\"</div><br/>\";\n return $lines;\n //return;\n}", "title": "" }, { "docid": "0c6f6c3026e3a91759b380cdde863f12", "score": "0.5323372", "text": "public function findByMostSales() {\n\n $query = $this->createQueryBuilder(\"product\")\n ->andWhere(\"product.marketplaceShow = 1\")\n ->orderBy(\"product.sales\", \"DESC\")\n ->getQuery();\n\n return $query->getResult();\n }", "title": "" }, { "docid": "4f8327ff76767bb4ff2fffb80a449729", "score": "0.5314496", "text": "function top_voted_calc( $showcount = 5, $nopost_msg = null ) {\n\t\tglobal $wpdb;\n\t\t$result = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM \".$wpdb->prefix.\"dc_vote INNER JOIN \".$wpdb->prefix.\"posts ON \".$wpdb->prefix.\"dc_vote.post_id = \".$wpdb->prefix.\"posts.ID WHERE vote_count > 0 ORDER BY \".$wpdb->prefix.\"dc_vote.vote_count DESC, \".$wpdb->prefix.\"posts.post_date DESC LIMIT %d\", $showcount ) );\n\t\tif ( !empty( $result ) ) {\n\t\t\t$output = '<ul>';\n\t\t\tforeach ( $result as $r ) {\n\t\t\t\t$post_data = get_post( $r->post_id );\n\t\t\t\t$post_url = get_permalink( $r->post_id );\n\t\t\t\t$vote_count = $r->vote_count;\n\t\t\t\t$output .= '<li><a title=\"'.$post_data->post_title.' - Total voted ('.$vote_count.')\" href=\"'.$post_url.'\">'.$post_data->post_title.' ('.$vote_count.')</a></li>';\n\t\t\t}\n\t\t\t$output .= '</ul>';\n\t\t}\n\t\telse {\n\t\t\t$output = $nopost_msg;\n\t\t}\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "3d76facccff09bd9a12f150fe350cff4", "score": "0.5312941", "text": "function getTopTenUserStatsByUserIdAndDifficulty() {\n\n global $statistics;\n\n $userId = Session::get(\"userID\");\n \n $returnVal = [];\n $returnVal[\"easy\"] = $statistics->getUserStatisticsByUserIDAndDifficulty($userId, 1)[0];\n $returnVal[\"medium\"] = $statistics->getUserStatisticsByUserIDAndDifficulty($userId, 2)[0];\n $returnVal[\"hard\"] = $statistics->getUserStatisticsByUserIDAndDifficulty($userId, 3)[0];\n $returnVal[\"multiplayer\"] = $statistics->getUserStatisticsByUserIDAndDifficulty($userId, 4)[0];\n\n echo json_encode($returnVal);\n}", "title": "" }, { "docid": "57ce8c80e036011daf5fdd701d2facd9", "score": "0.52963126", "text": "public function getTotalStake () {\n\t\tif(!$this->checkLogin()) return(0);\n\t\t// Get this user_id stack from bet table\n\t\t$this->load->eloquent('bets/Bet');\n\t\t$Obj = Bet::where('user_id' , $this->user->id)->get();\n\t\t$array = array('user_id'=>$this->user->id, 'status'=>'0');\n\t\t$Obj = Bet::where($array)->get();\n//\t\tvar_dump($Obj);\n\t\t$totalStake = 0;\n foreach ( $Obj as $row ):\n $totalStake += $row->stake;\n endforeach;\n\t\t// return stake\n\t\treturn($totalStake);\n\t}", "title": "" }, { "docid": "0a78752a7cff8db698d216ff8bb9933b", "score": "0.52951604", "text": "function count_cart_top(){\n\t\t$output = '';\n\t\t$no = 0;\n $rows = count($this->cart->contents());\n\t\t\n\t\t$output .= $rows.' items';\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "7d6d1627d47d194a2892f690628a1f32", "score": "0.52902776", "text": "public function getMostPopularCity()\n {\n return $this->createQueryBuilder('s')\n ->select('s.name, count(s.id) as NUM')\n ->groupBy(\"s.name\")\n ->addOrderBy('NUM', 'DESC')\n ->setMaxResults(1)\n ->getQuery()\n ->getSingleResult()\n ;\n }", "title": "" }, { "docid": "5be51846b97ce1cc42e25591830d7f45", "score": "0.52838993", "text": "function getStats($pdo) {\n $sponsType = $pdo->query(\"Select count(CompanyID), SponsorType\n From Sponsors group by (SponsorType)\n order by SponsorType Desc\"); # Get the sponsor money\n $studentsAttending = $pdo->query(\"Select count(Distinct AttendeeID)\n From Student_Session_Schedule\"); # Number of students attending\n $professionalAttending = $pdo->query(\"select count(Distinct ProfessionalID)\n From Professional_Session_Schedule\"); # Number of sponsors attending\n echo \"<h3>Intake Statistics:</h3>\";\n $total = 0;\n $row = $studentsAttending->fetch(0);\n $row[0] = $row[0] * 50;\n $total = $total + $row[0];\n echo \"<p>Student Entrance Money: \",$row[0],\"</p>\";\n $row = $professionalAttending->fetch(0);\n $row[0] = $row[0] * 100;\n $total = $total + $row[0];\n echo \"<p>Professional Entrance Money: \",$row[0],\"</p>\";\n $row = $sponsType->fetch(0);\n $temp = $row[0];\n $temp = $temp * 3000;\n $total = $total + $temp;\n echo \"<p>Sponsor Silver Entrance Money: \",$temp,\"</p>\";\n $row = $sponsType->fetch(1);\n $temp = $row[0];\n $temp = $temp * 10000;\n $total = $total + $temp;\n echo \"<p>Sponsor Platinum Entrance Money: \",$temp,\"</p>\";\n $row = $sponsType->fetch(3);\n $temp = $row[0];\n $temp = $temp * 5000;\n $total = $total + $temp;\n echo \"<p>Sponsor Gold Entrance Money: \",$temp,\"</p>\";\n $row = $sponsType->fetch(4);\n $temp = $row[0];\n $temp = $temp * 1000;\n $total = $total + $temp;\n echo \"<p>Sponsor Bronze Entrance Money: \",$temp,\"</p>\";\n echo \"<p>The Total Entry Money: \",$total,\"</p>\";\n }", "title": "" }, { "docid": "090a806d857fcb81045b59be4ecca1a4", "score": "0.5265395", "text": "public function bestOfAction()\n {\n $termRepo = $this->getDoctrine()->getRepository(\"AppBundle:Term\");\n $terms = $termRepo->findBestOf();\n\n return $this->render('default/best_of.html.twig', compact(\"terms\"));\n }", "title": "" }, { "docid": "70226a6cc3f23e3fb299cebca2d95f11", "score": "0.5262044", "text": "public function subjectMostPopular()\n {\n $sth = Database::getInstance()->prepare('SELECT fs.name, fs.id, COUNT( * ) as occurrence FROM forum_subjects as fs LEFT JOIN forum_messages as fm ON fs.id = fm.id_forum_subjects GROUP BY fs.id ORDER BY occurrence DESC LIMIT 1');\n if ($sth->execute()) {\n $count = $sth->fetch(PDO::FETCH_OBJ);\n if ($count) {\n $this->idSubjectMostPopular = $count->id;\n $this->titleSubjectMostPopular = $count->name;\n $this->countSubjectMostPopular = $count->occurrence;\n }\n }\n }", "title": "" }, { "docid": "5357a9f90a6ce1340312103ecff12bad", "score": "0.5246174", "text": "function getTopTenUsersTotalHitsReceivedByDifficulty() {\n\n global $statistics;\n\n $returnVal = [];\n $returnVal[\"easy\"] = $statistics->getTopTenUsersTotalHitsReceivedByDifficulty(1);\n $returnVal[\"medium\"] = $statistics->getTopTenUsersTotalHitsReceivedByDifficulty(2);\n $returnVal[\"hard\"] = $statistics->getTopTenUsersTotalHitsReceivedByDifficulty(3);\n $returnVal[\"multiplayer\"] = $statistics->getTopTenUsersTotalHitsReceivedByDifficulty(4);\n\n echo json_encode($returnVal);\n}", "title": "" }, { "docid": "1d315b4df1d472a15c759c2e9444bb25", "score": "0.523965", "text": "public function numberOfReviewsDESC() {\n \n $products = Product::selectRaw('products.*, count(reviews.id) as numberOfReview, avg(reviews.rating) as AvgRating, reviews.product_id')\n ->leftJoin('reviews', 'products.id', '=', 'reviews.product_id')\n ->groupBy('products.id')\n ->orderBy('numberOfReview', 'desc')\n ->get();\n \n // $products = Product::all();\n\n \n return view('products.sortByMostReviewed', ['products' => $products]);\n }", "title": "" }, { "docid": "d68ab0449b0b5ba489aed7ec7b2f6acb", "score": "0.52117926", "text": "public function getSummaryTotal()\n {\n return sprintf(\n \" => Number of tests: %d\\n\".\n \" => Passing: %d\\n\".\n \" => Failing: %d\",\n $this->getCountTotal(),\n $this->getCountPassed(),\n $this->getCountFailed()\n );\n }", "title": "" }, { "docid": "76a02ee620ae3a86ff3235be5a746b16", "score": "0.52104616", "text": "public function getPesoMax()\n {\n //peso final\n $peso_final = 0;\n \n //loop em todos os itens do pedido\n foreach( $this->getItem() as $item )\n {\n //verificar se o peso do item é maior que o peso final\n if( $item->getPeso() > $peso_final )\n {\n $peso_final = $item->getPeso();\n }\n }\n \n return $peso_final;\n }", "title": "" }, { "docid": "f808d26b5c4bc3390f0ba90beb7fefd0", "score": "0.5198748", "text": "public function getTotalOutstanding()\n {\n return $this->_getPaymentSummaryElement('total', substr(__FUNCTION__, 8));\n }", "title": "" }, { "docid": "443367fa7c38248a14cf6b703dfd6f6c", "score": "0.5197328", "text": "public function getGranularity();", "title": "" }, { "docid": "dbe037c6203b64d8ea5582ecaaa7d7d5", "score": "0.5194523", "text": "public static function getBugunToplamBagisMiktar(){\n// $SQL = 'SELECT count(*) as bugunBagisSayi FROM bagis_burs WHERE DATE(bagis_zamani) = DATE(NOW()) and durum = 1';\n $record = new BagisRecord();\n $criteria = new CDbCriteria;\n $criteria->select='SUM(bagis_tutar) as bugunToplamBagis';\n $criteria->condition = \" DATE(bagis_zamani) = DATE(NOW()) AND durum = 1 \";\n $user = $record->find($criteria);\n return $user->bugunToplamBagis; \n }", "title": "" }, { "docid": "730156c6eaf4111588e5c2ccbf57983d", "score": "0.5179226", "text": "public function getSummaryAttribute()\n {\n // return number_format(round((($this->eksklusif + $this->intoleran + $this->ekstream + $this->kekerasan) / 4)) , 0);\n $avg = $this->avg_report;\n \n if ($avg >= 1 && $avg <= 2) {\n return 'kecenderungan positif';\n } else {\n return 'kecenderungan negatif';\n }\n }", "title": "" }, { "docid": "d1010b6b9480a8eb9d8ac9bf036ae64c", "score": "0.5173835", "text": "public function took(): int\n {\n return $this->took;\n }", "title": "" }, { "docid": "a00a556f7e51bcfc022be4e40ab939e4", "score": "0.5171846", "text": "public function getMaxTeamCost(){\n\t\n\t\t$gameConstantModelInstance = ClassRegistry::init( 'GameConstant' );\n\t\t$gameConstant = $gameConstantModelInstance->find( 'first' );\n\t\t\n\t\treturn $gameConstant['GameConstant']['max_team_cost'];\n\t\t\n\t}", "title": "" }, { "docid": "89c36742251cff5e9ee984a17e0e4613", "score": "0.5145135", "text": "public function show_teamtask_menu_count(){ \n\t\t// check finance modules\n\t\tif($this->check_tsk_module() && $this->request->params['controller'] != 'home'){\t\t\t\n\t\t\t$this->loadModel('TskTeamPlan');\t\n\t\t\t$this->TskTeamPlan->unBindModel(array('belongsTo' => array('TskCustomer','TskProject','TskPlanType','HrEmployee')));\n\t\t\t$tm_plan_count = $this->TskTeamPlan->find('count', array('conditions' => array('TskPlanRead.app_users_id' => $this->Session->read('USER.Login.id'), \n\t\t\t'TskPlanRead.status' => 'U', 'TskTeamPlan.is_deleted' => 'N', $this->get_plan_condition()), 'group' => array('TskPlanRead.tsk_plan_id')));\t\t\t\t\t\n\t\t\t$this->tsk_plan_count += $tm_plan_count;\n\t\t\t$this->tsk_count += $tm_plan_count;\n\t\t\t$this->set('TEAM_PLAN_COUNT', $tm_plan_count);\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "5e7c88de06dd797082d23ae57ddb0301", "score": "0.5145079", "text": "function highestByNumberOfRows($limit){\n //$sql = \"select g.*, SUM(g.billed) AS total_amount, COUNT(g.user_id) as total_games from gameplayedrecord g group by g.user_id order by g.date_played desc, number_of_rows_won desc limit \" .$limit;\n $sql = \"select g.*, SUM(g.billed) AS total_amount, COUNT(g.user_id) as total_games from gameplayedrecord g group by g.user_id order by g.number_of_rows_won desc limit \" .$limit;\n //echo $sql;\n\n //Execute query on db and get result\n $query = $this->db->query($sql)->result();\n //print_r($query);\n if(!empty($query)){\n return $query;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "8bfbb7c859f36c8aa2647c6b91caa6b3", "score": "0.51339865", "text": "public function getTenMostRecent()\n {\n return $this->getGateway()->select(function (Select $select) {\n $select\n ->order('created_at DESC')\n ->limit(10);\n });\n }", "title": "" }, { "docid": "815e2ee1a3c28efef2f71cdea8f7062f", "score": "0.5133981", "text": "public function carRentedMost(){\n $cars = CarsModel::all();\n $carsData=$cars['class']->where('status' , 1 );\n\n return $carsData;\n\n }", "title": "" }, { "docid": "72ae874e2c00e600f3728fdf365a9419", "score": "0.513259", "text": "public function topProduit()\n {\n\n return DB::select(DB::raw(\"SELECT distinct [libelleFamille],\nCONVERT(INT,(sum([Qtevendu]))) as Qtevendu\n FROM [ASM2014web26].[dbo].[View_AchatVente] where [libelleFamille] <>''\n group by [libelleFamille] order by [QteVendu] desc\n OFFSET 0 ROWS \nFETCH FIRST 10 ROWS ONLY;\"));\n }", "title": "" }, { "docid": "e2437822545805ff0fb3c0bb4e658405", "score": "0.51320314", "text": "public function mostLiked()\n\t{\n\t\t$recipes=$this->getInfo(\"SELECT picture,recipe_name,r.recipe_id as recipe_id FROM recipes r INNER JOIN likes l ON r.recipe_id=l.recipe_id GROUP BY l.recipe_id ORDER BY count(*) DESC LIMIT 3\",array());\n\t\tif(!count($recipes))//If no recipes could be found\n\t\t{\n\t\t\techo '<div class=\"item\"><h5>Having fun Whether you cook for your family, friends or just for yourself, you will always enjoy it. Seeing how different veggies, meat and spices combine to give those gorgeous flavor, makes you really happy. You will enjoy every bit of the process, starting from chopping to baking.</h5></div>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tforeach($recipes as $r)//Displaying the most liked recipes\n\t\t\t{\n\t\t\t\techo '<div class=\"item\">'.$r['recipe_name'].'<a href=\"recipe.php?recipe='.$r['recipe_id'].'\"><img style=\"height:120px\" src=\"'.$r['picture'].'\" alt=\"'.$r['recipe_name'].'\"></a></div>';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "02660765115d1d0e95b182d5b8045afa", "score": "0.51279545", "text": "public function getDisplayInfuseAmt();", "title": "" }, { "docid": "85a8a8cbfd4f60651f5c75a2ae538fd4", "score": "0.5123411", "text": "public function getTop()\n {\n // get snacks\n $top = DB::table('votes')\n ->join('users', 'users.id', '=', 'votes.user_id')\n ->groupBy('votes.user_id')\n ->select('users.email', DB::raw('count(*) as total_votes'))\n ->get();\n\n // passing the columns which I want from the result set. Useful when we have not selected required fields\n $arrColumns = array('email', 'total_votes');\n\n // define the first row which will come as the first row in the csv\n $arrFirstRow = array('email', 'total votes');\n\n // building the options array\n $options = array(\n 'columns' => $arrColumns,\n 'firstRow' => $arrFirstRow,\n 'headers' => array(\n 'Content-Type' => 'text/csv',\n 'Content-Disposition' => 'attachment; filename=\"top_users.csv\"'\n ),\n );\n\n return convertToCSV($top, $options);\n }", "title": "" }, { "docid": "3febe6793e1503968b7eb59c59e66ff7", "score": "0.51168495", "text": "public function getStatsSummary();", "title": "" }, { "docid": "03ac671eab692fa1ae41c048ee6ffdb3", "score": "0.51137364", "text": "public function getSummary();", "title": "" }, { "docid": "03ac671eab692fa1ae41c048ee6ffdb3", "score": "0.51137364", "text": "public function getSummary();", "title": "" }, { "docid": "2fec7944ce4ce2f5a17f4c15e2dd6145", "score": "0.51111495", "text": "function show_daily_profit($site)\n{\n\t$result = mysql_query($query) or die(mysql_error());\n\t$profit = 0;\n\twhile($row = mysql_fetch_array($result)){\n\t\t$profit = $profit + $row['profit'];\n\t}\t\n\n\t// $revenue = $revenue / 1000;\n\treturn number_format($profit, 2);\t\n}", "title": "" }, { "docid": "1f5b55fbf6d122254000a968b98fbd71", "score": "0.51111", "text": "public function averageTimeSpent() {\n $credits = Credit::find_by_topic($this->id); \n $sum = 0;\n $count = 0; \n \n foreach($credits as $credit) {\n if ($credit->enddate > 0) {\n $end = $credit->enddate;\n $start = $credit->startdate;\n $days_between = (strtotime($end) - strtotime($start)) / 86400;\n $sum = $sum + $days_between;\n $count++;\n }\n }\n \n if ($count != 0) {\n return round($sum / $count); \n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "082712b429320faa26c565d90f4f66fa", "score": "0.51085985", "text": "function getTopHunches()\n {\n if (!empty($this->hunches)) return $this->hunches;\n $this->estimateObjectLikelihoods();\n $sql = <<<SQL\nSELECT objects.objectid objectId, objects.name, objects.subname, l likelihood\n FROM object_likelihood\n JOIN objects ON objects.objectid = object_likelihood.objectid\n ORDER BY l DESC\n LIMIT 10\nSQL; \n $statement = $this->database->query($sql);\n $this->hunches = $statement->fetchAll(\\PDO::FETCH_OBJ);\n return $this->hunches;\n }", "title": "" }, { "docid": "a09308c983838bcfc76d3b77422c95c1", "score": "0.5107077", "text": "public function profit(){\n $user=Auth::user();\n $profits=$user->profits()->latest()->get();\n return view('store.profit.index',compact('profits','user'))->with(['title'=>'مدیریت افزونه افزایش رتیه در جستجو']);\n }", "title": "" }, { "docid": "c36c6f5714d000607ebe65905a583487", "score": "0.51053137", "text": "public function totalSpent() {\n $total = 0;\n\n foreach ($this->all() as $record)\n if ($record->transactionType == 'Purchase')\n $total += $record->amount;\n\n return $total;\n }", "title": "" }, { "docid": "ef9d855b35ef1b2a92a4a34abd0ff646", "score": "0.5104722", "text": "public function estimateHigh(): string\n {\n $pathPrice = json_decode($this->pathBasePrice, true);\n $prices = [];\n $steps = json_decode($this->results, true);\n foreach ($steps as $key => $value) {\n array_push($prices, $value['price']['high']);\n }\n \n return intval($pathPrice['high']) + intval(array_sum($prices));\n }", "title": "" }, { "docid": "5206d502e5efd54da70b0503514380f7", "score": "0.5098525", "text": "public function getTopGrabbers()\n\t{\n\t\treturn $this->pdo->query(\"\n\t\t\tSELECT id, username, SUM(grabs) AS grabs\n\t\t\tFROM users\n\t\t\tGROUP BY id, username HAVING SUM(grabs) > 0\n\t\t\tORDER BY grabs DESC\n\t\t\tLIMIT 10\"\n\t\t);\n\t}", "title": "" }, { "docid": "64dc231191d14f2942bbe12c617f9c94", "score": "0.5095923", "text": "public function getDisplayAmount()\n {\n return $this->displayAmount;\n }", "title": "" }, { "docid": "64dc231191d14f2942bbe12c617f9c94", "score": "0.5095923", "text": "public function getDisplayAmount()\n {\n return $this->displayAmount;\n }", "title": "" }, { "docid": "8ef90eb04cd8ff11a1f5f7258a559dbf", "score": "0.50940275", "text": "public function mostLikes()\n {\n $entries = $this->hasMany('App\\Entry');\n $counter = 0;\n $match = '';\n\n foreach($entries as $entry){\n if($entry->likesCount() > $counter){\n $counter = $entry->likesCount();\n $match = $entry;\n }\n }\n\n return $match;\n\n }", "title": "" }, { "docid": "03aa25861c6e154b8e00badffe4b58a6", "score": "0.5093918", "text": "public function getAmountPlanned();", "title": "" }, { "docid": "c497120d00e04ff5916d6a7067433df0", "score": "0.50932735", "text": "public function getTeamCost()\n {\n return array_sum($this->teams->map(function($team) {\n return $team->getCost();\n })->toArray());\n }", "title": "" }, { "docid": "3e0f5d27850377f9b4f9454c33ac6114", "score": "0.50866514", "text": "function ssi_smfg_mostViews($title=1, $limit=5, $output_method = 'echo')\n{\n global $smfgSettings, $txt, $scripturl, $db_prefix; \n \n // Load garage settings\n loadSmfgConfig();\n loadLanguage('Garage');\n \n $output = '';\n \n $output .= '\n <div style=\"width: 100%;\">';\n if($title) $output .= '<div style=\"margin-bottom: 2px;\">\n <h3 style=\"margin: 0; font-size: 1em; padding: 5px;\">'.$txt['smfg_most_views'].'</h3>';\n \n // Get the five most viewed vehicles\n // Get the VIDs first\n $request = db_query(\"\n SELECT v.id\n FROM {$db_prefix}garage_vehicles AS v, {$db_prefix}garage_makes AS mk, {$db_prefix}garage_models AS md\n WHERE v.make_id = mk.id\n AND v.model_id = md.id\n AND mk.pending != '1'\n AND md.pending != '1'\n AND v.pending != '1'\n ORDER BY v.views DESC\n LIMIT 0, \".$limit,__FILE__,__LINE__);\n $count = 0;\n while($row = mysql_fetch_row($request)) {\n list($context['most_views'][$count]['id']) = $row;\n // Now collect data for each vehicle\n $request2 = db_query(\"\n SELECT v.user_id, v.views, CONCAT_WS( ' ', v.made_year, mk.make, md.model), u.realName\n FROM {$db_prefix}garage_vehicles AS v, {$db_prefix}garage_makes AS mk, {$db_prefix}garage_models AS md, {$db_prefix}members AS u\n WHERE v.id = \".$context['most_views'][$count]['id'].\"\n AND v.user_id = u.ID_MEMBER\n AND v.make_id = mk.id\n AND v.model_id = md.id\",__FILE__,__LINE__);\n list($context['most_views'][$count]['user_id'],\n $context['most_views'][$count]['views'],\n $context['most_views'][$count]['vehicle'],\n $context['most_views'][$count]['memberName']) = mysql_fetch_row($request2);\n $context['most_views'][$count]['views'] = number_format($context['most_views'][$count]['views'], 0, '.', ',');\n mysql_free_result($request2);\n \n $output .= '\n <div class=\"smalltext\"><a href=\"'.$scripturl.'?action=garage;sa=view_vehicle;VID='.$context['most_views'][$count]['id'].'\">'.$context['most_views'][$count]['vehicle'].'</a></div>\n <div class=\"smalltext\">'.$txt['smfg_owner'].': <b><a href=\"'.$scripturl.'?action=profile;u='.$context['most_views'][$count]['user_id'].'\">'.$context['most_views'][$count]['memberName'].'</a></b></div>\n <div class=\"smalltext\">'.$txt['smfg_views'].': <b>'.$context['most_views'][$count]['views'].'</b></div>';\n \n $count++;\n\n if ($count < $limit) $output .= '<hr />';\n }\n mysql_free_result($request);\n \n if($title) $output .= '</div>';\n $output .= '</div>';\n \n if($output_method == 'echo') echo $output;\n else if($output_method == 'array') return $context['most_views'];\n}", "title": "" }, { "docid": "12beaffe22e4e4f9ec1d57b80a7be72d", "score": "0.50826234", "text": "function GetMost(){ \n $LIMIT = 18;\n // most searched offer \n $query =$this->db -> select ('origin, lat, lng, count(\"origin\") as num ')\n -> where( \"is_active \", 1 )\n -> group_by('origin')\n -> limit( $LIMIT )\n -> order_by(\"num\", \"desc\" )\n -> get('searched'); \n\n // most created offer \n $query2 =$this->db -> select ('departure_place as origin, lat, lng, count(\"departure_place\") as num ')\n -> group_by('departure_place')\n -> limit( $LIMIT )\n -> order_by(\"num\", \"desc\" )\n -> get('offer_created'); \n\n if( $query && $query2 )\n return array( 'mostSearched' => $query->result_array(), 'mostCreated' => $query2->result_array() );\n else\n return FALSE;\n }", "title": "" }, { "docid": "d5ac90e77b7b6f950347a204e41f7b1c", "score": "0.5079043", "text": "public function formattedTotal(): string;", "title": "" }, { "docid": "2cdf929edbba37691e490847a070e3cf", "score": "0.5078378", "text": "function get_general_topten_in_time($session_id = null, $count = 10) {\n if($session_id == null) {\n $session_id = get_current_session_id();\n }\n\n return db_table_query(\"SELECT `v`.`success`, `v`.`cum_delay`, IF(`identity`.`group_name` IS NULL, `identity`.`full_name`, `identity`.`group_name`) name FROM (SELECT COUNT(*) success, SUM(TIMESTAMPDIFF(SECOND, `riddle`.`start_time`, `answer`.`last_update`)) AS cum_delay, `telegram_id` FROM `answer` LEFT JOIN `riddle` ON `answer`.`riddle_id` = `riddle`.`id` WHERE `riddle`.`session_id` = {$session_id} AND `answer`.`text` = `riddle`.`answer` AND `answer`.`last_update` < `riddle`.`end_time` GROUP BY `telegram_id`) v LEFT JOIN `identity` ON `v`.`telegram_id` = `identity`.`telegram_id` ORDER BY `v`.`success` DESC, `v`.`cum_delay` ASC LIMIT {$count}\");\n}", "title": "" }, { "docid": "4f0312f221c8f764f05eb517330285d9", "score": "0.50773835", "text": "public function show_mytask_menu_count(){ \n\t\t// check finance modules\n\t\tif($this->check_tsk_module() && $this->request->params['controller'] != 'home'){\t\t\t\n\t\t\t$this->loadModel('TskPlan');\n\t\t\t$this->TskPlan->unBindModel(array('belongsTo' => array('TskCustomer','TskProject','TskPlanType')));\t\n\t\t\t$my_plan_count = $this->TskPlan->find('count', array('conditions' => array('TskPlan.app_users_id' =>$this->Session->read('USER.Login.id'), \n\t\t\t'TskPlan.read_status' => 'U','TskPlan.is_deleted' => 'N',$this->get_plan_condition()), 'group' => array('TskPlan.id')));\t\t\n\t\t\t$this->tsk_plan_count = $my_plan_count;\n\t\t\t$this->tsk_count += $my_plan_count;\n\t\t\t$this->set('MY_PLAN_COUNT', $my_plan_count);\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "4f208be588672944708b42781d8dc755", "score": "0.5075582", "text": "static public function totalOverdue()\n {\n $invoices = Invoice::where([\n ['status', '!=', config('invoices.invoice.status.paid')],\n ['due_date', '<', now()]\n ])->get();\n\n $sum = 0;\n\n foreach ($invoices as $invoice) {\n $sum += $invoice->pendingPayment();\n }\n\n return number_format($sum, 2, ',', '.');\n }", "title": "" }, { "docid": "4fa7efd3b4df6388cf85d4b9296ee772", "score": "0.50720835", "text": "public function end()\n\t{\n\t\t# Calculate the Beginning + The maximum amount of results\n\t\t$calc = $this->start() + $this->max;\n\t\t\n\t\t# Only return this if it is not above the total otherwise return our maximum\n\t\t# example, 24 + 6 = 30, but with only 26 reselts it will display the total results istead (26)\n\t\t$r = ($calc > $this->total) ? $this->total : $calc;\n\t\t\n\t\t# return the result\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "e996a787e7da2a72ebfff425b2d0c624", "score": "0.5069055", "text": "public function getUltimo_costo()\n {\n return $this->ultimo_costo;\n }", "title": "" }, { "docid": "caf00522ed974f6b64bfc54e32fbd511", "score": "0.506639", "text": "function summary()\n {\n global $g_layout;\n $output = '<b>'.text(\"summary\", \"projectplan\").'</b><br><br>';\n $output.= $g_layout->data_top();\n $output.= '<tr>'.$g_layout->ret_td_datatitle();\n $output.= $g_layout->ret_td_datatitle(text(\"quotation\", \"projectplan\"));\n $output.= $g_layout->ret_td_datatitle(text(\"initial\", \"projectplan\"));\n $output.= $g_layout->ret_td_datatitle(text(\"current\", \"projectplan\"));\n $output.= $g_layout->ret_td_datatitle(text(\"planned\", \"projectplan\"));\n $output.= $g_layout->ret_td_datatitle(text(\"actual\", \"projectplan\"));\n $output.='</tr>';\n $output.='<tr class=\"row1\"><td class=\"table\">'.text(\"project_total\").'</td>';\n $output.='<td class=\"table\">'.$this->amount_format($this->m_project['fixed_price']).'</td>';\n $output.='<td class=\"table\" style=\"background-color: '.($this->m_project_totals[\"initial_amount\"]>$this->m_project[\"fixed_price\"]?COLOR_ERROR:COLOR_OK).'\">'.$this->amount_format($this->m_project_totals['initial_amount']).'</td>'; \n $output.='<td class=\"table\" style=\"background-color: '.($this->m_project_totals[\"current_amount\"]>$this->m_project_totals[\"initial_amount\"]?COLOR_ERROR:COLOR_OK).'\">'.$this->amount_format($this->m_project_totals['current_amount']).'</td>'; \n $output.='<td class=\"table\" style=\"background-color: '.($this->m_project_totals[\"planned_amount\"]>$this->m_project_totals[\"current_amount\"]?COLOR_ERROR:COLOR_OK).'\">'.$this->amount_format($this->m_project_totals['planned_amount']).'</td>';\n $output.='<td class=\"table\" style=\"background-color: '.($this->m_project_totals[\"booked_amount\"]>$this->m_project_totals[\"initial_amount\"]?COLOR_ERROR:COLOR_OK).'\">'.$this->amount_format($this->m_project_totals['booked_amount']).'</td>';\n $output.='</tr>';\n $output.= $g_layout->data_bottom();\n return $output;\n }", "title": "" }, { "docid": "d065ba001e5e97695fca60dbcb4e59c6", "score": "0.5060709", "text": "public function get_trade_summary()\n {\n $credit_sum = [];\n $days_in_trade = [];\n \n $rt = [\n 'wins' => 0,\n 'losses' => 0,\n 'total' => 0,\n 'profit' => 0,\n 'end_cash' => 0,\n 'return' => 0,\n 'cagr' => 0,\n 'win_rate' => 0,\n 'avg_credit' => 0,\n 'rounded_years' => 0,\n 'avg_days_in_trade' => 0,\n 'start_date' => $this->start_date,\n 'end_date' => $this->end_date \n ];\n \n $trades = $this->get_trades();\n \n foreach($trades AS $key => $row)\n {\n $rt['total']++;\n \n if($row['BackTestTradesProfit'] > 0)\n {\n $rt['wins']++;\n } else\n {\n $rt['losses']++;\n }\n \n $credit_sum[] = $row['BackTestTradesOpenCredit'];\n \n $rt['profit'] = $rt['profit'] + $row['BackTestTradesProfit'];\n \n // Get the number of days in the trade.\n $date1 = date_create($row['BackTestTradesOpen']);\n $date2 = date_create($row['BackTestTradesClose']);\n $diff = date_diff($date1, $date2); \n $days_in_trade[] = $diff->days; \n }\n \n $rt['end_cash'] = $this->start_cash + $rt['profit'];\n $rt['avg_credit'] = (count($credit_sum) > 0) ? round(array_sum($credit_sum) / count($credit_sum), 2) : 0;\n $rt['win_rate'] = (count($trades) > 0) ? round(($rt['wins'] / count($trades)) * 100, 2) : 0;\n $rt['return'] = (($rt['end_cash'] - $this->start_cash) / $this->start_cash) * 100;\n \n // CAGR Calc.\n $date1 = date_create($this->start_date);\n $date2 = date_create($this->end_date);\n $diff = date_diff($date1, $date2);\n $rt['rounded_years'] = ceil($diff->days / 365);\n $rt['cagr'] = round(((pow(($rt['end_cash'] / $this->start_cash), (1 / $rt['rounded_years']))) - 1) * 100, 2);\n \n // Average number of days holding a trade.\n $rt['avg_days_in_trade'] = (count($days_in_trade) > 0) ? round(array_sum($days_in_trade) / count($days_in_trade)) : 0;\n\n return $rt;\n }", "title": "" }, { "docid": "ebb2ee6512a9c19f44135f7c0d89c375", "score": "0.50577736", "text": "public function masDescuentoTotal() {\r\n $descuento = $this->session->descuento_total;\r\n if($descuento == 100)\r\n {\r\n $this->mensaje(\"Limite del descuento total\", \"warning\");\r\n redirect('puntoVenta/');\r\n }\r\n else\r\n {\r\n $descuento = $descuento + 1;\r\n $this->setDescuentoTotal($descuento);\r\n redirect('puntoVenta/');\r\n }\r\n }", "title": "" }, { "docid": "91e120c9f209cdadcefdd3c785593533", "score": "0.5054809", "text": "public function mostRecent() {\n\t\treturn $this->_message->top();\n\t}", "title": "" }, { "docid": "66a1588a07ae92352acbc6c7d4b8e8e6", "score": "0.50505203", "text": "public function summaryAction()\n {\n $tournaments = $this->getDoctrine()->getRepository('AppBundle:Tournament')->findAll();\n\n return $this->render('admin/tournaments/tournaments.html.twig', array('tournaments' => $tournaments));\n }", "title": "" }, { "docid": "1781e193be737423f662681e0dbdf648", "score": "0.5046093", "text": "function getTopTenUsersTotalShotsFiredByDifficulty() {\n\n global $statistics;\n\n $returnVal = [];\n $returnVal[\"easy\"] = $statistics->getTopTenUsersTotalShotsFiredByDifficulty(1);\n $returnVal[\"medium\"] = $statistics->getTopTenUsersTotalShotsFiredByDifficulty(2);\n $returnVal[\"hard\"] = $statistics->getTopTenUsersTotalShotsFiredByDifficulty(3);\n $returnVal[\"multiplayer\"] = $statistics->getTopTenUsersTotalShotsFiredByDifficulty(4);\n\n echo json_encode($returnVal);\n}", "title": "" }, { "docid": "342ab4107063f15ae790e479f35cd366", "score": "0.5043218", "text": "public function topRated()\n {\n $top_rated_films = Film::orderBy('avg_rate', 'desc')->paginate(16);\n return view('movie/top_rated')->with(['films' => $top_rated_films]);\n }", "title": "" }, { "docid": "0e588ab8ef4bf7e59a9c97731a788299", "score": "0.50371987", "text": "public function totalTime()\n {\n return $this->minutesToHours($this->entity->max_time);\n }", "title": "" }, { "docid": "080ef8394f17d6124863b2c5c6bbfd10", "score": "0.50303257", "text": "function getTopTenUsersGamesPlayedByDifficulty() {\n\n global $statistics;\n\n $returnVal = [];\n $returnVal[\"easy\"] = $statistics->getTopTenUsersGamesPlayedByDifficulty(1);\n $returnVal[\"medium\"] = $statistics->getTopTenUsersGamesPlayedByDifficulty(2);\n $returnVal[\"hard\"] = $statistics->getTopTenUsersGamesPlayedByDifficulty(3);\n $returnVal[\"multiplayer\"] = $statistics->getTopTenUsersGamesPlayedByDifficulty(4);\n\n echo json_encode($returnVal);\n}", "title": "" }, { "docid": "7cdd87bcfa8d9304aac970f6dc71b61f", "score": "0.5027529", "text": "private function _top_ten() {\n $path = 'teams.txt';\n $data = data_processor::process_file($path, 4);\n \n $html_rows = '';\n \n foreach($data as $datum) {\n $row = new html_tag('div');\n \n $html = '';\n\n foreach($datum as $d) {\n $class = strlen($d) < 4 ? 'span1' : 'span3';\n \n $tag = new html_tag('div', $d, array('class' => $class));\n $html .= $tag->render();\n\n }\n \n $row->add_content($html)\n ->add_attrib('class', 'row');\n \n $html_rows .= $row->render();\n }\n \n $header = new html_tag('h5', 'Top 10 teams', array('class' => 'tab'));\n $content = new html_tag('div', $header->render() . $html_rows, array('class' => 'span6'));\n \n return $content;\n }", "title": "" }, { "docid": "27cfbc27e0bcc2326767c36c745a20fe", "score": "0.5019944", "text": "function show () {\n\t\treturn $this->_stats();\n\t}", "title": "" }, { "docid": "a3b7bedfc76ed6e8f59255cdabcc6eed", "score": "0.5018304", "text": "public function summaryAction()\n {\n $sql = \"\n SELECT sum(s.Quantity) quantity,max(s.articleId) articleId,s.articleCode,s.articleName FROM Stockkeeping s\n group by s.articleCode\n\n \";\n\n $stmt = $this->getDoctrine()->getManager()->getConnection()->prepare($sql);\n $stmt->execute();\n $entities = $stmt->fetchAll();\n\n\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "908c0b515317b8719387974a79bb1a2e", "score": "0.50147456", "text": "public function getMostPopularWords($limit = 15);", "title": "" }, { "docid": "6b1c39d5e663e74a823d24f1c31f66be", "score": "0.5011524", "text": "public function getMaximumUnpaidItemStrikesInfo()\n {\n return $this->maximumUnpaidItemStrikesInfo;\n }", "title": "" }, { "docid": "8d661dcf9a4487f386d9ad7eb7f56ddd", "score": "0.5001421", "text": "public function maxTotalTemperature(){\n $result = dibi::query('SELECT teplota as temperature, datum as date FROM teplota WHERE teplota = (SELECT max(teplota) FROM teplota ) ');\n\n return $result->fetchAll()[0];\n\n }", "title": "" }, { "docid": "5e3571813b1129e53df95da5e505bfd8", "score": "0.5000585", "text": "public function topVente()\n {\n\n return DB::select(DB::raw(\"SELECT distinct [libelleArticle],\n count([libelleArticle])as numbre\n FROM [ASM2014web26].[dbo].[View_AchatVente] group by [libelleArticle] Order by [numbre] desc\n OFFSET 0 ROWS \n FETCH FIRST 20 ROWS ONLY;\"));\n }", "title": "" }, { "docid": "4d2b982654018e1c208201541edd630a", "score": "0.4993834", "text": "public function getTopSell()\n {\n $topSellThisDay = $this->getTopSellBetweenDate(Carbon::now()->format('Y-m-d'), Carbon::now()->format('Y-m-d'));\n $topSellThisWeek = $this->getTopSellBetweenDate(Carbon::now()->startOfWeek()->format('Y-m-d'), Carbon::now()->endOfWeek()->format('Y-m-d'));\n $topSellThisMonth = $this->getTopSellBetweenDate(Carbon::now()->startOfMonth()->format('Y-m-d'), Carbon::now()->endOfMonth()->format('Y-m-d'));\n $topSellThisYear = $this->getTopSellBetweenDate(Carbon::now()->startOfYear()->format('Y-m-d'), Carbon::now()->endOfYear()->format('Y-m-d'));\n return [\n 'topSellThisDay' => $topSellThisDay,\n 'topSellThisWeek' => $topSellThisWeek,\n 'topSellThisMonth' => $topSellThisMonth,\n 'topSellThisYear' => $topSellThisYear,\n ];\n }", "title": "" }, { "docid": "8d9d2de35a9e79ed23d4252084ec0a39", "score": "0.49934846", "text": "private function showRemainingTime() {\n\t\t// make sure we are logged in\n\t\tif (!$_SESSION['logged'])\n\t\t\treturn;\n\n\t\t$user_id = $_SESSION['uid'];\n\t\t$manager = SapphireWavesManager::getInstance();\n\n\t\t// get data for user\n\t\t$data = $manager->getSingleItem(\n\t\t\t\t\t\t\t\t$manager->getFieldNames(),\n\t\t\t\t\t\t\t\tarray('user' => $user_id)\n\t\t\t\t\t\t\t);\n\n\t\tif (is_object($data) && strtotime($data->expires) >= time()) {\n\t\t\tprint gmdate('H:i:s', $data->remaining_time);\n\n\t\t} else {\n\t\t\tprint '00:00:00';\n\t\t}\n\t}", "title": "" }, { "docid": "5008e2b77e1d2766d186b54f3417f436", "score": "0.49932757", "text": "public function getSummaryCount()\n {\n if ($this->getData('summary_qty')) {\n return $this->getData('summary_qty');\n }\n return Mage::getSingleton('checkout/cart')->getSummaryQty();\n }", "title": "" }, { "docid": "c940a5bf26da65cdcd87b5038f6fab26", "score": "0.49906623", "text": "public function summary()\n {\n // @todo: Display summary\n }", "title": "" }, { "docid": "81ac1ae52c31145fb5cfe98cd007011d", "score": "0.49866128", "text": "function getTopTenUsersTotalPlayingTimeByDifficulty() {\n\n global $statistics;\n\n $returnVal = [];\n $returnVal[\"easy\"] = $statistics->getTopTenUsersTotalPlayingTimeByDifficulty(1);\n $returnVal[\"medium\"] = $statistics->getTopTenUsersTotalPlayingTimeByDifficulty(2);\n $returnVal[\"hard\"] = $statistics->getTopTenUsersTotalPlayingTimeByDifficulty(3);\n $returnVal[\"multiplayer\"] = $statistics->getTopTenUsersTotalPlayingTimeByDifficulty(4);\n\n echo json_encode($returnVal);\n}", "title": "" }, { "docid": "a4c223ffdce7ee183c6518e02768ed99", "score": "0.49800426", "text": "public function getFBCostEstimateAttribute()\n {\n return $this->fb_costs->sum('estimate');\n }", "title": "" }, { "docid": "a2b245e664d1a9af9538c52805558162", "score": "0.4978229", "text": "public function getMaxCost()\n {\n return $this->max_cost;\n }", "title": "" }, { "docid": "d81997585e7693e3f28402e664d9d94d", "score": "0.49755603", "text": "function printMaxUsage($n,$resource = \"php://stdout\")\r\n {\r\n \r\n $i = 0;\r\n if ($resource == \"php://stdout\") {\r\n $fh = fopen($resource, \"w\");\r\n } else {\r\n $fh = fopen($resource, \"a+\");\r\n }\r\n $peak = $this->usage[$this->getPeak()];\r\n $this->sortMemUsage($peak[\"objects\"]);\r\n fprintf($fh, \"VM Size total: %10skB\\n\", $peak['Size']);\r\n fprintf($fh, \"RSS : %10skB Total\\n\", $peak['Rss']);\r\n fprintf($fh, \" : %10skB Shared total\\n\", $peak['Shared_Dirty'] + $peak[\"Shared_Clean\"]);\r\n fprintf($fh, \" %10skB Private Clean\\n\", $peak['Private_Clean']);\r\n fprintf($fh, \" %10skB Private Dirty\\n\", $peak['Private_Dirty']);\r\n fprintf($fh, \"%10s %10s %10s %-15s\\n\", \"vm size\", \"Clean\", \"Dirty\", \"File name\");\r\n fprintf($fh, \"%'-59s\\n\", \"-\");\r\n foreach ($peak[\"objects\"] as $key) {\r\n $i++;\r\n if ($i > $n) {\r\n break;\r\n }\r\n // If it's anonymous, don't print it.\r\n if ($key[\"name\"] != \"\") {\r\n fprintf($fh, \"%8skB %8skB %8skB %-18s\\n\", $key['Size'], $key[\"Private_Clean\"], $key[\"Private_Dirty\"], $key[\"name\"]);\r\n } else {\r\n $i--;\r\n }\r\n }\r\n fprintf($fh, \"%s\", \"\\n\");\r\n }", "title": "" }, { "docid": "bb0533bf2d5b5cf8a1de41c5f9eb7a5c", "score": "0.49750212", "text": "public function display_used_funds() {\n\t\tif ( self::using_funds() ) {\n\t\t\t$funds_amount = self::used_funds_amount();\n\t\t\tif ( $funds_amount > 0 ) {\n\t\t\t\t?>\n\t\t\t\t<tr class=\"order-discount account-funds-discount\">\n\t\t\t\t\t<th><?php _e( 'Account Funds', 'woocommerce-account-funds' ); ?></th>\n\t\t\t\t\t<td>-<?php echo wc_price( $funds_amount ); ?> <a href=\"<?php echo esc_url( add_query_arg( 'remove_account_funds', true, get_permalink( is_cart() ? wc_get_page_id( 'cart' ) : wc_get_page_id( 'checkout' ) ) ) ); ?>\"><?php _e( '[Remove]', 'woocommerce-account-funds' ); ?></a></td>\n\t\t\t\t</tr>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "321f90cad207b284540463708c4f2c2b", "score": "0.4974295", "text": "public function getBestTime() {\n return $this->bestTime;\n }", "title": "" } ]
fddf4bae7ae411483e2bc6e4debce07d
Transform the resource into an array.
[ { "docid": "e7efff206792d4e5bf5688dab4c928ed", "score": "0.0", "text": "public function toArray($request)\n {\n return [\n 'uuid' => $this->uuid,\n 'title' => $this->title,\n 'excerpt' => $this->excerpt,\n 'body' => $this->body,\n 'image' => FileHelper::getModelImageUrl($this),\n 'nb_views' => $this->nb_views,\n 'is_pinned' => $this->is_pinned,\n 'user' => UserResource::make($this->user),\n 'created_at' => $this->created_at,\n 'updated_at' => $this->updated_at,\n ];\n }", "title": "" } ]
[ { "docid": "4e25e3947863b33203911dacd6316143", "score": "0.7715773", "text": "public function asArray() {\n return $this->resource;\n }", "title": "" }, { "docid": "abb04d3f80256573238151dabae942d1", "score": "0.76768947", "text": "public function toArray() {\n $a = array();\n if( $this->resource ) {\n $a[\"resource\"] = $this->resource;\n }\n return $a;\n }", "title": "" }, { "docid": "59931585c009e85b0ccd0a70ae01975e", "score": "0.74888384", "text": "public function toArray() {\n $a = parent::toArray();\n if( $this->resource ) {\n $a[\"resource\"] = $this->resource;\n }\n return $a;\n }", "title": "" }, { "docid": "45fe1c0e6a5c43bc5f44575ca798986b", "score": "0.7394696", "text": "public function toArray() {\n $a = array();\n if( $this->resourceId ) {\n $a[\"resourceId\"] = $this->resourceId;\n }\n if( $this->resource ) {\n $a[\"resource\"] = $this->resource;\n }\n return $a;\n }", "title": "" }, { "docid": "73859107f3d793e942f6d451dfad781f", "score": "0.73854", "text": "public function toArray()\n {\n return $this->resource->toArray();\n }", "title": "" }, { "docid": "d33cbd95f9a8db51c7549e83e71b7a16", "score": "0.7158139", "text": "public function transform($resource)\n {\n return [\n 'id' => (int) $resource['id'],\n 'category_id' => (int) $resource['category_id'],\n 'name' => $resource['name'],\n 'description' => $resource['description'],\n 'price' => (double) $resource['price'],\n 'display_price' => format_currency($resource['price']),\n 'image' => $resource['image'],\n 'status' => (int) $resource['status']\n ];\n }", "title": "" }, { "docid": "1bec63b61e26555d32d80a87ec54c55b", "score": "0.70493937", "text": "public function __toArray()\r\n {\r\n return array(\r\n 'resource' => $this->resource,\r\n 'permissions' => $this->permissions\r\n );\r\n }", "title": "" }, { "docid": "6a49635eadcc89df81bde3cc75fdc035", "score": "0.7023718", "text": "public function toArray() {\n $a = array();\n if( $this->survivorResource ) {\n $a[\"survivorResource\"] = $this->survivorResource->toArray();\n }\n if( $this->duplicateResource ) {\n $a[\"duplicateResource\"] = $this->duplicateResource->toArray();\n }\n return $a;\n }", "title": "" }, { "docid": "b08f6dc6e06fa5869b69cc9a569f905b", "score": "0.69862056", "text": "public function toArrayAPI();", "title": "" }, { "docid": "08dac2256517d89f2beb8242a0ddee4c", "score": "0.69516", "text": "public function toArray($request)\n {\n return $this->resource->toArray(); \n }", "title": "" }, { "docid": "b0b3958da4592784a0b7f35f730b2f63", "score": "0.6891905", "text": "public function toArray() {\n $a = parent::toArray();\n if( $this->resourceId ) {\n $a[\"resourceId\"] = $this->resourceId;\n }\n if( $this->resource ) {\n $a[\"resource\"] = $this->resource;\n }\n if( $this->attribution ) {\n $a[\"attribution\"] = $this->attribution->toArray();\n }\n return $a;\n }", "title": "" }, { "docid": "f7cd1e81b86fc1eb38e46afcb06e4bed", "score": "0.68831193", "text": "abstract public function getAsArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "007009a256b8811ae7e6e77201ba8f06", "score": "0.6826952", "text": "public function transform($resource)\n {\n return [\n\n 'id' => $resource->id,\n 'name' => $resource->name,\n 'description' => $resource->description,\n 'sort' => $resource->sort,\n 'status' => $resource->status,\n 'created_at' => (string)$resource->created_at,\n 'updated_at' => (string)$resource->updated_at,\n 'categories' => $resource->categories,\n\n ];\n }", "title": "" }, { "docid": "db1aafbeb74f0afeb9de35e1b5db45ed", "score": "0.6813926", "text": "public abstract function as_array();", "title": "" }, { "docid": "61591c345fcce0642362aab01322a7cb", "score": "0.6801408", "text": "public function asArray()\n {\n return json_decode($this->asJson(), true);\n }", "title": "" }, { "docid": "7efad91c2502fd48ffca26587565fdd6", "score": "0.6782203", "text": "public function convert(): array;", "title": "" }, { "docid": "ff2dfbd680415cd97f04fffd9a94e02b", "score": "0.6731324", "text": "public function toArray()\n {\n $a = array();\n if ($this->resourcesToDelete) {\n $ab = array();\n foreach ($this->resourcesToDelete as $i => $x) {\n $ab[$i] = $x->toArray();\n }\n $a['resourcesToDelete'] = $ab;\n }\n if ($this->resourcesToCopy) {\n $ab = array();\n foreach ($this->resourcesToCopy as $i => $x) {\n $ab[$i] = $x->toArray();\n }\n $a['resourcesToCopy'] = $ab;\n }\n return $a;\n }", "title": "" }, { "docid": "f2a9ea38b2041450bfe04b738c90c037", "score": "0.67253405", "text": "public function toArray()\n {\n }", "title": "" }, { "docid": "769038b2f53ef031f8aa4d5aa32408b1", "score": "0.6706456", "text": "public function toArray(){\n\t\tif ( empty( $this->data ) ) {\n\t\t\t$this->set_data();\n\t\t}\n\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "02bd9782c7bfaacd4c61c6192b3d4b96", "score": "0.66785425", "text": "public function __toArray();", "title": "" }, { "docid": "afeddd7275f3369e2b5a48d1fb3cbf95", "score": "0.6665385", "text": "public function toArray() {\n $a = array();\n if( $this->resourcesToDelete ) {\n $ab = array();\n foreach( $this->resourcesToDelete as $i => $x ) {\n $ab[$i] = $x->toArray();\n }\n $a['resourcesToDelete'] = $ab;\n }\n if( $this->resourcesToCopy ) {\n $ab = array();\n foreach( $this->resourcesToCopy as $i => $x ) {\n $ab[$i] = $x->toArray();\n }\n $a['resourcesToCopy'] = $ab;\n }\n return $a;\n }", "title": "" }, { "docid": "edd78c252e6527cebbbc55e6ecdabc41", "score": "0.665781", "text": "abstract protected function _toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "f9e5d006714b5b5344a2299fc4e0eca8", "score": "0.6648404", "text": "final public function toArray()\n {\n }", "title": "" }, { "docid": "af2116a5083e8bf204fa266d50d9886d", "score": "0.6634635", "text": "protected function toArray()\n {\n return (array) json_decode($this->toString(), true);\n }", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" } ]
d4711710e580040ca8ae0145ae65d07d
/ Sets a value for the given key that will be available only on the next request.
[ { "docid": "b134330ff349922dd6747cef1d688f78", "score": "0.0", "text": "public abstract function flash($key, $value=null);", "title": "" } ]
[ { "docid": "c65e82f67dd7694402436fbe8675bad6", "score": "0.7419647", "text": "private function _set($key, $value) {\n\t\t$data = $this->_get_all();\n\t\t$data[$key] = $value;\n\t\t$this->load->vars($this->_data_array_id, $data);\n\t}", "title": "" }, { "docid": "379c5c37d697d89d58dc6449882e5e66", "score": "0.7229779", "text": "public function set_key( $key );", "title": "" }, { "docid": "a3f98db9794a76b9712c43ffc15304b4", "score": "0.71258986", "text": "function set($key, $value) {\n\t\t$this->response[$key] = $value;\n\t}", "title": "" }, { "docid": "092dc6e2c05fb28b1d1ecd3e92f021bc", "score": "0.7110309", "text": "public function __set($key,$value){\n $this->rest_result[$key]=$value;\n }", "title": "" }, { "docid": "1fa0a4aab203501f0230672dc800b3bc", "score": "0.7088191", "text": "public function setValue($key, $value);", "title": "" }, { "docid": "555370955bee9a8a6689eca972f63e05", "score": "0.7087049", "text": "function set($key, $value){\n $this->data[$key] = $value; \n }", "title": "" }, { "docid": "b7af494f9d8ec76457267d47337b131b", "score": "0.7073225", "text": "public function set(string $key, $value): void\n {\n if (!$this->isLoggedIn()) {\n $this->logIn();\n }\n $value = strval($value);\n $this->data[$key] = $value;\n $this->saveChanges();\n return;\n }", "title": "" }, { "docid": "31aeb96c11126836645271ed0f828a0c", "score": "0.70644844", "text": "abstract protected function setValue($key, $value);", "title": "" }, { "docid": "ddd9ba53e4b66a057c4d35452cc333cc", "score": "0.70571804", "text": "function setValue($key, $value);", "title": "" }, { "docid": "e6c9e065966a903a7ab86a6cea7576e1", "score": "0.6987063", "text": "public function __set($key, $value) {\n\t\t$this->key = $value;\n\t}", "title": "" }, { "docid": "d4a64469adcf816c0e09fe1c08b71544", "score": "0.69738126", "text": "public function set($key, $value)\n {\n $this->repository->forever($this->prefixKey($key), $value);\n }", "title": "" }, { "docid": "3d7c873da9cc11188bf71a3962c5dae5", "score": "0.69691217", "text": "public function __set($key, $value){\n\t\t$this->data[$key] = $value;\n\t}", "title": "" }, { "docid": "07ac397b13ea46f9a5671127d55ca9d9", "score": "0.6956125", "text": "public static function set($key, $value) {\n $_REQUEST[$key] = $value;\n }", "title": "" }, { "docid": "af4db27953840cfd7043d648af330127", "score": "0.6952178", "text": "public function set_value($fieldKey, $value){\n\t\tif(!isset($this->init_map['core:requests:fields'][$fieldKey])||$fieldKey=='request:active')\n\t\t\treturn -1;\n\t\tunset($this->init_map['core:requests:fields'][$fieldKey]['value']);\n\t\t$this->init_map['core:requests:fields'][$fieldKey]['value']=$value;\n\t\t//$this->addValue($fieldKey, $value);\n\t}", "title": "" }, { "docid": "ebb4ccdae48bb5d90eaeb09535dc92c3", "score": "0.69456846", "text": "public function set( $key, $value );", "title": "" }, { "docid": "963c9c1027931c775b1d2867c296e5d6", "score": "0.6941491", "text": "private function set($key, $value)\n {\n $this->data[$key] = $value;\n }", "title": "" }, { "docid": "d0e684d9487b5ca7d6a0f835b8c51c84", "score": "0.693219", "text": "public function __set($key, $value){\n $this->_data[$key] = $value;\n }", "title": "" }, { "docid": "6d110d9e88fdfa7c1436454158b49f9b", "score": "0.6930352", "text": "public function __set($key, $value)\n {\n if (preg_match('/custom_field_(\\d+)/', $key, $bidData)) {\n $value2 = $this->getCustomFieldValues()->get($bidData[1], true);\n $value2->setValue($value);\n }\n }", "title": "" }, { "docid": "6cbad26f898c5f9a237cc7bcbc9fd90d", "score": "0.6928238", "text": "public function set(string $key, $value): void\n {\n\t\t$this->data[$key] = $value;\n\t}", "title": "" }, { "docid": "36e1c47beaf620a64ca0a4aa1e917982", "score": "0.69261426", "text": "public function set($key, $value) {}", "title": "" }, { "docid": "7da5f56eb2506ed8edb5050d8d066557", "score": "0.6912206", "text": "public function __set ($key, $value);", "title": "" }, { "docid": "b8625f78b1a5c0310dd19924da5f1cf4", "score": "0.690111", "text": "public function set($key, $value) {\n $this->temporaryData[$key] = $value;\n }", "title": "" }, { "docid": "6ae1795ec2d5447bf9a296688f187ec3", "score": "0.6872803", "text": "public abstract function set($key, $value);", "title": "" }, { "docid": "96017908dd1517ef6b5f0abf5803a3ec", "score": "0.6868238", "text": "public function __set(string $key, $value) {\n\t\t\t$this->data[$key] = $value;\n\t\t}", "title": "" }, { "docid": "e134af7e685dc38e27383fb6516da8d6", "score": "0.6867613", "text": "function setValue($key, $value) {\r\n\t\t\t$_SESSION[$this->prefix.$key] = $value;\r\n\t\t}", "title": "" }, { "docid": "8024fd57a9371062820681c4e4bdf0e2", "score": "0.6867382", "text": "public static function setData(string $key, $value)\n {\n static::$data[static::getRequestedCoroutineId()][$key] = $value;\n }", "title": "" }, { "docid": "e450253fe859e6fad581ffcb482d528e", "score": "0.6850683", "text": "private function setkey($key){\n\t\t$this->key = $key;\n\t}", "title": "" }, { "docid": "336dd0343a6d0247591e088e660107f0", "score": "0.68495464", "text": "final public function __set(string $key, string $value): void\n\t{\n\t\t$this->set($key, $value, $this->getExpires(), $this->getPath(),\n\t\t\t$this->getDomain(), $this->getSecure(), $this->getHttpOnly(), $this->getSameSite());\n\t}", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.68437135", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.68437135", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.68437135", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.68437135", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.68437135", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.68437135", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.68437135", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.68437135", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.68437135", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.68437135", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.68437135", "text": "public function set($key, $value);", "title": "" }, { "docid": "eff178f0f31a7b65ab3549c7fdd7abf8", "score": "0.6829727", "text": "public function set($key,$value){\n\t\t$this->_data[$key] = $value;\n\t\t$this->_memcache->set($this->_session_id,addslashes(serialize($this->_data)),FALSE ,SESSION_LIFE_TIME);\n\t}", "title": "" }, { "docid": "76a694d7d20ad27ca8f8862a675ee16c", "score": "0.682912", "text": "public function set(string $key, $value): void;", "title": "" }, { "docid": "bc566dff78c06b0cb2159cecababc11b", "score": "0.67942554", "text": "public function __set($key, $value) {\r\n\t\t\r\n\t\t$this->set($key, $value);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "abe38db7bbeac8e8a5fcac236b5e85e9", "score": "0.67901444", "text": "public function __set($key, $value)\n {\n $this->item[$key] = $value;\n }", "title": "" }, { "docid": "8fada376d2c7474ba514d5a818a5268d", "score": "0.6788672", "text": "public function __set( $key, $value ) \n\t{\n\t $this->_data[$key] = $value;\n\t}", "title": "" }, { "docid": "45477b48c1a4e61605c33c45202a095b", "score": "0.67789197", "text": "public function __set($key, $value){\n $this->values[$key] = $value;\n }", "title": "" }, { "docid": "0a6a56d46f1d7ee1eb93ab6327e60ba1", "score": "0.67724186", "text": "abstract public function set($key, $value);", "title": "" }, { "docid": "26da45df590b34f6c19a64e0bf492dc0", "score": "0.67682064", "text": "public function set($key, $value) {\n\t\t$this->_data[$key] = $value;\n\t}", "title": "" }, { "docid": "861469800ff03d973fb2bd20b7177e6b", "score": "0.6766755", "text": "public function set(string $key, $value):void;", "title": "" }, { "docid": "6e07fb464196f08627318804ffcc871b", "score": "0.67547643", "text": "public function set($key, $data);", "title": "" }, { "docid": "5ed43c03c97cb1f04cb352176fa69e44", "score": "0.67525506", "text": "public function setData($key, $value);", "title": "" }, { "docid": "73ae3e76d7895bbae41a384480f0a7fd", "score": "0.6750836", "text": "public function set($key, $value)\n {\n $this->handler->put($this->sessionPrefix . $key, $value);\n }", "title": "" }, { "docid": "29871b6ff8fd555b1f871f4a673a3bc8", "score": "0.675081", "text": "public function set(string $key, string $value);", "title": "" }, { "docid": "df2597bfac1542492ca08526ff5a7f9f", "score": "0.6742789", "text": "public function __set(string $key, $value);", "title": "" }, { "docid": "87ed436ed7a4c36c267d986b99ad7673", "score": "0.67363954", "text": "public function __set($key, $value)\n\t{\n\t\t// stores the data\n\t\t$this->_data[$key] = $value;\n\t}", "title": "" }, { "docid": "fc01e9e02d2ce413ca1caf2255fc134e", "score": "0.6729506", "text": "public function __set($key, $value) {\n $this->data[$key] = $value;\n }", "title": "" }, { "docid": "bb9303cee07d76bc6fa557599e840e09", "score": "0.6726212", "text": "public function set(string $key, $value);", "title": "" }, { "docid": "f8b30eb8900dc38a638927cdaddee976", "score": "0.6719424", "text": "public function set($key, $value)\n {\n $this->load();\n $this->data[$key] = $value;\n }", "title": "" }, { "docid": "054e84cc7c5a0676a801765f2d12de3c", "score": "0.67153734", "text": "public function __set($key, $value)\n\t{\n\t\t$this->data[$key] = $value;\n\t}", "title": "" }, { "docid": "054e84cc7c5a0676a801765f2d12de3c", "score": "0.67153734", "text": "public function __set($key, $value)\n\t{\n\t\t$this->data[$key] = $value;\n\t}", "title": "" }, { "docid": "054e84cc7c5a0676a801765f2d12de3c", "score": "0.67153734", "text": "public function __set($key, $value)\n\t{\n\t\t$this->data[$key] = $value;\n\t}", "title": "" }, { "docid": "75e79c453fbbae8012a5f35908e41ba6", "score": "0.66988146", "text": "public function __set( $key, $value )\n\t\t{\n\t\t\t\n\t\t\tif ( !isset( $this->$key ) )\n\t\t\t\t$this->_data[$key] = $value;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "83340b5e07b9d2f2545421a34266485c", "score": "0.6691408", "text": "public function __set( $key , $value )\n {\n $this->content[$key] = $value;\n }", "title": "" }, { "docid": "c36bd27b462de177a73df2d272cf92bb", "score": "0.6690699", "text": "public function __set($key, $value)\n {\n $this->data[$key] = $value;\n }", "title": "" }, { "docid": "c36bd27b462de177a73df2d272cf92bb", "score": "0.6690699", "text": "public function __set($key, $value)\n {\n $this->data[$key] = $value;\n }", "title": "" }, { "docid": "552ba26978c0befe4020e822633a8d9d", "score": "0.66856706", "text": "private function set($key, $value) {\n $this->segment->set($key, $value);\n }", "title": "" }, { "docid": "402fc8d3c70a7aa143fec7a5b8eac00a", "score": "0.6679556", "text": "public function __set($key, $value)\n\t{\n\t\t$this->_data[$key] = $value;\n\t}", "title": "" }, { "docid": "28de94531212c71e987e6d7df9812096", "score": "0.6679451", "text": "abstract public function set(string $key, $value): void;", "title": "" }, { "docid": "e9c5756c4d3bde206dd72081f36b21a1", "score": "0.66768306", "text": "public function set(string $key, $value)\n {\n $this->data[$key] = $value;\n }", "title": "" }, { "docid": "7fb01ed455066ad9d583e67cd81d5cbc", "score": "0.6669659", "text": "public function __set($key, $value) {\n $this->set($key, $value);\n }", "title": "" }, { "docid": "273ede8788738eb24c12f190bbd7ab91", "score": "0.6659602", "text": "public function set($key, $value)\n {\n }", "title": "" }, { "docid": "c2db125499a88ca4ce050b1653770762", "score": "0.6658509", "text": "public function SetKey($key) { \n $this->m_key = $key; \n }", "title": "" }, { "docid": "4eaf48a33af9cf2395cc816747ea2ee0", "score": "0.6656563", "text": "public function __set($key, $value)\n {\n }", "title": "" }, { "docid": "8b59374afeecc3bd1dadfd9bc9337b16", "score": "0.66432196", "text": "public static function set($key, $value)\n {\n }", "title": "" }, { "docid": "793101a585706d3ff7059edfa421040b", "score": "0.6642241", "text": "public function setData($key, $value = null);", "title": "" }, { "docid": "8e36a16e639048d64341adbee12e75c5", "score": "0.6630719", "text": "public function set($key, $value) {\n\t\t$_SESSION[$this->installID][$key] = $value;\n\t}", "title": "" }, { "docid": "6d31494f5747878b207b7c17934682dc", "score": "0.66276455", "text": "public function set($key, $value)\n {\n $this->data[$key] = $value;\n }", "title": "" }, { "docid": "6d31494f5747878b207b7c17934682dc", "score": "0.66276455", "text": "public function set($key, $value)\n {\n $this->data[$key] = $value;\n }", "title": "" }, { "docid": "6d31494f5747878b207b7c17934682dc", "score": "0.66276455", "text": "public function set($key, $value)\n {\n $this->data[$key] = $value;\n }", "title": "" }, { "docid": "e22a3ccdebc8841ee26d8336073f6966", "score": "0.6626558", "text": "protected function set_data($key, $value)\n {\n $this->result['data'][$key] = $value;\n }", "title": "" }, { "docid": "90148c10a58d997392b3e97e66b198c6", "score": "0.66258717", "text": "abstract protected function setValue($key, $value, $expiry = 0);", "title": "" }, { "docid": "cf29e861505eb2bbed68ad0bda99031c", "score": "0.66258484", "text": "public function __set($key, $value)\n {\n $this->set($key, $value);\n }", "title": "" }, { "docid": "e19ab45df81be113f9d20df34591e5c7", "score": "0.66154814", "text": "public function set($key, $value = null);", "title": "" }, { "docid": "62b2d8c2be9a306d20d70f7401d986c0", "score": "0.66033345", "text": "final public function set(string $key, mixed $value): void\n {\n if ($this->data === null) {\n $this->data = [];\n }\n\n $this->data[$key] = $value;\n }", "title": "" }, { "docid": "7f620f27029de032c7e814df7ed7e7b5", "score": "0.65995574", "text": "public function set($key, $value)\r\n {\r\n $_SESSION[$key] = $value;\r\n }", "title": "" }, { "docid": "c1bc0896aa40a6271b61f743d5aad4d9", "score": "0.65949214", "text": "public function __set($key , $value)\n {\n $this->content[$key] = $value;\n }", "title": "" }, { "docid": "78cb8aa8d2fa7f1d85c75161879a47ee", "score": "0.6593879", "text": "function set($key, $value)\n {\n $index = array_search($key, $this->keys);\n\n if ($index !== false) {\n $this->values[$index] = $value;\n } else {\n $this->keys[] = $key;\n $this->values[] = $value;\n }\n }", "title": "" }, { "docid": "a1edebbdf366b38dc51e8a3b08708739", "score": "0.6587362", "text": "public function set(string $key, mixed $value)\n {\n $this->start();\n\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "3d565f93a334ebf164254a6a42ec0a8e", "score": "0.6572981", "text": "public function set($key, $value) {\n if (!empty($key) && is_string($key)) {\n $this->data[$key] = $value;\n }\n }", "title": "" }, { "docid": "e4f3993f03326f18b12d2e001777e033", "score": "0.6571007", "text": "public function set($key, $value)\n {\n $this->start();\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "6ff99c749d4abb9b1f722544cb623868", "score": "0.6568755", "text": "public static function set( $key, $value=FALSE ) {\n self::$Data[$key] = $value;\n return TRUE;\n }", "title": "" }, { "docid": "303721a224d90ee0618deafa5e33d1e3", "score": "0.65686214", "text": "public function set($key, $value)\n {\n parent::set($key, $value);\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "d90dc23cbe065915fafc0a7fd040736c", "score": "0.656804", "text": "public function set(string $key, mixed $value): void\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "720ef3c3f34bd483301bbe77048b70a9", "score": "0.65668297", "text": "public function set($key, $value): void\n {\n $this->data[$key] = $value;\n }", "title": "" }, { "docid": "059117ca4ef1b8abfbf16ca39cc67a0c", "score": "0.6561321", "text": "function setValue($key, $data)\r\n {\r\n $this->_record[$key] = $data;\r\n }", "title": "" }, { "docid": "ee663403ab22025e214167cf8303138d", "score": "0.6559393", "text": "abstract public function set($key, $value = null);", "title": "" }, { "docid": "73535cba0569cf510717c0be510c1f2a", "score": "0.65505004", "text": "protected function set($key, $value)\n {\n if ($key == 'default') $value = urlencode($value);\n\n $this->container->{$key} = $value;\n }", "title": "" }, { "docid": "2c790c976720d0d172b3d1835adfec80", "score": "0.65486544", "text": "public function __set($key, $value)\n {\n $this[$key] = $value;\n }", "title": "" }, { "docid": "6b56ec3dc006f74f92eba4f12a1bbb2c", "score": "0.6533468", "text": "public function set($key, $value)\n {\n $this->items[$key] = $value;\n }", "title": "" }, { "docid": "6b56ec3dc006f74f92eba4f12a1bbb2c", "score": "0.6533468", "text": "public function set($key, $value)\n {\n $this->items[$key] = $value;\n }", "title": "" }, { "docid": "f2df9d6160bb5f231b443a5831ac4fb2", "score": "0.6523322", "text": "public function set($key, $value)\n {\n $this->_params[$key] = $value;\n }", "title": "" }, { "docid": "f2df9d6160bb5f231b443a5831ac4fb2", "score": "0.6523322", "text": "public function set($key, $value)\n {\n $this->_params[$key] = $value;\n }", "title": "" } ]
4a7fbd50206be40ce1286ae10e2b607c
/ Get the first page off all the books and create a new path alias
[ { "docid": "502f389d9c4339c3df44eea0b3abd2c6", "score": "0.5654072", "text": "function add_book_alias_to_dlts_books_page() {\n $results = db_query('\n SELECT \n n.nid,\n i.field_is_part_of_value\n FROM {node} n\n LEFT JOIN {field_data_field_sequence_number} s ON n.nid = s.entity_id\n LEFT JOIN {field_data_field_is_part_of} i ON n.nid = i.entity_id\n WHERE type = :type AND s.field_sequence_number_value = 1\n ', array(':type' => 'dlts_book_page')); \n\n foreach ( $results as $key => $result ) {\n drush_print('Inserting alias books/' . $result->field_is_part_of_value . ' to node/' . $result->nid );\n db_insert('url_alias')->fields(\n array(\n 'source' => 'node/' . $result->nid,\n 'alias' => 'books/' . $result->field_is_part_of_value,\n 'language' => 'en',\n )\n )\n ->execute();\n \n }\n}", "title": "" } ]
[ { "docid": "16be7cdf18f1aba3cc97fe81c70a7a90", "score": "0.5860269", "text": "public function path()\n {\n return \"/books/{$this->slug}\";\n }", "title": "" }, { "docid": "fffb9a62065372fc4a5bc758d83dfcbd", "score": "0.58032584", "text": "public function path(): string\n {\n return '/books/' . $this->id;\n }", "title": "" }, { "docid": "5e53af7ffed7e652ca7702b704cf6bf3", "score": "0.5716598", "text": "public function getPagePath();", "title": "" }, { "docid": "1483538a6e3989035b1d01ebaf10660e", "score": "0.56640464", "text": "function manual_book($url_segment) {\n global $breadcrumbs;\n array_push($breadcrumbs, ['name' => 'Manual Book User', 'url' => Route('manual_book')]);\n }", "title": "" }, { "docid": "148a91ce1907f7dd280d2816541874b5", "score": "0.55864215", "text": "function getBooksPath($locale);", "title": "" }, { "docid": "8e7acf9d098d92f13749d461ee174e67", "score": "0.5527182", "text": "function bookByName_get(){\n $name = $this->get('Location');\n \n if(!$name){\n $this->response(\"No Name specified\", 400);\n exit;\n }\n \n $result = $this->books->getbookbyname( $name );\n \n if($result){\n $this->response($result, 200); \n exit;\n } \n else{\n $this->response(\"Invalid Name\", 404);\n exit;\n }\n }", "title": "" }, { "docid": "7fd745b6000ac6d88fe68acbca5b4f4f", "score": "0.5328804", "text": "public function page_uri_index()\n {\n }", "title": "" }, { "docid": "4acc95e87027245c25bce79da36ed5a8", "score": "0.53223526", "text": "function loadBookByTitle ( $title ) {\r\n // $book = loadBookByTitle ( $aboutPage->title );\r\n // $parentBook = $book[ 0 ][ 'bid' ];\r\n // drupal_set_message_array($aboutPage, \"wowwww\");\r\n\r\n\r\n// $books = book_get_books ();\r\n $result = db_query ( \"SELECT n.nid FROM {node} n WHERE n.title = :title AND n.type = :type\" ,\r\n array ( \":title\" => $title , \":type\" => 'book' ) );\r\n $nid = $result->fetchField ();\r\n\r\n if ( isset( $nid ) ) {\r\n\r\n $query = db_select ( 'book' , 'b' , array ( 'fetch' => PDO::FETCH_ASSOC ) );\r\n $query->join ( 'node' , 'n' , 'b.nid = n.nid' );\r\n $query->join ( 'menu_links' , 'ml' , 'b.mlid = ml.mlid' );\r\n $query->condition ( 'n.nid' , $nid );\r\n $query->addField ( 'n' , 'nid' , 'nid' );\r\n $query->addField ( 'n' , 'type' , 'type' );\r\n $query->addField ( 'n' , 'title' , 'title' );\r\n $query->addField ( 'n' , 'uid' , 'uid' );\r\n $query->fields ( 'b' );\r\n\r\n $result2 = $query->execute ();\r\n\r\n foreach ( $result2 as $link ) {\r\n $all_books[ ] = $link;\r\n }\r\n\r\n// drupal_set_message_array ( $nid );\r\n drupal_set_message_array ( $all_books );\r\n\r\n return $all_books;\r\n } else {\r\n\r\n drupal_set_message_array ( \"there is not book by title \" . $title );\r\n\r\n }\r\n\r\n\r\n}", "title": "" }, { "docid": "600089ac7b843fbcdc67b2d2d0ba15cf", "score": "0.53114593", "text": "function getPageByPath($path) {\n $CI=& get_instance();\n $CI->load->database();\n \n $data = $CI->db\n ->select('pages.*')\n ->where('uri_path',$path)\n //->order_by('pages_detail.title','asc')\n ->limit(1)\n ->get('pages')\n ->row_array();\n \n return $data;\n }", "title": "" }, { "docid": "0da22c56b896889eebc4d97ff70ae21b", "score": "0.5306953", "text": "function _redirect_single_book()\n{\n if ( is_tax( 'book_category' ) || is_singular( 'book' ) ) {\n wp_safe_redirect( get_post_type_archive_link( 'book' ), 302 );\n exit();\n }\n}", "title": "" }, { "docid": "86451d2634beb383b59d0accbcdf2f07", "score": "0.52499205", "text": "function get_page_by_path($page_path, $output = \\OBJECT, $post_type = 'page')\n {\n }", "title": "" }, { "docid": "230cb31000a0d9749a2bce31de191a0d", "score": "0.52008694", "text": "function omv_get_next_page($series, $chapter_number_e, $current_page, $nb_pages, $next_chapter) {\nif ($current_page < $nb_pages) {\nreturn $series . '/' . $chapter_number_e . '/' . ($current_page + 1);\n} else if ($next_chapter) {\nreturn $series . '/' . $next_chapter['number'];\n} else {\nreturn null;\n}\n}", "title": "" }, { "docid": "6d3a2439e0eee0a7289489dc2d6fb428", "score": "0.5131529", "text": "function omv_get_previous_page($series, $chapter_number_e, $current_page, $nb_pages, $previous_chapter,$series_id) {\nif ($current_page > 1) {\nreturn $series . '/' . $chapter_number_e . '/' . ($current_page - 1);\n} else if ($previous_chapter) {\n$pages = $nb_pages;\nreturn $series . '/' . $previous_chapter['number'] . '/' .$pages;\n} else {\nreturn null;\n}\n}", "title": "" }, { "docid": "ad9a87a16b145f829e984d9a42cc370f", "score": "0.5114182", "text": "public function getBooks()\n {\n $page = isset($_GET['page']) ? $_GET['page'] : 1;\n $this->limit = isset($_GET['limit']) ? $_GET['limit'] : $this->limit;\n $offset = $this->limit * ($page - 1);\n\n\n if (USE_ONE_TABLE) {\n $this->table = 'books_authors';\n $sql = \"SELECT * FROM $this->table WHERE `deleted` is NULL LIMIT :limit OFFSET :offset\";\n } else {\n $this->table = 'relations';\n $sql = \"SELECT books.id, book_name, GROUP_CONCAT(name_author SEPARATOR ', ') as 'author' , year, num_pages, about_book, deleted, views, clicks, image\n FROM books \n JOIN relations ON book_id = books.id\n JOIN authors ON authors.id = author_id\n WHERE deleted is NULL \n GROUP BY id\n LIMIT :limit OFFSET :offset\";\n }\n\n $params = [\n [\":limit\", $this->limit, \\PDO::PARAM_INT],\n [\":offset\", $offset, \\PDO::PARAM_INT]\n ];\n return $this->bindAndQuery($sql, $params);\n }", "title": "" }, { "docid": "15c3714ae82e4349af8611094eec88d5", "score": "0.5088046", "text": "public function index()\n {\n $books = Item::whereType(1)\n \t\t\t->translatedIn($this->locale)\n \t\t\t->has('translatedLinks')\n \t\t\t->whereHas('scholars', function($query){\n \t\t\t\t$query->published();\n \t\t\t})->orWhereHas('series', function($query){\n \t\t\t\t$query->published();\n \t\t\t})->latest()\n ->withCurrentLocale()\n ->with(['translatedLinks', 'photo','tags.translations','series' => function($query){\n \t$query->withCurrentLocale()->with('photo', 'tags.translations', 'scholars.translations');\n }, 'scholars' => function($query){\n \t$query->withCurrentLocale()->with('photo');\n }])\n ->paginate(10);\n\n return view('FrontEnd/books/index', compact('books'));\n }", "title": "" }, { "docid": "abc523fc0e500a64bbe822599c40bdaa", "score": "0.5084113", "text": "function pagename ($pagex) {\n $page = array_reverse(explode('/',$pagex));\n $page = $page[0];\n\n return $page;\n}", "title": "" }, { "docid": "ea43a79fd12bd5dff2bffb4510a5d10e", "score": "0.5062742", "text": "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "title": "" }, { "docid": "896de734386b2adee89f3d9e7126bf79", "score": "0.5026507", "text": "function finalPageName()\n{\n\t$urlname = $_SERVER[\"REQUEST_URI\"]; //to get complete url //\n\t$urlurl = explode(\"/\",$urlname); // to explode based on '/' to get array of folders //\n\t$cnturl = count($urlurl); // count all folders in array //\n\t$finalpagename_q = $urlurl[$cnturl-1]; // to get last page of url //\n\t$arr_of_qs = explode(\"?\",$finalpagename_q); // to remove query string from last page //\n\t$finalpagename = $arr_of_qs[0]; // to get final page name //\n\treturn $finalpagename;\n}", "title": "" }, { "docid": "8517ffd3dc28b3218b1463d5fe9bc554", "score": "0.50085515", "text": "protected function getUpdatablePages() {}", "title": "" }, { "docid": "30ed1c1535c2227b0db6603e42d2d5d1", "score": "0.49908787", "text": "function get_book_files($book_toc, $cache) {\n $result = array();\n // debug('book_toc', $book_toc);\n // debug('cache', $cache);\n foreach ($book_toc as $item) {\n // TODO: only do this if it's not in the book_toc from the cache or it is in the cache_update\n // debug('item', $item);\n $published = array();\n foreach ($item['title'] as $key => $value) {\n $filename_md = $item['directory'].'-'.$key.'.md';\n $filename_html = $item['directory'].'-'.$key.'.html';\n if (is_published($item, $key, $cache)) {\n $published[$key] = array(\n 'raw' => $item['directory'].'/'.$filename_md,\n 'render' => array (\n 'source' => 'md',\n 'target' => 'html',\n 'filename' => $item['directory'].'/'.$filename_html,\n ),\n );\n }\n }\n $items = array();\n if (!empty($item['items'])) {\n $items = get_book_files($item['items'], $cache);\n }\n if (!empty($published) || !empty($items)) {\n $result[$item['directory']] = array (\n 'published' => $published,\n );\n $result = array_merge($result, $items);\n }\n }\n return $result;\n}", "title": "" }, { "docid": "5595beaac0fb73d2029db9375f16827c", "score": "0.4988119", "text": "protected function get_store_pages()\n {\n }", "title": "" }, { "docid": "9170c685bc5b920570d40e4af730672a", "score": "0.49829286", "text": "function book_create_objects($pageobjects, $bookid) {\n\n $chapters = array();\n $chapter = new stdClass;\n \n // same for all chapters\n $chapter->bookid = $bookid;\n $chapter->pagenum = count_records('book_chapters', 'bookid', $bookid)+1;\n $chapter->timecreated = time();\n $chapter->timemodified = time();\n $chapter->subchapter = 0;\n\n $i = 1; \n foreach ($pageobjects as $pageobject) {\n $page = prep_page($pageobject, $i); // get title and contents\n $chapter->importsrc = addslashes($pageobject->source); // add the source\n $chapter->title = $page->title;\n $chapter->content = $page->contents;\n $chapters[] = $chapter; \n \n // increment our page number and our counter\n $chapter->pagenum = $chapter->pagenum + 1;\n $i++;\n }\n\n return $chapters;\n}", "title": "" }, { "docid": "b3db8149057290c370b3157d6cc7762a", "score": "0.49773368", "text": "function drush_islandora_dss_islandora_book_alumni_ingest_pdf($pdf_dir_path = '/mnt/smb/dss/dss-production/Lafayette_AlumniPubs_13-117_final_delivery/PDFs_Consolidated/reduced_150ppi') {\n\n $connection = islandora_get_tuque_connection(user_load(1));\n\n $pdf_dir = new RecursiveDirectoryIterator($pdf_dir_path);\n $pdf_iter = new RecursiveIteratorIterator($pdf_dir);\n\n // Attempt to retrieve the PDF file\n //$pdf_files_iter = new RegexIterator($pdf_iter, '/' . $book_label . '\\.pdf/i', RecursiveRegexIterator::GET_MATCH);\n $pdf_files_iter = new RegexIterator($pdf_iter, '/' . '\\.pdf/i', RecursiveRegexIterator::GET_MATCH);\n\n // Filter for the most recent datastream\n $pdf_files = array();\n foreach($pdf_files_iter as $file_path => $value) {\n\n //print $file_path . \"\\n\";\n\n # lafalummag_19401000.pdf\n preg_match('/\\/([0-9a-zA-Z_]+)\\.pdf$/', $file_path, $m);\n $path_alias_segment = $m[1];\n $path_alias_segment = preg_replace('/_/', '-', $path_alias_segment);\n \n // https://digital.stage.lafayette.edu/collections/magazine/lafalummag-19380200\n $path_alias = \"collections/magazine/\" . $path_alias_segment;\n\n //print $path_alias . \"\\n\";\n\n $path = drupal_get_normal_path($path_alias);\n //print $path . \"\\n\";\n\n // preg_match('/\\/([az]+\\:\\d+)$/', $path, $pid_match);\n preg_match('/([a-z]+\\:\\d+)$/', $path, $pid_match);\n $pid = $pid_match[1];\n\n //print $pid . \"\\n\";\n\n $book = islandora_object_load($pid);\n drush_log(dt('Ingesting the PDF !pdf_file into the OBJ Datastream for !obj_pid...', array('!pdf_file' => $file_path,\n\t\t\t\t\t\t\t\t\t\t\t '!obj_pid' => $book->id)), 'ok');\n\n // Retrieve the Islandora Object\n $ds_obj = $book['OBJ'];\n $ds_obj->setContentFromFile($file_path);\n drush_log(dt('Ingested the PDF !pdf_file into the OBJ Datastream for !obj_pid...', array('!pdf_file' => $file_path,\n\t\t\t\t\t\t\t\t\t\t\t '!obj_pid' => $book->id)), 'success');\n\n \n }\n}", "title": "" }, { "docid": "8c4ed8db0ad6047e7410b0271d18bf81", "score": "0.49761665", "text": "public function index()\n {\n return $this->service->fetchResources(Book::class, 'books');\n }", "title": "" }, { "docid": "7cec5480c1721eb7a8b76892a0002b88", "score": "0.49490154", "text": "public function listLentBooks()\n {\n if (!$this->isLogged()) {\n header('Location: index.php');\n }\n\n $idUser = $this->user['id_user'];\n\n if (isset($_GET['page']) AND !empty($_GET['page'])) {\n $currentPage = (int) $this->cleanParam($_GET['page']);\n }\n else {\n $currentPage = 1;\n }\n\n $lentBookCount = $this->bookManager->lentBookCount($idUser);\n\n $perPage = 12;\n\n $pages = ceil($lentBookCount / $perPage);\n\n $first = ($currentPage * $perPage) - $perPage;\n\n if (isset($_GET['f']) AND !empty($_GET['f'])) {\n $filter = $this->cleanParam($_GET['f']);\n if($filter === \"title\") {\n $sortKey = \"title_book\";\n } else if ($filter === \"author\") {\n $sortKey = \"author_book\";\n } else if ($filter === \"all\") {\n $sortKey = \"date_add_book\";\n } else {\n $sortKey = \"date_add_book\";\n }\n }\n else {\n $sortKey = \"date_add_book\";\n }\n\n if(isset($_POST['button_search_engine'])) {\n if(isset($_POST['content_search']) && !empty($_POST['content_search'])) {\n $wishBook = 0;\n $lendBook = 1;\n $content = $this->cleanParam($_POST['content_search']);\n\n $searchBooks = $this->bookManager->listSearchBooks($idUser, $wishBook, $lendBook, $content);\n $countedBooksSearch = count($searchBooks);\n } \n } \n\n $listLentBooks = $this->bookManager->listLentBooks($idUser, $sortKey, $first, $perPage);\n\n if ($listLentBooks === false) {\n header('Location: index.php?action=error404');\n }\n\n require('App/View/listLentBooks.php');\n }", "title": "" }, { "docid": "a2729fc02ff5df8aa80b5d2fdcf65e49", "score": "0.49443692", "text": "public function index()\n {\n return BookResource::collection(Book::orderByDesc(\"id\")->get());\n }", "title": "" }, { "docid": "8cb2cf3ed3dbd1144cd27c838e35a3b4", "score": "0.49322328", "text": "function print_books(){\n $this->books = $this->books->items;\n\n echo \"<ul>\";\n foreach($this->books as $r){\n $volume = $r->volumeInfo;\n $bookId = $r->id;\n echo \"<li>\";\n echo \"<a href='details.php?id=\" . $bookId . \"'>\" . $volume->title . \"</a>\";\n //Lists volume authors if availible\n $this->print_authors($volume);\n echo \"</li>\";\n }\n echo \"</ul>\";\n }", "title": "" }, { "docid": "beec92ba1c5bcfd4c1f0b7612355f3b1", "score": "0.49299347", "text": "function make_clickable_path($path) {\n global $langRoot, $base_url, $group_sql;\n\n $cur = $out = '';\n foreach (explode('/', $path) as $component) {\n if (empty($component)) {\n $out = \"<a href='{$base_url}openDir=/'>$langRoot</a>\";\n } else {\n $cur .= rawurlencode(\"/$component\");\n $row = Database::get()->querySingle(\"SELECT filename FROM document\n WHERE path LIKE '%/$component' AND $group_sql\");\n $dirname = $row->filename;\n $out .= \" <span class='fa fa-chevron-right px-2 small-text'></span> <a href='{$base_url}openDir=$cur'>\".q($dirname).\"</a>\";\n }\n }\n return $out;\n}", "title": "" }, { "docid": "cee83d8ea84f1bb93314d193e333fc79", "score": "0.49249196", "text": "function get_page_uri($page = 0)\n {\n }", "title": "" }, { "docid": "c04dada777397fe55fd6545b0a30bc22", "score": "0.49022466", "text": "function books_get(){\n $result = $this->books->getallbooks();\n \n if($result){\n $this->response($result, 200); \n } \n else{\n $this->response(\"No record found\", 404);\n }\n }", "title": "" }, { "docid": "1e0f0ea4e5bfafc71e786e138b52c5c1", "score": "0.48999324", "text": "function firstPage($text='first',$escapeTitle=true) {\n\t\tif (empty($this->_pageDetails)) { return false; }\n\t\tif ($this->_pageDetails['page']<>1) {\n \treturn $this->_generateLink($text,1,$escapeTitle);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "2bce50d060c21196d2bf7c9283eedbb3", "score": "0.4897453", "text": "public function assembleBook()\n {\n $this->app->edition('id', $this->app['publishing.id']);\n\n // variables needed to hold the list of images and fonts of the book\n $bookImages = array();\n $bookFonts = array();\n\n // prepare the temp directory used to build the book\n $bookTempDir = $this->app['app.dir.cache']\n .'/'.$this->app['publishing.book.slug']\n .'-'.$this->app['publishing.edition'];\n\n $this->app->get('filesystem')->mkdir(array(\n $bookTempDir,\n $bookTempDir.'/book',\n $bookTempDir.'/book/META-INF',\n $bookTempDir.'/book/OEBPS',\n $bookTempDir.'/book/OEBPS/css',\n $bookTempDir.'/book/OEBPS/images',\n $bookTempDir.'/book/OEBPS/fonts',\n ));\n\n // generate easybook CSS file\n if ($this->app->edition('include_styles')) {\n $this->app->renderThemeTemplate(\n 'style.css.twig',\n array('resources_dir' => '..'),\n $bookTempDir.'/book/OEBPS/css/easybook.css'\n );\n\n // copy book fonts and prepare font data for ebook manifest\n $this->app->get('filesystem')->copy(\n $this->app['app.dir.resources'].'/Fonts/Inconsolata/Inconsolata.ttf',\n $bookTempDir.'/book/OEBPS/fonts/Inconsolata.ttf'\n );\n $bookFonts[] = array(\n 'id' => 'font-1',\n 'filePath' => 'fonts/Inconsolata.ttf',\n 'mediaType' => 'application/octet-stream'\n );\n }\n\n // generate custom CSS file\n $customCss = $this->app->getCustomTemplate('style.css');\n if (file_exists($customCss)) {\n $this->app->get('filesystem')->copy(\n $customCss,\n $bookTempDir.'/book/OEBPS/css/styles.css',\n true\n );\n }\n\n // each book element will generate an HTML page\n // use automatic slugs (chapter-1, chapter-2, ...) instead of\n // semantic slugs (lorem-ipsum, dolor-sit-amet, ...)\n $this->app->set('publishing.slugs', array());\n $items = array();\n foreach ($this->app['publishing.items'] as $item) {\n $pageName = array_key_exists('number', $item['config'])\n ? $item['config']['element'].' '.$item['config']['number']\n : $item['config']['element'];\n\n $slug = $this->app->get('slugger')->slugify(trim($pageName));\n\n $item['slug'] = $slug;\n // TODO: document this new item property\n $item['fileName'] = $slug.'.html';\n $items[] = $item;\n }\n // update `publishing items` with the new slug value\n $this->app->set('publishing.items', $items);\n\n // generate one HTML page for every book item\n $items = array();\n foreach ($this->app['publishing.items'] as $item) {\n $this->app->renderThemeTemplate('chunk.twig', array(\n 'item' => $item,\n 'has_custom_css' => file_exists($customCss),\n ),\n $bookTempDir.'/book/OEBPS/'.$item['fileName']\n );\n }\n\n // copy book images and prepare image data for ebook manifest\n if (file_exists($imagesDir = $this->app['publishing.dir.contents'].'/images')) {\n $images = $this->app->get('finder')->files()->in($imagesDir);\n\n $i = 1;\n foreach ($images as $image) {\n $this->app->get('filesystem')->copy(\n $image->getPathName(),\n $bookTempDir.'/book/OEBPS/images/'.$image->getFileName()\n );\n\n $bookImages[] = array(\n 'id' => 'figure-'.$i++,\n 'filePath' => 'images/'.$image->getFileName(),\n 'mediaType' => 'image/'.pathinfo($image->getFilename(), PATHINFO_EXTENSION)\n );\n }\n }\n\n // look for cover images\n $cover = null;\n if (null != $image = $this->app->getCustomCoverImage()) {\n list($width, $height, $type) = getimagesize($image);\n $cover = array(\n 'height' => $height,\n 'width' => $width,\n 'filePath' => 'images/'.basename($image),\n 'mediaType' => image_type_to_mime_type($type)\n );\n\n // copy the cover image\n $this->app->get('filesystem')->copy(\n $image,\n $bookTempDir.'/book/OEBPS/images/'.basename($image)\n );\n }\n\n // generate book cover\n $this->app->renderThemeTemplate('cover.twig', array(\n 'cover' => $cover\n ),\n $bookTempDir.'/book/OEBPS/titlepage.html'\n );\n\n // generate OPF file\n $this->app->renderThemeTemplate('content.opf.twig', array(\n 'cover' => $cover,\n 'has_custom_css' => file_exists($customCss),\n 'fonts' => $bookFonts,\n 'images' => $bookImages\n ),\n $bookTempDir.'/book/OEBPS/content.opf'\n );\n\n // generate NCX file\n $this->app->renderThemeTemplate('toc.ncx.twig', array(),\n $bookTempDir.'/book/OEBPS/toc.ncx'\n );\n\n // generate container.xml and mimetype files\n $this->app->renderThemeTemplate('container.xml.twig', array(),\n $bookTempDir.'/book/META-INF/container.xml'\n );\n $this->app->renderThemeTemplate('mimetype.twig', array(),\n $bookTempDir.'/book/mimetype'\n );\n\n // compress book contents as ZIP file and rename to .epub\n // TODO: the name of the book file (book.epub) must be configurable\n Toolkit::zip($bookTempDir.'/book', $bookTempDir.'/book.zip');\n $this->app->get('filesystem')->copy(\n $bookTempDir.'/book.zip',\n $this->app['publishing.dir.output'].'/book.epub',\n true\n );\n\n // remove temp directory used to build the book\n $this->app->get('filesystem')->remove($bookTempDir);\n }", "title": "" }, { "docid": "975a78ededec2a81799b701aaf845899", "score": "0.48843932", "text": "public function book () {\n\t\treturn $this->books();\n\t}", "title": "" }, { "docid": "12b5ce1415ebafe58e92bc0fbae42757", "score": "0.48837093", "text": "public function using_index_permalinks()\n {\n }", "title": "" }, { "docid": "123123d01f16dc8e30cc6910cd15c63c", "score": "0.4876736", "text": "function bp_docs_item_docs_link() {\n\techo bp_docs_get_item_docs_link();\n}", "title": "" }, { "docid": "afb2dfb3080cdd9f30b664b1535d489f", "score": "0.4876725", "text": "function bp_docs_archive_link() {\n echo bp_docs_get_archive_link();\n}", "title": "" }, { "docid": "aa71bebb3b64861c9a5fdf117a5bbc0b", "score": "0.4876074", "text": "function firstPage()\n\t\t{\n\t\t\t$this->currentPage = 1;\n\t\t}", "title": "" }, { "docid": "1468e68335200122e101525f77a648a0", "score": "0.48741153", "text": "function zm_getathomeforbookshelf()\n{\n $zedPage = get_page_by_path('bookshelf-book-club');\n $atHome = get_field('at_home', $zedPage->ID);\n $atHomeStack = array();\n foreach ($atHome as $postID) {\n $someObj = new stdClass;\n $atHomePost = get_post($postID);\n $someObj->post_title = $atHomePost->post_title;\n $someObj->subtitle = get_field('subtitle', $postID);\n $someObj->permalink = str_replace(home_url(), \"\", get_permalink($postID));\n $someObj->category = getZedCatsbookshelf($atHomePost);\n $post_thumbnail_id = get_post_thumbnail_id($postID);\n if (isset($post_thumbnail_id)) {\n $someObj->thumbnail = zm_get_attachment_image($post_thumbnail_id, 'teaser_square');\n } else {\n $someObj->thumbnail = false;\n }\n array_push($atHomeStack, $someObj);\n }\n return $atHomeStack;\n}", "title": "" }, { "docid": "4cdc7659af345f7ac1a76dc835a24459", "score": "0.486931", "text": "function scrap_book($book_url) {\n\n $dom = new Dom;\n $dom->setOptions(['enforceEncoding' => 'utf8']);\n $dom->load($book_url);\n\n $content = $dom->find('table a');\n\n $index = [];\n\n foreach ($content as $chapter) {\n if (strlen($chapter->text)<=3\n &&\n strlen($chapter->text)>0) {\n array_push($index, [\n 'url' => $chapter->getAttribute('href'),\n 'index' => trim($chapter->text),\n ]);\n }\n }\n\n return $index;\n}", "title": "" }, { "docid": "aa93640f7da7a94debc7cebc6ba797c2", "score": "0.4867862", "text": "public function findFirstWebFolder() {}", "title": "" }, { "docid": "019de33726b504cef8fa4737c6504545", "score": "0.48562247", "text": "abstract public function getPageName();", "title": "" }, { "docid": "9b3c5cdd541e99081ea81b35234e52dc", "score": "0.4849243", "text": "public function index()\n {\n //\n return BookResource::collection(Book::with('ratings')->paginate(25));\n }", "title": "" }, { "docid": "9b3c5cdd541e99081ea81b35234e52dc", "score": "0.4849243", "text": "public function index()\n {\n //\n return BookResource::collection(Book::with('ratings')->paginate(25));\n }", "title": "" }, { "docid": "a6084555566a77674d5755f48b0d3c0c", "score": "0.48471874", "text": "function book_together() {\r\n $data['page_meta'] = get_page_meta(ADVERTISING_BOOK_TOGETHER_PAGE, null);\r\n \r\n $data = get_page_navigation($data, $data['is_mobile'], ADVERTISING_BOOK_TOGETHER_PAGE);\r\n \r\n $data['main_view'] = load_view('advertising/book_together', $data, $data['is_mobile']);\r\n \r\n return $data;\r\n }", "title": "" }, { "docid": "283ce7d6bd27b828873322664cc2eca5", "score": "0.48466125", "text": "public function setPaths()\n\t{\n\t\t$this->componentURL = Request::base() . 'publications/';\n\t\t$this->resourceURL = $this->componentURL . $this->id;\n\n\t\t$database = \\App::get('db');\n\t\t$pub = new \\Components\\Publications\\Tables\\Publication($database);\n\t\t$publication = $pub->getPublication($this->id);\n\t\t$this->resourceSite = \\Components\\Publications\\Helpers\\Html::buildPubPath($this->id, $publication->version_id, '', $publication->secret, 1);\n\t}", "title": "" }, { "docid": "a17539ba0577ae8604e9f48b430d2fc0", "score": "0.48304823", "text": "function getBook($name, $locale = null);", "title": "" }, { "docid": "578646251d0c9d65c1a6193fffc5551e", "score": "0.4829112", "text": "private function print_first_page_link() {\n\n\t\t$this->print_anchor(\n\t\t\t$this->get_paged_url( 1 ),\n\t\t\t__( 'Go to the first page', 'multilingual-press' ),\n\t\t\t'first-page' . $this->disable_first,\n\t\t\t'&laquo;'\n\t\t);\n\t}", "title": "" }, { "docid": "dc168e641b2d9f53fdf3e2cbf2065087", "score": "0.4828387", "text": "public function getFirst() {\n return $this->makePageUrl($this->details['firstPage']);\n }", "title": "" }, { "docid": "ede1bebe813f3b80edc883ba29f75215", "score": "0.48233378", "text": "public function retrieveHomePage();", "title": "" }, { "docid": "0c126311100817b3af09d86d9a5b5d5c", "score": "0.4821629", "text": "public function getAllLoosePages();", "title": "" }, { "docid": "14e4541e12625cef080acb55c66de574", "score": "0.4820501", "text": "public function getPages();", "title": "" }, { "docid": "14e4541e12625cef080acb55c66de574", "score": "0.4820501", "text": "public function getPages();", "title": "" }, { "docid": "0edb0c35683031f562e840d6408f49fe", "score": "0.481128", "text": "function index() {\n\t\t$sCurrentPage = $_GET[\"page\"];\n\t\tif(empty($sCurrentPage))\n\t\t\t$sCurrentPage = 1;\n\t\t\n\t\t$aListingPages = array_chunk($this->model->getListings($_GET[\"category\"]), $this->model->perPage);\n\t\t$aListings = $aListingPages[$sCurrentPage - 1];\n\t\t\n\t\t$aPaging = array(\n\t\t\t\"back\" => array(\n\t\t\t\t\"page\" => $sCurrentPage - 1,\n\t\t\t\t\"use\" => true\n\t\t\t),\n\t\t\t\"next\" => array(\n\t\t\t\t\"page\" => $sCurrentPage + 1,\n\t\t\t\t\"use\" => true\n\t\t\t)\n\t\t);\n\t\t\n\t\tif(($sCurrentPage - 1) < 1 || $sCurrentPage == 1)\n\t\t\t$aPaging[\"back\"][\"use\"] = false;\n\t\t\n\t\tif($sCurrentPage == count($aListingPages) || count($aListingPages) == 0)\n\t\t\t$aPaging[\"next\"][\"use\"] = false;\n\t\t#########################\n\t\t\n\t\t$this->tplAssign(\"aCategories\", $this->model->getCategories(false));\n\t\t$this->tplAssign(\"aListings\", $aListings);\n\t\t$this->tplAssign(\"aPaging\", $aPaging);\n\t\t$this->tplDisplay(\"directory.tpl\");\n\t}", "title": "" }, { "docid": "e487c894e9200f021db6e378df4f3b88", "score": "0.48058847", "text": "private function flattenToc()\n {\n $flattenedToc = array();\n\n $bookItems = $this->normalizePageNames($this->app['publishing.items']);\n $bookItems = $this->fixItemsWithEmptyTocs($bookItems);\n\n // calculate the URL of each book chunk and generate the flattened TOC\n $items = array();\n foreach ($bookItems as $item) {\n $itemToc = array();\n foreach ($item['toc'] as $chunk) {\n // first-level headers\n if (isset($chunk['level']) && 1 == $chunk['level']) {\n $chunk['url'] = sprintf('%s.html', $item['page_name']);\n $chunk['parent'] = null;\n $chunk['config'] = $item['config']; // needed for templates\n\n $parentChunk = $chunk;\n // second-level headers\n } elseif (isset($chunk['level']) && 2 == $chunk['level']) {\n if (1 == $this->app->edition('chunk_level')) {\n $chunk['url'] = sprintf('%s.html#%s', $item['page_name'], $chunk['slug']);\n } elseif (2 == $this->app->edition('chunk_level')) {\n $chunk['url'] = sprintf('%s/%s.html', $item['page_name'], $chunk['slug']);\n }\n\n $chunk['parent'] = $parentChunk;\n // third to sixth level headers\n } elseif (isset($chunk['level'])) {\n if (1 == $this->app->edition('chunk_level')) {\n $chunk['url'] = sprintf('%s.html#%s', $item['page_name'], $chunk['slug']);\n } elseif (2 == $this->app->edition('chunk_level')) {\n $chunk['url'] = sprintf('%s/%s.html#%s', $item['page_name'], $parentChunk['slug'], $chunk['slug']);\n }\n\n $chunk['parent'] = $parentChunk;\n }\n\n $itemToc[] = $chunk;\n\n $flattenedToc[] = $chunk;\n }\n\n $item['toc'] = $itemToc;\n $items[] = $item;\n }\n\n $this->app['publishing.items'] = $items;\n\n return $flattenedToc;\n }", "title": "" }, { "docid": "91c3d044cfd876a7219c58ab1ca2c1ad", "score": "0.48011443", "text": "public function getAddressBooks();", "title": "" }, { "docid": "8cc7e0f81d457a1057bdb026676c75a5", "score": "0.48002997", "text": "public function requestBook(){\n $books = Book::orderBy('status')->paginate(10);\n return view('librarian.requestedBook')->with('books',$books);\n }", "title": "" }, { "docid": "db8f3fb53e55e0c6298bc6b110a2c5b9", "score": "0.4799208", "text": "function set_page_link($newqs = array(), $newpath = null) {\n $get = $_GET;\n unset($get['request_uri']);\n $allqet = array_merge($get, $newqs);\n if (empty($newpath)) {\n $qs = http_build_query($allqet);\n return Router::$page_url . (!empty($qs) ? \"?$qs\" : null);\n }\n $qs = http_build_query($allqet);\n return \"$newpath\" . (!empty($qs) ? \"?$qs\" : null);\n}", "title": "" }, { "docid": "358c8ba2e5d35d9c3deb9e256e61f30e", "score": "0.4796333", "text": "function findPageUrls();", "title": "" }, { "docid": "1e93d2c329e8cbaf446b0792f1776481", "score": "0.47955233", "text": "function PageFromPath($path){\n $chunks = explode(\"/\", substr($path,1)); \n return $this->WikiWord($chunks[count($chunks)-1]);\n }", "title": "" }, { "docid": "9c6f5afcc291939325af0db98a3affac", "score": "0.47924727", "text": "public function index()\n {\n return BookResources::collection(Book::with(['user','categories','authors'])->get());\n }", "title": "" }, { "docid": "a18fc601405205c9b353d4613997f680", "score": "0.479095", "text": "public function testGetNextPage()\n {\n // most directory\n $this->assertStringEndsWith(\n '2.3/test/',\n $this->manifest->getNextPage(\n DOCSVIEWER_PATH . '/tests/docs/en/subfolder/subsubfolder/subsubpage.md',\n DOCSVIEWER_PATH . '/tests/docs/en/'\n )->Link\n );\n\n // after sorting, 2 is shown.\n $this->assertContains(\n '/intermediate/',\n $this->manifest->getNextPage(\n DOCSVIEWER_PATH . '/tests/docs/en/sort/01-basic.md',\n DOCSVIEWER_PATH . '/tests/docs/en/'\n )->Link\n );\n\n\n // next gets the following URL\n $this->assertContains(\n '/test/',\n $this->manifest->getNextPage(\n DOCSVIEWER_PATH . '/tests/docs-v2.4/en/index.md',\n DOCSVIEWER_PATH . '/tests/docs-v2.4/en/'\n )->Link\n );\n\n\n // last folder in a entity does not leak\n $this->assertNull(\n $this->manifest->getNextPage(\n DOCSVIEWER_PATH . '/tests/docs/en/test.md',\n DOCSVIEWER_PATH . '/tests/docs/en/'\n )\n );\n }", "title": "" }, { "docid": "e16844fbb933319fee7601a18ace55a6", "score": "0.47860256", "text": "public function index()\n {\n\n\n $books = Books::latest()->paginate(3);\n return view(\"web_admin.books.index\", compact('books', ))->with('i',(request()->input('page',1)-1)*3);\n }", "title": "" }, { "docid": "d6d8746f4ded5f7c462de9ff05c65d5d", "score": "0.4778957", "text": "function MagBook_add_single_page_object($book_pid, $page_file, $page_num = 1, $page_title = NULL, $img_group_id = 1) {\n\tglobal $base_url;\n\n\tmodule_load_include('inc', 'fedora_repository', 'api/fedora_utils');\n\tmodule_load_include('inc', 'fedora_repository', 'api/fedora_item');\n\n\t$page_pid = \"$book_pid-\". sprintf(\"%03d\", $page_num);\n\n\t$page_item = Fedora_Item::ingest_new_item($page_pid, 'A', $page_title);\n\t$page_item->add_relationship('hasModel', 'epistemetec:mag_page', FEDORA_MODEL_URI);\n\t$page_item->add_relationship('isMemberOf', $book_pid);\n\t$page_item->add_datastream_from_file($page_file, 'TIFF', 'Archival TIFF', 'image/tiff', 'M', null, true);\n\n\t//create MAG: we need only a subset of elements, usefull to be merged with the book's MAG\n\t$dom = new DomDocument(\"1.0\", \"UTF-8\");\n\t$dom->formatOutput = TRUE;\n\n\t$mag = $dom->createElement(\"metadigit\");\n\t$mag->setAttribute(\"xmlns:dc\",\"http://purl.org/dc/elements/1.1/\");\n\t$mag->setAttribute(\"xmlns:niso\",\"http://www.niso.org/pdfs/DataDict.pdf\");\n\n\t$img = $dom->createElement(\"img\");\n\t$img->setAttribute(\"imggroudID\", $img_group_id);\n\n\t$mag->appendChild($img);\n\n\t//required image elements\n\t$img_elements['sequence_number'] = $dom->createElement(\"sequence_number\", $page_num);\n\t$img_elements['nomenclature'] = $dom->createElement(\"nomenclature\", $page_pid);\n\t$img_elements['file'] = $dom->createElement(\"file\", $base_url . '/fedora/repository/' . $page_pid);\n\t$img_elements['md5'] = $dom->createElement(\"md5\", md5_file($page_file));\n\t$img_elements['image_dimensions'] = $dom->createElement(\"image_dimensions\", \"\");\n\n\t//\"image dimensions\" has subelements\n\tlist($width, $length, $type, $attr) = getimagesize($page_file);\n\t$imagelength = $dom->createElement(\"niso:imagelength\", $length);\n\t$imagewidth = $dom->createElement(\"niso:imagewidth\", $width);\n\n\t$img_elements['image_dimensions']->appendChild($imagelength);\n\t$img_elements['image_dimensions']->appendChild($imagewidth);\n\n\t//add each required element to MAG\n\tforeach ($img_elements as $img_element) {\n\t\t$img->appendChild($img_element);\n\t}\n\n\tif ($page_item->add_datastream_from_string($dom->saveXML($mag), 'MAG') !== NULL) {\n\t\tdrupal_set_message(t('Il datastream MAG per l\\'oggetto \"%pid\" è stato modificato con successo.', array('%pid'=>$page_pid)));\n\t}\n}", "title": "" }, { "docid": "cc7bc44f142d4fa181cf8c92ea4853a7", "score": "0.47676829", "text": "public function getAllAddressBooks($currentPage = 1) : Paginator\n {\n $repository = $this->getDoctrine()->getRepository(AddressBook::class);\n\n //Get all Addressbook list\n $query = $repository->createQueryBuilder('p')\n ->orderBy('p.firstname', 'DESC')\n ->getQuery();\n\n $paginator = $this->paginate($query, $currentPage);\n return $paginator;\n\n }", "title": "" }, { "docid": "8899f7b09a30a25a1c3d16daf47bb9ef", "score": "0.47653288", "text": "public function getPage($prefix)\n {\n $path = $this->eq_path($prefix);\n $router = $this->eq_router($prefix);\n $get = $this->eq_get($prefix);\n $this->eq_routerANDget($path, $router, $get);\n }", "title": "" }, { "docid": "56f7d212963c3473a1f6d9e298e376c2", "score": "0.47639075", "text": "abstract protected function getPage() ;", "title": "" }, { "docid": "f5ac27012d83f580a9324892f8ab057a", "score": "0.47635123", "text": "public function index()\n {\n $books = Library::latest()->paginate(5);\n\n return view('book.index',compact('books'))\n ->with('i', (request()->input('page', 1) -1) *5);;\n }", "title": "" }, { "docid": "2b3a7b02ff655f6bf9adfe22e2c382b6", "score": "0.4763458", "text": "public function index()\n {\n // return Bookable::all();\n\n return BookableIndexResource::collection(Bookable::paginate(10));\n }", "title": "" }, { "docid": "7e6bca81949e28249ea332b20394267c", "score": "0.47603866", "text": "function wiki_breadcrumbs($chain, $current_title = null, $final_link = false, $links = true, $this_link_virtual_root = false)\n{\n $segments = array();\n $token = strtok($chain, '/');\n $rebuild_chain = '';\n while ($token !== false) {\n $next_token = strtok('/');\n\n if ($rebuild_chain != '') {\n $rebuild_chain .= '/';\n }\n $rebuild_chain .= $token;\n\n $link_id = ($this_link_virtual_root && ($next_token === false)) ? $token : $rebuild_chain;\n\n if (is_numeric($token)) {\n $id = intval($token);\n } else {\n $url_moniker_where = array('m_resource_page' => 'wiki', 'm_moniker' => $token);\n $_id = $GLOBALS['SITE_DB']->query_select_value_if_there('url_id_monikers', 'm_resource_id', $url_moniker_where);\n if ($_id === null) {\n return array();\n }\n $id = intval($_id);\n }\n\n $page_link = build_page_link(array('page' => 'wiki', 'type' => 'browse', 'id' => $link_id) + (($this_link_virtual_root && ($next_token === false)) ? array('keep_wiki_root' => $id) : array()), get_module_zone('wiki'));\n\n if ($next_token !== false) { // If not the last token (i.e. not the current page)\n $title = $GLOBALS['SITE_DB']->query_select_value_if_there('wiki_pages', 'title', array('id' => $id));\n if (is_null($title)) {\n continue;\n }\n $token_title = get_translated_text($title);\n $segments[] = $links ? array($page_link, $token_title) : array('', $token_title);\n } else {\n if (is_null($current_title)) {\n $_current_title = $GLOBALS['SITE_DB']->query_select_value_if_there('wiki_pages', 'title', array('id' => $id));\n $current_title = is_null($_current_title) ? do_lang('MISSING_RESOURCE', 'wiki_page') : get_translated_text($_current_title);\n }\n if ($final_link) {\n $segments[] = array($page_link, $current_title);\n } else {\n $segments[] = array('', $current_title);\n }\n }\n\n $token = $next_token;\n }\n\n return $segments;\n}", "title": "" }, { "docid": "577c055614b6f6f8afd6b12705fdee22", "score": "0.47573498", "text": "function book($param1 = '', $param2 = '', $param3 = '')\n {\n if ($this->session->userdata('parent_login') != 1)\n redirect('login', 'refresh');\n\n $page_data['books'] = $this->db->get('book')->result_array();\n $page_data['page_name'] = 'book';\n $page_data['page_title'] = get_phrase('manage_library_books');\n $this->load->view('backend/index', $page_data);\n\n }", "title": "" }, { "docid": "421ed1643f28e6fca6eb3af028d5a821", "score": "0.47565326", "text": "function mrl_page_title( $title ) {\r\n global $wp, $wp_query;\r\n $wp->parse_request();\r\n\r\n $title = '';\r\n\r\n if ( get_query_var('my_reading_library_library') )\r\n $title = 'My Library';\r\n\r\n if ( get_query_var('my_reading_library_id') ) {\r\n $book = get_book(intval(get_query_var('my_reading_library_id')));\r\n $title = $book->title . ' by ' . $book->author;\r\n }\r\n\r\n if ( !empty($title) ) {\r\n $title = apply_filters('my_reading_library_page_title', $title);\r\n $separator = apply_filters('my_reading_library_page_title_separator', ' | ');\r\n return $title.$separator;\r\n }\r\n return '';\r\n}", "title": "" }, { "docid": "1319e5e8dc016065529a80f5a4e98d11", "score": "0.47545806", "text": "public function loadNextPage()\n {\n $nextPage = $this->results->getNextPage();\n $this->search($nextPage);\n }", "title": "" }, { "docid": "ecbea5f82cebc30f9b2a4d285a1d52ee", "score": "0.47529688", "text": "public function index(){\n return $this->successResponse($this->bookService->getBooks());\n }", "title": "" }, { "docid": "9984d8986325a858af79498fc5ad9294", "score": "0.4746952", "text": "public function testPathPagination()\n {\n $this->makeData(self::NUMBER_RECORD_CREATE);\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin/categories?page='.ceil((self::NUMBER_RECORD_CREATE + 1) / (config('define.categories.limit_rows'))));\n $browser->assertPathIs('/admin/categories')\n ->assertQueryStringHas('page', ceil((self::NUMBER_RECORD_CREATE + 1) / (config('define.categories.limit_rows'))));\n });\n }", "title": "" }, { "docid": "00f8c9c3bd482abb7d7dc3b109b4a18c", "score": "0.47461113", "text": "function displayFiles($pageName)\n{\n\tglobal $connection;\n\t$query = \"SELECT * FROM Web2DB.Documents d\n\t\t\t\tInner Join Web2DB.Files_to_Path f\n\t\t\t\tOn d.Document_ID = f.Document_ID\n\t\t\t\tInner Join Web2DB.Pages p\n\t\t\t\tOn f.Page_ID = p.Page_ID\n\t\t\t\tWhere Page_Name = '$pageName';\";\n\t$result = mysqli_query($connection,$query);\n\twhile($tableRow = mysqli_fetch_assoc($result))\n\t{\n\t\t$reference = $tableRow[\"Reference\"];\n\t\t$name= $tableRow[\"Name\"];\n\t\t\n\t\techo \"<h3>File: <a href='\". htmlspecialchars($reference) . \"' target='_blank'>$name</a><br/>\";\n\t}\n}", "title": "" }, { "docid": "c0aa5eeea8fecb072cd5b46127b6c13a", "score": "0.47440276", "text": "public function printBooklet() {\n $this->printFrontCover();\n $this->printTableOfContents();\n\n for ($i=1; $i <= $this->getPageCount(); $i++) {\n $this->printPage($i);\n }\n\n $this->printIndex();\n $this->printBackCover();\n }", "title": "" }, { "docid": "41a763a948e0c300552d652591c05c54", "score": "0.47425288", "text": "protected function getPage() {}", "title": "" }, { "docid": "41a763a948e0c300552d652591c05c54", "score": "0.47418907", "text": "protected function getPage() {}", "title": "" }, { "docid": "ed7109f08953ef6c9c45fe15d50a208f", "score": "0.47361508", "text": "function Get_from_Rewrite() {\r\n\t\t\t$return = '';\r\n\t\t\t$pwa_base = get_permalink(get_option(c_pwa_main_photo_page));\r\n\t\t\t$url = 'http://'.$_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"];\r\n\t\t\t$pos = strpos($url,$pwa_base);\r\n\t\t\tif ($pos !== false) {\r\n\t\t\t\t$to_search = str_replace($pwa_base, '', $url);\r\n\t\t\t\t@list($album,$page) = explode('/',$to_search);\r\n\t\t\t\t$return['album'] = $album;\r\n\t\t\t\t$return['page'] = $page;\r\n\t\t\t}\r\n\t\t\treturn $return;\r\n\t\t}", "title": "" }, { "docid": "daa899e90ec6c86839450337e11b9932", "score": "0.4731635", "text": "public function run()\n {\n for($page=1;$page<=3;$page++) {\n $pageUrl = \"https://www.knygos.lt/lt/knygos/zanras/fantastika-ir-fantasy/?psl=\" . $page;\n $fetchPage = file_get_contents($pageUrl);\n\n if (!$fetchPage)\n die(\"Unable to fetch the bookstore.\");\n\n $booksDetailsHTML = self::explodeBetween(\"<div class=\\\"product-photo-icon-container product-photo-icons-rb\\\">\", \"</a>\", $fetchPage);\n foreach ($booksDetailsHTML as $bookDetailsHTML) {\n $bookUrl = current(self::explodeBetween('<a href=\"', '\"', $bookDetailsHTML));\n //echo 'https://www.knygos.lt/'.$bookUrl.PHP_EOL;\n usleep(200); // Delay crawling to prevent spam-block\n\n $fetchBookPage = file_get_contents('https://www.knygos.lt/' . $bookUrl);\n\n if (!$fetchBookPage)\n die(\"Unable to fetch the book page.\");\n\n $author = @next(explode('>', current(self::explodeBetween('<a itemprop=\"author\"', '</a>', $fetchBookPage))));\n $year = current(self::explodeBetween('<p class=\"book_details\">Metai: ', '</p>', $fetchBookPage));\n $title = current(self::explodeBetween('<p class=\"book_details\">Originalus pavadinimas: ', '</p>', $fetchBookPage));\n if (empty($title))\n $title = current(self::explodeBetween('<span itemprop=\"name\">', '</span>', $fetchBookPage));\n\n if (empty($title) || strlen($title) > 30){\n continue;\n }\n\n $genre = 'Fantastika';\n\n DB::table('books')->insert([\n 'title' => $title,\n 'year' => $year,\n 'author' => $author,\n 'genre' => $genre,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n ]);\n\n }\n }\n\n }", "title": "" }, { "docid": "49b96740d7c5c236ce5c7c27a2e3d679", "score": "0.47309116", "text": "public function getBook($author, $book){\n if(empty($author) && empty($book))\n return $this->getAllBooks();\n else{\n $query =\"SELECT * FROM Book\n WHERE MATCH (authorName, bookName)\n AGAINST ('+{$author}' '+{$book}' WITH QUERY EXPANSION);\";\n return $this->getBookDetail($query);\n }\n }", "title": "" }, { "docid": "e4be34ef55bd1e6181355c08735432bd", "score": "0.4730209", "text": "public function test_library_bookName() {\n\t\t$path = route('v2_library_bookName',[],false);\n\t\t$this->params['language_code'] = 'eng';\n\n\t\techo \"\\nTesting: \" . route('v2_library_bookName', $this->params);\n\t\t$response = $this->get(route('v2_library_bookName'), $this->params);\n\t\t$response->assertSuccessful();\n\t\t$response->assertJsonStructure([$this->getSchemaKeys('BookName')]);\n\n\t\t$this->params['language_code'] = strtoupper($this->params['language_code']);\n\t\t$this->compareToOriginal($path,[$this->getSchemaKeys('BookName')]);\n\t}", "title": "" }, { "docid": "4ba496d0158cbfd78f19152a8292b9dd", "score": "0.4726303", "text": "function NodeFromPath($path){\n $chunks = explode(\"/\", substr($path,1)); // remove first slash and split\n \n $id = $this->root;\n \n $c = 1; // count chunks, only create page at end of path\n foreach($chunks as $chunk){\n $id = $this->parseNode($id, $chunk,$con);\n if($id==-1){\n $redirect = $this->CheckRedirect($path);\n if($redirect > 0) return $redirect;\n if($c == count($chunks))\n $id = NEW_PAGE;\n else\n $id = NO_PATH; \n break;\n }\n $c++;\n }\n return $id;\n }", "title": "" }, { "docid": "0f68fe0532847f25d21ed7e58308b79c", "score": "0.4723898", "text": "public function makeChapterThumbsAction()\n {\n\n foreach ($this->homePageMapper->fetchAll() as $datum) {\n\n $id = $datum->getId();\n $url = $this->domain . '/html/' . $id . '.html';\n\n try {\n $chapterLinks = $this->getChapterLinks($url);\n } catch (Zend_Exception $e) {\n $this->showErrorMessage($e);\n }\n\n $link = $chapterLinks[0];\n\n try {\n $pages = $this->fetchFirstPages($link->url);\n } catch (Zend_Exception $e) {\n $this->showErrorMessage($e);\n }\n\n $count = count($chapterLinks);\n $data = array();\n\n foreach($pages as $page) {\n $this->resizeImage($page, 192);\n }\n }\n\n $this->view->output = 'done fetching chapter thumbs';\n }", "title": "" }, { "docid": "7e74b80fbcdab31daf873994e98c407b", "score": "0.4723878", "text": "public function allBooks ()\n {\n $books = $this->book->findAll();\n $this->show('admin/allbooks', ['books' => $books]);\n }", "title": "" }, { "docid": "67203bc83c9d982afabebf2b55583fce", "score": "0.47223282", "text": "function get_default_page_to_edit()\n {\n }", "title": "" }, { "docid": "8b2ac67a7fdab81f434e687e33cfc42a", "score": "0.4709895", "text": "public function getMoreUrlPath();", "title": "" }, { "docid": "66e4a6215eb2534a6acd5dd5adfa1090", "score": "0.47027218", "text": "public function getFirstPage(): int\n {\n return 1;\n }", "title": "" }, { "docid": "a8ad887acfa1d63ab54084c9b4e5a7ac", "score": "0.47023118", "text": "function _get_page_link($post = \\false, $leavename = \\false, $sample = \\false)\n {\n }", "title": "" }, { "docid": "f7c75eafd8fe147919034295ee4aca6a", "score": "0.47021508", "text": "function get_page_name_to_start_page()\r\n{\r\n\treturn getField('SELECT page_name FROM v_tpl_page where default_page=1 LIMIT 0,1');\r\n}", "title": "" }, { "docid": "9258b424b8a0105d508a4816e2ece8d5", "score": "0.4698489", "text": "public function getUserPages();", "title": "" }, { "docid": "77f442a06de9b9ab12c4072601105f8e", "score": "0.46983597", "text": "public function getBook()\n\t{\n\t\treturn $this->getKeyValue('book'); \n\n\t}", "title": "" }, { "docid": "43e874599528e24f109867f347b2847e", "score": "0.46939582", "text": "function bp_docs_directory_breadcrumb() {\n\techo bp_docs_get_directory_breadcrumb();\n}", "title": "" }, { "docid": "64252d2fb538815da0b9eed2d085b72b", "score": "0.46874556", "text": "static public function setFirstPage($new_page) {\n\t\tself::$first_page = (string)$new_page;\n\t}", "title": "" }, { "docid": "39ca2161258b15ea44ff1cb6683bb436", "score": "0.46868315", "text": "function philosophy_change_post_url_link($post_link,$id){\n $p=get_post($id);\n if(is_object($id) && 'chapter'==get_post_type($id)){\n $parent_post_id=get_field(\"parent_book\");\n $parent_post=get_post($parent_post_id);\n if($parent_post){\n $post_link=str_replace(\"%book%\",$parent_post->post_name,$post_link);\n }\n\n }\n if(is_object($p) &&'book'==get_post_type($p)){\n $genre=wp_get_post_terms($p->ID,'genre');\n if(is_array($genre)&& count($genre)>0){\n $slug=$genre[0]->slug;\n $post_link=str_replace(\"%genre%\",$slug,$post_link);\n }else{\n $slug=\"generic\";\n $post_link=str_replace(\"%genre%\",$slug,$post_link);\n }\n \n\n }\n return $post_link;\n}", "title": "" }, { "docid": "614d6f2720ccc256fbb0282d407c6409", "score": "0.46814898", "text": "public function index()\n {\n $books = Book::with('category')->where(['deleted' => 0])->orderBy('name')->paginate(5);\n return $this->successResponse($books);\n }", "title": "" }, { "docid": "b38c64f0af8b00368302f52c9f2d6351", "score": "0.46722698", "text": "function get_book( $id ) {\r\n\t$options = get_option('nowReadingOptions');\r\n\t\r\n\t$id = intval($id);\r\n\t\r\n\t$books = get_books('include=' . $id);\r\n\t\r\n\treturn $books[0];\r\n}", "title": "" }, { "docid": "353feb790f22af4bdbd05cb1c41ec667", "score": "0.46682566", "text": "public function index()\n\t{\n\t\t$this->page(1);\n\t}", "title": "" }, { "docid": "e0c559d82a667c0189c91f777f3ab423", "score": "0.46653962", "text": "function page_advance( $link, $total, $range, $current, $html = array() ) {\r\n $range = max(1, ceil($range));\r\n $total_page = ceil($total / $range);\r\n $current = max(0, ceil($current));\r\n $bar = \"\";\r\n\r\n $title = str_replace(array(\"{link}\", \"{from}\", \"{to}\", \"{total}\"), array($link, min(($current - 1) * $range + 1, $total), min($current * $range, $total), $total), $html['title']);\r\n\r\n if ( $current >= 3 ) {\r\n $bar .= str_replace(\"{link}\", $html['first']);\r\n }\r\n\r\n if ( $current >= 2 ) {\r\n $bar .= str_replace(array(\"{link}\", \"{i}\"), array($link, $current - 1), $html['pre']);\r\n }\r\n\r\n $bar .= $title;\r\n\r\n if ( $current <= $total_page - 2 ) {\r\n $bar .= str_replace(array(\"{link}\", \"{i}\"), array($link, $current + 1), $html['last']);\r\n }\r\n\r\n if ( $current < $total_page ) {\r\n $bar .= str_replace(array(\"{link}\", \"{i}\"), array($link, $current + 1), $html['next']);\r\n }\r\n\r\n return $bar;\r\n\r\n}", "title": "" }, { "docid": "93036068452d7a84c097defd16b29712", "score": "0.46648318", "text": "function pager($margin=10)\n {\n $path = $_GET;\n $newpath = $PHP_SELF.\"?\";\n foreach($path as $key => $value)\n {\n if($key!=$this->getvar)\n {\n $newpath .= $key.\"=\".$value;\n $newpath .=\"&amp;\";\n }\n }\n $newpath .= $this->getvar;\n\n $linkpaths = array();\n $current = $this->start / $this->length + 1;\n $pages = ceil(($this->rows/$this->length));\n $pagerstart = $current-$margin;\n $pagerstart = ($pagerstart<1)?1:$pagerstart;\n $pagerend = $current+$margin;\n \n $pagerend = ( $pagerend > $pages ) ? ( ceil( ( $this->rows / $this->length ) ) ): $pagerend;\n\n for($i=$pagerstart;$i < ($pagerend+1);$i++)\n {\n $linkpaths[$i] = $newpath.\"=\".($i);\n }\n if($linkpaths[($current+1)]!=null)\n {\n $linkpaths['next']=$linkpaths[($current+1)];\n }\n if($linkpaths[($current-1)]!=null)\n {\n $linkpaths['last']=$linkpaths[($current-1)];\n }\n return $linkpaths;\n }", "title": "" } ]
923ad422f174873bb1f2951d062e6180
Verification de champs du formulaire
[ { "docid": "02bd59ca3e6447539455c078f72e23d8", "score": "0.0", "text": "public function valide()\n\t{\n\t\t$result = true;\n\t\tif ($_REQUEST['firstname'] == \"\")\n\t\t{\n\t\t\t$_REQUEST[\"field_messages\"][\"firstname\"] = \"Veuillez entrer votre prenom\";\n\t\t\t$result = false;\n\t\t}\t\n\t\tif ($_REQUEST['lastname'] == \"\")\n\t\t{\n\t\t\t$_REQUEST[\"field_messages\"][\"lastname\"] = \"Veuillez entrer votre nom de famille\";\n\t\t\t$result = false;\n\t\t}\n\t\tif ($_REQUEST['city'] == \"\")\n\t\t{\n\t\t\t$_REQUEST[\"field_messages\"][\"city\"] = \"Veuillez entrer la ville\";\n\t\t\t$result = false;\n\t\t}\t\n\t\tif ($_REQUEST['email'] == \"\")\n\t\t{\n\t\t\t$_REQUEST[\"field_messages\"][\"email\"] = \"Veuillez entrer le courrier électronique\";\n\t\t\t$result = false;\n\t\t}\t\n\t\tif ($_REQUEST['username'] == \"\")\n\t\t{\n\t\t\t$_REQUEST[\"field_messages\"][\"username\"] = \"Veuillez entrer votre nom d'utilisateur\";\n\t\t\t$result = false;\n\t\t}\t\n\t\tif ($_REQUEST['password'] == \"\")\n\t\t{\n\t\t\t$_REQUEST[\"field_messages\"][\"password\"] = \"Mot de passe obligatoire\";\n\t\t\t$result = false;\n\t\t}\n\t\tif ($_REQUEST['password2'] == \"\")\n\t\t{\n\t\t\t$_REQUEST[\"field_messages\"][\"password2\"] = \"Retapez le mot de passe\";\n\t\t\t$result = false;\n\t\t}\t\n\t\tif ($_REQUEST['password2'] != $_REQUEST['password'])\n\t\t{\n\t\t\t$_REQUEST[\"field_messages\"][\"passwordMissMatch\"] = \"Les deux mots de passe ne correspondent pas, veuillez vérifier\";\n\t\t\t$result = false;\n\t\t}\t\n\t\treturn $result;\n\t}", "title": "" } ]
[ { "docid": "b07407b9b84512ad860d4bdf6abe11b3", "score": "0.6573868", "text": "function validation($data){\n $errors= array();\n\n if ($data['calculation'] != '') {\n $grade_item = grade_item::fetch(array('id'=>$data['id'], 'courseid'=>$data['courseid']));\n $result = $grade_item->validate_formula($data['calculation']);\n if ($result !== true) {\n $errors['calculation'] = $result;\n }\n }\n if (0 == count($errors)){\n return true;\n } else {\n return $errors;\n }\n }", "title": "" }, { "docid": "caa0a2d3f34f9b9a5f6d8c20a5ba9f06", "score": "0.6494966", "text": "public function isValid()\n\t{\n\t\tif (empty($this->libelle)) $this->libelle = \"A SUPPRIMER\";\n\t\telse $this->libelle = trim (preg_replace('/\\s+/', ' ', $this->libelle) ); // Suppression des espaces\n\t\tif (empty($this->valide)) $this->valide = 0;\n\t\tif (empty($this->id_pere)) $this->id_pere = 0;\n\t\tif (empty($this->id_synonime)) $this->id_synonime = 0;\n\t\tif (empty($this->nombre_tq)) $this->nombre_tq = 0;\n\t}", "title": "" }, { "docid": "5c78b38b215958e2a0846e86471573df", "score": "0.644371", "text": "private function verifiechamp() {\n $this->form_validation->set_error_delimiters('<div class=\"alert alert-danger\">', '</div>');\n $this->form_validation->set_rules('firstname', 'Prénom', 'required|min_length[3]|max_length[25]', array(\n 'required' => 'le %s est obligatoire.'\n ));\n $this->form_validation->set_rules('lastname', 'Nom', 'required|min_length[3]|max_length[25]', array(\n 'required' => 'le %s est obligatoire.'\n ));\n\n $this->form_validation->set_rules('email', 'adresse email', 'required|min_length[8]', array(\n 'required' => '%s est obligatoire.'\n ));\n\n\n $this->form_validation->set_rules('sexe', 'le sexe', 'required', array(\n 'required' => 'le %s est obligatoire.'\n ));\n $this->form_validation->set_rules('telephone', 'le numero de télephone', 'required', array(\n 'required' => 'le %s est obligatoire.'\n ));\n $this->form_validation->set_rules('groupe', 'groupe', 'required', array(\n 'required' => 'le %s est obligatoire.'\n ));\n $this->form_validation->set_rules('poste', 'poste ', 'required', array(\n 'required' => 'le %s est obligatoire.'\n ));\n }", "title": "" }, { "docid": "72767307530d9a1302aeab2e622e067d", "score": "0.62878114", "text": "public function validation();", "title": "" }, { "docid": "ac5a66600dd0bbd4fc503674d4880d82", "score": "0.624716", "text": "function validate_sumbission() {\n\t\treturn true;\n\n\t}", "title": "" }, { "docid": "ea0e6c82e9044807471fdb5b0837016a", "score": "0.6144521", "text": "private function formulaPreparation($formula){ \r\n $this->formula = $formula;\r\n $search = array(\"–\",\",\",\"--\",\"-+\",\"+-\",\"+\",\"-\",\"*\",\"/\",\"(\",\")\",\"^\",\"ˆ\",\" \");\r\n $replace = array(\"-\",\".\",\" + \",\" - \",\" - \",\" + \",\" - \",\" * \",\" / \",\" ( \",\" ) \",\" ^ \",\" ˆ \",\" \");\r\n $formula_preparation = str_replace ($search, $replace, $this->formula); // prida mezery vsude mimo cisla\r\n $this->formula_array = explode(\" \", $formula_preparation); //rozpadne priklad na jednotlive komponenty skrze mezery\r\n \r\n $left_bracket_count = substr_count($this->formula, '(');\r\n $right_bracket_count = substr_count($this->formula, ')');\r\n \r\n if($left_bracket_count > $right_bracket_count) //kontrola poctu zavorek\r\n {\r\n $this->info = \"Nebyla nalezena oteviraci zavorka\";\r\n $this->result = true;\r\n }\r\n elseif($left_bracket_count < $right_bracket_count)\r\n {\r\n $this->info = \"Nebyla nalezena uzaviraci zavorka\";\r\n $this->result = true;\r\n }\r\n $minus_indicators = array(\"(\",\"*\",\"/\",\"^\",\"ˆ\",\"+\",\"-\");\r\n \r\n for($i = 0; $i < count($this->formula_array);$i++)\r\n {\r\n if($this->formula_array[$i]===\"\") //maze prazdna pole\r\n {\r\n unset($this->formula_array[$i]);\r\n $this->formula_array = array_values($this->formula_array);\r\n }\r\n \r\n if(($this->formula_array[$i]===\"-\" or $this->formula_array[$i]===\"-\") //detekuje cisla mensi nez nula a upravi pole tak, aby cisla u sebe mela znamenka minus\r\n and (is_numeric($this->formula_array[$i+1]))\r\n and ($i === 0 or in_array($this->formula_array[$i-1], $minus_indicators)))\r\n {\r\n $this->formula_array[$i] = \"-\".$this->formula_array[$i+1];\r\n unset($this->formula_array[$i+1]);\r\n $this->formula_array = array_values($this->formula_array);\r\n } \r\n \r\n }\r\n \r\n return $this->formula_array; \r\n }", "title": "" }, { "docid": "156cd42364dc0e74fcce88da426face0", "score": "0.6125869", "text": "private function validar_campos(){\n if ($this->nombre == '' || $this->telefono == '') \n {\n return 0;\n }\n else{\n return 1;\n }\n }", "title": "" }, { "docid": "c74c6cfaa857ef151f660a32b6e978a5", "score": "0.6095187", "text": "function valid(){}", "title": "" }, { "docid": "e56e5db1bf8fcbefc6d86d230469bf2c", "score": "0.601925", "text": "public function isValid(){\n $msg = array();\n if($this->getInvGrado() != null && $this->getInvGrado()!=''){\n if($this->getInvGrado()+0 <=0 || $this->getInvGrado()+0 >100 ){\n $msg[]='- El grado ingresado \"'.$this->getInvGrado().'\" debe ser mayor a 0 y menor a 100';\n }\n }else{\n $msg[]='- El campo \"Grados\" se encuentra vacio';\n }\n \n return $msg;\n }", "title": "" }, { "docid": "3f60d77ca35d1d40c2673e276c0b09d5", "score": "0.6019019", "text": "public function isCorrect(): bool;", "title": "" }, { "docid": "0efd62aa7717cff7c82f3995b5fb18ae", "score": "0.6012792", "text": "abstract public function validate();", "title": "" }, { "docid": "0efd62aa7717cff7c82f3995b5fb18ae", "score": "0.6012792", "text": "abstract public function validate();", "title": "" }, { "docid": "a32688e91f4cce65ad74af5ca892eec9", "score": "0.60107934", "text": "function ValidaDatos($aCamposEvaluar)\n{\n $aMensajes = [];\n foreach ($aCamposEvaluar as $key => $value) {\n $sVariableEvaluada = trim($aCamposEvaluar[\"$key\"]);\n if (empty($sVariableEvaluada)) {\n $aMensajes[] = \"Campo<strong> $key vacio</strong>, es requerido.\";\n }\n }\n if (array_key_exists('nombre', $aCamposEvaluar)) {\n foreach ($aCamposEvaluar as $key2 => $value) {\n if (array_key_exists('creditos', $aCamposEvaluar)) {\n continue;\n } else if (!preg_match('/[A-Z][a-z]+/', $aCamposEvaluar[\"$key2\"])) {\n $aMensajes[] = \"Revisa el <strong>formato</strong> e ingresa <strong>unicamente letras</strong> para $key2.\";\n }\n }\n }\n return $aMensajes;\n}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5993861", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5993861", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5993861", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5993861", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5993861", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5993861", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5993861", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.59911096", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.59911096", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.59911096", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.59911096", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.5990026", "text": "public function valid(){}", "title": "" }, { "docid": "13ddd926d65cd4e6a3517befa999f97d", "score": "0.59685314", "text": "public function validateMass();", "title": "" }, { "docid": "3ea8b20db9550fbb0df6f4848b673b7c", "score": "0.59559536", "text": "public function isValid(){\n $msg = array();\n if($this->getInvGrado()){\n if($this->getInvGrado()+0 <=0 || $this->getInvGrado()+0 >100 ){\n $msg[]='- El grado ingresado \"'.$this->getInvGrado().'\" debe ser mayor a 0 y menor a 100';\n }\n }else{\n $msg[]='- El campo \"Grados\" se encuentra vacio';\n }\n \n return $msg;\n }", "title": "" }, { "docid": "93d0a4f7df2b34da1bf7e9dbeb26e581", "score": "0.59558034", "text": "public function Validar(){\n\t\t$campos=\"SELECT P.PerNumDoc,\n\t\t\t\t\t\tP.PerPriNom,\n\t\t\t\t\t\tP.PerSegNom,\n\t\t\t\t\t\tP.PerPriApe,\n\t\t\t\t\t\tP.PerSegApe,\n\t\t\t\t\t\tP.PerDirRes,\n\t\t\t\t\t\tP.PerNumTel,\n\t\t\t\t\t\tP.PerEmail,\n\t\t\t\t\t\tP.Latitud,\n\t\t\t\t\t\tP.Longitud FROM personas as P WHERE P.PerNumDoc='$this->PerNumDoc'\";\n\t\t\t\t\t\t$querycampos=mysql_query($campos);\n\t\t\t\t\t\t$row=mysql_num_rows($querycampos);\n\t\t\t\t\t\tif($row==true){\n\t\t\t\t\t\t\twhile($rowper=mysql_fetch_array($row)){\n\t\t\t\t\t\t\t\trequire_once(\"../actualizar_datos.php\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\techo \"<script>alert('Usted no está registrado en la base de datos de SISBEN, por favor verifique su documento e intente nuevamente');</script>\";\n\t\t\t\t\t\t\techo \"<script>window.location.href='../actualizar_datos.php';</script>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\n\t\techo \"<script>alert('Entre a la funcion validar');</script>\";\n echo \"<script>window.location.href='../actualizar_datos.php';</script>\";\n\n\t}", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.59472203", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.59472203", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.59472203", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.59472203", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.59472203", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.59472203", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.59472203", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.59472203", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.59472203", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.59472203", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.59472203", "text": "public function validate();", "title": "" }, { "docid": "a8fb7163a23b1f3f3ba91af5577abc95", "score": "0.5946193", "text": "public abstract function valid();", "title": "" }, { "docid": "356a1f48b86ce2b223d733ab17fc8c42", "score": "0.59443265", "text": "function evalform($formula){\n\t\t$MONTO = $this->MONTO;\n\t\t$SUELDO = $this->SUELDO;\n\t\t$SPROME = $this->SPROME;\n\t\t$DIAS = $this->DIAS;\n\t\t$FDESDE = $this->fdesde;\n\t\t$FHASTA = $this->fhasta;\n\n\t\t$VARI1 = $this->VARI1;\n\t\t$VARI2 = $this->VARI2;\n\t\t$VARI3 = $this->VARI3;\n\t\t$VARI4 = $this->VARI4;\n\t\t$VARI5 = $this->VARI5;\n\t\t$VARI6 = $this->VARI6;\n\n\t\t$INTFDESDE = preg_replace('/[^0-9]/','',$this->fdesde);\n\t\t$INTFHASTA = preg_replace('/[^0-9]/','',$this->fhasta);\n\n\t\t$SMINIMO = $this->ci->datasis->traevalor('SUELDOMINIMO');\n\n\t\t$fformula = $this->_traduce($formula);\n\n\t\t//if(strpos($formula,'REPOSO')) memowrite($formula.' == >> '.$fformula, 'Formula');\n\n\t\t$retorna='$rt='.$fformula.';';\n\n\t\t$eval_ret = @eval($retorna);\n\t\tif($eval_ret === false){\n\t\t\t$rt=0;\n\t\t\tmemowrite($formula.' => '.$fformula,'prenom');\n\t\t\t$this->error[]=$formula;\n\t\t}\n\n\t\treturn $rt;\n\t}", "title": "" }, { "docid": "c9ea710b020e6709098a43815a1bed12", "score": "0.5925206", "text": "public function testIsValid(){\r\n\t\t\r\n\t}", "title": "" }, { "docid": "67258fb7d976e36966f7e2206ff48356", "score": "0.5913556", "text": "function valideForm(){\n\t\n\tglobal $_formulaire, $minLen;\n\t$message = '';\n\t$sql_set = '';\n\t\n\tforeach ($_formulaire as $key => $info){\n\t\t\n\t\t$label = $info['label'];\n\t\t$valeur = (isset($info['valide']))? $info['valide'] : NULL;\n\t\t\n\t\tif('valide' != $key && !isset($info['obligatoire']))\n\t\t\tif (isset($info['maxlength']) && \n\t\t\t\t(strlen($valeur) < $minLen || strlen($valeur) > $info['maxlength']) &&\n\t\t\t\t$key != 'mdp')\n\t\t\t{\n\t\t\t\t$message.= '<p> Erreur sur le ' .$label. \n\t\t\t\t\t': doit avoir un nombre de caracter compris entre ' . $minLen . \n\t\t\t\t\t' et ' . $info['maxlength'] . ' </p>';\n\t\t\t}else{\n\n\t\t\t\tswitch($key){\n\t\t\t\t\t\n\t\t\t\t\tcase 'sexe':\n\t\t\t\t\t\tif(empty($valeur))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$message.= '<p> Erreur sur ' . $label . \n\t\t\t\t\t\t\t\t': Vous devez choisire une option </p>';\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'telephone':\n\t\t\t\t\t\tif(!preg_match('#[0-9.\\s.-]#', $valeur))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$message.= '<p> Erreur sur ' . $label . \n\t\t\t\t\t\t\t\t': Il doit comptenir que des chiffres </p>';\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'mdp':\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif(strlen($valeur) < $minLen ) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$message.= '<p> Erreur sur ' . $label . \n\t\t\t\t\t\t\t\t': Il doit avoir un nombre de minimum ' . $minLen . ' caracteres </p>';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t// Construction de la requettes\n\t\t\t\t// le mot de passe doit être traité differament\n\t\t\t\tif($key != 'mdp' || ($key == 'mdp' and !empty($valeur))) \n\t\t\t\t\t$sql_set .= ((!empty($sql_set))? \", \" : \"\") . \"$key = '$valeur'\";\n\t\t\t}\n\t}\n\t\n\t// si la variable $message est vide alors il n'y a pas d'erreurr !\n\tif(empty($message)) \n\t{\n\n\t\t$sql = 'UPDATE membre SET '.$sql_set.' WHERE id_membre = '.$_SESSION['utilisateur']['id'];\n\t\texecuteRequete ($sql);\n\t\t// ouverture d'une session\n\t\t$message = \"OK\";\n\t\t\n\t}else{ \n\t\t$message = '<div class=\"bg-danger message\">'.$message.'</div>';\n\t}\n\n\treturn $message;\n}", "title": "" }, { "docid": "013e41cf831586b7c2b42d44d06d6d30", "score": "0.5910295", "text": "function afficheFormInscription()\n /**\n *\\author Hugo Lausenaz-Pire\n *\\verificator Joseph Tabailloux & Frédéric Pinaud\n *\\brief affecte une valeur à un formulaire d'inscription avec un titre h1 et un sous titre h3s\n * Pas de paramètre\n *\\return return le formulaire sous forme de string\n *\\Test Regarder à la fin de la fonction\n */\n {\n $echo = '\n <div class=\"container-full\">\n <div class=\"row\">\n <div class=\"col-lg-12 text-center v-center\">\n <form method=\"post\" class=\"col-lg-12\">\n <div class=\"input-group\" style=\"width:340px;text-align:center;margin:0 auto;\">\n\n <h1>Inscription</h1>\n <h3>Tous les champs sont obligatoire !</h3>\n <label for=\"mail\">Mail\n <input type=\"text\" name=\"mail\" id=\"mail\" class=\"form-control\">\n </label>\n\n <label for=\"mdp\">Mot de passe\n <input type=\"password\" name=\"mdp\" id=\"mdp\" class=\"form-control\"></br>\n </label>\n\n <label for=\"mdpC\">Confirmation du mot de passe\n <input type=\"password\" name=\"mdpC\" id=\"mdpC\" class=\"form-control\"></br>\n </label>\n\n <label for=\"prenom\">Prénom\n <input type=\"text\" name=\"prenom\" id=\"prenom\" class=\"form-control\">\n </label>\n\n <label for=\"nom\">Nom\n <input type=\"text\" name=\"nom\" id=\"nom\" class=\"form-control\">\n </label>\n <span class=\"input-control input-lg\">\n <input type=\"submit\" class=\"btn btn-lg btn-primary\" name=\"inscription\" value=\"inscription\" id=\"Submit_connexion\">\n </span>\n <span class=\"input-control input-lg\">\n <input type=\"submit\" class=\"btn btn-lg btn-primary\" name=\"retour\" value=\"Retour\" id=\"Submit_retour\">\n </span>\n </div>\n </form>\n </div>\n </div>\n </div>\n ';\n return $echo;\n }", "title": "" }, { "docid": "5a4ebdc83874b9d4f7f0b062c2ea5f01", "score": "0.5901644", "text": "public function valid ();", "title": "" }, { "docid": "c402b877566be2d723bd5962cb7073ee", "score": "0.5896835", "text": "public function validate () {}", "title": "" }, { "docid": "0a207d3761f0b1e3eb091e6c87cdf3eb", "score": "0.5888803", "text": "abstract function validatePayment();", "title": "" }, { "docid": "22a86dc03b944c366cc1ea2a2ca24095", "score": "0.5876133", "text": "public function validate(){}", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.58712655", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.58712655", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.58712655", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.58712655", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.58712655", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.58712655", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.58712655", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.58712655", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.58712655", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.58712655", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.58712655", "text": "public function valid();", "title": "" }, { "docid": "013040f33c095e942e1d724f4ae61d7c", "score": "0.5858053", "text": "public function verify()\n\t{\n\t\t$sides = explode(\"=\", $this->equation);\n\t\t$lIndex = $this->equation[strlen($this->equation)-1];\n\t\t$rIndex = $this->equation[0];\n\t\tif (count($sides) != 2)\n\t\t{\n\t\t\t//we have a problem: either no equals sign was provided or too many were supplied\n\t\t\treturn false;\n\t\t}\n\t\telse if (count(self::get_variable()) != 1)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse if (strstr(\"*-+/\\\\&^%$#@!()[]{}<>.,_\", $lIndex) || strstr(\"*/\\\\&^%$#@!<>.,_\", $rIndex))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tfor ($i = 0; $i < strlen($this->equation); $i++)\n\t\t{\n\t\t\tif (strstr(\"\\\\&^%$@!<>,_\", $this->equation[$i]))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (strstr(\"+\", $this->equation[$i]))\n\t\t\t{\n\t\t\t\tif (strstr(\"+-*/\", $this->equation[$i+1]) || strstr(\"+-*/\", $this->equation[$i-1]))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (strstr(\".\", $this->equation[$i]))\n\t\t\t{\n\t\t\t\tif (!is_numeric($this->equation[$i-1]) || !is_numeric($this->equation[$i+1]))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a40d2074b5542d23e43f22ce4593349b", "score": "0.584601", "text": "function areProductNamesValid($formula)\n {\n return true;\n }", "title": "" }, { "docid": "04af368a214c4eee0982625147209db4", "score": "0.5844791", "text": "public function validate()\n {\n // Income\n if ($this->income == '') {\n $this->errors[] = 'Podaj przychód!';\n }\n\t\tif (($this->income<0) || ($this->income==0))\n\t\t{\n\t\t\t$this->errors[]=\"Przychód musi być większy od 0!\";\n\t\t}\t\n }", "title": "" }, { "docid": "63b8d6b61eeaa843d3f3841b4ab8c08a", "score": "0.5810114", "text": "public function validates();", "title": "" }, { "docid": "132bd3c9e05dba0685c7968d883d0e41", "score": "0.5809701", "text": "public function isValid(){}", "title": "" }, { "docid": "e023cee8d11d6014980070647ca44014", "score": "0.58013105", "text": "function ETAT_VALIDATE()\n{\n require 'Dbconnection.php';\nextract($_POST);\n\n $Res = $db->query(\"select Validate_Vendeur as V_V , Validate_Acheteur as V_A from suggestion where Id_vendeur=\".$id_vendeur.\" AND id_acheteur=\".$id_acheteur.\" \");\n\n if($Res->rowCount() == 0) return 0 ;\n else\n {\n $Res = $db->query(\"select Validate_Vendeur as V_V , Validate_Acheteur as V_A from suggestion where Id_vendeur=\".$id_vendeur.\" AND id_acheteur=\".$id_acheteur.\" \")->fetch();\n if($Res[\"V_A\"] == 1 && $Res[\"V_V\"] == 0) return 1 ;\n else\n {\n if($Res[\"V_A\"] == 0 && $Res[\"V_V\"] == 1) return 2;\n }\n\n }\n}", "title": "" }, { "docid": "a599564049910a57d183384ba22fb157", "score": "0.5791595", "text": "public function validate()\n {\n // Amount\n if ($this->amount == '') {\n $this->errors[] = 'Nalezy podac kwote';\n }\n\n\t\tif ($this->amount <= 0) {\n $this->errors[] = 'Wartosc musi być większa od zera';\n }\n\t\t\n\t\tif($this->date < \"2000-01-01\"){\n\t\t\t$this->errors[] = 'Data musi być wcześniejsza niż 2000-01-01 ';\n\t\t}\n }", "title": "" }, { "docid": "9dd24cc0ab261f4f8a93191611045a23", "score": "0.5777527", "text": "public function valid () {}", "title": "" }, { "docid": "5bc7768fe23d1eba542c158d96655d2a", "score": "0.57763165", "text": "function controleFormInscription($tab)\n /**\n *\\author Hugo Lausenaz-Pire\n *\\verificator Joseph Tabailloux\n *\\brief affecte une valeur à un formulaire de connexion avec un titre h1\n * Pas de paramètre\n *\\return return le formulaire sous forme de string\n *\\Test Regarder à la fin de la fonction\n */\n {\n session_start();\n if (strlen($tab['Nom'] <3)) {\n $_SESSION['msgErreur'] .= \"Nom absent ou trop court <br>\";\n }\n if (strlen($tab['Prenom'] <3)) {\n $_SESSION['msgErreur'] .= \"Prénom absent ou trop court <br>\";\n }\n if (!filter_var($tab['Mail'], FILTER_VALIDATE_EMAIL)) {\n $_SESSION['msgErreur'] .= \"Mail invalide <br>\";\n }\n if (strlen($tab['MDP'] < 7)) {\n $_SESSION['msgErreur'] .= \"Mail absent ou trop court (8 caractères minimum) <br>\";\n }\n if ($tab['MDP'] != $tab['confirmation']) {\n $_SESSION['msgErreur'] .= \"Les deux mots de passe sont différents <br>\";\n }\n return ajouteUtilisateur($_POST);\n }", "title": "" }, { "docid": "b4af244d9d0f79e0d393552561f5b505", "score": "0.5748851", "text": "function OBTENER_FORMULA($_ARGS) {\r\n\t$sql = \"SELECT Formula FROM pr_concepto WHERE CodConcepto = '\".$_ARGS['CONCEPTO'].\"'\";\r\n\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\tif (mysql_num_rows($query) != 0) {\r\n\t\t$field = mysql_fetch_array($query);\r\n\t\treturn $field['Formula'];\r\n\t} else return \"\";\r\n}", "title": "" }, { "docid": "cd26c966e19843afe0266426f39fbf02", "score": "0.57321995", "text": "public function validateTerms()\n\t{\n\t\treturn doubleval($this->invoice->first_total) == doubleval($this->request->get('rp'));\n\t}", "title": "" }, { "docid": "5209d83554aa9ef33bc1403e1b17f53f", "score": "0.57261896", "text": "function validarSesion($matricula) {\n $sql = \"SELECT nombre FROM `alumnos` WHERE id ='\" . $matricula . \"'\";\n $response = getResultSQL($sql);\n if (!$response) { //si el alumno no existe\n return false;\n } else {\n return response;\n }\n }", "title": "" }, { "docid": "12680f7d0743641f92dc931deda2b621", "score": "0.5720876", "text": "function baz_gestion_formulaire() {\n\t$res= '<h2>'.BAZ_MODIFIER_FORMULAIRES.'</h2>'.\"\\n\";\n\n\t// il y a un formulaire a modifier\n\tif (isset($_GET['action_formulaire']) && $_GET['action_formulaire']=='modif') {\n\t\t//recuperation des informations du type de formulaire\n\t\t$requete = 'SELECT * FROM '.BAZ_PREFIXE.'nature WHERE bn_id_nature='.$_GET['idformulaire'];\n\t\t$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;\n\t\tif (DB::isError($resultat)) {\n\t\t\treturn ($resultat->getMessage().$resultat->getDebugInfo()) ;\n\t\t}\n\t\t$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC);\n\t\t$formulaire=baz_formulaire_des_formulaires('modif_v');\n\t\t$formulaire->setDefaults($ligne);\n\t\t$res .= $formulaire->toHTML();\n\n\t//il y a un nouveau formulaire a saisir\n\t} elseif (isset($_GET['action_formulaire']) && $_GET['action_formulaire']=='new') {\n\t\t$formulaire=baz_formulaire_des_formulaires('new_v');\n\t\t$res .= $formulaire->toHTML();\n\n\t//il y a des donnees pour ajouter un nouveau formulaire\n\t} elseif (isset($_GET['action_formulaire']) && $_GET['action_formulaire']=='new_v') {\n\t\t$requete = 'INSERT INTO '.BAZ_PREFIXE.'nature (`bn_id_nature` ,`bn_ce_i18n` ,`bn_label_nature` ,`bn_template` ,`bn_description` ,`bn_condition`, `bn_label_class` ,`bn_type_fiche`)' .\n\t\t\t\t ' VALUES ('.baz_nextId(BAZ_PREFIXE.'nature', 'bn_id_nature', $GLOBALS['_BAZAR_']['db']).\n ', \"fr-FR\", \"'.addslashes($_POST[\"bn_label_nature\"]).'\", \"'.addslashes($_POST[\"bn_template\"]).\n\t\t\t\t '\", \"'.addslashes($_POST[\"bn_description\"]).'\", \"'.addslashes($_POST[\"bn_condition\"]).\n\t\t\t\t '\", \"'.$_POST[\"bn_label_class\"].'\", \"'.$_POST[\"bn_type_fiche\"].'\")';\n\t\t$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;\n\t\tif (DB::isError($resultat)) {\n\t\t\treturn ($resultat->getMessage().$resultat->getDebugInfo()) ;\n\t\t}\n\t\t$res .= '<div class=\"info_box\">'.BAZ_NOUVEAU_FORMULAIRE_ENREGISTRE.'</div>'.\"\\n\";\n\n\t//il y a des donnees pour modifier un formulaire\n\t} elseif (isset($_GET['action_formulaire']) && $_GET['action_formulaire']=='modif_v' && baz_a_le_droit('saisie_formulaire') ) {\n\t\t$requete = 'UPDATE '.BAZ_PREFIXE.'nature SET `bn_label_nature`=\"'.$_POST[\"bn_label_nature\"].\n\t\t\t\t '\" ,`bn_template`=\"'.addslashes($_POST[\"bn_template\"]).\n\t\t\t\t '\" ,`bn_description`=\"'.addslashes($_POST[\"bn_description\"]).\n\t\t\t\t '\" ,`bn_condition`=\"'.addslashes($_POST[\"bn_condition\"]).\n\t\t\t\t\t'\" ,`bn_label_class`=\"'.addslashes($_POST[\"bn_label_class\"]).\n\t\t\t\t '\" ,`bn_type_fiche`=\"'.addslashes($_POST[\"bn_type_fiche\"]).'\"'.\n\t\t\t\t ' WHERE `bn_id_nature`='.$_POST[\"bn_id_nature\"];\n\t\t$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;\n\t\tif (DB::isError($resultat)) {\n\t\t\treturn ($resultat->getMessage().$resultat->getDebugInfo()) ;\n\t\t}\n\t\t$res .= '<div class=\"info_box\">'.BAZ_FORMULAIRE_MODIFIE.'</div>'.\"\\n\";\n\n\t// il y a un id de formulaire à supprimer\n\t} elseif (isset($_GET['action_formulaire']) && $_GET['action_formulaire']=='delete' && baz_a_le_droit('saisie_formulaire')) {\n\t\t//suppression de l'entree dans '.BAZ_PREFIXE.'nature\n\t\t$requete = 'DELETE FROM '.BAZ_PREFIXE.'nature WHERE bn_id_nature='.$_GET['idformulaire'];\n\t\t$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;\n\t\tif (DB::isError($resultat)) {\n\t\t\treturn ($resultat->getMessage().$resultat->getDebugInfo()) ;\n\t\t}\n\n\t\t//suppression des fiches associees dans '.BAZ_PREFIXE.'fiche\n\t\t$requete = 'DELETE FROM '.BAZ_PREFIXE.'fiche WHERE bf_ce_nature='.$_GET['idformulaire'];\n\t\t$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;\n\t\tif (DB::isError($resultat)) {\n\t\t\treturn ($resultat->getMessage().$resultat->getDebugInfo()) ;\n\t\t}\n\n\t\t$res .= '<div class=\"info_box\">'.BAZ_FORMULAIRE_ET_FICHES_SUPPRIMES.'</div>'.\"\\n\";\n\t}\n\n\t// affichage de la liste des templates à modifier ou supprimer (on l'affiche dans tous les cas, sauf cas de modif de formulaire)\n\tif (!isset($_GET['action_formulaire']) || ($_GET['action_formulaire']!='modif' && $_GET['action_formulaire']!='new') ) {\n\t\t$res .= '<div class=\"info_box\">'.BAZ_INTRO_MODIFIER_FORMULAIRE.'</div>'.\"\\n\";\n\n\t\t//requete pour obtenir l'id et le label des types d'annonces\n\t\t$requete = 'SELECT bn_id_nature, bn_label_nature, bn_type_fiche '.\n\t\t 'FROM '.BAZ_PREFIXE.'nature WHERE 1 ORDER BY bn_type_fiche';\n\t\t$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;\n\t\tif (DB::isError($resultat)) {\n\t\t\treturn ($resultat->getMessage().$resultat->getDebugInfo()) ;\n\t\t}\n\t\t$liste=''; $type_formulaire='';\n\t\twhile ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {\n\t\t\tif ($type_formulaire!=$ligne['bn_type_fiche']) {\n\t\t\t\tif ($type_formulaire!='') $liste .= '</ul><br />'.\"\\n\";\n\t\t\t\t$liste .= '<h3>'.$ligne['bn_type_fiche'].'</h3>'.\"\\n\".\n\t\t\t\t'<ul class=\"BAZ_liste\">'.\"\\n\";\n\t\t\t\t$type_formulaire = $ligne['bn_type_fiche'];\n\t\t\t}\n\t\t\t$lien_formulaire=clone($GLOBALS['_BAZAR_']['url']);\n\t\t\t$liste .= '<li>';\n\t\t\t$lien_formulaire->addQueryString('action_formulaire', 'delete');\n\t\t\t$lien_formulaire->addQueryString('idformulaire', $ligne['bn_id_nature']);\n\t\t\tif (baz_a_le_droit('saisie_formulaire')) {\n\t\t\t\t$liste .= '<a class=\"BAZ_lien_supprimer\" href=\"'.str_replace('&','&amp;',$lien_formulaire->getURL()).'\" onclick=\"javascript:return confirm(\\''.BAZ_CONFIRM_SUPPRIMER_FORMULAIRE.' ?\\');\"></a>'.\"\\n\";\n\t\t\t}\n\t\t\t$lien_formulaire->removeQueryString('action_formulaire');\n\t\t\t$lien_formulaire->addQueryString('action_formulaire', 'modif');\n\t\t\tif (baz_a_le_droit('saisie_formulaire')) {\n\t\t\t\t$liste .= '<a class=\"BAZ_lien_modifier\" href=\"'.str_replace('&','&amp;',$lien_formulaire->getURL()).'\">'.$ligne['bn_label_nature'].'</a>'.\"\\n\";\n\t\t\t} else {\n\t\t\t\t$liste .= $ligne['bn_label_nature'].\"\\n\";\n\t\t\t}\n\t\t\t$lien_formulaire->removeQueryString('action_formulaire');\n\t\t\t$lien_formulaire->removeQueryString('idformulaire');\n\n\t\t\t$liste .='</li>'.\"\\n\";\n\t\t}\n\t\tif ($liste!='') $res .= $liste.'</ul><br />'.\"\\n\";\n\n\t\t//ajout du lien pour creer un nouveau formulaire\n\t\tif (baz_a_le_droit('saisie_formulaire')) {\n\t\t\t$lien_formulaire=clone($GLOBALS['_BAZAR_']['url']);\n\t\t\t$lien_formulaire->addQueryString('action_formulaire', 'new');\n\t\t\t$res .= '<a class=\"BAZ_lien_nouveau\" href=\"'.str_replace('&','&amp;',$lien_formulaire->getURL()).'\">'.BAZ_NOUVEAU_FORMULAIRE.'</a>'.\"\\n\";\n\t\t}\n\n\t}\n\treturn $res;\n}", "title": "" }, { "docid": "3393fd47e9a431641806154786c45461", "score": "0.5720109", "text": "function validar_campos($row0, $row1, $row2, $row3, $row4, $row5, $row6, $row7, $row8, $row9, $row10, $row11, $row12, $row13)\n{\n $cuenta = 0;\n\n if ($row0 == null) {\n echo 'El nombre del estudiante no puede estar vacío';\n exit;\n } elseif ($row1 == NULL) {\n echo 'El apellido del estudiante no puede estar vacío';\n exit;\n } elseif ($row2 == NULL) {\n echo 'La fecha de nacimiento del Estudiante no puede estar vacía';\n exit;\n } elseif ($row3 == NULL) {\n echo 'El Run del estudiante no puede estar vacáa';\n exit;\n } elseif ($row4 == NULL) {\n if ($row4 == 0) {\n $$row4 = 0;\n } else {\n echo 'El Dígito verificador del Run del estudiante no puede estar vacío';\n exit;\n }\n\n } elseif ($cuenta == 1 && $row5 == NULL) {\n echo 'El campo Establecimiento no puede estar vacío';\n exit;\n } elseif ($cuenta == 1 && $row6 == NULL) {\n echo 'El RBD del establecimiento no puede estar vacío';\n exit;\n } elseif ($cuenta == 1 && $row7 == NULL) {\n echo 'El campo Curso no puede estar vacío';\n exit;\n } elseif ($row8 == NULL) {\n echo 'El Campo Ciudad no puede quedar vacío';\n exit;\n } elseif ($cuenta == 1 && $row9 == NULL) {\n echo 'Los nombres del docente no puede quedar vacíos';\n exit;\n } elseif ($cuenta == 1 && $row10 == NULL) {\n echo 'Los apellidos de los apoderados no puede estar vacíos';\n exit;\n } elseif ($cuenta == 1 && $row11 == NULL) {\n echo 'El Run del docente no puede estar vacío';\n exit;\n } elseif ($cuenta == 1 && $row12 == NULL) {\n echo 'El Digito verificador del docente no puede estar vacío';\n exit;\n } elseif ($cuenta == 1 && $row13 == NULL) {\n echo 'El email del docente no puede quedar vacío';\n exit;\n }\n\n}", "title": "" }, { "docid": "65ccd8d326c37ae691f33fd309a48fc2", "score": "0.57198185", "text": "public function check()\n\t{\n\t\t$this->checkPrice('value');\n\t\t$this->checkPrice('price');\n\t\t$this->checkPrice('price_orig');\n\n\t\treturn parent::check();\n\t}", "title": "" }, { "docid": "735767266737f0cc1322991ba673e672", "score": "0.57186353", "text": "function formulaires_editer_abomailman_verifier_dist($id_abomailman = 'new', $retour = '', $config_fonc = '', $row = array(), $hidden = '')\n{\n $erreurs = formulaires_editer_objet_verifier('abomailman', $id_abomailman, array('titre', 'email'));\n spip_log($erreurs, 'test');\n // Faire une fonction de verif sur le mail et le titre pour validite\n $desactive = _request('desactive');\n\n // Si on fait une suppression, on ne vérifie pas le reste\n if ($desactive != '2') {\n if (count($erreurs) < 1) {\n include_spip('inc/filtres'); # pour email_valide()\n if (!email_valide(_request('email'))) {\n $erreurs['email'] = _T('abomailmans:email_valide');\n }\n }\n }\n\n //message d'erreur genéralisé\n if (count($erreurs) > 0) {\n $erreurs['message_erreur'] .= _T('abomailmans:verifier_formulaire');\n }\n\n return $erreurs; // si c'est vide, traiter sera appele, sinon le formulaire sera resoumis\n}", "title": "" }, { "docid": "d1d6832d2af8987902b4110e8d141c3a", "score": "0.5711451", "text": "protected function isValid() \n\t{\n\t}", "title": "" }, { "docid": "8a37151db2390562ea9c59c0f0a28f64", "score": "0.5710788", "text": "protected function calcAnswer()\n\t{\n\t\tif ( empty($this->errors) )\n\t\t{\n\t\t\t$result = $this->applyformula();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result = \"Sorry, pease try again!\";\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.5695789", "text": "public function valid() {}", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.5695789", "text": "public function valid() {}", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.5695789", "text": "public function valid() {}", "title": "" }, { "docid": "12852b1f22b15ff1d1f6742fc41769fd", "score": "0.5694405", "text": "function applyformula();", "title": "" } ]
2ae5e72a0e613117e3537f51c2d10986
Returns the value of the cookie in the HTTP response with the provided name
[ { "docid": "d665b767275de922d1988ea151b6ec63", "score": "0.7125755", "text": "public function getCookie(string $name)\n {\n if (array_key_exists($name, $this->cookies)) {\n return $this->cookies[$name];\n }\n return null;\n }", "title": "" } ]
[ { "docid": "453b4d21c2d16924083825ea17c4fafc", "score": "0.796647", "text": "public static final function getCookie($name) {\n\t\t$request = PhpBB::getInstance()->getRequest();\n\t\treturn $request->variable($name, NULL, true, request_interface::COOKIE);\n\t}", "title": "" }, { "docid": "5934290a96be504c1b001b96012c8384", "score": "0.7884777", "text": "public function getCookieValue($name)\n {\n return isset($this->_cookieCache[$name])\n ? $this->_cookieCache[$name] :\n $this->_cookieManager->getCookie($name);\n }", "title": "" }, { "docid": "47649b65e58761f0e909528afaeb7b27", "score": "0.7875705", "text": "public function get($name) {\n return $_COOKIE[$name];\n }", "title": "" }, { "docid": "dd66fd089c8e98414da504b13cef98e9", "score": "0.7827433", "text": "public function get($name)\n {\n $command = $this->driver->factoryCommand('cookie', WebDriver_Command::METHOD_GET);\n $value = $this->driver->curl($command)['value'];\n $search = array_filter(\n $value,\n function ($item) use ($name) {\n return ($item['name'] == $name);\n }\n );\n $search = array_values($search);\n $value = empty($search)?null:$search[0];\n if ($value) {\n $value = new WebDriver_Object_Cookie_CookieInfo($value);\n }\n return $value;\n }", "title": "" }, { "docid": "99a5dba85962f02c16de8089a0975c21", "score": "0.77899724", "text": "public static function get($name){\r\r\n\t\t\treturn $_COOKIE[$name];\r\r\n\t\t}", "title": "" }, { "docid": "807dab3b5e32dd62919e4f6036f4f277", "score": "0.76239043", "text": "public function get($name)\n {\n return isset($this->_cookies[$name]) ? $this->_cookies[$name] : null;\n }", "title": "" }, { "docid": "409417544690e2aadce6dbc681facfbd", "score": "0.759121", "text": "public function getCookie ($name) {\n\t\treturn ($this->getCookies()->data[$name] ?? null);\n\t}", "title": "" }, { "docid": "a71938f72260b049d1659bba073441ac", "score": "0.7553417", "text": "public function getCookie($name) {\n\t\treturn $_COOKIE[$name];\n\t}", "title": "" }, { "docid": "08911db20cecce3ed65218ba9c62ffbb", "score": "0.7530056", "text": "public function getCookie($name)\n {\n return $this->cookie->getCookie($name);\n }", "title": "" }, { "docid": "18273840e7f892109fe4d85825002663", "score": "0.7487897", "text": "public function getCookie(string $name)\n {\n Craft::$app->getDeprecator()->log('craft.request.getCookie()', 'craft.request.getCookie() has been deprecated. Use craft.app.request.cookies.get() instead.');\n\n return Craft::$app->getRequest()->getCookies()->get($name);\n }", "title": "" }, { "docid": "039ef5055fb2ab227aae81d5f9eb4a92", "score": "0.7340078", "text": "public function getCookieValue($name): string\n {\n // Retrieve the cookie value by cookie name\n if (!$cookie = $this->getCookieJar()->getCookieByName($name)) {\n throw new Exception(sprintf('The cookie %s is missing in the cookie jar', $name));\n }\n\n return $cookie->getValue();\n }", "title": "" }, { "docid": "9ff64c38ea0c57244ab5dfedbe1a7921", "score": "0.7327704", "text": "public function get($name = null)\n {\n return $this->_getRequest()->getCookie($name, false);\n }", "title": "" }, { "docid": "b9841b5aff6ab700e20370fbce5697c3", "score": "0.7240049", "text": "public function get($name)\n {\n \tif(isset($_COOKIE[$name])) {\n \treturn $_COOKIE[$name];\n \t} else {\n \treturn false;\n \t}\n }", "title": "" }, { "docid": "2ab3c0897583cce7e8a842e27456c4d4", "score": "0.71759534", "text": "public function cookie($name)\n\t\t{\n\t\t\treturn isset($this->cookies[$name]) ? $this->cookies[$name]:null;\n\t\t}", "title": "" }, { "docid": "1699a4369c7acf05ed18686650cd1cfa", "score": "0.71632564", "text": "public function cookie($name);", "title": "" }, { "docid": "8d73b2fd7c95a129a5f3a8d77c30a74a", "score": "0.7064986", "text": "public function get_cookie($name)\n\t\t{\n\t\t\treturn isset($this->cookie[$name]) ? $this->cookie[$name] : null;\n\t\t}", "title": "" }, { "docid": "be9a6469114ee660a86ba952683ae6ed", "score": "0.7048611", "text": "public static function get($name){\n if(self::existsCookie($name)){\n return $_COOKIE[COOKIE_PREFIX . $name];\n }\n \n return false;\n }", "title": "" }, { "docid": "9b510a7f00eea8d4bd8e8a9b28a5132d", "score": "0.67922866", "text": "public function header_value($name) {\r\n\t\t$translated_name = 'HTTP_' . strtoupper(str_replace('-', '_', $name));\r\n\t\treturn trim(Arr::get_item($this->data, $translated_name, ''));\r\n\t}", "title": "" }, { "docid": "70a956abdcb23022636c740b89048b80", "score": "0.6776822", "text": "public static function cookie($name){\n\t\t\tif(isset($_COOKIE[$name])){\n\t\t\t\treturn $_COOKIE[$name];\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "21dd428c5f8cd713ba49d7b3aa2e1b26", "score": "0.67352194", "text": "public static function getCookie($name) {\n if (self::hasCookie($name)) {\n return $_COOKIE[self::$prefix.$name];\n }\n return null;\n }", "title": "" }, { "docid": "c668cc04c0475839f5330f31b5e91763", "score": "0.67264223", "text": "function my_getcookie($name)\n\t{\n\t\tglobal $ibforums;\n\n\t\tif (isset($_COOKIE[$ibforums->vars['cookie_id'] . $name]))\n\t\t{\n\t\t\treturn $this->clean_value(urldecode($_COOKIE[$ibforums->vars['cookie_id'] . $name]));\n\t\t} else\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "ae0d61f8eea11796ea70a81c72abc49e", "score": "0.67034894", "text": "function getCookieValue($cookieName)\n{\n $cookie = \"KO\";\n if(!isset($_COOKIE[$cookieName]))\n {\n return \"KO\";\n }\n else\n {\n $cookie = $_COOKIE[$cookieName];\n return $cookie;\n }\n}", "title": "" }, { "docid": "7079d0bb04fe3bba71bf36e57e498e25", "score": "0.66385204", "text": "protected function getCookie($name)\n\t{\n\t\t$cookies = $this->getClient()->getConfig('cookies');\n\n\t\tif (!$cookies instanceof \\Traversable) {\n\t\t\treturn null;\n\t\t}\n\n\t\tforeach ($cookies as $cookie) {\n\t\t\t/** @var \\GuzzleHttp\\Cookie\\SetCookie $cookie */\n\t\t\tif ($cookie->getName() != $name) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!$cookie->getExpires() || $cookie->getExpires() > time()) {\n\t\t\t\treturn $cookie;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "ea4dcdfb5b26b638e8b710a4beaa40e9", "score": "0.65898407", "text": "public function cookieGet($s_name)\r\n {\r\n return isset($this->a_cookie[$s_name])?$this->a_cookie[$s_name]:null;\r\n }", "title": "" }, { "docid": "ae0bf76bbe3bf53952179cdbca65c9b0", "score": "0.6553797", "text": "public static function get_cookie($cookie_name){\n\t\n\t\tif(isset($_COOKIE[$cookie_name]))\n\t\t\treturn $_COOKIE[$cookie_name];\n\t\n\t}", "title": "" }, { "docid": "be02d73aedf679ad39938d69b197cb2e", "score": "0.64900005", "text": "public function pull(string $name, mixed $default = null): mixed\n {\n $this->throwExceptionIfHeadersWereSent();\n\n $value = $_COOKIE[$name] ?? $default;\n\n $this->remove($name);\n\n return $value;\n }", "title": "" }, { "docid": "0e02165530f3d64f5c7f7097cfe45069", "score": "0.64873344", "text": "public static function GetCookie($name)\r\n\t{\r\n\t\tself::checkValues();\r\n\t\t\r\n\t\tif(isset($_COOKIE[self::$prefix.str_replace(\".\", \"_\", $name)]))\r\n\t\t{\r\n\t\t\t$value = $_COOKIE[self::$prefix.str_replace(\".\", \"_\", $name)];\r\n\t\t\t\r\n\t\t\tif(substr($value, 0, 2) == \"a:\")\r\n\t\t\t\treturn sql_escape(unserialize(stripslashes(urldecode($value))));\r\n\t\t\telse\r\n\t\t\t\treturn sql_escape(stripslashes(urldecode($value)));\r\n\t\t}\r\n\t\telse return FALSE;\r\n\t}", "title": "" }, { "docid": "67b6110253e1e34bafbecfd0f1ee9a3c", "score": "0.64498824", "text": "public static function get()\n {\n return Cookie::get(self::name());\n }", "title": "" }, { "docid": "728f3a1e7cf113b708bde75edf24694b", "score": "0.64092815", "text": "function getCookie() {\r\n\t\t$cookieName = $_POST[\"cookie\"];\r\n\t\tif (isset($_COOKIE[$cookieName])) {\r\n\t\t\techo json_encode( array($cookieName => $_COOKIE[$cookieName]) );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "dd108c925c2ea788529773a119466575", "score": "0.6382867", "text": "protected final function getCookie($name,$defaultValue=null) {\n\t\treturn $this->getHttpRequest()->getCookie($name,$defaultValue);\n\t}", "title": "" }, { "docid": "5cf935f206ed60c8b67bd58fc9f1396c", "score": "0.6381885", "text": "private function Value($name)\n {\n $value = Request::PostData($this->prefix . $name);\n return Str::Trim($value);\n }", "title": "" }, { "docid": "b5c32c517241a9ba085db70adfe75b98", "score": "0.6371884", "text": "public function getCookieValue($host, $path, $name)\n {\n $longest_path = '';\n foreach ($this->cookies as $cookie) {\n if ($this->isMatch($cookie, $host, $path, $name)) {\n if (strlen($cookie->getPath()) > strlen($longest_path)) {\n $value = $cookie->getValue();\n $longest_path = $cookie->getPath();\n }\n }\n }\n\n return (isset($value) ? $value : false);\n }", "title": "" }, { "docid": "45e3a90f1864b9852f3ab21d11036453", "score": "0.63489664", "text": "public function __get($name)\n {\n return $this->response[$name] ?? null;\n }", "title": "" }, { "docid": "965ff8ee900a742fcb9a708f407c4936", "score": "0.6342565", "text": "public function get($sName = null) {\n\t\tif(true !== $sMessage = $this->validateName($sName)) {\n\t\t\tthrow new Exception($sMessage);\n\t\t}\n\t\tif(false === $this->bNamespace) {\n\t\t\t$sValue = $_COOKIE[$sName];\n\t\t} else {\n\t\t\t$sValue = $_COOKIE[$this->sNamespace][$sName];\n\t\t}\n\t\tif(null !== $mValue = json_decode($sValue, true)) {\n\t\t\tif(isset($mValue['content'])) {\n\t\t\t\t$mValue = unserialize($mValue['content']);\n\t\t\t}\n\t\t} else {\n\t\t\t$mValue = $sValue;\n\t\t}\n\t\treturn $mValue;\n\t}", "title": "" }, { "docid": "844b0705080cd015347df509f59372f0", "score": "0.6314584", "text": "public static function getCookieValue($name, $default = '')\n\t{\n\t\tif (isset($_COOKIE[$name]))\n\t\t{\n\t\t\treturn $_COOKIE[$name];\n\t\t} else {\n\t\t\treturn $default;\n\t\t}\n\t}", "title": "" }, { "docid": "0967a83ba048d69cf202322c6ad3777f", "score": "0.62923354", "text": "public function getSessionValue(string $name)\n\t{\n\t\treturn $this->sessionStorage->getPlugin()->getValue($name);\n\t}", "title": "" }, { "docid": "c5bd8caeb11a2ba7369cbca67136645a", "score": "0.6291115", "text": "public function getSessionValue(string $name)\n {\n return $this->sessionStorage->getPlugin()->getValue($name);\n }", "title": "" }, { "docid": "b7ead3464982a422b4b1a8a2096a0896", "score": "0.6285714", "text": "public function get()\n {\n $data = explode(':', $this->cookies[self::NAME]);\n\n return $this->parseData($data[0]);\n }", "title": "" }, { "docid": "bfb8173ed929e337b61ad785ffce62f8", "score": "0.62805265", "text": "public function __get($name)\n {\n return $this->getHeader($name);\n }", "title": "" }, { "docid": "94aad1463a5e6147af1ec40d42cb7930", "score": "0.62204003", "text": "public function getSecureCookie($name)\n {\n return Cookies::$plugin->cookies->getSecure($name);\n }", "title": "" }, { "docid": "ff61384ea514a00cd0da5bd765f75c19", "score": "0.6216353", "text": "public static function get($name, $default=null) {\n\t\treturn isset($_COOKIE[$name]) ? $_COOKIE[$name] : $default;\n\t}", "title": "" }, { "docid": "58816815ef6f4791c5f20fc4cbabaef6", "score": "0.6207625", "text": "public function get($name)\n {\n $name = $this->cast->encrypt($name);\n $name = base64_encode($name);\n \n if(isset($_SESSION[$name])){\n $value = base64_decode($_SESSION[$name]);\n $value = $this->cast->decrypt($value);\n $value = unserialize($value);\n }\n else{\n $value = \"\";\n }\n return $value;\n }", "title": "" }, { "docid": "edaf1722ca6e8eae06f8fa8b8fb5a903", "score": "0.62061065", "text": "protected function getResponseHeader(string $name): string\n {\n return $this->getResponse()->getHeaderLine($name);\n }", "title": "" }, { "docid": "08575d63776b4e7ab076294a5029a55c", "score": "0.62015474", "text": "public function getCookie(string $name, ?string $path = '*', ?string $domain = '*');", "title": "" }, { "docid": "e2812ee40fb8ed9163f8e7f06e66be65", "score": "0.6194227", "text": "public function cookie()\n\t{\n\t\treturn $this->headers()['Set-Cookie'][0];\n\t}", "title": "" }, { "docid": "b59ba8532b53225969b151416a9ef25c", "score": "0.6189383", "text": "public function get($name, $default = null)\r\n\t{\r\n\t\treturn (isset($_COOKIE[$name]) ? $_COOKIE[$name] : $default);\r\n\t}", "title": "" }, { "docid": "6fb87baab8739c9446c4e540e58b1121", "score": "0.6154711", "text": "public function getValue($name, $defaultValue = null)\n {\n return isset($this->_cookies[$name]) ? $this->_cookies[$name]->value : $defaultValue;\n }", "title": "" }, { "docid": "9e852cc6807a14a7ff95732b8057927a", "score": "0.61424834", "text": "public static function get($name, $default = null)\n\t{\n\t\treturn (array_key_exists($name, $_COOKIE)) ? $_COOKIE[$name] : $default;\n\t}", "title": "" }, { "docid": "13c6e1e633228e5d81732cf1c78b53f0", "score": "0.6137927", "text": "public static function get($cName,$default=\"\"){\n\t\t\treturn Cookie::get($cName,$default);\n\t\t}", "title": "" }, { "docid": "d55b66385a1ce2b3b11d6f5231ebff78", "score": "0.6126567", "text": "public static function get($name) {\r\n\t\treturn $_SESSION[$name];\r\n\t}", "title": "" }, { "docid": "76fa6f8e481b2d04a844db5ee701ff5b", "score": "0.6118991", "text": "public function get(string $name, mixed $default = null): mixed\n {\n return $_COOKIE[$name] ?? $default;\n }", "title": "" }, { "docid": "53dccd9249ea5c97b83d531d9e4e5875", "score": "0.6115894", "text": "public function getCookie($name, $default = null)\n {\n return $this->reader->getCookie($name, $default);\n }", "title": "" }, { "docid": "ae8c403ba85e09363700d6c4e536756d", "score": "0.6095449", "text": "function action_get()\n{\n\tif (isset($_GET[\"name\"]) && isset($_COOKIE[$_GET[\"name\"]]))\n\t\techo $_COOKIE[$_GET[\"name\"]];\n}", "title": "" }, { "docid": "bc3cd1b6c65e206c3e722150e51409c2", "score": "0.6075391", "text": "public function get($name)\n {\n // manage shortcut notations by adding 'vads_'\n $name = (substr($name, 0, 5) != 'vads_') ? 'vads_' . $name : $name;\n\n return @$this->rawResponse[$name];\n }", "title": "" }, { "docid": "963863c683c82f203a357014a97ffa98", "score": "0.6072622", "text": "private function getCookie($name)\n {\n $name = $this->getAsString($name, 'Cookie Name');\n if (array_key_exists($name, $this->cookies)) {\n return $this->cookies[$name];\n }\n throw new OutOfBoundsException('Cookie by name: ' . $name . ' is not related to Google Analytics.');\n }", "title": "" }, { "docid": "363660e83921c5de211f59abb303cf8f", "score": "0.6067783", "text": "public function getCookie()\n {\n return $this->httpPost('/api/get_cookie');\n }", "title": "" }, { "docid": "5b259db6eeeb1b47d9c5f4e7514ad725", "score": "0.6063049", "text": "public function fetchSessionCookie($window_name) {\n if (isset($_COOKIE['Butr|'.$window_name])) {\n return $_COOKIE['Butr|'.$window_name];\n }\n return '';\n }", "title": "" }, { "docid": "75dd54b332094023829e9b00e2e6cb72", "score": "0.6057029", "text": "public function read() {\n\t\tif (isset($_COOKIE[$this->name])) {\n\t\t\treturn $_COOKIE[$this->name];\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "8e5fd4507146cfff026a7b3af0c04d46", "score": "0.6056518", "text": "function Cookie($name) {\n\t\t$this->name = $name;\n\t\t$this->value = PHP::getCookieParameter($name);\n\t\tif ($this->value) {\n\t\t\t$this->value = str_replace('\\\\\\'', '\\'', $this->value);\n\t\t\t$this->value = str_replace('\\\"', '\"', $this->value);\n\t\t\t$this->value = unserialize($this->value);\n\t\t}\n\t\t$this->path = '/';\n\t\t$this->domain = '';\n\t\t$this->expire = 0;\n\t\t$this->secure = 0;\n\t}", "title": "" }, { "docid": "8c970dc6ef221cf08bc2a6b695392b3e", "score": "0.60557157", "text": "public static function get($name) {\n\t\t\treturn $_SESSION[$name];\n\t\t}", "title": "" }, { "docid": "2d38bb55cdefeb1c5fd829cb0bd7221a", "score": "0.60484326", "text": "public static function get(string $name, $default = null)\n {\n $request = Request::current();\n if (!$request) {\n throw new LogicException(\"Request has not been initialized.\");\n }\n return $request->cookies->get($name, $default);\n }", "title": "" }, { "docid": "88d52417defe2f3899246221297f287c", "score": "0.60385907", "text": "public function getCookieParam(string $name):? string\n {\n return array_key($name, $this->cookieParams);\n }", "title": "" }, { "docid": "c4cd983ebf14a38dddca9eaefa7badb7", "score": "0.6028292", "text": "public function __get($name)\n {\n switch ($name) {\n case 'paymentId':\n return $this->_paymentId;\n case 'status':\n return $this->_status;\n case 'error':\n return $this->_error;\n case 'PaymentUrl':\n return $this->_paymentUrl;\n case 'TerminalKey':\n return $this->_terminalKey;\n case 'response':\n return htmlentities($this->_response);\n default:\n if ($this->_response) {\n if ($json = json_decode($this->_response, true)) {\n foreach ($json as $key => $value) {\n if (strtolower($name) == strtolower($key)) {\n return $json[$key];\n }\n }\n }\n }\n\n return false;\n }\n }", "title": "" }, { "docid": "5ef65e2181f5ec6923b50ca7961e8ef4", "score": "0.60120475", "text": "public function deleteCookie($name) {\n $request = $this->requestURL . \"/cookie/\".$name;\n $session = $this->curlInit($request);\n $this->prepareDELETE($session);\n $response = curl_exec($session);\n $this->curlClose();\n }", "title": "" }, { "docid": "c3b42367d17d2b1e3418e25ec12e6a82", "score": "0.59993696", "text": "public function pull(string $name): string\n {\n $name = $this->getPrefix($name);\n\n if (isset($_SESSION[$name])) {\n $value = $_SESSION[$name];\n unset($_SESSION[$name]);\n return $value;\n }\n return false;\n }", "title": "" }, { "docid": "aca72830e86c2e02a52ec400b60afc89", "score": "0.59856886", "text": "function get_cookie($name)\n {\n if (isset($_COOKIE[ $name ])) {\n return $_COOKIE[ $name ];\n } elseif (function_exists('config')) {\n $prefix = config()->offsetGet('cookie')[ 'prefix' ];\n if (isset($_COOKIE[ $prefix . $name ])) {\n return $_COOKIE[ $prefix . $name ];\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "3d232061a7717320ae159042124b2123", "score": "0.59790826", "text": "public function getCookie()\r\n {\r\n return $this->cookie;\r\n }", "title": "" }, { "docid": "b462edd705cc905ba801bc71b69ac116", "score": "0.5978659", "text": "public static function getCookieInfo($cookie_name)\n {\n if (!isset($_COOKIE[$cookie_name])) {\n return null;\n }\n $data = base64_decode($_COOKIE[$cookie_name], true);\n if ($data === false) {\n return null;\n }\n return unserialize($data);\n }", "title": "" }, { "docid": "c67f586d25e310ce995a13c0a7fd2b83", "score": "0.5978061", "text": "public function get()\n {\n return $this->cookieManager->getCookie(self::COOKIE_NAME);\n }", "title": "" }, { "docid": "653393b9a048d19961426617fbd60de8", "score": "0.59742576", "text": "function getCookie($name, $default = '') {\n\t\tif (isset ($_SESSION[$name]))\n\t\t\treturn $_SESSION[$name];\n\t\telse\n\t\t\treturn $default;\n\t}", "title": "" }, { "docid": "b98a53e2ef0fbe76a8251bb11f773306", "score": "0.5969887", "text": "public function get(string $name)\n {\n $key = $this->getPrefix() . $name;\n return $_SESSION[$key] ?? false;\n }", "title": "" }, { "docid": "bb0ba539116508174b1024a75225c494", "score": "0.5932928", "text": "public static function cookie($_name = null)\n\t{\n\t\tif(!self::$COOKIE)\n\t\t{\n\t\t\tself::$COOKIE = utility\\safe::safe($_COOKIE);\n\t\t}\n\t\tif($_name)\n\t\t{\n\t\t\tif(array_key_exists($_name, self::$COOKIE))\n\t\t\t{\n\t\t\t\treturn self::$COOKIE[$_name];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}else\n\t\t{\n\t\t\treturn self::$COOKIE;\n\t\t}\n\t}", "title": "" }, { "docid": "51ddc93c7deea55da1378f56dac71b15", "score": "0.59086", "text": "protected function get($name)\n {\n return $this->data[$name];\n }", "title": "" }, { "docid": "462be308849fe5e0339c4a5889a073c1", "score": "0.58964634", "text": "public function __get($name)\n : string {\n if (isset($_SESSION[$name])) {\n return $_SESSION[$name];\n }\n }", "title": "" }, { "docid": "1dd0ffdc13a6077ddb4f3e536c9fdc34", "score": "0.5890856", "text": "function get($name) {\r\n // Manage shortcut notations by adding 'vads_'\r\n $name = (substr($name, 0, 5) != 'vads_') ? 'vads_' . $name : $name;\r\n\r\n return @$this->raw_response[$name];\r\n }", "title": "" }, { "docid": "7bda831a67dc74b80ca40b1131b40981", "score": "0.58886373", "text": "public function read()\n {\n $value = $this->app->getCookie($this->cookieName);\n\n return json_decode($value, true);\n }", "title": "" }, { "docid": "bbe63cacfa930cc983c7fd9485280424", "score": "0.58840895", "text": "function findCookie($name, $cookies) \n{ \n foreach ($cookies as $cookie)\n {\n if ($cookie['name'] === $name)\n {\n return $cookie;\n }\n }\n return '';\n}", "title": "" }, { "docid": "dd8d7e5dbd4be6a4af1985c39e82e701", "score": "0.5883569", "text": "function removeCookie($name) {\n return $this->setCookie($name);\n }", "title": "" }, { "docid": "4630d28284d0eb542efc498bde6fcf0f", "score": "0.5882759", "text": "public function removeCookie($name);", "title": "" }, { "docid": "a225b6099fa74d8ffe3bc6fea1a0ebae", "score": "0.5871785", "text": "public static function cookie($name, $default = null) {\n\t\treturn \\Jitsu\\ArrayUtil::get($_COOKIE, $name, $default);\n\t}", "title": "" }, { "docid": "6eff94965b8a1c39649c1233134a68d6", "score": "0.58715063", "text": "static function get_cookie( $cookie_name, $default_value = '' ) {\n\t\t\tif ( isset( $_COOKIE[ $cookie_name ] ) ) {\n\t\t\t\treturn $_COOKIE[ $cookie_name ];\n\t\t\t} else {\n\t\t\t\treturn $default_value;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e4eff9ccb5797eb3543ef5c0b2ec646e", "score": "0.5868756", "text": "public function __get($name) {\n\t\treturn $this->session[$name];\n\t}", "title": "" }, { "docid": "878de86274c873b5e2bcc5bf91788299", "score": "0.5864784", "text": "public function get($name) {\n if (trim($name) != '') {\n $name = $this->normalizeName($name);\n if (!empty($this->_headers[$name])) {\n return $this->_headers[$name];\n }\n }\n return NULL;\n }", "title": "" }, { "docid": "e3c52705389893bb709a5c0e184130cd", "score": "0.586045", "text": "public static function get(string $name, $default = null)\n {\n return $_COOKIE[$name] ?? $default;\n }", "title": "" }, { "docid": "6c29446cf2a5d4f1172f804370253836", "score": "0.58417904", "text": "public function get($name)\n\t{\n\t\tif (!$this->started) $this->start();\n\t\treturn misc::get($this->data, $name, NULL);\n\t}", "title": "" }, { "docid": "adae369258888d3a5afe76bd09e57670", "score": "0.5832206", "text": "public function getCookie()\n {\n return $this->login->getCookie();\n }", "title": "" }, { "docid": "b91379344d8e56a585f5441767355133", "score": "0.5829917", "text": "public function cookie($name = null, $default = null) {\n if (is_null($name)) {\n return $this->cookies;\n }\n\n if (array_key_exists($name, $this->cookies)) {\n return $this->cookies[$name];\n }\n\n return $default;\n }", "title": "" }, { "docid": "5d9059f8c4a21a638ce11073bea0a5c1", "score": "0.58274686", "text": "public function getHeader($name)\n {\n foreach( $this->headers as $header => $value)\n {\n if( strtolower($header) == strtolower($name) ){\n return $value;\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "32af052163690dcaf1560136720df531", "score": "0.5816358", "text": "public function readCookie($cookieName)\n {\n if ($this->applyPrefix(stubRequest::SOURCE_COOKIE) == true) {\n $cookieName = $this->prefix . '_' . $cookieName;\n }\n\n return $this->request->readCookie($cookieName);\n }", "title": "" }, { "docid": "3cd5c222c41546681057cda367161823", "score": "0.58163244", "text": "public function getCookie($name, $default = null)\n {\n return (isset($_COOKIE[$name])) ? $_COOKIE[$name] : $default;\n }", "title": "" }, { "docid": "09374b3ad403563e489e944b9f836687", "score": "0.5803112", "text": "public function getCookie() \n\t{\n\t\treturn unserialize(base64_decode($_COOKIE[IL_OP_COOKIE_NAME]));\n\t}", "title": "" }, { "docid": "e5eb0ef60cfa4e49d647262d52e21a6e", "score": "0.5790694", "text": "public function __get($name) {\n $name = $this->preparePropertyName($name);\n $values = $this->getSessionValues();\n return $values[array($this->getGroupName(), $name)];\n }", "title": "" }, { "docid": "8de38c7eeefb813d38f10a58a72502e7", "score": "0.5789467", "text": "public function __get($name)\n\t{\n\t\treturn $this->getValue(strtoupper($name));\n\t}", "title": "" }, { "docid": "37408beae42aebca90cd75a9d9a7f60d", "score": "0.5788252", "text": "public function getHeader($name){\n\t\treturn $this->headers[$name];\n\t}", "title": "" }, { "docid": "6072f3db8f7591e63cf6c42a56362943", "score": "0.57809776", "text": "public function get($name){\n\t\treturn $this->read($name);\n\t}", "title": "" }, { "docid": "c033de1bde92d8f5abe04f0c63d7a7bb", "score": "0.5780406", "text": "public function get( $name ) {\n\t\t\t$content = $this->storage->getVar( $name );\n\t\t\tif ( $content ) {\n\t\t\t\treturn unserialize( $content );\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "42ed42b6031cc8121a5f385b041f031c", "score": "0.57746553", "text": "public function getHeader($name)\n {\n return $this->server->get('HTTP_' . strtoupper(str_replace('-', '_', $name)));\n }", "title": "" }, { "docid": "59a93f63ab24d17f276783d58261f83b", "score": "0.57695484", "text": "public function getCookie() {\n\t\treturn $this->_cookie;\n\t}", "title": "" }, { "docid": "59a93f63ab24d17f276783d58261f83b", "score": "0.57695484", "text": "public function getCookie() {\n\t\treturn $this->_cookie;\n\t}", "title": "" }, { "docid": "ab5047956222ec499ea8937e30e8b09e", "score": "0.57689583", "text": "function getVal($name) {\n return (isset($_SESSION[$this->id][$name]) ? $_SESSION[$this->id][$name] : false);\n }", "title": "" } ]
ad88855074172f7b88985228dac50d5e
Show the specified resource.
[ { "docid": "e53b66ebc450fb3243fe7e3ed9b2eb26", "score": "0.0", "text": "public static function show($id)\n {\n $data = ClassList::with('tech_field','module_lists.material','module_lists.task')->where('id',$id)->get();\n return MyHelper::checkGet($data);\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8656298", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "48fb67ee8a54377a224740d572c17cdd", "score": "0.77645916", "text": "public function show(Resource $resource)\n {\n return view('resource.show',['resource'=>$resource]);\n }", "title": "" }, { "docid": "26f38c42099a7c64fba7842c4ce19062", "score": "0.7746685", "text": "public function show(Resource $resource)\n {\n return view('actions.resource.show', compact('resource'));\n }", "title": "" }, { "docid": "d77a1cf077ad489eb930bc1facfeb4a7", "score": "0.75387233", "text": "public function show($class_id, $resource)\n {\n //\n }", "title": "" }, { "docid": "4869655563febeddc21b876b2d3bd399", "score": "0.75220144", "text": "public function showResource(Request $request, $id = 0);", "title": "" }, { "docid": "b8de278532cf1b2d94016c0cd12737fd", "score": "0.73735607", "text": "public function show(Resource $resource)\n {\n $resource = new ResourceResource($resource);\n return $this->success('Resource Detail.', $resource);\n }", "title": "" }, { "docid": "69545e83d1d4c03b646757789a897b5b", "score": "0.7244229", "text": "public function show(Resource $resource)\n {\n //\n // $this->authorize('view',Resource::class);\n // $page=Page::all();\n // $resource=Resource::all();\n // return view('resource.show',compact('page','resource'));\n return response()->json($resource);\n }", "title": "" }, { "docid": "860344e8f85b09bf11e41aa48e928f6e", "score": "0.7213507", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BWBlogBundle:Resource')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Resource entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BWBlogBundle:Resource:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }", "title": "" }, { "docid": "51abeaf13e315e938469da7a51936df5", "score": "0.7196484", "text": "public function show($id)\n {\n $query = '\"select\":\"*\",\"where\":\"id=' . $id . '\"';\n $data = ResourcesService::getResourcesTableRow($query);\n $resource = $data[\"Result\"][0];\n //$resource = Resource::findOrFail($id);\n\n return view('admin.resources.show', compact('resource'));\n }", "title": "" }, { "docid": "0bfd2fab1690e405f8ae90f2f671725b", "score": "0.7145501", "text": "public function show($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\t\treturn View::make('resource/show', compact('resource'));\n\t}", "title": "" }, { "docid": "cc94e2329160f202733c635aa4bf0b30", "score": "0.70326227", "text": "public function show($param)\r\n {\r\n\r\n $data['resource_header'] = true;\r\n $user_id = ($this->auth)?$this->auth->id:null;\r\n $data['resource'] = Resource::with(['tags', 'likesCount', 'user', 'downloads', 'category', 'category.resources' => function($q){\r\n $q->limit(4);\r\n }, 'like' => function($q)use($user_id){\r\n $q->where('user_id', $user_id);\r\n }])\r\n ->where('slug', $param)\r\n ->orWhere('id', $param)\r\n ->firstOrFail();\r\n\r\n $author = User::with('profile')\r\n ->where('id', $data['resource']->user_id)\r\n ->get()\r\n ->toArray();\r\n\r\n if(count($author) > 0){\r\n $data['author'] = $author[0];\r\n }\r\n\r\n $data['latestResources'] = Resource::with('category')->orderBy('id', 'desc')->limit(5)->get();\r\n $data['tags'] = Tag::orderBy('id','desc')->get();\r\n\r\n return view('public.resource')->with($data);\r\n }", "title": "" }, { "docid": "742c2b4cd2f26a04a82af80f8ee84057", "score": "0.69152427", "text": "public function show()\n {\n $dispatcher = Dispatcher::getSharedDispatcher();\n $dataProvider = $this->getDataProvider();\n $controller = $dataProvider->getControllerClassForPath($this->getPath());\n $action = $this->getIdentifier() . 'Action';\n $controller = GeneralUtility::makeInstance($controller);\n\n if (is_object($controller)) {\n $controller->setRequest($dispatcher->getRequest());\n }\n if (is_numeric($this->getIdentifier())\n && is_object($controller) && method_exists($controller, 'showAction')\n ) {\n $result = $controller->processAction('showAction', $this->getIdentifier());\n } elseif (is_object($controller) && method_exists($controller, $action)) {\n $result = $controller->processAction($action);\n } else {\n $result = false;\n }\n\n return $result ? $this->createResponse($result, 200) : $result;\n }", "title": "" }, { "docid": "120fe33c517800f7a36fd36a7d8ff2a0", "score": "0.69078726", "text": "public function showAction($id);", "title": "" }, { "docid": "754e1795026ca4c71e3959656a533ca3", "score": "0.68958294", "text": "private function _displayResource() {\n\t\t// determine which action to take\n\t\t$lti_message_type = $this->lti_model->getLtiDataValue('lti_message_type');\n\t\tswitch( $lti_message_type ){\n\t\t\tcase 'ContentItemSelectionRequest' : // take user to the content item selector\n\t\t\t\t$this->_getContentItemSelectionRequest();\n\t\t\t\tbreak;\n\t\t\tcase 'basic-lti-launch-request' : // retrieve the requested resource\n\t\t\tdefault :\n\t\t\t\t// store LTI basic outcomes service details when an outcome is requested\n\t\t\t\t$this->lti_outcomes->saveLtiOutcomesValues();\n\t\t\t\t$this->getContent( $custom_resource_id );\n\t\t}\n\t}", "title": "" }, { "docid": "6e101e96500f24d567e50a803b6d00fb", "score": "0.6894754", "text": "public function show($id)\n\t{\n\t\t// Get the resource if it has not been provided by the child class\n\t\tif( ! $this->resource->getKey())\n\t\t\t$this->resource = $this->resource->findOrFail($id);\n\n\t\t$this->layout->subtitle = _('Details');\n\n\t\treturn $this->loadView(__FUNCTION__, $this->resource->getVisibleLabels());\n\t}", "title": "" }, { "docid": "691f9d494ebbd3698416c27402ce6045", "score": "0.6875156", "text": "public function show($id)\n {\n if (is_numeric($id)) {\n return new ActionResource (Action::find($id));\n }else{\n abort(404 , 'resource not found.');\n \n }\n \n }", "title": "" }, { "docid": "f61677388a9b71138fce919e36a82ca0", "score": "0.68700856", "text": "public function show($id)\n {\n #$resource = resource::find($id);\n $resource = Resource::where('slug', '=', $id)->orWhere('id', '=', $id)->firstOrFail();\n\n $related_resources = Resource::where('id', \"!=\", $resource->id)\n ->orWhere('name', 'LIKE', '%' . $resource->name . '%')\n ->orWhere('description', 'LIKE', '%' . $resource->description . '%')->take(8)->get();\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $related_resources,\n ];\n\n return view('resources.show-resource')->with($data);\n }", "title": "" }, { "docid": "90a025ba515ea1ffda1792e51f379566", "score": "0.68200886", "text": "public function show($id)\n {\n $resource = Resource::findOrFail($id);\n\n return view('resources.show')->with(compact('resource'));\n }", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.6802355", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.6802355", "text": "public function show($id) {}", "title": "" }, { "docid": "78f674e0991329ee80d8bfe522602ce3", "score": "0.67796224", "text": "public function actionShow()\n {\n $this->render('show', array());\n }", "title": "" }, { "docid": "bc7cbf8f7bf2cdecfc58cc20b4ee76ef", "score": "0.67377806", "text": "public function show($course, Resource $resource)\n {\n\n\n $pageTitle = 'Resource';\n\n return view('resources.resource')->with(compact( 'resource', 'pageTitle'));\n }", "title": "" }, { "docid": "a5fe9713f7fa35feab808a95acb937a5", "score": "0.67075634", "text": "public function show(Artist $artist)\n {\n\n\n return new ShowArtistResource($artist);\n\n\n }", "title": "" }, { "docid": "8fa3c5aa92241bd98bf245a72087750b", "score": "0.6705014", "text": "public function show($id)\n {\n return Resource::find($id);\n }", "title": "" }, { "docid": "a6ea4c61d98549d6b82aa6c50e5153c9", "score": "0.6699981", "text": "public function show($id)\n {\n // return \"Show \".$id;\n abort(404);\n }", "title": "" }, { "docid": "e1911719b5dbc5045d62ac4e5e20cd33", "score": "0.6677616", "text": "protected function showAction() {\n\t\t$em = $this->getEntityManager();\n\t\t$book = $em->find('Entities\\\\Book', $_GET['id']);\n\t\t$this->addContext('book', $book);\n\t}", "title": "" }, { "docid": "c28bc00a20642b8f45cbb36b8f142bb6", "score": "0.6675321", "text": "public function show( $id );", "title": "" }, { "docid": "c0c57945d6d1643edc1ffb95ae99eef9", "score": "0.66510224", "text": "public function show($id)\n { \n if( $this->checkShowModelRequest($id) ) return abort(404, \"Resource not found\");\n\n if(request()->expectsJson() || $this->onlyJsonResponse) \n return response()->json($this->showModelQueryResponse($id));\n\n return $this->renderView(\n $this->moduleName != null ? Str::plural($this->moduleName) . '.show' : 'show' ,\n $this->showResponse($id)\n );\n }", "title": "" }, { "docid": "63a92839c87307963a49b2b9d9cc5823", "score": "0.6639396", "text": "public function show($id){}", "title": "" }, { "docid": "63a92839c87307963a49b2b9d9cc5823", "score": "0.6639396", "text": "public function show($id){}", "title": "" }, { "docid": "63a92839c87307963a49b2b9d9cc5823", "score": "0.6639396", "text": "public function show($id){}", "title": "" }, { "docid": "63a92839c87307963a49b2b9d9cc5823", "score": "0.6639396", "text": "public function show($id){}", "title": "" }, { "docid": "63a92839c87307963a49b2b9d9cc5823", "score": "0.6639396", "text": "public function show($id){}", "title": "" }, { "docid": "81b16bb8460887cb8006a04f2b0e7113", "score": "0.66321856", "text": "public function show($id);", "title": "" }, { "docid": "81b16bb8460887cb8006a04f2b0e7113", "score": "0.66321856", "text": "public function show($id);", "title": "" }, { "docid": "81b16bb8460887cb8006a04f2b0e7113", "score": "0.66321856", "text": "public function show($id);", "title": "" }, { "docid": "775c566e3ec175fb9b4fc64e3846efff", "score": "0.6621762", "text": "public function show($id)\n {}", "title": "" }, { "docid": "9032057600ac1cb05d858c6264b8aed1", "score": "0.66189003", "text": "public function show()\n {\n return auth()->user()->getResource();\n }", "title": "" }, { "docid": "9032057600ac1cb05d858c6264b8aed1", "score": "0.66189003", "text": "public function show()\n {\n return auth()->user()->getResource();\n }", "title": "" }, { "docid": "9a05f17f84907e1b673384e2a2fd7f9f", "score": "0.6602179", "text": "public function show($id)\n {\n //no need for the app according to the plan\n }", "title": "" }, { "docid": "bcd5d6f048ed9967b2cc42a2b9c646e4", "score": "0.65953565", "text": "public function show($id)\n\t{\n\t\t//...\n\t}", "title": "" }, { "docid": "058e5845816d52611e04fce8f3eb5b62", "score": "0.65904456", "text": "public function show($id){\n $objs = obj::find($id);\n $url = Storage::url($objs->file); \n return view(\"apps.\".$this->app.\".\".$this->module.\".show\")\n ->with(\"app\", $this)\n ->with(\"objs\", $objs) \n ->with(\"url\", $url);\n\n }", "title": "" }, { "docid": "7a089792dd9f8cefa56e79369d710cb2", "score": "0.6580373", "text": "public function show(Request $request, string $resource, string $id) {\n if(!Lyra::checkPermission('read', $resource)) abort(403);\n\n if(config('lyra.translator.enabled') && $request->has('lang')) App::setLocale($request->get('lang'));\n\n $resourcesNamespace = Lyra::getResources()[$resource];\n $modelClass = $resourcesNamespace::$model;\n\n if (method_exists($modelClass, 'trashed')) {\n $model = $modelClass::withTrashed()->find($id);\n } else {\n $model = $modelClass::find($id);\n }\n\n if (!Arr::first($model)) return abort(404, \"No query results for model [$modelClass]\");\n $resourceCollection = new $resourcesNamespace(collect([$model]));\n return $resourceCollection->getCollection($request, 'show');\n }", "title": "" }, { "docid": "d170b6939361de0aa4e2f615b242a85b", "score": "0.65709174", "text": "public function show($id) { \n\t \n \n\t}", "title": "" }, { "docid": "6bd11c763acd5312fbf7f4c967f956d7", "score": "0.65702325", "text": "public function show($id)\n {\n //show\n }", "title": "" }, { "docid": "fa63281d9c8fb72617ff6a06f4534d72", "score": "0.65699553", "text": "public function show($id)\n {\n //not very necessary.\n \n }", "title": "" }, { "docid": "fa63281d9c8fb72617ff6a06f4534d72", "score": "0.65699553", "text": "public function show($id)\n {\n //not very necessary.\n \n }", "title": "" }, { "docid": "3c83da877de5a8b9a28620cc567e154f", "score": "0.6569953", "text": "public function show($model)\n {\n $model = $this->getModel($model);\n\n $this->authorize('view', $model);\n\n $model = $this->showModel($model);\n\n $resource = resource($model);\n\n return ok($resource);\n }", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.65498114", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "f95859f476fd6700985a21f6f50638cf", "score": "0.65479505", "text": "public function show($id)\n {\n $this->authorize('view', $this->repository->modelName());\n\n $resource = $this->repository->find($id);\n\n if (! $resource) {\n return $this->responder->notFound()->send();\n }\n\n return $this->responder->ok()->withData($resource->cast())->send();\n }", "title": "" }, { "docid": "582af2cdaf3240886be6545fc34200e5", "score": "0.65435684", "text": "public function show($id)\n {\n \n }", "title": "" }, { "docid": "582af2cdaf3240886be6545fc34200e5", "score": "0.65435684", "text": "public function show($id)\n {\n \n }", "title": "" }, { "docid": "582af2cdaf3240886be6545fc34200e5", "score": "0.65435684", "text": "public function show($id)\n {\n \n }", "title": "" }, { "docid": "582af2cdaf3240886be6545fc34200e5", "score": "0.65435684", "text": "public function show($id)\n {\n \n }", "title": "" }, { "docid": "582af2cdaf3240886be6545fc34200e5", "score": "0.65435684", "text": "public function show($id)\n {\n \n }", "title": "" }, { "docid": "582af2cdaf3240886be6545fc34200e5", "score": "0.65435684", "text": "public function show($id)\n {\n \n }", "title": "" }, { "docid": "582af2cdaf3240886be6545fc34200e5", "score": "0.65435684", "text": "public function show($id)\n {\n \n }", "title": "" }, { "docid": "582af2cdaf3240886be6545fc34200e5", "score": "0.65435684", "text": "public function show($id)\n {\n \n }", "title": "" }, { "docid": "582af2cdaf3240886be6545fc34200e5", "score": "0.65435684", "text": "public function show($id)\n {\n \n }", "title": "" }, { "docid": "582af2cdaf3240886be6545fc34200e5", "score": "0.65435684", "text": "public function show($id)\n {\n \n }", "title": "" }, { "docid": "582af2cdaf3240886be6545fc34200e5", "score": "0.65435684", "text": "public function show($id)\n {\n \n }", "title": "" }, { "docid": "582af2cdaf3240886be6545fc34200e5", "score": "0.65435684", "text": "public function show($id)\n {\n \n }", "title": "" }, { "docid": "582af2cdaf3240886be6545fc34200e5", "score": "0.65435684", "text": "public function show($id)\n {\n \n }", "title": "" }, { "docid": "582af2cdaf3240886be6545fc34200e5", "score": "0.65435684", "text": "public function show($id)\n {\n \n }", "title": "" }, { "docid": "582af2cdaf3240886be6545fc34200e5", "score": "0.65435684", "text": "public function show($id)\n {\n \n }", "title": "" }, { "docid": "93683e463c7f7a1d9cb5e2c213cff833", "score": "0.65363544", "text": "public function show($id)\n {\n //...\n }", "title": "" }, { "docid": "c5c86da0c26f8cbdd79314d170751766", "score": "0.65241253", "text": "public function show($id)\n {\n $obj = Obj::where('id',$id)->first();\n $this->authorize('view', $obj);\n if($obj)\n return view('appl.'.$this->app.'.'.$this->module.'.show')\n ->with('obj',$obj)->with('app',$this);\n else\n abort(404);\n }", "title": "" }, { "docid": "c5c86da0c26f8cbdd79314d170751766", "score": "0.65241253", "text": "public function show($id)\n {\n $obj = Obj::where('id',$id)->first();\n $this->authorize('view', $obj);\n if($obj)\n return view('appl.'.$this->app.'.'.$this->module.'.show')\n ->with('obj',$obj)->with('app',$this);\n else\n abort(404);\n }", "title": "" }, { "docid": "a0cff1437ffee2a4279f65c348e5c9f2", "score": "0.651743", "text": "public function show($id) {\n\n }", "title": "" }, { "docid": "a0cff1437ffee2a4279f65c348e5c9f2", "score": "0.651743", "text": "public function show($id) {\n\n }", "title": "" }, { "docid": "a0cff1437ffee2a4279f65c348e5c9f2", "score": "0.651743", "text": "public function show($id) {\n\n }", "title": "" }, { "docid": "a0cff1437ffee2a4279f65c348e5c9f2", "score": "0.651743", "text": "public function show($id) {\n\n }", "title": "" }, { "docid": "68ba4348da2d2e2e73db056d5ac5f5f0", "score": "0.65161794", "text": "public function show($id) {\n }", "title": "" }, { "docid": "68ba4348da2d2e2e73db056d5ac5f5f0", "score": "0.65161794", "text": "public function show($id) {\n }", "title": "" }, { "docid": "68ba4348da2d2e2e73db056d5ac5f5f0", "score": "0.65161794", "text": "public function show($id) {\n }", "title": "" }, { "docid": "743c49d6b54f6dc3e4f7b1bd5e760171", "score": "0.65156406", "text": "public function show(ResourceBuilder $resource, $id)\n {\n $resource\n ->setModel(StreamModel::class)\n ->setId($id);\n\n return $resource->response();\n }", "title": "" }, { "docid": "bc036f3ca8dcba4af75c3fbf972600c8", "score": "0.65123075", "text": "public function show(Question $question)\n {}", "title": "" }, { "docid": "dc86cb2c9d7b4c711b54fb118965d2e5", "score": "0.65081596", "text": "public function show($id)\n {\n\n }", "title": "" }, { "docid": "dc86cb2c9d7b4c711b54fb118965d2e5", "score": "0.65081596", "text": "public function show($id)\n {\n\n }", "title": "" }, { "docid": "dc86cb2c9d7b4c711b54fb118965d2e5", "score": "0.65081596", "text": "public function show($id)\n {\n\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "bf17c6ed6674f2af62b2a5714f0cfd5b", "score": "0.0", "text": "public function create()\n { \n $data['customers'] = User::where('roles','LIKE', \"%CUSTOMER%\")->get();\n $data['books'] = Book::get();\n return view('orders.create', $data);\n }", "title": "" } ]
[ { "docid": "cb267e3ebbd54b9945858b4232a6e394", "score": "0.7782118", "text": "public function create()\n {\n return view('admin.resource.create');\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.7726137", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "64a6a51cb4e4b962408e448d0c1399e9", "score": "0.7467689", "text": "public function actionCreate()\r\n {\r\n $model = new Resource();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "title": "" }, { "docid": "4c4b7c47a2d71e26b29b9caea091a07c", "score": "0.73934007", "text": "public function showCreateForm()\n {\n $this->authorize('create', Project::class);\n\n return view('project.create', [\n 'action' => 'create',\n ]);\n }", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7390884", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "4734584f2f8340a42973a0d555da6c67", "score": "0.73287565", "text": "public function create()\n {\n return view(\"superadmin.form\");\n }", "title": "" }, { "docid": "10d532d72b585493a6ca515a12bc3a2c", "score": "0.73225474", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/IAS/create');\n\n\t}", "title": "" }, { "docid": "9332c37244dbc51a6ec587579d9cd246", "score": "0.72878754", "text": "public function create()\n {\n //\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.7280577", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.7280577", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.7280577", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "78824716ffe303654b7c00562ec87847", "score": "0.72734314", "text": "public function create() {\n $viewData = $this->getDefaultFormViewData();\n $viewData[\"mode\"] = \"create\";\n $viewData[\"supplier\"] = new Supplier();\n\n $viewData[\"supplier\"]->supplier_number = NumberSeries::getNextNumber(Supplier::MODULE_CODE);\n\n return view(\"{$this->viewPath}.form\", $viewData);\n }", "title": "" }, { "docid": "aa37b9385ad38984404b3f4097565c00", "score": "0.72523916", "text": "public function newAction()\n {\n $request = $this->container->get('request');\n $options = $request->get('options');\n $alias = $request->get('alias');\n\n $metadata = $this->getMetadata($options['class']);\n $entity = $this->newEntityInstance($metadata);\n\n $fields = $this->getFields($metadata, $options, 'new');\n $type = $this->getCustomFormType($options, 'new');\n\n $form = $this->createCreateForm($entity, $alias, $fields, $type);\n\n return $this->render(\n 'SgDatatablesBundle:Crud:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'list_action' => DatatablesRoutingLoader::PREF . $alias . '_index',\n 'heading' => $this->getHeading()\n )\n );\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72197205", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "56ed6a0676abf46597af78526cddcbf9", "score": "0.72156096", "text": "public function create()\n {\n return view( 'forms/car' );\n }", "title": "" }, { "docid": "7e6cbda13a4d6999c8e363f25258eeb1", "score": "0.7208704", "text": "public function showCreateForm()\n {\n return view('user.create');\n }", "title": "" }, { "docid": "570432e9bac5bbbd5f03f49d8c84f384", "score": "0.7178294", "text": "public function create()\n {\n return view('core.admin.form.create');\n }", "title": "" }, { "docid": "ca8a62edbc9efc96246dc89065570720", "score": "0.7163219", "text": "public function newAction()\n {\n $this->loggerStdout->log('UsersController: display the creation form');\n\n\n }", "title": "" }, { "docid": "7cda6fe62fc1ec4947ab520926c7eca6", "score": "0.7149282", "text": "public function create()\n {\n return View::make(self::CID.'.form');\n }", "title": "" }, { "docid": "95739848366d87216fcc63cf6199aa8c", "score": "0.7141124", "text": "public function create()\n {\n \treturn view('form');\n }", "title": "" }, { "docid": "56dd0677c79549ae44b2b1cc8d7bd0db", "score": "0.7138032", "text": "public function create()\n {\n return view('backEnd.formisian.create');\n }", "title": "" }, { "docid": "53163536d5d151380894ed516baf152c", "score": "0.7132429", "text": "public function actionCreate() {\n $this->render('create');\n }", "title": "" }, { "docid": "7d27d715128bcec59bea3173b77f3e80", "score": "0.71309954", "text": "public function create()\n {\n \n return view('admin.forms.create');\n }", "title": "" }, { "docid": "8e8000021c431ea72dcb74907ce2583e", "score": "0.7116598", "text": "public function create()\n {\n return view('crud.new');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7116009", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7116009", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "f26dda2bfcba89d5cc0857ab1ea11689", "score": "0.7115093", "text": "public function create()\n {\n return view($this->sPath.'/form', ['sPageTitle' => $this->sName]);\n }", "title": "" }, { "docid": "74cc4ed8fa057c0f0734c751db297540", "score": "0.7107465", "text": "public function create()\n {\n return view('curso.form');\n }", "title": "" }, { "docid": "76b4745b537106a5513b06d8ab3e4928", "score": "0.70739746", "text": "public function create()\n {\n //\n return view('submit.create');\n }", "title": "" }, { "docid": "856274cb86788ad9604003f12dd5060c", "score": "0.70729333", "text": "public function create()\n {\n return view('carusel.new');\n }", "title": "" }, { "docid": "7545e6950b9a4b4ee7a1ca28789b55aa", "score": "0.7071535", "text": "public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t\t$this->view->render('signin', 'create');\n\t}", "title": "" }, { "docid": "0f2dac59601869fb2c54ce811c4650aa", "score": "0.7067181", "text": "public function create()\n {\n return view('pages.forms.addProduct');\n }", "title": "" }, { "docid": "cd26d7c620bd493d734a18664ac56a6d", "score": "0.7044604", "text": "public function create()\n\t{\n\t\treturn view('formation/create');\n\t}", "title": "" }, { "docid": "a23e51d12b5252adcb8123deec223f18", "score": "0.70399386", "text": "public function create()\n {\n $this->data['titlePage'] = trans('admin.obj_new',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconNew ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n\n return view(GetViewAdminResource($this->resourceView, 'create'))->with($this->data);\n }", "title": "" }, { "docid": "40e93c68e66b0c86108e5ae59cc176d2", "score": "0.7021636", "text": "public function newAction()\n {\n $this->view->setVar('form', new ClientForm(null, ['edit' => false]));\n }", "title": "" }, { "docid": "59db2ec2bb6338f023d72461ca432a6e", "score": "0.7013839", "text": "public function create()\n {\n //form showing by modal, without controller or ajax\n }", "title": "" }, { "docid": "b7740989974ec89d90c4ded59d8de5c3", "score": "0.70078814", "text": "public function create()\n {\n \n return view ('studentform');\n }", "title": "" }, { "docid": "06f183ff6cd0bb720144b6bfd1f60c58", "score": "0.70051277", "text": "public function create()\n {\n return view('admin.catalog.edit_form', [\n 'route_base_url' => 'catalog',\n 'model_name' => '\\App\\Models\\Catalog'\n ]);\n }", "title": "" }, { "docid": "67dbcb9d8cbfbf80f7870af19e54acc7", "score": "0.6997219", "text": "public function create()\n {\n return view('student_form');\n }", "title": "" }, { "docid": "753f9bd767a3748b9d6409cb957dc41f", "score": "0.69924355", "text": "public function createAction()\n {\n $action = $this->view->url(['action' => 'save'], 'controllers');\n $this->view->projectForm = $this->service->getFormForCreating($action);\n }", "title": "" }, { "docid": "7fdab24f12d98bab46a40db3c2f06831", "score": "0.69880825", "text": "public function create()\n\t{\n\t\treturn View::make('back_setup/ProductForm');\n\t}", "title": "" }, { "docid": "e58f17523277fc6c291ecbf3f817eb22", "score": "0.69855237", "text": "public function create()\n {\n return view('radars.create');\n }", "title": "" }, { "docid": "3dc360473dabcb08b5169d4443b754b3", "score": "0.6984232", "text": "public function create()\n {\n $form = $this->form;\n $route = $this->route;\n return view($this->rCreate,compact('form','route'));\n }", "title": "" }, { "docid": "d992b460ca7fa75fae06c92431ea0040", "score": "0.6977769", "text": "public function create()\n {\n View::share(\"pageTitle\", $this->pageTitle);\n View::share(\"pageUrl\", $this->pageUrl);\n View::share(\"formTitle\", \"Create category\");\n View::share(\"formFields\", $this->form->getFields());\n return View::make('admin.form.form');\n }", "title": "" }, { "docid": "8d7b1185b59117c1c7138b85525adfa3", "score": "0.6976236", "text": "public function create()\n {\n return view(\"add\");\n }", "title": "" }, { "docid": "faad50701ca209b09853100eea7791d6", "score": "0.69673944", "text": "public function ShowForm()\n\t{\n\t\treturn view('marcas.new');\n\t}", "title": "" }, { "docid": "f15b831e674279eeed6c926d7fc775f4", "score": "0.69650775", "text": "public function showForm()\n {\n return view('backend.employee.new');\n\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.6963685", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.6963685", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "94b9216c661234b749248be69f855da2", "score": "0.69625866", "text": "public function makeCreateForm()\n {\n return View::make('backend.role.create')\n ->with('module', $this->module);\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.69619197", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "57611366e6e3194f52047893b6a260ec", "score": "0.69579405", "text": "public function create()\n {\n \tAppGranted::grantedAccess('add', true);\n $data['module_title'] = \"Role\";\n $data['action'] = route('kantor.store');\n $data['action_type'] = \"add\";\n\n $data['breadcrumb'] = [ \n ['title' => 'Master Data','url' => '#'],\n ['title' => 'Kantor','url' => 'kantor'],\n ['title' => 'form','url' => 'form']\n ];\n\n $data['redirect'] = route(\"kantor.create\");\n \n return view('kantor::kantor_form',$data);\n }", "title": "" }, { "docid": "ec1387b33a439043065a5a57c6b204dc", "score": "0.69546664", "text": "public function create()\n {\n $title = trans('student.new');\n $this->generateParams();\n $custom_fields = CustomFormUserFields::getCustomUserFields('student');\n return view('layouts.create', compact('title', 'custom_fields'));\n }", "title": "" }, { "docid": "f0a4e435f6bebfce6162cc1be7c7ee0f", "score": "0.6953914", "text": "public function create()\n {\n return view('conceptos.create');\n }", "title": "" }, { "docid": "f0580571ff41736a9b6d64685969976e", "score": "0.69529533", "text": "public function create()\n {\n return view('forms.addJobForm');\n\n }", "title": "" }, { "docid": "7b8c9d5cbe582eab2f28c216421a2719", "score": "0.6950264", "text": "public function create()\n {\n return view('proyek.add');\n }", "title": "" }, { "docid": "234165e0547ce18212545035d0a268e8", "score": "0.6938796", "text": "public function create()\r\n {\r\n return view('backend/frame_management/create_form');\r\n }", "title": "" }, { "docid": "ba70ddc190000d3806bc08fdef63dba4", "score": "0.6937233", "text": "public function create()\n {\n return view('news.forms.create');\n }", "title": "" }, { "docid": "04fb02f1ffa4d6ad9db381edaa1ef950", "score": "0.6935089", "text": "public function create()\n {\n return view('marketing.eduzz.form',[\n 'title_postfix' => $this->configs['new'],\n 'navigation' => $this->navigation,\n ]);\n }", "title": "" }, { "docid": "a9ea97d1b5f9c3b156c14f4c667cf591", "score": "0.6934389", "text": "public function create()\n {\n $data = array();\n $data['btn'] = trans('main.save');\n return view('employee.form', $data);\n }", "title": "" }, { "docid": "353155b973a25b62f33cce0b6600b99c", "score": "0.6933699", "text": "public function create()\n {\n $data = array(\n 'title' => 'Ingreso de un nuevo Sector',\n 'message' => 'return confirm(\"¿Esta seguro que desea guardar el sector?\")',\n 'method' => 'POST',\n );\n return view('sector.form')\n ->with('data', $data);\n }", "title": "" }, { "docid": "70b9293351aa11656c59414a77fe44bf", "score": "0.6922337", "text": "public function create()\n {\n\t $title = 'TITC - Payment Receipts Form';\n\n return view('layouts.register', compact( 'title' ) );\n }", "title": "" }, { "docid": "38a6849d5b56a77b178a1fc8297c2e4e", "score": "0.6921118", "text": "public function create()\n\t{\n\t\treturn view('information.create');\n\t}", "title": "" }, { "docid": "a59dfad08f7be5f4bb5d898d16a6d3a3", "score": "0.69195855", "text": "public function newAction()\n {\n $entity = new Rector();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ColegioAdminBundle:Rector:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "005d56adb8003598d74448ff694072a8", "score": "0.69193333", "text": "public function showNewForm()\n {\n return view('admin.user_new_form');\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6917996", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "4bf33424414f342096092b367153c3ff", "score": "0.69178724", "text": "public function create()\n {\n return view('webinars.create');\n }", "title": "" }, { "docid": "bfe25b751c8db9345d0c10f2b43ea766", "score": "0.69154304", "text": "public function create()\n {\n //the create form\n return view('cmsCRUD.create');\n }", "title": "" }, { "docid": "a56ae1a4e831d9137638253cc26e259a", "score": "0.6913805", "text": "public function create()\n {\n return view('supir.create');\n }", "title": "" }, { "docid": "e90d65170f9bc3dd1e2b969826600c53", "score": "0.6913407", "text": "public function create()\n {\n return view('ekskul.create');\n }", "title": "" }, { "docid": "92df450167a97fdf17ebd5b83c28b09a", "score": "0.6912015", "text": "public function create()\n\t{\n\t\t\n\t\treturn View::make('back.Conceptos.create');\n\t}", "title": "" }, { "docid": "a8868117c6271a1bf9acf9032ad876bd", "score": "0.6908024", "text": "public function create()\n {\n return view('admin.new');\n }", "title": "" }, { "docid": "d440c94efd1950e00b13ca9c0042a9b5", "score": "0.6903693", "text": "public function create()\n\t{\n\t\treturn View::make('furnizori.create');\n\t}", "title": "" }, { "docid": "50b63a26044f8f6e8ce183a0f169edb5", "score": "0.68989825", "text": "public function create()\n {\n //Form in views\\forms\\add-teacher\n }", "title": "" }, { "docid": "fe5a9905dc7a54f058401299c6181831", "score": "0.6897775", "text": "public function create() {\n return view(\"create\");\n }", "title": "" }, { "docid": "c17c042b94a24f7301adf6c1bccdccb4", "score": "0.68975264", "text": "public function create()\n {\n return view('akun.form');\n }", "title": "" }, { "docid": "3da29d431813cb53ced72193b8b7a8b3", "score": "0.6895313", "text": "public function create()\n {\n return view('info_bank_forms.create');\n }", "title": "" }, { "docid": "7851cc68e170265f04d4bef0fc5bc722", "score": "0.6894649", "text": "public function create()\n {\n $this->data['mode'] = 'create';\n $this->data['headline'] = 'Create New Product';\n $this->data['button'] = 'Save';\n\n $this->data['categories'] = Category::arrayForSelect();\n \n return view('products.form',$this->data);\n }", "title": "" }, { "docid": "6df26b4d414a58d611f86b22b775e1e1", "score": "0.6890947", "text": "public function create(){\n\t\treturn view('person.new');\n\t}", "title": "" }, { "docid": "8f40254b10bc1c3e9879e99a307263d1", "score": "0.68875927", "text": "public function create()\n {\n return view(\"contratistas.create\");\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68872356", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "a951f648a57c67c0069eeda1c6d6aa92", "score": "0.68871605", "text": "public function create()\n\t{\t\t\n\t\treturn view('syllabi.create');\n\t}", "title": "" }, { "docid": "f77ac1ad153be30f346944682eb2f804", "score": "0.6884246", "text": "public function create()\n {\n return view('programas.form');\n }", "title": "" }, { "docid": "4e920599445d082e866e30214e83ff15", "score": "0.68830466", "text": "public function create()\n {\n return view('company.create'); //return empty form\n }", "title": "" }, { "docid": "0c01c590097437f9d4700db1096060fa", "score": "0.68792456", "text": "public function create()\n {\n return view($this->view_path.'.form',['form_type' => 'create']);\n }", "title": "" }, { "docid": "b65c57b64c6e408c0c27dff7f53b5b58", "score": "0.6877808", "text": "public function create()\n {\n return view('pemilih::create');\n }", "title": "" }, { "docid": "47e62b5d5e96751bc9e8ab90f94e7ea4", "score": "0.6875806", "text": "public function create()\n {\n return view('manager.new');\n }", "title": "" }, { "docid": "3557ca31989d52aabfc94b29a8b4779e", "score": "0.6873955", "text": "public function create()\n {\n return view('hari.create');\n }", "title": "" }, { "docid": "aba2162f4c6ac04e84bdec140bd9b6d8", "score": "0.6873477", "text": "public function create()\n {\n return view('vitri.create');\n }", "title": "" }, { "docid": "0262071f01deb3bd4ca7aa624b922b9c", "score": "0.68705916", "text": "public function newAction()\n {\n if(!$this->get('security.context')->isGranted('ROLE_ADMIN')){\n throw new AccessDeniedException('Accès limité aux administrateurs!');\n }\n\n $entity = new Associate();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MPTimeSheetBundle:Associate:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "e893ea639bb3313c113e9ac5cb2ad8d1", "score": "0.68692666", "text": "public function actionCreate()\n {\n $model = new ResourceManagement();\n $transaction = Yii::$app->getDb()->beginTransaction();\n if (Yii::$app->request->isPost) {\n try{\n if (!$model->load(Yii::$app->request->post()) || !$model->save()) {\n throw new Exception(Yii::t('app', $model->getFirstErrorMessage()));\n }\n $transaction->commit();\n return $this->redirect(['view', 'id' => $model->id]);\n }catch (Exception $e) {\n $transaction->rollBack();\n Helper::Alert(Yii::t('app', $e->getMessage()));\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "1fc26c3847b4a579aa5212f09fb5a3ad", "score": "0.6868165", "text": "public function create()\n {\n //\n return view(\"pages.buku.form\");\n }", "title": "" }, { "docid": "2a2d5c7decbde95e55524a71972f118f", "score": "0.6866955", "text": "public function createAction() : object\n {\n // $userSecurity = new UserSecurity($this->di);\n // $userSecurity->auth();\n $page = $this->di->get(\"page\");\n $form = new CreateForm($this->di);\n $form->check();\n\n $page->add(\"question/crud/create\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Ask a question\",\n ]);\n }", "title": "" }, { "docid": "e8a872ac2676790caa81e881be3f96da", "score": "0.6865526", "text": "public function create()\n\t{\n\t\t\n\t\treturn view('arbitro.create');\n\t}", "title": "" }, { "docid": "0c86a3bb52729202de25828ebfccd4f9", "score": "0.686058", "text": "public function create()\n {\n return view('honnbus.create');\n }", "title": "" }, { "docid": "f7d9d429540409085821ae3a8cc377e9", "score": "0.68599194", "text": "public function create()\n {\n //\n\treturn view ('rumah.create');\n }", "title": "" }, { "docid": "60bdecfc6ffd19a36bc113519ea81603", "score": "0.6859892", "text": "public function create()\n {\n //\n return view('products.form');\n }", "title": "" }, { "docid": "451c07a3106f3c6e3d62757717bfa763", "score": "0.6859294", "text": "public function create()\n\t{\n\t\treturn view('horas.create');\n\t}", "title": "" }, { "docid": "3d7bc8bb3b893c8acc93454aa41e36a4", "score": "0.6858529", "text": "public function create()\n\t{\n\n\t\treturn view('admin.oficinas.create');\n\t}", "title": "" }, { "docid": "5ac05ec4af3247a2fffa1aede51592e8", "score": "0.68577117", "text": "public function create()\n {\n return view('ringan.create');\n }", "title": "" }, { "docid": "17dc479c63e9567096e96d737df7c124", "score": "0.68570185", "text": "public function create() {\n $data = [\n 'title' => 'site_name',\n 'page_title' => 'add_admin',\n 'type' => 'add',\n 'form_title' => 'admin_form',\n 'submit_button' => 'save',\n ];\n return view(AD . '.brands_form')->with($data);\n }", "title": "" } ]
e21c78407912813a321f97c5aa2505ad
Converts specific $options to their correct HTML format
[ { "docid": "c1e33a5e5b269266216a66471aaf3f5d", "score": "0.0", "text": "function _convert_options($options)\n{\n $options = _parse_attributes($options);\n\n foreach (array('disabled', 'readonly', 'multiple') as $attribute)\n {\n if (array_key_exists($attribute, $options))\n {\n if ($options[$attribute])\n {\n $options[$attribute] = $attribute;\n }\n else\n {\n unset($options[$attribute]);\n }\n }\n }\n\n return $options;\n}", "title": "" } ]
[ { "docid": "5b4d29c69ff760fc9ffe361c25cbb891", "score": "0.7280463", "text": "protected function BuildOptions( $options ){\n\t\t$output = '';\n\t\tforeach( $options as $option ){\n\n\t\t\t// Check to see if it's a group\n\t\t\tif( isset( $option[ 'label' ] ) ){\n\t\t\t\t$output .= '<optgroup' . ((isset( $option[ 'id' ] ))?' id=\"' . $option[ 'id' ] . '\"':'') . ' label=\"' . $option[ 'label' ] . '\">' . $this->BuildOptions( $option[ 'options' ] ) . '</optgroup>';\n\t\t\t} else {\n\t\t\t\tif( is_array( $this->value ) ){\n\t\t\t\t\tif( count( $this->value ) ){\n\t\t\t\t\t\t$value = (string)$this->value[0];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$value = '';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$value = (string)$this->value;\n\t\t\t\t}\n\t\t\t\t$output .= str_replace\n\t\t\t\t(\n\t\t\t\t\tarray\n\t\t\t\t\t(\n\t\t\t\t\t\t'[[value]]',\n\t\t\t\t\t\t'[[text]]',\n\t\t\t\t\t\t'[[selected]]'\n\t\t\t\t\t),\n\t\t\t\t\tarray\n\t\t\t\t\t(\n\t\t\t\t\t\tin4ml::Escape( $option[ 'value' ] ),\n\t\t\t\t\t\t$option[ 'text' ],\n\t\t\t\t\t\t( ( (string)$option[ 'value' ] == $value )?' selected=\"selected\"':'' )\n\t\t\t\t\t),\n\t\t\t\t\t$this->option_template\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "07072673b35f3e782a138c41d8ccc5eb", "score": "0.7253631", "text": "public function options() {\n $this->soption->type = self::TYPE_HTML;\n }", "title": "" }, { "docid": "23dfda1e39d240c5aeafaaf54d64d9ee", "score": "0.71212435", "text": "protected abstract function format($options= 0);", "title": "" }, { "docid": "e2c3781901988f79c056ef337b0a8101", "score": "0.70772684", "text": "protected function renderOptionTags($options) {\n\t\t$output = '';\n\t\tif ($this->hasArgument('prependOptionLabel')) {\n\t\t\t$value = $this->hasArgument('prependOptionValue') ? $this->arguments['prependOptionValue'] : '';\n\t\t\tif ($this->hasArgument('translate')) {\n\t\t\t\t$label = $this->getTranslatedLabel($value, $this->arguments['prependOptionLabel']);\n\t\t\t} else {\n\t\t\t\t$label = $this->arguments['prependOptionLabel'];\n\t\t\t}\n\t\t\t$output .= $this->renderOptionTag($value, $label, FALSE) . chr(10);\n\t\t}\n\t\t$output .= $this->renderOptionTagsInternal($options);\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "64a643bff8048437505571a15093c876", "score": "0.7055796", "text": "protected function _process_options($options = array()) {\n $_options = array('ID','CLASS','REL','TITLE','NAME','FOR','ACTION','METHOD','SIZE');\n $data = '';\n foreach($options as $option => $value) {\n if (in_array(strtoupper($option), $_options)) {\n if (strtoupper($option) != 'SIZE')\n $data.= ' '.strtolower($option).'=\"'.$value.'\"';\n else {\n $x = explode('x',$value);\n $data.= ' rows=\"'.$x[0].'\" cols=\"'.$x[1].'\"';\n }\n }\n }\n return $data;\n }", "title": "" }, { "docid": "e43e55dcf8c799b0359a9982f131e273", "score": "0.7000845", "text": "protected function tag_options($options) {\n if(count($options)) {\n $html = array();\n foreach($options as $key => $value) {\n $html[] = \"$key=\\\"\".@htmlspecialchars($value, ENT_COMPAT, 'UTF-8').\"\\\"\";\n }\n sort($html);\n $html = implode(\" \", $html);\n return $html;\n } else {\n return '';\n }\n }", "title": "" }, { "docid": "34d23658cfe3726ea93c83d87898b3f6", "score": "0.69598913", "text": "public abstract function renderOptions();", "title": "" }, { "docid": "f95f704d1929f4be90785582f718e847", "score": "0.69172823", "text": "public function render_self($options) {\n return array('html' => clean_html($this->description));\n }", "title": "" }, { "docid": "f2126c3c8bcbc6dff6588fa4efdc7b9b", "score": "0.69007176", "text": "protected function formatOptions()\n {\n $this->options['reply_markup'] = isset($this->options['reply_markup']) ? (array)$this->options['reply_markup'] : [];\n\n if (!empty($this->inlineButtons)) {\n $this->options['reply_markup']['inline_keyboard'] = $this->inlineButtons;\n }\n\n if (!empty($this->keyboardButtons)) {\n $this->options['reply_markup'] = array_merge($this->options['reply_markup'], $this->keyboardButtons);\n }\n\n if (!empty($this->forceReply)) {\n $this->options['reply_markup'] = array_merge($this->options['reply_markup'], $this->forceReply);\n }\n\n $this->options['reply_markup'] = json_encode($this->options['reply_markup']);\n }", "title": "" }, { "docid": "3f3f11dca7c9332a9b75c156c1117d29", "score": "0.6895569", "text": "protected function _toHtml() {\n $html = '';\n $link_options = self::getData('link_options');\n\n if (empty($link_options)) {\n return $html;\n }\n \n // $arr_options = explode(',', $link_options);\n \n $html .= '<ul style=\"list-style: none;\" class=\"date_ranges\"><li><button href=\".custom-contact-form\" class=\"cta-inside-contact\" id=\"' . $link_options . '\">' . $link_options . '</button></li></ul>';\n\n // if (is_array($arr_options) && count($arr_options)) {\n // foreach ($arr_options as $option) {\n // Switch ($option) {\n // case 'date':\n // $html .= '<div><a href=\"javascript: window.print();\">Print</a></div>';\n // break;\n // }\n // }\n // }\n \n return $html;\n }", "title": "" }, { "docid": "e49a2ecf13d654982bafa192a4190549", "score": "0.6773545", "text": "protected function renderOptionsContent($options) {\n\t\t$optionsContent = '';\n\t\tforeach ($options as $label => $value) {\n\t\t\t$optionsContent .= $this->renderOptionTag($value, $label, $this->isSelected($value));\n\t\t}\n\t\treturn $optionsContent;\n\t}", "title": "" }, { "docid": "9f7b52acb00232154cf102080c783553", "score": "0.6751959", "text": "static function format_options(array $options): string {\n \n // Remove irrelevant options\n unset($options['shortname']);\n \n // Add the 'random' option\n $options['rand'] = rand();\n \n // Concatenate the string\n $options_string = '';\n foreach($options as $key => $val) {\n $options_string .= sprintf('&%s=%s', $key, $val);\n }\n \n // Remove first ampersand\n return substr($options_string, 1);\n }", "title": "" }, { "docid": "c13f26205b229241b185f348581b0cf1", "score": "0.6719767", "text": "public function render(array $options = array());", "title": "" }, { "docid": "db04b078237d0143dafb5212aab0d915", "score": "0.6594671", "text": "function optionElements(array $options)\n{\n $options = array(''=>'') + $options;\n $out = \"\\n\";\n foreach($options as $key=>$value)\n {\n $out .= \"<option value='$key'>$value</option>\\n\";\n }\n return $out;\n}", "title": "" }, { "docid": "a90cf01e0013a830d2c89bdefb12b2cb", "score": "0.6532603", "text": "public function getHTML($options = []) {\n return parent::getHTML( array_merge_recursive(['class' => 'comment-form', 'use_fieldset' => false, 'use_buttonbar' => false], $options));\n }", "title": "" }, { "docid": "fb2da31ab592bc93418239b4895b0ee9", "score": "0.6507259", "text": "protected function options_output()\n {\n ob_start();\n\n $primary_color = sunix_get_theme_opt( 'primary_color', apply_filters('sunix_primary_color',sunix_configs('primary_color')) );\n $accent_color = sunix_get_theme_opt( 'accent_color', apply_filters('sunix_accent_color',sunix_configs('accent_color') ));\n $secondary_color = sunix_get_theme_opt( 'secondary_color', apply_filters('sunix_secondary_color',sunix_configs('secondary_color') ));\n printf( '$primary_color: %s;', esc_attr( $primary_color ) );\n printf( '$accent_color: %s;', esc_attr( $accent_color ) );\n printf( '$secondary_color: %s;', esc_attr( $secondary_color ) );\n // Typography \n printf( '$BodyBG: %s;', sunix_configs('body_bg'));\n printf( '$BodyFont: %s;', sunix_configs('body_font'));\n printf( '$BodyFontSize: %s;', sunix_configs('body_font_size'));\n printf( '$BodyLineHeight: %s;',sunix_configs('body_line_height'));\n printf( '$BodyFontSizeL: %s;', sunix_configs('body_font_size_large'));\n printf( '$BodyFontSizeM: %s;', sunix_configs('body_font_size_medium'));\n printf( '$BodyFontSizeS: %s;', sunix_configs('body_font_size_small'));\n printf( '$BodyFontSizeXS: %s;', sunix_configs('body_font_size_xsmall'));\n printf( '$BodyFontSizeXXS: %s;', sunix_configs('body_font_size_xxsmall'));\n printf( '$BodyColor: %s;', sunix_configs('body_font_color'));\n printf( '$H1Size: %s;', sunix_configs('h1_size'));\n printf( '$H2Size: %s;', sunix_configs('h2_size'));\n printf( '$H3Size: %s;', sunix_configs('h3_size'));\n printf( '$H4Size: %s;', sunix_configs('h4_size'));\n printf( '$H5Size: %s;', sunix_configs('h5_size'));\n printf( '$H6Size: %s;', sunix_configs('h6_size'));\n printf( '$HeadingFont: %s;', sunix_configs('heading_font'));\n printf( '$HeadingColor: %s;', sunix_configs('heading_color'));\n printf( '$HeadingColorHover: %s;', sunix_configs('heading_color_hover'));\n printf( '$HeadingFontW: %s;', sunix_configs('heading_font_weight'));\n printf( '$MetaFont : %s;', sunix_configs('meta_font'));\n printf( '$MetaColor: %s;', sunix_configs('meta_color'));\n printf( '$MetaColorHover: %s;', sunix_configs('meta_color_hover'));\n // Border\n printf( '$MainBorder: %s;', sunix_configs('main_border'));\n printf( '$MainBorder2: %s;', sunix_configs('main_border2'));\n printf( '$MainBorderColor: %s;', sunix_configs('main_border_color'));\n // Comments\n printf( '$cmt_avatar_size: %s;', sunix_configs('cmt_avatar_size'));\n printf( '$cmt_border: %s;', sunix_configs('cmt_border'));\n\n /*height*/\n\n $header_height = sunix_get_theme_opt('header_height', ['height' => apply_filters('sunix_header_height',sunix_configs('header_height'))] );\n if ($header_height['height'] === 'px'){\n printf('$header_height: %s;', sunix_configs('header_height'));\n }\n else{\n printf('$header_height: %s;', esc_attr($header_height['height']));\n }\n\n /* Header side width */\n $header_sidewidth = sunix_get_theme_opt('header_sidewidth',['width' => apply_filters('sunix_header_sidewidth',sunix_configs('header_sidewidth'))]);\n printf('$header_sidewidth: %s;', esc_attr($header_sidewidth['width']));\n\n /* Default Header Color */\n $header_link_color = sunix_get_theme_opt('header_link_colors',apply_filters('sunix_header_link_color', ['regular' => $accent_color, 'hover' => $primary_color, 'active' => $primary_color]) );\n printf( '$header_regular: %s;', esc_attr( $header_link_color['regular'] ) );\n printf( '$header_hover: %s;', esc_attr( $header_link_color['hover'] ) );\n printf( '$header_active: %s;', esc_attr( $header_link_color['active'] ) );\n\n /* Ontop Header Color */\n $ontop_link_color = sunix_get_theme_opt('ontop_link_colors', apply_filters('sunix_ontop_link_color', ['regular' => '#FFFFFF', 'hover' => $accent_color, 'active' => $accent_color]) );\n printf( '$ontop_regular: %s;', esc_attr( $ontop_link_color['regular'] ) );\n printf( '$ontop_hover: %s;', esc_attr( $ontop_link_color['hover'] ) );\n printf( '$ontop_active: %s;', esc_attr( $ontop_link_color['active'] ) );\n\n /* Sticky Header Color */\n $sticky_link_color = sunix_get_theme_opt('sticky_link_colors',apply_filters('sunix_sticky_link_color',['regular' => '#FFFFFF', 'hover' => $accent_color, 'active' => $accent_color]));\n printf( '$sticky_regular: %s;', esc_attr( $sticky_link_color['regular'] ) );\n printf( '$sticky_hover: %s;', esc_attr( $sticky_link_color['hover'] ) );\n printf( '$sticky_active: %s;', esc_attr( $sticky_link_color['active'] ) );\n\n /* Dropdown && Mobile */\n $dropdown_bg_opt = sunix_get_theme_opt('dropdown_bg',['rgba' => apply_filters('sunix_dropdown_bg', sunix_configs('dropdown_bg'))]);\n printf('$dropdown_bg: %s;', esc_attr($dropdown_bg_opt['rgba']));\n $dropdown_link_colors = sunix_get_theme_opt('dropdown_link_colors', apply_filters('sunix_dropdown_link_colors',['regular' => '#111', 'hover' => $primary_color, 'active' => $primary_color]) );\n printf( '$dropdown_regular: %s;', esc_attr( $dropdown_link_colors['regular'] ) );\n printf( '$dropdown_hover: %s;', esc_attr( $dropdown_link_colors['hover'] ) );\n printf( '$dropdown_active: %s;', esc_attr( $dropdown_link_colors['active'] ) );\n\n /* Side Header Width */\n\n /* WooCommerce */\n printf( '$sunix_product_single_image_w: %s;', sunix_configs('sunix_product_single_image_w') );\n printf( '$sunix_product_single_image_h: %s;', sunix_configs('sunix_product_single_image_h') );\n \n printf( '$sunix_product_loop_image_w: %s;', sunix_configs('sunix_product_loop_image_w') );\n printf( '$sunix_product_loop_image_h: %s;', sunix_configs('sunix_product_loop_image_h') );\n\n printf( '$sunix_product_gallery_thumbnail_w: %s;', sunix_configs('sunix_product_gallery_thumbnail_w') );\n printf( '$sunix_product_gallery_thumbnail_h: %s;', sunix_configs('sunix_product_gallery_thumbnail_h') );\n\n printf( '$sunix_product_gallery_thumbnail_v_w: %s;', sunix_configs('sunix_product_gallery_thumbnail_v_w') );\n printf( '$sunix_gallery_thumbnail_v_h: %s;', sunix_configs('sunix_product_gallery_thumbnail_v_h') );\n\n printf( '$sunix_gallery_thumbnail_h_w: %s;', sunix_configs('sunix_product_gallery_thumbnail_h_w') );\n printf( '$sunix_gallery_thumbnail_h_h: %s;', sunix_configs('sunix_product_gallery_thumbnail_h_h') );\n\n printf( '$sunix_product_gallery_thumbnail_space: %s;', sunix_configs('sunix_product_gallery_thumbnail_space') );\n\n\n return ob_get_clean();\n }", "title": "" }, { "docid": "1d8c0cfedb6ef25a7ab3de6520207863", "score": "0.65007395", "text": "public function getHtml($options = [])\n {\n $html = '';\n self::buildHtml($html, $this, $options, 0);\n\n return $html;\n }", "title": "" }, { "docid": "2b448d5cbd7f0b577da73aec7bdae720", "score": "0.6469004", "text": "function key_value_to_html_attribute($options) {\r\n\tif (empty($options)) {\r\n\t\treturn '';\r\n\t}\r\n\t\r\n\t$out = ' ';\r\n\tforeach ((array)$options as $k => $v) {\r\n\t\t$out .= $k.'=\"'.$v.'\" ';\r\n\t}\r\n\t\r\n\treturn $out;\r\n}", "title": "" }, { "docid": "a3e8194469efcad87e4cda33aee7c6ca", "score": "0.64524037", "text": "function displayOptions() {\n $this->processDisplayOptions();\n return parent::displayOptions() . $this->configureSS->fetch($this->configureTpl);\n }", "title": "" }, { "docid": "f218228f0fc6198fd14a4b5d09b22866", "score": "0.64334154", "text": "public function renderHTML($options = array())\n { \n // CSS \n //Take into account parent styles inheritance that was not taken into\n //account after the first parent style merging\n $this->_mergeParentStyles(); \n //include default page styles;\n $this->_CSS .= $this->_externalCSS .PHP_EOL;\n if ($this->_parseLayout) {\n foreach ($this->_pageStyle as $key => $value) {\n //we should replace the margins by paddings for proper browser\n //rendering\n $css = $value['page'];\n $this->_CSS .= 'div#' . $this->_prefix . 'div.' . $key . ' {' . $css . '}' . PHP_EOL; \n\t\t\t\t$width = self::extractSingleProperty('data-width', $css);\n if (!empty($width)) {\n $w = 'width: ' . $width .';';\n $this->_CSS .= '.h5p_page_'. $key .' {' . $w . '}' .PHP_EOL;\n } \n }\n }\n foreach ($this->_style as $key => $value) {\n $posFontSize = \\strpos($value, 'font-size:');\n $before = \\strpos($key, ':before');\n if ($posFontSize === false \n && $before == false\n && isset($this->_defaultFontSize)) {\n $value .= 'font-size: ' . $this->_defaultFontSize . ';';\n }\n $this->_CSS .= ' div#' . $this->_prefix . $key . ' {' . $value . '}' . PHP_EOL; \n }\n foreach ($this->_defaultStyle as $key => $value) {\n $posFontSize = \\strpos($value, 'font-size:');\n $before = \\strpos($key, ':before');\n if ($posFontSize === false \n && $before == false\n && isset($this->_defaultFontSize)) {\n $value .= 'font-size: ' . $this->_defaultFontSize . ';';\n }\n $this->_CSS .= ' div#' . $this->_prefix . $key . ' {' . $value . '}' . PHP_EOL; \n }\n if ($this->_math) {\n $html = '<html xmlns:mml=\"http://www.w3.org/1998/Math/MathML\" xmlns:default=\"http://www.w3.org/1998/Math/MathML\">' . PHP_EOL;\n } else {\n $html = '';\n }\n\t\t\n\n if ($this->_singleFile) {\n $html .= '<style>' . PHP_EOL . $this->_CSS . PHP_EOL . '</style>' . PHP_EOL;\n } else {\n if (\\file_exists($this->_path['filename'] . '-styles') === false) {\n //create the folder\n \\mkdir($this->_path['filename'] . '-styles');\n }\n } \n if ($this->_math) {\n\t\t\t$mathCSS = \\file_get_contents(dirname(__FILE__) . '/MathJax.css');\n\t\t\t$mathCSS = str_replace ('.h5p_page', ' div#' . $this->_prefix . ' section.h5p_page', $mathCSS);\n $html .= $mathCSS;\n }\n \n //HTML\n \n //start to generate the HTML5 body element\n $k = 0;\n $currentMaster = NULL;\n $layout =& $this->_masterLayout;\n foreach ($this->_HTML as $key => $value) {\n //get the master style\n //we have to hack the fact that whenever $k > 0 the standard page \n //layout because when one changes from Word to Libre Office or \n //Open Office spurious sections may pop out: unfortunately this may \n //be implementation dependedant\n if (isset($value['master']) && ($value['master'] != 'Standard' || $k == 0)) {\n $master = $value['master']; \n } else {\n $master = $currentMaster;\n }\n if ($k == 0 && empty($master) && empty($currentMaster)){\n $l = count($this->_HTML);\n for ($p = 1; $p < $l; $p++) {\n if (!empty($this->_HTML[$p]['master'])) {\n $master = $this->_HTML[$p]['master'];\n break;\n }\n }\n }\n if ($master !== $currentMaster) {\n if ($k > 0) {\n if (!empty($layout[$currentMaster]['footer'])) {\n $div->appendChild($layout[$currentMaster]['footer']);\n }\n $this->_body->documentElement->appendChild($section);\n }\n $section = $this->_body->createElement('section');\n $section->setAttribute('id', 'section_' . $k);\n if (isset($layout[$master]['layout'])) {\n $class = 'h5p_layout h5p_page h5p_page_' . $layout[$master]['layout'];\n } else if (isset($layout['default'])) {\n $class = 'h5p_layout h5p_page h5p_page_' . $layout['default'];\n } else {\n $class = 'h5p_layout h5p_page';\n }\n $section->setAttribute('class', $class);\n $div = $this->_body->createElement('div');\n if (isset($layout[$master]['layout'])) {\n $class = $layout[$master]['layout'];\n $div->setAttribute('class', $class);\n } else {\n //we use some default styles\n $defStyle = 'border: none; padding: 2cm';\n $div->setAttribute('style', $defStyle);\n }\n \n $section->appendChild($div);\n if (!empty($layout[$master]['header'])) {\n $div->appendChild($layout[$master]['header']);\n }\n $currentMaster = $master;\n } \n if (empty($div)) {\n $section = $this->_body->createElement('section');\n $section->setAttribute('id', 'section_' . $k);\n $class = 'h5p_layout h5p_page';\n $section->setAttribute('class', $class);\n $div = $this->_body->createElement('div');\n $div->setAttribute('class', 'h5p_default_layout');\n $div->appendChild($value['xml']);\n $section->appendChild($div);\n $this->_body->documentElement->appendChild($section);\n } else {\n $div->appendChild($value['xml']);\n }\n $k++;\n }\n //take into account the last section that is not properly handle in the\n //loop\n if (\\count($this->_footnotes) > 0 \n || \\count($this->_endnotes) > 0\n || \\count($this->_comments) > 0) {\n $this->_appendNotes($div);\n }\n if (!empty($layout[$master]['footer'])) {\n $div->appendChild($layout[$master]['footer']);\n }\n if (!empty($section)) {\n $this->_body->documentElement->appendChild($section);\n }\n //take now into account the scripts\n $addScripts = '';\n if (\\count($this->_charts)){\n //TODO: load the javascript and CSS in a proper way :-)\n $addScripts .= '<style>';\n\t\t\t$c3CSS = \\file_get_contents(dirname(__FILE__) . '/../../lib/vendor/js/c3.css');\n\t\t\t$c3CSS = \\str_replace('.h5p_page', 'div#' . $this->_prefix . ' .h5p_page', $c3CSS);\n $addScripts .= $c3CSS;\n $addScripts .= '</style>';\n $addScripts .= '<script>';\n $addScripts .= \\file_get_contents(dirname(__FILE__) . '/../../lib/vendor/js/c3.js');\n $addScripts .= '</script>';\n $addScripts .= '<script>';\n $addScripts .= \\file_get_contents(dirname(__FILE__) . '/../../lib/vendor/js/d3.js');\n $addScripts .= '</script>';\n foreach ($this->_charts as $chart) {\n $addScripts .= $chart;\n }\n }\n if (\\count($this->_comments)){\n $addScripts .= '<style>';\n $addScripts .= \\file_get_contents(dirname(__FILE__) . '/../../lib/vendor/js/jquery.webui-popover.css');\n $addScripts .= '</style>';\n $addScripts .= '<script>' . PHP_EOL;\n $addScripts .= '(function( $ ) {' . PHP_EOL;\n $addScripts .= \\file_get_contents(dirname(__FILE__) . '/../../lib/vendor/js/jquery.webui-popover.min.js');\n foreach ($this->_comments as $comment) {\n $addScripts .= $comment['script'];\n }\n $addScripts .= '})(jQuery);';\n $addScripts .= '</script>';\n }\n if ($this->_tabs) {\n $addScripts .= '<script>';\n $addScripts .= \\file_get_contents(dirname(__FILE__) . '/../../lib/vendor/js/tabs.js');\n $addScripts .= '</script>'; \n }\n if (\\count($this->_dropcaps) > 0) {\n $addScripts .= '<script>';\n $addScripts .= \\file_get_contents(dirname(__FILE__) . '/../../lib/vendor/js/dropcaps.js');\n foreach($this->_dropcaps as $index => $value){\n $addScripts .= 'var ' . $index . '_dropcaps = document.querySelectorAll(\".' . $index . '_dropcaps\");' . PHP_EOL;\n $addScripts .= 'window.Dropcap.layout(' . $index . '_dropcaps, ' . $value . ');' . PHP_EOL;\n }\n $addScripts .= '</script>';\n }\n if ($this->_math) {\n $mathjax = Docxpresso\\CreateDocument::$config['js']['MathJax'];\n $html .= '<script src=\"' . $mathjax . '\" type=\"text/javascript\"> </script>' . PHP_EOL; \n }\n if ($this->_sortTables) {\n $addScripts .= '<script>' . PHP_EOL;;\n $addScripts .= 'var numFormat = \"';\n $addScripts .= $this->_sortNumberFormat;\n $addScripts .= '\";' . PHP_EOL;\n $addScripts .= \\file_get_contents(dirname(__FILE__) . '/../../lib/vendor/js/tableSorter.js');\n $addScripts .= '</script>'; \n }\n \n //we should now repair the DOM for div's inside p's that are\n //generated for charts and images. We also take care of drop caps if any\n $this->_repairDOM($this->_body);\n \n $this->_body->formatOutput = false;//to avoid unwanted whitespaces\n $htmlBody = $this->_body->saveXML($this->_body->documentElement);\n\n if (\\count($this->_charts) \n || \\count($this->_comments)\n || $this->_sortTables\n || $this->_tabs\n || \\count($this->_dropcaps)){\n $htmlBody = \\str_replace('</body>', \n $addScripts . '</body>', \n $htmlBody);\n }\n $html .= $htmlBody;\n\t\tif ($this->_math) {\n\t\t\t$html .= '</html>';\n\t\t}\n \n //this is a hack for <wbr> in IE\n $html = \\str_replace('<wbr/>', '&#x200b;&#x200b;', $html);\n\n $html = \\str_replace('<body>', \n '<div id=\"' . \\trim($this->_prefix) . '\">',\n $html);\n $html = \\str_replace('</body>', \n '</div>',\n $html);\n \n if ($this->_download) {\n return $html;\n } \n \n }", "title": "" }, { "docid": "6538c56629dd9bb725e6a8d3dc731fdc", "score": "0.64253163", "text": "public function renderOptions()\n {\n }", "title": "" }, { "docid": "0991985d243ea3735dcee32c8c37d653", "score": "0.64152724", "text": "public static function formatOptions(&$options=[])\n {\n if ($options) {\n if (is_array($options)) {\n foreach ($options as $k=>$v) {\n if (is_int($k)) {\n $options[$v] = true;\n unset($options[$k]);\n }\n }\n } elseif (is_string($options)) {\n $aa = $options;\n $options = [];\n $options[$aa] = true;\n } \n }\n }", "title": "" }, { "docid": "0686567a465216148887858dba1c239f", "score": "0.64094836", "text": "public function html(array $options = []) : string {\n\t\treturn '<!DOCTYPE '.\\htmlspecialchars($this->content).'>';\n\t}", "title": "" }, { "docid": "0cd69efa8456382b90919fddd95017ae", "score": "0.6404279", "text": "protected function output() {\n\t\t\t$options = array();\n\n\t\t\tforeach ( $this->get_options() as $key => $title ) {\n\t\t\t\tif ( false !== $this->data( $key ) ) {\n\t\t\t\t\t$options[ $key ] = ( true === $this->data( $key ) ) ? $title : $this->data( $key );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->field['options'] = $options;\n\t\t\techo parent::output();\n\t\t}", "title": "" }, { "docid": "00be79fe4b86f22a100da408fedf2066", "score": "0.6401756", "text": "private function __processOptions($options) {\n\t\t$jsOptions = '';\n\t\tforeach ($options as $key => $value) {\n\t\t\tif (array_key_exists($key, $this->optionMap)) {\n\t\t\t\t$jsOptions .= $this->optionMap[$key] . ' = \"' . $value . '\";' . \"\\n\";\n\t\t\t}\n\t\t}\n\t\treturn $jsOptions;\n\t}", "title": "" }, { "docid": "5742d5cfa9eb7917a464302f2677e987", "score": "0.6363197", "text": "protected function _optionToHtml($option)\n {\n if (empty($option)) {\n $html = '<td>&nbsp;</td><td>&nbsp;</td>';\n } else {\n $id = $this->getHtmlId() . '_' . $this->_escape($option['value']);\n $isNameLeft = $this->getData('place_name_left');\n\n $border = $this->_useBorderClass ? ' class=\"border\"' : '';\n $html = '<td' . $border . '><input id=\"' . $id . '\"';\n foreach ($this->getHtmlAttributes() as $attribute) {\n $value = $this->getDataUsingMethod($attribute, $option['value']);\n if ($value) {\n $html .= ' ' . $attribute . '=\"' . $value . '\"';\n }\n }\n $html .= ' value=\"' . $option['value'] . '\" /></td>';\n\n $label = '<td><label for=\"' . $id . '\" style=\"white-space: nowrap;\">' . $option['label'] . '</label></td>';\n\n if ($isNameLeft) {\n $html = $label . $html;\n } else {\n $html = $html . $label;\n }\n }\n\n return $html;\n }", "title": "" }, { "docid": "89028975104513f9552dca3c6203bf57", "score": "0.6357123", "text": "public function asHTML()\n {\n $parsedown = new Parsedown();\n $options = $this->config()->get('options');\n if ($options && is_array($options)) {\n foreach ($options as $fn => $param) {\n if (method_exists($parsedown, $fn)) {\n $parsedown->{$fn}($param);\n }\n }\n }\n\n return $parsedown->text($this->value);\n }", "title": "" }, { "docid": "bb1e3eca356b4a55b95e756bcae85f7b", "score": "0.6304731", "text": "function renderXhtml($options)\n {\n // type, count, level\n extract($options);\n \n // the prefix used for anchor names\n $prefix = 'toc';\n \n if ($type == 'target') {\n // ... generate an anchor.\n return \"<a id=\\\"$prefix$count\\\"></a>\";\n }\n \n if ($type == 'list_start') {\n return \"<p>\\n\";\n }\n \n if ($type == 'list_end') {\n return \"</p>\\n\";\n }\n \n if ($type == 'item_start') {\n \n // build some indenting spaces for the text\n $indent = ($level - 2) * 4;\n $pad = str_pad('', $indent);\n $pad = str_replace(' ', '&nbsp;', $pad);\n \n // add an extra linebreak in front of heading-2\n // entries (makes for nice section separations)\n if ($level <= 2 && $count > 0) {\n $pad = \"<br />\\n$pad\";\n }\n \n // create the entry line as a link to the toc anchor\n return \"$pad<a href=\\\"#$prefix$count\\\">\";\n }\n \n if ($type == 'item_end') {\n return \"</a><br />\\n\";\n }\n }", "title": "" }, { "docid": "d079f0c91a88786c320691d0b91c332e", "score": "0.6293272", "text": "function ConvertToHtml($markup, $options) {\n $texy = new Texy();\n\n //$texy->utf = true;\n //$texy->trustMode();\n $texy->headingModule->top = $options['topHeadingLevel'];\n $texy->headingModule->generateID = true;\n\n $texy->imageModule->root = '';\n $texy->imageModule->linkedRoot = '';\n\n $texy->setOutputMode(Texy::XHTML5);\n\n if ($options['noCodeInPre']) {\n $texy->addHandler('block', array('removeCodeFromPre', 'blockHandler'));\n }\n\n $html = $texy->process($markup);\n return $html;\n}", "title": "" }, { "docid": "0b46c93b97ae0fba7852c21c05de3b86", "score": "0.6290058", "text": "public function render_before_options_form() {\n\t\t\n\t\t//Init vars\n\t\t$output = NULL;\n\t\t\n\t\tob_start();\n\t\t//ADD YOUR CUSTOM HTML HERE\n\t\t?>\n\t\t\n\t\t<?php\n\t\t$output = ob_get_contents();\n\t\tob_end_clean();\n\t\t\n\t\techo $output;\n\t}", "title": "" }, { "docid": "13e524e28cd920fe6f9b98c1dba838cb", "score": "0.6243721", "text": "public function toHtml() {\n $output = parent::toHtml(); // Core code.\n\n // Even if the simpler way to pass the class is:\n // $output = \\html_writer::tag('div', $output, $this->_options);\n // I create the array from scratch in order to\n // drop any other potentially dangerous element of the original $this->_options array.\n $class = ['class' => $this->_options['class']];\n $output = \\html_writer::tag('div', $output, $class);\n\n return $output;\n }", "title": "" }, { "docid": "d459504bf2aae767aa9cb78eb53390aa", "score": "0.62398773", "text": "protected function _toHtml()\n {\n if ($this->config->isEnabled()) {\n return parent::_toHtml();\n }\n }", "title": "" }, { "docid": "945015137aa03ef8f354a049dac445ab", "score": "0.6180593", "text": "protected function _toHtml()\n {\n\n if ($this->_configShow(self::ADVERT_TYPE, $this->getPageType())\n && !$this->_isSelectorExist(self::ADVERT_TYPE, $this->getPageType())) {\n return parent::_toHtml();\n }\n\n return '';\n }", "title": "" }, { "docid": "5751bc07aa724194ab770904c477f358", "score": "0.61654276", "text": "private function _options_setting($settings) {\n\t\t$r = '';\n\n\t\tif (isset($settings['options'])) {\n\t\t\tforeach($settings['options'] as $name => $stuff) {\n\t\t\t\tif ($r !== '') $r .= \"\\n\";\n\t\t\t\t$r .= $name;\n\t\t\t\t$r .= ' : '.$stuff['label'];\n\t\t\t\t$r .= ' : '.$stuff['type'];\n if( $stuff['type'] == 'dropdown' && is_array($stuff['dropdown']) ) {\n $r .= ' : '.implode(' | ',$stuff['dropdown']);\n }\n\t\t\t\t}\n\t\t\t}\n\n\t\treturn $r;\n\t\t}", "title": "" }, { "docid": "11ac7b4e92741859bd48df3702a6c9f2", "score": "0.6158238", "text": "public function renderOptions() {\n global $zuhaus_mikado_Framework;\n $tab \t\t= zuhaus_mikado_get_admin_tab();\n $active_page \t= $zuhaus_mikado_Framework->mkdOptions->getAdminPageFromSlug($tab);\n $current_theme \t= wp_get_theme();\n\n if ($active_page == null) return;\n ?>\n <div class=\"mkdf-options-page mkdf-page\">\n <?php $this->getHeader($current_theme->get('Name'), $current_theme->get('Version')); ?>\n <div class=\"mkdf-page-content-wrapper\">\n <div class=\"mkdf-page-content\">\n <div class=\"mkdf-page-navigation mkdf-tabs-wrapper vertical left clearfix\">\n <?php $this->getPageNav($tab); ?>\n <?php $this->getPageContent($active_page, $tab); ?>\n </div>\n </div>\n </div>\n </div>\n <a id='back_to_top' href='#'>\n <span class=\"fa-stack\">\n <span class=\"fa fa-angle-up\"></span>\n </span>\n </a>\n <?php }", "title": "" }, { "docid": "2aea6799cbd623ffd73054943976a48f", "score": "0.61511844", "text": "public function render_after_options_form() {\n\t\t\n\t\t//Init vars\n\t\t$output = NULL;\n\t\t\n\t\tob_start();\n\t\t//ADD YOUR CUSTOM HTML HERE\n\t\t?>\n\t\t\n\t\t<?php\n\t\t$output = ob_get_contents();\n\t\tob_end_clean();\n\t\t\n\t\techo $output;\n\t}", "title": "" }, { "docid": "e717cf3421270ab428d3e5765cd12a1d", "score": "0.6149627", "text": "protected function prepare_render_options($options) {\n if(is_string($options)) {\n $options = (strpos($options, '/') !== false) ? array('file' => $options) : array('template' => $options);\n } elseif(is_null($options)) $options = array();\n \n if(!array_key_exists('template', $options) and !array_key_exists('file', $options)) {\n $options['template'] = $this->action;\n }\n \n if(!array_key_exists('layout', $options) and !empty($this->layout)) {\n $options['layout'] = $this->layout;\n }\n \n if(!array_key_exists('path', $options)) {\n $options['path'] = $this->path();\n }\n \n return $options;\n }", "title": "" }, { "docid": "b760f8942c3a976937b383f3300e4dd2", "score": "0.61405486", "text": "public function render_options_page() {\r\n\t\t$error_list = array();\r\n\r\n\t\tif (self::checkPHPVersion()) return;\r\n \r\n $form = $this->getOptionForm();\r\n \r\n $data = [\r\n 'title' => self::$PLUGIN_NAME .' - Options',\r\n 'form' => $form->createView(),\r\n ];\r\n \r\n $form->handleRequest();\r\n \r\n if ($form->isValid()) {\r\n self::$opt = $form->getData();\r\n update_option(self::$PLUGIN_NAME_LC, self::$opt);\r\n }\r\n \r\n echo TwigComponent::env()->render('admin_options.twig', $data);\r\n\t}", "title": "" }, { "docid": "e47ee83b1ac0fb0eba1d9f9dba0e68be", "score": "0.6136483", "text": "public function options_page_html()\n {\n // Set class properties to be referenced in callbacks\n $this->options = get_option( LBRY_SETTINGS );\n $this->options_speech = get_option( LBRY_SPEECH_SETTINGS );\n require_once( LBRY_ABSPATH . 'templates/options-page.php' );\n }", "title": "" }, { "docid": "bbc93fef70ca6d2d6dd46f0f11e61488", "score": "0.6100475", "text": "public function getEmbedHTML($options)\n {\n return $this->object->getEmbedHTML($options);\n }", "title": "" }, { "docid": "03ad6f4c11f9185665c933b68e4476c2", "score": "0.609454", "text": "public function getHTML()\n {\n $html = '<span class=\"span-select\"><select id=\"cmd-'.$this->id.'-'.$this->command.'\" size=\"1\"><option value=\"\">'\n\t\t\t.$this->title.'</option>';\n foreach ( explode( ' ', $this->arguments ) as $opt )\n $html .= '<option value=\"'.$opt.'\">'.$opt.'</option>';\n $html .= '</select></span>';\n\n return $html;\n }", "title": "" }, { "docid": "fa5cd10d19d3aaa52d9dc9c3297a954a", "score": "0.60671234", "text": "function inputHTML($name, $_options = false) {\n\n\t\t// Get default settings from model first\n\n\t\t// label\n\t\t$label = $this->getProperty($name, \"label\");\n\t\t$value = $this->getProperty($name, \"value\");\n\n\t\t// frontend stuff\n\t\t$class = $this->getProperty($name, \"class\");\n\t\t$id = $this->getProperty($name, \"id\");\n\n\t\t// tags for HTML editor\n\t\t$allowed_tags = $this->getProperty($name, \"allowed_tags\");\n\n\t\t// visual feedback\n\t\t$hint_message = $this->getProperty($name, \"hint_message\");\n\t\t$error_message = $this->getProperty($name, \"error_message\");\n\n\n\t\t$file_add = $this->getProperty($name, \"file_add\");\n\t\t$file_delete = $this->getProperty($name, \"file_delete\");\n\t\t$media_add = $this->getProperty($name, \"media_add\");\n\t\t$media_delete = $this->getProperty($name, \"media_delete\");\n\n\n\t\t// overwrite model/defaults\n\t\tif($_options !== false) {\n\t\t\tforeach($_options as $_option => $_value) {\n\t\t\t\tswitch($_option) {\n\n\t\t\t\t\tcase \"label\" : $label = $_value; break;\n\t\t\t\t\tcase \"value\" : $value = $_value; break;\n\n\t\t\t\t\tcase \"class\" : $class = $_value; break;\n\t\t\t\t\tcase \"id\" : $id = $_value; break;\n\n\t\t\t\t\tcase \"allowed_tags\" : $allowed_tags = $_value; break;\n\n\t\t\t\t\tcase \"error_message\" : $error_message = $_value; break;\n\t\t\t\t\tcase \"hint_message\" : $hint_message = $_value; break;\n\n\t\t\t\t\tcase \"file_add\" : $file_add = $_value; break;\n\t\t\t\t\tcase \"file_delete\" : $file_delete = $_value; break;\n\n\t\t\t\t\tcase \"media_add\" : $media_add = $_value; break;\n\t\t\t\t\tcase \"media_delete\" : $media_delete = $_value; break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t// Start generating HTML\n\t\t$_ = '';\n\n\n\t\t$for = stringOr($id, \"input_\".$name);\n\t\t$att_id = $this->attribute(\"id\", $for);\n\t\t$att_name = $this->attribute(\"name\", $name);\n\n\t\t$att_class = $this->attribute(\"class\", \"field\", \"html\", $class, \"tags:\".$allowed_tags);\n\n\t\t// get default paths if not specif\n\t\tglobal $page;\n\t\tif(!$file_add) {\n\t\t\t$file_add = $page->validPath($this->path.\"/addHTMLFile\");\n\t\t}\n\t\tif(!$file_delete) {\n\t\t\t$file_delete = $page->validPath($this->path.\"/deleteHTMLFile\");\n\t\t}\n\t\tif(!$media_add) {\n\t\t\t$media_add = $page->validPath($this->path.\"/addHTMLMedia\");\n\t\t}\n\t\tif(!$media_delete) {\n\t\t\t$media_delete = $page->validPath($this->path.\"/deleteHTMLMedia\");\n\t\t}\n\n\t\t// paths for saving and deleting files\n\t\t$att_file_add = $this->attribute(\"data-file-add\", $file_add);\n\t\t$att_file_delete = $this->attribute(\"data-file-delete\", $file_delete);\n\t\t$att_media_add = $this->attribute(\"data-media-add\", $media_add);\n\t\t$att_media_delete = $this->attribute(\"data-media-delete\", $media_delete);\n\n//\t\tprint $att_file_add . \",\" . $att_file_delete;\n//\t\t$att_html_item_id = $this->attribute(\"data-item_id\", $_options[\"item_id\"]);\n\n\n\t\t$_ .= '<div'.$att_class.$att_file_add.$att_file_delete.$att_media_add.$att_media_delete.'>';\n\n\t\t\t$_ .= '<label'.$this->attribute(\"for\", $for).'>'.$label.'</label>';\n\t\t\t// entity values in textarea will be interpreted, so double encode them\n\t\t\t$_ .= '<textarea'.$att_name.$att_id.'>'.htmlentities($value, ENT_COMPAT, \"UTF-8\").'</textarea>';\n\n\t\t\t// Hint and error message\n\t\t\tif($hint_message || $error_message) {\n\t\t\t\t$_ .= '<div'.$this->attribute(\"class\", \"help\").'>';\n\t\t\t\tif($hint_message) {\n\t\t\t\t\t$_ .= '<div'.$this->attribute(\"class\", \"hint\").'>'.$hint_message.'</div>';\n\t\t\t\t}\n\t\t\t\tif($error_message) {\n\t\t\t\t\t$_ .= '<div'.$this->attribute(\"class\", \"error\").'>'.$error_message.'</div>';\n\t\t\t\t}\n\t\t\t\t$_ .= '</div>';\n\t\t\t}\n\n\t\t$_ .= '</div>'.\"\\n\";\n\n\t\treturn $_;\n\t}", "title": "" }, { "docid": "06b789bbaecef0003af952e9c773c9e3", "score": "0.604163", "text": "public static function toHtml($var, array $options = []): string\n\t{\n\t\treturn (new static($options))->asHtml($var);\n\t}", "title": "" }, { "docid": "1afb91a42553cbde4c7aba426e009b5a", "score": "0.5989724", "text": "function sanitize_theme_options($options)\n {\n $options['example_text'] = stripcslashes($options['example_text']);\n return $options;\n }", "title": "" }, { "docid": "38e5bcd389598fbb3506a356226b3d50", "score": "0.5988471", "text": "abstract public function toHTML();", "title": "" }, { "docid": "ff1e145d761be3409ea0f23c48145912", "score": "0.5984163", "text": "function output($name, $_options = false) {\n\n\t\t// form security\n\t\tif(!isset($this->valid_form_started) || !$this->valid_form_started) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\t// Get default settings from model first\n\n\t\t// label\n\t\t$label = $this->getProperty($name, \"label\");\n\n\t\t// type, value and options\n\t\t$type = $this->getProperty($name, \"type\");\n\t\t$value = $this->getProperty($name, \"value\");\n\t\t$options = $this->getProperty($name, \"options\");\n\n\t\t// frontend stuff\n\t\t$class = $this->getProperty($name, \"class\");\n\t\t$id = $this->getProperty($name, \"id\");\n\n\t\t// visual feedback\n\t\t$hint_message = $this->getProperty($name, \"hint_message\");\n\n\n\t\t// overwrite model/defaults\n\t\tif($_options !== false) {\n\t\t\tforeach($_options as $_option => $_value) {\n\t\t\t\tswitch($_option) {\n\n\t\t\t\t\tcase \"label\" : $label = $_value; break;\n\t\t\t\t\tcase \"type\" : $type = $_value; break;\n\t\t\t\t\tcase \"value\" : $value = $_value; break;\n\t\t\t\t\tcase \"options\" : $options = $_value; break;\n\n\t\t\t\t\tcase \"class\" : $class = $_value; break;\n\t\t\t\t\tcase \"id\" : $id = $_value; break;\n\n\t\t\t\t\tcase \"hint_message\" : $hint_message = $_value; break;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Start generating HTML\n\n\t\t$_ = '';\n\n\n\t\t$att_id = $this->attribute(\"id\", $id);\n\t\t$att_name = $this->attribute(\"name\", $name);\n\n\t\t// combine classname for field\n\t\t$att_class = $this->attribute(\"class\", \"field\", $type, $class);\n\t\t$att_value = $this->attribute(\"value\", $value);\n\n\n\t\t$_ .= '<div'.$att_class.'>';\n\t\t\t$_ .= '<input type=\"hidden\"'.$att_name.$att_id.$att_value.' />';\n\n\t\t\t$_ .= '<label>'.$label.'</label>';\n\n\t\t\t// list\n\t\t\tif($type == \"list\") {\n\n\t\t\t\t$_ .= '<ul'.$att_id.'>';\n\t\t\t\tforeach($options as $li_option => $li_value) {\n\t\t\t\t\t$_ .= '<li class=\"'.($value == $li_option ? ' selected' : '').'>'.$li_value.'</li>';\n\t\t\t\t}\n\t\t\t\t$_ .= '</ul>';\n\n\t\t\t}\n\t\t\t// paragraph\n\t\t\telse {\n\n\t\t\t\t$_ .= '<p'.$att_id.'>'.$value.'</p>';\n\n\t\t\t}\n\n\n\t\t\t// HINT MESSAGE\n\t\t\tif($hint_message) {\n\t\t\t\t$_ .= '<div'.$this->attribute(\"class\", \"help\").'>';\n\t\t\t\t\t$_ .= '<div'.$this->attribute(\"class\", \"hint\").'>'.$hint_message.'</div>';\n\t\t\t\t$_ .= '</div>';\n\t\t\t}\n\n\n\t\t$_ .= '</div>'.\"\\n\";\n\n\n\t\treturn $_;\n\t}", "title": "" }, { "docid": "d369eee67496c05ace53e487012f543f", "score": "0.59722656", "text": "function render(){\n\n\t\t$class = (isset($this->field['class']))?'class=\"'.$this->field['class'].'\" ':'';\n\t\t\n\t\t\n\t\t$style =array('normal','bold','inherit');\n\t\techo '<select id=\"'.$this->field['id'].'\" name=\"'.$this->args['opt_name'].'['.$this->field['id'].']\" '.$class.'rows=\"6\" >';\n\t\techo '<option value=\"'.$fonts->style.':'.$style.'\" '.selected($this->value, $fonts->style.':'.$style, false).'>Default</option>';\n\t\t\tforeach($style as $variant){\n\t\t\n\t\t\t\techo '<option value=\"'.$fonts->style.':'.$variant.'\" '.selected($this->value, $fonts->style.':'.$variant, false).'>'.$fonts->style.' '.$variant.'</option>';\n\t\t\t}\n\t\t\n\t\techo '</select>';\n\n\t\techo (isset($this->field['desc']) && !empty($this->field['desc']))?' <span class=\"description\">'.$this->field['desc'].'</span>':'';\n\t}", "title": "" }, { "docid": "585828157125b9e077536ae26d03992b", "score": "0.5969253", "text": "public function render_before_options_form_submit() {\n\t\t\n\t\t//Init vars\n\t\t$output = NULL;\n\t\t\n\t\tob_start();\n\t\t//ADD YOUR CUSTOM HTML HERE\n\t\t?>\n\t\t\n\t\t<?php\n\t\t$output = ob_get_contents();\n\t\tob_end_clean();\n\t\t\n\t\techo $output;\n\t}", "title": "" }, { "docid": "930e6a3b6c86c1982b511330b5f40ee7", "score": "0.5961256", "text": "protected function output() {\n\t\t$this->select_framework = wponion_validate_select_framework( $this->settings );\n\n\t\t$this->html( '<div class=\"wponion-font-select-container\">' );\n\t\t$this->html( $this->sub_field( $this->font_select(), $this->value( 'font' ), $this->name() ) );\n\t\t$this->html( '</div>' );\n\n\t\tif ( false !== $this->option( 'variant' ) ) {\n\t\t\t$this->html( '<div class=\"wponion-font-select-container\">' );\n\t\t\t$this->html( $this->sub_field( $this->variant_select(), $this->value( 'variant' ), $this->name() ) );\n\t\t\t$this->html( '</div>' );\n\t\t}\n\n\t\treturn $this->before() . $this->html( true ) . $this->after();\n\t}", "title": "" }, { "docid": "9af546e80c6a7979500db44e077b3144", "score": "0.5957214", "text": "public function getSingleHTML($options = NULL){\n\n // if we are in a record view and the n-ref should be displayed as a link to it's reference\n $values = $this->getValue();\n $record_field = $this;\n\n if(!$values || !count($values)){\n return \"\";\n }\n\n $tpl = $this->buildTemplate($record_field, $values, $options);\n\n return $tpl->get();\n }", "title": "" }, { "docid": "6a7ad1e901d8b8739a8163daa147f6ca", "score": "0.5941745", "text": "private static function _clearfixOptions($options)\n {\n Html::addCssClass($options, 'clearfix');\n\n return $options;\n }", "title": "" }, { "docid": "1fb78a07cedf22bbb0480e452f5bbe89", "score": "0.5935989", "text": "function WriteSelect($current_value, $options, $always_show_current_value=false, $echo_output=false, $force_value=false) {\n\t$res = \"\";\n\t$all_options = array();\n\t$show_default = false;\n\t$selected_option = false;\n\tif(!is_array($current_value)){\n\t\t$current_value = \"\".$current_value; // String\n\t}\n\t// If $options is a string, make it into an array, which will only output that one option\n\t$options = ForceArray($options); // New $options array of 1 element\n\t// Loop through $options and output them\n\tforeach ($options as $value=>$text) {\n\t\t$attributes = \"\";\n\t\t// If a 2-dimensional array\n\t\t$two_dimensional = (is_array($text));\n\t\tif ($two_dimensional) {\n\t\t\t// Use the 1st Array key as the Option's value\n\t\t\t$text_values = array_keys($text);\n\t\t\t$value = $text_values[0];\n\t\t\t// Use the 1st Array value as the Option's text\n\t\t\t$text_texts = array_values($text);\n\t\t\t$text = $text_texts[0];\n\t\t\t// Optional attributes\n\t\t\tfor ($i=1; $i<count($text_texts); $i++){\n\t\t\t\t$temp_attr = $text_texts[$i];\n\t\t\t\tif(is_string($text_values[$i]) && $text_values[$i] != \"\"){ $temp_attr = $text_values[$i].\"='\".$text_texts[$i].\"'\"; }\n\t\t\t\tif($temp_attr != \"\"){\n\t\t\t\t\t$attributes .= \" \".$temp_attr;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Text\n\t\t$text = \"\".$text; // String\n\t\t// Option's value\n\t\tif(is_string($value) || $two_dimensional || $force_value){ // If we passed an Array Key, use it as the Option's value\n\t\t\t$value = \"\".$value; // String\n\t\t\t$attributes = \" value='$value'\".$attributes;\n\t\t} else { // Use the Option's text\n\t\t\t$value = \"\".$text; // String\n\t\t\t//$option_value = \"\";\n\t\t}\n\t\t// To later check if $current_value has been outputted\n\t\t$all_options[] = $value;\n\t\t// Put together the Option\n\t\tif ($value == \"\" && !$two_dimensional) { // If Array key or value is blank (if 2-dimensional, ignore and always show)\n\t\t\t$show_default = $text;\n\t\t} else { // Array value is not blank\n\t\t\t// Option selected or not (only 1st option with same value gets selected)\n\t\t\t//$selected = \"\";\n\t\t\tif( (!is_array($current_value) && !$selected_option && $current_value == $value) || (is_array($current_value) && in_array($value, $current_value)) ){\n\t\t\t\t$attributes .= \" SELECTED\";\n\t\t\t\t$selected_option = true;\n\t\t\t} elseif (Like($text,\"--%\")) {\n\t\t\t\t$attributes .= \" DISABLED style='background:#EEEEEE;'\";\n\t\t\t}\n\t\t\t$res .= \"<option$attributes>$text</option>\\n\";\n\t\t}\n\t}\n\t// Check if $current_value has been outputted\n\tif ($always_show_current_value && (!is_array($current_value) && $current_value != \"\" && !in_array($current_value, $all_options)) ) {\n\t\t$res = \"<option SELECTED>$current_value</option>\\n\".$res;\n\t}\n\tif($show_default !== false && $current_value === \"\"){ // If show default, Only if no $current_value\n\t\t\t$res = \"<option value=''>\".(($show_default==\"\") ? \"-Select-\" : $show_default).\"</option>\\n\".$res;\n\t}\n\t// Echo output, or return it\n\tif ($echo_output) {\n\t\techo $res;\n\t} else {\n\t\treturn $res;\n\t}\n}", "title": "" }, { "docid": "12f15304a8382fda3385ce99d3f6d563", "score": "0.5933255", "text": "public function showOptions() {\n\t\t\treturn \"\";\n\t\t}", "title": "" }, { "docid": "b2514a1f54f74ab2febd5149e285dd9b", "score": "0.5913074", "text": "protected function build_options_html( $position = '' ) {\n\t\t\t$options_html = '';\n\t\t\tif ( $this->is_valid_position( $position ) ) {\n\t\t\t\tif ( ! empty( $this->element_items[ $position ] ) ) {\n\t\t\t\t\tforeach ( $this->element_items[ $position ] as $post ) {\n\t\t\t\t\t\t$disabled_class = '';\n\t\t\t\t\t\t$disabled_state = '';\n\n\t\t\t\t\t\t$item_title = learndash_format_step_post_title_with_status_label( $post );\n\n\t\t\t\t\t\t/** This filter is documented in includes/admin/classes-binary-selectors/class-learndash-admin-binary-selector-users.php */\n\t\t\t\t\t\t$item_title = apply_filters( 'learndash_binary_selector_item', $item_title, $post, $position, $this->selector_class );\n\n\t\t\t\t\t\tif ( ( is_array( $this->args['selected_ids'] ) ) && ( ! empty( $this->args['selected_ids'] ) ) ) {\n\t\t\t\t\t\t\tif ( in_array( absint( $post->ID ), $this->args['selected_ids'], true ) ) {\n\t\t\t\t\t\t\t\t$disabled_class = 'learndash-binary-selector-item-disabled';\n\t\t\t\t\t\t\t\tif ( 'left' == $position ) {\n\t\t\t\t\t\t\t\t\t$disabled_state = ' disabled=\"disabled\" ';\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\n\t\t\t\t\t\t$options_html .= '<option class=\"learndash-binary-selector-item ' . $disabled_class . '\" ' . $disabled_state . ' value=\"' . $post->ID . '\" data-value=\"' . $post->ID . '\">' . wp_strip_all_tags( $item_title ) . '</option>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $options_html;\n\t\t}", "title": "" }, { "docid": "ba7b6d293967a1740ee05aae519fdf0e", "score": "0.59107625", "text": "protected function _echo_html_content ($obj, $options)\n {\n $url = $this->subscription_settings_url (); \n echo (\"<p class=\\\"notes\\\">This email was generated automatically. <a href=\\\"{$url}\\\">Check your subscription settings</a>.</p>\");\n }", "title": "" }, { "docid": "c289b1494e1c2095b88623af53a71e84", "score": "0.58861804", "text": "private static function _bodyOptions($options)\n {\n Html::addCssClass($options, 'kt-quick-panel--right kt-demo-panel--right kt-offcanvas-panel--right kt-header-mobile--fixed kt-subheader--enabled kt-subheader--transparent kt-aside--enabled kt-page--loading');\n\n // if (Engine::LAYOUT_BOXED === Engine::getComponent()->layoutOption)\n // {\n // Html::addCssClass($options, 'page-boxed');\n // }\n\n if (Engine::HEADER_FIXED === Engine::getComponent()->headerOption)\n {\n Html::addCssClass($options, 'kt-header--fixed');\n }\n\n // if (Engine::SIDEBAR_POSITION_RIGHT === Engine::getComponent()->sidebarPosition)\n // {\n // Html::addCssClass($options, 'page-sidebar-reversed');\n // }\n\n if (Engine::SIDEBAR_FIXED === Engine::getComponent()->sidebarOption)\n {\n Html::addCssClass($options, 'kt-aside--fixed');\n }\n\n // if (Engine::FOOTER_FIXED === Engine::getComponent()->footerOption)\n // {\n // Html::addCssClass($options, 'page-footer-fixed');\n // }\n\n return $options;\n }", "title": "" }, { "docid": "91714a7222fc733d83be997b7d894854", "score": "0.5885746", "text": "private function _title_wrapper_options($options){\n if(isset($options['css']) && isset($options['header_tag'])){\n the_title('<'.$options['header_tag'].' \n class=\"'.$options['css'].'\">','</'.$options['header_tag'].'>');\n }elseif(isset($options['css'])){\n the_title('<div class=\"'.$options['css'].'\">','</div>');\n }else{\n the_title();\n } \n }", "title": "" }, { "docid": "b4cf2630b5702c7e2ed12777f1fdf848", "score": "0.588527", "text": "protected function _optionToHtml($element, $option, $selected)\r\n { \r\n $html = '<div class=\"left a-center hybrid-buttons\">';\r\n\t $html .= '<div class=\"thumb\"></div>';\r\n if (is_array($option)) {\r\n $html.= '<label class=\"inline\" for=\"'.$element->getHtmlId().$option['value'].'\"><i class=\"fa '.$option['label'].'\"></i></label>';\r\n }\r\n elseif ($option instanceof Varien_Object) {\r\n $html.= '<label class=\"inline\" for=\"'.$element->getHtmlId().$option->getValue().'\"><i class=\"fa '.$option->getLabel().'\"></i></label>';\r\n }\r\n\t $html .= '<input type=\"radio\"'.$element->serialize(array('name', 'class', 'style'));\r\n if (is_array($option)) {\r\n $html.= 'value=\"'.htmlspecialchars($option['value'], ENT_COMPAT).'\" id=\"'.$element->getHtmlId().$option['value'].'\"';\r\n if ($option['value'] == $selected) {\r\n $html.= ' checked=\"checked\"';\r\n }\r\n $html.= ' />';\r\n }\r\n elseif ($option instanceof Varien_Object) {\r\n $html.= 'id=\"'.$element->getHtmlId().$option->getValue().'\"'.$option->serialize(array('label', 'title', 'value', 'class', 'style'));\r\n if (in_array($option->getValue(), $selected)) {\r\n $html.= ' checked=\"checked\"';\r\n }\r\n $html.= ' />';\r\n }\r\n $html.= '</div>';\r\n $html.= $element->getSeparator() . \"\\n\";\r\n return $html;\r\n }", "title": "" }, { "docid": "0226e0125f4358635824be07f9cc42e9", "score": "0.5877672", "text": "function ap_products_do_options() {\n\t$options_before = '<table class=\"form-table\">';\n\t$options_after = '</table>';\n\n\techo $options_before;\n\tproducts_merchant_option_display();\n\tproducts_HTML_URI_option_display();\n\tproducts_members_option_display();\n\tproducts_cross_sales_option_display();\n\tproducts_inquire_link_display();\n\tproducts_add_to_cart_button_display();\n\tproducts_shop_testimonials_option_display();\n\tproducts_product_testimonials_option_display();\n\techo $options_after;\n}", "title": "" }, { "docid": "13bdeebeec6e9afc959ee5811dd4b520", "score": "0.5862264", "text": "public function toHtml() {\n\t\tif($this->values) {\n\t\t\tforeach ($this->options as $option) {\n\t\t\t\tif(array_search($option->getValue(), $this->values)) {\n\t\t\t\t\t$option->setSelected('selected');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->select->setChildren($this->options);\n\t\tif ($this->label->getFor() === null) {\n\t\t\t$id = $this->select->getId();\n\t\t\tif ($id === null) {\n\t\t\t\t$id = \"mouf_html_widgets_selectmultiplefield_\".self::$LASTID;\n\t\t\t\t$this->select->setId($id);\n\t\t\t\t$this->label->setFor($id);\n\t\t\t\tself::$LASTID++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->toHtmlParent();\n\t}", "title": "" }, { "docid": "42128bb964e702fbb863f65bdd260549", "score": "0.5855651", "text": "private function getOptionHtml($optionValue)\n {\n $value = $this->unserializeValue($optionValue);\n try {\n $sizes = $this->prepareSize($value);\n\n $urlRoute = !empty($value['url']['route']) ? $value['url']['route'] : '';\n $urlParams = !empty($value['url']['params']) ? $value['url']['params'] : [];\n $title = !empty($value['title']) ? $value['title'] : '';\n\n return sprintf(\n '<a href=\"%s\" target=\"_blank\">%s</a> %s',\n $this->_getOptionDownloadUrl($urlRoute, $urlParams),\n $this->escaper->escapeHtml($title),\n $sizes\n );\n } catch (\\Exception $e) {\n throw new LocalizedException(__('The file options format is not valid.'));\n }\n }", "title": "" }, { "docid": "f88944a05c4770e78bb64381182327d5", "score": "0.584561", "text": "public function rendering_options ()\n {\n $class_name = $this->app->final_class_name ('MAIL_OBJECT_RENDERER_OPTIONS', 'webcore/mail/mail_object_renderer.php');\n $Result = new $class_name ();\n if (! $Result->ignore_subscriber_preferred_text_length)\n {\n $Result->preferred_text_length = $this->subscriber->preferred_text_length;\n }\n $Result->num_items = $this->num_items;\n $Result->content_summary = $this->_subject->as_text ();\n return $Result;\n }", "title": "" }, { "docid": "aae4c1dbd43776e386d89d98ea32e9b0", "score": "0.58418584", "text": "function _display_options_section() {\r\n\t}", "title": "" }, { "docid": "c6d45168136527f260b1df13dfa9f741", "score": "0.58346725", "text": "private function edit_options()\n\t\t{ \n\t\t}", "title": "" }, { "docid": "48383076c7652b43e3924a5ab2d91610", "score": "0.58095914", "text": "public abstract function convert($html, $options = []);", "title": "" }, { "docid": "ce61faeb2f7c1c0d8c99ffe94ec29b2d", "score": "0.580906", "text": "function plugin($options, $selected = array(), $attr = null,\n\t\t$labelIsValue = false)\n\t{\n\t\t$html = '';\n\t\t\n\t\t// force $selected to be an array. this allows multi-selects to\n\t\t// have multiple selected options.\n\t\tsettype($selected, 'array');\n\t\tsettype($options, 'array');\n\t\t\n\t\t// loop through the options array\n\t\tforeach ($options as $value => $label) {\n\t\t\t\n\t\t\t// is the label being used as the value?\n\t\t\tif ($labelIsValue) {\n\t\t\t\t$value = $label;\n\t\t\t}\n\t\t\t\n\t\t\t// set the value and label in the tag\n\t\t\t$html .= '<option value=\"' . htmlspecialchars($value) . '\"';\n\t\t\t$html .= ' label=\"' . htmlspecialchars($label) . '\"';\n\t\t\t\n\t\t\t// is the option one of the selected values?\n\t\t\tif (in_array($value, $selected)) {\n\t\t\t\t$html .= ' selected=\"selected\"';\n\t\t\t}\n\t\t\t\n\t\t\t// are we adding extra attributes?\n\t\t\tif (is_array($attr)) {\n\t\t\t\t// yes, from an array\n\t\t\t\tforeach ($attr as $key => $val) {\n\t\t\t\t\t$val = htmlspecialchars($val);\n\t\t\t\t\t$html .= \" $key=\\\"$val\\\"\";\n\t\t\t\t}\n\t\t\t} elseif (! is_null($attr)) {\n\t\t\t\t// yes, from a string\n\t\t\t\t$html .= ' ' . $attr;\n\t\t\t}\n\t\t\t\n\t\t\t// add the label and close the tag\n\t\t\t$html .= '>' . htmlspecialchars($label) . \"</option>\\n\";\n\t\t}\n\t\t\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "d5995d3012d094a58f8b9e93366373ab", "score": "0.58031183", "text": "public function renderOptions(array $options, array $selectedOptions = [])\n {\n $template = '<option %s>%s</option>';\n $optionStrings = [];\n $escapeHtml = $this->getEscapeHtmlHelper();\n\n foreach ($options as $key => $optionSpec) {\n $value = '';\n $label = '';\n $selected = false;\n $disabled = false;\n\n if (is_scalar($optionSpec)) {\n $optionSpec = [\n 'label' => $optionSpec,\n 'value' => $key\n ];\n }\n\n if (isset($optionSpec['options']) && is_array($optionSpec['options'])) {\n $optionStrings[] = $this->renderOptgroup($optionSpec, $selectedOptions);\n continue;\n }\n\n if (isset($optionSpec['value'])) {\n $value = $optionSpec['value'];\n }\n if (isset($optionSpec['label'])) {\n $label = $optionSpec['label'];\n }\n if (isset($optionSpec['selected'])) {\n $selected = $optionSpec['selected'];\n }\n if (isset($optionSpec['disabled'])) {\n $disabled = $optionSpec['disabled'];\n }\n\n if (ArrayUtils::inArray($value, $selectedOptions)) {\n $selected = true;\n }\n\n if (null !== ($translator = $this->getTranslator())) {\n $label = $translator->translate(\n $label,\n $this->getTranslatorTextDomain()\n );\n }\n\n $attributes = compact('value', 'selected', 'disabled');\n\n if (isset($optionSpec['attributes']) && is_array($optionSpec['attributes'])) {\n $attributes = array_merge($attributes, $optionSpec['attributes']);\n }\n\n $this->validTagAttributes = $this->validOptionAttributes;\n $optionStrings[] = sprintf(\n $template,\n $this->createAttributesString($attributes),\n $escapeHtml($label)\n );\n }\n\n return implode(\"\\n\", $optionStrings);\n }", "title": "" }, { "docid": "8101cb5685c34b6d3e0c5eda1b67590e", "score": "0.57922786", "text": "public function displayOptions()\n {\n return '';\n $data = $_POST;\n $listing = geoListing::getListing($data['listing']);\n $urlToListing = geoFilter::getBaseHref() . DataAccess::getInstance()->get_site_setting('classifieds_file_name') . '?a=2&b=' . $listing->id;\n\n $tpl = new geoTemplate('addon', 'sharing');\n $tpl->assign('listing_url', urlencode($urlToListing));\n $tpl->assign('title', $listing->title); //already urlencoded in the database, and needs to stay that way\n $tpl->assign('description', urlencode(strip_tags(geoString::fromDB($listing->description))));\n $tpl->assign('msgs', geoAddon::getText('geo_addons', 'sharing'));\n $html = $tpl->fetch('methods/digg_options.tpl');\n return $html;\n }", "title": "" }, { "docid": "ee876f96c22ad1647453b2fa430df9bd", "score": "0.57837415", "text": "function wp_review_get_options_export_code() {\n\t$options = get_option( 'wp_review_options', array() );\n\treturn wp_json_encode( $options );\n}", "title": "" }, { "docid": "cdfc2e9c1ed32d89855bd8346b137946", "score": "0.5772169", "text": "public function getHtml() {\r\n return \"<option \" . $this->toHtml($this->attributes) . \">\" . $this->name . \"</option>\";\r\n }", "title": "" }, { "docid": "a8794e70332bda3307a6445447a8e8ee", "score": "0.57700884", "text": "public function View($options = ''){\n if ($this->Get('display') <= 0)\n return;\n\n // Overwrite the options for this field if desired\n if(is_array($options))\n $this->Set('options', $options);\n\n // Get the localised options\n $options = $this->Get('options');\n\n // Display the individual item\n $output = '<tr>';\n $output .= '<th scope=\"row\">' . $this->Label(':') . '</th>';\n $output .= '<td>' . (($options[$this->Get('value')] != '')?$options[$this->Get('value')]:$this->Output($this->Get('value'))) . '</td>';\n $output .= '</tr>';\n\n echo $output;\n }", "title": "" }, { "docid": "c690466757d4e93072f32e8176f2f7e2", "score": "0.5769813", "text": "public function __toString() {\n\t\t$options = array();\n\t\tforeach ( $this->options as $key => $value ) {\n\t\t\tif ( $value != Values::NONE ) {\n\t\t\t\t$options[] = \"$key=$value\";\n\t\t\t}\n\t\t}\n\n\t\treturn '[Twilio.Verify.V1.CreateVerificationOptions ' . implode( ' ', $options ) . ']';\n\t}", "title": "" }, { "docid": "eab36446b9610618a4bb736e328aa6f3", "score": "0.57668334", "text": "public function doRender(){\r\n\t\t$label = ($this->label != '') ? Label::get($this)->doRender() : '';\r\n\r\n\t\t$index = 0;\r\n\t\t$options = '';\r\n\t\tforeach( $this->options as $value => $text ){\r\n\t\t\t$index++;\r\n\t\t\t$checkId = $this->masterForm->getId().'_checkbox_'.$this->name.'_'.$value;\r\n\t\t\t$options .=\r\n\t\t\t\t'<input'\r\n\t\t\t\t\t.' type=\"checkbox\"'\r\n\t\t\t\t\t.' id=\"'.$checkId.'\"'\r\n\t\t\t\t\t.$this->printNameArray()\r\n\t\t\t\t\t.' value=\"'.HtmlFormTools::auto_htmlspecialchars($value, $this->needsUtf8Safety()).'\"'\r\n\t\t\t\t\t.($this->isSelectedOption($index, $value) ? ' checked=\"checked\"' : '')\r\n\t\t\t\t\t.((count($this->optionCssClasses) > 0) ? ' class=\"'.$this->optionCssClasses[(($index - 1) % count($this->optionCssClasses))].'\"' : $this->printCssClasses())\r\n\t\t\t\t\t.(((count($this->optionTitles) > 0) && !empty($this->optionTitles[(($index - 1) % count($this->optionTitles))])) ? ' title=\"'.$this->optionTitles[(($index - 1) % count($this->optionTitles))].'\"' : '')\r\n\t\t\t\t\t.$this->printTabIndex()\r\n\t\t\t\t\t.($this->isDisabledOption($index, $value) ? ' disabled=\"disabled\"' : $this->printDisabled())\r\n\t\t\t\t\t.$this->masterForm->printSlash()\r\n\t\t\t\t.'>'\r\n\t\t\t\t.'&nbsp;'.Label::getInline($text, $checkId)->doRender()\r\n\t\t\t\t.((($index % $this->width) == 0) ? '<br'.$this->masterForm->printSlash().'>' : '&nbsp;&nbsp;&nbsp;')\r\n\t\t\t;\r\n\t\t}\r\n\r\n\t\t$printJavascriptValidationCode = $this->printJavascriptValidationCode();\r\n\r\n\t\treturn\r\n\t\t\t'<div class=\"'.$this->printWrapperClasses().'\">'\r\n\t\t\t\t.$label\r\n\t\t\t\t.'<div class=\"'.parent::WIDGETCLASS.(!empty($printJavascriptValidationCode) ? ' '.parent::JSENABLEDCLASS : '').'\"'.$this->printJavascriptEventHandler().'>'\r\n\t\t\t\t\t.$options\r\n\t\t\t\t.'</div>'\r\n\t\t\t\t.$this->masterForm->printFloatBreak()\r\n\t\t\t.'</div>'\r\n\t\t\t.$printJavascriptValidationCode\r\n\t\t;\r\n\t}", "title": "" }, { "docid": "0ba87b28d572eafcc0b29062e16ae5d5", "score": "0.57634467", "text": "protected function getLanguageOptionsHTML ($lang_options, $lang)\n\t{\n\n\t\t$html = <<<ENDOFTEXT\n\t<tr>\n\t\t<td class=\"left\">{$lang['language']}</td>\n\t\t<td class=\"center\">\nENDOFTEXT;\n\n\t$html .= $this->makeOptions($lang_options, \"language\");\n\n\t$html .= <<<ENDOFTEXT\n\t\t</td>\n\t\t<td class=\"right\">\n\t\t{$lang['what_lang']}\n\t\t</td>\n\t</tr>\t\nENDOFTEXT;\n\n\treturn $html;\n\t\t}", "title": "" }, { "docid": "faef7f5bf0fe2a8fd8340a7bd74b6026", "score": "0.57632524", "text": "protected function maybe_convert_old_integration_options( $options ) {\n\n\t\t$default = array(\n\t\t\t'title' => 'title',\n\t\t\t'name' => 'name',\n\t\t);\n\n\t\tforeach( $options as $field ) {\n\n\t\t\t$field = wp_parse_args( $field, $default );\n\n\t\t\tif ( ! empty( $field['type'] ) && 'tab' == $field['type'] ) {\n\n\t\t\t\t$old_section_slug = $section_slug = '';\n\t\t\t\t$fields = array();\n\n\t\t\t\t$tab_slug = sanitize_title( $field['tabname'] );\n\n\t\t\t\t$this->tabs->add( $tab_slug, $field['tabname'] );\n\n\t\t\t} elseif ( ! empty( $field['type'] ) && 'title' == $field['type'] ) {\n\n\t\t\t\t$section_slug = sanitize_title( $field['name'] );\n\t\t\t\t$section = $field['name'];\n\n\t\t\t} elseif ( ! empty( $field['type'] ) && 'logo' == $field['type'] ) {\n\t\t\t\t$logo = $field['name'];\n\n\t\t\t\t$this->tab_sections[ $tab_slug ]['logo'] = array(\n\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => \"<div class='integration-logo {$tab_slug}'>{$logo}</div>\",\n\t\t\t\t\t\t\t'name' => '_blank',\n\t\t\t\t\t\t\t'type' => 'custom',\n\t\t\t\t\t\t\t'render' => array( $this, 'do_nothing' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t);\n\n\t\t\t} else {\n\n\t\t\t\t// add the collected fields to the current tab on each new section\n\t\t\t\tif ( ( $old_section_slug && $old_section_slug != $section_slug ) || ( ! empty( $field['type'] ) && 'tabend' == $field['type'] ) ) {\n\n\t\t\t\t\t$this->tab_sections[ $tab_slug ][ $old_section_slug ] = array(\n\t\t\t\t\t\t'title' => $old_section,\n\t\t\t\t\t\t'fields' => $fields,\n\t\t\t\t\t);\n\n\t\t\t\t\t$fields = array();\n\t\t\t\t}\n\n\t\t\t\t// some plugins old options use the 'html' attribute to ouput content\n\t\t\t\tif ( ! empty( $field['html'] ) ) {\n\n\t\t\t\t\tob_start();\n\t\t\t\t\techo $field['html'];\n\t\t\t\t\t$this->legacy_html_output = ob_get_clean();\n\n\t\t\t\t\t$field = array(\n\t\t\t\t\t\t'title' => '',\n\t\t\t\t\t\t'name'\t => '_blank',\n\t\t\t\t\t\t'type' => 'custom',\n\t\t\t\t\t\t'render' => array( $this, 'html_output' ),\n\t\t\t\t\t);\n\n\t\t\t\t// map any old attributes to the new ones\n\t\t\t\t} elseif ( ! empty( $field['id'] ) ) {\n\n\t\t\t\t\tif ( ! empty( $field['name'] ) ) {\n\t\t\t\t\t\t$field['title'] = $field['name'];\n\t\t\t\t\t}\n\t\t\t\t\t$field['name'] = $field['id'];\n\n\t\t\t\t\tif ( ! empty( $field['desc'] ) ) {\n\t\t\t\t\t\t$field['desc'] = $field['desc'];\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! empty( $field['options'] ) ) {\n\t\t\t\t\t\t$field['values'] = $field['options'];\n\t\t\t\t\t\tunset( $field['options'] );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( empty( $field['css'] ) ) {\n\n\t\t\t\t\t\tif ( 'select' == $field['type'] ) {\n\t\t\t\t\t\t\t$field['css'] = 'min-width: 50px;';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$field['css'] = 'width: 50px;';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif ( false !== strpos( $field['name'], 'publisher_id' ) ) {\n\t\t\t\t\t\t$field['css'] = 'min-width: 300px;';\n\t\t\t\t\t}\n\t\t\t\t\t$field['extra'] = array( 'style' => $field['css'] );\n\n\t\t\t\t\tif ( 'text' == $field['type'] ) {\n\n\t\t\t\t\t\tif ( FALSE !== strpos( $field['extra']['style'], 'min-width' ) ) {\n\t\t\t\t\t\t\t$field['extra']['class'] = 'regular-text';\n\t\t\t\t\t\t} elseif ( FALSE !== strpos( $field['extra']['style'], 'max-width' ) || FALSE !== strpos( $field['extra']['style'], 'width' ) ) {\n\t\t\t\t\t\t\t$field['extra']['class'] = 'small-text';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$field['extra']['style'] = '';\n\n\t\t\t\t\t} elseif ( 'textarea' == $field['type'] ) {\n\t\t\t\t\t\t$field['extra'] = array(\n\t\t\t\t\t\t\t'rows' => 10,\n\t\t\t\t\t\t\t'cols' => 50,\n\t\t\t\t\t\t\t'class' => 'large-text'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tunset( $field['id'] );\n\n\t\t\t\t\t$fields[] = $field;\n\t\t\t\t}\n\n\t\t\t\t$old_section_slug = $section_slug;\n\t\t\t\t$old_section = $section;\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "db977fb3e8a80fc167edd4e761ea5466", "score": "0.5762388", "text": "public function toHtml($options = []) {\n\t\t$parameters = $this->parameters;\n\n\t\t$style = [];\n\t\t$style[] = \"max-width: 100%;\";\n\t\tif (empty($options['no-dimensions'])) {\n\t\t\t$parameters['width'] = $this->getWidth();\n\t\t\t$style[] = \"width: {$this->getWidth()}px;\";\n\t\t}\n\n\t\tif (!empty($options['valign'])) {\n\t\t\t$style[] = \"vertical-align: {$options['valign']};\";\n\t\t}\n\n\t\tif (!empty($options['img-class'])) {\n\t\t\t$class = $options['img-class'];\n\t\t}\n\n\t\tif (!isset($parameters['start'])) {\n\t\t\t$parameters['start'] = null;\n\t\t}\n\t\tif (!isset($parameters['end'])) {\n\t\t\t$parameters['end'] = null;\n\t\t}\n\n\t\t$inOut = false;\n\t\tif ($parameters['start'] !== $parameters['end']) {\n\t\t\tif (isset($parameters['start']) && $parameters['start'] !== false) {\n\t\t\t\t$inOut[] = $parameters['start'];\n\t\t\t}\n\n\t\t\tif (isset($parameters['end']) && $parameters['end'] !== false) {\n\t\t\t\t$inOut[] = $parameters['end'];\n\t\t\t}\n\t\t}\n\n\t\t$html = \"<audio src='{$this->url}\" . ($inOut !== false ? '#t=' . implode(',', $inOut) : '') . \"' width='{$this->getWidth()}'\" . (!empty($class) ? \" class='{$class}'\" : \"\") . (!empty($style) ? \" style='\" . implode(\" \", $style) . \"'\" : \"\") . \" controls><a href='{$parameters['descriptionUrl']}'>{$parameters['descriptionUrl']}</a></audio>\";\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "39bea7f50e8f68c6f44b1a44d52eac3e", "score": "0.5759584", "text": "public function getFormattedOptions() {\n $options = [\n 'element' => $this->element,\n 'className' => $this->class_name,\n 'exclude' => $this->getFormattedList('exclude'),\n 'accuracy' => $this->accuracy,\n 'wildcard' => $this->wildcard,\n 'diacritics' => $this->diacritics,\n 'synonyms' => $this->synonyms,\n 'iframes' => $this->iframes,\n 'iframesTimeout' => $this->iframes_timeout,\n 'caseSensitive' => $this->case_sensitive,\n 'acrossElements' => $this->across_elements,\n 'ignoreJoiners' => $this->ignore_joiners,\n 'ignorePunctuation' => $this->getFormattedList('ignore_punctuation'),\n 'debug' => $this->debug,\n 'log' => $this->log\n ] + $this->getFormattedCallbacks();\n\n return array_filter($options);\n }", "title": "" }, { "docid": "47690c8c8c6702725f622f5e8130ea9e", "score": "0.57509166", "text": "public function general_options_callback() {\n\t\t// echo '<p>' . esc_html__( '', 'schema-markup-insertion' ) . '</p>';\n }", "title": "" }, { "docid": "82b1fbf4daa31336d815055800dbc012", "score": "0.57479596", "text": "function optionsframework_options() {\n\n $options = array();\n $options[] = array(\n 'name' => __('Header Options', 'options_check'),\n 'type' => 'heading');\n $options[] = array(\n 'name' => __('Facebook Link', 'options_check'),\n 'desc' => __('Paste your Facebook URL here.', 'options_check'),\n 'id' => 'facebook_link',\n 'std' => 'https://www.facebook.com/',\n 'type' => 'text');\n $options[] = array(\n 'name' => __('SoundCloud Link', 'options_check'),\n 'desc' => __('Paste your SoundCloud URL here.', 'options_check'),\n 'id' => 'soundcloud_link',\n 'std' => 'https://www.soundcloud.com/',\n 'type' => 'text');\n $options[] = array(\n 'name' => __('Twitter Link', 'options_check'),\n 'desc' => __('Paste your Twitter URL here.', 'options_check'),\n 'id' => 'twitter_link',\n 'std' => 'https://www.twitter.com/',\n 'type' => 'text');\n $options[] = array(\n 'name' => __('YouTube Link', 'options_check'),\n 'desc' => __('Paste your YouTUbe URL here.', 'options_check'),\n 'id' => 'youtube_link',\n 'std' => 'https://www.youtube.com/',\n 'type' => 'text');\n\n return $options;\n}", "title": "" }, { "docid": "fd53c379e85a55e5d603b9a258059ea6", "score": "0.5747129", "text": "public function RenderOptions($id = 'Options')\n {\n $this->setOptionsPath();\n\n //render the column first so you can set the headline pla\n $column = $this->renderBody();\n $headline = $this->renderHeadline();\n\n return $headline . $column;\n }", "title": "" }, { "docid": "b16523d55368abfac492bce7cde3be4c", "score": "0.57456493", "text": "protected function render($options)\n\t{\n\t\t$this->set_performance_action('do_render', array($options));\n\t}", "title": "" }, { "docid": "b02cf2eb01527fffe7604e810dd92f04", "score": "0.5731917", "text": "public function getOptions()\n {\n $content = '';\n foreach($this->options as $k=>$v) {\n $content .= '<label class=\"radio\"><input type=\"radio\" name=\"'.$this->getName().'\" value=\"'.$k.'\" '.(($this->value==$k)?'checked=\"checked\"':'').' data-toggle=\"radio\" /> ' . $v . '</label>' . PHP_EOL;\n }\n return $content;\n }", "title": "" }, { "docid": "c3bea76802d1c8cb78050d1690d2cde4", "score": "0.57289195", "text": "protected function settingsHtml(): string\n {\n return Craft::$app->view->renderTemplate(\n 'print-plugin/settings',\n [\n 'settings' => $this->getSettings()\n ]\n );\n }", "title": "" }, { "docid": "85ef5b195f5e8c9d783073dfc16bfd08", "score": "0.5728075", "text": "protected function format($options)\n {\n $default = config('tts.output_format', 'mp3');\n\n return Arr::get($options, 'format', $default);\n }", "title": "" }, { "docid": "3a78b4e95ffe9eb70eeafadb4a802845", "score": "0.5727661", "text": "public function themeoptions() {\n\t\tinclude \"design/theme/{$this->theme}/options.php\";\n\t\t$dynamic_form = \"\";\n\t\t\n\t\t$dynamic_form .= \"<form action='' method='post' id='update-site'>\";\n\t\tforeach($options as $option=>$value){\n\t\t\tif(!empty($value['label'])){\n\t\t\t\t$dynamic_form .= \"<label for='{$option}'>{$value['label']}</label>\";\n\t\t\t}else{\n\t\t\t\t$label_text = str_replace(\"_\", \" \", $option);\n\t\t\t\t$label_text = strtolower($label_text);\n\t\t\t\t$label_text = explode(\" \", $label_text);\n\t\t\t\t$label = \"\";\n\t\t\t\tforeach($label_text as $text){\n\t\t\t\t\t$label .= ucfirst($text) . \" \";\n\t\t\t\t}\n\t\t\t\t$dynamic_form .= \"<label for='{$option}'>{$label}</label>\";\n\t\t\t}\n\t\t\tswitch($value['type']){\n\t\t\t\tcase 'text':\n\t\t\t\t\t$dynamic_form .= \"<input type='{$value['type']}' name='{$option}'><br>\";\n\t\t\t\tbreak;\n\t\t\t\tcase 'textarea':\n\t\t\t\t\t$dynamic_form .= \"<textarea name='{$option}'></textarea><br>\";\n\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\t$dynamic_form .= \"<select name='{$option}'>\";\n\t\t\t\t\tforeach($value['options'] as $val=>$name){\n\t\t\t\t\t\t$dynamic_form .= \"<option value='{$val}'>{$name}</option>\";\n\t\t\t\t\t}\n\t\t\t\t\t$dynamic_form .= \"</select><br>\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$dynamic_form .= \"</form>\";\n\t\t\n\t\treturn $dynamic_form;\n\t}", "title": "" }, { "docid": "bec97c9e952ccd3243bda21b4e255624", "score": "0.57264155", "text": "protected function _toHtml()\n {\n if (!Mage::getStoreConfigFlag('macopedia_trbo/general/enable')) {\n return '';\n }\n $html = $this->renderView();\n return $html;\n }", "title": "" }, { "docid": "743ce002288111c1fe35247efa138305", "score": "0.5719792", "text": "public function options_as_string()\n\t\t{\n\t\t\treturn Db_DbHelper::scalar(\"\n\t\t\t\tselect \n\t\t\t\t\tgroup_concat(\n\t\t\t\t\t\tconcat(shop_custom_attributes.name, ': ', shop_option_matrix_options.option_value)\n\t\t\t\t\tseparator ', ')\n\t\t\t\tfrom \n\t\t\t\t\tshop_custom_attributes, \n\t\t\t\t\tshop_option_matrix_options, \n\t\t\t\t\tshop_option_matrix_records\n\t\t\t\twhere \n\t\t\t\t\tshop_option_matrix_records.id=:id\n\t\t\t\t\tand shop_option_matrix_options.matrix_record_id=shop_option_matrix_records.id\n\t\t\t\t\tand shop_custom_attributes.id=shop_option_matrix_options.option_id\n\t\t\t\torder by\n\t\t\t\t\tshop_custom_attributes.sort_order\", array('id'=>$this->id));\n\t\t}", "title": "" }, { "docid": "7a3a82829301bd27ecbc7181ec46a8ec", "score": "0.5718569", "text": "public function displayOptions()\n {\n return '';\n }", "title": "" }, { "docid": "252270ad8f33595c86c3f0e7f8b7dcaf", "score": "0.5716527", "text": "abstract protected function options();", "title": "" }, { "docid": "37936f183bdebdc4ef6d396ee4306ac3", "score": "0.5708684", "text": "protected function _optionToHtml($element, $option, $selected)\n { \n $html = '<div class=\"ma2-radio\">';\n\t $html .= '<div class=\"ma2-thumb\"><img src=\"'.Mage::getDesign()->getSkinUrl('images/'.$option['value'].'.png').'\" /></div>';\n\t $html .= '<input type=\"radio\"'.$element->serialize(array('name', 'class', 'style'));\n if (is_array($option)) {\n $html.= 'value=\"'.htmlspecialchars($option['value'], ENT_COMPAT).'\" id=\"'.$element->getHtmlId().$value.'\"';\n if ($option['value'] == $selected) {\n $html.= ' checked=\"checked\"';\n }\n $html.= ' />';\n $html.= '<label class=\"inline\" for=\"'.$element->getHtmlId().$option['value'].'\">'.$option['label'].'</label>';\n }\n elseif ($option instanceof Varien_Object) {\n $html.= 'id=\"'.$element->getHtmlId().$option->getValue().'\"'.$option->serialize(array('label', 'title', 'value', 'class', 'style'));\n if (in_array($option->getValue(), $selected)) {\n $html.= ' checked=\"checked\"';\n }\n $html.= ' />';\n $html.= '<label class=\"inline\" for=\"'.$element->getHtmlId().$option->getValue().'\">'.$option->getLabel().'</label>';\n }\n $html.= '</div>';\n $html.= $element->getSeparator() . \"\\n\";\n return $html;\n }", "title": "" }, { "docid": "54786fb1392550281e110dc0f4c3b436", "score": "0.57051617", "text": "public function buildHtml() {\n $html = '';\n $html .= '<div id=\"contexts\" class=\"row-fluid\">';\n $html .= '<h4>Other formats</h4>';\n $html .= '<p>This page';\n $contexts = $this->getContexts();\n\n if ( is_array( $contexts ) && !empty( $contexts ) ) {\n $html .= ' is available in ';\n foreach ($contexts as $key => $value) {\n $url = $this->view->url(array(\n 'module' => $this->getModule(),\n 'controller' => $this->getController(),\n 'action' => $this->getAction(),\n 'format' => $value)\n ,null,false);\n $html .= '<a href=\"';\n $html .= $url;\n $html .= '\" title=\"Obtain data in ';\n $html .= $value;\n $html .= ' representation\" ';\n //Don't allow kml to be indexed\n if ($value === 'kml') {\n $html .= ' rel=\"nofollow\" ';\n }\n\n $html .= '>';\n $html .= $value;\n $html .= '</a> ';\n\n if (array_key_exists($value, $this->_response)) {\n $this->view->headLink()->appendAlternate(\n $this->view->serverUrl() . $url,\n $this->_response[$value],\n 'Alternate representation as ' . $value\n );\n }\n }\n\n \n } else {\n $html .= ' is not available in other';\n }\n $html .=' representations.</p></div>';\n return $html;\n }", "title": "" }, { "docid": "c30367625073c65f124aff681c95d3f5", "score": "0.5699198", "text": "private function formatHtml()\n {\n $this->description = json_encode($this->description);\n $this->description = str_ireplace(\n ['{{START_SPAN', '{{END_SPAN}}', '}}'],\n ['<span', '</span>', '>'],\n $this->description\n );\n }", "title": "" }, { "docid": "2aa088e0b0cfaa42fc6ed14628e8fa8b", "score": "0.5692555", "text": "private function email_types_select_html() {\n\n\t\t$options = [\n\t\t\t'delivered' => esc_html__( 'Confirmed Emails', 'wp-mail-smtp' ),\n\t\t\t'sent' => esc_html__( 'Unconfirmed Emails', 'wp-mail-smtp' ),\n\t\t\t'unsent' => esc_html__( 'Failed Emails', 'wp-mail-smtp' ),\n\t\t];\n\n\t\tif ( $this->mailer_without_send_confirmation() ) {\n\t\t\tunset( $options['sent'] );\n\t\t\t$options['delivered'] = esc_html__( 'Sent Emails', 'wp-mail-smtp' );\n\t\t}\n\n\t\t?>\n\t\t<select id=\"wp-mail-smtp-dash-widget-email-type\" class=\"wp-mail-smtp-dash-widget-select-email-type\" title=\"<?php esc_attr_e( 'Select email type', 'wp-mail-smtp' ); ?>\">\n\t\t\t<option value=\"all\">\n\t\t\t\t<?php esc_html_e( 'All Emails', 'wp-mail-smtp' ); ?>\n\t\t\t</option>\n\t\t\t<?php foreach ( $options as $key => $title ) : ?>\n\t\t\t\t<option value=\"<?php echo sanitize_key( $key ); ?>\" disabled>\n\t\t\t\t\t<?php echo esc_html( $title ); ?>\n\t\t\t\t</option>\n\t\t\t<?php endforeach; ?>\n\t\t</select>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "8f63ea1c2b1ecd71c67392a7dbfe9ffa", "score": "0.56870943", "text": "function options_for_select($options = array(), $selected = '', $html_options = array())\n{\n $html_options = _parse_attributes($html_options);\n\n if (is_array($selected))\n {\n $selected = array_map('strval', array_values($selected));\n }\n\n $html = '';\n\n if ($value = _get_option($html_options, 'include_custom'))\n {\n $html .= content_tag('option', $value, array('value' => '')).\"\\n\";\n }\n else if (_get_option($html_options, 'include_blank'))\n {\n $html .= content_tag('option', '', array('value' => '')).\"\\n\";\n }\n\n foreach ($options as $key => $value)\n {\n if (is_array($value))\n {\n $html .= content_tag('optgroup', options_for_select($value, $selected, $html_options), array('label' => $key)).\"\\n\";\n }\n else\n {\n $option_options = array('value' => $key);\n\n if (\n (is_array($selected) && in_array(strval($key), $selected, true))\n ||\n (strval($key) == strval($selected))\n )\n {\n $option_options['selected'] = 'selected';\n }\n\n $html .= content_tag('option', $value, $option_options).\"\\n\";\n }\n }\n\n return $html;\n}", "title": "" }, { "docid": "80a31b294686f52ed3b0aec2c0726e2b", "score": "0.5680315", "text": "public function render() {\n $this->addClass('form-group form-group-sm', 'options');\n $this->addClass($this->layoutClass, 'options');\n $this->addClass($this->errorClass, 'options');\n\n $this->addClass('label-field-value', 'fieldOptions');\n\n if ($this->js == \"\") {\n $this->setDefaultOption('ng-model', \"model['{$this->originalName}']\", $this->options);\n }\n\n if (!is_string($this->value))\n $this->value = json_encode($this->value);\n\n return $this->renderInternal('template_render.php');\n }", "title": "" }, { "docid": "4a047218d23d70d5e636d6d21fc977cf", "score": "0.567563", "text": "function settings_html() {\n $thousands = FWP()->helper->get_setting( 'thousands_separator' );\n $decimal = FWP()->helper->get_setting( 'decimal_separator' );\n ?>\n <div class=\"facetwp-row\">\n <div>\n <?php _e( 'Prefix', 'fwp' ); ?>:\n <div class=\"facetwp-tooltip\">\n <span class=\"icon-question\">?</span>\n <div class=\"facetwp-tooltip-content\"><?php _e( 'Text that appears before each slider value', 'fwp' ); ?></div>\n </div>\n </div>\n <div><input type=\"text\" class=\"facet-prefix\"/></div>\n </div>\n <div class=\"facetwp-row\">\n <div>\n <?php _e( 'Suffix', 'fwp' ); ?>:\n <div class=\"facetwp-tooltip\">\n <span class=\"icon-question\">?</span>\n <div class=\"facetwp-tooltip-content\"><?php _e( 'Text that appears after each slider value', 'fwp' ); ?></div>\n </div>\n </div>\n <div><input type=\"text\" class=\"facet-suffix\"/></div>\n </div>\n <div class=\"facetwp-row\">\n <div>\n <?php _e( 'Format', 'fwp' ); ?>:\n <div class=\"facetwp-tooltip\">\n <span class=\"icon-question\">?</span>\n <div class=\"facetwp-tooltip-content\"><?php _e( 'The number format', 'fwp' ); ?></div>\n </div>\n </div>\n <div>\n <select class=\"facet-format\">\n <?php if ( '' != $thousands ) : ?>\n <option value=\"0,0\">5<?php echo $thousands; ?>280</option>\n <option value=\"0,0.0\">5<?php echo $thousands; ?>280<?php echo $decimal; ?>4</option>\n <option value=\"0,0.00\">5<?php echo $thousands; ?>280<?php echo $decimal; ?>42</option>\n <?php endif; ?>\n <option value=\"0\">5280</option>\n <option value=\"0.0\">5280<?php echo $decimal; ?>4</option>\n <option value=\"0.00\">5280<?php echo $decimal; ?>42</option>\n <option value=\"0a\">5k</option>\n <option value=\"0.0a\">5<?php echo $decimal; ?>3k</option>\n <option value=\"0.00a\">5<?php echo $decimal; ?>28k</option>\n </select>\n </div>\n </div>\n <div class=\"facetwp-row\">\n <div>\n <?php _e( 'Comparison method', 'fwp' ); ?>:\n <div class=\"facetwp-tooltip\">\n <span class=\"icon-question\">?</span>\n <div class=\"facetwp-tooltip-content\"><?php _e( 'The comparison method', 'fwp' ); ?></div>\n </div>\n </div>\n <div>\n <select class=\"facet-compare\">\n <option value=\"<\">Lower than</option>\n <option value=\"<=\">Lower than or equal to</option>\n <option value=\"=\">Equal to</option>\n <option value=\">=\">Greater than or equal to</option>\n <option value=\">\">Greater than</option>\n </select>\n </div>\n </div>\n <div class=\"facetwp-row\">\n <div>\n <?php _e( 'Step', 'fwp' ); ?>:\n <div class=\"facetwp-tooltip\">\n <span class=\"icon-question\">?</span>\n <div class=\"facetwp-tooltip-content\"><?php _e( 'The amount of increase between intervals', 'fwp' ); ?> (default = 1)</div>\n </div>\n </div>\n <div><input type=\"text\" class=\"facet-step\" value=\"1\"/></div>\n </div>\n\n <?php }", "title": "" }, { "docid": "ba8f367196e63960cfd82f3ae63f00b2", "score": "0.56744933", "text": "public function render() {\n\t\tif ( ! empty( $this->htmlContent ) ) {\n\t\t\techo $this->htmlContent;\n\n\t\t\treturn;\n\t\t}\n\t\t?>\n <form method=\"post\" action=\"options.php\">\n\n\t\t\t<?php wp_nonce_field( 'update-options' ); ?>\n\n <table class=\"form-table\">\n\t\t\t\t<?php foreach ( $this->fields as $field ): ?>\n <tr>\n <th scope=\"row\"><?php echo $field->getTitle(); ?></th>\n <td>\n\t\t\t\t\t\t\t<?php echo $field->render(); ?>\n </td>\n </tr>\n\t\t\t\t<?php endforeach; ?>\n </table>\n\n <input type=\"hidden\" name=\"action\" value=\"update\"/>\n\n <input type=\"hidden\" name=\"page_options\"\n value=\"<?php echo implode( ',', array_keys( $this->getAllOptions( true ) ) ); ?>\"/>\n\n\t\t\t<?php submit_button( __( 'Save Changes' ) ); ?>\n </form>\n\t\t<?php\n\t}", "title": "" }, { "docid": "28194910c3e99a260f2d890af2e27d92", "score": "0.56695807", "text": "private function options_to_url($options) {\n $options = $this->validate_options($options);\n if(array_key_exists('sort', $options)) {\n $options['sort'] = $this->validate_sort($options['sort']);\n }\n return '?' . http_build_query($options);\n }", "title": "" }, { "docid": "92af9c7520fb71431cacdc400b40f659", "score": "0.5663935", "text": "protected function settingsHtml(): string\n {\n $volumes = Craft::$app->getVolumes();\n $destinationOptions[] = array('label' => '---', 'value' => \"\");\n foreach ($volumes->getAllVolumes() as $source) {\n $destinationOptions[] = array('label' => $source->name, 'value' => $source->id);\n }\n return Craft::$app->view->renderTemplate(\n 'splashing-images/settings',\n [\n 'settings' => $this->getSettings(),\n 'volumes' => $destinationOptions\n ]\n );\n }", "title": "" }, { "docid": "7c0a08c84f4d16c95f5852918b3d9444", "score": "0.56632143", "text": "public function options($options, $selected = array()) \n\t{\n\t\t$options = (array) KConfig::unbox($options);\n\t\t$selected = (array) KConfig::unbox($selected);\n\t\t$tags\t\t = array();\t\n\t\t\n\t\tforeach($options as $value => $content) \n\t\t{\n\t\t\t\tif ( is_array($content) && count($content) == 2 ) \n\t\t\t\t{\n\t\t\t\t\t$value = $content[0];\n\t\t\t\t\t$content = $content[1];\n\t\t\t\t}\n\t\t\t\t\n if( $value === 0 )\n $value = null;\n \n\t\t\t\tif ( in_array($value, $selected) )\n { \n\t\t\t\t\t$tag = '<option selected value=\"'.$value.'\">'.$content.'</option>';\n }\n\t\t\t\telse\n { \n\t\t\t\t\t$tag = '<option value=\"'.$value.'\">'.$content.'</option>';\n }\n \t\n\t\t\t\t$tags[] = $tag;\n\t\t}\n\t\t\n\t\treturn implode(\"\\n\", $tags);\n\t}", "title": "" }, { "docid": "00a4dc3578fb3821541759e2c3e71647", "score": "0.56597275", "text": "public static function getTagAttributesAsString($options = array()) {\n\t\t\t$options = ArrayHelper::merge(array(\n\t\t\t\t'_defaultClass' => ''\n\t\t\t), $options);\n\n\t\t\tif (isset($options['class']) && is_string($options['class']) && $options['class'] !== '') {\n\t\t\t\t$options['class'] = explode(' ', $options['class']);\n\t\t\t}\n\t\t\tif ($options['_defaultClass'] !== '') {\n\t\t\t\tif(!isset($options['class'])) {\n\t\t\t\t\t$options['class'] = array();\n\t\t\t\t}\n\t\t\t\tarray_unshift($options['class'], $options['_defaultClass']);\n\t\t\t}\n\n\t\t\tforeach($options as $style => $styleValue) {\n\t\t\t\tif (strpos($style, '--') === 0) {\n\t\t\t\t\tif (!isset($options['style'])) {\n\t\t\t\t\t\t$options['style'] = array();\n\t\t\t\t\t}\n\t\t\t\t\t$options['style'][$style] = $styleValue;\n\t\t\t\t\t// IE11 won't allow raw reading of inline style; unknown properties (like every css variable) will be discarded\n\t\t\t\t\t// so to access them we have to copy them somewhere \"plain\" where no IE11 magic is happening\n\t\t\t\t\tif (isset($options['_copyStyleToDataStyle']) && $options['_copyStyleToDataStyle'] === true) {\n\t\t\t\t\t\tif (!isset($options['data-style'])) {\n\t\t\t\t\t\t\t$options['data-style'] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$options['data-style'][$style] = $styleValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$tagAttributesString = '';\n\t\t\tforeach($options as $tagAttribute => $tagAttributeValue) {\n\t\t\t\tif ($tagAttribute !== '' && strpos($tagAttribute, '_') !== 0 && strpos($tagAttribute, '--') !== 0) {\n\t\t\t\t\tif (is_array($tagAttributeValue)) {\n\t\t\t\t\t\t$newTagAttributeValue = '';\n\t\t\t\t\t\tforeach($tagAttributeValue as $key => $value) {\n\t\t\t\t\t\t\tif (is_string($key)) {\n\t\t\t\t\t\t\t\t$newTagAttributeValue .= $key . ': ' . $value . ';';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$newTagAttributeValue .= ' ' . $value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tagAttributeValue = $newTagAttributeValue;\n\t\t\t\t\t}\n\t\t\t\t\t$tagAttributesString .= ' ' . Text::camelCaseToCharSeparated($tagAttribute) . '=\"' . trim($tagAttributeValue) . '\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $tagAttributesString;\n\t\t}", "title": "" } ]
32bea17433af1de76de31d2553dccb99
Appends data to an item
[ { "docid": "1e943a5bd4012da94fbdb9cd50a726f3", "score": "0.5679836", "text": "public function appendData($name, array $data) {\n $this->data[$name] = array_merge($this->data[$name], $data);\n }", "title": "" } ]
[ { "docid": "1bd44ee82c24d5db33533f98e733ad78", "score": "0.7627473", "text": "public function append($item);", "title": "" }, { "docid": "a01e513d0270940ba2507032796aa090", "score": "0.71505165", "text": "function AddItem($item) {\r\n\t\t$this->ItemData[] = $item;\r\n\t}", "title": "" }, { "docid": "2ae5803724b23c8ddfd241a5aa95f96a", "score": "0.69789964", "text": "public function append($data) {}", "title": "" }, { "docid": "5155aa77740cbabdc890b39a057dc8de", "score": "0.6890372", "text": "public function addItem();", "title": "" }, { "docid": "72c290d409fb11135381b344cdf2bf96", "score": "0.6869831", "text": "public function addItem($item);", "title": "" }, { "docid": "85ab6dc5b0b40fb670826dff41088bc6", "score": "0.67203176", "text": "public function append($data);", "title": "" }, { "docid": "c68d0fd68356612b0c5f2793d1056670", "score": "0.66639674", "text": "public function append($items);", "title": "" }, { "docid": "b107e82958f02ce9075b93dff1fa0eb7", "score": "0.6653644", "text": "public function append(...$items): self;", "title": "" }, { "docid": "78128c97e80f679637ad8b4a3305bdd4", "score": "0.66039366", "text": "public function addItem(Item $item);", "title": "" }, { "docid": "94603f10d592d82feab65df7a43d937a", "score": "0.65981895", "text": "public function add($item)\n {\n $this->manuallyAddedData[] = $item;\n }", "title": "" }, { "docid": "0123757aa6cb310c2e3bccdbbcf6beb8", "score": "0.6515924", "text": "public function addItem($item){\n $this->items[] = $item;\n }", "title": "" }, { "docid": "10ad1df161582be8c9102ab877451f01", "score": "0.64800984", "text": "public function add($item);", "title": "" }, { "docid": "10ad1df161582be8c9102ab877451f01", "score": "0.64800984", "text": "public function add($item);", "title": "" }, { "docid": "10ad1df161582be8c9102ab877451f01", "score": "0.64800984", "text": "public function add($item);", "title": "" }, { "docid": "e3dd4caff14e01883f0fc96b543e9573", "score": "0.6463462", "text": "public function add(Item $item): void;", "title": "" }, { "docid": "95fe06ecb944440c85983d0b3a29d7c3", "score": "0.6408766", "text": "public function addData($dataItem){\n\t\tif($this->response->data == null){\n\t\t\t$this->response->data = array();\n\t\t}\n\t\t$this->response->data[] = $dataItem;\n\t}", "title": "" }, { "docid": "d0a98e952dbfe49a0241a878d265618b", "score": "0.637166", "text": "function set_data( $data ){\n $this->_items = $data;\n }", "title": "" }, { "docid": "fa196bfc622dc3b57a02497ed3024fa9", "score": "0.6369555", "text": "function addItem($a_item)\n\t{\n\t\t$this->items[] = $a_item;\n\t}", "title": "" }, { "docid": "08b481437b6534bc394649c093fd3a8e", "score": "0.6366325", "text": "public function append($data)\n {\n $this->data .= $data;\n }", "title": "" }, { "docid": "6d2b9324c0adf9708fd6ea16e879d33f", "score": "0.63564485", "text": "public function add_item($p)\n {\n $this->item = $p;\n }", "title": "" }, { "docid": "c5328a1e757c7d14e9071c2e6b0b1790", "score": "0.635117", "text": "public function appendItem($item): CollectionInterface;", "title": "" }, { "docid": "60ef4740e5dc91f896f0f93e37a97e84", "score": "0.6309145", "text": "public function addElement($item) {\n // $this->data[] = $item; did not work when adding elements after having\n // deleted some, as appending was done at previous max index\n\n $this->data[$this->count()] = $item;\n\n $this->notify();\n\n return $this;\n }", "title": "" }, { "docid": "93b9758d9afab3cd3274d79ff1ac06db", "score": "0.6262007", "text": "public function AddItem() {\n\tdie('This method not written yet!'); // is it needed now?\n }", "title": "" }, { "docid": "15f1ba47bdb270f3706044e78eabb73b", "score": "0.6260426", "text": "function add($item);", "title": "" }, { "docid": "9901d434e75cac343fdb2de4d8775cde", "score": "0.62357306", "text": "public function appendItem(\\PB_Item $value)\n {\n return $this->append(self::ITEM, $value);\n }", "title": "" }, { "docid": "29be4104b7288a1e8e69b16406701467", "score": "0.6231104", "text": "public function add($data, $action = 'append');", "title": "" }, { "docid": "3c9960235f118f39a83a25448474d9fc", "score": "0.62083113", "text": "public function add($item) {\n $this->items[$item->id()] = $item;\n }", "title": "" }, { "docid": "529dbf5ce5b2ebe64749070f6d58d3c5", "score": "0.61560476", "text": "public function addItem($item, $parent = '');", "title": "" }, { "docid": "a223645ed59995ff7ecc709b48a901c8", "score": "0.61531615", "text": "public function addItem(ItemInterface $item);", "title": "" }, { "docid": "d80c909537b7f037ed0ac98cae129d4e", "score": "0.61405975", "text": "function PostProcessItemData()\n {\n $this->AddEventQuestDatas();\n $this->ItemDataGroups();\n }", "title": "" }, { "docid": "55d22481f57dda039ae6339562a39b08", "score": "0.6138511", "text": "function append($item) {\n return Seq::concat($this, Seq::of($item));\n }", "title": "" }, { "docid": "d715b1829751df6128294596ab8def3b", "score": "0.61365974", "text": "public function push($item): void\n {\n $this->elements[] = $item;\n }", "title": "" }, { "docid": "1cf701e1d9368cbfc458e2dacf893f10", "score": "0.6110146", "text": "public function addItem($item)\n {\n $this->items[] = $item;\n $this->total_price += $item->getPrice();\n }", "title": "" }, { "docid": "609e311b9672159a35568cc4a9dde6df", "score": "0.6106737", "text": "public function append($value)\n {\n $this->items[] = $value;\n }", "title": "" }, { "docid": "02c8a221d205abc4a9b7bc544e15ce96", "score": "0.6091958", "text": "abstract public function append($bucket, $name, $data);", "title": "" }, { "docid": "76e7314113d04134a64842704c5a2e42", "score": "0.60900396", "text": "public function addDatas(\\RO\\Cmd\\ItemData $value){\n return $this->_add(5, $value);\n }", "title": "" }, { "docid": "3f80ded3a3ee11501969716097c3f472", "score": "0.6056242", "text": "public function insert( $item )\n\t{\n\t\t$this->_items[] = $item;\n\t}", "title": "" }, { "docid": "24d03dafb838ad5abaeb59617d0aa352", "score": "0.6046075", "text": "abstract function set ($item, $data);", "title": "" }, { "docid": "7e8a746914903188992268a118087401", "score": "0.6042137", "text": "public function addItem( $item )\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "c071f5b915689311b1fa8ad3207a5641", "score": "0.60324264", "text": "public function add($item, $id){\n $storedItem = ['qty' => 0,'category' => $item->category->name,'item' => $item];\n if ($this->items){\n if(array_key_exists($id, $this->items)){\n $storedItem = $this->items[$id];\n }\n }\n $storedItem['qty']++;\n $storedItem['price'] = $item->price * $storedItem['qty'];\n $this->items[$id] = $storedItem;\n\n $this->totalQuantity++;\n $this->totalPrice += $item->price;\n $this->totalGST += ($item->price) * 0.15;\n\n }", "title": "" }, { "docid": "c7b978bb518e95eec1dc4061726d86f6", "score": "0.5993556", "text": "public function add( $item )\n\t\t{\n\t\t\tarray_push( $this->items, $item );\n\t\t}", "title": "" }, { "docid": "849d73c72bbc6655f4bc6714a3781b81", "score": "0.5990862", "text": "function item_put($key = null)\n {\n $incoming = key($this->put());\n // decode record before anything, as assoc array\n $record = json_decode($incoming,true);\n // item ID specified as segment or query parameter\n if (($key == null) || ($key == 'id'))\n {\n $key = $this->get('id');\n $record = array_merge(array('id' => $key), $record);\n }\n $this->crud_put($record);\n }", "title": "" }, { "docid": "253c328df7ce6d0a45c945d6ab9afdc8", "score": "0.59865516", "text": "public function enqueue($item)\n {\n array_push($this->array, $item);\n }", "title": "" }, { "docid": "cb4c1ec3d75733a22ffbabadeceabaae", "score": "0.59741277", "text": "abstract protected function saveItems();", "title": "" }, { "docid": "7a7b1e34f595993f92188b4148f45d63", "score": "0.59569156", "text": "public function addData(array $data){\n\t $this->data = array_merge($this->data, $data);\n\t}", "title": "" }, { "docid": "aa206f2ec6739ec1ddbd897f32e3f2ff", "score": "0.5955184", "text": "public function addItem($item) {\n\t\t$this->result .= '<li>' . $item . '</li>' . PHP_EOL;\n\t}", "title": "" }, { "docid": "f1b3b281750ab89504dff39a3be3f47b", "score": "0.5953238", "text": "public function addItem($data = []) {\n\n\t\t$keys = ['created', 'token'];\n\t\t$values = [date(\"Y-m-d H:i:s\"), $this->generateRandomString()];\n\n\t\t$optionalKeys = [\"line1\", \"line2\", \"street\", \"no\", \"country\", \"zip\", \"city\", \"email\"];\n\t\tforeach ($optionalKeys as $optionalKey) {\n\t\t\tif (isset($data[$optionalKey]) && is_scalar($data[$optionalKey])) {\n\t\t\t\t$keys[] = $optionalKey;\n\t\t\t\t$values[] = pg_escape_string($data[$optionalKey]);\n\t\t\t}\n\t\t}\n\n\t\t$sql = \"INSERT INTO my_simple_api \"\n\t\t\t .\"(\".implode(\", \", $keys).\") values ('\".implode(\"', '\", $values).\"') \";\n\n\t\t// send email\n\t\t$id = Database::getInstance()->addItem($sql);\n\t\t$token = $values[array_search('token', $keys)];\n\t\t$frontend = getenv('FRONTEND_URL') ? : 'http://localhost:4200';\n\t\t$link = $frontend . '/apartments/edit/' . $id . '?token=' . $token;\n\t\t$message = str_replace('{{link}}', $link, self::EMAIL);\n\t\t$email = $values[array_search('email', $keys)];\n\t\t@mail($email, \"Apartment added\", $message, \"From: my-simple-api\");\n\t}", "title": "" }, { "docid": "b464b7184c975850dae1ac413d766e4a", "score": "0.5942225", "text": "protected function add_data($key, $data)\n {\n }", "title": "" }, { "docid": "b6ef56d2e6cb5b319c6f9264b51d1d8a", "score": "0.5928219", "text": "public function push($key, $data);", "title": "" }, { "docid": "e9eb82562965d011c1ee49c7b3b67f46", "score": "0.59266967", "text": "function addInfoItems($info)\n\t{\n\t}", "title": "" }, { "docid": "33f21b8e5f2e1ebc20486dc3858f2cc6", "score": "0.5909289", "text": "function getNewItemData() {\n set_time_limit(0);\n $this->autoRender = false;\n\n $sql = \"SELECT * FROM `items`\n\t\tWHERE\n `base_item` = 0;\";\n $datas = $this->Cabinet->query($sql);\n\n App::uses(\"Item\", \"Inventory.Model\");\n foreach( $datas as $data ) {\n $id = $data['items']['id'];\n $sql2 = \"SELECT id, number, width, length, item_title, item_material_group FROM items WHERE base_item = $id AND item_material_group = 1 AND item_title LIKE 'BK%'\";\n $d1 = $this->Cabinet->query($sql2);\n\n if( !empty($d1) ) {\n foreach( $d1 as $item_data ) {\n $item['Item']['id'] = $item_data['items']['id'];\n $item['Item']['width'] = $item_data['items']['width'] - 10;\n $item['Item']['length'] = $item_data['items']['length'] - 10;\n $item['Item']['description'] = $item_data['items']['item_title'];\n\n $item_model = new Item();\n if( !$item_model->save($item) ) {\n pr($item_model->validationErrors);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "16f4e29484825262e9ba5884f6bdf5e0", "score": "0.5901717", "text": "public function append($data)\n {\n $this->data[] = $data;\n\n return $this;\n }", "title": "" }, { "docid": "418d95fde68a7cd8308c0d03302871ff", "score": "0.58982974", "text": "public function addItems(array $items)\r\n\t{\r\n\t\t$this->_data = $items;\r\n\t}", "title": "" }, { "docid": "81b929610b4b4ff425df97e23c269951", "score": "0.58973247", "text": "public function addItem($item){ \n\t\t$this->cartItems[] = $item;\n\t}", "title": "" }, { "docid": "069d9818c1c1fce52b603c2485fccfa8", "score": "0.58864844", "text": "public function add($item, $id){\n $storedItem = ['qty' => 0,\n 'price'=>$item->price,\n 'item' => $item]; //servirá para os grupos, para nao tar a adicionar 2 da mesma coisa\n\n if($this->items){ //verificar se ja ha items no array\n if (array_key_exists($id, $this->items)){ //verificar se ja existe o item que eu quero adicionar\n $storedItem = $this->items[$id];\n }\n }\n\n $storedItem['qty']++;\n $storedItem['price'] = $item->price * $storedItem['qty'];\n $this->items[$id] = $storedItem;\n $this->totalQty++;\n $this->totalPrice += $item->price;\n\n }", "title": "" }, { "docid": "67044b6cfe28ed074f85cd4693d1e62a", "score": "0.58838516", "text": "public function addItems($items);", "title": "" }, { "docid": "cb646fb38aebcf6f2851d62d5f9b2825", "score": "0.5880526", "text": "public function add($item)\n {\n if ($item instanceof ItemInterface) {\n $this->items[] = $item;\n } else {\n $this->items[] = new Item($item);\n }\n }", "title": "" }, { "docid": "d21d6bf76180b539a9444ab2714dd39c", "score": "0.58799165", "text": "private function appendNewInputItem($items, $mode, $size, $data) {\n\t\t$newitem = $this->newInputItem($mode, $size, $data);\n\t\tif(!empty($newitem)) {\n\t\t\t$items[] = $newitem;\n\t\t} //end if\n\t\treturn $items;\n\t}", "title": "" }, { "docid": "963b2c5f22f4cd36c67a4d8ac519d1c2", "score": "0.5879246", "text": "public function addItem(ArrayItemType $item): void\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "d29d102bc18ec7be8555b06fa0368eaa", "score": "0.58767897", "text": "public function append();", "title": "" }, { "docid": "e5eb50a573fd4261be8705477f01a970", "score": "0.5865171", "text": "public function add(...$items);", "title": "" }, { "docid": "f5b919bc241853ae662418fa15576a42", "score": "0.5863703", "text": "function addAdditionalSubItemInformation(&$a_item_data)\n\t{\t\t\n\t\tinclude_once './Services/Object/classes/class.ilObjectActivation.php';\n\t\tilObjectActivation::addAdditionalSubItemInformation($a_item_data);\n\t}", "title": "" }, { "docid": "8eed0aad5d6056652377f8036fcb04ef", "score": "0.58583283", "text": "public function enqueue($item)\n\t{\n\t\t++$this->_count;\n\t\tarray_push($this->_data, $item);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "f54ee0b5d064d1d6f1cd0487c754aa71", "score": "0.5853234", "text": "protected final function appendData($key, $value) {\n $this->data[$key][] = $value;\n }", "title": "" }, { "docid": "dfab4e25c7e869aa1cd0228ac9b31e6c", "score": "0.5852198", "text": "public function enqueue($item)\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "8810cc39193d22aecad9990c6ddaf642", "score": "0.5839821", "text": "protected abstract function msgItemSuccessfullyAdded();", "title": "" }, { "docid": "b1d19fd769c5c13f136d157cd01c510a", "score": "0.58250684", "text": "public function setItem()\n {\n //conditional checks by taking advantage of polymorphism\n $this->setAllBasics();\n $this->setParams();\n\n $addQuery = 'INSERT INTO items(sku, name, price, type, height, width, length) VALUES (:sku,:name,:price, :type,:height, :width, :length)';\n $query = $this->pdo->prepare($addQuery);\n $query->bindValue(':sku', $this->getSKU());\n $query->bindValue(':name', $this->getName());\n $query->bindValue(':price', $this->getPrice());\n $query->bindValue(':type', $this->getType());\n $query->bindValue(':height', $this->getHeight());\n $query->bindValue(':width', $this->getWidth());\n $query->bindValue(':length', $this->getLength());\n\n $query->execute();\n }", "title": "" }, { "docid": "889de219f2ba1bc61cd7420b8e8c457b", "score": "0.58068633", "text": "function addData(&$storage, $data)\n{\n if (is_null($data))\n return;\n if ($data == \"\")\n return;\n $storage['data'][] = $data;\n}", "title": "" }, { "docid": "a7edfa9c4c9437ac93dda7c54415aa2e", "score": "0.580307", "text": "function element ($item){$this->add($this->element2arr($item));}", "title": "" }, { "docid": "b505fbcb48fa2e672350879e9ba5f3a3", "score": "0.5800595", "text": "private function addItem($row){\n \t\t$this->stack[] = $row;\n \t\t$this->stackMap[$row['item_id']] = ($this->length() - 1);\n }", "title": "" }, { "docid": "3e6000d3ef7cf78711355cc8e10e9da9", "score": "0.57951", "text": "function add_item()\n {\n\n $data = array();\n $id = trim($this->input->post(\"item\"));\n if ($id == NULL || $id == '') {\n $data['error'] = lang('stock_in_unable_to_add_item');\n $this->_reload($data);\n return;\n }\n $stock_type = $this->stock_lib->get_stock_out_type();\n switch ($stock_type) {\n case Models\\Stock_out::STOCK_TYPE_PACKAGE:\n $result = $this->add_package_item($id);\n if ($result['status'] == 'error') {\n $data['error'] = $result['msg'];\n }\n break;\n default:\n $this->add_item_default($id);\n }\n $this->_reload($data);\n }", "title": "" }, { "docid": "efb73a510922e0daee3d138d5616c376", "score": "0.57944995", "text": "protected function push(Component $item)\n\t{\n\t\t$this->items[] = $item;\n\t}", "title": "" }, { "docid": "9f5971df7154e08fbcc99f42f29dc549", "score": "0.57940143", "text": "public function append(MessageInterface $message): void\n {\n $this->items[$message::class] = $message;\n }", "title": "" }, { "docid": "b3ae134f2bdb8dc1fa275674dc7918e2", "score": "0.5780324", "text": "public function addLast(mixed $item): void;", "title": "" }, { "docid": "d4ab4b766a5160aa5bf671dc70eb6fa1", "score": "0.57796174", "text": "public function add(CollectionItemInterface $item);", "title": "" }, { "docid": "0a1a184aabf77054ff856562c4cc3ede", "score": "0.57729614", "text": "public function addItem(Item $item)\r\n\t{\r\n\t\tarray_push($this->items, $item);\r\n\t}", "title": "" }, { "docid": "0a1a184aabf77054ff856562c4cc3ede", "score": "0.57729614", "text": "public function addItem(Item $item)\r\n\t{\r\n\t\tarray_push($this->items, $item);\r\n\t}", "title": "" }, { "docid": "429dd502ec3802c7f2a1cdae7207e29f", "score": "0.57557863", "text": "protected function _addAdditionalInformation(&$item)\n {\n }", "title": "" }, { "docid": "12c1e454037bacbcf687fc52cf7449b6", "score": "0.5747939", "text": "public function add($index, $item);", "title": "" }, { "docid": "4e6472425334d345ed3e47e8137f9d47", "score": "0.5736771", "text": "function addItem($itemName) {\n $this->inventory[] = $itemName;\n }", "title": "" }, { "docid": "fe4aa5914fcecb52abdc6670ec92bb84", "score": "0.572668", "text": "public function addItem() {\n\n\t\t$data = file_get_contents(\"php://input\");\n\n\t\tif (!empty($data)) {\n\t\t\t\n\t\t\t$pedido = new Pedidos();\n\t\t\t$itens \t= new Itens();\n\n\t\t\t$data = json_decode($data, true);\n\n\t\t\tif (isset($data['id_pedido']) && !empty($data['id_pedido']) && is_numeric($data['id_pedido'])) {\n\t\t\t\t\n\t\t\t\t$id_pedido = addslashes($data['id_pedido']);\n\n\t\t\t\tif ($pedido->verificaStatus($id_pedido) == 0) {\n\n\t\t\t\t\tforeach ($data['itens'] as $item) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$id \t\t= addslashes($item['id']);\n\t\t\t\t\t\t$valor \t\t= isset($item['valor']) ? $item['valor'] : \"\";\n\t\t\t\t\t\t$quantidade = addslashes($item['quantidade']);\n\n\t\t\t\t\t\t$itens->addItem($id_pedido, $id, $valor, $quantidade);\n\n\t\t\t\t\t\t$itens_return[] = $this->returnRentabilidade($itens, $id, $valor);\n\n\t\t\t\t\t}\n\n\t\t\t\t\t$pedido->updateTotal($id_pedido);\n\n\t\t\t\t\t$return = array(\n\t\t\t\t\t\t\"id_pedido\" => $id_pedido,\n\t\t\t\t\t\t\"status\" => \"Aberto\",\n\t\t\t\t\t\t\"itens\" => $itens_return\n\t\t\t\t\t);\n\n\t\t\t\t\theader(\"Content-Type: application/json\");\n\t\t\t\t\techo json_encode($return);\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\theader(\"Content-Type: application/json\");\n\t\t\t\t\techo json_encode(array(\n\t\t\t\t\t\t\"id_pedido\" => $id_pedido,\n\t\t\t\t\t\t\"status\" => \"Encerrado\",\n\t\t\t\t\t\t\"itens\" => \"\"\n\t\t\t\t\t));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "3860f3023d8838c1b5b82d06a57eccd5", "score": "0.5719571", "text": "function add( $id, $payload ) {\t\t$this->items[ $id ] = $payload;\n\t}", "title": "" }, { "docid": "fb785b9393ee3cf0ea7fbddfad75c36e", "score": "0.57191277", "text": "abstract protected function addToStorage($storage, $items);", "title": "" }, { "docid": "28a108455e579abe775f0a5ef2bd2839", "score": "0.5718766", "text": "public function ___added(Saveable $item) {\n\t\t$this->log(\"Added\", $item);\n\t}", "title": "" }, { "docid": "4d3dfb9fbd9129c9c47717f90d65ff7c", "score": "0.5715916", "text": "public function add($item){\n \n //$count = count($this->_items);\n //$mod = $count % 3;\n \n if ($item instanceof \\frameworks\\adapt\\html){\n $item->add_class('col-xs-12 col-sm-4 column');\n //parent::add($item);\n //if ($mod == 0){\n // $row = new html_div($item, array('class' => 'row'));\n //parent::add($row);\n //}else{\n // $this->find('.row')->last()->append($item);\n //}\n //print new html_pre($item->attr('class'));\n //if ($item->find('.group-layout-simple')->find('.hidden')->size() > 0){\n // $item->add_class('hidden');\n //}else{\n //if (!$item->has_class('hidden')){\n $this->_items[] = $item;\n //}\n //}\n \n }\n \n $row = $this->find('.row')->last();\n if ($row->size()){\n $row->append($item);\n }else{\n $row = new html_div($item, array('class' => 'row'));\n parent::add($row);\n }\n \n //parent::add($item);\n //$count = count($this->_items);\n //$mod = $count % 3;\n \n //if ($mod == 0){\n // $this->find('.row')->last()->append(new html_div(array('class' => 'clearfix')));\n //}\n \n }", "title": "" }, { "docid": "4465eb9dc05dd39714fa54934f35c9e7", "score": "0.57153374", "text": "function addItem2DB($data = null)\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $result = $_POST['itemInfo'];\n echo $this->order_model->add($result);\n }\n }", "title": "" }, { "docid": "3558bb19ae5d3b70ba890baa929433c9", "score": "0.5713448", "text": "public function addData($index, $data) {\r\n $this->data[$index]['value'] = $data;\r\n }", "title": "" }, { "docid": "b58ce907ace7d37d9b0616469fd80d86", "score": "0.5695371", "text": "protected function build($data)\n {\n foreach ($data as $item) {\n $this->add($item);\n }\n }", "title": "" }, { "docid": "482befa2f2c8d3c008118dd1252670d8", "score": "0.5695259", "text": "public function add($item) {\n if (is_array($item)) {\n $item['uid'] = sha1(serialize($item['id'] . $item['options']));\n $ikey = -1;\n \n $exit = false;\n foreach($this->items as $key => $loaded){\n if($loaded['uid'] == $item['uid']){\n $ikey = $key;\n if ($item['quantity'] == 0) {\n unset($this->items[$key]);\n $exit = true;\n }\n }\n }\n \n if($exit !== true){\n if($ikey > -1){\n $this->items[$ikey] = $item;\n }\n else{\n if ($item['quantity'] > 0) {\n array_push($this->items, $item);\n }\n }\n }\n }\n $_SESSION['cart'] = $this->items;\n }", "title": "" }, { "docid": "647cebd34786ad89f95983635da01f7d", "score": "0.5688168", "text": "public function add($item)\n {\n $this->addArray('content', $item, array('ButtonContainer', 'Container', 'Form', 'Heading', 'HTML', 'Image', 'Checkbox', 'Email', 'HiddenField', 'Label', 'Password', 'Phone', 'RadioButtons', 'SelectMenu', 'TextInput', 'TextArea', 'Upload', 'XList', 'Table'));\n }", "title": "" }, { "docid": "1c5f744b2dbc55975cd92d2289410164", "score": "0.56800073", "text": "function add($item) {\n\t\t\tif(!$this->contains($items)) {\n\t\t\t\tarray_push($this->items, $item);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0a470bf5b352fe69e7559504b47102a9", "score": "0.5667793", "text": "abstract protected function write(array $items);", "title": "" }, { "docid": "736230eec2ada5854915fb562f4121ac", "score": "0.5659059", "text": "function AddRow(&$data) { $this->NewRow($data); }", "title": "" }, { "docid": "34d50f154af6aca80687d7c46bc7ccf9", "score": "0.56476027", "text": "public function append()\n\t{\n\n\t}", "title": "" }, { "docid": "1d250d7c193aa08ced5127df55f85e19", "score": "0.56475896", "text": "public function addToData($key, $value) {\n\t\t$this->data[$key] = $value;\n\t}", "title": "" }, { "docid": "61723db0b03a0b7643232aa18bfca821", "score": "0.5642551", "text": "public function addItem($data){\n\n $temp = [];\n $sessionSumbangan = $this->session->get('sirkulasi');\n if (!empty($sessionSumbangan)) {\n // buat variabel temporary untuk menampung data session sebelumnya\n $temp = $this->session->get('sirkulasi');\n }\n\n $temp[count($temp)] = $data;\n // simpan kembali session\n $this->session->set('sirkulasi', $temp);\n\n }", "title": "" }, { "docid": "666562fa9976d2779226eca1f76d7757", "score": "0.5633172", "text": "public function add(array $data)\n {\n return $this->call(\n 'POST',\n '/api/v1/item/add',\n $data\n );\n }", "title": "" }, { "docid": "6c4f17862bcff42c9d438390628fb31e", "score": "0.5632269", "text": "function AddItem($item, $object = null, $itemkey = null)\r\n {\r\n if($object != null)\r\n {\r\n throw new Exception('ObjectNew1 functionallity for RadioGroup is not yet implemented.');\r\n }\r\n\r\n //Set the array to the end\r\n end($this->_items);\r\n\r\n //Adds the item as the last one\r\n if($itemkey != null)\r\n {\r\n $this->_items[$itemkey] = $item;\r\n }\r\n else\r\n {\r\n $this->_items[] = $item;\r\n }\r\n\r\n return ($this->Count);\r\n }", "title": "" }, { "docid": "d054d21c39e120291f328facb92b9ecc", "score": "0.5630137", "text": "public function addItem($item): self\n {\n array_push($this->body, $item);\n\n return $this;\n }", "title": "" }, { "docid": "edf16d230baba71344d3755029d06c00", "score": "0.5629213", "text": "public function append()\n {\n }", "title": "" } ]
2b426131cc5e77900a07f93aae1b9e3e
Get the value of the model's primary key.
[ { "docid": "797c7e4c503f877b9e60baf15a4043d9", "score": "0.0", "text": "public function getKey()\n {\n return $this->getAttribute($this->getKeyName());\n }", "title": "" } ]
[ { "docid": "8345b7e1d8e4282048b9fcb6a03d7ef8", "score": "0.83117175", "text": "private function _getPrimaryKey() {\n $key = $this->primaryKey;\n return $this->$key;\n }", "title": "" }, { "docid": "b910c948ea84b2d9c53dcb158e98d3c8", "score": "0.81467557", "text": "public function getPrimaryKeyValue() {\n\t\t$pk = $this->getPrimaryKey();\n\t\treturn isset($this->$pk) ? $this->$pk : null;\n\t}", "title": "" }, { "docid": "1f9da36ef5d8190bc2e9c33977a036e4", "score": "0.81431025", "text": "public function PrimaryKey()\r\n {\r\n return $this->Get($this->_primaryKeyName);\r\n }", "title": "" }, { "docid": "32cc66207e3a0068ea3d94af5e4ad8bd", "score": "0.8110706", "text": "public function getPrimaryKey(): string\n {\n return $this->primaryKey;\n }", "title": "" }, { "docid": "67291ec653c536b16396c64fe87043db", "score": "0.8090951", "text": "public static function get_primary_key();", "title": "" }, { "docid": "f8665052fdd20760860181742dbea202", "score": "0.808667", "text": "public function getKey()\n {\n return $this->primaryKey;\n }", "title": "" }, { "docid": "d2b59178ab096708971d889e684ff2ed", "score": "0.8084793", "text": "public function getPrimaryKey()\r\n {\r\n if (isset(static::$primaryKey)) {\r\n return static::$primaryKey;\r\n }\r\n return self::$primaryKey;\r\n }", "title": "" }, { "docid": "86d556432cb7182f7fdc78888bc3bfba", "score": "0.8082419", "text": "public function getPrimaryKey (): string\n {\n return $this->primary_key;\n }", "title": "" }, { "docid": "960c5ac1a21683c35473a469f2e8e552", "score": "0.8073949", "text": "public function grabPkValue()\n {\n\n $pkGetter = $this->grabModel()->getPkField()->getGetterName();\n\n return $this->$pkGetter();\n }", "title": "" }, { "docid": "35118adda01f2547a1e3054ab1f24692", "score": "0.8063059", "text": "public function getKey()\n {\n return $this->{$this->primary_key};\n }", "title": "" }, { "docid": "7c9620a4f84feee0ced25cddf71f48eb", "score": "0.80158716", "text": "public function getKey()\n {\n $prmKey = $this->primaryKey;\n return $this->$prmKey;\n }", "title": "" }, { "docid": "6db16a93112c9b0f72261c1045d35685", "score": "0.80155605", "text": "public function getPrimaryKey() {\n return $this->primary_key;\n }", "title": "" }, { "docid": "47253604a6b2a572047047afe8c6a6a2", "score": "0.80086356", "text": "public function get_primary_key(/* ... */)\n {\n return $this->_primary;\n }", "title": "" }, { "docid": "0bb3b67c81a43d718173f5d08e52ed31", "score": "0.7995794", "text": "public function getKey()\r\n {\r\n return $this->{$this->primaryKey};\r\n }", "title": "" }, { "docid": "b38d0a76cee79e450ddf17e77db731ff", "score": "0.7983115", "text": "public function getPk(){\r\n \treturn $this->{$this->pk()};\r\n }", "title": "" }, { "docid": "f4411bec9a32d654aa4f650c2d6d5e5b", "score": "0.7967259", "text": "public function primaryKey(): string\n {\n return $this->model ? $this->model->getPrimaryKey() : '';\n }", "title": "" }, { "docid": "c75e238a5bb2a14e8205182323f65b1a", "score": "0.79659617", "text": "public function getPrimaryKey()\n {\n return $this->primaryKeyValue;\n }", "title": "" }, { "docid": "7aa72a8cbcdbe5ce71130da666285cb0", "score": "0.79363173", "text": "public function getId()\n {\n return $this->{self::primaryKey()};\n }", "title": "" }, { "docid": "b79318f7cfc429d8ed4ca166940eff35", "score": "0.7936273", "text": "public function primary_val()\n\t{\n\t\treturn $this->_record[$this->_primary_key];\n\t}", "title": "" }, { "docid": "101cc89b253585cbb7639ccb2a6fe2f2", "score": "0.7927297", "text": "public function getPrimaryKey()\n {\n return $this->primaryKey;\n }", "title": "" }, { "docid": "61c7cc596b3263c683720042e82c5cc8", "score": "0.7907491", "text": "function getPrimaryKey()\n {\n return $this->_primaryKey;\n }", "title": "" }, { "docid": "06673ffbc6df63c1f794acd906b4fd04", "score": "0.7888554", "text": "public function getPrimaryKey(){\n\t\treturn $this->idfieldvalue;\n\t}", "title": "" }, { "docid": "76708bda5bee8ce669e89a5e65c03811", "score": "0.7884678", "text": "protected function getPrimaryKey() {\n\t\treturn isset($this->_meta['primary']) ? $this->_meta['primary'] : null;\n\t}", "title": "" }, { "docid": "39bdfc7239a53334026c328b524de9b8", "score": "0.7871953", "text": "public function getPrimaryKey();", "title": "" }, { "docid": "648853468bb9ca9b19ce5e4dd4759860", "score": "0.7834939", "text": "public function getPk()\n {\n return $this->pk;\n }", "title": "" }, { "docid": "85cac43f1979271400f378a2963d3413", "score": "0.7824078", "text": "public function getPrimaryKey()\n {\n if (null === $this->primaryKey) {\n\n }\n return $this->primaryKey;\n }", "title": "" }, { "docid": "d1a3b8d21e30643cc615750e42bd3a34", "score": "0.7798933", "text": "public function getPrimaryKeyValue();", "title": "" }, { "docid": "5775a9548556a4289c3f138d7ec0e6c8", "score": "0.77492607", "text": "function pk() {\n return $this->{$this->pk};\n }", "title": "" }, { "docid": "2d74e47e1ef5ebd451dad4687f0d2e03", "score": "0.7729432", "text": "public function _primaryKey_(){\n\t\treturn $this->_primaryKey_;\n\t}", "title": "" }, { "docid": "3e65b09fe2cb7a7e93841f0ca1ea0dde", "score": "0.77257127", "text": "public function getPrimaryKey(): string;", "title": "" }, { "docid": "b19169a51be35405b46ddfdb0116ef10", "score": "0.7720641", "text": "public static function primary_key()\n\t{\n\t\treturn static::$_primary_key;\n\t}", "title": "" }, { "docid": "fd993a92829fb671a6a3197ffe51ecdf", "score": "0.7674081", "text": "public function getPK();", "title": "" }, { "docid": "f54708d3d4122cb0741155f24d384354", "score": "0.7662686", "text": "public function primary_key()\n\t{\n\t\treturn $this->_primary_key;\n\t}", "title": "" }, { "docid": "0e58c6bd02017d99158bced58e41c631", "score": "0.7656536", "text": "public function getPrimaryKeyField(): ?string\n {\n $rtn = null;\n\n $keys = $this->getDBTable()->getPrimaryKeys();\n\n if ( count($keys) > 0 )\n {\n $rtn = $keys[0];\n }\n\n return $rtn;\n }", "title": "" }, { "docid": "0143f9e27471fe0654d235f8a390e0a0", "score": "0.76515925", "text": "public function getPrimaryKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "65dcb0dc362dd3411259af64a5f96d11", "score": "0.7638669", "text": "public function pk(){\r\n if( $this->_pk === null ){\r\n $info = $this->_model->info(Zend_Db_Table_Abstract::PRIMARY);\r\n $this->_pk = reset($info);\r\n }\r\n\r\n return $this->_pk;\r\n }", "title": "" }, { "docid": "4d319d7516bf8db5fb24b1214eb6931b", "score": "0.7635915", "text": "public function getPrimaryKey()\n {\n return $this->getid();\n }", "title": "" }, { "docid": "4d319d7516bf8db5fb24b1214eb6931b", "score": "0.7635915", "text": "public function getPrimaryKey()\n {\n return $this->getid();\n }", "title": "" }, { "docid": "25096c2f96fa836996e3b532a608662b", "score": "0.759795", "text": "public function pk()\n {\n if($this->isJoin) {\n $pk = $this->tableName.'.'.$this->primaryKey;\n } else {\n $pk = $this->primaryKey;\n }\n return $pk;\n }", "title": "" }, { "docid": "cb47721330e9d57d72f3504e3a91a5e1", "score": "0.7593419", "text": "public function getPrimaryKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "cb47721330e9d57d72f3504e3a91a5e1", "score": "0.7593419", "text": "public function getPrimaryKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "cb47721330e9d57d72f3504e3a91a5e1", "score": "0.7593419", "text": "public function getPrimaryKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "cb47721330e9d57d72f3504e3a91a5e1", "score": "0.7593419", "text": "public function getPrimaryKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "cb47721330e9d57d72f3504e3a91a5e1", "score": "0.7593419", "text": "public function getPrimaryKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "cb47721330e9d57d72f3504e3a91a5e1", "score": "0.7593419", "text": "public function getPrimaryKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "cb47721330e9d57d72f3504e3a91a5e1", "score": "0.7593419", "text": "public function getPrimaryKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "cb47721330e9d57d72f3504e3a91a5e1", "score": "0.7593419", "text": "public function getPrimaryKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "cb47721330e9d57d72f3504e3a91a5e1", "score": "0.7593419", "text": "public function getPrimaryKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "cb47721330e9d57d72f3504e3a91a5e1", "score": "0.7593419", "text": "public function getPrimaryKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "cb47721330e9d57d72f3504e3a91a5e1", "score": "0.7593419", "text": "public function getPrimaryKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "cb47721330e9d57d72f3504e3a91a5e1", "score": "0.7593419", "text": "public function getPrimaryKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "cb47721330e9d57d72f3504e3a91a5e1", "score": "0.7593419", "text": "public function getPrimaryKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "33a3d98ca04098c5c375626736e419b0", "score": "0.75923735", "text": "public function getPrimaryKey(): string\n {\n return static::primaryKey;\n }", "title": "" }, { "docid": "610934061a0811f1781bb597bd2bd646", "score": "0.75828534", "text": "public function getPrimaryKey()\n {\n return $this->id;\n }", "title": "" }, { "docid": "bd3e2a5995d321f458d7660a4a83333d", "score": "0.7557926", "text": "function getPrimaryKey();", "title": "" }, { "docid": "1817bf98c8823ff97d54d2a2b15caaef", "score": "0.7553152", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "1817bf98c8823ff97d54d2a2b15caaef", "score": "0.7553152", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "1817bf98c8823ff97d54d2a2b15caaef", "score": "0.7553152", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "1817bf98c8823ff97d54d2a2b15caaef", "score": "0.7553152", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "1817bf98c8823ff97d54d2a2b15caaef", "score": "0.7553152", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "1817bf98c8823ff97d54d2a2b15caaef", "score": "0.7553152", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "1817bf98c8823ff97d54d2a2b15caaef", "score": "0.7553152", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "1817bf98c8823ff97d54d2a2b15caaef", "score": "0.7553152", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "1817bf98c8823ff97d54d2a2b15caaef", "score": "0.7553152", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "1817bf98c8823ff97d54d2a2b15caaef", "score": "0.7553152", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "1817bf98c8823ff97d54d2a2b15caaef", "score": "0.7553152", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "b643f01dae3d1660a806a81a8215037c", "score": "0.7542749", "text": "public function primaryKey()\n {\n return $this->primaryKey;\n }", "title": "" }, { "docid": "8d4d72c7f3446ee2e17a02546ff30889", "score": "0.7534877", "text": "private function getPrimaryKeyField() {\n\t\t\n\t\t$primary_field = 'id';\n\t\t$trobat = false;\n\t\t$keys = array_keys($this->attributes);\n\t\t\n\t\twhile(!$trobat && !empty($keys)){\n\t\t $key = array_shift($keys); // $key is an string\n\t\t $trobat = (is_array($this->attributes[$key]) && $this->attributes[$key]['primary_key'] == true);\n\t\t}\n\n\t\tif($trobat) $primary_field = $key;\n\n\t\treturn $primary_field;\n\t}", "title": "" }, { "docid": "233197eac4352ee99f631e7b6dca9b9d", "score": "0.75033295", "text": "public function getPrimaryKey()\n {\n return $this->getCoRepresentada();\n }", "title": "" }, { "docid": "bbabd17f00874a247030b002c7a62bdb", "score": "0.7498211", "text": "public function getPrimaryKey()\n {\n $primaryKey = null;\n\n if (count($this->columns) > 0) {\n foreach ($this->columns as $key => $value) {\n if ($value->column_key == 'PRI' || $value->extra == 'auto_increment') {\n $primaryKey = $value->column_name;\n break;\n }\n }\n }\n\n return $primaryKey;\n }", "title": "" }, { "docid": "ef9a0b741693f2cde1223878f49715f0", "score": "0.7491336", "text": "public function getPrimaryKey()\n {\n return $this->getOid();\n }", "title": "" }, { "docid": "1907853d145457d45b38361a4f621738", "score": "0.74869615", "text": "public function primaryKey()\n {\n return $this->getModel()->getTableSchema()->primaryKey;\n }", "title": "" }, { "docid": "022d6cdca24c3627d1b9764ad81ecf72", "score": "0.74791074", "text": "public function getPrimaryKey()\n {\n return $this->getActiCodigo();\n }", "title": "" }, { "docid": "627835e6055c8018508c6c4a8aff3d2f", "score": "0.7477182", "text": "public function getPK(): int|string|null\n {\n return $this->get(key: $this->getPrimaryKeyname());\n }", "title": "" }, { "docid": "ed25be9e0125f2b6d7c818c2c91f712d", "score": "0.7474536", "text": "public function getPrimaryKey() {\n // TODO: Implement getPrimaryKey() method.\n }", "title": "" }, { "docid": "c53dc1cf6ad6a291316d88d707af3d8e", "score": "0.7473431", "text": "function getPrimaryKey() {\n\t\treturn $this->_ID;\n\t}", "title": "" }, { "docid": "c53dc1cf6ad6a291316d88d707af3d8e", "score": "0.7473431", "text": "function getPrimaryKey() {\n\t\treturn $this->_ID;\n\t}", "title": "" }, { "docid": "3738410bb1bf9de2f5ac49c2a56caed1", "score": "0.74625194", "text": "public function getPrimaryKey()\n {\n return $this->getAtccode();\n }", "title": "" }, { "docid": "87339b4f63e1493965c80548977e2705", "score": "0.7443375", "text": "private function primaryKeyName() {\r\n\t\treturn $this->owner->getMetaData()->tableSchema->primaryKey;\r\n\t}", "title": "" }, { "docid": "2291692a55ce215f774c0488a240b523", "score": "0.7419633", "text": "function getKey()\n {\n return $this->id;\n }", "title": "" }, { "docid": "a5d74239a11ea99393e6a5c466f1518f", "score": "0.74147624", "text": "public function getPrimaryKey()\n {\n return $this->getPohdnbr();\n }", "title": "" }, { "docid": "e23ad7f6d7c88cbb5ad939335f8729d5", "score": "0.741081", "text": "public static function primaryKey()\n {\n return self::PRIMARY_KEY_NAME;\n }", "title": "" }, { "docid": "3a6f3734edfebd26cf0c4a3231bf3bf1", "score": "0.740392", "text": "public function getKey()\n {\n return $this->{$this->getKeyField()};\n }", "title": "" }, { "docid": "26fdcd00141864779c06546ddab9d33d", "score": "0.74007136", "text": "function getKey()\n {\n return $this->id;\n }", "title": "" }, { "docid": "5b25b9e596e622ac61993c129147553e", "score": "0.73951125", "text": "public function getId()\n {\n return $this->getKey();\n }", "title": "" }, { "docid": "5496933433b00fb95af06e81743e8d74", "score": "0.73716384", "text": "public function PrimaryKey() {\n\t\t\treturn $this->strTableKey;\n\t\t}", "title": "" }, { "docid": "f78278c63a9ba74a0f7b78a6255d4d18", "score": "0.7359161", "text": "public function getKeyName(): string\n {\n return $this->primaryKey;\n }", "title": "" }, { "docid": "f78278c63a9ba74a0f7b78a6255d4d18", "score": "0.7359161", "text": "public function getKeyName(): string\n {\n return $this->primaryKey;\n }", "title": "" }, { "docid": "15cf8baf41b43bbf60adb73815cf8abb", "score": "0.7348634", "text": "public function getKeyName()\r\n {\r\n return $this->primaryKey;\r\n }", "title": "" }, { "docid": "19d93e12f38e8b21ebe48b160f8774cf", "score": "0.73420626", "text": "public function primaryKey()\n {\n return $this->intId;\n }", "title": "" }, { "docid": "19d93e12f38e8b21ebe48b160f8774cf", "score": "0.73420626", "text": "public function primaryKey()\n {\n return $this->intId;\n }", "title": "" }, { "docid": "0cc15f6cea85ced723818fdd0b12a8bf", "score": "0.7324933", "text": "public function getKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "2671aaa42e931e8d7ff8e7d0ca7fefb2", "score": "0.73167956", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getUid();\n\t}", "title": "" }, { "docid": "310d20a0a052c6c6b8dcde27c88281a1", "score": "0.730639", "text": "public static function getPkColumnValue(ActiveRecord $model)\n {\n return $model->{self::getPkColumnName($model)};\n }", "title": "" }, { "docid": "f22cb57ebc8f01f41efd4ff95a8eb5b9", "score": "0.73041713", "text": "public function getKeyName()\n {\n return $this->primaryKey;\n }", "title": "" }, { "docid": "f22cb57ebc8f01f41efd4ff95a8eb5b9", "score": "0.73041713", "text": "public function getKeyName()\n {\n return $this->primaryKey;\n }", "title": "" }, { "docid": "399f45cb080d9d6934ce133fd7dedfc8", "score": "0.73039514", "text": "public function getKey()\n {\n return (string) $this->_id;\n }", "title": "" }, { "docid": "35b161361e208d3bbe0f036346d8cd7c", "score": "0.73025715", "text": "protected function getKeyForSaveQuery()\r\n {\r\n return $this->getAttribute($this->getPrimaryKey());\r\n }", "title": "" }, { "docid": "f5dc5b4c00a2aec53efd98d50278ac21", "score": "0.7300869", "text": "public function getPrimaryKey()\n {\n return $this->getIdPrepago();\n }", "title": "" }, { "docid": "b05338f790666aba0ef6d0d19c78670c", "score": "0.7299983", "text": "protected function _getPrimaryKey()\n {\n return \"id\";\n }", "title": "" }, { "docid": "acd51cff1b14390a785cb9adf20afabb", "score": "0.72959864", "text": "protected function getPrimaryKey()\n {\n return $this->getConnection()->getTablePrefix().$this->getQualifiedKeyName();\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "7cb1d8a8bfde4e52e9fb678b55ec705e", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n\n $request->validate([\n 'name' => 'required',\n 'type' => 'required',\n 'price' => 'required',\n ]);\n\n $eqp = Equipment::findOrFail($id);\n $eqp->name = $request->name;\n $eqp->type = $request->type;\n $eqp->price = $request->price;\n $eqp->save();\n\n return redirect()->route('equipment.index');\n }", "title": "" } ]
[ { "docid": "b8af9491d409a852eeea996523d9e2fa", "score": "0.72640634", "text": "protected function updateResource()\n {\n $this->context->resource->fill($this->context->input);\n $this->applyHooks(BeforeUpdate::class);\n $this->applyHooks(BeforeSave::class);\n $this->context->resource->save();\n $this->applyHooks(AfterSave::class);\n $this->refreshResource();\n }", "title": "" }, { "docid": "352ddad568859b94ee19a4459347b263", "score": "0.7148497", "text": "public function update() {\n $data = array($this->backing);\n $results = json_decode($this->context->make_request(\n $this->resource_type, \"PUT\", strval($this->backing[\"id\"]), \n json_encode($data), NULL, NULL), true);\n $this->backing = $results[0];\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.7057816", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "718f7d64347dbb970d3af2645ff41b28", "score": "0.66234386", "text": "public function update(Request $request, Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "c4d757ef327886959b7e0e652b0d54f4", "score": "0.64697045", "text": "private function update(ResourceInterface $resource)\n {\n $this->dispatcher->dispatch(ResourceEvents::PRE_UPDATE, $resource);\n $this->eventfullySave($resource);\n $this->dispatcher->dispatch(ResourceEvents::POST_UPDATE, $resource);\n }", "title": "" }, { "docid": "8103ef1c9a8f0abc99a6caed997962f1", "score": "0.6313658", "text": "public function update($resourceType, $resourceId, array $payload, $parameters = []);", "title": "" }, { "docid": "47e4c5326e79281be1ce31ec068dab77", "score": "0.61879224", "text": "public static function updateResource($path, $object)\n {\n if (is_array($object)) {\n $object = (object)$object;\n }\n\n return self::connection()->put(self::$api_path . $path, $object);\n }", "title": "" }, { "docid": "577df4a8eca4576fbfbc6c8b72e0277d", "score": "0.6159901", "text": "function update_resource($name, $id, $payload, $query=null)\n{\n # So we will need to do this in a non-REST way.\n\n return send_request(\"$name/$id/edit?$query\", [\n // CURLOPT_CUSTOMREQUEST => \"PUT\",\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => [\"payload\" => json_encode($payload)],\n ]);\n}", "title": "" }, { "docid": "3389492293a758320b4c643143959b53", "score": "0.6150402", "text": "function update( $resource ){\n\n $image_path = asset_dir( 'img\\\\products\\\\') ;\n $image = 'img/products/'.$_FILES['product_image']['name'];\n\n $data = [\n\n \"product_name\" => $_POST['product_name'],\n \"product_description\" => $_POST['product_description'],\n \"product_brand\" => $_POST['product_brand'],\n \"sku\" => $_POST['sku'],\n \"product_type\" => $_POST['product_type'],\n \"updated_at\" => date( 'Y-m-d H:i:s' ),\n\n\n ];\n\n if( ! $_FILES['product_image']['error'] == 4){\n $data['product_image'] = $image;\n }\n\n if(!upload_post_image( $_FILES['product_image'], $image_path )){\n redirect( route( 'product/create?message=1' ) );\n }\n\n if( !patch( 'products', $resource, $data ) ){\n redirect( route( 'product/create?message=1' ) );\n }\n\n //Do Stock Process\n\n $stock_data = [\n\n 'product_id' => where( 'products', \"sku = {$_POST['sku']}\" )[0]['id'],\n 'stock' => $_POST['stock'],\n 'stock_limit' => $_POST['stock_limit'],\n 'created_at' => date( 'Y-m-d H:i:s' ),\n 'updated_at' => date( 'Y-m-d H:i:s' )\n\n ];\n\n if( !insert( 'inventory', $stock_data) ){\n\n redirect( route( 'product/create?message=1' ) );\n\n }\n\n redirect( route( \"product/{$resource}/edit\" ) );\n\n}", "title": "" }, { "docid": "af040437e7fb45157da33c190771f474", "score": "0.61294687", "text": "public function update($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\n\t\t$validator = Validator::make($data = Input::all(), Resource::getRulesForUpdate($id));\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\tif (Input::file('file')){\n\t\t\t$file = Input::file('file');\n\n\t\t\t$extension = $file->getClientOriginalExtension();\n\t\t\t$destinationPath = 'eltdpResources';\n\t\t\t$filename = preg_replace('/\\s+/', '_', $data['name']);\n\t\t\t$uploadSuccess = $file->move($destinationPath, $filename .'.'. $extension);\n\t\t\t\t\n\t\t\tif ($uploadSuccess) {\n\n\t\t\t\t$data['picture'] = Resource::getExtensionType($file, $destinationPath, $filename);\n\n\t\t\t\tif($data['picture']){\n\n\t\t\t\t\t$data['file'] = $destinationPath .'/'. $filename .'.'. $extension;\n\n\t\t\t\t\t$resourceId = $this->resource->create($data)->id;\n\n\t\t\t\t\treturn Redirect::route('resources.show', $resourceId)\n\t\t\t\t\t->with('message', 'Resource saved.');\n\n\t\t\t\t} else {\n\t\t\t\t\tResource::destroy($this->resource->id);\n\t\t\t\t\treturn Redirect::back()\n\t\t\t\t\t->withInput()\n\t\t\t\t\t->with('message', 'The file you are trying to upload is not supported.<br> Supported file types are pdf, doc, docx, jpg, gif, bmp, mp3, mp4');\n\t\t\t\t} \n\n\t\t\t} else {\n\n\t\t\t\treturn Redirect::back()\n\t\t\t\t\t->withInput()\n\t\t\t\t\t->withErrors($Validator)\n\t\t\t\t\t->with('message', 'Please upload a file.');\n\t\t\t}\n\t\t}\n\t\t$resource->update($data);\n\n\t\treturn Redirect::route('resources.index');\n\t}", "title": "" }, { "docid": "8b3aa10c010246b03fd3bd32304c0a11", "score": "0.6051324", "text": "public function update($input, &$resource = null)\n {\n $resource = $this->repo->findOrFail(array_get($input, $this->repo->getKeyName()));\n\n $this->validate(array_filter($input + $resource->toArray()));\n\n return $resource->update($input);\n }", "title": "" }, { "docid": "dd769c108800c8271a7f2c99245c843e", "score": "0.5977139", "text": "public function updateStream($path, $resource, Config $config)\n {\n\n }", "title": "" }, { "docid": "eaee54943a52f02e9d836bade5ff0c75", "score": "0.59397626", "text": "public function updateStream($path, $resource, Config $config)\n {\n }", "title": "" }, { "docid": "8b73dba39ae08dde13c502b11f4a48f0", "score": "0.59014064", "text": "public function update(Request $request, StorageRental $storageRental)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.58937186", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.58937186", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "1b95c33d6856dbe3d6806b3117503341", "score": "0.58881825", "text": "public function updateEntry (Liquid_Storage_Entry $entry);", "title": "" }, { "docid": "241abe88cb12c84c9ac5ad453b88fdde", "score": "0.58810633", "text": "protected function put()\n {\n $article = ArticleModel::init($this->args['articleId']);\n $this->user->assertArticleAccess($article);\n\n // Read the version to set as current.\n $versionId = trim($this->request->getBody());\n if (!is_numeric($versionId)) {\n $this->response->setStatusCode(400);\n $this->response->setHeader('Content-Type', 'text/plain');\n $this->response->setBody(\"Request body must be the integer ID of the version to promote to current. (text/plain)\");\n return;\n }\n\n try {\n $version = VersionModel::init($this->args['articleId'], $versionId);\n } catch (ResourceException $e) {\n if ($e->getCode() === ResourceException::NOT_FOUND) {\n throw new ResourceException(\n \"Version {$versionId} does not belong to this article.\",\n ResourceException::INVALID_DATA\n );\n }\n throw $e;\n }\n\n // Fail if the passed version is already the current version.\n if ($version->isCurrent) {\n throw new ResourceException(\n \"Version {$version->versionId} is already the current version.\",\n ResourceException::CONFLICT\n );\n }\n\n // Point the article to the new version.\n $article->setCurrentVersion($version);\n\n // Out the article.\n $this->response->setStatusCode(200);\n $this->response->setHeader('Content-Type', 'application/json');\n $this->response->setBody(json_encode($article));\n }", "title": "" }, { "docid": "9455f5aa9c989bb04e6b6d3e1b419576", "score": "0.586467", "text": "public function update()\n {\n $this->beginAction('update');\n $this->getResource();\n $this->applyHooks(AuthorizeResource::class);\n $this->gatherInput();\n $this->validateInput(true);\n $this->updateResource();\n $this->formatResource();\n\n return $this->makeResponse();\n }", "title": "" }, { "docid": "1d0bb5f7bf30b0c60548dedd141eeeaf", "score": "0.5822151", "text": "public function update(ProductFormRequest $request, Products $product): ProductsResource\n {\n $picture = $request->picture;\n $name = str_slug($request->name).'update_'.time();\n $folder = '/uploads/images/';\n $filePath = \"http://localhost:8888/cours-laravel/Wolfgang/public\". $folder . $name . '.' . $picture->getClientOriginalExtension();\n $this->uploadOne($picture, $folder, 'public', $name);\n\n $product->update(\n [\n 'name' => $request->name, \n 'reference' => $request->reference, \n 'picture' => $filePath, \n 'price' => $request->price, \n 'description' => $request->description,\n ]\n );\n\n return new ProductsResource($product);\n }", "title": "" }, { "docid": "e0f169404ca14678f1031bc947789344", "score": "0.57763404", "text": "public function update(Request $request, $id)\n {\n $codeno = \"JPM-\".rand(11111,99999);\n $item=Item::find($id);\n $name=$request->name;\n $newphoto=$request->photo;\n //$codeno=$request->codeno;\n $oldphoto=$item->photo;\n $price=$request->price;\n $discount=$request->discount;\n $description=$request->description;\n $subcategoryid=$request->subcategoryid;\n $brandid=$request->brandid;\n\n if($request->hasFile('photo'))\n {\n $imageName=time().'.'.$newphoto->extension();\n $newphoto->move(public_path('images/item'),$imageName);\n $filepath='images/item/'.$imageName;\n if (\\File::exists(public_path($oldphoto))) \n {\n (\\File::delete(public_path($oldphoto)));\n }\n }\n else\n {\n $filepath=$oldphoto;\n }\n\n $item->name=$name;\n $item->photo=$filepath;\n $item->codeno = $codeno;\n $item->price=$price;\n $item->discount=$discount;\n $item->description=$description;\n $item->subcategory_id=$subcategoryid;\n $item->brand_id=$brandid;\n\n $item->save();\n\n $message='Item updated successfully.';\n $status=200;\n $result= new ItemResource($item);\n\n\n $response=[\n 'status'=>$status,\n 'success'=>true,\n 'message'=>$message,\n 'data'=>$result\n ];\n return response()->json($response);\n\n }", "title": "" }, { "docid": "f509eafdef1f97698c6b5a41f544527b", "score": "0.5766481", "text": "public function update($id, Request $request)\n {\n $resource = Resource::find($id);\n $resource->name = $request->name ? $request->name : $resource->name;\n $resource->title = $request->title ? $request->title : $resource->title;\n $resource->list_of_skills = $request->list_of_skills ? $request->list_of_skills : $resource->list_of_skills;\n $resource->availability_calendar = $request->availability_calendar ? $request->availability_calendar : $resource->availability_calendar;\n $resource->pay_rate = $request->pay_rate ? $request->pay_rate : $resource->pay_rate;\n $resource->save();\n return response('Resource Updated successfully', 200)\n ->header('Content-Type', 'text/plain');\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57518756", "text": "public function update($entity);", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747582", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.5736318", "text": "public function setResource($resource);", "title": "" }, { "docid": "4bbafe0c3491a2c2b0b9d5b2f03867a1", "score": "0.57296175", "text": "private function put($resource, $json_old_resource, $jsonstring_new_resource)\n\t{\n\t\tif ($resource !== $json_old_resource->url) {\n\t\t\tError::httpApplicationError('resource mismatch, something very wrong did happen.');\n\t\t}\n\t\t\n\t\t$new = json_decode($jsonstring_new_resource);\n\t\tif ($new === NULL) {\n\t\t\tError::httpApplicationError('Resources do not match');\n\t\t}\n\t\t\n\t\t// attributes set by backend (override transmitted content)\n\t\t$o = (object)array();\n\t\t$o->url = $resource;\n\t\t$o->version = $json_old_resource->version + 1;\n\t\t\n\t\t$o->type = $json_old_resource->type;\n\t\t$o->owner = $json_old_resource->owner;\n\t\t$o->creationDateTime = $json_old_resource->creationDateTime;\n\t\t$o->editor = Authentication::getInstance()->getUserId();\n\t\t$o->editionDateTime = date('c', time());\n\t\t$o->active = TRUE;\n\n\t\t// FIXME TODO: check that the announced type is the same as the one of old resource!!!!\n\t\t\n\t\t$v = new Validator();\n\t\t$o = $v->validate($jsonstring_new_resource, $o);\n\t\t\n\t\t// best effort transaction: if a new PUT, will simply delete the last created, but that's alright.\n\t\t// FIXME but at some point active = TRUE for 2 samples !!! ==> we should NEVER rely on 'active' only to get latest version\n\n\t\t$new = Database::getInstance()->create($o);\n\t\tif (!$new) {\n\t\t\tError::httpConflict(); // FIXME duplicate update?\n\t\t}\n\t\t$this->delete($resource, $json_old_resource->version);\n\t\t\n\t\t// return the newly created object with status 201\n\t\t// entity body contains the new resource,\n\t\t// Location header contains canonical path to resource\n\t\t// FIXME ?? header('Location: ' . $o->url . '/v' . $o->version, TRUE, 200);\n\t\theader('Content-Location: ' . $o->url . '/v' . $o->version, TRUE, 200);\n\t\tprint $new;\t\n\t}", "title": "" }, { "docid": "68611877d8742448025a8506ebac8d13", "score": "0.57246256", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "af1ecfb517bec3e1060c710281cb6693", "score": "0.57188344", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'min:6|required',\n 'image' => 'required',\n 'price' => 'required|integer|min:0',\n 'description' => 'required',\n 'stock' => 'required|integer|min:0'\n ]);\n\n $product = Product::findOrFail($id);\n $input = $request->input();\n\n if($request->file('image')){\n if(Storage::exists('public/picture/product/'.$product->image)){\n Storage::delete('public/picture/product/'.$product->image);\n }\n\n $path = $request->file('image')->store('public/picture/product');\n $input['image'] = str_replace('public/picture/product/', '', $path);\n\n }\n\n $product->fill($input)->save();\n\n return redirect()->route('product.show', $id);\n\n }", "title": "" }, { "docid": "637268e654cd5d14f2255e7524a211c5", "score": "0.5713917", "text": "public function updateStream($path, $resource, array $config)\r\n\t{\r\n\t\tif (!$this->has($path)) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn $this->write($path, $resource, $config);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0796347760b32b6ecbcbd8ff6bb30bbc", "score": "0.5699665", "text": "public function update(Request $request)\n {\n //\n $old = store::find($request['id']);\n $bol = 0;\n\n if ($old['file_path'] == $request['file'] || $request['file'] == null) $bol = 0;\n else $bol++;\n\n\n $img_name = $old['file_path'];\n\n if ($bol > 0) {\n $ex = $request->file->getClientOriginalExtension();\n $img_name = time() . '.' . $ex;\n $request->file->move(public_path('images'), $img_name);\n }\n\n $old->update([\n 'name' => $request->name,\n 'price' => $request->price,\n 'discount' => $request->discount,\n \"file_path\" => $img_name,\n ]);\n session()->flash('Edit', 'T-Shirt Edited');\n $store = store::all();\n return redirect('/store');\n }", "title": "" }, { "docid": "5435b173692212577be953865689438e", "score": "0.5695458", "text": "public function update($id, $data) {// sanitize the data\n\n $resource = $this->model->find($id);\n\n if ($resource->update($data)) { return $resource; }\n return false;\n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.56914335", "text": "public function update($object);", "title": "" }, { "docid": "709be3333b89873d9e90b19464c68b23", "score": "0.56795806", "text": "public function update($id)\n\t{\n\t\t$input = Input::only('title', 'link', 'description', 'level');\n\t\t$rules = [\n\t\t\t'title' => 'required',\n\t\t\t'link' => 'required',\n\t\t\t'description' => 'required',\n\t\t\t'level' => 'required|integer'\n\t\t];\n\n\t\t$validator = Validator::make($input, $rules);\n\n\t\tif($validator->passes())\n\t\t{\n\t\t\t$resource = Resource::find($id);\n\t\t\t\n\t\t\tif (Auth::id() !== ($resource->user_id))\n\t\t\t{\n\t\t\t\treturn Redirect::back()->withInput()->withFlashMessage('You cannot edit this resource');\n\t\t\t}\n\n\t\t\t$resource->title = Input::get('title');\n\t\t\t$resource->link = Input::get('link');\n\t\t\t$resource->description = Input::get('description');\n\t\t\t$resource->level = Input::get('level');\n\t\t\t$resource->save();\n\n\t\t\t// redirect\n\t\t\treturn Redirect::route('resources.show', ['id' => $resource->id])->withFlashMessage('The resource was successfully edited!');\n\t\t}\n\t\t\n\t\treturn Redirect::back()->withInput()->withErrors($validator);\n\t}", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.56745124", "text": "public function update($data);", "title": "" }, { "docid": "127397632ca2d2e221079c5f52aca86b", "score": "0.5674328", "text": "public function update(RestRequestInterface $request, $identifier);", "title": "" }, { "docid": "8d0a97cdf24a3e49996a055c1d6f9ee9", "score": "0.56734335", "text": "public function put($data);", "title": "" }, { "docid": "aa791f30f13ec2f303130ddbd0ce5da7", "score": "0.56704366", "text": "public function update ($object);", "title": "" }, { "docid": "3003ecf965cfc6406e1202af1d9d00b1", "score": "0.56496537", "text": "public function update(Request $request,$id)\n {\n $DatosServicio=request()->except(['_token','_method']);\n if($request->hasFile('foto'))\n {\n $servicios = servicio::findOrFail($id); //verifica que id exista\n Storage::delete('public/'.$servicios->foto); //borra la foto que esta en storage\n $DatosServicio['foto']=$request->File('foto')->store('uplouds','public');\n }\n\n\n servicio::where('id','=',$id)->update($DatosServicio);\n\n $servicios = servicio::findOrFail($id);\n return view('Servicios.editar',compact('servicios'));\n }", "title": "" }, { "docid": "a348f53b5017f28ba6a056a9e2e947dd", "score": "0.564093", "text": "public function update($id, EditResourceRequest $request)\n {\n $slug = str_slug($request->get('name'), \"-\");\n $rc_item = Rc_item::findOrFail($id);\n\n $rc_item ->update([\n 'name'=> $request->get('name'),\n 'slug' =>$slug,\n 'cat_id'=>$request->get('cat_id'),\n 'img_name'=> $request->get('image_name'),\n 'img_ext'=> $request->file('image')->getClientOriginalExtension(),\n 'download_link'=>$request->get('download_link')\n ]);\n\n $file = $request->image;\n\n if(!empty($file)){\n $rc_item->img_name = $request->get('image_name');\n $rc_item->img_ext = $request->file('image')->getClientOriginalExtension();\n\n $image = $rc_item->img_name . '.' . $rc_item->img_ext;\n $rc_item->save();\n }\n\n if(!empty($file)){\n\n File::delete(public_path($this->imagePath) .$image);\n File::delete(public_path($this->thumbnailPath) . $image);\n $this->saveImage($file, $image);\n }\n\n return redirect()->back()->with('success', 'Successfully Updated!');\n }", "title": "" }, { "docid": "880715ba5af0affb767965ac42e71574", "score": "0.56374544", "text": "public function update()\n {\n // Temporary cheaty way, should see if a more effictient way is\n // available\n $this->storage->deleteLink($this->id); // Cannot have removeAllNodes called\n $this->save();\n }", "title": "" }, { "docid": "e49cdd26e7843d77b4d5140e3330abc9", "score": "0.56362814", "text": "public function update(Request $request, $id)\n {\n $product = Products::findOrFail($id);\n\n $currentPhoto = $product->image;\n\n if($request->image != $currentPhoto){ // if there is different image\n\n $extension = explode('/', mime_content_type($request->image))[1];\n $name = time().rand().'.'.$extension;\n\n // image intervention package\n // instead of import Image we use \\\n \\Image::make($request->image)->save(public_path('img/products/').$name);\n\n $request->merge(['image' => $name]);\n\n $productImage = public_path('img/products/'.$currentPhoto); //Replace the old photo with the new\n if(file_exists($productImage)){\n @unlink($productImage); //unlink delete the photo\n }\n }\n\n $product->update($request->all());\n }", "title": "" }, { "docid": "c4427773d8f9c02f5ada5a766d802347", "score": "0.5618874", "text": "function sharedresource_update_instance($sharedresource) {\n global $CFG;\n\n $sharedresource->type = 'file'; // Just to be safe\n $res = new sharedresource_base();\n\n return $res->update_instance($sharedresource);\n}", "title": "" }, { "docid": "b580434b2e577708f365194b901193c3", "score": "0.5618745", "text": "public function update() {\n\t\tif ($this->get('id') !== null) {\n\t\t\t$this->save();\n\t\t}\n\t}", "title": "" }, { "docid": "881827b74625a92ff5b0b94e03819446", "score": "0.5612258", "text": "public function update(Request $request, $id)\n {\n \n $requestData = $request->all();\n if ($request->hasFile('photo')) {\n $requestData['photo'] = $request->file('photo')\n ->store('uploads', 'public');\n }\n\n $product = Product::findOrFail($id);\n $product->update($requestData);\n\n return redirect('products')->with('flash_message', 'Product updated!');\n }", "title": "" }, { "docid": "707dd142800f64b09c09c11325fccd78", "score": "0.56037956", "text": "abstract function update($identifier);", "title": "" }, { "docid": "7b0c8cb2764c13fdb98933dbc69be738", "score": "0.55984426", "text": "public function update(Request $request, $id)\n {\n $newResource = resources::find($id);\n if($request->input('name')){\n $newResource->name = $request->input('name'); \n }\n if($request->input('description')){\n $newResource->description = $request->input('description'); \n }\n if($request->input('status')){\n $newResource->status = $request->input('status'); \n }\n if($request->input('exp_date')){\n $newResource->exp_date = $request->input('exp_date');\n }\n if($request->input('price')){\n $newResource->price = $request->input('price');\n }\n if($request->input('status')){\n $newResource->status = $request->input('status');\n }\n \n $newResource->save();\n\n return back()->with('success','Machinery Successfully Updated!');\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.5568173", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5560537", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5560537", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5560537", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5560537", "text": "public function update($id, $data);", "title": "" }, { "docid": "359d84c7d511ae4b3f898ca4163e1aaf", "score": "0.55492437", "text": "public function update(Request $request, $id)\n {\n $this->validateData();\n// Update plan\n $article = Article::findOrFail($id);\n $article -> name = $request -> input('name');\n $article -> intro = $request -> input('intro');\n $article -> text = $request -> input('text');\n\n\n if ($request->hasFile('image')) {\n\n// Get file name with extention\n $fileExtention = $request -> file('image') -> getClientOriginalName();\n// Get just file name\n $filename =pathinfo($fileExtention,PATHINFO_FILENAME);\n// Get just ext\n $extention = $request -> file('image') -> getClientOriginalExtension();\n $filenameToStore = $filename.'_'.time().'.'.$extention;\n $path = $request -> file('image') -> storeAs('public/img/articles',$filenameToStore);\n\n Storage::delete('public/img/articles/' . $article->image);\n\n $article -> image = $filenameToStore;\n }\n\n $article -> save();\n\n if($request -> input('partner-name') != ''){\n\n $partner = Partner::where('name',$request -> input('partner-name')) -> get();\n\n if($partner != null){\n $article -> partners() -> attach($partner[0]->id);\n }\n }\n\n\n\n return redirect('/articles/'.$article->id)->with('success','ArticleResource is updated');\n }", "title": "" }, { "docid": "9c815957f561d5473f845dd4d5b8d599", "score": "0.5548763", "text": "public function update(Request $request, $id)\n {\n $slider = \\App\\Slider::where('id',$id)->first();\n $slider->firstline = $request->firstline; \n $slider->secondline = $request->secondline; \n $slider->thirdline = $request->thirdline; \n $slider->status = $request->status; \n $slider->row_order = $request->row_order;\n if($request->hasFile('photo')) {\n $slider->photo = $request->file('photo')->store('uploads'.date('Y-m-d')); \n }\n $slider->save();\n return redirect('admin/slider');\n }", "title": "" }, { "docid": "d9b6fe99056043df5723394c78be7f97", "score": "0.55427986", "text": "public function update(Request $request, $id)\n {\n //\n $slider = Slider::find($id);\n //$this->authorize('pass', $pagina);\n\n $slider->fill($request->all())->save();\n $path = Storage::disk('public')->put('img-sliders', $request->file('img'));\n $slider->fill(['img' => asset($path)])->save();\n\n return redirect()->route('adminsliders.edit', $slider->id)\n ->with('info', 'Slider actualizado con éxito');\n }", "title": "" }, { "docid": "8ec34e0e6c475b60660d5237f61fb967", "score": "0.554249", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $data = $request->all();\n\n $data['slug'] = \\Str::slug($data['name']);\n $data['user_id'] = auth()->user()->id;\n\n if(isset($data['foto'])){\n $data['foto'] = Storage::disk('public')->putFile('media', $data['foto']);\n }\n\n $product->update($data);\n\n return redirect()->route('design.index')->with('success','Berhasil !');\n }", "title": "" }, { "docid": "ff8620d972e560c355108f1adf752347", "score": "0.5535139", "text": "public function update(Request $request, $id)\n {\n\n $validator = Validator::make( $request->all(), [\n 'name' => 'required|max:100|string',\n 'description' => 'required|max:100|string',\n 'selectedfield' => ['required', Rule::in(['field1', 'field2'])],\n 'availability' => ['required', Rule::in(['0', '1'])],\n ]);\n\n if ( $validator->fails() ) {\n return response()->json([\n 'data' => [\n 'success' => FALSE,\n 'errors' => $validator->errors(),\n ]\n ]);\n }\n\n $device = Device::find($id);\n $device->name = $request->name;\n $device->description = $request->description;\n $device->field = $request->selectedfield;\n $device->availability = $request->availability;\n\n if(isset($request->dev_image)){\n unlink(public_path('storage/'.$device->id.'/'.$device->image));\n $image = $request->get('dev_image');\n $image_name = time().'.'.$request->dev_image->extension();\n $request->dev_image->move(public_path('/storage/'.$device->id), $image_name);\n $device->image = $image_name;\n }\n \n $device->save();\n\n $device->image = '/public/storage/'.$device->id.'/'.$device->image;\n\n return response()->json([\n 'success' => TRUE,\n 'data' => $device,\n 'message' => \"Device Updated\"\n ]);\n }", "title": "" }, { "docid": "0b66ea137462c4641492a24a6cd276fe", "score": "0.5533594", "text": "public function update(Request $request, $id)\n {\n try {\n DB::beginTransaction();\n\n $product = $this->queryProduct($id);\n\n $product->name = $request->name;\n $product->description = $request->description != null ? $request->description : null;\n $product->is_prescription = $request->is_prescription;\n $product->image_path = null; // for now\n $product->price = $request->price;\n\n $product->save();\n\n ProductPriceHistory::create(array(\n 'product_id_fk' => $product->product_id,\n 'price' => $request->price\n ));\n\n\n if($request->quantity != null) {\n $productInventory = ProductInventory::where('product_id_fk', '=', $product->product_id)\n ->first();\n\n $productInventory->previous_value = $productInventory->current_value;\n $productInventory->current_value += (int) $request->quantity;\n\n $productInventory->save();\n }\n\n\n DB::commit();\n\n return response()->json(array(\n 'message' => 'Product successfully updated!'\n ));\n } catch(QueryException $ex) {\n DB::rollBack();\n\n return response()->json(array(\n 'message' => 'Product update failed!'\n )); \n }\n }", "title": "" }, { "docid": "66139d48c34ab92a5f49f5d92e5064cc", "score": "0.5530698", "text": "public function put_products($productName)\n{\n $raw = file_get_contents('php://input');\n $newProduct = Product::fromJson($raw);\n\n $db = new DataStore();\n $db->beginTransaction();\n $oldProduct = Product::productByName($db, $productName);\n if (is_null($oldProduct))\n throw new RESTException('Product not found.', 404);\n\n $oldProduct->update($db, $newProduct);\n $db->commit();\n echo('Product ' . $productName . ' updated.');\n}", "title": "" }, { "docid": "a60f40542a713142fac35050b8cc0c57", "score": "0.55301267", "text": "public function update(Request $request, $id)\n {\n $photo = Photo::find($id);\n $photo->album_id = $request->get(Photo::ALBUM_ID);\n $photo->title = $request->get(Photo::TITLE);\n $photo->url = $request->get(Photo::URL);\n $photo->thumbnail_url = $request->get(Photo::THUMBNAIL_URL);\n $photo->save();\n return new PhotoResource($photo);\n }", "title": "" }, { "docid": "6635eff0e783df96c39328a1351c17ab", "score": "0.5514201", "text": "public function update( $object );", "title": "" }, { "docid": "89c360360421e2cdcc1017ccb99a7828", "score": "0.5511217", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::find($id);\n\n if ( ! $product)\n {\n return $this->recordNotFound();\n }\n\n $validator = Validator::make($request->all(), array_merge(\n [\n 'sku' => 'string|between:8,14|unique:products,sku,'.$product->id.',id'\n ],\n Product::$update_rules\n ));\n\n if($validator->fails()){\n return response()->json($validator->errors(), 400);\n }\n\n $input = $request->all();\n $image_url = $product->image;\n $product->fill($input);\n\n if($request->has('image')){\n Storage::disk('public')->delete('products/'. basename($image_url));\n $uploadFolder = 'products';\n $image = $request->file('image');\n $image_uploaded_path = $image->store($uploadFolder, 'public');\n $product->image = Storage::disk('public')->url($image_uploaded_path);\n }\n\n $product->save();\n\n return response()->json([\n 'message' => 'Product successfully updated',\n 'product' => $product\n ]);\n }", "title": "" }, { "docid": "7614f731038f3fe7cc7be19a770b8134", "score": "0.5510684", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required|string|max:100',\n 'description' => 'required|string',\n 'categorie_id' => 'integer',\n 'sizes.*' =>'integer',\n 'url_image' => 'image|max:3000',\n 'code' => 'in:standard,solde',\n 'price' => 'required|numeric',\n 'reference' => 'required|alpha_num',\n \n ]);\n\n\n $product = Product::find($id);\n $product->update($request->all());\n $product->size()->sync($request->sizes);\n\n $im = $request->file('picture');\n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n }\n\n return redirect()->route('product.index')->with('message', 'Succès de la mise à jour');\n }", "title": "" }, { "docid": "66d083bb11d3019d16e02973863d6967", "score": "0.55058765", "text": "public function update(Request $request, Asset $asset)\n {\n }", "title": "" }, { "docid": "0a5b062a5dceb2e06835dd93b36cb7c2", "score": "0.5501088", "text": "public function update(Request $request, $id)\n { \n if($request->image){\n $imageName = basename($request->image->store(\"public\"));\n $request['image'] = $imageName;\n }\n Product::find($id)->update($request->all());\n session()->flash('msg', \"s: Product Updatedd successfully \");\n return redirect(route(\"products.index\"));\n }", "title": "" }, { "docid": "08757cc2c81b23ca63469f255efa2060", "score": "0.5500806", "text": "protected function update() {\n $this->client->sendRequest('POST', $this->name . ($this->key ? : (string) $this->id), $this->prepareRequestData());\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.5496017", "text": "public function update($id);", "title": "" }, { "docid": "87241a0a9cce48b64ec4be8df8b5485b", "score": "0.5493766", "text": "public function update(Request $request, Product $product) {\n $product->isOwner();\n\n $request->validate([\n 'name' => 'required|max:255',\n 'description' => 'required',\n 'price' => 'required',\n 'stock' => 'required',\n 'discount' => 'required|max:2',\n ]);\n\n $product->name = $request->name;\n $product->detail = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n $product->discount = $request->discount;\n $product->save();\n\n return new ProductResource($product);\n }", "title": "" }, { "docid": "cd61f7dfb166b27b13e2e27a951d1df3", "score": "0.54937273", "text": "public function updateObject($objectPath,$content);", "title": "" }, { "docid": "4c918686af4f25ca69e952e282b47c7c", "score": "0.54924494", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => '',\n 'description' => '',\n 'price' => '',\n 'stock' => '',\n 'picture' => ''\n ]);\n\n // Membuat object dari Model Post\n $store = Store::find($id); \n $store->title = $request->input('title');\n $store->desc = $request->input('description');\n $store->price = $request->input('price');\n $store->stock = $request->input('stock');\n $path = 'storage/store_image/'.$store->pic;\n if($request->hasFile('picture')){\n unlink($path);\n $fileNameWithExt = $request->file('picture')->getClientOriginalName();\n $filename = pathinfo($fileNameWithExt, PATHINFO_FILENAME);\n $extension = $request->file('picture')->getClientOriginalExtension();\n $filenameSimpan = $filename.'_'.time().'.'.$extension;\n $path = $request->file('picture')->storeAs('public/store_image', $filenameSimpan);\n $store->pic = $request->input('picture');\n }else{\n $filenameSimpan = $store->pic;\n }\n $store->pic = $filenameSimpan;\n\n\n $store->save();\n\n return redirect('/adminstore')->with('success', 'Data telah diubah.');\n }", "title": "" }, { "docid": "944220b7d8dc3f2475ecc0d6f47331b7", "score": "0.54867166", "text": "public function update($id, $data){\n $image = $this->findById($id);\n $this->validation($data);\n $image->fill($data);\n $image->save();\n return $image;\n }", "title": "" }, { "docid": "81ffa33c6a97b616b60b1d4825f6ed56", "score": "0.54728633", "text": "abstract public function update($object);", "title": "" }, { "docid": "3ccd617169cd697bcf05ee458b57ebd6", "score": "0.5472104", "text": "public function update(Request $request, $id)\n {\n\n\n $products = new products;\n $send = $request->all();\n if($request->hasFile('file')){\n $filename = $request->file->getClientOriginalName();\n $path = $request->file->store('storage/uploads','public');\n $send['img'] = $path;\n }\n \n\n \n $p = $products::find($id);\n $p->update($send);\n \n \n \n }", "title": "" }, { "docid": "4febf037679dde1b9296a47a3c708516", "score": "0.5461648", "text": "public function update(Request $request, $id)\n {\n $product = Product::where('id', $id)->first();\n\n if(!$product){\n return response()->json([\n 'status' => 'false',\n 'message' => 'Product not found'\n ])->setStatusCode(400, \"Product not found\");\n }\n\n $validation = Validator::make($request->all(), [\n 'title' => 'unique:products,title,' . $product->id,\n 'firm' => 'string',\n 'text' => 'string',\n 'image' => 'file|image|mimes:jpg,png|max:3072'\n ]);\n\n if($validation->fails()){\n return response()->json([\n 'status' => 'false',\n 'message' => $validation->errors()\n ])->setStatusCode(400, \"Editing error\");\n }\n\n $image = null;\n if($request->image){\n $image = $request->image->store('transport_images', 'api');\n }\n\n $product->update([\n 'title' => $request->title ? $request->title : $product->title,\n 'firm' => $request->firm ? $request->firm : $product->firm,\n 'text' => $request->text ? $request->text : $product->text,\n 'image' => $image ? 'storage/api/' . $image : $product->image\n ]);\n\n return response()->json([\n 'status' => true,\n 'post' => [\n 'title' => $product->title,\n 'datetime' => $product->updated_at->format('H:i d.m.Y'),\n 'firm' => $product->firm,\n 'text' => $product->text,\n 'tags' => $product->tags,\n 'image' => $product->image\n ]\n ])->setStatusCode(201, 'Successful creation');\n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.54605174", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "53acca1ee81047a19045a47e38ed715c", "score": "0.54542756", "text": "public function setResource($resource){\n $this->resource = $resource;\n }", "title": "" }, { "docid": "0c9339d032215169c3edaade53ef1825", "score": "0.54541975", "text": "public function update(Request $request, $id)\n {\n $vData = $request->validate([\n 'category_id' => 'required',\n 'title' => 'required',\n 'slug' => 'required',\n 'specs' => 'max:16300',\n 'details' => 'max:16300'\n ]);\n\n $product = Product::whereId($id)->update($vData);\n if($request->hasFile('file')){\n\n $cur_image = Image::where('product_id', $id)->first();\n @unlink($_SERVER['DOCUMENT_ROOT'] . '/'.$cur_image->path);\n\n\n $imageName = time().'.'.request()->file->getClientOriginalExtension();\n request()->file->move(public_path('storage/img/products/'), $imageName);\n $path = 'storage/img/products/'.$imageName;\n \n $image = Image::where('product_id', $id)->first();\n $image->path = $path;\n $image->update();\n\n\n }\n\n return back()->with('success', 'Product updated.');\n }", "title": "" }, { "docid": "2744fd02d7abb711d53573d70c4d3888", "score": "0.5453714", "text": "public function update($id)\n {\n $id = $this->filter->sanitize($id, 'int');\n\n try {\n\n $request = $this->request;\n\n $product = Product::findFirstOrFail(\n [\n 'id = ?0', 'bind' => [$id]\n ]\n );\n\n $product->assign(\n [\n 'id' => $id,\n 'name' => $request->getPut('name', 'string', $product->name),\n 'icon' => $request->getPut('name', 'string', $product->icon),\n ]\n );\n\n return $this->response($request, $product, true);\n\n } catch (ResourceNotFoundException $e) {\n return $e->returnResponse();\n }\n }", "title": "" }, { "docid": "24aefd649a6f08879c0683232037d759", "score": "0.54493034", "text": "public function update(Request $request, $id)\n {\n //Handle file upload\n if ($request->hasFile('prod_image')) {\n $filenameWithExt = $request->file('prod_image')->getClientOriginalName();\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n $extention = $request->file('prod_image')->getClientOriginalExtension();\n $fileNameToStore = $filename. '_' .time(). '.' .$extention;\n $path = $request->file('prod_image')->storeAs('public/prod_images', $fileNameToStore);\n \n } else {\n $fileNameToStore = 'noimage.jpg';\n }\n\n //Update products\n $product = Product::find($id);\n $product->title = $request->input('title');\n $product->description = $request->input('description');\n $product->notetocustomer = $request->input('notetocustomer');\n $product->prod_image = $fileNameToStore;\n $product->save();\n\n return redirect('products/'. $id);\n }", "title": "" }, { "docid": "dd047a60f5212296d1890ab530ebee18", "score": "0.5446503", "text": "public function update($id)\n {\n\n \n $validation = $this->runValidation();\n\n if (request()->ajax()) {\n\n if ($validation->getData()->status == 0) {\n return $validation;\n }\n\n }\n \n $data = $this->request->all();\n \n $resource = $this->model::findOrFail($id);\n if ($this->request->hasFile('url')) {\n\n $data['url'] = Helper::saveImage($this->request->url,\"/$this->basicRoute\");\n }\n\n if ($this->request->hasFile('image')) {\n \n $data['image'] = Helper::saveImage($this->request->image,\"/$this->basicRoute\");\n \n }\n\n $resource->update($data);\n\n toastr()->success(trans('main.saved_successfully'));\n\n if (request()->ajax()) {\n return responseJson(1,trans('main.saved_successfully'),['url'=>route($this->basicRoute . '.index')]);\n }\n\n return redirect()->route($this->basicRoute . '.index');\n }", "title": "" }, { "docid": "c47170ee30d6553b2ef17d9464e431bf", "score": "0.5446486", "text": "public function update(Request $request, $id)\n {\n $file=file_get_contents(public_path().'\\products.json');\n $data=(array)json_decode($file);\n unset($file);\n $filePath=public_path().'\\products.json';\n $found_key = array_search($id, array_column($data, 'id'));\n $data[$found_key]->type=$_REQUEST['type'];\n $data[$found_key]->title=$_REQUEST['title'];\n $data[$found_key]->firstname=$_REQUEST['firstname'];\n $data[$found_key]->mainname=$_REQUEST['mainname'];\n $data[$found_key]->price=$_REQUEST['price'];\n $data[$found_key]->numpages=$_REQUEST['numpages'];\n file_put_contents($filePath, json_encode($data));\n return redirect('product');\n }", "title": "" }, { "docid": "e0201570e4544fdade8ae1ce85d31d37", "score": "0.5444088", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'numeric|required',\n 'reference' =>'string|required'\n \n ]);\n\n $product = Product::find($id); // on recupere dans la BDD le produit correspondant a $id\n\n\n $product->update($request->all()); // mon produit est mis a jour avec toutes les infos recues\n\n $im = $request->file('picture'); // on va chercher la la photo picture\n\n if (!empty($im)) { // si ce dossier n'est pas vide \n\n $link = $request->file('picture')->store('images'); // on enregistre la photo dans le dossier image ( store =secur)\n\n\n $product->update([\n 'url_image' => $link, // je preprend mon produt et le champs url image, j'y assicie le lien link crée = $link = le nom de l'image\n ]);\n }\n \n // on utilisera la méthode sync pour mettre à jour les auteurs dans la table de liaison\n \n\n return redirect()->route('admin.index')->with('message', 'article modifié');\n \n }", "title": "" }, { "docid": "ccfb3d35b44456a2ee9c7ae900beffc7", "score": "0.5438334", "text": "function update( $resource ){\n\n $data = [\n\n 'receipt_number' => $_POST[ 'receipt_number' ],\n 'product_id' => $_POST[ 'product_id' ],\n 'quantity' => $_POST[ 'quantity' ],\n 'unit_price' => $_POST[ 'unit_price' ],\n 'receivable_image' => $_POST[ 'receivable_image' ],\n 'date_received' => $_POST[ 'receipt_number' ],\n\n ];\n\n $result = patch( 'receivables', $resource, $data );\n\n if( !$result ){\n return false;\n }\n\n return true;\n\n}", "title": "" }, { "docid": "d761b550e7c8e095517fead3d3ebe9c1", "score": "0.54356796", "text": "public function update(Request $request, $id)\n {\n $file = File::findOrFail($request->file_id);\n\n $file->id = $request->input('file_id');\n $file->name = $request->input('name');\n\n if ($file->save()) {\n return new FileResource($file);\n }\n }", "title": "" }, { "docid": "6b0d98cb805b9bcb66defa2a25539d3b", "score": "0.5434747", "text": "public function update(Request $request, $id)\n\t{\n\t\t$this->validate($request, [\n\t\t\t'name' => 'required|string|max:30',\n\t\t\t'price' => 'required|string|max:5',\n\t\t\t'release_date' => 'required|date',\n\t\t\t'auther' => 'required|string',\n\t\t\t'retailer' => 'required|string',\n\t\t\t'desc' => 'required|string',\n\t\t\t'ISBN' => 'required|numeric',\n\t\t\t'file' => 'file|image',\n\n\t\t]);\n\n\t\t$getOne = Product::findOrFail($id);\n\n\t\t$getOne->name = $request->input('name');\n\t\t$getOne->price = $request->input('price');\n\t\t$getOne->release_date = $request->input('release_date');\n\t\t$getOne->auther = $request->input('auther');\n\t\t$getOne->retailer = $request->input('retailer');\n\t\t$getOne->desc = $request->input('desc');\n\t\t$getOne->ISBN = $request->input('ISBN');\n\t\tif ($request->hasFile('file') && isset($getOne->pic_index)) {\n\t\t\tStorage::delete('public/books/'.$getOne->pic_index);\n\t\t\t$uploadHelper = $request->file('file');\n\t\t\t$path = $uploadHelper->storeAs('public/books', $uploadHelper->hashName());\n\t\t\t$getOne->pic_path = $path;\n\t\t}\n\t\t$getOne->save();\n\t\treturn redirect()->route('product.index');\n\t}", "title": "" }, { "docid": "a96003ebfe5bb93afff05477cd90b813", "score": "0.5431365", "text": "public function update(Request $request, $id)\n {\n //\n \n $homeItem = HomeItem::find($id);\n \n // dd($request->path); \n // $tempPath = $request->file('path');\n // $tempPath = ;\n // die();\n\n $photoName = \"homePhoto_\" . $homeItem->id;\n if($request->file('path') != null)\n $request->file('path')->storeAs('storage/home/',$photoName);\n\n $path = \"storage/home/\" . $photoName;\n \n \n $data = [\n 'title' => $request->title,\n 'description' => $request->description,\n 'path' => $path\n ];\n\n $homeItem->update($data);\n \n return redirect()-> route('admin.home.index');\n \n //\n // HomePhoto homePhoto;\n }", "title": "" }, { "docid": "8286c17eacfe236df6038d5372070538", "score": "0.5430898", "text": "public function update(Request $request, $id)\n { $file=Request()->file('picture');\n //validate\n $this->validate($request,[\n 'name'=>'required|max:100',\n //unique:products no me deja regrabar\n 'description'=>'required|max:500',\n 'price'=>'required|numeric',\n 'category_id'=>'required|integer',\n 'stock'=>'required|integer',\n 'purchable'=>'required|boolean'\n ]);\n //recuperar el producto de la DB\n $prod= Product::find($id); \n //save\n $prod->name = $request->name;\n $prod->description = $request->description;\n $prod->price = $request->price;\n $prod->category_id = $request->category_id;\n $prod->stock = $request->stock;\n $prod->purchable = $request->purchable;\n //guardar la imagen\n if($request->hasFile('picture')){\n $nombre= str_slug($prod->name) . '.' .request()->file('picture')->extension();\n $file->storeAs('/public/products/', $nombre);\n //asociar la imagen con el prod\n $prod->picture = $nombre; \n } \n $prod->save();\n //redirect\n return redirect('/admin/products/');\n }", "title": "" }, { "docid": "fa0ae59c9ed5781e236a66291f8f7f6f", "score": "0.5429036", "text": "public function update(StoreProductRequest $request, $id)\n {\n \n }", "title": "" }, { "docid": "e9317165d16f63837cf4020ead9f5bc5", "score": "0.54242986", "text": "public function update(Request $request, $id)\n {\n $validated = $request->validate([\n 'name' => 'required|min:3|max:50',\n 'slug' =>'unique:App\\Models\\Product,slug,'.$id.'|required',\n 'category_id' => 'required',\n 'description' => 'required|min:3',\n 'price' => 'required|numeric',\n 'img' => 'required',\n ]);\n\n $product = Product::findOrFail($id);\n $product->name = $request->name;\n $product->slug = $request->slug;\n $product->category_id = $request->category_id;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->action_price = $request->action_price;\n if($request->recomended == null){\n $request->recomended = false;\n $product->recomended = $request->recomended;\n }\n $product->recomended = $request->recomended;\n\n $product->img = $request->img;\n $product->save();\n\n $product->productRecommended()->sync($request->productRecommended);\n\n\n\n\n return redirect('/admin/product')->with('success', 'Product was Updated!');\n }", "title": "" }, { "docid": "c620c32a9166a55ea3c61d3b0b4a0d35", "score": "0.54232913", "text": "public function update(Request $request, $id)\n {\n \n $validator = Validator::make($request->all(), [\n 'nama_product' => 'max:255',\n 'harga' => 'max:10',\n \n ]);\n if ($validator -> fails()) {\n return response([\n 'error' => $validator->errors(),\n 'status' => 'Validation Error'\n ]);\n }\n $product = product::find($id);\n if ($product != null){\n $product->update($request->all());\n return response([\n 'data' => new ProductResource($product),\n 'message' => 'Adidas has been updated!'], 202);\n } else {\n return response([\n 'message'=>'No data found!',], 403);\n }\n }", "title": "" }, { "docid": "0a57d4518594a9989e97cec12943deca", "score": "0.54216003", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'storage' => ['required', 'max:255'],\n 'name' => ['required', 'string',]\n ]);\n\n $data['storage'] = $request->input('storage');\n $data['name'] = $request->input('name');\n\n SiloName::where('id', $id)->update($data);\n try {\n CloudSiloName::where('id', $id)->update($data);\n } catch (\\Throwable $th) {\n return redirect('setting/silo-setting')->with(['update' => 'Data updated successfully!']);\n }\n return redirect('setting/silo-setting')->with(['update' => 'Data updated successfully!']);\n }", "title": "" }, { "docid": "b0703c31ae5e60c6f79145b52c055770", "score": "0.54176235", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n\t\t\t'slider_large_title' => 'required',\n 'slider_small_title' => 'required',\n\t\t]);\n $requestData = $request->all();\n $slider = Slider::findOrFail($id);\n\n if ($request->hasFile('image')) {\n if (!$request->old_image='') {\n Storage::delete('public/' . $slider->image);\n }\n }\n if ($request->hasFile('image')) {\n $requestData['image'] = $request->file('image')->store('uploads', 'public');\n $setImage = 'storage/'.$requestData['image'];\n $img = Image::make($setImage)->resize(1920, 1000)->save($setImage);\n }else{\n $requestData['image'] = $request->old_image;\n }\n $slider->update($requestData);\n\n Toastr::success('Class updated!', 'Done', [\"positionClass\" => \"toast-top-right\"]);\n return redirect('admin/slider');\n }", "title": "" }, { "docid": "a44308ca5a380cae7b7e813b2c9f1a54", "score": "0.5417161", "text": "public function update(ProductRequest $request, $id)\n {\n\n $validatedData = $request->validated();\n $product = Product::find($id);\n if (file_exists($product->image) && $request['image']) {\n unlink($product->image);\n $validatedData['image'] = $this->uploadFile($request, $this->productsPath, 'image');\n }\n $product->update($validatedData);\n return redirect()->back()->with([\"heading\" => stringCutter(20, $request->name), \"message\" => \"Has Been Updated Successfully !\"]);\n }", "title": "" }, { "docid": "7ad1378cea665d5004a8344ebd4b6866", "score": "0.5414875", "text": "public function update(Request $request, $id)\n {\n $file = $request->file('image');\n\n $product = Product::where('id',$id)->first();\n if($file == NULL)\n {\n Product::where('id',$id)->update(['name'=>$request->name,'amount'=>$request->amount]);\n }\n else {\n $file_name = uniqid().'_'.$request->image->getClientOriginalName();\n\n $file->move(public_path().'/image/author/',$file_name);\n\n Product::where('id',$id)->update(['image'=>$file_name,'name'=>$request->name,'amount'=>$request->amount]);\n }\n\n History::create(['description'=> Auth::user()->name,\" edited \",\" product \",$product->name],\" as \",$request->name);\n\n return redirect()->route('products.index',['product'=>$id]);\n }", "title": "" }, { "docid": "dae8a6503505f86c42e3ac3dd124b03f", "score": "0.5414788", "text": "public function update(Request $request, $id)\n {\n $book = Book::findorFail($id);\n $book->book_name=$request->input('book_name'); \n $book->author_name=$request->input('author_name');\n $book->shelf_no=$request->input('shelf_no');\n $book->shelf_image=\"\";\n $book->row_no=$request->input('row_no');\n $book->column_no=$request->input('column_no');\n $book->book_image=\"\";\n $book->book_quantity=$request->input('book_quantity');\n if($book->save()){\n $shelf_image = $request->file('shelf_image');\n if($shelf_image != null){\n $ext = $shelf_image->getClientOriginalExtension();\n $fileName = rand(10000, 50000) . '.' . $ext;\n if($ext == 'jpg' || $ext == 'png' || $ext == 'jpeg'){\n if($shelf_image->move(public_path(), $fileName)){\n $book = Book::find($book->id);\n $book->icon = url('/') . '/' . $fileName;\n $book->save();\n }\n }\n\n }\n $book_image = $request->file('book_image');\n if($book_image != null){\n $ext = $book_image->getClientOriginalExtension();\n $fileName = rand(10000, 50000) . '.' . $ext;\n if($ext == 'jpg' || $ext == 'png' || $ext == 'jpeg'){\n if($book_image->move(public_path(), $fileName)){\n $book = Book::find($book->id);\n $book->icon = url('/') . '/' . $fileName;\n $book->save();\n }\n }\n\n }\n \n return new BookResource($book);\n \n } \n }", "title": "" }, { "docid": "ee6e8f1b9c68eb99ac3960c72ccc4b79", "score": "0.54130465", "text": "public function update(Request $request, $id)\n {\n \n $slider = Slider::find($id);\n $slider->title = $request->title;\n $slider->description = $request->description;\n $slider->slider_type = $request->slider_type;\n if ($request->file)\n {\n $file_name = $request->file -> getClientOriginalName();\n $file_name = uniqid().$file_name;\n $file_name = preg_replace('/\\s+/', '', $file_name);\n $file_type = $request->file->getClientOriginalExtension();\n $request->file-> move(public_path().'/admin/upload/sliders',$file_name);\n $file_size = $request->file->getClientSize();\n $file_size = $file_size/1000;\n $file_size = $file_size.' '.'kb';\n $new_path = url('/').'/public/admin/ecommerce/upload/sliders'.$file_name;\n $slider->image_name = $file_name;\n $slider->image_size = $file_size;\n $slider->image_extension = $file_type;\n $slider->image_url = $new_path; \n }\n $slider->update();\n return Redirect()->back()->with('status', 'Slider updated successfully!');\n }", "title": "" }, { "docid": "0e451bd98e5957fbd83c888a6f6c1040", "score": "0.5412826", "text": "public function update(Request $request, $id)\n {\n $resource = Resource::findOrFail($id);\n if($resource->update($request->all()))\n {\n if ($request->hasFile('document')) {\n if(!empty($resource->document))\n {\n Storage::delete($resource->file);\n }\n $file = $request->document;\n $path = Storage::putFile('files/board', $file);\n $resource->file = $path;\n $resource->save();\n }\n Alert::success('Document updated successfully', 'Document Updated');\n }\n else\n {\n Alert::error('Document was not updated. Please correct your errors.', 'Oops!');\n return back();\n }\n return redirect('admin/portal');\n }", "title": "" }, { "docid": "80fe54605f41c0621ee8786a51d07268", "score": "0.5410425", "text": "public function update(Request $request, $id)\n {\n $supplier = Supplier::find($id);\n $supplier->supplier_code = $request->supplier_code;\n $supplier->supplier_name = $request->supplier_name;\n $supplier->description = $request->description;\n $supplier->image = $request->image;\n \n\n if($request->hasFile('image'))\n {\n $file = $request->image;\n // Lưu tên hình vào column sp_hinh\n $supplier->image = $file->getClientOriginalName();\n \n // Chép file vào thư mục \"photos\"\n $fileSaved = $file->storeAs('public/uploads', $supplier->image);\n }\n\n $supplier->save();\n\n return redirect()->route('backend.supplier.index');\n }", "title": "" }, { "docid": "9c20822df745e41d8d41c20390064ae1", "score": "0.54103917", "text": "public function update(Request $request, $id)\n {\n $found = Supply::findOrfail($request->get('supply_id'));\n $photo=\"\"; \n if($found){\n\n if($request->hasFile('Photo')){\n Storage::delete('public/'.$found->photo);\n $photo = $request->file('Photo')->store('suppliesUploads','public'); \n }\n\n $supplies = [\n 'user_id' => auth()->id(),\n 'name' => $request->get('Name'),\n 'price' => $request->get('Price'), \n 'stock' => $request->get('Stock'), \n 'offer' => $request->get('Offer'),\n 'photo' => $photo \n ];\n\n if(Supply::where('id','=',$found->id)->update($supplies))\n return redirect('supplies')->with('success','Supply updated successfuly');\n else \n return redirect('supplies')->with('error','Something is wrong, try later');\n }\n return redirect('supplies')->with('error','Supply not found, try again'); \n \n }", "title": "" }, { "docid": "13d50b8ba5ae96627a4f7af44881f80e", "score": "0.5409944", "text": "abstract public function updateAction($id, Request $request);", "title": "" }, { "docid": "21e1460ae7fcbf94fd77a17a41f5c7af", "score": "0.54047334", "text": "public function update(Request $request, Product $product)\n {\n\n $business = $product->business_id;\n\n $this->isValid($request);\n\n if ($request->hasFile('img')) {\n $path = $request->file('img')->store('stored-imgs');\n $product->img = $path;\n }\n\n $data = $request->all();\n $product->update($data);\n\n return redirect()->route('business.show', compact('business'));\n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403913", "text": "public function update($id)\n {\n \n }", "title": "" } ]
94488f8464fb58b36081b8dc4bdd897c
Ensure that providers do not throw an error when processing a deleted user.
[ { "docid": "e32e6dd1c6a7738f7f24a5a72ef980a6", "score": "0.0", "text": "public function test_userdata_provider_implements_userlist($component) {\n $classname = manager::get_provider_classname_for_component($component);\n $this->assertTrue(is_subclass_of($classname, \\core_privacy\\local\\request\\core_userlist_provider::class));\n }", "title": "" } ]
[ { "docid": "4c1a0fdf6dbffd7946bebdb0dc394cc3", "score": "0.6309667", "text": "public function userProviderDestroy(Request $request)\n {\n $user_provider_id = $request->user_provider_id;\n $user_id = $request->user_id;\n\n if (!$user_provider_id > 0 || !$user_id > 0) {\n flash('Invalid Request. Please try again.')->error();\n\n return redirect()->back();\n } else {\n $user_provider = UserProvider::findOrFail($user_provider_id);\n\n if ($user_id == $user_provider->user->id) {\n $user_provider->delete();\n\n flash('<i class=\"fas fa-exclamation-triangle\"></i> Unlinked from User, \"'.$user_provider->user->name.'\"!')->success();\n\n return redirect()->back();\n } else {\n flash('<i class=\"fas fa-exclamation-triangle\"></i> Request rejected. Please contact the Administrator!')->warning();\n }\n }\n\n throw new GeneralException('There was a problem updating this user. Please try again.');\n }", "title": "" }, { "docid": "df97b3384206c068c283c3f1c66bf5b6", "score": "0.6051879", "text": "function test_users_can_be_deleted_true()\n {\n $this->seed();\n \n $userAdmin = User::where('email', '=', '[email protected]')->first();\n\n $user = User::factory()->create();\n\n $oldUser = User::where('email', '=', '[email protected]')->first();\n\n $token = JWTAuth::fromUser($oldUser);\n $response = $this->json('DELETE', '/api/users/'.$userAdmin->id.'?token='.$token);\n $response->assertStatus(403);\n\n $token = JWTAuth::fromUser($userAdmin);\n $response = $this->json('DELETE', '/api/users/'.$user->id.'?token='.$token);\n $response->assertNoContent();\n\n Treatment::factory()\n ->count(3)\n ->for($oldUser)\n ->create(); \n \n $response = $this->json('DELETE', '/api/users/'.$oldUser->id.'?token='.$token);\n $response->assertNoContent(); \n }", "title": "" }, { "docid": "d7daf7456632974c1493f92d3bf05e71", "score": "0.59897", "text": "public function testServiceUnSuccessfulDeleteUser()\n {\n $userId = 1;\n\n $this->userRepository->shouldReceive('delete')->andReturn(false);\n $result = $this->userService->delete($userId);\n\n $this->assertFalse($result);\n }", "title": "" }, { "docid": "c3f32e70835fbd04a7a373b5335a4d46", "score": "0.59620565", "text": "public function deleteUser()\n {\n try {\n\n $provider = $this->getProvider();\n // $provider = new Provider( array(\n // 'clientId' => $this->options['client_id'],\n // 'clientSecret' => $this->options['client_secret'],\n // 'redirectUri' => null,\n // 'urlAuthorize' => $this->options['server_url'] . '/oauth/authorize',\n // 'urlAccessToken' => $this->options['server_url'] . '/oauth/access_token',\n // 'urlResourceOwnerDetails' => $this->options['server_url'] . '/api/account',\n // ) );\n\n // get access token from the server. if not found, throw exception\n // this access_token is set when the user makes an auth request (login)\n $accessToken = $this->getAccessToken();\n\n // using access token, send update request to api\n $provider->deleteResourceOwner($accessToken); // ??\n\n // Clear attributes as the user no longer exists\n $this->clearAttributes();\n\n } catch (\\League\\OAuth2\\Client\\Provider\\Exception\\IdentityProviderException $e) {\n\n // Failed to get the access token\n exit($e->getMessage());\n\n }\n }", "title": "" }, { "docid": "1c31aadaef6bf4e2a158002ff44ec2fb", "score": "0.5926426", "text": "private function authorizeUserAddDeleteUser() : void\n {\n if (auth()->user()->role !== 'admin') {\n throw new UnauthorizedException('Permission denied.');\n }\n }", "title": "" }, { "docid": "c32ca102c3722c255cfff64dff0e6422", "score": "0.587079", "text": "function preDocDelete()\n {\n $err = parent::preDocDelete();\n if ($err == \"\") {\n $uid = $this->getRawValue(\"us_whatid\");\n if (($uid > 0) && ($uid < 10)) $err = _(\"this system user cannot be deleted\");\n }\n return $err;\n }", "title": "" }, { "docid": "f7b7f186cfdb069cd3f5a35a9ac5f34c", "score": "0.58509505", "text": "public function testUsersCanBeDeleted()\n {\n $user = factory(User::class)->create();\n\n $this->actingAs(factory(User::class)->states('admin')->create())\n ->deleteJson('api/users/'.$user->id)\n ->assertStatus(204);\n\n $this->assertDatabaseMissing('users', [\n 'id' => $user->id,\n ]);\n }", "title": "" }, { "docid": "485589e5bdfbd85336faef23d05b4f62", "score": "0.5846761", "text": "protected function validateDelete(array $userids) {\n\t\tif (!$userids) {\n\t\t\tself::exception(ZBX_API_ERROR_PARAMETERS, _('Empty input parameter.'));\n\t\t}\n\n\t\t$this->checkPermissions($userids);\n\t\t$this->checkDeleteCurrentUser($userids);\n\t\t$this->checkDeleteInternal($userids);\n\n\t\t// Check if deleted users have a map.\n\t\t$user_maps = API::Map()->get([\n\t\t\t'output' => ['name', 'userid'],\n\t\t\t'userids' => $userids\n\t\t]);\n\n\t\tif ($user_maps) {\n\t\t\t// Get first problem user and map.\n\t\t\t$user_map = reset($user_maps);\n\n\t\t\t$db_users = $this->get([\n\t\t\t\t'output' => ['alias'],\n\t\t\t\t'userids' => [$user_map['userid']],\n\t\t\t\t'limit' => 1\n\t\t\t]);\n\n\t\t\t// Get first problem user.\n\t\t\t$db_user = reset($db_users);\n\n\t\t\tself::exception(ZBX_API_ERROR_PARAMETERS,\n\t\t\t\t_s('User \"%1$s\" is map \"%2$s\" owner.', $db_user['alias'], $user_map['name'])\n\t\t\t);\n\t\t}\n\n\t\t// Check if deleted users have a screen.\n\t\t$user_screens = API::Screen()->get([\n\t\t\t'output' => ['name', 'userid'],\n\t\t\t'userids' => $userids\n\t\t]);\n\n\t\tif ($user_screens) {\n\t\t\t// Get first problem user and screen.\n\t\t\t$user_screen = reset($user_screens);\n\n\t\t\t$db_users = $this->get([\n\t\t\t\t'output' => ['alias'],\n\t\t\t\t'userids' => [$user_screen['userid']],\n\t\t\t\t'limit' => 1\n\t\t\t]);\n\n\t\t\t// Get first problem user.\n\t\t\t$db_user = reset($db_users);\n\n\t\t\tself::exception(ZBX_API_ERROR_PARAMETERS,\n\t\t\t\t_s('User \"%1$s\" is screen \"%2$s\" owner.', $db_user['alias'], $user_screen['name'])\n\t\t\t);\n\t\t}\n\n\t\t// Check if deleted users have a slide show.\n\t\t$user_slideshow = DBfetch(DBselect(\n\t\t\t'SELECT s.name,s.userid'.\n\t\t\t' FROM slideshows s'.\n\t\t\t' WHERE '.dbConditionInt('s.userid', $userids)\n\t\t));\n\n\t\tif ($user_slideshow) {\n\t\t\t$db_users = $this->get([\n\t\t\t\t'output' => ['alias'],\n\t\t\t\t'userids' => [$user_slideshow['userid']],\n\t\t\t\t'limit' => 1\n\t\t\t]);\n\n\t\t\t// Get first problem user.\n\t\t\t$db_user = reset($db_users);\n\n\t\t\tself::exception(ZBX_API_ERROR_PARAMETERS,\n\t\t\t\t_s('User \"%1$s\" is slide show \"%2$s\" owner.', $db_user['alias'], $user_slideshow['name'])\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "db27bc94995313f8e7be59c9cbe2059d", "score": "0.5840373", "text": "public function forceDeleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "3c4cbe4f6586a17b96cc59bb03befdfe", "score": "0.58336437", "text": "public function testGetDeletedUserAsProcessOwner(): void\n {\n $client = static::createAuthenticatedClient([\n 'email' => TestFixtures::PROCESS_MANAGER['email'],\n ]);\n\n $iri = $this->findIriBy(User::class,\n ['email' => TestFixtures::DELETED_USER['email']]);\n\n $client->request('GET', $iri);\n\n self::assertResponseStatusCodeSame(404);\n self::assertResponseHeaderSame('content-type',\n 'application/ld+json; charset=utf-8');\n\n self::assertJsonContains([\n '@context' => '/contexts/Error',\n '@type' => 'hydra:Error',\n 'hydra:title' => 'An error occurred',\n 'hydra:description' => 'Not Found',\n ]);\n }", "title": "" }, { "docid": "8b8ecc7f8210a6c391501bbd6adc2093", "score": "0.58332926", "text": "public function test_delete_expired_user()\n {\n $this->create_expired_user(1);\n $this->assertCount(1, User::all());\n $this->run_command();\n $this->assertCount(0, User::all());\n }", "title": "" }, { "docid": "aea26327f5630a6c718eb5aa74e6c8b1", "score": "0.5820654", "text": "function beforeDelete(){\n\t\tif($this->ref('StudentAppliedFees')->count()->getOne()>0)\n\t\t\tthrow $this->exception(\"You can Not Delete, It Contain Fees records\");\n\t\t\t\n\t\tif($this->ref('Student_Attendance')->count()->getOne()>0)\n\t\t\tthrow $this->exception(\"You can Not Delete, It Contain Attendance records\");\n\t\t\n\t\t// if($this->ref('Marks')->count()->getOne()>0)\n\t\t// \tthrow $this->exception(\"You can Not Delete, It Contain Marks records\");\n\n\n\t}", "title": "" }, { "docid": "ac1bced5c9a62c7de8baae1808e1d324", "score": "0.58055896", "text": "public function testUserCanNotDeleteItself()\n {\n $user = factory(User::class)->create();\n\n $this->actingAs($user)\n ->deleteJson('api/users/'.$user->id)\n ->assertStatus(403);\n\n $this->assertDatabaseHas('users', [\n 'id' => $user->id,\n ]);\n }", "title": "" }, { "docid": "e851b094dfb05d4f96fce4cdc647d251", "score": "0.5772309", "text": "protected function userDelete() {\n\n\n if( ($iUserID = $this->get('delete', 0)) < 1) {\n throw new PPI_Exception('Invalid User ID: ' . $iUserID);\n }\n\n if($this->getAuthData(false)->id == $iUserID) {\n \t$this->setFlashMessage('Unable to delete yourself', false);\n \t$this->redirect('admin/user');\n }\n\n $oUser = new APP_Model_User();\n $oUser->delete($iUserID);\n $this->setFlashMessage('User successfully deleted.');\n $this->redirect('admin/user');\n }", "title": "" }, { "docid": "b7e74edcb541c2c9ccfdbd6b5cef72c7", "score": "0.5728203", "text": "public function forceDeleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "b7e74edcb541c2c9ccfdbd6b5cef72c7", "score": "0.5728203", "text": "public function forceDeleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "b7e74edcb541c2c9ccfdbd6b5cef72c7", "score": "0.5728203", "text": "public function forceDeleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "b7e74edcb541c2c9ccfdbd6b5cef72c7", "score": "0.5728203", "text": "public function forceDeleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "b7e74edcb541c2c9ccfdbd6b5cef72c7", "score": "0.5728203", "text": "public function forceDeleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "b7e74edcb541c2c9ccfdbd6b5cef72c7", "score": "0.5728203", "text": "public function forceDeleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "b7e74edcb541c2c9ccfdbd6b5cef72c7", "score": "0.5728203", "text": "public function forceDeleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "b7e74edcb541c2c9ccfdbd6b5cef72c7", "score": "0.5728203", "text": "public function forceDeleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "b7e74edcb541c2c9ccfdbd6b5cef72c7", "score": "0.5728203", "text": "public function forceDeleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "467248bfb93cbed2665ae83c26e7f2f7", "score": "0.57066596", "text": "public function isLikelyDeletedUser() {\n return $this->data !== null &&\n count($this->data) > 0 &&\n strlen($this->data[\"id\"]) > 0 &&\n $this->data[\"provider_id\"] === null;\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.56761545", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.56761545", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.56761545", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.56761545", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.56761545", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.56761545", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.56761545", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.56761545", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "5688509d369c408145e0d1f75c0a182f", "score": "0.5671926", "text": "public function deleteUser()\n {\n }", "title": "" }, { "docid": "7c877a376f6e9200018941a9fe2d82e5", "score": "0.56701297", "text": "public function testGetDeletedUsersAsProcessOwner(): void\n {\n static::createAuthenticatedClient([\n 'email' => TestFixtures::PROCESS_MANAGER['email'],\n ])->request('GET', '/users', ['query' => ['exists[deletedAt]' => 1]]);\n\n self::assertResponseIsSuccessful();\n self::assertResponseHeaderSame('content-type',\n 'application/ld+json; charset=utf-8');\n self::assertMatchesResourceCollectionJsonSchema(User::class);\n\n self::assertJsonContains([\n '@context' => '/contexts/User',\n '@id' => '/users',\n '@type' => 'hydra:Collection',\n 'hydra:totalItems' => 0,\n ]);\n }", "title": "" }, { "docid": "ba552f27ec5b8366d583d86df43022f1", "score": "0.5664559", "text": "public function forceDeleted(UserPublicInfo $userPublicInfo)\n {\n //\n }", "title": "" }, { "docid": "50a7b2fd68e0a3efba8f2dc601222fac", "score": "0.5636173", "text": "public function testServiceUnSuccessfulMultipleDeleteUser()\n {\n $userIds = [1,2,3];\n\n $this->userRepository->shouldReceive('deleteUsers')->andReturn(false);\n $this->authClientRepository->shouldReceive('multipleDeleteByUserId')->andReturn(false);\n $result = $this->userService->deleteUsers($userIds);\n\n $this->assertFalse($result);\n }", "title": "" }, { "docid": "a4489dcc88a404cae48afe9e19a1e319", "score": "0.56177104", "text": "private function checkProviders()\n {\n if (empty($this->providers)) {\n throw new \\Exception('No Providers have been set in users config.');\n }\n }", "title": "" }, { "docid": "1b3c01bf86bd46367d48a8de2562b7ae", "score": "0.5616028", "text": "public function deleteUser() {\n\t\t\t\n\t\t}", "title": "" }, { "docid": "6a68b68ec3b8779d121b1fe368d90f99", "score": "0.56129956", "text": "static function processDelete(){\n $user_id = Auth1::id();\n if(!$user_id || $user_id <= 0 ) return;\n //foreach ([UserLocation::class, ] as $model) $model::deleteMany(['user_id'=>$user_id]);\n User::getLogin()->delete(true);\n }", "title": "" }, { "docid": "007efa9e8967fc15a04e7225e4d26cce", "score": "0.5608744", "text": "public function delete()\n {\n throw new \\CException('app', 'Use Manager::removeAuthItem() instead.');\n }", "title": "" }, { "docid": "a5e2f1359b0fa060a5ec2f9c15461d24", "score": "0.5607813", "text": "public function test_models_are_busted_when_deleted(): void\n {\n $user = $this->tapAndSaveUser();\n $user->forceDelete();\n\n $actual = $this->manager->eloquent()->get(\"users:{$user->id}\");\n\n $this->assertNull($actual);\n }", "title": "" }, { "docid": "95ed16ee9cacdac8aa04b5d8b299840c", "score": "0.56046563", "text": "public function checkAndDeleteUser() {\r\n $userObject = \\Yii::$app->ad->search()->findBy('sAMAccountname', TestVariables::$TEST_USER_ACCOUNT_NAME);\r\n if($userObject != null && $userObject->exists) {\r\n // delete if exists\r\n $this->assertTrue($userObject->delete());\r\n }\r\n \r\n // check if group exists\r\n $groupObject = \\Yii::$app->ad->search()->findBy('cn', TestVariables::$TEST_GROUP_NAME);\r\n if($groupObject != null && $groupObject->exists) {\r\n // delete if exists\r\n $this->assertTrue($groupObject->delete());\r\n }\r\n\r\n // check if nested group exists\r\n $nestedgroupObject = \\Yii::$app->ad->search()->findBy('cn', TestVariables::$TEST_NESTED_GROUP_NAME);\r\n if($nestedgroupObject != null && $nestedgroupObject->exists) {\r\n // delete if exists\r\n $this->assertTrue($nestedgroupObject->delete());\r\n } \r\n }", "title": "" }, { "docid": "9038db9b9a25147f46751d932af13f88", "score": "0.5601457", "text": "abstract public function deleteByUser($user);", "title": "" }, { "docid": "9972c2bec6e63afe93e4955d835e3907", "score": "0.5593115", "text": "public function one_user_can_be_deleted()\n {\n //Crear un rol para listarlo después\n $role = factory(Role::class)->create();\n\n //Se crea un usuario\n $user = factory(User::class)->create([\n 'username' => 'admin',\n 'password' => bcrypt('123456'),\n 'role_id' => $role->id,\n ]);\n\n $newUser = factory(User::class)->create();\n\n //Obtenemos su token para la sesion\n $token = \\Tymon\\JWTAuth\\Facades\\JWTAuth::fromUser($user);\n\n //Se asignan los permisos para interactuar con los modulos\n $this->assignPermissions([\n [\n 'user_id' => $user->id,\n 'url' => 'users/{user}',\n 'method' => 'DELETE'\n ]\n ]);\n\n //Se prueba que se listen correctamente los datos.\n $this->withHeaders([\"Authorization\" => 'Bearer '.$token])\n ->delete('/api/users/'.$newUser->id)\n ->assertStatus(200);\n\n //Se comprueba que se haya borrado el usuario correctamente\n $this->assertDatabaseMissing('users', [\n 'id' => $newUser->id\n ]);\n }", "title": "" }, { "docid": "e069c33c914a3cfc24aa4a4fe1572fc3", "score": "0.5582052", "text": "private function DeleteUser(){\n\n }", "title": "" }, { "docid": "06a0a71c5d5436db1989109fe3dec27c", "score": "0.5574068", "text": "public function deleteUser()\n\t{\n\t\t/**\n\t\t * Delete from Addresses\n\t\t * Delete from Profile\n\t\t * Delete from Logs\n\t\t * Delete from notifications\n\t\t * Delete from Roles\n\t\t * Delete from tokens\n\t\t */\n\t\t$this->delete();\n\t\t$this->clearEntityCacheById();\n\t\t$this->clearEntityCacheByTableColumns();\n\t}", "title": "" }, { "docid": "dfcc9e7c429e9bb5c28580e67225e5f7", "score": "0.5543966", "text": "public function remove()\n {\n // Validate that the requsting user can perform this action \n // \n // Validate that the user is not deleting their own account\n // \n // Validate that the user is not already deleted\n // \n // Mark the user as deleted and return the result\n // \n // Cascade through any content and update? \n if ($this->delete()) {\n return 'pass';\n }\n\n return 'fail';\n \n }", "title": "" }, { "docid": "8ee38f06f590d437337f22bb0b40992c", "score": "0.5525323", "text": "public function testUserDeletion() {\n\n $user = factory(User::class)->create();\n $email = $user->email;\n $user->delete();\n $this->assertDatabaseMissing('users', [\n 'email' => $email,\n ]);\n }", "title": "" }, { "docid": "1c9443dba12cb135c453e80dd2953239", "score": "0.5519802", "text": "function DeleteUserPre(&$user)\n\t{\n\t}", "title": "" }, { "docid": "da8614e5356ea094be4d3cdd6d37a34c", "score": "0.551306", "text": "public function testCantRemoveUserIdIncorrect(){\n $this->dispatch('/api/remove/id/fsdfdssf');\n $this->assertRedirectTo('/api/manage');\n \n // Make sure user has not been removed\n $userObject = $this->_getTestUserTwo();\n $this->assertEquals('apiUserTwo', $userObject->ref, 'User two has been removed for some reason!');\n }", "title": "" }, { "docid": "7f2cfa50549895382f735ac600c1850d", "score": "0.5508309", "text": "public function testUserEventDeletePolicy()\n {\n $event = factory(Event::class)->create(['user_id' => 555]);\n\n $result = $this->actingAs($this->user)\n ->delete('events/'.$event->id)\n ->exception;\n\n $this->assertInstanceOf(AuthorizationException::class, $result);\n }", "title": "" }, { "docid": "4b704e59a0c3ec86743f2c6ddb5fc9c7", "score": "0.54974544", "text": "protected function willDelete() {}", "title": "" }, { "docid": "248bea74a0fe15403370eaab6fbdc935", "score": "0.5496555", "text": "public function canBeDeletedSafely(){\n return $this->getAmountOfRegisteredEtudiants() <= 0; // Inferior to 0 will be strange but we doesn't let as\n // a functional bug\n }", "title": "" }, { "docid": "504bb1602b154404d75f28b88e8db6da", "score": "0.5493855", "text": "public function delete_provider(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect(ADMIN_PATH);\n\t\t}else {\n\t\t\t$provider_id = $this->uri->segment(4,0);\n\t\t\t$condition = array('id' => $provider_id);\n\t\t\t$this->provider_model->commonDelete(PROVIDERS,$condition);\n\t\t\t$this->setErrorMessage('success','Provider deleted successfully');\n\t\t\tredirect(ADMIN_PATH.'/provider/display_provider');\n\t\t}\n\t}", "title": "" }, { "docid": "75c46d7cff11b7f6062e584ae290d12c", "score": "0.5489107", "text": "public static function delete_if_not_applicable()\n {\n }", "title": "" }, { "docid": "fe78df07179d2c9e1baba95cf8513f2d", "score": "0.5474184", "text": "public function testCantLocateRemoveUserId(){\n $this->dispatch('/api/remove/id/9999999999999999999999');\n $this->assertRedirectTo('/api/manage');\n \n // Make sure user has not been removed\n $userObject = $this->_getTestUserTwo();\n $this->assertEquals('apiUserTwo', $userObject->ref, 'User two has been removed for some reason!');\n }", "title": "" }, { "docid": "ae97a9a2e5f688c5d2c166beb5050668", "score": "0.54609853", "text": "abstract protected function beforeDelete();", "title": "" }, { "docid": "67cf173c3d1e7342a810f989fc2ee20f", "score": "0.54565734", "text": "function bp_core_action_delete_user() {\r\n\tglobal $bp;\r\n\r\n\tif ( !is_super_admin() || bp_is_my_profile() || !$bp->displayed_user->id )\r\n\t\treturn false;\r\n\r\n\tif ( 'admin' == $bp->current_component && 'delete-user' == $bp->current_action ) {\r\n\t\t/* Check the nonce */\r\n\t\tcheck_admin_referer( 'delete-user' );\r\n\r\n\t\t$errors = false;\r\n\r\n\t\tif ( bp_core_delete_account( $bp->displayed_user->id ) ) {\r\n\t\t\tbp_core_add_message( sprintf( __( '%s has been deleted from the system.', 'buddypress' ), $bp->displayed_user->fullname ) );\r\n\t\t} else {\r\n\t\t\tbp_core_add_message( sprintf( __( 'There was an error deleting %s from the system. Please try again.', 'buddypress' ), $bp->displayed_user->fullname ), 'error' );\r\n\t\t\t$errors = true;\r\n\t\t}\r\n\r\n\t\tdo_action( 'bp_core_action_delete_user', $errors );\r\n\r\n\t\tif ( $errors )\r\n\t\t\tbp_core_redirect( $bp->displayed_user->domain );\r\n\t\telse\r\n\t\t\tbp_core_redirect( $bp->loggedin_user->domain );\r\n\t}\r\n}", "title": "" }, { "docid": "da3c3c00665051d7ff2ef0e439eb53fd", "score": "0.54273975", "text": "public function softDeleteAsUser();", "title": "" }, { "docid": "72424de54722aaf25e4f1904034de59f", "score": "0.54221785", "text": "public function forceDelete(User $user, Catalogue $catalogue)\n {\n //\n }", "title": "" }, { "docid": "96cc8feca8665fabc90a0a49915a86f0", "score": "0.5417789", "text": "public function testDeleteMethod()\n {\n $this->expectException(ModelNotFoundException::class);\n\n $user1 = User::factory()->create([\n 'name' => 'User 1',\n 'email' => '[email protected]',\n ]);\n\n $user2 = User::factory()->create([\n 'name' => 'User 2',\n 'email' => '[email protected]',\n ]);\n\n $users = $this->app->make(UserRepository::class);\n $users->delete($user1);\n $users->delete($user2->id);\n\n User::findOrFail($user1->id);\n User::findOrFail($user2->id);\n }", "title": "" }, { "docid": "1e5625f06e0ff85c97f0dba51a828c78", "score": "0.5404082", "text": "public function testCanDeleteUser()\n {\n $userRepository = App::make(UserRepositoryInterface::class);\n $user = $userRepository->destroy(12);\n $this->assertTrue((bool)$user);\n }", "title": "" }, { "docid": "f3036437a50267a128bb6e36e76ffd9e", "score": "0.5403962", "text": "public function ejectUser()\n {\n if ( exist($this->user()) )\n {\n $this->booking()->abort();\n return 1;\n }\n return 0;\n }", "title": "" }, { "docid": "baee0d9411eeaa1e430c6625c3d07f1d", "score": "0.540196", "text": "protected function processDeletedObjects() {}", "title": "" }, { "docid": "3f86aa7aa8a00aba73af431dc62ccc32", "score": "0.5396535", "text": "public function deleted(UserPublicInfo $userPublicInfo)\n {\n //\n }", "title": "" }, { "docid": "46d33ffdc9b26d6aae95eb2871fc9f85", "score": "0.53958005", "text": "public function deleting(User $user)\n {\n }", "title": "" }, { "docid": "9c9ce526069c82f40aa9fdf45fc7af6a", "score": "0.5390984", "text": "public function delete() {\n // debug_log(\"User_Interface::delete()\");\n\n $user = user( in('id') );\n // debug_log( $user );\n $re = $user->delete();\n if ( is_success($re) ) success( ['id' => in('id') ]);\n else error( ERROR_DATABASE_DELETE_FAILED );\n }", "title": "" }, { "docid": "9c9ce526069c82f40aa9fdf45fc7af6a", "score": "0.5390984", "text": "public function delete() {\n // debug_log(\"User_Interface::delete()\");\n\n $user = user( in('id') );\n // debug_log( $user );\n $re = $user->delete();\n if ( is_success($re) ) success( ['id' => in('id') ]);\n else error( ERROR_DATABASE_DELETE_FAILED );\n }", "title": "" }, { "docid": "bc0ed268c86ecdbc524692ae0306db80", "score": "0.5374095", "text": "protected function _handleProviderCallback($provider, $socialUser)\n {\n try {\n if (empty($provider) || empty($socialUser)) {\n throw new \\Exception('empty_params');\n }\n\n $user = Auth::user();\n\n //сначала проверяем может такая привязка уже есть\n $userBySocial = User::whereHas('social', function ($query) use ($provider, $socialUser) {\n $query\n ->where('social', $provider)\n ->where('social_id', $socialUser['id'])\n ;\n })->first();\n\n //проверка на существование пользователя по email\n if (!empty($socialUser['email'])) {\n $userByEmail = User::where('email', $socialUser['email'])->first();\n }\n\n if (!empty($user)) {\n //текущий пользователь и пользователь по социальной сети не совпадают\n if (!empty($userBySocial) && $user->getId() != $userBySocial->getId()) {\n Notification::put(lng('error.social_user_exists'));\n\n throw new \\Exception('social_user_exists');\n }\n } else if (!empty($userBySocial)) {\n $user = $userBySocial;\n }\n\n if (!empty($user)) {\n //текущий пользователь и пользователь по email и не совпадают\n if (!empty($userByEmail) && $user->getId() != $userByEmail->getId()) {\n Notification::put(lng('error.email_user_exists'));\n\n throw new \\Exception('email_user_exists');\n }\n } else if (!empty($userByEmail)) {\n $user = $userByEmail;\n }\n\n //avatar\n if (!empty($socialUser['avatar'])) {\n $socialUser['avatar'] = Image::createImgUrl($socialUser['avatar']['url'] ?? $socialUser['avatar'], [\n 'filename' => $socialUser['avatar']['filename'] ?? null,\n 'extension' => $socialUser['avatar']['extension'] ?? null,\n 'fit' => 300\n ]);\n }\n\n if (is_null($user)) {\n //новый пользователь\n $user = User::create($socialUser);\n } else {\n $user->email = empty($user->email) && !empty($socialUser['email']) ? $socialUser['email'] : $user->email;\n $user->avatar = empty($user->avatar) && !empty($socialUser['avatar']) ? $socialUser['avatar'] : $user->avatar;\n $user->first_name = empty($user->first_name) && !empty($socialUser['first_name']) ? $socialUser['first_name'] : $user->first_name;\n $user->last_name = empty($user->last_name) && !empty($socialUser['last_name']) ? $socialUser['last_name'] : $user->last_name;\n $user->save();\n }\n\n //привязки не было, надо создать\n if (empty($userBySocial)) {\n $exists = $user->social()->where('social', $provider)->first();\n\n if (!$exists) {\n $social = new Social([\n 'user_id' => $user->id,\n 'social' => $provider,\n 'social_id' => $socialUser['id'],\n ]);\n\n $user->social()->save($social);\n }\n }\n\n //если залогинен то пришел из настроек\n if (Auth::check()) {\n return redirect()->route('settings');\n } else {\n Auth::loginUsingId($user->id);\n\n return redirect()->route('home');\n }\n } catch (\\Exception $e) {\n if (Auth::check()) {\n return redirect()->route('settings');\n } else {\n return redirect()->route('login');\n }\n }\n }", "title": "" }, { "docid": "abd1884d8324b8cc667aed99ede26ada", "score": "0.53661305", "text": "public function deleting(User $user)\n {\n //\n }", "title": "" }, { "docid": "abd1884d8324b8cc667aed99ede26ada", "score": "0.53661305", "text": "public function deleting(User $user)\n {\n //\n }", "title": "" }, { "docid": "1daaafece36b8c965bd07e4a8eab1900", "score": "0.53624076", "text": "public function beforeDelete()\n {\n $this->roleUsers->delete();\n }", "title": "" }, { "docid": "de7c656a95a7aaab21049a58408bf648", "score": "0.5356869", "text": "public function addDeleteEntry( User $perfomer, User $oldUser );", "title": "" }, { "docid": "8b267f5952055db0089f43fc4fb52a0b", "score": "0.5352118", "text": "public function testShouldDeleteUserSucess()\n {\n $userId = 1;\n $this->delete(\"/api/users/\" . $userId)\n ->seeStatusCode(200)\n ->notSeeInDatabase('users', ['id' => $userId]);\n }", "title": "" }, { "docid": "3bf009b0163bfa2118a926c41de1c175", "score": "0.53514946", "text": "public function deleteUser()\n {\n $userManager = new UserManager;\n $commentManager = new CommentManager;\n $infoUser = $userManager->getInfo($_SESSION['id_user']);\n if ($_SESSION['id_user'] == $infoUser['id']) {\n if ($_POST['deleteUser'] == \"SUPPRIMER\") {\n $delComUser = $commentManager->delComUser($_SESSION['id_user']);\n $deleteUser = $userManager->deleteUser($_SESSION['id_user']);\n header('Location: ./');\n } else {\n throw new Exception('Impossible de supprimer le compte');\n }\n } else {\n throw new Exception('Vous n\\'êtes pas autorisé à faire cela');\n }\n }", "title": "" }, { "docid": "3ae4575cceaf13476bf3299cb93ab526", "score": "0.53394973", "text": "public function checkPreAuth(UserInterface $user)\n {\n if (!$user instanceof AppUser) {\n return;\n }\n // user is deleted, show a generic Account Not Found message.\n if ($user->isDeleted()) {\n throw new AccountExpiredException('user.account.deleted');\n }\n }", "title": "" }, { "docid": "37e9ef803e6a58a20090c67ac2be4a11", "score": "0.533212", "text": "public function test_users_can_delete_itself_account()\n {\n // First we create a test user\n $user = $this->createUser();\n\n // Then we set auth headers based on the created user\n $this->authenticated($user)\n // Then we hit the destroy endpoint\n ->destroy($user->id)\n // Then we assert status is 200, witch means we are able to delete the user\n ->assertStatus(200);\n\n // Finally we assert the user is soft-deleted on database\n $this->assertSoftDeleted('users', [\n 'name' => $user->name,\n 'email' => $user->email\n ]);\n }", "title": "" }, { "docid": "17caba8803dde59e31387f6cbd12b42f", "score": "0.53239214", "text": "public function confirmUserDeletion(): void\n {\n $this->resetErrorBag();\n\n $this->password = '';\n\n $this->dispatchBrowserEvent('confirming-delete-user');\n\n $this->confirmingUserDeletion = true;\n }", "title": "" }, { "docid": "67563503fd22919df7cc49dc1ebdbbf4", "score": "0.5322609", "text": "public function test_delete_user_with_wrong_data(){\n $user = User::first();\n Auth::login($user);\n $response = $this->call('post', '/users/delete', ['id' => -1, '_token' => csrf_token()]);\n $this->assertEquals(404, $response->getStatusCode());\n }", "title": "" }, { "docid": "389ce6d5bf52eb69c672dc3fe4aef0ca", "score": "0.53216505", "text": "public function testValidity(){\n $validations = array();\n foreach ($this->users as $user){\n $validations[] = $user->pivot->valid;\n }\n $validity = 0;\n foreach($validations as $validation){\n $validity += $validation;\n }\n if($validity < count($validations) * .5){ \n $this->users()->sync([]);\n $reviews = $this->reviews;\n foreach($reviews as &$review){\n $review->delete();\n }\n $this->location->delete();\n $this->delete();\n }\n }", "title": "" }, { "docid": "e2586c756065514376967d50350888de", "score": "0.53160155", "text": "public function before_delete() {\r\n //Determino el usuario logueado y que el post sea de él o que tenga los permisos suficientes\r\n $usuario = Load::model('usuario')->getUserLogged();\r\n if ($usuario->grupo_id == Grupo::COLABORADOR or $usuario->grupo_id == Grupo::AUTOR) {\r\n if($this->usuario_id != $usuario->id) {\r\n Flash::error('Lo sentimos, pero no posees los permisios suficientes para realizar esta acción.');\r\n return 'cancel';\r\n }\r\n }\r\n }", "title": "" }, { "docid": "e00a3d06215bf9f867a85f79d56ad7cd", "score": "0.53038996", "text": "public function testGetUndeletedUsers(): void\n {\n $response = static::createAuthenticatedClient([\n 'email' => TestFixtures::PROCESS_MANAGER['email'],\n ])->request('GET', '/users', ['query' => [\n 'exists[deletedAt]' => 0,\n ]]);\n\n self::assertResponseIsSuccessful();\n self::assertJsonContains([\n '@context' => '/contexts/User',\n '@id' => '/users',\n '@type' => 'hydra:Collection',\n 'hydra:totalItems' => 6,\n ]);\n\n self::assertCount(6, $response->toArray()['hydra:member']);\n }", "title": "" }, { "docid": "0a2b75d93d193875337df58383a817ca", "score": "0.5299959", "text": "public function removeUser()", "title": "" }, { "docid": "1849621c07311d7766aacadae89a5e8a", "score": "0.52934474", "text": "function after_delete($user_id) {\n global $wpdb;\n\n $user_obj = get_userdata($user_id);\n $email = $user_obj->user_email;\n $username = $user_obj->user_login;\n\n deleteTcAccount($username);\n\n // clean buddypress data on user delete, even if there are other users garbage data\n $wpdb->query(\"DELETE FROM `wp_bp_xprofile_data` WHERE `user_id` NOT IN ( SELECT ID FROM wp_users );\");\n}", "title": "" }, { "docid": "5a7fdf2838aaf25421d69782b945b1ea", "score": "0.5292758", "text": "public function test_to_see_if_user_can_delete_a_customer()\n {\n\n $this->delete('/customer/1', CustomerTestConstants::CUSTOMER_EXAMPLE);\n\n $this->assertDatabaseMissing('customers', CustomerTestConstants::CUSTOMER_EXAMPLE);\n }", "title": "" }, { "docid": "34b1658f1fbb7eaef5939b592e169a72", "score": "0.52849346", "text": "static function user_before_delete($user) {\n ORM::factory(\"user_home\")\n ->where(\"id\", $user->id)\n ->delete_all();\n }", "title": "" }, { "docid": "91b02d68caa402e06f067e0bcb62d9e1", "score": "0.52835214", "text": "public function testRestoRouteDELETE_user_error_4() {\r\n $this->initContext();\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $this->admin);\r\n $segments = array('user');\r\n $res = $restoRouteDELETE->route($segments);\r\n }", "title": "" }, { "docid": "2e7382381e20d22f72e9ac3c700580f9", "score": "0.5282526", "text": "public function deleteThrowsErrorIfIdDoesNotExist()\n {\n $user = User::find(1);\n $response = $this->actingAs($user, 'api')->delete(\"/api/pokemon/132940347348\")\n ->assertStatus(400);\n }", "title": "" }, { "docid": "a6ff7b9ead571a3eabfc8d8df6851b64", "score": "0.52816206", "text": "public function forceDelete(User $user, Contract $contract)\n {\n //\n }", "title": "" }, { "docid": "07c325d55228890a25d01d27de18aa0c", "score": "0.5277618", "text": "public function afterDelete()\n {\n if($this->invoice->updateCount()){\n throw new \\Exception(Yii::t('billing/invoice/notify', 'After delete invoice error'));\n }\n parent::afterDelete(); // TODO: Change the autogenerated stub\n }", "title": "" }, { "docid": "1b29d3c91f286c80ecc4abe51326d197", "score": "0.5274179", "text": "protected function deleteInternal() {\n try {\n $this->isdeleted = 1;\n $this->deleteduser = \\Yii::$app->user->getId();\n $this->deletedtime = date(\"Y-m-d H:i:s\");\n \n // validasi data terhadap rule, lempar exception jika tidak valid\n if (!$this->validate()) throw new Exception(implode(\" \\n \", $this->getErrors()), 999);\n \n return parent::updateInternal();\n } catch (\\Exception $e) {\n Yii::error($e->getMessage());\n throw $e;\n }\n }", "title": "" }, { "docid": "5adc99a814c46632000e905e78c02c7c", "score": "0.52733105", "text": "protected function checkDeleteCurrentUser(array $userIds) {\n\t\tif (in_array(self::$userData['userid'], $userIds)) {\n\t\t\tself::exception(ZBX_API_ERROR_PARAMETERS, _('User is not allowed to delete himself.'));\n\t\t}\n\t}", "title": "" }, { "docid": "394c3ad7d4d3b48c65e788495814ae64", "score": "0.52725554", "text": "public function forceDelete(User $user, Guardian $guardian)\n {\n //\n }", "title": "" }, { "docid": "c48f5987b9ab546eb15c97108fb7e74f", "score": "0.52648234", "text": "public function testUserDeleteFunctionality()\n {\n $userToBeDeleted = factory(\\App\\User::class)->create([\n 'email' => '[email protected]',\n 'password' => bcrypt('testpass'),\n 'permission' => 0 //normal user permission\n ]);\n $user = factory(\\App\\User::class)->create([\n 'email' => '[email protected]',\n 'password' => bcrypt('testpass'),\n 'permission' => 2 //admin permission\n ]);\n $this->browse(function (Browser $browser) use($userToBeDeleted) {\n $browser->visit('/login')\n ->type('email', '[email protected]')\n ->type('password', 'testpass')\n ->press('Login')\n ->visit('/admin/delete/'.$userToBeDeleted->id)\n ->assertSee('User has been deleted!');\n });\n $user->delete();\n }", "title": "" }, { "docid": "5284e38815d36d8e0dfa77142950ca5c", "score": "0.526465", "text": "public function User_delete($user) {\n\n $key = $user->getResourceLink()->getKey();\n $id = $user->getResourceLink()->getId();\n $userId = $user->getId(LTI_Tool_Provider::ID_SCOPE_ID_ONLY);\n $sql = 'DELETE FROM ' . $this->dbTableNamePrefix . LTI_Data_Connector::USER_TABLE_NAME . ' ' .\n 'WHERE (consumer_key = :key) AND (context_id = :id) AND (user_id = :user_id)';\n $query = $this->db->prepare($sql);\n $query->bindValue('key', $key, PDO::PARAM_STR);\n $query->bindValue('id', $id, PDO::PARAM_STR);\n $query->bindValue('user_id', $userId, PDO::PARAM_STR);\n $ok = $query->execute();\n\n if ($ok) {\n $user->initialise();\n }\n\n return $ok;\n\n }", "title": "" }, { "docid": "6fae51a5099ed0f82a016da27de512aa", "score": "0.52585125", "text": "function providerManagerRemove($id, $user_id)\n {\n // Check admin(group_id = 1) access\n if (in_array($this->session->userdata['group'],array(1, 20,21))) {\n $data = $this->Appointment_admin_model->getProviderManagerById($id);\n if(count($data)!=0){\n $this->Appointment_admin_model->providerManagerRemove($id, $user_id);\n $this->session->set_flashdata('success', _l('Deleted from provider manager!',$this));\n }else{\n $this->session->set_flashdata('error', _l(\"Your request was wrong!\",$this));\n }\n }else{\n $this->session->set_flashdata('error', _l(\"Unfortunately you do not have permission to this part of system.\",$this));\n }\n if($this->router->fetch_method() == \"providerManagerRemove\")\n redirect(APPOINTMENT_ADMIN_URL.\"providerManager/\".$id);\n else\n redirect(APPOINTMENT_ADMIN_URL.\"myProviderManager\");\n }", "title": "" }, { "docid": "a9088e2087bc7c2de092de2038896b44", "score": "0.52570385", "text": "public function test_component_understands_deleted_users($component) {\n $this->resetAfterTest();\n\n // Create a user.\n $user = $this->getDataGenerator()->create_user();\n\n // Delete the user and their context.\n delete_user($user);\n $usercontext = \\context_user::instance($user->id);\n $usercontext->delete();\n\n $contextlist = manager::component_class_callback($component, \\core_privacy\\local\\request\\core_user_data_provider::class,\n 'get_contexts_for_userid', [$user->id]);\n\n $this->assertInstanceOf(\\core_privacy\\local\\request\\contextlist::class, $contextlist);\n }", "title": "" }, { "docid": "1c10e904ff3f4c9ce2b14151cd5fa554", "score": "0.52554035", "text": "public function testRefreshUserWithUnsupportedUserThrowsException()\n {\n $this->expectException(UnsupportedUserException::class);\n $this->googleProvider->refreshUser(new BlahUser());\n }", "title": "" }, { "docid": "84be52aaaffcfb5a24b2f337f92966f3", "score": "0.52527857", "text": "public function test_delete_data_for_all_users_in_context() {\n global $DB;\n\n $DB->insert_record('local_mediaserver_favourite', (object) ['userid' => $this->user->id, 'title' => 'Peppa Pig']);\n\n $stream = $this->generator->create_stream(array('source' => 'url', 'reference' => 'http://initech.com/okthen.mp4', 'title' => 'Office Space', 'comments' => 1));\n $this->generator->create_comment(array('streamid' => $stream->id, 'comment' => 'Hello there'));\n\n $context = context_system::instance();\n\n provider::delete_data_for_all_users_in_context($context);\n\n $this->assertFalse($DB->record_exists('local_mediaserver_favourite', []));\n $this->assertFalse($DB->record_exists('comments', ['contextid' => $context->id, 'component' => 'local_mediaserver']));\n }", "title": "" }, { "docid": "0e8463e950483b33501a42c77aeb90d7", "score": "0.52500194", "text": "public function remove_user() { return true; }", "title": "" }, { "docid": "1df8916d63a1d2cd2d501cfaae3a3042", "score": "0.52494884", "text": "public function testSuccessfulUserDelete(): void\n {\n $crawler = $this->UserRequest('GET', '/users', null, 'admin');\n\n $csrfToken = $crawler->filter('input')->attr('value');\n\n //$csrfToken = $this->client->getContainer()->get('security.csrf.token_manager')->getToken('delete1');\n\n $this->client->request('POST', '/users/3/delete', [\n '_token' => $csrfToken,\n ]);\n\n $this->assertResponseRedirects('/users');\n $crawler = $this->client->followRedirect();\n\n $this->assertSame(0, $crawler->filter('table:contains(\"[email protected]\")')->count());\n }", "title": "" } ]
016c32cb06d6e72625b32f5a2229c535
/ Plugin Name: Headway Skin: Pressrow Plugin URI: Description: Pressrow port to Headway Author: AJ Morris Version: 1.0 Author URI:
[ { "docid": "fe00c88cec94ae2085860cfa1666436c", "score": "0.64371586", "text": "function register_pressrow_skin(){\n \n global $pressrow_skin;\n \n $options = array(\n 'header-style' => 'fixed',\n 'footer-style' => 'fixed',\n \n 'show-navigation-subpages' => false,\n 'sub-nav-width' => 250,\n \n 'show-tagline' => false,\n 'show-navigation' => true,\n 'show-breadcrumbs' => false,\n \n 'navigation-position' => 'left',\n 'header-order' => array('header', 'navigation', 'breadcrumbs'),\n 'disable-header-image' => false,\n 'disable-body-background-image' => false,\n \n 'wrapper-margin' => '15px auto',\n 'wrapper-width' => 960\n );\n \n // Register the skin.\n if(class_exists('HeadwaySkin')) $pressrow_skin = new HeadwaySkin('pressrow', 'Pressrow Skin', __FILE__, $options);\n \n}", "title": "" } ]
[ { "docid": "f9ffe48ad2f3ad6937fe276fcf4ea3fb", "score": "0.6454308", "text": "public function plug() {\n\t\t\n\t\tadd_action ( 'admin_init', array(&$this, 'wp_splash_image_back_init' ));\n\t\tadd_action ( 'admin_menu', array(&$this, 'wsi_menu' ));\n\t\tadd_action ( 'plugins_loaded', array(&$this, 'update_db_check' )); // OK since WP 3.1\n\t\tadd_filter ( 'plugin_action_links_'.WsiCommons::$pluginMainFile, array(&$this, 'wsi_filter_plugin_actions' ));\n\t\tadd_filter ( 'plugin_row_meta', array(&$this, 'set_plugin_meta'), 10, 2 );\n\n\t}", "title": "" }, { "docid": "56fa2d97b4cccd4cc802c5020deeb476", "score": "0.63977575", "text": "public function plugin_page() {\r\n\t}", "title": "" }, { "docid": "6c757dc0a20066661197bbe1a828303b", "score": "0.61476165", "text": "function plugin_before_render($vf_plugin) {\n echo \"\\n<!--vf:plugin:{$vf_plugin->post()->post_name}-->\\n\";\n }", "title": "" }, { "docid": "fa649d05beb9bca02cd8596c70e83a2f", "score": "0.60835284", "text": "function slider_2d_views_plugins() {\n return array(\n 'module' => 'slider_2d',\n 'style' => array(\n 'slider_2d' => array(\n 'title' => t('2d Slider'),\n 'theme' => 'slider_2d_view',\n 'help' => t('Display results in a carousel using jcarousel Lite.'),\n 'handler' => 'slider_2d_style_plugin',\n 'uses row plugin' => TRUE,\n 'uses options' => TRUE,\n 'type' => 'normal',\n ),\n /*'row' => array(\n 'slider_2d' => array(\n 'title' => t('Profile Fields'),\n 'help' => t('Displays the fields with profile field privacy settings.'),\n 'handler' => 'slider_2d_style_plugin_row',\n 'parent' => 'fields',\n 'theme' => 'slider_2d_views_row',\n 'uses fields' => TRUE,\n 'uses options' => TRUE,\n 'type' => 'normal', )\n ), \t\t\t\t\t\t*/\n ),\n );\n}", "title": "" }, { "docid": "fb231fd8e8975bfdc5c0ac6d557ca762", "score": "0.5981777", "text": "function plugin_row( $plugin_path, $plugin_data ) {\n\t\t$plugin_title = $plugin_data['Name'];\n\t\t$plugin_slug = sanitize_title( $plugin_title );\n\t\t$licence = $this->license->get_licence_key();\n\t\t$licence_response = $this->license->is_licence_expired();\n\t\t$licence_problem = isset( $licence_response['errors'] );\n\t\t$active = is_plugin_active( $plugin_path ) ? 'active' : '';\n\t\t$shiny_updates = version_compare( get_bloginfo( 'version' ), '4.6-beta1-37926', '>=' );\n\t\t$update_msg_classes = $shiny_updates ? 'notice inline notice-warning notice-alt post-shiny-updates' : 'pre-shiny-updates';\n\n\t\tif ( ! isset( $GLOBALS['wpmdb_meta'][ $plugin_slug ]['version'] ) ) {\n\t\t\t$installed_version = '0';\n\t\t} else {\n\t\t\t$installed_version = $GLOBALS['wpmdb_meta'][ $plugin_slug ]['version'];\n\t\t}\n\n\t\t$latest_version = $this->addon->get_latest_version( $plugin_slug );\n\n\t\t$new_version = '';\n\t\tif ( version_compare( $installed_version, $latest_version, '<' ) ) {\n\t\t\t$new_version = sprintf( __( 'There is a new version of %s available.', 'wp-migrate-db' ), $plugin_title );\n\t\t\t$new_version .= ' <a class=\"thickbox\" title=\"' . $plugin_title . '\" href=\"plugin-install.php?tab=plugin-information&plugin=' . rawurlencode( $plugin_slug ) . '&TB_iframe=true&width=640&height=808\">';\n\t\t\t$new_version .= sprintf( __( 'View version %s details', 'wp-migrate-db' ), $latest_version ) . '</a>.';\n\t\t}\n\n\t\tif ( ! $new_version && ! empty( $licence ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( empty( $licence ) ) {\n\t\t\t$settings_link = sprintf( '<a href=\"%s\">%s</a>', network_admin_url( $this->props->plugin_base ) . '#settings', _x( 'Settings', 'Plugin configuration and preferences', 'wp-migrate-db' ) );\n\t\t\tif ( $new_version ) {\n\t\t\t\t$message = sprintf( __( 'To update, go to %1$s and enter your license key. If you don\\'t have a license key, you may <a href=\"%2$s\">purchase one</a>.', 'wp-migrate-db' ), $settings_link, 'http://deliciousbrains.com/wp-migrate-db-pro/pricing/' );\n\t\t\t} else {\n\t\t\t\t$message = sprintf( __( 'To finish activating %1$s, please go to %2$s and enter your license key. If you don\\'t have a license key, you may <a href=\"%3$s\">purchase one</a>.', 'wp-migrate-db' ), $this->props->plugin_title, $settings_link, 'http://deliciousbrains.com/wp-migrate-db-pro/pricing/' );\n\t\t\t}\n\t\t} elseif ( $licence_problem ) {\n\t\t\t$message = array_shift( $licence_response['errors'] ) . sprintf( ' <a href=\"#\" class=\"check-my-licence-again\">%s</a>', __( 'Check my license again', 'wp-migrate-db' ) );\n\t\t} else {\n\t\t\treturn;\n\t\t} ?>\n\n\t\t<tr class=\"plugin-update-tr <?php echo $active; ?> wpmdbpro-custom\">\n\t\t\t<td colspan=\"3\" class=\"plugin-update\">\n\t\t\t\t<div class=\"update-message <?php echo $update_msg_classes; ?>\">\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<span class=\"wpmdb-new-version-notice\"><?php echo $new_version; ?></span>\n\t\t\t\t\t\t<span class=\"wpmdb-licence-error-notice\"><?php echo $this->license->get_licence_status_message( null, 'update' ); ?></span>\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t</tr>\n\n\t\t<?php if ( $new_version ) { // removes the built-in plugin update message ?>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\t(function( $ ) {\n\t\t\t\t\tvar wpmdb_row = jQuery( '[data-slug=<?php echo $plugin_slug; ?>]:first' );\n\n\t\t\t\t\t// Fallback for earlier versions of WordPress.\n\t\t\t\t\tif ( !wpmdb_row.length ) {\n\t\t\t\t\t\twpmdb_row = jQuery( '#<?php echo $plugin_slug; ?>' );\n\t\t\t\t\t}\n\n\t\t\t\t\tvar next_row = wpmdb_row.next();\n\n\t\t\t\t\t// If there's a plugin update row - need to keep the original update row available so we can switch it out\n\t\t\t\t\t// if the user has a successful response from the 'check my license again' link\n\t\t\t\t\tif ( next_row.hasClass( 'plugin-update-tr' ) && !next_row.hasClass( 'wpmdbpro-custom' ) ) {\n\t\t\t\t\t\tvar original = next_row.clone();\n\t\t\t\t\t\toriginal.add;\n\t\t\t\t\t\tnext_row.html( next_row.next().html() ).addClass( 'wpmdbpro-custom-visible' );\n\t\t\t\t\t\tnext_row.next().remove();\n\t\t\t\t\t\tnext_row.after( original );\n\t\t\t\t\t\toriginal.addClass( 'wpmdb-original-update-row' );\n\t\t\t\t\t}\n\t\t\t\t})( jQuery );\n\t\t\t</script>\n\t\t\t<?php\n\t\t}\n\t}", "title": "" }, { "docid": "5485ca9cb153024aaf760c6b554dac6f", "score": "0.5930678", "text": "function activate_plugin_name() {\n\t//CP_Activator::activate();\n}", "title": "" }, { "docid": "7563b1472c33e20ce1cd63163227d28d", "score": "0.5917294", "text": "function add_rich_plugins( $plugin_array ) {\r\n\r\n\t\t$plugin_array['kooShortcodes'] = KOO_TINYMCE_URI . '/plugin.js';\r\n\t\treturn $plugin_array;\r\n\r\n\t}", "title": "" }, { "docid": "49dab289ab2ec0ddbe622d53f04ff352", "score": "0.5917256", "text": "function stash_register_required_plugins() {\n\t$plugins = array(\n\n\t\t// Visual Composer\n \t\tarray(\n\t\t\t'name' \t\t\t\t=> esc_html__( 'WPBakery Visual Composer', 'stash' ), // The plugin name\n\t\t\t'slug' \t\t\t\t=> 'js_composer', // The plugin slug (typically the folder name)\n\t\t\t'source' \t\t\t\t=> trailingslashit( get_template_directory() ) . 'highgrade/plugins/js_composer.zip', // The plugin source\n\t\t\t'required' \t\t\t\t=> true, // If false, the plugin is only 'recommended' instead of required\n\t\t\t'version' \t\t\t\t=> '5.4.7', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\n\t\t\t'force_activation' \t\t=> true, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\n\t\t\t'force_deactivation' \t=> true, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\n\t\t\t'external_url' \t\t\t=> '', // If set, overrides default API URL and points to an external URL\n\t\t\t'is_callable' \t=> '', // If set, this callable will be be checked for availability to determine if a plugin is active.\n\t\t),\n\t\t// Revolution Slider\n\t\tarray(\n\t\t\t'name' \t\t\t\t=> esc_html__( 'Revolution Slider', 'stash'), // The plugin name\n\t\t\t'slug' \t\t\t\t=> 'revslider', // The plugin slug (typically the folder name)\n\t\t\t'source' \t\t\t\t=> trailingslashit( get_template_directory() ) . 'highgrade/plugins/revslider.zip', // The plugin source\n\t\t\t'required' \t\t\t\t=> false, // If false, the plugin is only 'recommended' instead of required\n\t\t\t'version' \t\t\t\t=> '5.4.7.3', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\n\t\t\t'force_activation' \t\t=> false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\n\t\t\t'force_deactivation' \t=> false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\n\t\t\t'external_url' \t\t\t=> '', // If set, overrides default API URL and points to an external URL\n\t\t\t'is_callable' \t=> '', // If set, this callable will be be checked for availability to determine if a plugin is active.\n\t\t),\n\t\t// Essential Grid\n\t\tarray(\n\t\t\t'name' \t\t\t\t=> esc_html__( 'Essential Grid', 'stash'),\n\t\t\t'slug' \t\t\t\t=> 'essential-grid',\n\t\t\t'source' \t\t\t\t=> trailingslashit( get_template_directory() ) . 'highgrade/plugins/essential-grid.zip',\n\t\t\t'required' \t\t\t\t=> false,\n\t\t\t'version' \t\t\t\t=> '2.2.4.1',\n\t\t\t'force_activation' \t\t=> false,\n\t\t\t'force_deactivation' \t=> false,\n\t\t\t'external_url' \t\t\t=> '',\n\t\t\t'is_callable' \t=> '',\n\t\t),\n\t\t// HighGrade Extender for Visual Composer\n\t\tarray(\n\t\t\t'name' \t\t\t\t=> esc_html__( 'HGR Extender for Visual Composer', 'stash'),\n\t\t\t'slug' \t\t\t\t=> 'hgr_vc_extender',\n\t\t\t'source' \t\t\t\t=> trailingslashit( get_template_directory() ) . 'highgrade/plugins/hgr_vc_extender.zip',\n\t\t\t'required' \t\t\t\t=> false,\n\t\t\t'version' \t\t\t\t=> '3.6',\n\t\t\t'force_activation' \t\t=> false,\n\t\t\t'force_deactivation' \t=> false,\n\t\t\t'external_url' \t\t\t=> '',\n\t\t\t'is_callable' \t=> '',\n\t\t),\n\t\t// HGR Custom Post Types\n\t\tarray(\n\t\t\t'name' \t\t\t\t=> esc_html__( 'HGR Essentials', 'stash'),\n\t\t\t'slug' \t\t\t\t=> 'hgr_essentials',\n\t\t\t'source' \t\t\t\t=> trailingslashit( get_template_directory() ) . 'highgrade/plugins/hgr_essentials.zip',\n\t\t\t'required' \t\t\t\t=> false,\n\t\t\t'version' \t\t\t\t=> '',\n\t\t\t'force_activation' \t\t=> false,\n\t\t\t'force_deactivation' \t=> false,\n\t\t\t'external_url' \t\t\t=> '',\n\t\t\t'is_callable' \t=> '',\n\t\t),\n\t\t// HGR MegaFooter\n\t\tarray(\n\t\t\t'name' \t\t\t\t=> esc_html__( 'HGR MegaFooter', 'stash'),\n\t\t\t'slug' \t\t\t\t=> 'hgr_megafooter',\n\t\t\t'source' \t\t\t\t=> trailingslashit( get_template_directory() ) . 'highgrade/plugins/hgr_megafooter.zip',\n\t\t\t'required' \t\t\t\t=> false,\n\t\t\t'version' \t\t\t\t=> '',\n\t\t\t'force_activation' \t\t=> false,\n\t\t\t'force_deactivation' \t=> false,\n\t\t\t'external_url' \t\t\t=> '',\n\t\t\t'is_callable' \t=> '',\n\t\t),\n\t\t//WooCommerce\n\t\tarray(\n\t\t\t'name' \t\t\t\t=> esc_html__( 'WooCommerce', 'stash'),\n\t\t\t'slug' \t\t\t\t=> 'woocommerce',\n\t\t\t'source' \t\t\t\t=> 'https://wordpress.org/plugins/woocommerce/',\n\t\t\t'required' \t\t\t\t=> false,\n\t\t\t'version' \t\t\t\t=> '',\n\t\t\t'force_activation' \t\t=> false,\n\t\t\t'force_deactivation' \t=> false,\n\t\t\t'external_url' \t\t\t=> 'https://wordpress.org/plugins/woocommerce/',\n\t\t\t'is_callable' \t=> '',\n\t\t),\n\t\t//WooCommerce jQuery Cookie Fix\n\t\tarray(\n\t\t\t'name' \t\t\t\t=> esc_html__( 'WooCommerce jQuery Cookie Fix', 'stash'),\n\t\t\t'slug' \t\t\t\t=> 'woocommerce-jquery-cookie-fix',\n\t\t\t'source' \t\t\t\t=> 'https://github.com/rynaldos/woocommerce-js-cookie-fix/archive/master.zip',\n\t\t\t'required' \t\t\t\t=> false,\n\t\t\t'version' \t\t\t\t=> '',\n\t\t\t'force_activation' \t\t=> false,\n\t\t\t'force_deactivation' \t=> false,\n\t\t\t'external_url' \t\t\t=> 'https://github.com/rynaldos/woocommerce-js-cookie-fix/archive/master.zip',\n\t\t\t'is_callable' \t=> '',\n\t\t),\n\n\t\t// Contact Form 7\n\t\tarray(\n\t\t\t'name' \t\t\t\t\t=> esc_html__( 'Contact Form 7', 'stash'),\n\t\t\t'slug' \t\t\t\t\t=> 'contact-form-7',\n\t\t\t'required'\t\t\t\t=> false,\n\t\t),\n\n\t\t// Widget Importer & Exporter\n\t\tarray(\n\t\t\t'name' \t\t\t\t\t=> esc_html__( 'Widget Importer & Exporter', 'stash'),\n\t\t\t'slug' \t\t\t\t\t=> 'widget-importer-exporter',\n\t\t\t'required'\t\t\t\t=> false,\n\t\t),\n\n\t\t// Redux Framework\n\t\tarray(\n\t\t\t'name' \t\t\t\t\t=> esc_html__( 'Redux Framework', 'stash'),\n\t\t\t'slug' \t\t\t\t\t=> 'redux-framework',\n\t\t\t'required'\t\t\t\t=> false,\n\t\t),\n\n\n\n\t);\n\n\t/*\n\t * Array of configuration settings. Amend each line as needed.\n\t *\n\t * TGMPA will start providing localized text strings soon. If you already have translations of our standard\n\t * strings available, please help us make TGMPA even better by giving us access to these translations or by\n\t * sending in a pull-request with .po file(s) with the translations.\n\t *\n\t * Only uncomment the strings in the config array if you want to customize the strings.\n\t */\n\t$config = array(\n\t\t'id' => 'stash', // Unique ID for hashing notices for multiple instances of TGMPA.\n\t\t'default_path' => '', // Default absolute path to bundled plugins.\n\t\t'menu' => 'tgmpa-install-plugins', // Menu slug.\n\t\t'has_notices' => true, // Show admin notices or not.\n\t\t'dismissable' => true, // If false, a user cannot dismiss the nag message.\n\t\t'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.\n\t\t'is_automatic' => false, // Automatically activate plugins after installation or not.\n\t\t'message' => '', // Message to output right before the plugins table.\n\t);\n\n\ttgmpa( $plugins, $config );\n\t}", "title": "" }, { "docid": "89804eba25f58008c6c93c4f3fdfabff", "score": "0.5911946", "text": "public function plugin_page() {\n\n wp_enqueue_style( 'gold-admin-style' );\n echo '<div class=\"wrap\">';\n require_once SF_CHOWDHURYGOLD_PLUGIN_DIR . 'includes/Admin/views/goldprice_dashboard.php';\n echo '</div>';\n }", "title": "" }, { "docid": "6ebe4a806e5dd108bffe6f3130400f88", "score": "0.5903342", "text": "function ghostpool_socialize_plugin_update() {}", "title": "" }, { "docid": "20a73eafb433b21662872a8610463696", "score": "0.5859246", "text": "function plugin()\n\t{\n\n\n\t\tif ($plugin_name = $this->TMPL->fetch_param('plugin_name'))\n\t\t{\n\t\t\t// Prepare vars\n\t\t\t$this->SESS->cache['mc']['player']['plugin_list'] = '';\n\n\t\t\t// Process each param\n\t\t\t$params = '';\n\t\t\tforeach ($this->TMPL->tagparams as $pname => $pvalue)\n\t\t\t{\n\t\t\t\tif ($pname != \"plugin_name\") $params .= $pname . ': \"' . $pvalue . '\", ';\n\t\t\t}\n\n\t\t\t// Format params into full plugin line\n\t\t\t$plugin = $this->indent(PHP_EOL . $plugin_name . \": { \" . trim($params, ', ') . \" },\");\n\n\t\t\t// store result in session for use upstream\n\t\t\t$this->SESS->cache['mc']['player']['plugin_list'] .= $plugin;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_log_item(\"ERROR in MC Player plugin: No 'plugin_name' specified for plugin; unable to continue\");\n\t\t\treturn $this->TMPL->no_results();\n\t\t}\n\n\t}", "title": "" }, { "docid": "b5630053b33e9aa30bb90e3d8c628677", "score": "0.5857726", "text": "function plugin_activated() {\n\t\t\n }", "title": "" }, { "docid": "57a841bf6f0146fa9791b6b88607e3cb", "score": "0.58520913", "text": "function add_rich_plugins( $plugin_array )\n\t\t{\n if ( version_compare( get_bloginfo('version'), '3.9', '>=' ) ) {\n \t\t\t$plugin_array['BeanShortcodes'] = BEAN_SC_ADMIN_URI . '/plugin.js';\n } else {\n $plugin_array['BeanShortcodes'] = BEAN_SC_ADMIN_URI . '/plugin-pre3.9.js';\n }\n\n\t\t\treturn $plugin_array;\n\t\t}", "title": "" }, { "docid": "cbe504c713cdd10b9ef5385d5244a468", "score": "0.5822772", "text": "function activate_justine_plugin() {\n Inc\\Base\\Activate::activate();\n}", "title": "" }, { "docid": "e9821bc7b00688db3bbb1cfc05ca4a72", "score": "0.57969517", "text": "abstract public function getPlugin();", "title": "" }, { "docid": "9d8bf01824e3d96b0afda5cc620ffba4", "score": "0.5792405", "text": "function bw_register_plugins() {\r\n\t$plugins = array(\r\n\t\t// This is an example of how to include a plugin pre-packaged with a theme\r\n\t\tarray(\r\n\t\t\t'name' => 'WPBakery Visual Composer',\r\n\t\t\t// The plugin name\r\n\t\t\t'slug' => 'js_composer',\r\n\t\t\t// The plugin slug (typically the folder name)\r\n\t\t\t'source' => get_template_directory_uri() . '/inc/plugins/js_composer.zip',\r\n\t\t\t// The plugin source\r\n\t\t\t'required' => false,\r\n\t\t\t// If false, the plugin is only 'recommended' instead of required\r\n\t\t\t'version' => '4.11.1',\r\n\t\t\t// E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\r\n\t\t\t'force_activation' => false,\r\n\t\t\t// If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\r\n\t\t\t'force_deactivation' => false,\r\n\t\t\t// If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\r\n\t\t\t'external_url' => '',\r\n\t\t\t// If set, overrides default API URL and points to an external URL\r\n\t\t),\r\n\t\tarray(\r\n\t\t\t'name' => 'BW Portfolio',\r\n\t\t\t// The plugin name\r\n\t\t\t'slug' => 'bw-portfolio',\r\n\t\t\t// The plugin slug (typically the folder name)\r\n\t\t\t'source' => get_template_directory_uri() . '/inc/plugins/bw_portfolio.zip',\r\n\t\t\t// The plugin source\r\n\t\t\t'required' => true,\r\n\t\t\t// If false, the plugin is only 'recommended' instead of required\r\n\t\t\t'version' => '0.0.8',\r\n\t\t\t// E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\r\n\t\t\t'force_activation' => false,\r\n\t\t\t// If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\r\n\t\t\t'force_deactivation' => false,\r\n\t\t\t// If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\r\n\t\t\t'external_url' => '',\r\n\t\t\t// If set, overrides default API URL and points to an external URL\r\n\t\t),\r\n\t\tarray(\r\n\t\t\t'name' => 'Envato Market',\r\n\t\t\t// The plugin name\r\n\t\t\t'slug' => 'envato-market',\r\n\t\t\t// The plugin slug (typically the folder name)\r\n\t\t\t'source' => get_template_directory_uri() . '/inc/plugins/envato-market.zip',\r\n\t\t\t// The plugin source\r\n\t\t\t'required' => false,\r\n\t\t\t// If false, the plugin is only 'recommended' instead of required\r\n\t\t\t'version' => '1.0.0-beta',\r\n\t\t\t// E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\r\n\t\t\t'force_activation' => false,\r\n\t\t\t// If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\r\n\t\t\t'force_deactivation' => false,\r\n\t\t\t// If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\r\n\t\t\t'external_url' => '',\r\n\t\t\t// If set, overrides default API URL and points to an external URL\r\n\t\t),\r\n\t\tarray(\r\n\t\t\t'name' => 'Contact Form 7',\r\n\t\t\t// The plugin name\r\n\t\t\t'slug' => 'contact-form-7',\r\n\t\t\t// The plugin slug (typically the folder name)\r\n\t\t\t'required' => false,\r\n\t\t\t// If false, the plugin is only 'recommended' instead of required\r\n\t\t\t'force_activation' => false,\r\n\t\t\t// If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\r\n\t\t\t'force_deactivation' => false,\r\n\t\t\t// If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\r\n\t\t\t'external_url' => 'https://wordpress.org/plugins/contact-form-7/',\r\n\t\t\t// If set, overrides default API URL and points to an external URL\r\n\t\t),\r\n\t\tarray(\r\n\t\t\t'name' => 'WooCommerce',\r\n\t\t\t// The plugin name\r\n\t\t\t'slug' => 'woocommerce',\r\n\t\t\t// The plugin slug (typically the folder name)\r\n\t\t\t'required' => false,\r\n\t\t\t// If false, the plugin is only 'recommended' instead of required\r\n\t\t\t'force_activation' => false,\r\n\t\t\t// If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\r\n\t\t\t'force_deactivation' => false,\r\n\t\t\t// If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\r\n\t\t\t'external_url' => 'https://wordpress.org/plugins/woocommerce/',\r\n\t\t\t// If set, overrides default API URL and points to an external URL\r\n\t\t),\r\n\t);\r\n\r\n\t// Change this to your theme text domain, used for internationalising strings\r\n\t$theme_text_domain = 'brainwave';\r\n\r\n\t/**\r\n\t * Array of configuration settings. Amend each line as needed.\r\n\t * If you want the default strings to be available under your own theme domain,\r\n\t * leave the strings uncommented.\r\n\t * Some of the strings are added into a sprintf, so see the comments at the\r\n\t * end of each line for what each argument will be.\r\n\t */\r\n\t$config = array(\r\n\t\t'domain' => $theme_text_domain, // Text domain - likely want to be the same as your theme.\r\n\t\t'default_path' => '', // Default absolute path to pre-packaged plugins\r\n\t\t'parent_menu_slug' => 'themes.php', // Default parent menu slug\r\n\t\t'parent_url_slug' => 'themes.php', // Default parent URL slug\r\n\t\t'menu' => 'install-required-plugins', // Menu slug\r\n\t\t'has_notices' => true, // Show admin notices or not\r\n\t\t'is_automatic' => true, // Automatically activate plugins after installation or not\r\n\t\t'message' => '', // Message to output right before the plugins table\r\n\t);\r\n\ttgmpa( $plugins, $config );\r\n}", "title": "" }, { "docid": "70e64ddc4063cc6a0d1455616ec43680", "score": "0.5782172", "text": "function identity_register_required_plugins() {\r\n\t \r\n\t$identity_layerslider_path = get_template_directory() . '/admin/lib/plugins/layersliderwp.zip';\r\n\t$identity_vc_path = get_template_directory() . '/admin/lib/plugins/visual-composer.zip';\r\n\t$identity_revslider_path = get_template_directory() . '/admin/lib/plugins/revslider.zip';\r\n\t$identity_posts_path = get_template_directory() . '/admin/lib/plugins/ProfTeamExtensions.zip';\r\n\t\r\n\t\r\n\t\r\n\t$plugins = array(\r\n\r\n\t\t// This is an example of how to include a plugin pre-packaged with a theme\t\r\n\t\tarray(\r\n\t\t\t'name' \t\t\t\t=> 'Layerslider', // The plugin name\r\n\t\t\t'slug' \t\t\t\t=> 'LayerSlider', // The plugin slug (typically the folder name)\r\n\t\t\t'source' \t\t\t\t=> $identity_layerslider_path, // The plugin source\r\n\t\t\t'required' \t\t\t\t=> false, // If false, the plugin is only 'recommended' instead of required\r\n\t\t\t'version' \t\t\t\t=> '4.6.0', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\r\n\t\t\t'force_activation' \t\t=> false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\r\n\t\t\t'force_deactivation' \t=> false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\r\n\t\t\t'external_url' \t\t\t=> '', // If set, overrides default API URL and points to an external URL\r\n\t\t),\r\n\t\t\r\n\t\tarray(\r\n\t\t\t'name' \t\t\t\t=> 'Visual Composer', // The plugin name\r\n\t\t\t'slug' \t\t\t\t=> 'js_composer', // The plugin slug (typically the folder name)\r\n\t\t\t'source' \t\t\t\t=> $identity_vc_path, // The plugin source\r\n\t\t\t'required' \t\t\t\t=> true, // If false, the plugin is only 'recommended' instead of required\r\n\t\t\t'version' \t\t\t\t=> '3.6.3', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\r\n\t\t\t'force_activation' \t\t=> false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\r\n\t\t\t'force_deactivation' \t=> false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\r\n\t\t\t'external_url' \t\t\t=> '', // If set, overrides default API URL and points to an external URL\r\n\t\t),\r\n\t\t\r\n\t\tarray(\r\n\t\t\t'name' \t\t\t\t=> 'Revolution Slider', // The plugin name\r\n\t\t\t'slug' \t\t\t\t=> 'revslider', // The plugin slug (typically the folder name)\r\n\t\t\t'source' \t\t\t\t=> $identity_revslider_path, // The plugin source\r\n\t\t\t'required' \t\t\t\t=> true, // If false, the plugin is only 'recommended' instead of required\r\n\t\t\t'version' \t\t\t\t=> '4.6', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\r\n\t\t\t'force_activation' \t\t=> false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\r\n\t\t\t'force_deactivation' \t=> false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\r\n\t\t\t'external_url' \t\t\t=> '', // If set, overrides default API URL and points to an external URL\r\n\t\t),\t\t\r\n\t\t\r\n\t\tarray(\r\n\t\t\t'name' \t\t\t\t=> 'ProfTeam Extensions', // The plugin name\r\n\t\t\t'slug' \t\t\t\t=> 'ProfTeamExtensions', // The plugin slug (typically the folder name)\r\n\t\t\t'source' \t\t\t\t=> $identity_posts_path, // The plugin source\r\n\t\t\t'required' \t\t\t\t=> true, // If false, the plugin is only 'recommended' instead of required\r\n\t\t\t'version' \t\t\t\t=> '1.0', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\r\n\t\t\t'force_activation' \t\t=> false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\r\n\t\t\t'force_deactivation' \t=> false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\r\n\t\t\t'external_url' \t\t\t=> '', // If set, overrides default API URL and points to an external URL\r\n\t\t),\t\t\t\r\n\t\t\r\n\t\t\r\n array(\r\n 'name' => 'contact-form-7',\r\n 'slug' => 'contact-form-7',\r\n 'required' => false,\r\n ),\r\n\t\t\t\r\n\t);\r\n\t\r\n\t\r\n\t$theme_text_domain = 'sentient';\r\n\r\n\t/**\r\n\t * Array of configuration settings. Amend each line as needed.\r\n\t * If you want the default strings to be available under your own theme domain,\r\n\t * leave the strings uncommented.\r\n\t * Some of the strings are added into a sprintf, so see the comments at the\r\n\t * end of each line for what each argument will be.\r\n\t */\r\n\t$config = array(\r\n\t\t'domain' \t\t=> $theme_text_domain, \t// Text domain - likely want to be the same as your theme.\r\n\t\t'default_path' \t\t=> '', \t// Default absolute path to pre-packaged plugins\r\n\t\t'parent_menu_slug' \t=> 'themes.php', \t\t\t\t// Default parent menu slug\r\n\t\t'parent_url_slug' \t=> 'themes.php', \t\t\t\t// Default parent URL slug\r\n\t\t'menu' \t\t=> 'install-required-plugins', \t// Menu slug\r\n\t\t'has_notices' \t=> true, // Show admin notices or not\r\n\t\t'is_automatic' \t=> false,\t\t\t\t\t \t// Automatically activate plugins after installation or not\r\n\t\t'message' \t\t\t=> '',\t\t\t\t\t\t\t// Message to output right before the plugins table\r\n\t\t'strings' \t\t=> array(\r\n\t\t\t'page_title' \t\t\t=> __( 'Install Required Plugins', 'sentient'),\r\n\t\t\t'menu_title' \t\t\t=> __( 'Install Plugins', 'sentient' ),\r\n\t\t\t'installing' \t\t\t=> __( 'Installing Plugin: %s', 'sentient' ), // %1$s = plugin name\r\n\t\t\t'oops' \t\t\t=> __( 'Something went wrong with the plugin API.', 'sentient' ),\r\n\t\t\t'notice_can_install_required' \t\t\t=> _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.' ), // %1$s = plugin name(s)\r\n\t\t\t'notice_can_install_recommended'\t\t\t=> _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.' ), // %1$s = plugin name(s)\r\n\t\t\t'notice_cannot_install' \t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s)\r\n\t\t\t'notice_can_activate_required' \t\t\t=> _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s)\r\n\t\t\t'notice_can_activate_recommended'\t\t\t=> _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s)\r\n\t\t\t'notice_cannot_activate' \t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s)\r\n\t\t\t'notice_ask_to_update' \t\t\t\t\t\t=> _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' ), // %1$s = plugin name(s)\r\n\t\t\t'notice_cannot_update' \t\t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s)\r\n\t\t\t'install_link' \t\t\t\t\t \t\t\t=> _n_noop( 'Begin installing plugin', 'Begin installing plugins' ),\r\n\t\t\t'activate_link' \t\t\t\t \t\t\t=> _n_noop( 'Activate installed plugin', 'Activate installed plugins' ),\r\n\t\t\t'return' \t\t\t=> __( 'Return to Required Plugins Installer', 'sentient' ),\r\n\t\t\t'plugin_activated' \t\t\t=> __( 'Plugin activated successfully.', 'sentient' ),\r\n\t\t\t'complete' \t\t\t\t\t\t\t\t\t=> __( 'All plugins installed and activated successfully. %s', 'sentient' ), // %1$s = dashboard link\r\n\t\t\t'nag_type'\t\t\t\t\t\t\t\t\t=> 'updated' // Determines admin notice type - can only be 'updated' or 'error'\r\n\t\t)\r\n\t);\r\n\r\n\ttgmpa( $plugins, $config );\r\n\r\n}", "title": "" }, { "docid": "9d7e5bf66ba06fb0fc354109e9e7b410", "score": "0.5777312", "text": "function init_plugin(){\r\n\t\tif( ! function_exists( 'ZNPB' ) ){\r\n\t\t\tadd_action( 'admin_notices', array( $this, 'show_admin_notice' ) );\r\n\t\t}\r\n\t\telse{\r\n\t\t\tadd_action( 'wp_enqueue_scripts', array($this, 'scripts') );\r\n\t\t\t//require dirname( __FILE__ ) . '/animated-text-element-shortcode.php';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "44282b884493a807bc3d594445577e5e", "score": "0.5776847", "text": "function shiftr_editor( $plugin_array ) {\n\n // Add Email plugin\n $plugin_array['email_link_plugin'] = get_template_directory_uri() . '/assets/scripts/editor.js';\n\n // Add Phone plugin\n $plugin_array['phone_link_plugin'] = get_template_directory_uri() . '/assets/scripts/editor.js';\n\n return $plugin_array;\n}", "title": "" }, { "docid": "08cfb0bb9ecba3a0455e4c564b96019d", "score": "0.57766753", "text": "function activate_loki_plugin() {\r\n\tInc\\Base\\Activate::activate();\r\n}", "title": "" }, { "docid": "2eee01df9532c532f2cce582c8cac791", "score": "0.57757556", "text": "function incode_movies_plugin_activate(){\n\t// add option to then identify the time of activation of the plug-in in admin_init action.\n\tadd_option('Activated_Plugin', 'Plugin-Slug');\n}", "title": "" }, { "docid": "d97fe2aad7660f20f45d64b45216c192", "score": "0.5768008", "text": "function after_plugin_row_wpcb($plugin_name) {\n\n $is_navt = (( stristr($plugin_name, 'navt.php') === FALSE ) ? 0: 1);\n do_action('dbnavt', NAVT_GEN, sprintf(\"%s - %s, is_navt: %s\\n\", __FUNCTION__, $plugin_name, $is_navt));\n\n if( $is_navt ) {\n $uninstall_url = NAVT::get_url() . \"/app/navt_utl.php?navt_action=uninstall&amp;plugin=$plugin_name&amp;_wpnonce=@once@\";\n $reset_url = NAVT::get_url() . \"/app/navt_utl.php?navt_action=reset\";\n $t[0] = __(\"Sets all NAVT created database options to their default values. This will cause any previously created Navigation Groups to be removed.\", 'navt_domain');\n $t[1] = __(\"Removes all NAVT created database options and automatically deactivates the plugin.\", 'navt_domain');\n\n $html =\n \"<div class='navtinfo' style='display:none;'>\n <div>\n <fieldset style='border: 1px solid #ccc;padding:5px; margin-top: 10px;'>\n <legend style='font-size: 1.1em; font-weight: bold; color:#666;'>Uninstall/Reset NAVT Plugin Options</legend>\n <ul>\n <li><a href='$reset_url' title='\". __('Reset this plugin', 'navt_domain').\"'>\" .__('Reset', 'navt_domain') . \"</a><p>\" . $t[0] .\"</p></li>\n <li><a class='navt_uninstall' href='$uninstall_url' title='\" . __('Uninstall this plugin', 'navt_domain') .\"'>\". __('Uninstall', 'navt_domain') . \"</a><p>\" . $t[1] .\"</p></li>\n </ul>\n </fieldset>\n </div>\n </div>\";\n echo $html;\n }\n }", "title": "" }, { "docid": "9e80d27bfd8134fcb2a9ea106f643e14", "score": "0.5755209", "text": "function cyprus_register_required_plugins() {\n\n\t// Get the bundled plugin information.\n\t$plugins = array(\n\n\t\tarray(\n\t\t\t'name' => 'Rank Math',\n\t\t\t'slug' => 'seo-by-rank-math',\n\t\t\t'description' => __( 'We created <a href=\"https://mythemeshop.com/plugins/wordpress-seo/\">Rank Math, a WordPress SEO plugin</a>, to help every website owner get access to the SEO tools they need to improve their SEO and attract more traffic to their website.', 'cyprus' ),\n\t\t\t'required' => false,\n\t\t\t'source' => 'https://mythemeshop.com/rm-4-file/seo-by-rank-math.zip',\n\t\t\t'tab' => 'both',\n\t\t),\n\n\t\tarray(\n\t\t\t'name' => 'WP Shortcode by MyThemeShop',\n\t\t\t'slug' => 'wp-shortcode',\n\t\t\t'required' => false,\n\t\t\t'tab' => 'both',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'URL Shortener',\n\t\t\t'slug' => 'mts-url-shortener',\n\t\t\t'required' => false,\n\t\t\t'tab' => 'recommended',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'MyThemeShop Theme/Plugin Updater',\n\t\t\t'slug' => 'mythemeshop-connect',\n\t\t\t'description' => __( 'A simple and easy way to update your MyThemeShop themes and plugins to the the latest versions using good old one click method!', 'cyprus' ),\n\t\t\t'required' => false,\n\t\t\t'source' => 'https://mythemeshop.com/mythemeshop-connect.zip',\n\t\t\t'tab' => 'both',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'WP Tab Widget',\n\t\t\t'slug' => 'wp-tab-widget',\n\t\t\t'alt' => 'wp-tab-widget-pro',\n\t\t\t'alt_name' => 'WP Tab Widget Pro',\n\t\t\t'alt_description' => __( 'WP Tab Widget Pro is the most powerful plugin for showing recommended content on blog posts to increase engagement and keep visitors on your site purpose.', 'cyprus' ),\n\t\t\t'info_link' => 'https://mythemeshop.com/plugins/wp-tab-widget-pro/',\n\t\t\t'required' => false,\n\t\t\t'tab' => 'both',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'WP Review ',\n\t\t\t'slug' => 'wp-review',\n\t\t\t'alt' => 'wp-review-pro',\n\t\t\t'alt_name' => 'WP Review Pro',\n\t\t\t'alt_description' => __( 'Create reviews! Choose from Stars, Percentages, Circles or Points for review scores. Supports Retina Display, WPMU & Unlimited Color Schemes.', 'cyprus' ),\n\t\t\t'info_link' => 'https://mythemeshop.com/plugins/wp-review-pro/',\n\t\t\t'required' => false,\n\t\t\t'tab' => 'both',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'WP Subscribe ',\n\t\t\t'slug' => 'wp-subscribe',\n\t\t\t'alt' => 'wp-subscribe-pro',\n\t\t\t'alt_name' => 'WP Subscribe Pro',\n\t\t\t'alt_description' => __( 'These days, having an email subscriber list is key to running a successful blog, so we created WP Subscribe Pro. Boost your conversions of traffic to subscribers, and generate more residual traffic and earnings. WP Subscribe Pro supports Feedburner, MailChimp and Aweber and is a must-have plugin for any blog.', 'cyprus' ),\n\t\t\t'info_link' => 'https://mythemeshop.com/plugins/wp-subscribe-pro/',\n\t\t\t'required' => false,\n\t\t\t'tab' => 'both',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'WP Quiz ',\n\t\t\t'slug' => 'wp-quiz',\n\t\t\t'alt' => 'wp-quiz-pro',\n\t\t\t'alt_name' => 'WP Quiz Pro',\n\t\t\t'alt_description' => __( 'WP Quiz is a completely FREE quiz plugin that will let you create endlessly customizable and highly professional quizzes for your WordPress site.', 'cyprus' ),\n\t\t\t'info_link' => 'https://mythemeshop.com/plugins/wp-quiz-pro/',\n\t\t\t'required' => false,\n\t\t\t'tab' => 'recommended',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'WP Notification Bars ',\n\t\t\t'slug' => 'wp-notification-bars',\n\t\t\t'alt' => 'mts-wp-notification-bar',\n\t\t\t'alt_name' => 'WP Notification Bar',\n\t\t\t'alt_description' => __( 'WP Notification Bar is a custom notification and alert bar plugin for WordPress which is perfect for marketing promotions, alerts, increasing click throughs to other pages and so much more.', 'cyprus' ),\n\t\t\t'info_link' => 'https://mythemeshop.com/plugins/wp-notification-bar/',\n\t\t\t'required' => false,\n\t\t\t'tab' => 'recommended',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'WP Mega Menu',\n\t\t\t'slug' => 'my-wp-mega-menu',\n\t\t\t'description' => __( 'WP Mega Menu is an easy to use plugin for creating beautiful, customized menus for your site. With no setup required, tons of options to choose from, and the ability to show categories, subcategories and posts, WP MegaMenu is a must have plugin that also boosts SEO and user engagement.', 'cyprus' ),\n\t\t\t'info_link' => 'https://mythemeshop.com/plugins/wp-mega-menu/',\n\t\t\t'required' => false,\n\t\t\t'pro' => true,\n\t\t\t'tab' => 'recommended',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'My WP Translate ',\n\t\t\t'slug' => 'my-wp-translate',\n\t\t\t'required' => false,\n\t\t\t'tab' => 'recommended',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'WP Quiz ',\n\t\t\t'slug' => 'wp-quiz',\n\t\t\t'alt' => 'wp-quiz-pro',\n\t\t\t'alt_name' => 'WP Quiz Pro ',\n\t\t\t'alt_description' => __( 'WP Quiz is a completely FREE quiz plugin that will let you create endlessly customizable and highly professional quizzes for your WordPress site.', 'cyprus' ),\n\t\t\t'info_link' => 'https://mythemeshop.com/plugins/wp-quiz-pro/',\n\t\t\t'required' => false,\n\t\t\t'tab' => 'recommended',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'My WP Backup ',\n\t\t\t'slug' => 'my-wp-backup',\n\t\t\t'alt' => 'my-wp-backup-pro',\n\t\t\t'alt_name' => 'My WP Backup Pro ',\n\t\t\t'alt_description' => __( 'My WP Backup Pro is the best way to protect your data and website in the event of adverse server events, data corruption, hacking and more. With the option to schedule backups and have them delivered via email, Amazon S3, and lots of other features, you can sleep easy knowing you\\'re protected.', 'cyprus' ),\n\t\t\t'info_link' => 'https://mythemeshop.com/plugins/my-wp-backup-pro/',\n\t\t\t'required' => false,\n\t\t\t'tab' => 'recommended',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'Launcher: Coming Soon & Maintenance Mode ',\n\t\t\t'slug' => 'launcher',\n\t\t\t'required' => false,\n\t\t\t'tab' => 'recommended',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'OTF Regenerate Thumbnails ',\n\t\t\t'slug' => 'otf-regenerate-thumbnails',\n\t\t\t'required' => false,\n\t\t\t'tab' => 'recommended',\n\t\t),\n\t\tarray(\n\t\t\t'name' => 'W3 Total Cache ',\n\t\t\t'slug' => 'w3-total-cache',\n\t\t\t'required' => false,\n\t\t\t'tab' => 'recommended',\n\t\t),\n\t);\n\n\tglobal $mts_plugins_config_order;\n\tforeach ( $plugins as $plugin ) {\n\t\t$mts_plugins_config_order[] = $plugin['slug'];\n\t\tif ( array_key_exists( 'alt', $plugin ) ) {\n\t\t\t\t$mts_plugins_config_order[] = $plugin['alt'];\n\t\t}\n\t}\n\n\t/**\n\t * Array of configuration settings. Amend each line as needed.\n\t * If you want the default strings to be available under your own theme domain,\n\t * leave the strings uncommented.\n\t * Some of the strings are added into a sprintf, so see the comments at the\n\t * end of each line for what each argument will be.\n\t */\n\t$config = array(\n\t\t'domain' => 'cyprus',\n\t\t'default_path' => '',\n\t\t'parent_slug' => 'cyprus-options',\n\t\t'menu' => 'install-required-plugins',\n\t\t'has_notices' => false,\n\t\t'is_automatic' => true,\n\t\t'message' => '',\n\t\t'strings' => array(\n\t\t\t// @codingStandardsIgnoreStart\n\t\t\t'page_title' => __( 'Install/Update Required Plugins', 'cyprus' ),\n\t\t\t'menu_title' => __( 'Install Plugins', 'cyprus' ),\n\t\t\t'installing' => __( 'Installing Plugin: %s', 'cyprus' ), // %1$s = plugin name\n\t\t\t'oops' => __( 'Something went wrong with the plugin API.', 'cyprus' ),\n\t\t\t'notice_can_install_required' => _n_noop( 'cyprus requires the following plugin installed: %1$s.', 'cyprus requires the following plugins installed: %1$s.', 'cyprus' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin installed or updated: %1$s.', 'This theme recommends the following plugins installed or updated: %1$s.', 'cyprus' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.', 'cyprus' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.', 'cyprus' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'cyprus' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.', 'cyprus' ), // %1$s = plugin name(s)\n\t\t\t'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to ensure maximum compatibility with cyprus: %1$s', 'The following plugins need to be updated to ensure maximum compatibility with cyprus: %1$s', 'cyprus' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.', 'cyprus' ), // %1$s = plugin name(s)\n\t\t\t'install_link' => _n_noop( 'Go Install Plugin', 'Go Install Plugins', 'cyprus' ),\n\t\t\t'activate_link' => _n_noop( 'Go Activate Plugin', 'Go Activate Plugins', 'cyprus' ),\n\t\t\t'return' => __( 'Return to Required Plugins Installer', 'cyprus' ),\n\t\t\t'plugin_activated' => __( 'Plugin activated successfully.', 'cyprus' ),\n\t\t\t'complete' => __( 'All plugins installed and activated successfully. %s', 'cyprus' ), // %1$s = dashboard link\n\t\t\t'nag_type' => 'error'\n\t\t\t// @codingStandardsIgnoreEnd\n\t\t),\n\t);\n\n\ttgmpa( $plugins, $config );\n}", "title": "" }, { "docid": "fe6b7ab5ad293d1157f8112f71140838", "score": "0.5742666", "text": "function simpleplugins_xh_version()\n{\n global $pth;\n\n return '<h1>SimplePlugins_xh</h1>'.\"\\n\"\n\t. tag('img src=\"'.$pth['folder']['plugins'].'simpleplugins_xh/help/SimplePlugins_XH.gif\" style=\"float: left; margin: 0 20px 20px 0\"')\n\t. '<p>This plugin is a Simple/Simplicity plugin library.' . tag('br') . ' If you create/make a simple plugin, please provide </p>'\n\t. '<p>Version: '.SIMPLEPLUIGNS_XH_VERSION.'</p>'.\"\\n\"\n\t. '<p>Copyright &copy; 2015 <a href=\"http://cmsimple-jp.org\" target=\"_blank\">cmsimple-jp.org</a></p>'.\"\\n\"\n\t. '<p style=\"text-align: justify\">'\n\t. '<b>License</b>'. tag('br') . \"\\n\"\n\t. ' SimplePlugins_xh License : <a href=\"http://www.gnu.org/licenses/\" target=\"_blank\">GPLv3.</a>'. tag('br').\"\\n\"\n\t. ' Each library\\'s plugin : Conform Each license of the plugin. Read index.php etc' . tag('br').\"\\n\";\n}", "title": "" }, { "docid": "2f40c5fc883425e31c628d349f8a6430", "score": "0.5728886", "text": "function plugin_autouninstall_{plugin}()\n{\n $out = array(\n // give the name of the tables, without $_TABLES[]\n 'tables' => array('{plugin}'),\n\n // give the full name of the group, as in the db\n 'groups' => array('{display_name} Admin'),\n\n // give the full name of the feature, as in the db\n 'features' => array('{plugin}.view', '{plugin}.edit'),\n\n //// give the full name of the block, including 'phpblock_', etc\n //'php_blocks' => array('phpblock_{plugin}'),\n\n // give all vars with their name\n 'vars'=> array()\n );\n return $out;\n}", "title": "" }, { "docid": "dde5fb5eac19e7f2c31aa51b105d42f1", "score": "0.57149285", "text": "public function plugin($name);", "title": "" }, { "docid": "320d7d373b83b2440322dd5fecced8a0", "score": "0.5713679", "text": "function enqueue(){\n wp_enqueue_style( 'mypluginstyle', CL_PLUGIN_URI . 'assets/codeline-style.css' );\n wp_enqueue_script( 'mypluginscript', CL_PLUGIN_URI . 'assets/codeline-script.js' );\n }", "title": "" }, { "docid": "e1c6e9a32c0a4b8b05c70f6a85235016", "score": "0.57117367", "text": "function wpeo_activate_plugin() {\n require_once plugin_dir_path( __FILE__ ) . 'includes/class-wpeo-activator.php';\n WPEO_Activator::activate();\n}", "title": "" }, { "docid": "37f99feea5ddaa0394232947ab946411", "score": "0.57107186", "text": "function drush_autogrow_plugin() {\n $path = 'libraries';\n\n // Create the path if it does not exist.\n if (!is_dir($path)) {\n drush_op('mkdir', $path);\n drush_log(dt('Directory @path was created', ['@path' => $path]), 'notice');\n }\n\n // Set the directory to the download location.\n $olddir = getcwd();\n chdir($path);\n\n // Download the zip archive.\n if ($filepath = drush_download_file(AUTOGROW_DOWNLOAD_URI)) {\n $filename = basename($filepath);\n $dirname = basename($filepath, '.zip');\n\n // Remove any existing jQuery NS-Autogrow plugin directory.\n if (is_dir($dirname) || is_dir('jquery_ns_autogrow')) {\n drush_delete_dir($dirname, TRUE);\n drush_delete_dir('jquery_ns_autogrow', TRUE);\n drush_log(dt('An existing jQuery NS-Autogrow plugin was deleted from @path', ['@path' => $path]), 'notice');\n }\n\n // Decompress the zip archive.\n drush_tarball_extract($filename, $dirname);\n\n // Change the directory name to \"chosen\" if needed.\n if ($dirname != 'jquery_ns_autogrow') {\n drush_move_dir($dirname, 'jquery_ns_autogrow', TRUE);\n $dirname = 'jquery_ns_autogrow';\n }\n }\n\n if (is_dir($dirname)) {\n drush_log(dt('jQuery NS-Autogrow plugin has been installed in @path', ['@path' => $path]), 'success');\n }\n else {\n drush_log(dt('Drush was unable to install the jQuery NS-Autogrow plugin to @path', ['@path' => $path]), 'error');\n }\n\n // Set working directory back to the previous working directory.\n chdir($olddir);\n}", "title": "" }, { "docid": "f06458379ccbc6b976e124233531c6d7", "score": "0.5703159", "text": "function pluton_register_required_plugins() {\n\t/*\n\t * Array of plugin arrays. Required keys are name and slug.\n\t * If the source is NOT from the .org repo, then source is also required.\n\t */\n\t$plugins = array(\n\n // This is an example of the use of 'is_callable' functionality. A user could - for instance -\n\t\t// have WPSEO installed *or* WPSEO Premium. The slug would in that last case be different, i.e.\n\t\t// 'wordpress-seo-premium'.\n\t\t// By setting 'is_callable' to either a function from that plugin or a class method\n\t\t// `array( 'class', 'method' )` similar to how you hook in to actions and filters, TGMPA can still\n\t\t// recognize the plugin as being installed.\n\t\tarray(\n\t\t\t'name' => 'WordPress SEO by Yoast',\n\t\t\t'slug' => 'wordpress-seo',\n\t\t\t'is_callable' => 'wpseo_init',\n\t\t),\n\n // Adds the current page’s template name to the admin bar.\n array(\n 'name' => 'What Template',\n 'slug' => 'what-template',\n 'is_callable' => '',\n ),\n\n // The theme check plugin is an easy way to test your theme and make sure it’s up to spec with the latest theme review standards.\n array(\n 'name' => 'Theme Check',\n 'slug' => 'theme-check',\n 'is_callable' => '',\n ),\n\n // Advanced Custom Fields is a WordPress plugin which allows you to add extra content fields to your WordPress edit screens.\n array(\n 'name' => 'Advanced Custom Fields',\n 'slug' => 'advanced-custom-fields',\n 'is_callable' => '',\n ),\n\t);\n\n\t/*\n\t * Array of configuration settings. Amend each line as needed.\n\t *\n\t * TGMPA will start providing localized text strings soon. If you already have translations of our standard\n\t * strings available, please help us make TGMPA even better by giving us access to these translations or by\n\t * sending in a pull-request with .po file(s) with the translations.\n\t *\n\t * Only uncomment the strings in the config array if you want to customize the strings.\n\t */\n\t$config = array(\n\t\t'id' => 'pluton', // Unique ID for hashing notices for multiple instances of TGMPA.\n\t\t'default_path' => '', // Default absolute path to bundled plugins.\n\t\t'menu' => 'tgmpa-install-plugins', // Menu slug.\n\t\t'parent_slug' => 'themes.php', // Parent menu slug.\n\t\t'capability' => 'edit_theme_options', // Capability needed to view plugin install page, should be a capability associated with the parent menu used.\n\t\t'has_notices' => true, // Show admin notices or not.\n\t\t'dismissable' => true, // If false, a user cannot dismiss the nag message.\n\t\t'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.\n\t\t'is_automatic' => false, // Automatically activate plugins after installation or not.\n\t\t'message' => '', // Message to output right before the plugins table.\n\n\t\t/*\n\t\t'strings' => array(\n\t\t\t'page_title' => __( 'Install Required Plugins', 'pluton' ),\n\t\t\t'menu_title' => __( 'Install Plugins', 'pluton' ),\n\t\t\t/* translators: %s: plugin name. * /\n\t\t\t'installing' => __( 'Installing Plugin: %s', 'pluton' ),\n\t\t\t/* translators: %s: plugin name. * /\n\t\t\t'updating' => __( 'Updating Plugin: %s', 'pluton' ),\n\t\t\t'oops' => __( 'Something went wrong with the plugin API.', 'pluton' ),\n\t\t\t'notice_can_install_required' => _n_noop(\n\t\t\t\t/* translators: 1: plugin name(s). * /\n\t\t\t\t'This theme requires the following plugin: %1$s.',\n\t\t\t\t'This theme requires the following plugins: %1$s.',\n\t\t\t\t'pluton'\n\t\t\t),\n\t\t\t'notice_can_install_recommended' => _n_noop(\n\t\t\t\t/* translators: 1: plugin name(s). * /\n\t\t\t\t'This theme recommends the following plugin: %1$s.',\n\t\t\t\t'This theme recommends the following plugins: %1$s.',\n\t\t\t\t'pluton'\n\t\t\t),\n\t\t\t'notice_ask_to_update' => _n_noop(\n\t\t\t\t/* translators: 1: plugin name(s). * /\n\t\t\t\t'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.',\n\t\t\t\t'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.',\n\t\t\t\t'pluton'\n\t\t\t),\n\t\t\t'notice_ask_to_update_maybe' => _n_noop(\n\t\t\t\t/* translators: 1: plugin name(s). * /\n\t\t\t\t'There is an update available for: %1$s.',\n\t\t\t\t'There are updates available for the following plugins: %1$s.',\n\t\t\t\t'pluton'\n\t\t\t),\n\t\t\t'notice_can_activate_required' => _n_noop(\n\t\t\t\t/* translators: 1: plugin name(s). * /\n\t\t\t\t'The following required plugin is currently inactive: %1$s.',\n\t\t\t\t'The following required plugins are currently inactive: %1$s.',\n\t\t\t\t'pluton'\n\t\t\t),\n\t\t\t'notice_can_activate_recommended' => _n_noop(\n\t\t\t\t/* translators: 1: plugin name(s). * /\n\t\t\t\t'The following recommended plugin is currently inactive: %1$s.',\n\t\t\t\t'The following recommended plugins are currently inactive: %1$s.',\n\t\t\t\t'pluton'\n\t\t\t),\n\t\t\t'install_link' => _n_noop(\n\t\t\t\t'Begin installing plugin',\n\t\t\t\t'Begin installing plugins',\n\t\t\t\t'pluton'\n\t\t\t),\n\t\t\t'update_link' \t\t\t\t\t => _n_noop(\n\t\t\t\t'Begin updating plugin',\n\t\t\t\t'Begin updating plugins',\n\t\t\t\t'pluton'\n\t\t\t),\n\t\t\t'activate_link' => _n_noop(\n\t\t\t\t'Begin activating plugin',\n\t\t\t\t'Begin activating plugins',\n\t\t\t\t'pluton'\n\t\t\t),\n\t\t\t'return' => __( 'Return to Required Plugins Installer', 'pluton' ),\n\t\t\t'plugin_activated' => __( 'Plugin activated successfully.', 'pluton' ),\n\t\t\t'activated_successfully' => __( 'The following plugin was activated successfully:', 'pluton' ),\n\t\t\t/* translators: 1: plugin name. * /\n\t\t\t'plugin_already_active' => __( 'No action taken. Plugin %1$s was already active.', 'pluton' ),\n\t\t\t/* translators: 1: plugin name. * /\n\t\t\t'plugin_needs_higher_version' => __( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'pluton' ),\n\t\t\t/* translators: 1: dashboard link. * /\n\t\t\t'complete' => __( 'All plugins installed and activated successfully. %1$s', 'pluton' ),\n\t\t\t'dismiss' => __( 'Dismiss this notice', 'pluton' ),\n\t\t\t'notice_cannot_install_activate' => __( 'There are one or more required or recommended plugins to install, update or activate.', 'pluton' ),\n\t\t\t'contact_admin' => __( 'Please contact the administrator of this site for help.', 'pluton' ),\n\n\t\t\t'nag_type' => '', // Determines admin notice type - can only be one of the typical WP notice classes, such as 'updated', 'update-nag', 'notice-warning', 'notice-info' or 'error'. Some of which may not work as expected in older WP versions.\n\t\t),\n\t\t*/\n\t);\n\n\ttgmpa( $plugins, $config );\n}", "title": "" }, { "docid": "cf4664f7144fb524605b1bfdf52948ea", "score": "0.5693182", "text": "function sylr_settings() {\r\n // Plugin Setting Code\r\n add_option('SYLR_PLUGIN_VERSION',SYLR_PLUGIN_VERSION); \r\n\r\n}", "title": "" }, { "docid": "90f63d20a6336d4ba0f6f4ef14433129", "score": "0.56854296", "text": "function knacc_register_required_plugins() {\n\n\t/**\n\t * Array of plugin arrays. Required keys are name and slug.\n\t * If the source is NOT from the .org repo, then source is also required.\n\t */\n\t$plugins = array(\n\n\t\t// Revolution Slider Plugin\n\t\tarray(\n\t\t\t'name' \t\t\t\t=> 'Revolution Slider', // The plugin name\n\t\t\t'slug' \t\t\t\t=> 'revslider', // The plugin slug (typically the folder name)\n\t\t\t'source' \t\t\t\t=> 'http://plugins.knacc.co/revslider.zip', // The plugin source\n\t\t\t'required' \t\t\t\t=> false, // If false, the plugin is only 'recommended' instead of required\n\t\t\t'version' \t\t\t\t=> '4.3.2', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\n\t\t\t'force_activation' \t\t=> false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\n\t\t\t'force_deactivation' \t=> false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\n\t\t\t'external_url' \t\t\t=> '', // If set, overrides default API URL and points to an external URL\n\t\t),\n\n\t\t// Contact Form 7 Plugin\n\t\tarray(\n\t\t\t'name' \t\t\t\t=> 'Contact Form 7', // The plugin name\n\t\t\t'slug' \t\t\t\t=> 'contact-form-7', // The plugin slug (typically the folder name)\n\t\t\t'source' \t\t\t\t=> 'http://downloads.wordpress.org/plugin/contact-form-7.3.8.zip', // The plugin source\n\t\t\t'required' \t\t\t\t=> false, // If false, the plugin is only 'recommended' instead of required\n\t\t\t'version' \t\t\t\t=> '3.8', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\n\t\t\t'force_activation' \t\t=> false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\n\t\t\t'force_deactivation' \t=> false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\n\t\t\t'external_url' \t\t\t=> '', // If set, overrides default API URL and points to an external URL\n\t\t),\n\n\t\t// Bootstrap Shortcodes Plugin\n\t\tarray(\n\t\t\t'name' \t\t\t\t=> 'Knacc Bootstrap Shortcodes', // The plugin name\n\t\t\t'slug' \t\t\t\t=> 'knacc-bootstrap-shortcodes', // The plugin slug (typically the folder name)\n\t\t\t'source' \t\t\t\t=> 'http://plugins.knacc.co/knacc-bootstrap-shortcodes.zip', // The plugin source\n\t\t\t'required' \t\t\t\t=> false, // If false, the plugin is only 'recommended' instead of required\n\t\t\t'version' \t\t\t\t=> '2.0', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\n\t\t\t'force_activation' \t\t=> false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\n\t\t\t'force_deactivation' \t=> false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\n\t\t\t'external_url' \t\t\t=> '', // If set, overrides default API URL and points to an external URL\n\t\t),\n\n\t\t// Envato Wordpress Toolkit Plugin\n\t\tarray(\n\t\t\t'name' \t\t\t\t=> 'Envato Wordpress Toolkit Plugin', // The plugin name\n\t\t\t'slug' \t\t\t\t=> 'envato-wordpress-toolkit', // The plugin slug (typically the folder name)\n\t\t\t'source' \t\t\t\t=> 'http://plugins.knacc.co/envato-wordpress-toolkit.zip', // The plugin source\n\t\t\t'required' \t\t\t\t=> false, // If false, the plugin is only 'recommended' instead of required\n\t\t\t'version' \t\t\t\t=> '1.6.2', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented\n\t\t\t'force_activation' \t\t=> false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch\n\t\t\t'force_deactivation' \t=> false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins\n\t\t\t'external_url' \t\t\t=> '', // If set, overrides default API URL and points to an external URL\n\t\t),\n\n\t\t// This is an example of how to include a plugin from the WordPress Plugin Repository\n\t\t//array(\n\t\t\t//'name' \t\t=> 'BuddyPress',\n\t\t\t//'slug' \t\t=> 'buddypress',\n\t\t\t//'required' \t=> false,\n\t\t//),\n\n\t);\n\n\t// Change this to your theme text domain, used for internationalising strings\n\t$theme_text_domain = 'knacc-base';\n\n\t/**\n\t * Array of configuration settings. Amend each line as needed.\n\t * If you want the default strings to be available under your own theme domain,\n\t * leave the strings uncommented.\n\t * Some of the strings are added into a sprintf, so see the comments at the\n\t * end of each line for what each argument will be.\n\t */\n\t$config = array(\n\t\t'domain' \t\t=> $theme_text_domain, \t// Text domain - likely want to be the same as your theme.\n\t\t'default_path' \t\t=> '', \t// Default absolute path to pre-packaged plugins\n\t\t'parent_menu_slug' \t=> 'themes.php', \t\t\t\t// Default parent menu slug\n\t\t'parent_url_slug' \t=> 'themes.php', \t\t\t\t// Default parent URL slug\n\t\t'menu' \t\t=> 'install-required-plugins', \t// Menu slug\n\t\t'has_notices' \t=> true, \t// Show admin notices or not\n\t\t'is_automatic' \t=> false,\t\t\t\t\t \t// Automatically activate plugins after installation or not\n\t\t'message' \t\t\t=> '',\t\t\t\t\t\t\t// Message to output right before the plugins table\n\t\t'strings' \t\t=> array(\n\t\t\t'page_title' \t\t\t=> __( 'Install Required Plugins', $theme_text_domain ),\n\t\t\t'menu_title' \t\t\t=> __( 'Install Plugins', $theme_text_domain ),\n\t\t\t'installing' \t\t\t=> __( 'Installing Plugin: %s', $theme_text_domain ), // %1$s = plugin name\n\t\t\t'oops' \t\t\t=> __( 'Something went wrong with the plugin API.', $theme_text_domain ),\n\t\t\t'notice_can_install_required' \t\t\t=> _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_install_recommended'\t\t\t=> _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_install' \t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_activate_required' \t\t\t=> _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_activate_recommended'\t\t\t=> _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_activate' \t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s)\n\t\t\t'notice_ask_to_update' \t\t\t\t\t\t=> _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_update' \t\t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s)\n\t\t\t'install_link' \t\t\t\t\t \t\t\t=> _n_noop( 'Begin installing plugin', 'Begin installing plugins' ),\n\t\t\t'activate_link' \t\t\t\t \t\t\t=> _n_noop( 'Activate installed plugin', 'Activate installed plugins' ),\n\t\t\t'return' \t\t\t=> __( 'Return to Required Plugins Installer', $theme_text_domain ),\n\t\t\t'plugin_activated' \t\t\t=> __( 'Plugin activated successfully.', $theme_text_domain ),\n\t\t\t'complete' \t\t\t\t\t\t\t\t\t=> __( 'All plugins installed and activated successfully. %s', $theme_text_domain ), // %1$s = dashboard link\n\t\t\t'nag_type'\t\t\t\t\t\t\t\t\t=> 'updated' // Determines admin notice type - can only be 'updated' or 'error'\n\t\t)\n\t);\n\n\ttgmpa( $plugins, $config );\n\n}", "title": "" }, { "docid": "e61cdfc46def8a4a64651f0331958500", "score": "0.5685107", "text": "function add_custom_plugin($plugin_array) {\r\n //print_r($elements); exit;\r\n global $elements;\r\n foreach ($elements as $element) {\r\n $plugin_array['oscitas' . $element] = plugins_url('', __FILE__) . '/' . $element . '/' . $element . '_plugin.js';\r\n }\r\n /// return $buttons;\r\n return $plugin_array;\r\n}", "title": "" }, { "docid": "e6c33c971a07a9b64cead67a4e009b15", "score": "0.5683798", "text": "private static function plugin_on_activate() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "ae19dafff445723802c6caff14b1e0cf", "score": "0.5683332", "text": "function chatter_gallery_activate()\n{\n\terror_log(\"Plug-in activated\");\n}", "title": "" }, { "docid": "ef8d70b8a5a17cb3b94bf1bec3f874a8", "score": "0.56751543", "text": "function ozh_ta_plugin_row_meta( $plugin_meta, $plugin_file ) {\r\n\tif( $plugin_file == plugin_basename( __FILE__ ) ) {\r\n\t\t$plugin_meta[] = '<a href=\"'.menu_page_url( 'ozh_ta', false ).'\"><strong>Configure</strong></a>';\r\n\t}\r\n\treturn $plugin_meta;\r\n}", "title": "" }, { "docid": "e7395403b16528784c98efe6a5490fac", "score": "0.5669332", "text": "public function load_plugin_assets() {\n\n \n\n }", "title": "" }, { "docid": "695a5a53c8e6fcc0db0cb10679ec4857", "score": "0.5657906", "text": "public function plugin_activate()\r\n {\r\n }", "title": "" }, { "docid": "1ad219b656c3908a99c4d4a99e8665b1", "score": "0.56566256", "text": "public function get_plugin() {\n\t\treturn 'jet-tabs';\n\t}", "title": "" }, { "docid": "ec2ed964aee514610ff7914595b4cf57", "score": "0.56547177", "text": "public function getPlugin();", "title": "" }, { "docid": "496131d562eab0497382ba575be59486", "score": "0.56474614", "text": "public function __construct() {\n $this->plugin_name = 'bhaa_ee_plugin';\n $this->version = '1.0.0';\n }", "title": "" }, { "docid": "1b694db6a822b42125269d34b05ea882", "score": "0.56200016", "text": "public function getPluginName()\n {\n return 'KanboardCSS';\n }", "title": "" }, { "docid": "5eca03a1631b897cd31dabc0c3a10017", "score": "0.5615298", "text": "public function plugin_settings() {\r\n\t}", "title": "" }, { "docid": "45371f5bbf9ca7dd80085a28dda33304", "score": "0.56087404", "text": "function __construct() {\n require_once( dirname( __FILE__ ) . '/lib/parse-readme.php' );\n require_once( dirname( __FILE__ ) . '/developer-showcase-widgets.php' );\n register_activation_hook( __FILE__, array( &$this, 'activate' ) );\n register_deactivation_hook( __FILE__, array( &$this, 'deactivate' ) );\n\n // load plugin text domain\n add_action( 'init', array( &$this, '_textdomain' ) );\n add_action( 'init', array( &$this, '_register_post_types' ) ); \n\n add_action( 'add_meta_boxes', array( &$this, '_add_meta_boxes' ) );\n add_action( 'admin_enqueue_scripts', array( &$this, '_register_admin_scripts' ) );\n\n add_filter( 'manage_plugin_posts_columns', array( &$this, 'manage_plugin_posts_columns' ) );\n add_action( 'manage_plugin_posts_custom_column', array( &$this, 'manage_plugin_posts_custom_column' ), 10, 2 );\n add_filter( 'manage_theme_posts_columns', array( &$this, 'manage_theme_posts_columns' ) );\n add_action( 'manage_theme_posts_custom_column', array( &$this, 'manage_theme_posts_custom_column' ), 10, 2 );\n add_action( 'save_post', array( &$this, '_save_post' ) );\n #add_filter( 'the_content', array( &$this, 'the_content') );\n \n #add_action( 'admin_print_styles', array( $this, 'register_admin_styles' ) );\n #add_action( 'wp_enqueue_scripts', array( $this, 'register_admin_styles' ) );\n add_action( 'admin_enqueue_scripts', array( &$this, '_register_plugin_scripts' ) );\n add_action( 'wp_enqueue_scripts', array( &$this, '_register_plugin_scripts' ) );\n }", "title": "" }, { "docid": "668bf66cdcc3b87a6d8d3836c46cd201", "score": "0.5599572", "text": "function meson_press_register_required_plugins() {\n\n\t/**\n\t * Array of plugin arrays. Required keys are name and slug.\n\t * If the source is NOT from the .org repo, then source is also required.\n\t */\n\t$plugins = array(\n\t\t\n\n\t\t// Advanced Custom Fields\n\t\tarray(\n\t\t\t'name'\t\t\t\t\t=> 'Advanced Custom Fields',\n\t\t\t'slug'\t\t\t\t\t=> 'advanced-custom-fields',\n\t\t\t'required'\t\t\t\t=> true,\n\t\t),\n\t\t// Advanced Custom Fields\n\t\tarray(\n\t\t\t'name'\t\t\t\t\t=> 'Advanced Custom Fields: Bidirectional Post Relation Field',\n\t\t\t'slug'\t\t\t\t\t=> 'acf-2way-pr',\n\t\t\t'required'\t\t\t\t=> true,\n\t\t),\n\t\t// array(\n\t\t// \t'name'\t\t\t\t\t=> 'Disqus Comment System',\n\t\t// \t'slug'\t\t\t\t\t=> 'disqus-comment-system',\n\t\t// \t'required'\t\t\t\t=> true,\n\t\t// ),\n\t\t// array(\n\t\t// \t'name'\t\t\t\t\t=> 'Newsletter',\n\t\t// \t'slug'\t\t\t\t\t=> 'newsletter',\n\t\t// \t'required'\t\t\t\t=> true,\n\t\t// ),\n\t\tarray(\n\t\t\t'name'\t\t\t\t\t=> 'Post Types Order',\n\t\t\t'slug'\t\t\t\t\t=> 'post-types-order',\n\t\t\t'required'\t\t\t\t=> true,\n\t\t),\n\t\tarray(\n\t\t\t'name'\t\t\t\t\t=> 'Google Analytics Dashboard for WP',\n\t\t\t'slug'\t\t\t\t\t=> 'google-analytics-dashboard-for-wp',\n\t\t\t'required'\t\t\t\t=> false,\n\t\t),\n\t\t// array(\n\t\t// \t'name'\t\t\t\t\t=> 'iThemes Security',\n\t\t// \t'slug'\t\t\t\t\t=> 'better-wp-security',\n\t\t// \t'required'\t\t\t\t=> false,\n\t\t// ),\n\t\t/*\n\t\tarray(\n\t\t\t'name'\t\t\t\t\t=> 'Epub Reader', // The plugin name.\n\t\t\t'slug'\t\t\t\t\t=> 'epub-reader', // The plugin slug (typically the folder name).\n\t\t\t'source'\t\t\t\t=> '', // The plugin source.\n\t\t\t'required'\t\t\t\t=> false, // If false, the plugin is only 'recommended' instead of required.\n\t\t\t'external_url'\t\t\t=> '', // If set, overrides default API URL and points to an external URL.\n\t\t),\n\t\tarray(\n\t\t\t'name'\t\t\t\t\t=> 'OAI Harvester', // The plugin name.\n\t\t\t'slug'\t\t\t\t\t=> 'oaiharvester', // The plugin slug (typically the folder name).\n\t\t\t'source'\t\t\t\t=> '', // The plugin source.\n\t\t\t'required'\t\t\t\t=> false, // If false, the plugin is only 'recommended' instead of required.\n\t\t\t'external_url'\t\t\t=> '', // If set, overrides default API URL and points to an external URL.\n\t\t),\n\n\n\t\t*/\n\n\t);\n\n\t/**\n\t * Array of configuration settings. Amend each line as needed.\n\t * If you want the default strings to be available under your own theme domain,\n\t * leave the strings uncommented.\n\t * Some of the strings are added into a sprintf, so see the comments at the\n\t * end of each line for what each argument will be.\n\t */\n\t$config = array(\n\t\t'default_path' \t\t\t\t\t\t\t\t=> '',\t\t\t\t\t // Default absolute path to pre-packaged plugins.\n\t\t'menu'\t\t\t\t\t\t\t\t\t\t=> 'tgmpa-install-plugins', // Menu slug.\n\t\t'has_notices'\t\t\t\t\t\t\t\t=> true,\t\t\t\t\t// Show admin notices or not.\n\t\t'dismissable'\t\t\t\t\t\t\t\t=> true,\t\t\t\t\t// If false, a user cannot dismiss the nag message.\n\t\t'dismiss_msg'\t\t\t\t\t\t\t\t=> '',\t\t\t\t\t // If 'dismissable' is false, this message will be output at top of nag.\n\t\t'is_automatic'\t\t\t\t\t\t\t\t=> false,\t\t\t\t // Automatically activate plugins after installation or not.\n\t\t'message'\t\t\t\t\t\t\t\t\t=> '',\t\t\t\t\t // Message to output right before the plugins table.\n\t\t'strings'\t\t\t\t\t\t\t\t\t=> array(\n\t\t\t'page_title'\t\t\t\t\t\t\t=> __( 'Install Required Plugins', 'tgmpa' ),\n\t\t\t'menu_title'\t\t\t\t\t\t\t=> __( 'Install Plugins', 'tgmpa' ),\n\t\t\t'installing'\t\t\t\t\t\t\t=> __( 'Installing Plugin: %s', 'tgmpa' ), // %s = plugin name.\n\t\t\t'oops'\t\t\t\t\t\t\t\t\t=> __( 'Something went wrong with the plugin API.', 'tgmpa' ),\n\t\t\t'notice_can_install_required'\t\t\t=> _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.' ), // %1$s = plugin name(s).\n\t\t\t'notice_can_install_recommended'\t\t=> _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.' ), // %1$s = plugin name(s).\n\t\t\t'notice_cannot_install'\t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s).\n\t\t\t'notice_can_activate_required'\t\t\t=> _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s).\n\t\t\t'notice_can_activate_recommended'\t\t=> _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s).\n\t\t\t'notice_cannot_activate'\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s).\n\t\t\t'notice_ask_to_update'\t\t\t\t\t=> _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' ), // %1$s = plugin name(s).\n\t\t\t'notice_cannot_update'\t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s).\n\t\t\t'install_link'\t\t\t\t\t\t\t=> _n_noop( 'Begin installing plugin', 'Begin installing plugins' ),\n\t\t\t'activate_link'\t\t\t\t\t\t\t=> _n_noop( 'Begin activating plugin', 'Begin activating plugins' ),\n\t\t\t'return'\t\t\t\t\t\t\t\t=> __( 'Return to Required Plugins Installer', 'tgmpa' ),\n\t\t\t'plugin_activated'\t\t\t\t\t\t=> __( 'Plugin activated successfully.', 'tgmpa' ),\n\t\t\t'complete'\t\t\t\t\t\t\t\t=> __( 'All plugins installed and activated successfully. %s', 'tgmpa' ), // %s = dashboard link.\n\t\t\t'nag_type'\t\t\t\t\t\t\t\t=> 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'.\n\t\t)\n\t);\n\n\ttgmpa( $plugins, $config );\n\n}", "title": "" }, { "docid": "c32206b636d5aab142af253672b0cfe0", "score": "0.5599314", "text": "function etb_insert_scripts() {\r\n\t//I am also making sure the plugin will still work if you change the directory name\r\n\t$path = str_replace(\"\\\\\", \"/\", __FILE__);\r\n\t$path = explode(\"/\", $path);\r\narray_pop($path);\r\n\t$path = array_reverse($path);\r\n\t$plugin_dir = $path[0];\r\n\tif ($plugin_dir != \"plugins\") {\r\n\t\t$plugin_dir = \"/\".$plugin_dir;\r\n\t} else {\r\n\t\t$plugin_dir = \"\";\r\n\t}\r\n\techo \"<link rel='stylesheet' href='\".WP_PLUGIN_URL.$plugin_dir.\"/css/etb_style.css' type='text/css' media='all' />\\n\";\r\n\techo \"<script src='\".WP_PLUGIN_URL.$plugin_dir.\"/js/easy-twitter-button.js' type='text/javascript'></script>\";\r\n}", "title": "" }, { "docid": "91a50126261ffe632c2b84cf26dc68da", "score": "0.5596448", "text": "function pluginAction()\n\t{\n\t\t$hooks = $this->_rivety_plugin->getHooksInUse();\n\t\t$this->view->hooks = $hooks;\n\t}", "title": "" }, { "docid": "c975a83f82f75cce24894dd185ff1944", "score": "0.5593397", "text": "function PluginsScreen() {\n global $sql;\n global $user;\n\n if(isset($_GET['action']) && isset($_GET['id']) && $_GET['action'] == 'run') {\n $row = $sql->fetch_row('bb_plugins', $_GET['id']);\n\n include_once __DIR__.'/../../plug-ins/'.$row['name'].'/'.$row['name'].'.php';\n\n div('p-5');\n div('dash-box p-5 shadow');\n draw_button('<i class=\"fas fa-chevron-left\"></i> Back', HTML_ReplaceLinkPart('&action='),'btn-big btn-blue shadow-sm');\n call_user_func($row['name'].'_Config');\n div_end();\n div_end();\n } else {\n if(isset($_GET['action'])) {\n if($_GET['action'] == 'delete') {\n if(isset($_GET['id'])) {\n $sql->delete('bb_plugins', $_GET['id']);\n }\n } else if($_GET['action'] == 'sync') {\n /* TODO: Delete plugins that are no longer available */\n $plugins = array();\n if($handle = opendir('../plug-ins/')) {\n while(false !== ($entry = readdir($handle))) {\n if($entry != \".\" && $entry != \"..\") {\n $plugins[] = $entry;\n }\n }\n closedir($handle);\n }\n for($i = 0; $i < count($plugins); $i++) {\n $row = $sql->fetch_row_by_param('bb_plugins', 'name', $plugins[$i]);\n if(!is_array($row)) {\n $sql->insert('bb_plugins', 'id, name', 'NULL, \"'.$plugins[$i].'\"');\n }\n }\n }\n } \n div('p-5');\n div('pt-2 pl-5 pb-5 pr-5');\n draw_button('Sync Folder.', HTML_ReplaceLinkPart('&action=').'&action=sync','btn-big btn-blue shadow-sm');\n div_end();\n div('pt-3');\n $plugin_list = new UList();\n $plugin_ids = $sql->fetch_ids('bb_plugins');\n $plugin_pages = new Menu('plugin-pages', 2);\n if($plugin_pages->get_entry() >= ceil(count($plugin_ids) / 15)) {\n $plugin_pages->set_entry(0);\n }\n if(count($plugin_ids) > 0 && $plugin_ids[0] != \"\") {\n for($i = 0; $i < count($plugin_ids); $i++) {\n $row = $sql->fetch_row('bb_plugins', $plugin_ids[$i]);\n\n $plugin_list->add_entry($row['name'].' <div class=\"dash-list-right\"><a href=\"'.HTML_ReplaceLinkPart('&action=').'&action=run&id='.$plugin_ids[$i].'\" class=\"btn btn-blue btn-sm\">Execute</a> <a href=\"'.HTML_ReplaceLinkPart('&action=').'&action=delete&id='.$plugin_ids[$i].'\" class=\"btn btn-sm\">Delete</a></div>');\n }\n } else {\n /* That should never happen! */\n $plugin_list->add_entry('No matching element found!');\n }\n $plugin_list->draw();\n $plugin_pages->draw();\n div_end();\n div_end();\n }\n}", "title": "" }, { "docid": "f9e2bb1904a46975555643a61c58b53c", "score": "0.55874705", "text": "public function __construct() {\n $this->plugin_name = 'predic-simple-backup';\n\t\t$this->version = '1.0.0';\n }", "title": "" }, { "docid": "0d75c63bdfe6e79562a86987a1a51196", "score": "0.55859035", "text": "private function __construct() {\n $plugin = WPR\\Plugin::get_instance();\n\t\t$this->plugin_slug = $plugin->get_plugin_slug();\n\t}", "title": "" }, { "docid": "01ee918ee585c51d618a6d1ac4ae2075", "score": "0.5579484", "text": "function show_plugin_activated() {\n\t\t?>\n\t\t<div class=\"updated\" id=\"message\"><p><?php _e('Recommended plugin <strong>activated</strong>.','tp'); ?></p></div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "63f7ba74433adf043dd7ad53ab775f74", "score": "0.5565173", "text": "function uxb_port_init_plugin() {\r\n\t\t\tadd_action( 'init', 'uxb_port_register_cpt', 11 );\r\n\t\t\t\r\n\t\t\t// Create custom columns\r\n\t\t\tadd_filter( 'manage_uxbarn_portfolio_posts_columns', 'uxb_port_create_columns_header' );\r\n\t\t\tadd_action( 'manage_uxbarn_portfolio_posts_custom_column', 'uxb_port_create_columns_content' );\r\n\t\t\t\r\n\t\t\t// Add custom function to the \"template_include\" filter hook to load the plugin templates for single and archive pages\r\n\t\t\tadd_filter( 'template_include', 'uxb_port_template_chooser' );\r\n\t\t\t\r\n\t\t\t// Load available text domains for localization of the plugin\r\n\t\t\tload_plugin_textdomain( 'uxb_port', false, basename( dirname( __FILE__ ) ) . '/languages' );\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "81dd12ea7f40c5b0a8fd85b1d7a99525", "score": "0.5553794", "text": "public function pluginDetails()\n {\n return [\n 'name' => 'Snow Day',\n 'description' => 'Adds a snow day banner to the top of the website.',\n 'author' => 'Albright Labs',\n 'icon' => 'icon-leaf'\n ];\n }", "title": "" }, { "docid": "81b5b05fc476d34d104ebe1c07fe5f75", "score": "0.5548049", "text": "function action_wp()\n {\n $this -> skin_styles();\n }", "title": "" }, { "docid": "24ff9d14fe159a2972656f017a0dc714", "score": "0.55453837", "text": "public function plugin_page(){\n\t\t//$entry = GFAPI::get_entry( '239' );\n\t\t//var_dump($entry);\n \t$html = <<<EOD\n<style>\n .center {\n\t text-align: center;\n\t}\n</style>\n\t<div class = \"center\"><img src=\"https://www.pipwave.com/wp-content/themes/zerif-lite-child/images/logo_bnw.png\" /></div>\n <h1>Install & Configure pipwave in Gravity Forms</h1>\n <p>You will need a pipwave account. If you don't have one, don't worry, you can create one during the configuration process. Please click link below :</p>\n\t\t<ol>\n\t\t\t<li><a href=\"#install\">Install & Configure</a></li>\n\t\t\t<li><a href=\"#multiple\">Multiple Payment Method</a></li>\n\t\t</ol>\n\t<h2>Getting Started</h2>\n\t<h4 id=\"install\">Install & Configure</h4>\nEOD;\n echo $html;\n\n $message1 = [\n\t\t\t'',\n\t\t\t'Click Dashboard',//1\n\t\t\t'Click Plugins',//2\n\t\t\t'Search for our plugin. If found, please proceed to step 10. If not found please proceed to next step.',\n\t\t\t'Click Add New',\n\t\t\t'Click Upload Plugin',\n\t\t\t'Click Browse...',\n\t\t\t'Select the zip file of the plugin',\n\t\t\t'Click open. Then Click Install Now',\n\t\t\t'Click Dashboard. Then hover to Plugins. Then Click Installed Plugins',\n\t\t\t'Find our plugin (pipwave). Then Click Activate',\n\t\t\t'Click Settings',\n\t\t\t'Key in Api key and secret. Both of them can be obtained in the \"question\" figure',\n\t\t\t'Click Form',\n\t\t\t'Select your form, Click Setting, then Click pipwave',\n\t\t\t'Click pipwave',\n\t\t\t'Click Add New, then enter the information required. \\'*\\' firgure means the information is needed',\n\t\t];\n\n\t\tfor ( $i = 1; $i < 17; $i++ ) {\n\t\t\t$img = GFCommon::get_base_url() . '../../gravityformspipwave/images/height/' . $i . 'height.png';\n\t\t\t$html = '<p>Step ' . $i . ' ' . $message1[$i] . '</p>';\n\t\t\t$html .= '<img src = ' . $img . ' width=\"1000\" ></img>';\n\t\t\techo $html;\n\t\t}\n\n\t\techo '<h3 id=\"multiple\">Multiple Payment Methods</h3>';\n\t\t$message2 = [\n\t\t\t'',\n\t\t\t'Drag radio buttons from <b>standard field</b> into your form',//1\n\t\t\t'Click on the radio buttons form. Then enter the payment method name you configured. \n\t\t\t\t<ul style=\"list-style: none;\">\n\t\t\t\t\t<li>*you may set any name or non-existing names</li>\n\t\t\t\t\t<li>*buyer will see this and select their prefered payment method</li>\n\t\t\t\t</ul>\n\t\t\t',//2\n\t\t\t'The top rounded square is what buyer will see',\n\t\t\t'Remember to add title/label for this field',\n\t\t\t'Click Update and wait until you see the \\'Form updated successfully\\'',\n\t\t\t'Hover mouse to Settings and click Pipwave.<br>Or you can click Settings, then select pipwave',\n\t\t\t'Click Edit. If there is no pipwave feeds available. Click Add New and follow instructions in <a href=\"#install\">Install & Configure</a>',\n\t\t\t'Scroll down... (if you had configured this setting beforehand)',\n\t\t\t'Check Enable Condition',\n\t\t\t'Configure as in the figure',\n\t\t\t'Now it\\'s done!',\n\t\t];\n\n\t\tfor ( $i = 1; $i < 12; $i++ ) {\n\t\t\t$img = GFCommon::get_base_url() . '../../gravityformspipwave/images/multiple_payment/multiple_payment_' . $i . '.png';\n\t\t\t$html = '<p>Step ' . $i . ' ' . $message2[$i] . '</p>';\n\t\t\t$html .= '<img src = ' . $img . ' width=\"1000\" ></img>';\n\t\t\techo $html;\n\t\t}\n\t}", "title": "" }, { "docid": "b79911c5362d2d4700360e84f0549ba9", "score": "0.55373967", "text": "function getName() {\n\t\treturn 'SwordPlugin';\n\t}", "title": "" }, { "docid": "55092f57a79617857e8e846ad8c36cfd", "score": "0.55351025", "text": "public function install_plugins_page(){\n $plugin_table = new APA_List_Table();\n ?>\n <div class=\"apa wrap\">\n <h1><?php echo esc_html(get_admin_page_title()); ?></h1>\n <?php $plugin_table->prepare_items(); ?>\n <form method=\"POST\">\n <?php $plugin_table->search_box('Search Post(s)','id'); ?>\n </form>\n <?php $plugin_table->display(); ?>\n </div> \n<?php }", "title": "" }, { "docid": "09f5505f75ba9c146136aca3f4b6006e", "score": "0.5506059", "text": "function init() {\n\telgg_register_library('plugins:upgrades', __DIR__ . '/lib/upgrades.php');\n\t\n\telgg_register_css('jquery.chosen', elgg_get_simplecache_url('chosen/chosen.css'));\n\n\t// Set up menu for logged in users\n\telgg_register_menu_item('site', array(\n\t\t'href' => \"/plugins\",\n\t\t'name' => 'plugins',\n\t\t'text' => elgg_echo('plugins'),\n\t));\n\n\telgg_register_menu_item('site', array(\n\t\t'href' => '/plugins/category/themes',\n\t\t'name' => 'themes',\n\t\t'text' => elgg_echo('plugins:type:theme'),\n\t));\n\n\t\n\t/**\n\t * Extend views\n\t */\n\t// Extend CSS and JS\n\telgg_extend_view('elgg.css', 'plugins/css');\n\telgg_extend_view('css/admin', 'plugins/admin_css');\n\n\t// Extend hover-over and profile menu\n\telgg_extend_view('profile/menu/links', 'plugins/profile_menu');\n\telgg_extend_view('groups/left_column', 'plugins/groupprofile_files');\n\n\t// Register a page handler, so we can have nice URLs\n\telgg_register_page_handler('plugins', __NAMESPACE__ . '\\\\plugins_page_handler');\n\n\t// Tell core to send notifications when new projects and releases are created\n\telgg_register_notification_event('object', 'plugin_project', array('create'));\n\telgg_register_notification_event('object', 'plugin_release', array('create'));\n\n\t\n\t/**\n\t * Register Hooks\n\t */\n\t// The notifications for projects and releases are almost identical so we can use the same handler for both\n\telgg_register_plugin_hook_handler('prepare', 'notification:create:object:plugin_project', __NAMESPACE__ . '\\\\prepare_notification');\n\telgg_register_plugin_hook_handler('prepare', 'notification:create:object:plugin_release', __NAMESPACE__ . '\\\\prepare_notification');\n\n\t// Releases are contained by a project so we need to get the notification subscriptions manually\n\telgg_register_plugin_hook_handler('get', 'subscriptions', __NAMESPACE__ . '\\\\get_release_subscriptions');\n\t\n\t// Make sure Releases are editable\n\telgg_register_plugin_hook_handler('permissions_check', 'object', __NAMESPACE__ . '\\\\release_permissions_check');\n\t\n\t// make projects non-commentable in the river\n\telgg_register_plugin_hook_handler('permissions_check:comment', 'object', __NAMESPACE__ . '\\\\project_comments');\n\n\t// manage owner block menu\n\telgg_register_plugin_hook_handler('register', 'menu:owner_block', __NAMESPACE__ . '\\\\owner_block_menu');\n\t\n\t// register url handlers for the 2 object subtypes\n\telgg_register_plugin_hook_handler('entity:url', 'object', __NAMESPACE__ . '\\\\release_url_handler');\n\telgg_register_plugin_hook_handler('entity:url', 'object', __NAMESPACE__ . '\\\\project_url_handler');\n\n\telgg_register_plugin_hook_handler('register', 'menu:annotation', __NAMESPACE__ . '\\\\ownership_request_menu');\n\t\n\t// Special hook for searching against metadata (category)\n\telgg_register_plugin_hook_handler('search', 'object:plugin_project', __NAMESPACE__ . '\\\\search_hook');\n\n\telgg_register_plugin_hook_handler('cron', 'daily', __NAMESPACE__ . '\\\\update_download_counts');\n\t\n\t// add project info to <meta> tags\n\telgg_register_plugin_hook_handler('head', 'page', __NAMESPACE__ . '\\\\prepare_page_head_meta');\n\t\n\t/**\n\t * Register Events\n\t */\n\telgg_register_event_handler('pagesetup', 'system', __NAMESPACE__ . '\\\\add_submenus');\n\telgg_register_event_handler('upgrade', 'system', __NAMESPACE__ . '\\\\upgrades');\n\telgg_register_event_handler('create', 'object', __NAMESPACE__ . '\\\\release_comment_notification');\n\telgg_register_event_handler('update', 'object', __NAMESPACE__ . '\\\\project_update');\n\t\n\t//register a widget\n\telgg_register_widget_type('plugins', elgg_echo('plugins'), elgg_echo('plugins'), array('profile'));\n\n\n\t// Only projects should show up in search\n\telgg_register_entity_type('object', 'plugin_project');\n\n\n\t// Elgg versions (The forms expect this to be an associative array)\n\telgg_set_config('elgg_versions', array(\n\t\t'5.0' => '5.0',\n\t\t'4.3' => '4.3',\n\t\t'4.2' => '4.2',\n\t\t'4.1' => '4.1',\n\t\t'4.0' => '4.0',\n\t\t'3.3' => '3.3',\n\t\t'3.2' => '3.2',\n\t\t'3.1' => '3.1',\n\t\t'3.0' => '3.0',\n\t\t'2.3' => '2.3',\n\t\t'2.2' => '2.2',\n\t\t'2.1' => '2.1',\n\t\t'2.0' => '2.0',\n\t\t'1.12' => '1.12',\n\t\t'1.11' => '1.11',\n\t\t'1.10' => '1.10',\n\t\t'1.9' => '1.9',\n\t\t'1.8' => '1.8',\n\t\t'1.7' => '1.7',\n\t\t'1.6' => '1.6',\n\t\t'1.5' => '1.5',\n\t\t'1.2' => '1.2',\n\t\t'1.0' => '1.0',\n\t));\n\n\t// GPL-compatible licenses\n\telgg_set_config('gpllicenses', array(\n\t\t'none' => 'No license selected',\n\t\t'gpl2' => 'GNU General Public License (GPL) version 2',\n\t\t'lgpl2.1' => 'GNU Lesser General Public License (LGPL) version 2.1',\n\t\t'berkeleydb' => 'Berkeley Database License (aka the Sleepycat Software Product License)',\n\t\t'mbsd' => 'Modified BSD license',\n\t\t'cbsd' => 'The Clear BSD License',\n\t\t'expat' => 'Expat (MIT) License',\n\t\t'freebsd' => 'FreeBSD license',\n\t\t'intel' => 'Intel Open Source License',\n\t\t'openbsd' => 'ISC (OpenBSD) License',\n\t\t'ncsa' => 'NCSA/University of Illinois Open Source License',\n\t\t'w3c' => 'W3C Software Notice and License',\n\t\t'x11' => 'X11 License',\n\t\t'zope' => 'Zope Public License, versions 2.0 and 2.1',\n\t));\n\n\t// Defined plugin categories\n\telgg_set_config('plugincats', array(\n\t\t'admin' => 'Site admin',\n\t\t'user' => 'User admin',\n\t\t'authentication' => 'Authentication',\n\t\t'tools' => 'Tools',\n\t\t'spam' => 'Spam',\n\t\t'communication' => 'Communication',\n\t\t'events' => 'Events',\n\t\t'media' => 'Media',\n\t\t'photos' => 'Photos and Images',\n\t\t'tpintegrations' => 'Third Party integrations',\n\t\t'clients' => 'Clients',\n\t\t'widgets' => 'Widgets',\n\t\t'games' => 'Games',\n\t\t'ecommerce' => 'eCommerce',\n\t\t'languages' => 'Language packs',\n\t\t'themes' => 'Themes',\n\t\t'misc' => 'Misc',\n\t\t'uncategorized' => 'Uncategorized',\n\t));\n\n\t\n\t/**\n\t * Register actions\n\t */\n\t$action_base = dirname(__FILE__) . \"/actions/plugins\";\n\telgg_register_action(\"plugins/create_project\", \"$action_base/create_project.php\");\n\telgg_register_action(\"plugins/create_release\", \"$action_base/create_release.php\");\n\telgg_register_action(\"plugins/save_project\", \"$action_base/save_project.php\");\n\telgg_register_action(\"plugins/save_release\", \"$action_base/save_release.php\");\n\telgg_register_action(\"plugins/delete_project\", \"$action_base/delete_project.php\");\n\telgg_register_action(\"plugins/delete_release\", \"$action_base/delete_release.php\");\n\telgg_register_action(\"plugins/delete_project_image\", \"$action_base/delete_project_image.php\");\n\telgg_register_action(\"plugins/recommend\", \"$action_base/recommend.php\");\n\telgg_register_action(\"plugins/add_contributors\", \"$action_base/add_contributors.php\");\n\telgg_register_action(\"plugins/delete_contributor\", \"$action_base/delete_contributor.php\");\n\telgg_register_action(\"plugins/request_ownership\", \"$action_base/request_ownership.php\");\n\n\telgg_register_action(\"plugins/admin/upgrade\", \"$action_base/admin/upgrade.php\", 'admin');\n\telgg_register_action(\"plugins/admin/combine\", \"$action_base/admin/combine.php\", 'admin');\n\telgg_register_action(\"plugins/admin/normalize\", \"$action_base/admin/normalize.php\", 'admin');\n\telgg_register_action(\"plugins/admin/search\", \"$action_base/admin/search.php\", 'admin');\n\telgg_register_action(\"plugins/admin/transfer\", \"$action_base/admin/transfer.php\", 'admin');\n\n\telgg_register_tag_metadata_name('plugin_type');\n\t\n\telgg_register_ajax_view('object/plugin_project/release_table');\n}", "title": "" }, { "docid": "ca17ca7567f4350d3eafa9c393f414ad", "score": "0.5505345", "text": "function bearded_register_required_plugins() {\n\n /**\n * Array of plugin arrays. Required keys are name and slug.\n * If the source is NOT from the .org repo, then source is also required.\n */\n $plugins = array(\n\n \n array(\n\t\t\t'name' \t\t=> 'Animate Slider',\n\t\t\t'slug' \t\t=> 'animate-slider',\n\t\t\t'required' \t=> false,\n\t\t),\n\t\t\n array(\n\t\t\t'name' \t\t=> 'WooCommerce - excelling eCommerce',\n\t\t\t'slug' \t\t=> 'woocommerce',\n\t\t\t'required' \t=> false,\n\t\t),\n\n\t\tarray(\n\t\t\t'name' \t\t=> 'YITH WooCommerce Wishlist',\n\t\t\t'slug' \t\t=> 'yith-woocommerce-wishlist',\n\t\t\t'required' \t=> false,\n\t\t),\n\n\t\tarray(\n\t\t\t'name' \t\t=> 'Custom Content Portfolio',\n\t\t\t'slug' \t\t=> 'custom-content-portfolio',\n\t\t\t'required' \t=> false,\n\t\t),\n\n );\n\n /**\n * Array of configuration settings. Amend each line as needed.\n * If you want the default strings to be available under your own theme domain,\n * leave the strings uncommented.\n * Some of the strings are added into a sprintf, so see the comments at the\n * end of each line for what each argument will be.\n */\n $config = array(\n 'id' => 'bearded', // Unique ID for hashing notices for multiple instances of TGMPA.\n 'default_path' => '', // Default absolute path to pre-packaged plugins.\n 'parent_menu_slug' \t=> 'themes.php', \t\t\t\t// Default parent menu slug\n\t\t'parent_url_slug' \t=> 'themes.php', \t\t\t\t// Default parent URL slug\n\t\t'menu' \t\t=> 'install-required-plugins', \t// Menu slug\n\t\t'has_notices' => true, // Show admin notices or not.\n 'dismissable' => true, // If false, a user cannot dismiss the nag message.\n 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.\n 'is_automatic' => false, // Automatically activate plugins after installation or not.\n 'message' => '', // Message to output right before the plugins table.\n );\n\n tgmpa( $plugins, $config );\n\n}", "title": "" }, { "docid": "f6efebbd84b876f2e5cbdeffa6beb1f5", "score": "0.5499516", "text": "function pfex_plugin_section_head() \n{\n\t$logo_path = plugin_dir_url(__FILE__) . \"res/podigee-logo.png\";\n\techo \"<a href=\\\"https://www.podigee.com/de\\\" target=\\\"_blank\\\"><img src=\\\"{$logo_path}\\\" class=\\\"pfex-podigee-img-right\\\" /></a>\";\n}", "title": "" }, { "docid": "87ded8aec40a91637bea532aad6a0769", "score": "0.5493965", "text": "function run_devitmeta() {\n\n $plugin = new Devitmeta();\n $plugin->plugin_path = dirname( __FILE__ );\n $plugin->run();\n\n}", "title": "" }, { "docid": "08b7bb36fcb57aaede0ee27c80576f99", "score": "0.548951", "text": "function wordstrap_settings_javascript_section_text() { ?>\n <p><?php _e( 'Choose which javascript plugins that you want to enable' ); ?></p>\n<?php }", "title": "" }, { "docid": "8e8ef59e0253121924ece8b212e3d212", "score": "0.5486056", "text": "function activate_andmoraho_vendors()\n{\n require_once plugin_dir_path(__FILE__) . 'includes/class-andmoraho-vendors-activator.php';\n Andmoraho_Vendors_Activator::activate();\n}", "title": "" }, { "docid": "a797ef7838c62e9bd4ccbc5dac52e1a4", "score": "0.54858077", "text": "public function display_plugin_submenu_page_item_skin() {\n\t\tdo_action('essgrid_display_plugin_submenu_page_item_skin_pre');\n\t\tself::display_plugin_submenu('grid-item-skin');\n\t\tdo_action('essgrid_display_plugin_submenu_page_item_skin_post');\n\t}", "title": "" }, { "docid": "8d41d470fa1887228b2fdb0432453281", "score": "0.54837257", "text": "function get_plugin_location()\n\t{\n\t\treturn 'plugin';\n\t}", "title": "" }, { "docid": "e1ef2b1e198bcb6d77eca1333632bff7", "score": "0.54783696", "text": "function __construct(){\r\n\t\t\t$this->pluginURL = WP_PLUGIN_URL . '/' . dirname(plugin_basename(__FILE__));\r\n\t\t\t$this->pluginDIR = WP_PLUGIN_DIR . '/' . dirname(plugin_basename(__FILE__));\r\n\t\t\t//$this->query_wordpress_apis();\r\n\t\t\t$this->determine_styles_to_include();\r\n\t\t\t$this->register_hooks();\r\n\t\t}", "title": "" }, { "docid": "e80bc3b25583f12718d8d6f24c04dd81", "score": "0.54740196", "text": "protected function initPlugin() {}", "title": "" }, { "docid": "311a9ebebf34a41a526a4262e2b9aa7e", "score": "0.54712224", "text": "function __construct() {\n $this->plugin = plugin_basename(__FILE__); \n\t}", "title": "" }, { "docid": "68fa48984aa9bba0abf016f7d20d1433", "score": "0.54691005", "text": "function plugin_version_fusinvinventory() {\n return array('name' => 'FusionInventory INVENTORY',\n 'shortname' => 'fusinvinventory',\n 'version' => '2.3.0-1',\n 'author' =>'<a href=\"mailto:[email protected]\">David DURIEUX</a>\n & <a href=\"mailto:[email protected]\">Vincent MAZZONI</a>',\n 'homepage' =>'http://forge.fusioninventory.org/projects/pluginfusinvinventory',\n 'minGlpiVersion' => '0.78'// For compatibility / no install in version < 0.78\n );\n}", "title": "" }, { "docid": "037e20828971585037167fdd704a53b0", "score": "0.5464563", "text": "function rolo_enu_plugin_url () {\n\treturn plugins_url ('easy-note-uploads-for-rolopress/');\n}", "title": "" }, { "docid": "d825ec58ef1a328e9645648c22aac0cd", "score": "0.5460424", "text": "function tokopress_register_required_plugins() {\n\n\t$plugins = array(\n\n\t\t/* Required Plugin */\n\t\tarray(\n\t\t\t'name'\t\t=> 'WooCommerce',\n\t\t\t'slug'\t\t=> 'woocommerce',\n\t\t\t'required'\t=> true,\n\t\t),\n\n\t\tarray(\n\t\t\t'name' \t=> 'Marketica Addons',\n\t\t\t'slug' \t=> 'tokopress-multipurpose-shortcode',\n\t\t\t'source' \t=> 'http://toko.press/api/bundles/tokopress-multipurpose-shortcode-v'.THEME_ADDONS_VERSION.'.zip',\n\t\t\t'version' \t=> THEME_ADDONS_VERSION,\n\t\t\t'required' \t=> true,\n\t\t),\n\n\t\tarray(\n\t\t\t'name' \t=> 'Visual Composer',\n\t\t\t'slug' \t=> 'js_composer',\n\t\t\t'source' \t=> 'http://toko.press/api/bundles/js_composer-v5.1.1.zip',\n\t\t\t'version' \t=> '5.1.1',\n\t\t\t'required' \t=> true,\n\t\t),\n\n\t\t/* Recommended Plugin */\n\n\t\tarray(\n\t\t\t'name'\t\t=> 'WordPress Importer',\n\t\t\t'slug'\t\t=> 'wordpress-importer',\n\t\t\t'source' \t=> 'http://toko.press/api/bundles/wordpress-importer-v2.0.2.zip',\n\t\t\t'version' \t=> '2.0.2',\n\t\t\t'required' \t=> true,\n\t\t),\n\n\t\tarray(\n\t\t\t'name'\t\t=> 'Widget Importer Exporter',\n\t\t\t'slug'\t\t=> 'widget-importer-exporter',\n\t\t\t'required'\t=> true,\n\t\t),\n\n\t\tarray(\n\t\t\t'name'\t\t=> 'Customizer Export/Import',\n\t\t\t'slug'\t\t=> 'customizer-export-import',\n\t\t\t'required'\t=> true,\n\t\t),\n\n\t\tarray(\n\t\t\t'name'\t\t=> 'One Click Demo Import',\n\t\t\t'slug'\t\t=> 'one-click-demo-import',\n\t\t\t'source' \t=> 'http://toko.press/api/bundles/one-click-demo-import-v2.2.0.zip',\n\t\t\t'version' \t=> '2.2.0',\n\t\t\t'required'\t=> true,\n\t\t),\n\n\t\tarray(\n\t\t\t'name'\t\t=> 'Force Regenerate Thumbnails',\n\t\t\t'slug'\t\t=> 'force-regenerate-thumbnails',\n\t\t\t'required'\t=> false,\n\t\t),\n\n\t\tarray(\n\t\t\t'name'\t\t=> 'MailChimp for WordPress',\n\t\t\t'slug'\t\t=> 'mailchimp-for-wp',\n\t\t\t'version' \t=> '3.0.0',\n\t\t\t'required'\t=> false,\n\t\t),\n\n\t\tarray(\n\t\t\t'name' => 'Revolution Slider',\n\t\t\t'slug' => 'revslider',\n\t\t\t'source' => 'http://toko.press/api/bundles/revslider-v5.4.2.zip',\n\t\t\t'version' \t=> '5.4.2',\n\t\t\t'required' => false\n\t\t),\n\n\t);\n\n\t// if ( class_exists('WooCommerce_Product_Vendors') ) {\n\t// \t$show_wcvendors = false;\n\t// }\n\t// elseif ( class_exists('FPMultiVendor') ) {\n\t// \t$show_wcvendors = false;\n\t// }\n\t// elseif ( class_exists('WeDevs_Dokan') ) {\n\t// \t$show_wcvendors = false;\n\t// }\n\t// else {\n\t// \t$show_wcvendors = true;\n\t// }\n\t// if ( $show_wcvendors ) {\n\t// \t$plugins[] = array(\n\t// \t\t\t'name'\t\t=> 'WC Vendors',\n\t// \t\t\t'slug'\t\t=> 'wc-vendors',\n\t// \t\t\t'required'\t=> false,\n\t// \t\t);\n\n\t// }\n\n\t$plugins[] = array(\n\t\t'name' \t=> 'WooCommerce Simple Frontend Submission',\n\t\t'slug' \t=> 'wcxt-frontend-submission',\n\t\t'source' \t=> 'http://toko.press/api/bundles/wcxt-frontend-submission-v1.2.zip',\n\t\t'version' \t=> '1.2',\n\t\t'required' \t=> false,\n\t);\n\t$plugins[] = array(\n\t\t'name'\t\t=> 'CMB2 - Metabox Library',\n\t\t'slug'\t\t=> 'cmb2',\n\t\t'required'\t=> ( function_exists( 'xt_wc_frontend_submission_shortcode' ) ? true : false ),\n\t);\n\n\t$config = array(\n\t\t'id' => 'toko-tgmpa', // Unique ID for hashing notices for multiple instances of TGMPA.\n\t\t'default_path' => '', // Default absolute path to bundled plugins.\n\t\t'menu' => 'toko-install-plugins', // Menu slug.\n\t\t'parent_slug' => 'themes.php', // Parent menu slug.\n\t\t'capability' => 'edit_theme_options', // Capability needed to view plugin install page, should be a capability associated with the parent menu used.\n\t\t'has_notices' => true, // Show admin notices or not.\n\t\t'dismissable' => true, // If false, a user cannot dismiss the nag message.\n\t\t'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.\n\t\t'is_automatic' => true, // Automatically activate plugins after installation or not.\n\t\t'message' => '', // Message to output right before the plugins table.\n\t);\n\n\ttgmpa( $plugins, $config );\n\n}", "title": "" }, { "docid": "e1d76b1281d42239a97a6ecc3dd8aa36", "score": "0.54548323", "text": "function mits_shortcode_resource() {\n\twp_register_script(\"mits-shortcode-script\", plugin_dir_url(__FILE__).\"js/jadwal.js\", array('jquery'));\n\twp_register_style(\"mits-shortcode-style\", plugin_dir_url(__FILE__).\"css/jadwal.css\", array());\n}", "title": "" }, { "docid": "8ec3a7510b6898844b68cba7e5e13454", "score": "0.5445386", "text": "function add_oelinw() {\r\nwp_enqueue_script('oelinw', plugins_url( 'oelinw.js' , __FILE__ ),'','1.0.0',true);\r\n}", "title": "" }, { "docid": "96dc38dabb94229691132df75a7639fc", "score": "0.54442006", "text": "public function plugin_url()\n {\n return untrailingslashit(plugins_url('/', LSC_PLUGIN_FILE));\n }", "title": "" }, { "docid": "ce56931e7a423fda182853ac173a79ea", "score": "0.54411167", "text": "Function az_glasuvam_wp_head() { ?>\r\n<!-- [http://az-glasuvam.com] -->\r\n<link rel=\"stylesheet\" href=\"http://az-glasuvam.com/rotator.css\" type=\"text/css\" />\r\n<script type=\"text/javascript\" src=\"http://az-glasuvam.com/rotator.js\"></script>\r\n\t<? }", "title": "" }, { "docid": "708571ae120e09d5b605463078ceaaf8", "score": "0.54381096", "text": "public function plugin_activate(){ \n //call our custom content type function\n $this->register_fcircles_content_type();\n //flush permalinks\n flush_rewrite_rules();\n}", "title": "" }, { "docid": "d0bac9b84fc25404ff7ecacc70e18bd8", "score": "0.5434274", "text": "function crear_pagina_alexplugin(){\n\trequire_once(dirname(__FILE__).'/templates/admin dashboard.php');\n}", "title": "" }, { "docid": "c194e4597ced4befc1c7f615c2903b77", "score": "0.5431429", "text": "function import_from_copysniper_dashboard_widget() {\n\techo '<a href=\"admin.php?import=copysniper\" class=\"button\" style=\"margin-top: 5px;\">Import</a>';\n\t$text .= '<div style=\"margin-top: 15px; border-top: solid 1px #ececec;\">';\n\t$text .= '<ul>';\n\t$text .= '<li><h4>Help and Support</h4></li>';\n\t$text .= '<li><a href=\"http://copysniper.com/\">' . __( 'User Guide', 'import-from-copysniper' ) . '</a></li>';\n\t$text .= '<li><a href=\"http://copysniper.com/\">' . __( 'Plugin Home Page', 'import-from-copysniper' ) . '</a></li>';\n\t$text .= '</ul>';\n\t$text .= '</div>';\n\techo $text;\n}", "title": "" }, { "docid": "8b89c1aad8957b29d9cddcdf8f9bf2be", "score": "0.5428512", "text": "function activate_slider_plugin() \n{\n\tglobal $wpdb;\n\t\n\t$queryslide = \" CREATE TABLE IF NOT EXISTS `wp_slide` (\n\t`id` BIGINT( 40 ) NOT NULL AUTO_INCREMENT ,\n\t`imgname` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,\n\tPRIMARY KEY ( `id` )\n\t) ENGINE = MYISAM\";\n\t$wpdb->query($queryslide);\n}", "title": "" }, { "docid": "6742994ae86f3a20ce4aeae63292d579", "score": "0.5419194", "text": "function tfc_nathan_small_blue_preheader() {\r\n echo '<div id=\"pre-header\" class=\"blue-bar has-azure-background-color\">' . wp_kses_post( get_theme_mod( 'blue_bar', 'Set the content of this section in the theme customizer.' ) ) . '</div>';\r\n}", "title": "" }, { "docid": "9ae32497a0cb77d0767450719b5d5f16", "score": "0.54161453", "text": "function bwwblueskyplugin_install() {\n //create_journal_post_type();\n \n // Clear the permalinks after the post type has been registered\n //flush_rewrite_rules();\n \n}", "title": "" }, { "docid": "0055a825adc9867823cf6b83dc51499e", "score": "0.541484", "text": "public static function initialisePlugin() {\r\n\t\r\n\t\tadd_filter('plugin_row_meta', array(__CLASS__, 'filter_plugin_row_meta'),10,2);\r\n\t\tadd_action('do_robots', array(__CLASS__, 'addRobotLinks'), 100, 0);\r\n\t\tadd_action('wp_head', array(__CLASS__, 'addRssLink'),100);\r\n\r\n\r\n\t\t// only include admin files when necessary.\r\n\t\tif (is_admin()) \r\n\t\t{\r\n\t\t\tinclude_once 'settings.php';\r\n\t\t\tinclude_once 'postMetaData.php';\r\n\t\t\tinclude_once 'categoryMetaData.php';\r\n\t\t\tsettings::addHooks();\r\n\t\t\tcategoryMetaData::addHooks();\r\n\t\t\tpostMetaData::addHooks();\t\r\n\t\r\n\t\t}\r\n\r\n\t\r\n\t\t\r\n\t\tif (!wp_get_schedule('xmsg_ping')) \r\n\t\t{\r\n\t\t\t// ping in 2 hours from when setup.\r\n\t\t\twp_schedule_event(time() + 60*60*2 , 'daily', 'xmsg_ping');\r\n\t\t}\r\n\r\n\t\tadd_action('xmsg_ping', array(__CLASS__, 'doPing'));\r\n\t\t\r\n\t\t// NB Network activation will not have set up the rules for the site.\r\n\t\t// Check if they exist and then reactivate.\r\n\t\tif (get_option(RULES_OPTION_NAME, null) != RULES_VERSION) \r\n\t\t{\r\n\t\t\tadd_action('wp_loaded', array(__CLASS__, 'activateRewriteRules'), 99999, 1);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "107c6d19d5a531af857b163216448da1", "score": "0.54120296", "text": "function postflight($type,$parent) {\n\t\t$version = new JVersion();\n\t\tif ($version->RELEASE == '3.0')\n\t\t\tdefine('DS',DIRECTORY_SEPARATOR);\n\n\t\t$dir_arr = explode(DS,__FILE__);\n\t\t$dir_arr = array_slice($dir_arr, 0,(count($dir_arr)-1));\n\t\t\n\t\t//now install.\n\t\t$installer = new JInstaller();\n\t\t$installer->install(implode(DS,$dir_arr).DS.'plugin');\n\t}", "title": "" }, { "docid": "4b2878c085f58e5bcd3b2817ea11eb5d", "score": "0.5410314", "text": "function activate_kd_cpt_plugin(){\n Inc\\Base\\Activate::activate();\n}", "title": "" }, { "docid": "4b16769359b51d03a24baf931443e19b", "score": "0.54090583", "text": "public function pi_plugins_init()\n\t{\n\t\trequire_once PI_C_PATH . 'class.piblogcustomize.php';\n new piBlogCustomize();\n\n /**\n * Extend Wordpress Customize\n */\n require_once PI_C_PATH . 'piextendcustomizer.php';\n\t}", "title": "" }, { "docid": "ec3bad877c80f2e397439b05373576eb", "score": "0.5406852", "text": "function fastway_register_required_plugins() {\r\n /**\r\n * Array of plugin arrays. Required keys are name and slug.\r\n * If the source is NOT from the .org repo, then source is also required.\r\n */\r\n $default_path = 'https://cmssuperheroes.com/plugins/elementor/';\r\n $plugins = array(\r\n /* CMS Plugin */\r\n array(\r\n 'name' => esc_html__('Redux Framework', 'fastway'),\r\n 'slug' => 'redux-framework',\r\n 'required' => true,\r\n ),\r\n array(\r\n 'name' => esc_html__('Elementor', 'fastway'),\r\n 'slug' => 'elementor',\r\n 'required' => true,\r\n ),\r\n array(\r\n 'name' => esc_html__('Theme Core', 'fastway'),\r\n 'slug' => 'elementor-theme-core',\r\n 'source' => 'elementor-theme-core.zip',\r\n 'required' => true,\r\n ),\r\n array(\r\n 'name' => esc_html__('SWA Import Export', 'fastway'),\r\n 'slug' => 'swa-import-export',\r\n 'source' => 'swa-import-export.zip',\r\n 'required' => true,\r\n ),\r\n array(\r\n 'name' => esc_html__('Revolution Slider', 'fastway'),\r\n 'slug' => 'revslider',\r\n 'source' => esc_url('https://cmssuperheroes.com/plugins/revslider.zip'),\r\n 'required' => true,\r\n ),\r\n array(\r\n 'name' => esc_html__('Contact Form 7', 'fastway'),\r\n 'slug' => 'contact-form-7',\r\n 'required' => true,\r\n ),\r\n array(\r\n 'name' => esc_html__('Newslettes', 'fastway'),\r\n 'slug' => 'newsletter',\r\n 'required' => true,\r\n ),\r\n array(\r\n 'name' => esc_html__('Instagram Feed', 'fastway'),\r\n 'slug' => 'instagram-feed',\r\n 'required' => true,\r\n ),\r\n );\r\n\r\n /**\r\n * Array of configuration settings. Amend each line as needed.\r\n * If you want the default strings to be available under your own theme domain,\r\n * leave the strings uncommented.\r\n * Some of the strings are added into a sprintf, so see the comments at the\r\n * end of each line for what each argument will be.\r\n */\r\n $config = array(\r\n 'default_path' => $default_path, // Default absolute path to pre-packaged plugins.\r\n 'menu' => 'tgmpa-install-plugins', // Menu slug.\r\n\r\n );\r\n\r\n tgmpa( $plugins, $config );\r\n\r\n}", "title": "" }, { "docid": "a22ac7360ce2b9f548ee21685f192d97", "score": "0.5405738", "text": "function myfirsthelloworldplugincss() {\n\t?>\n\t<link rel=\"stylesheet\" href=\"<?php bloginfo('wpurl'); ?>/wp-content/plugins/myfirstwphelloworldplugin/myfirstwphelloworldplugin.css\" type=\"text/css\" media=\"screen\" />\n\t<?php\n}", "title": "" }, { "docid": "21f382f41724dfc5efe77cd9c88dd842", "score": "0.5400694", "text": "function function_myappname_help_overview() { ?>\n <p>\n Version <?php echo APP_VERSION;?>\n </p>\n\n <p>\n The purpose of this plugin is to do some important stuff...\n </p>\n\n<?php }", "title": "" }, { "docid": "5c08479334056ca66afe9dbb4eab3f22", "score": "0.53951985", "text": "function ashe_recommended_plugin( $slug, $filename ) {\n\n\tif ( $slug === 'facebook-pagelike-widget' ) {\n\t\t$size = '128x128';\n\t} else {\n\t\t$size = '256x256';\n\t}\n\n\n\t$plugin_info = ashe_call_plugin_api( $slug );\n\t$plugin_desc = $plugin_info->short_description;\n\t$plugin_img = ( ! isset($plugin_info->icons['1x']) ) ? $plugin_info->icons['default'] : $plugin_info->icons['1x'];\n?>\n\n\t<div class=\"plugin-card\">\n\t\t<div class=\"name column-name\">\n\t\t\t<h3>\n\t\t\t\t<?php echo esc_html( $plugin_info->name ); ?>\n\t\t\t\t<img src=\"<?php echo $plugin_img; ?>\" class=\"plugin-icon\" alt=\"\">\n\t\t\t</h3>\n\t\t</div>\n\t\t<div class=\"action-links\">\n\t\t\t<?php if ( ashe_check_installed_plugin( $slug, $filename ) ) : ?>\n\t\t\t<button type=\"button\" class=\"button button-disabled\" disabled=\"disabled\"><?php esc_html_e( 'Installed', 'ashe' ); ?></button>\n\t\t\t<?php else : ?>\n\t\t\t<a class=\"install-now button-primary\" href=\"<?php echo esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin='. $slug ), 'install-plugin_'. $slug ) ); ?>\" >\n\t\t\t\t<?php esc_html_e( 'Install Now', 'ashe' ); ?>\n\t\t\t</a>\t\t\t\t\t\t\t\n\t\t\t<?php endif; ?>\n\t\t</div>\n\t\t<div class=\"desc column-description\">\n\t\t\t<p><?php echo $plugin_desc . esc_html__( '...', 'ashe' ); ?></p>\n\t\t</div>\n\t</div>\n\n<?php\n}", "title": "" }, { "docid": "2fa54fde203e8e6f065f8559e41d8cd1", "score": "0.539092", "text": "function show_plugins($plugins) {\n\t\tinclude('admin-views/plugin-table.php');\n\t}", "title": "" }, { "docid": "e8f6a0cbdca056bf37068608264199b8", "score": "0.538958", "text": "public function plugin_activate(){ \n //call our custom content type function\n $this->register_location_content_type();\n //flush permalinks\n flush_rewrite_rules();\n}", "title": "" }, { "docid": "d4044045cb9947e3fa9856a1cc33f93b", "score": "0.5389506", "text": "abstract protected function createPlugin(...$args);", "title": "" }, { "docid": "e5ee23a6ba99bee9756b6fa1fd98d228", "score": "0.53886837", "text": "function profile_plugin_func() {\n\n\n\n\tdo_shortcode('[umbrella_person_profile_page]');\n\t$uPPUmbrellaPersonalProfile = new App\\UPPUmbrellaPersonalProfile();\n\n\n\tif(is_user_logged_in())\n\t{\n\n\t\tprint \"user is logged in \";\n\n\t\t$current_user = wp_get_current_user();\n\t\t//$customAPIKEY = get_field('custom_api_key','option');// name of the admin\n\t\t//$customAPIID = get_field('custom_api_id','option');// Email Title for the admin\n\t\t//echo \"Email Address: \" . $current_user->user_email;\n\t\t//$postargs = \"http://api.ontraport.com/1/objects?objectID=0&performAll=true&sortDir=asc&condition=email%3D'[email protected]'&searchNotes=true\";\n\t\t$postargs = \"http://api.ontraport.com/1/objects?objectID=0&performAll=true&sortDir=asc&condition=email%3D'\".$current_user->user_email.\"'&searchNotes=true\";\n\n\t\t$session = curl_init();\n\t\tcurl_setopt ($session, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt ($session, CURLOPT_URL, $postargs);\n\t\t//curl_setopt ($session, CURLOPT_HEADER, true);\n\t\tcurl_setopt ($session, CURLOPT_HTTPHEADER, array(\n\t\t\t'Api-Appid:2_7818_AFzuWztKz',\n\t\t\t'Api-Key:fY4Zva90HP8XFx3'\n\t\t));\n\t\t$response = curl_exec($session);\n\t\tcurl_close($session);\n\t\t//header(\"Content-Type: text\");\n\t\t//echo \"CODE: \" . $response;\n\t\t$getName = json_decode($response);\n\n\t\t//echo '<br /><br />Name: '. $getName->data[0]->f1549;\n\t} else {\n\t\tprint \"user is not logged in \";\n\t}\n\n\t// define( 'WPCA_VERSION', '1.0' );\n\n\t// function wp_custom_avatar_customize_register( $wp_customize ) {\n\n\t// $wp_customize->add_section( 'wp_custom_avatar_section' , array(\n\t// 'title' => __( 'WP Custom Avatar', 'wp-custom-avatar' ),\n\t// 'priority' => 200\n\t// ) );\n\n\t// $wp_customize->add_setting( 'wp_custom_avatar' );\n\n\t// $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'wp_custom_avatar', array(\n\t// 'label' => __( 'Upload Custom Avatar', 'wp-custom-avatar' ),\n\t// 'section' => 'wp_custom_avatar_section',\n\t// 'settings' => 'wp_custom_avatar',\n\t// ) ) );\n\t// }\n\t// add_action( 'customize_register', 'wp_custom_avatar_customize_register' );\n\n\n\t// function wp_custom_avatar($avatar_defaults) {\n\t// $avatar = get_theme_mod( 'wp_custom_avatar' );\n\t// $avatar_defaults[$avatar] = get_bloginfo('name');\n\t// return $avatar_defaults;\n\t// }\n\t// add_filter( 'avatar_defaults', 'wp_custom_avatar' );\n\n\n\t$businessdesc = $getName->data[0]->title;\n\t$acount_id = $getName->data[0]->id;\n\t$firstname = $getName->data[0]->firstname;\n\t$lastname = $getName->data[0]->lastname;\n\t$address = $getName->data[0]->address;\n\t$city = $getName->data[0]->city;\n\t$country = $getName->data[0]->country;\n\t$state = $getName->data[0]->state;\n\t$zip = $getName->data[0]->zip;\n\t$email = $getName->data[0]->email;\n\t$homephone = $getName->data[0]->home_phone;\n\t$cellphone = $getName->data[0]->cell_phone;\n\t$company = $getName->data[0]->company;\n\t$address2 = $getName->data[0]->address2;\n\t$companynumber = $getName->data[0]->f1564;\n\t$officephone = $getName->data[0]->office_phone;\n\t$fax = $getName->data[0]->fax;\n\t$website = $getName->data[0]->website;\n\t$town = $getName->data[0]->Town_340;\n\t$packagelevel = $getName->data[0]->f1548;\n\t$accountmanager = $getName->data[0]->f1546;\n\t$accountbalance = $getName->data[0]->f1547;\n\t$owner = $getName->data[0]->owner;\n\n\n\n\tif( !isset($getName->data[0]->id) ){\n\n\t\t$acount_id = 0;\n\n\t}\n\n\t// echo '<pre>';\n\t// var_dump($getName);\n\t// echo '</pre>';\n\n\t$wpdb_b = new wpdb( \"dbo640728737\", \"1qazxsw2!QAZXSW@\", \"db640728737\", \"db640728737.db.1and1.com\" );\n\n\tif ( !empty($_FILES['imageUpload']) ) {\n\n\t\t$targetFolder = './wp-content/uploads/'; // Relative to the root\n\t\t$img_filename = \"\";\n\n\t\t$images = $_FILES['imageUpload'];\n\n\t\t$tempFile = $images['tmp_name'];\n\t\t$fileParts = pathinfo($images['name']);\n\t\t$targetPath = $targetFolder;\n\t\t$img_filename = time().\"_\".mt_rand().\".\".$fileParts['extension'];\n\t\t$targetFile = $targetPath . '/' . $img_filename;\n\n\t\tif(move_uploaded_file($tempFile,$targetFile)) {\n\t\t\t// $current_profile_pic = wp_upload_dir().$img_filename;\n\n\t\t\t// $data = '<contact id=\"'.$acount_id.'\">\n\t\t\t// \t\t <Group_Tag name=\"Umbrella\">\n\t\t\t// \t\t <field name=\"\">'.$current_profile_pic.'</field>\n\t\t\t// \t\t </Group_Tag>\n\t\t\t// \t\t</contact>';\n\n\t\t\t// $data = urlencode(urlencode($data));\n\t\t\t// // Replace the strings with your API credentials located in Admin > OfficeAutoPilot API Instructions and Key Manager\n\t\t\t// $appid = \"2_7818_zjPV3pkvN\";\n\t\t\t// $key = \"PuXNaUS4sd46b69\";\n\t\t\t// $reqType= \"update\";\n\t\t\t// $postargs = \"appid=\".$appid.\"&key=\".$key.\"&return_id=1&reqType=\".$reqType.\"&data=\".$data;\n\t\t\t// $request = \"http://api.ontraport.com/cdata.php\";\n\t\t\t// $session = curl_init($request);\n\t\t\t// curl_setopt ($session, CURLOPT_POST, true);\n\t\t\t// curl_setopt ($session, CURLOPT_POSTFIELDS, $postargs);\n\t\t\t// curl_setopt($session, CURLOPT_HEADER, false);\n\t\t\t// curl_setopt($session, CURLOPT_RETURNTRANSFER, true);\n\t\t\t// $response = curl_exec($session);\n\t\t\t// curl_close($session);\n\n\t\t\t// START WP UPLOAD IMAGE CODE\n\n\n\t\t\techo wp_upload_dir();\n\t\t\t//$img_filename = wp_upload_dir().$img_filename;\n\n\t\t\t$rows = $wpdb_b->get_results( \"SELECT * FROM wp_user_imguploads WHERE uid_PartnerID=\".$acount_id );\n\n\t\t\tif( count($rows) > 0 ){\n\n\t\t\t\t$wpdb_b->get_results( \"UPDATE wp_user_imguploads SET ui_URL='\".$img_filename.\"' WHERE uid_PartnerID=\".$acount_id );\n\t\t\t} else {\n\n\t\t\t\t$sql = \"INSERT INTO `wp_user_imguploads` (ui_URL, uid_PartnerID) values ('\".$img_filename.\"',\".$acount_id.\")\";\n\n\t\t\t\t$wpdb_b->query($sql);\n\t\t\t}\n\t\t\t// END WP UPLOAD IMAGE CODE\n\n\t\t}\n\n\n\n\t}\n\n\tif( $_POST['from_tab'] == 'tab_personal' ){\n\n\t\t$data = '<contact id=\"'.$acount_id.'\">\n\t\t\t <Group_Tag name=\"Contact Information\">\n\t\t\t <field name=\"First Name\">'.$_POST['pfirstname'].'</field>\n\t\t\t <field name=\"Last Name\">'.$_POST['plastname'].'</field>\n\t\t\t <field name=\"Address\">'.$_POST['paddress'].'</field>\n\t\t\t <field name=\"City\">'.$_POST['pcity'].'</field>\n\t\t\t <field name=\"Zip Code\">'.$_POST['ppostcode'].'</field>\n\t\t\t <field name=\"Home Phone\">'.$_POST['phomephone'].'</field>\n\t\t\t <field name=\"Cell Phone\">'.$_POST['pcellphone'].'</field>\n\t\t\t </Group_Tag>\n \t\t\t</contact>';\n\n\t\t$data = urlencode(urlencode($data));\n\n\t\t$appid = \"2_7818_AFzuWztKz\";\n\t\t$key = \"fY4Zva90HP8XFx3\";\n\t\t$reqType= \"update\";\n\t\t$postargs = \"appid=\".$appid.\"&key=\".$key.\"&return_id=1&reqType=\".$reqType.\"&data=\".$data;\n\t\t$request = \"http://api.ontraport.com/cdata.php\";\n\t\t$session = curl_init($request);\n\t\tcurl_setopt ($session, CURLOPT_POST, true);\n\t\tcurl_setopt ($session, CURLOPT_POSTFIELDS, $postargs);\n\t\tcurl_setopt($session, CURLOPT_HEADER, false);\n\t\tcurl_setopt($session, CURLOPT_RETURNTRANSFER, true);\n\t\t$response = curl_exec($session);\n\t\tcurl_close($session);\n\n\n\n\t\t$notificationmsg = '\n\n\t\t\t \t\t\t\t\t<style>\n\t\t\t \t\t\t\t\t.alert {\n\t\t\t \t\t\t\t\t padding: 20px;\n\t\t\t \t\t\t\t\t background-color: #f44336;\n\t\t\t \t\t\t\t\t color: white;\n\t\t\t \t\t\t\t\t}\n\n\t\t\t \t\t\t\t\t.closebtn {\n\t\t\t \t\t\t\t\t margin-left: 15px;\n\t\t\t \t\t\t\t\t color: white;\n\t\t\t \t\t\t\t\t font-weight: bold;\n\t\t\t \t\t\t\t\t float: right;\n\t\t\t \t\t\t\t\t font-size: 22px;\n\t\t\t \t\t\t\t\t line-height: 20px;\n\t\t\t \t\t\t\t\t cursor: pointer;\n\t\t\t \t\t\t\t\t transition: 0.3s;\n\t\t\t \t\t\t\t\t}\n\n\t\t\t \t\t\t\t\t.closebtn:hover {\n\t\t\t \t\t\t\t\t color: black;\n\t\t\t \t\t\t\t\t}\n\t\t\t \t\t\t\t\t</style>\n\n\t\t\t \t\t\t\t\t<div class=\"alert\">\n\t\t\t \t\t\t\t\t <span class=\"closebtn\" onclick=\"this.parentElement.style.display=\\'none\\';\">&times;</span>\n\t\t\t \t\t\t\t\t <strong>Success!</strong> Update Successful\n\t\t\t \t\t\t\t\t</div>\n\n\n\t\t\t \t\t\t\t\t';\n\n\t\techo $notificationmsg;\n\n\n\t}\n\n\tif( $_POST['from_tab'] == 'tab_business' ){\n\n\n\t\t$data = '<contact id=\"'.$acount_id.'\">\n\t\t\t <Group_Tag name=\"Contact Information\">\n\t\t\t <field name=\"Company\">'.$_POST['bcompany'].'</field>\n\t\t\t <field name=\"Address\">'.$_POST['baddress'].'</field>\n\t\t\t <field name=\"Town\">'.$_POST['btown'].'</field>\n\t\t\t <field name=\"City\">'.$_POST['bcity'].'</field>\n\t\t\t <field name=\"Zip Code\">'.$_POST['bpostcode'].'</field>\n\t\t\t <field name=\"Company Number\">'.$_POST['bcompanynumber'].'</field>\n\t\t\t <field name=\"Office Phone\">'.$_POST['bofficephone'].'</field>\n\t\t\t <field name=\"Cell Phone\">'.$_POST['bmobilephone'].'</field>\n\t\t\t <field name=\"Company\">'.$_POST['bcompany'].'</field>\n\t\t\t <field name=\"Website\">'.$_POST['bwebsite'].'</field>\n\t\t\t </Group_Tag>\n \t\t\t</contact>';\n\n\t\t$data = urlencode(urlencode($data));\n\n\t\t$appid = \"2_7818_AFzuWztKz\";\n\t\t$key = \"fY4Zva90HP8XFx3\";\n\t\t$reqType= \"update\";\n\t\t$postargs = \"appid=\".$appid.\"&key=\".$key.\"&return_id=1&reqType=\".$reqType.\"&data=\".$data;\n\t\t$request = \"http://api.ontraport.com/cdata.php\";\n\t\t$session = curl_init($request);\n\t\tcurl_setopt ($session, CURLOPT_POST, true);\n\t\tcurl_setopt ($session, CURLOPT_POSTFIELDS, $postargs);\n\t\tcurl_setopt($session, CURLOPT_HEADER, false);\n\t\tcurl_setopt($session, CURLOPT_RETURNTRANSFER, true);\n\t\t$response = curl_exec($session);\n\t\tcurl_close($session);\n\n\n\t\t$notificationmsg2 = '\n\n\t\t\t \t\t\t\t\t<style>\n\t\t\t \t\t\t\t\t.alert {\n\t\t\t \t\t\t\t\t padding: 20px;\n\t\t\t \t\t\t\t\t background-color: #f44336;\n\t\t\t \t\t\t\t\t color: white;\n\t\t\t \t\t\t\t\t}\n\n\t\t\t \t\t\t\t\t.closebtn {\n\t\t\t \t\t\t\t\t margin-left: 15px;\n\t\t\t \t\t\t\t\t color: white;\n\t\t\t \t\t\t\t\t font-weight: bold;\n\t\t\t \t\t\t\t\t float: right;\n\t\t\t \t\t\t\t\t font-size: 22px;\n\t\t\t \t\t\t\t\t line-height: 20px;\n\t\t\t \t\t\t\t\t cursor: pointer;\n\t\t\t \t\t\t\t\t transition: 0.3s;\n\t\t\t \t\t\t\t\t}\n\n\t\t\t \t\t\t\t\t.closebtn:hover {\n\t\t\t \t\t\t\t\t color: black;\n\t\t\t \t\t\t\t\t}\n\t\t\t \t\t\t\t\t</style>\n\n\t\t\t \t\t\t\t\t<div class=\"alert\">\n\t\t\t \t\t\t\t\t <span class=\"closebtn\" onclick=\"this.parentElement.style.display=\\'none\\';\">&times;</span>\n\t\t\t \t\t\t\t\t <strong>Success!</strong> Update Successful\n\t\t\t \t\t\t\t\t</div>\n\n\n\t\t\t \t\t\t\t\t';\n\n\t\techo $notificationmsg2;\n\n\n\t}\n\n\tif( $_POST['from_tab'] == 'tab_biznetwork' ){\n\n\n\t\t//no fields in OP yet\n\n\n\n\t}\n\n\n\t$rows = $wpdb_b->get_results( \"SELECT * FROM wp_user_imguploads WHERE uid_PartnerID=\".$acount_id );\n\n\t$img_filename = $rows[0]->ui_URL;\n//\n\tif(is_user_logged_in()) {\n\n\n\t\tprint \"user is logged in 1 \";\n\n\n\t\t$current_user = wp_get_current_user();\n\t\t//$customAPIKEY = get_field('custom_api_key','option');// name of the admin\n\t\t//$customAPIID = get_field('custom_api_id','option');// Email Title for the admin\n\t\t//echo \"Email Address: \" . $current_user->user_email;\n\t\t//$postargs = \"http://api.ontraport.com/1/objects?objectID=0&performAll=true&sortDir=asc&condition=email%3D'[email protected]'&searchNotes=true\";\n\t\t$postargs = \"http://api.ontraport.com/1/objects?objectID=0&performAll=true&sortDir=asc&condition=email%3D'\".$current_user->user_email.\"'&searchNotes=true\";\n\n\t\t$session = curl_init();\n\t\tcurl_setopt ($session, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt ($session, CURLOPT_URL, $postargs);\n\t\t//curl_setopt ($session, CURLOPT_HEADER, true);\n\t\tcurl_setopt ($session, CURLOPT_HTTPHEADER, array(\n\t\t\t'Api-Appid:2_7818_AFzuWztKz',\n\t\t\t'Api-Key:fY4Zva90HP8XFx3'\n\t\t));\n\t\t$response = curl_exec($session);\n\t\tcurl_close($session);\n\t\t//header(\"Content-Type: text\");\n\t\t//echo \"CODE: \" . $response;\n\t\t$getName = json_decode($response);\n\n\t\t$current_profile_pic = $getName->data[0]->f1547;\n\n\t\t//echo '<br /><br />Name: '. $getName->data[0]->f1549;\n\t} else {\n\t\tprint \"user is not logged in \";\n\n\t}\n\n\t$current_profile_pic = 'https://fieldops.umbrellasupport.co.uk/wp-content/uploads/imageuploads/1666969737b8d11b72a78596a5cf9859.jpg';\n\n\n\t//\t\t$content = '\n\t?>\n\t<script>\n\n\t</script>\n\n\t<style>\n\n\t\t/* TABS */\n\t\t/* Style the list */\n\t\tul.q-tab {\n\t\t\tlist-style-type: none;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\toverflow: hidden;\n\t\t\t/*border: 1px solid #ccc;*/\n\t\t\tbackground-color: #ffffff;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t/* Float the list items side by side */\n\t\tul.q-tab li {\n\t\t\tfloat: left !important;\n\t\t\twidth: 12.5% !important;\n\t\t\ttext-align: center;\n\n\t\t}\n\n\t\t/* Style the links inside the list items */\n\t\tul.q-tab li a {\n\t\t\tdisplay: inline-block;\n\t\t\ttext-align: center;\n\t\t\tpadding: 5px 0;\n\t\t\ttext-decoration: none;\n\t\t\ttransition: 0.3s;\n\n\t\t\tbackground: rgba(0, 0, 0, 0) linear-gradient(to bottom, #ececec 0%, #fafafa 37%, #c8d7dc 100%) repeat scroll 0 0;\n\t\t\tborder-top: 1px solid #ddd;\n\t\t\tborder-left: 1px solid #ddd;\n\t\t\tborder-right: 1px solid #ddd;\n\t\t\tborder-radius: 0;\n\t\t\tcolor: #000000;\n\t\t\tfont-size: 13px;\n\t\t\tfont-weight: 600;\n\t\t\tline-height: 16px;\n\t\t\twidth: 100%;\n\t\t\theight: 33px;\n\t\t\tvertical-align: middle !important;\n\t\t\tborder-top-left-radius: 10px;\n\t\t\tborder-top-right-radius: 10px;\n\t\t}\n\n\t\t/* Change background color of links on hover */\n\t\tul.q-tab li a:hover {background-color: #ddd;}\n\n\t\t/* Create an active/current tablink class */\n\t\tul.q-tab li a:focus, .q-active {\n\t\t\tbackground: rgba(0, 0, 0, 0) linear-gradient(to bottom, #d7090a 0%, #d7090a 0%, #d7090a 100%) repeat scroll 0 0 !important;\n\t\t\tborder-left: 1px solid #ddd !important;\n\t\t\tborder-top: 1px solid #ddd !important;\n\t\t}\n\n\n\t\t/* Style the tab content */\n\t\t.q-tabcontent {\n\t\t\tdisplay: none;\n\t\t\tpadding: 15px !important;\n\t\t\tborder: 1px solid #ddd;\n\t\t\tborder-top: none;\n\t\t\tbackground: #ffffff;\n\t\t}\n\t\t.custom-package {\n\t\t\twidth: 75%;\n\t\t\tfont-size: 11px !important;\n\t\t}\n\t\t.custom-package-right {\n\t\t\tfont-size: 11px !important;\n\t\t\twidth: 75%;\n\t\t}\n\t\t.custom-profile input{\n\t\t\twidth: 85% !important;\n\t\t}\n\t\t.custom-textbox {\n\t\t\tborder: 1px solid #cccaca;\n\t\t\tmin-height: 18px;\n\t\t\tpadding: 6px;\n\t\t}\n\t\t.custom-textbox-biz {\n\t\t\tborder: 1px solid #cccaca;\n\t\t\tmin-height: 18px;\n\t\t\tpadding: 6px;\n\t\t\twidth: 90%;\n\t\t}\n\t\t.custom-textbox-pkg {\n\t\t\tborder: 1px solid #cccaca;\n\t\t\tmin-height: 18px;\n\t\t\tpadding: 6px;\n\t\t\twidth: 90%;\n\t\t}\n\t\t.profile-button {\n\t\t\tbackground: #d7090b none repeat scroll 0 0;\n\t\t\tborder: medium none;\n\t\t\tcolor: #fff;\n\t\t\tpadding: 10px;\n\t\t\twidth: 49% !important;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.business-button {\n\t\t\tbackground: #d7090b none repeat scroll 0 0;\n\t\t\tborder: medium none;\n\t\t\tcolor: #fff;\n\t\t\tpadding: 10px;\n\t\t\twidth: 89% !important;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.biznetwork-button {\n\t\t\tbackground: #d7090b none repeat scroll 0 0;\n\t\t\tborder: medium none;\n\t\t\tcolor: #fff;\n\t\t\tpadding: 10px;\n\t\t\twidth: 88% !important;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.water-mark {\n\t\t\tmin-height: 150px;\n\t\t\tmin-width: 150px;\n\t\t}\n\t\t.water-wrapper {\n\t\t\tmin-height: 300px;\n\t\t\tmin-width: 300px;\n\t\t}\n\t\t.profile-image-wrapper {\n\t\t\tborder: 2px solid #d7090b;\n\t\t\tmargin: 0 auto;\n\t\t\tposition: relative;\n\t\t\ttop: 14px;\n\t\t\twidth: 56%;\n\t\t\tleft: -10px;\n\t\t}\n\t\t.right-pos {\n\t\t\tposition: relative;\n\t\t\ttop: 85px;\n\t\t}\n\t\t.custom-package .package-details{\n\t\t\tpadding: 10px;\n\t\t\tvertical-align: middle;\n\t\t\tfont-size: 11px;\n\n\t\t}\n\t\t.custom-biznetwork {\n\t\t\twidth: 75%;\n\t\t\tfont-size: 11px !important;\n\t\t}\n\t\t.custom-biznetwork-left {\n\t\t\twidth: 75%;\n\t\t\tfont-size: 11px !important;\n\t\t}\n\t\t.custom-biznetwork-right {\n\t\t\twidth: 75%;\n\t\t\tfont-size: 11px !important;\n\t\t}\n\t\t.business-info h2 {\n\t\t\tbackground: #d7090b none repeat scroll 0 0;\n\t\t\tcolor: #fff;\n\t\t\tfont-size: 15px;\n\t\t\tpadding: 10px 13px;\n\t\t\twidth: 87%;\n\t\t}\n\t\t.package-details h2 {\n\t\t\tbackground: #d7090b none repeat scroll 0 0;\n\t\t\tcolor: #fff;\n\t\t\tfont-size: 15px;\n\t\t\tpadding: 10px 13px;\n\t\t\twidth: 87%;\n\t\t}\n\t\t.biznetwork-title h2 {\n\t\t\tbackground: #d7090b none repeat scroll 0 0 !important;\n\t\t\tcolor: #fff !important;\n\t\t\tfont-size: 15px !important;\n\t\t\tpadding: 10px 13px !important;\n\t\t\twidth: 97% !important;\n\t\t}\n\t\t.biznetwork-title a {\n\t\t\tfont-size: 18px;\n\t\t}\n\t\t.logo-wrapper {\n\t\t\tbackground: #aba9aa none repeat scroll 0 0;\n\t\t\tmargin-top: 12px;\n\t\t\tposition: relative;\n\t\t\ttext-align: center;\n\t\t\twidth: 93%;\n\t\t}\n\t\t.logo-wrapper .file-upload {\n\t\t\tbottom: -10px;\n\t\t\tleft: 17%;\n\t\t\tmargin: 10px;\n\t\t\toverflow: hidden;\n\t\t\tposition: absolute;\n\t\t\twidth: 60%;\n\t\t\tz-index: 9999999;\n\t\t}\n\t\t.logo-wrapper .btn-primary {\n\t\t\tbackground-color: #d7090b !important;\n\t\t\tborder-color: #d7090b;\n\t\t\tborder-radius: 0;\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.water-wrapper {\n\t\t\tmin-height: 286px;\n\t\t\tmin-width: 300px;\n\t\t}\n\n\t\t.personal {\n\t\t\tdisplay:block !important;\n\t\t}\n\n\t</style>\n\n\t<ul class=\"q-tab\">\n\t\t<li><a style=\"vertical-align: middle;\" href=\"javascript:void(0)\" class=\"q-tablinks\" tabtype=\"Personal\" onclick=\"openCity(event, \\'Personal\\')\" id=\"defaultOpen\"><span style=\"position: relative; top:8px;\">Personal</span></a></li>\n\t\t<li><a href=\"javascript:void(0)\" class=\"q-tablinks\" tabtype=\"Business\" onclick=\"openCity(event, \\'Business\\')\"><span style=\"position: relative; top:8px;\">Business</span></a></li>\n\t\t<li><a href=\"javascript:void(0)\" class=\"q-tablinks\" tabtype=\"Package\" onclick=\"openCity(event, \\'Package\\')\"><span style=\"position: relative; top:8px;\">Package</span></a></li>\n\t\t<li><a href=\"javascript:void(0)\" class=\"q-tablinks\" tabtype=\"Metrics\" onclick=\"openCity(event, \\'Metrics\\')\"><span style=\"position: relative; top:8px;\">Metrics</span></a></li>\n\t\t<li><a href=\"javascript:void(0)\" class=\"q-tablinks\" tabtype=\"Reputationradar\" onclick=\"location.href = \\'https://testing.umbrellasupport.co.uk/reputation-radar/\\'\">Reputation Radar</a></li>\n\t\t<li><a href=\"javascript:void(0)\" class=\"q-tablinks\" tabtype=\"Businessnetwork\" onclick=\"openCity(event, \\'Businessnetwork\\')\" id=\"defaultOpen\">Business Network</a></li>\n\t\t<li><a href=\"javascript:void(0)\" class=\"q-tablinks\" tabtype=\"Payments\" onclick=\"location.href = \\'https://testing.umbrellasupport.co.uk/balance-automatic-top-up/\\'\"><span style=\"position: relative; top:8px;\">Payments</span></a></li>\n\t\t<li><a href=\"javascript:void(0)\" class=\"q-tablinks\" tabtype=\"Other\" onclick=\"location.href = \\'https://testing.umbrellasupport.co.uk/my-account/\\'\"><span style=\"position: relative; top:8px;\">Other</span></a></li>\n\t</ul>\n\n\t<div id=\"Personal\" class=\"q-tabcontent personal\">\n\t\t<div class=\"custom-profile\">\n\t\t\t<table width=\"100%\" class=\"personal-tab\">\n\t\t\t\t<form method=\"post\" action=\"\">\n\t\t\t\t\t<input type=\"hidden\" name=\"from_tab\" value=\"tab_personal\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"50%\">\n\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">First Name</span><br/>\n\t\t\t\t\t\t\t<input class=\"custom-textbox\" name=\"pfirstname\" type=\"text\" style=\"font-size: 13px !important;\" value=\"<?php print $firstname ?>\"><br/>\n\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Last Name</span><br/>\n\t\t\t\t\t\t\t<input class=\"custom-textbox\" name=\"plastname\" type=\"text\" style=\"font-size: 13px !important;\" value=\"<?php print $lastname ?>\"><br/>\n\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Address</span><br/>\n\t\t\t\t\t\t\t<input class=\"custom-textbox\" name=\"paddress\" type=\"text\" style=\"font-size: 13px !important;\" value=\"<?php print $address ?>\"><br/>\n\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">City</span><br/>\n\t\t\t\t\t\t\t<input class=\"custom-textbox\" name=\"pcity\" type=\"text\" style=\"font-size: 13px !important;\" value=\"<?php print $city ?>\"><br/>\n\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Country</span><br/>\n\t\t\t\t\t\t\t<input class=\"custom-textbox\" type=\"text\" style=\"font-size: 13px !important;\" disabled value=\"<?php print $country ?>\"><br/>\n\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Postcode</span><br/>\n\t\t\t\t\t\t\t<input class=\"custom-textbox\" name=\"ppostcode\" type=\"text\" maxlength=\"8\" style=\"width: 65px !important;\" style=\"font-size: 13px !important;\" value=\"<?php print $zip ?>\"><br/>\n\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Email Address</span><br/>\n\t\t\t\t\t\t\t<input class=\"custom-textbox\" type=\"text\" style=\"font-size: 13px !important;\" disabled value=\"<?php print $email ?>\"><br/>\n\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Home Phone</span><br/>\n\t\t\t\t\t\t\t<input class=\"custom-textbox\" name=\"phomephone\" type=\"text\" maxlength=\"12\" style=\"width: 90px !important;\" style=\"font-size: 13px !important;\" value=\"<?php print $homephone ?>\"><br/>\n\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Mobile Phone</span><br/>\n\t\t\t\t\t\t\t<input class=\"custom-textbox\" name=\"pcellphone\" type=\"text\" maxlength=\"12\" style=\"width: 90px !important;\" style=\"font-size: 13px !important;\" value=\"<?php print $cellphone ?>\"><br/><br/>\n\t\t\t\t\t\t\t<input class=\"profile-button\" value=\"Update Personal Profile >\" type=\"submit\">\n\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td width=\"50%\">\n\t\t\t\t\t\t\t<div class=\"right-pos\">\n\t\t\t\t\t\t\t\t<div class=\"profile-image-wrapper\">\n\t\t\t\t\t\t\t\t\t<div class=\"water-wrapper water-mark\">\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t\t\t\tif($uPPUmbrellaPersonalProfile->getFaceBookIsAuthenticated()):\n\t\t\t\t\t\t\t\t\t\t\tif($uPPUmbrellaPersonalProfile->getFaceBookImageIndex() == 1) {\n\t\t\t\t\t\t\t\t\t\t\t\tprint \"<img id='imageUploadPreview' src='\".$uPPUmbrellaPersonalProfile->getFaceBookProfilePicPath().\"?width=150&width=150' alt='' />\";\n\t\t\t\t\t\t\t\t\t\t\t} else { ?>\n\t\t\t\t\t\t\t\t\t\t\t\t<img id=\"imageUploadPreview\" src=\"<?php if(!empty($featured)){echo $featured;}else{ echo get_stylesheet_directory_uri().'/images/avatar.png';}?>\" alt=\"\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t\t\t\t\t<img id=\"imageUploadPreview\" src=\"<?php if(!empty($featured)){echo $featured;}else{ echo get_stylesheet_directory_uri().'/images/avatar.png';}?>\" alt=\"\" />\n\t\t\t\t\t\t\t\t\t\t<?php endif; ?>\n\n\n\t\t\t\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\t\tprint '<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\" integrity=\"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u\" crossorigin=\"anonymous\">';\n\t\t\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\t\tprint '<div style=\"margin-top:34px;\">';\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\t\t$content = '';\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\t\t\tif($uPPUmbrellaPersonalProfile->getFaceBookIsAuthenticated()):\n\t\t\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t$content .= 'Authenticated with facebook';\n\t\t\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t$content .= 'not authenticated with facebook';\n\t\t\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\t\tprint $content;\n\n\n\n\t\t\t\t\t\t\t\t\t\t// $content = '\n\t\t\t\t\t\t\t\t\t\t// <img id=\"imageUploadPreview\" src=\"https://testing.umbrellasupport.co.uk/wp-content/uploads/2017/01/my-fd-profile.jpg\" alt=\"\">';\n\t\t\t\t\t\t\t\t\t\t// $content .= '\n\n\t\t\t\t\t\t\t\t\t\t?>\n\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div><br/><br/>\n\n\t\t\t\t\t\t\t\t<?php\n\n\n\n\t\t\t\t\t\t\t\t\tif($uPPUmbrellaPersonalProfile->getFaceBookIsAuthenticated()):\n\n\t\t\t\t\t\t\t\t\t\tprint '<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\" integrity=\"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u\" crossorigin=\"anonymous\">';\n\n\t\t\t\t\t\t\t\t\t\tprint '<div style=\"margin-top:34px;\">';\n\n\t\t\t\t\t\t\t\t\t\t$uPPUmbrellaPersonalProfile->htmlPrintFacebookInfoIncludingPicture();\n\n\t\t\t\t\t\t\t\t\t\tprint '</div>';\n\n\t\t\t\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t\t\t\tprint '<div style=\"margin-top:34px;margin-left: 60px;\">';\n\n\t\t\t\t\t\t\t\t\t\t$uPPUmbrellaPersonalProfile->htmlPrintFbButton();\n\n\t\t\t\t\t\t\t\t\t\tprint '</div>';\n\t\t\t\t\t\t\t\t\tendif;\n\n\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t<!---->\n\t\t\t\t<!--\t\t\t\t\t\t\t\t<a class=\"btn btn-block btn-social btn-facebook\" style=\"cursor: pointer; width: 66% !important; left: 45px;\">-->\n\t\t\t\t<!--\t\t\t\t\t\t\t\t\t<span class=\"fa fa-facebook\"></span> Validate Your Identity with Facebook >-->\n\t\t\t\t<!--\t\t\t\t\t\t\t\t</a>-->\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</form>\n\t\t\t</table>\n\t\t</div>\n\n\t</div>\n\n\t<div id=\"Business\" class=\"q-tabcontent\">\n\n\t\t<div class=\"custom-business\">\n\t\t\t<form method=\"post\" action=\"\" enctype=\"multipart/form-data\">\n\t\t\t\t<input type=\"hidden\" name=\"from_tab\" value=\"tab_business\">\n\t\t\t\t<table width=\"100%\" class=\"business-tab\">\n\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"50%\">\n\t\t\t\t\t\t\t<div class=\"business-info\">\n\t\t\t\t\t\t\t\t<h2>Business Details</h2>\n\t\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Name</span><br/>\n\t\t\t\t\t\t\t\t<input class=\"custom-textbox-biz\" name=\"bcompany\" type=\"text\" style=\"font-size: 13px !important;\" value=\"'.$company.'\"><br/>\n\t\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Address Line 1</span><br/>\n\t\t\t\t\t\t\t\t<input class=\"custom-textbox-biz\" name=\"baddress\" type=\"text\" style=\"font-size: 13px !important;\" value=\"'.$address.'\"><br/>\n\t\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Town</span><br/>\n\t\t\t\t\t\t\t\t<input class=\"custom-textbox-biz\" name=\"btown\" type=\"text\" style=\"font-size: 13px !important;\" value=\"'.$town.'\"><br/>\n\t\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">City</span><br/>\n\t\t\t\t\t\t\t\t<input class=\"custom-textbox-biz\" name=\"bcity\" type=\"text\" style=\"font-size: 13px !important;\" value=\"'.$city.'\"><br/>\n\t\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Country</span><br/>\n\t\t\t\t\t\t\t\t<input class=\"custom-textbox-biz\" type=\"text\" style=\"font-size: 13px !important;\" disabled value=\"'.$country.'\"><br/>\n\t\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Postcode</span><br/>\n\t\t\t\t\t\t\t\t<input class=\"custom-textbox-biz\" name=\"bpostcode\" type=\"text\" maxlength=\"8\" style=\"width: 65px !important;\" style=\"font-size: 13px !important;\" value=\"'.$zip.'\"><br/>\n\t\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Company Number</span><br/>\n\t\t\t\t\t\t\t\t<input class=\"custom-textbox-biz\" name=\"bcompanynumber\" type=\"text\" maxlength=\"12\" style=\"width: 90px !important;\" style=\"font-size: 13px !important;\" value=\"'.$companynumber.'\" ><br/>\n\t\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Office Phone</span><br/>\n\t\t\t\t\t\t\t\t<input class=\"custom-textbox-biz\" name=\"bofficephone\" type=\"text\" maxlength=\"12\" style=\"width: 90px !important;\" style=\"font-size: 13px !important;\" value=\"'.$officephone.'\"><br/>\n\t\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Mobile Phone</span><br/>\n\t\t\t\t\t\t\t\t<input class=\"custom-textbox-biz\" name=\"bmobilephone\" type=\"text\" maxlength=\"12\" style=\"width: 90px !important;\" style=\"font-size: 13px !important;\" value=\"'.$cellphone.'\"><br/><br/>\n\t\t\t\t\t\t\t\t<input class=\"business-button\" value=\"Update Business Profile >\" type=\"submit\" name=\"submit\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td width=\"50%\"\">\n\n\n\n\t\t\t\t\t\t<div class=\"logo-wrapper\">\n\n\t\t\t\t\t\t\t<input id=\"post_id\" name=\"post_id\" value=\"989\" type=\"hidden\">\n\t\t\t\t\t\t\t<input id=\"thumbnailImage_nonce\" name=\"thumbnailImage_nonce\" value=\"a1c314818b\" type=\"hidden\">\n\t\t\t\t\t\t\t<input name=\"_wp_http_referer\" value=\"/business-profile/\" type=\"hidden\">\n\t\t\t\t\t\t\t<div class=\"water-wrapper water-mark\">\n\t\t\t\t\t\t\t\t<img id=\"imageUploadPreview\" src=\"https://testing.umbrellasupport.co.uk/wp-content/uploads/'.$img_filename.'\" alt=\"\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style=\"padding: 10px 16px; text-align: center; width: 368px; background-color:#D9070a; border-color: #d9070a;\">\n\t\t\t\t\t\t\t<input name=\"imageUpload\" id=\"fileToUpload\" accept=\"image/*\" type=\"file\">\n\t\t\t\t\t\t</div><br/><br/>\n\t\t\t\t\t\t<div class=\"business-info\">\n\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Business Name</span><br/>\n\t\t\t\t\t\t\t<input class=\"custom-textbox-biz\" name=\"bcompany\" type=\"text\" style=\"font-size: 13px !important;\" value=\"'.$company.'\"><br/>\n\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Website</span><br/>\n\t\t\t\t\t\t\t<input class=\"custom-textbox-biz\" name=\"bwebsite\" type=\"text\" style=\"font-size: 13px !important;\" value=\"'.$website.'\"><br/>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</form>\n\t\t</div>\n\n\t</div>\n\n\t<div id=\"Package\" class=\"q-tabcontent\">\n\t\t<table width=\"100%\" class=\"package-tab\">\n\t\t\t<form method=\"post\">\n\t\t\t\t<td width=\"50%\">\n\t\t\t\t\t<div class=\"custom-package\">\n\t\t\t\t\t\t<div class=\"package-details\">\n\t\t\t\t\t\t\t<h2>Package Details</h2>\n\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Partner ID</span><br/>\n\t\t\t\t\t\t\t<input disabled=\"disabled\" class=\"custom-textbox-pkg\" type=\"text\" maxlength=\"6\" style=\"width: 60px !important;\" style=\"font-size: 13px !important;\" value=\"'.$acount_id.'\"><br/>\n\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Account Manager</span><br/>\n\t\t\t\t\t\t\t<input disabled=\"disabled\" class=\"custom-textbox-pkg\" type=\"text\" style=\"font-size: 13px !important;\" value=\"'.$owner.'\"><br/>\n\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Package Level</span><br/>\n\t\t\t\t\t\t\t<input disabled=\"disabled\" class=\"custom-textbox-pkg\" type=\"text\" style=\"font-size: 13px !important;\" value=\"'.$packagelevel.'\"><br/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t\t<td width=\"50%\">\n\t\t\t\t\t<div class=\"custom-package-right\">\n\t\t\t\t\t\t<br/><br/><br/><br/><br/>\n\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Account Balance</span><br/>\n\t\t\t\t\t\t<input disabled=\"disabled\" class=\"custom-textbox-pkg\" type=\"text\" style=\"font-size: 13px !important;\" value=\"'.$accountbalance.'\"><br/>\n\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Free Phone Calls</span><br/>\n\t\t\t\t\t\t<input disabled=\"disabled\" class=\"custom-textbox-pkg\" type=\"text\" style=\"font-size: 13px !important;\" value=\"\"><br/>\n\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Free Live Chat Msgs</span><br/>\n\t\t\t\t\t\t<input disabled=\"disabled\" class=\"custom-textbox-pkg\" type=\"text\" style=\"font-size: 13px !important;\" value=\"\"><br/>\n\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Remaining Calls This Month</span><br/>\n\t\t\t\t\t\t<input disabled=\"disabled\" class=\"custom-textbox-pkg\" type=\"text\" style=\"font-size: 13px !important;\" value=\"\"><br/>\n\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Remaining Live Chats This Month</span><br/>\n\t\t\t\t\t\t<input disabled=\"disabled\" class=\"custom-textbox-pkg\" type=\"text\" style=\"font-size: 13px !important;\" value=\"\"><br/>\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t</form>\n\t\t</table>\n\n\t</div>\n\n\t<div id=\"Metrics\" class=\"q-tabcontent\">\n\n\t\tComing Soon...\n\n\t</div>\n\n\t<div id=\"Businessnetwork\" class=\"q-tabcontent\">\n\n\t\t<table width=\"100%\" class=\"biznetwork-tab\">\n\t\t\t<form method=\"post\">\n\t\t\t\t<div class=\"biznetwork-title\">\n\t\t\t\t\t<h2> BookPhoneCall.com Listing </h2><br/>\n\t\t\t\t\t<center><a> https://www.bookphonecall.com/?business='.$acount_id.' </a></center><br/><br/>\n\t\t\t\t</div>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width=\"50%\">\n\t\t\t\t\t\t<div class=\"custom-biznetwork-left\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"from_tab\" value=\"tab_biznetwork\">\n\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Business Description</span>\n\t\t\t\t\t\t\t<textarea style=\"margin-top: 10px; min-height: 120px; width: 92%;\" style=\"font-size: 13px !important;\"> '.$businessdesc.' </textarea><br/><br/>\n\t\t\t\t\t\t\t<input class=\"biznetwork-button\" value=\"Update Information >\" disabled type=\"submit\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td width=\"50%\">\n\t\t\t\t\t\t<div class=\"custom-biznetwork-right\">\n\t\t\t\t\t\t\t<span style=\"font-weight: bolder;\">Business Bullet Points</span><br/>\n\t\t\t\t\t\t\t<input class=\"custom-textbox-pkg\" type=\"text\" style=\"font-size: 13px !important;\"><br/>\n\t\t\t\t\t\t\t<input class=\"custom-textbox-pkg\" type=\"text\" style=\"font-size: 13px !important;\"><br/>\n\t\t\t\t\t\t\t<input class=\"custom-textbox-pkg\" type=\"text\" style=\"font-size: 13px !important;\"><br/>\n\t\t\t\t\t\t\t<input class=\"custom-textbox-pkg\" type=\"text\" style=\"font-size: 13px !important;\"><br/>\n\t\t\t\t\t\t\t<input class=\"custom-textbox-pkg\" type=\"text\" style=\"font-size: 13px !important;\"><br/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</form>\n\t\t</table>\n\t</div>\n\n\t<?php\n//\t\t';\n//\t\treturn $content;\n}", "title": "" }, { "docid": "5985419e9aa0871a1dbf6d259a936a8f", "score": "0.5382825", "text": "function mixd_wp_demo_title() {\n return __(\"Mixd's demo Plugin for WordPress\", \"mixd-wp-demo\");\n}", "title": "" }, { "docid": "8dc712c777fe6804b5df751c7d9b29be", "score": "0.53827536", "text": "function plug_page() {\r\n\t\tglobal $psts;\r\n\t\t\r\n\t add_submenu_page('psts-checkout', $psts->get_setting('pp_name'), $psts->get_setting('pp_name'), 'activate_plugins', 'premium-plugins', array(&$this, 'plugins_page_redirect') );\r\n\t}", "title": "" }, { "docid": "f722018ecb3d91d33aabe83a05c47045", "score": "0.5377862", "text": "function sw_partner() {\n\tregister_widget( 'sw_partner_slider_widget' );\n}", "title": "" }, { "docid": "5cb60ab054112bad19dc5ec2f69d83b4", "score": "0.5375456", "text": "function activate() {\r\n\r\n global $wpdb ;\r\n \r\n add_option(\"starbox_button\", \"5\");\r\n add_option(\"starbox_overlay\", \"default.png\");\r\n add_option(\"starbox_class\", \"default\");\r\n add_option(\"starbox_ghost\", \"false\");\r\n add_option(\"starbox_version\", $this->version);\r\n\r\n\r\n //$this->copy_js_script();\r\n\r\n\r\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\r\n // do activate\r\n if($wpdb->get_var(\"show tables like '$this->table'\") != $this->table){\r\n $q = \"CREATE TABLE `\".$this->table.\"` (\r\n `id` int(11) NOT NULL auto_increment,\r\n `object_id` int(11) NOT NULL,\r\n `ip` varchar(64) character set latin1 NOT NULL,\r\n `vote` int(11) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;\" ;\r\n dbDelta($q);\r\n }\r\n \r\n }", "title": "" }, { "docid": "14b1410808e0e2c4ce1e69ed04c6172a", "score": "0.53741217", "text": "function activate_the_plugin(){\n\t\tif($editor = get_role('editor')){\t\t\t\n\t\t\t$editor->add_cap('edit_theme_options');\n\t\t\t$editor->remove_cap('install_themes');\n\t\t\t$editor->remove_cap('import');\n\t\t\t$editor->add_cap('manage_options');\n\t\t\t$editor->add_cap('edit_users');\n\t\t\t$editor->add_cap('create_users');\n\t\t\t$editor->add_cap('delete_users');\n\t\t\t$editor->add_cap('list_users');\n\t\t\t$editor->add_cap('remove_users');\n\t\t\t$editor->add_cap( 'chat_with_users' );\n\t\t\t\n\t\t\t//new cap to fire the plguin activity in front end\n\t\t\t$editor->add_cap($this->nectar_cap);\n\t\t}\n\t}", "title": "" }, { "docid": "c4592734461a75ba277f5ed67b498faa", "score": "0.53724205", "text": "abstract function setPluginName ();", "title": "" }, { "docid": "174dccd381b682a43bdd9947f12d0809", "score": "0.53676385", "text": "function alm_preloaded_plugin_updater() {\t\n if(!has_action('alm_pro_installed') && class_exists('EDD_SL_Plugin_Updater')){ // Don't check for updates if Pro is activated\n \t$license_key = trim( get_option( 'alm_preloaded_license_key' ) ); // retrieve our license key from the DB\n \t$edd_updater = new EDD_SL_Plugin_Updater( ALM_STORE_URL, __FILE__, array( \n \t\t\t'version' \t=> ALM_PRELOADED_VERSION,\n \t\t\t'license' \t=> $license_key,\n \t\t\t'item_id' => ALM_PRELOADED_ITEM_NAME,\n \t\t\t'author' \t=> 'Darren Cooney'\n \t\t)\n \t);\n }\n}", "title": "" } ]
29deee395b8240b59151afc21a5373f9
constructor receives container instance
[ { "docid": "a6e9bae69da8dec468406ad4a1877249", "score": "0.7263394", "text": "public function __construct(ContainerInterface $container)\n {\n $this->container = $container;\n }", "title": "" } ]
[ { "docid": "c91d9ad32215bbe66c3c57cd27a18cba", "score": "0.82628834", "text": "public function __construct($container) {\n $this->container = $container;\n }", "title": "" }, { "docid": "d793876f555c4a2028ec0bad888f3553", "score": "0.80638206", "text": "public function __construct($container) {\n $this->container = $container;\n }", "title": "" }, { "docid": "dd307b46b7b068114e1126ae4b8885ce", "score": "0.7989512", "text": "public function __construct($container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "dd307b46b7b068114e1126ae4b8885ce", "score": "0.7989512", "text": "public function __construct($container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "5eb0b2df6ece3017dc25d1dfa97b2e3c", "score": "0.7976883", "text": "public function __construct($container = null){\n // http://stackoverflow.com/a/12905319\n $this->container = $container;\n }", "title": "" }, { "docid": "4980ae45e15efd66ab5579d184ace9ef", "score": "0.79638255", "text": "public function __construct(){\n\t\t$this->container=Container::instance();\n\n\t}", "title": "" }, { "docid": "29b33602929024ba7e308d86b8497f58", "score": "0.7888767", "text": "public function __construct(ContainerInterface $container);", "title": "" }, { "docid": "03f22d60d5de11cd41e76b2c744c5386", "score": "0.78335655", "text": "public function __construct(Container $container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "03f22d60d5de11cd41e76b2c744c5386", "score": "0.78335655", "text": "public function __construct(Container $container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "03f22d60d5de11cd41e76b2c744c5386", "score": "0.78335655", "text": "public function __construct(Container $container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "03f22d60d5de11cd41e76b2c744c5386", "score": "0.78335655", "text": "public function __construct(Container $container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "03f22d60d5de11cd41e76b2c744c5386", "score": "0.78335655", "text": "public function __construct(Container $container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "03f22d60d5de11cd41e76b2c744c5386", "score": "0.78335655", "text": "public function __construct(Container $container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "03f22d60d5de11cd41e76b2c744c5386", "score": "0.78335655", "text": "public function __construct(Container $container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "03f22d60d5de11cd41e76b2c744c5386", "score": "0.78335655", "text": "public function __construct(Container $container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "03f22d60d5de11cd41e76b2c744c5386", "score": "0.78335655", "text": "public function __construct(Container $container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "a68200decc7bb222f06b9ba1da44ec08", "score": "0.7833071", "text": "public function __construct(ContainerInterface $container)\n {\n }", "title": "" }, { "docid": "d62bc441b3650d9f0b444f0ee1a2d00b", "score": "0.78091234", "text": "final public function __construct(Container $container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "7adb51b85a2849354814ec64232dd8b9", "score": "0.7725568", "text": "public function __construct(Container $container)\n {\n $this -> setContainer($container);\n \n $this -> init();\n }", "title": "" }, { "docid": "180ecf546d6a88aca99371823828640d", "score": "0.75822014", "text": "function __construct(ContainerInterface $container)\r\n {\r\n $this->container = $container;\r\n }", "title": "" }, { "docid": "fbd60344d73a67b30ff1c35a48353e15", "score": "0.74907106", "text": "function __construct($container)\n {\n $this->container = $container;\n $this->db = $container->get('database');\n }", "title": "" }, { "docid": "985fa91de6f47ab25c8ccc85046af1c1", "score": "0.7420659", "text": "public function __construct(Container $container)\n {\n $this->container = $container;\n $this->keys = array();\n }", "title": "" }, { "docid": "687f9d099130dd8c20a5e3454ebeba46", "score": "0.73844665", "text": "public function __construct(ContainerInterface $container)\n\t{\n\t\t$this->setContainer($container);\n\t}", "title": "" }, { "docid": "409120232e72d59daa4dfb73eba423c2", "score": "0.7353015", "text": "public function __construct(ContainerInterface $container)\n {\n parent::__construct();\n }", "title": "" }, { "docid": "df14e004baad95ccb0542d0e4ca06c25", "score": "0.7352143", "text": "public function __construct()\n\t{\n\t\t$this->container \t = array();\n\t\t$this->hiddenContainer = array();\n\t}", "title": "" }, { "docid": "bbe44d41fff7c01b0755e7ea2f1d3584", "score": "0.7335063", "text": "public function __construct(Container $container = null)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "3ef888eb75d6bae78bc6fb1e99319d80", "score": "0.73128295", "text": "public function __construct(ContainerInterface $container){\n\n $this->container=$container;\n $this->setMainInstances();\n $this->entityManager = $this->container['entity-manager'];\n\n }", "title": "" }, { "docid": "20208fc31ddcad2a93dd226298d9b712", "score": "0.7300281", "text": "public function __construct(Container $container = null)\n {\n $this->setContainer($container);\n }", "title": "" }, { "docid": "07596b76a3335da342f7476dcc472510", "score": "0.72961384", "text": "public function __construct(Container $container)\n {\n $this->container = $container;\n $this->reflector = new Reflector();\n\n $this->container->instance(Instantiator::class, $this);\n $this->container->instance(Container::class, $container);\n }", "title": "" }, { "docid": "ad6da8ada4bfebed6fb16adeb57b0626", "score": "0.72784144", "text": "public function __construct(Container $container)\n {\n $this->container = $container;\n\n $this->register();\n }", "title": "" }, { "docid": "e3d9004cca2f08d979a08b7749695f24", "score": "0.7275731", "text": "public function __construct(\\Slim\\Container $container) {\n $this->container = $container;\n $this->entityManager = $container['em'];\n $this->logger = $container['logger'];\n }", "title": "" }, { "docid": "2dac670b2dabc3c6c30ce4471f5842ae", "score": "0.7272637", "text": "public function __construct(ContainerInterface $container) {\n $this->container = $container;\n }", "title": "" }, { "docid": "2dac670b2dabc3c6c30ce4471f5842ae", "score": "0.7272637", "text": "public function __construct(ContainerInterface $container) {\n $this->container = $container;\n }", "title": "" }, { "docid": "9fb04c4f351ea234deddfa42f0a39b45", "score": "0.72597766", "text": "final private function __construct()\n {\n $this->container = new Container();\n $this->request = Request::createFromGlobals();\n }", "title": "" }, { "docid": "54e3a67b768161a5fb0d284ab009ca18", "score": "0.72491074", "text": "public function __construct()\n {\n $this->containerBuilder = new ContainerBuilder();\n \n }", "title": "" }, { "docid": "c1623af110af3e7e24181cdd26bf1303", "score": "0.7091658", "text": "public function __construct()\n {\n $this->container = null;\n }", "title": "" }, { "docid": "c65b96605a396fee52d3fee429428375", "score": "0.7067209", "text": "public function initialize(Container $container);", "title": "" }, { "docid": "78d2710560070d67bdbef937fae0baab", "score": "0.7031601", "text": "public function __construct(Container $container){\n $this->container=$container;\n\n //config by default\n $this->config=$this->container['config'];\n $this->bigquery=$this->container['bigquery']($this->config->google('bigquery'));\n $this->modules['bseg']=$this->container['bseg']($this->bigquery);\n\n }", "title": "" }, { "docid": "7d2dc67b60663f0bfe4e8861e38a85f2", "score": "0.70264345", "text": "public function __construct()\n {\n $instanceOf = [];\n $cb = new ContainerBuilder();\n $containerConfigurator = new ContainerConfigurator($cb, new PhpFileLoader($cb, new FileLocator([])), $instanceOf, '', '');\n parent::__construct($containerConfigurator);\n }", "title": "" }, { "docid": "32f041a7d0b554ead03924435633e589", "score": "0.699261", "text": "public function __construct(TechDivision_Model_Interfaces_Container $container)\n {\n // pass the container to the parent instance\n parent::__construct($container);\n \t// initialize the ArrayList for the serializers\n \t$this->_serializers = new TechDivision_Collections_ArrayList();\n // initialize the object factory\n $this->_objectFactory = $this->getContainer()->getObjectFactory();\n }", "title": "" }, { "docid": "7215b00b5eba26ead2d07e0996401292", "score": "0.69887465", "text": "public function __construct(ContainerInterface $c) {\n $this->c = $c;\n }", "title": "" }, { "docid": "506bf81e129a51987577bdc88cf934f8", "score": "0.69658494", "text": "public function __construct(ContainerInterface $container)\n {\n $this->container = $container->get('db');\n $this->settings = $container->get('settings');\n }", "title": "" }, { "docid": "0664575751e2c20a4d38ba2413bf589c", "score": "0.6948244", "text": "public function __construct(ContainerInterface $container)\r\n {\r\n $this->container = $container;\r\n $this->logger = $this->container->get('logger');\r\n }", "title": "" }, { "docid": "21a894b60029492edd60bac8ad265196", "score": "0.68652487", "text": "public function __construct(ContainerInterface $container)\n {\n $this->container = $container;\n $this->wishlistQueue = new ArrayCollection();\n }", "title": "" }, { "docid": "8fdf7e3babcab5374aab6ad8970d3d11", "score": "0.6824697", "text": "public function container($container);", "title": "" }, { "docid": "23311699d5f4e1aefaa999b402856862", "score": "0.6797877", "text": "public function __construct(ContainerInterface $container = null)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "23311699d5f4e1aefaa999b402856862", "score": "0.6797877", "text": "public function __construct(ContainerInterface $container = null)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "23311699d5f4e1aefaa999b402856862", "score": "0.6797877", "text": "public function __construct(ContainerInterface $container = null)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "23311699d5f4e1aefaa999b402856862", "score": "0.6797877", "text": "public function __construct(ContainerInterface $container = null)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "35149e0e6cf3ddc99ad8b4fca73eecdf", "score": "0.67899436", "text": "public function __fromContainer(string $container): void\n {\n }", "title": "" }, { "docid": "17570c9b2d5abf23b0fda8084e0dbbea", "score": "0.6770098", "text": "public function __construct(ContainerContract $container = null)\n {\n $this->container = $container ?: new Container;\n }", "title": "" }, { "docid": "68826db2c7ac75f25392adbdd0f0810b", "score": "0.67527187", "text": "public function __construct(Dic $_container)\n {\n $this->_container = $_container;\n $this->_request = $_container->getResource('Request');\n $this->_router = $_container->getResource('Router');\n\n $this->_router->setPackages($this->_container->getResource('Packages'));\n\n }", "title": "" }, { "docid": "a38cb2782eb7854c1669c74011827c13", "score": "0.6733182", "text": "public function __construct(Container $container)\n {\n $this->container = $container;\n $this->envRequest = $_SERVER['SERVER_NAME'];\n }", "title": "" }, { "docid": "a9861973f214d76125264f6b3cafa023", "score": "0.6674578", "text": "function __construct($configContainer = NULL)\n {\n\tparent::__construct($configContainer);\n }", "title": "" }, { "docid": "23acfa89b270c80126f63b36c7a1183b", "score": "0.6667399", "text": "public function __construct(Container $container)\n {\n $this->routes = new RouteCollection;\n $this->container = $container;\n }", "title": "" }, { "docid": "40d7ecb2a5373c457735f1cf79dcdf69", "score": "0.6647183", "text": "public static function setInstance(Container $container);", "title": "" }, { "docid": "63c4c78ea0699f6d68b00fa41cd29812", "score": "0.6636635", "text": "public function __construct(ContainerInterface $container = null)\n {\n $this->container = $container ?: ContainerBuilder::buildDefaultContainer();\n }", "title": "" }, { "docid": "047efe8e97a7330ef037bcca458655bc", "score": "0.66332144", "text": "function __construct(ContainerContent $containerContent)\n {\n $this->container = $containerContent->GetContainer();\n parent::__construct($containerContent);\n }", "title": "" }, { "docid": "2efecf0daa481c1fe47e69d04c215bdc", "score": "0.66177964", "text": "public function __construct(ContainerInterface $c)\n {\n $this->container = $c;\n $dbSettings = $c->get('sql');\n $this->sql = new \\PDO('mysql:host=' . $dbSettings['address'] . ';dbname=' . $dbSettings['dbname'], $dbSettings['userNameDB'], $dbSettings['passwordDB']);\n $this->indicators = IndicatorHandler::getAllIndicators();\n }", "title": "" }, { "docid": "493001eae2682eb0989a71e545f00cfe", "score": "0.6614136", "text": "public function __construct()\n {\n $this->containerProducts = new ArrayCollection();\n }", "title": "" }, { "docid": "eb0f228af48ea1f23b118523977066cc", "score": "0.6613588", "text": "public function __construct(Container $container = null)\n {\n $this->routes = new RouteCollection();\n $this->container = $container ?? new Container();\n }", "title": "" }, { "docid": "92f5aff40cbd5793da3306a0260eaea3", "score": "0.6604794", "text": "public function getContainer();", "title": "" }, { "docid": "92f5aff40cbd5793da3306a0260eaea3", "score": "0.6604794", "text": "public function getContainer();", "title": "" }, { "docid": "92f5aff40cbd5793da3306a0260eaea3", "score": "0.6604794", "text": "public function getContainer();", "title": "" }, { "docid": "782afcf07da995d2a49eae580de5805c", "score": "0.65942705", "text": "public function __construct(KernelInterface $kernel, $container)\n {\n $this->kernel = $kernel;\n $this->container = $container;\n $rfo = new \\ReflectionObject($this->kernel);\n $rfm = $rfo->getMethod('getPHPDIContainer');\n $rfm->setAccessible(true);\n $this->phpDiContainer = ($rfm->getClosure($this->kernel))();\n }", "title": "" }, { "docid": "a1ccd3593a00994674fa677e8d87b513", "score": "0.6588866", "text": "public function __construct()\n {\n $this->session = new Container('User');\n }", "title": "" }, { "docid": "9f59839720583e26798053fc465e1762", "score": "0.65758127", "text": "public function __construct(Container $container, array $config = [] )\n\t{\n\t\t$this->container = $container;\n\t\t$this->config = array_merge($this->config, $config);\n\t}", "title": "" }, { "docid": "8240d1d8a343b41e072cbc4159e815c7", "score": "0.6563026", "text": "public function __construct(ContainerInterface $container, $payload)\n {\n $this->container = $container;\n $this->payload = $payload;\n }", "title": "" }, { "docid": "64522c8b0be2b76ea83f90204952958e", "score": "0.6562355", "text": "public function __construct(Container $app)\n\t{\n\t\t$this->app = $app;\n\t}", "title": "" }, { "docid": "66d5f64e40eeab874bb913d345331303", "score": "0.6555979", "text": "public function __construct()\n {\n $this->container = null;\n $this->options = [];\n $this->inotifications = [];\n }", "title": "" }, { "docid": "c6ac3851bfb7e61e3c31c0a42ac2f1be", "score": "0.65554285", "text": "public function __construct(ContainerInterface $container) {\n $this->container = $container;\n $this->payrecords = new PayRecordController($this->container->get('db'));\n $this->ColoumnArray = $this->GetColoumnNameArray();\n }", "title": "" }, { "docid": "4b1879d930835d6af4b6c68bcf54b71f", "score": "0.6552155", "text": "public function __construct()\n {\n // create new container builder\n $this->container = new ContainerBuilder();\n\n // load dependency configuration from yml file\n $loader = new YamlFileLoader($this->container, new FileLocator(__DIR__ . '/../config'));\n $loader->load('services.yml');\n }", "title": "" }, { "docid": "ab010f51a2d0d2dbcf28fb8adf39f256", "score": "0.65154797", "text": "public function createContainer()\n {\n return new Container($this);\n }", "title": "" }, { "docid": "9026fa2fef733308eb2ee6658c9ffbf3", "score": "0.6504709", "text": "public function __construct(Formo_Container $field)\n\t{\n\t\t$this->field = $field;\n\t}", "title": "" }, { "docid": "62af826a1afd9534cd88639e01dcdbd4", "score": "0.6495006", "text": "public function __construct()\n {\n $this->_container = new Container();\n\n // Return a shared instance of a Twig_Environment\n $this->_container['twig'] = function($c) {\n $loader = new Twig_Loader_Filesystem(__DIR__ . '/View');\n return new Twig_Environment($loader);\n };\n\n // Return a shared instance of the Zend Config component\n // Application configurations are in /src/config.php\n $this->_container['config'] = function($c) {\n return new Config(include 'config.php');\n };\n\n // Return a shared instance of PDO.\n // I usually use a DBAL and sometimes an ORM on top of PDO, but for this project,\n // I will use PDO directly.\n $this->_container['pdo'] = function($c) {\n $dsn = 'mysql:dbname=' . $c['config']->db_name . ';host=' . $c['config']->db_host;\n\n try {\n $pdo = new \\PDO($dsn, $c['config']->db_username, $c['config']->db_password);\n } catch (\\PDOException $e) {\n echo 'Connection failed: ' . $e->getMessage();\n }\n return $pdo;\n };\n\n // Using a full featured framework, there would be a much better way of instantiating model objects.\n $this->_container['FormSubmissionModel'] = $this->_container->factory(function($c) {\n return new FormSubmission($c['pdo']);\n });\n\n // Return a new instance of SwiftMail, pre-configured with a configurable transport. I'll use the\n // NullTransport for this application, since I'm not sure what options will be available in the\n // test environment.\n $this->_container['SwiftMailer'] = $this->_container->factory(function($c) {\n // Create the Transport; using null for now to be swapped out with an actual implementation later.\n $transport = (new \\Swift_NullTransport());\n return new \\Swift_Mailer($transport);\n });\n }", "title": "" }, { "docid": "88d22e0f833358140236ac0ce9121fe5", "score": "0.6489362", "text": "public function __construct(Container $container = null)\n {\n $this->routes = new RouteCollection();\n $this->container = $container ?: new Container();\n }", "title": "" }, { "docid": "f476c0cf84b39e695731a7808223ee11", "score": "0.64751047", "text": "protected function initializeContainer()\n {\n $class = $this->getContainerClass();\n $cache = new ConfigCache($this->getCacheDir().'/symfony/'.$class.'.php', $this->debug);\n $fresh = true;\n if (!$cache->isFresh()) {\n $container = $this->buildContainer();\n\t\t\t$container->register('novice.cache', $this->getCacheClass());\n\t\t\t$container->compile();\n $this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass());\n\n $fresh = false;\n }\n\n require_once $cache->getPath();\n\n $this->container = new $class();\n $this->container->set('app', $this);\n\n if (!$fresh && $this->container->has('cache_warmer')) {\n $this->container->get('cache_warmer')->warmUp($this->container->getParameter('app.cache_dir'));\n }\n }", "title": "" }, { "docid": "2ef6fadcc6152bf1e0abaa0d63de9fcc", "score": "0.64728445", "text": "protected function initializeContainer()\n {\n $class = $this->getContainerClass();\n $cache = new ConfigCache($this->getCacheDir().'/'.$class.'.php', $this->debug);\n $fresh = true;\n if (!$cache->isFresh()) {\n $container = $this->buildContainer();\n $container->compile();\n $this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass());\n\n $fresh = false;\n }\n\n require_once $cache->getPath();\n\n $this->container = new $class();\n $this->container->set('kernel', $this);\n\n if (!$fresh && $this->container->has('cache_warmer')) {\n $this->container->get('cache_warmer')->warmUp($this->container->getParameter('kernel.cache_dir'));\n }\n }", "title": "" }, { "docid": "eadb526b60d2bbefc83df12aeed256fe", "score": "0.6470203", "text": "public function __construct($container = null)\n {\n if (!$container instanceof ContainerInterface) {\n throw new InvalidArgumentException('Expected a ContainerInterface');\n }\n $this->container = $container;\n }", "title": "" }, { "docid": "61ea8d218c1e51c5ab2f6c55437d373a", "score": "0.64501125", "text": "public function __construct()\n {\n $this->container = null;\n $this->options = [];\n }", "title": "" }, { "docid": "17eea283c6dfc12f15dfa1355a2300fc", "score": "0.6449822", "text": "public function __construct()\n {\n $this->definitions = require_once __DIR__.'/ContainerDefinitions.php';\n }", "title": "" }, { "docid": "4ae0554a506c8df634f1ad2573eb4f4c", "score": "0.6439365", "text": "public function __construct(array $containers = [])\n {\n array_walk($containers, [$this, 'add']);\n }", "title": "" }, { "docid": "93506f650f11c0f327226f7800a0eef4", "score": "0.6437942", "text": "protected function setupContainer()\n {\n $config = [\n 'models' => 'Models',\n 'cache' => [\n 'keys_file' => '',\n 'lifetime' => 0,\n 'clear_on' => [\n 'create',\n 'update',\n 'delete',\n ],\n 'skip_uri' => 'skipCache',\n ],\n ];\n\n $this->container = new Container();\n $this->container->instance('config', new Config());\n $this->getContainer()['config']->offsetSet('rinvex.repository', $config);\n }", "title": "" }, { "docid": "e66cb980f78f9e2b9174b4faf17224d2", "score": "0.6428585", "text": "private function __contructor() {}", "title": "" }, { "docid": "d8491963b2a336c935319902736ab094", "score": "0.64275134", "text": "public function __construct(ContainerInterface $container)\n {\n $this->container = $container;\n $this->config = $container->get(ConfigInterface::class)->get('sms');\n }", "title": "" }, { "docid": "57ebd3a2e3cce61ca16eacb44c3a816b", "score": "0.6424539", "text": "public static function create(ContainerInterface $container): self;", "title": "" }, { "docid": "bee1ccced667fd2a482f708384e16a98", "score": "0.64234424", "text": "public function __construct(Container $container)\n\t{\n\t\t$this->_container = $container;\n\n\t\t$this->_post = $this->_sanitize($_POST);\n\t\t$this->_get = $this->_sanitize($_GET);\n\t\t$this->_cookie = $this->_sanitize($_COOKIE);\n\n\t\t$this->_processUrl();\n\t}", "title": "" }, { "docid": "55e8745d8b1139cda4b4d78f3eed3e7e", "score": "0.6407916", "text": "public function __construct(Container $app)\n {\n $this->app = $app;\n }", "title": "" }, { "docid": "55e8745d8b1139cda4b4d78f3eed3e7e", "score": "0.6407916", "text": "public function __construct(Container $app)\n {\n $this->app = $app;\n }", "title": "" }, { "docid": "55e8745d8b1139cda4b4d78f3eed3e7e", "score": "0.6407916", "text": "public function __construct(Container $app)\n {\n $this->app = $app;\n }", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.64073557", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.64073557", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.64073557", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.64073557", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.64073557", "text": "private function __construct(){}", "title": "" } ]
04495c2102af7b3cc2d4a1cbfb64f4f4
Cadastrando e validando a categoria
[ { "docid": "11151d0208a91c1e1dc70b7c5e321167", "score": "0.6230865", "text": "public function cadastrarCategoria()\n {\n $dadosForm = $this->request->all();\n \n $validator = validator($dadosForm, $this->categoria->rules);\n \n if( $validator->fails() )\n {\n return redirect('/painel/categoria/cadastrar')\n ->withErrors($validator)\n ->withInput();\n }\n \n $insert = $this->categoria->create($dadosForm);\n \n if( $insert )\n return redirect ('/painel/categorias');\n else\n return redirect('/painel/categoria/cadastrar')\n ->withErrors(['errors' => 'Falha ao Cadastrar'])\n ->withInput();\n \n }", "title": "" } ]
[ { "docid": "e113d199c5f5ad182e786611f274a28a", "score": "0.69127226", "text": "private function validate_add_category() {\r\n $this->load->library('form_validation');\r\n $this->form_validation->set_error_delimiters('', '');\r\n $this->form_validation->set_rules('txt_category_name', 'category name', 'trim|required|is_unique[tbl03_category.category_name]');\r\n return $this->form_validation->run();\r\n }", "title": "" }, { "docid": "45d163e67bc3d824f26585f7dcab02cc", "score": "0.685812", "text": "public function valid(Request $request)\n { //Es una forma distinta de hacer la validacion a la vista en las categorias. VER CATEGORY MODEL\n $this->validate($request, Category::$rules, Category::$messages);\n }", "title": "" }, { "docid": "edfbfdff627aed182a365e5d72ecd376", "score": "0.65963376", "text": "public function validateCategoryData($request) {\n $validator = Validator::make($request, [\n 'name' => 'required',\n 'category_gender' => 'required|in:Male,Female',\n 'category_age' => 'required|numeric|min:1'\n ]);\n\n return $validator;\n }", "title": "" }, { "docid": "6ccb448ce558912e61910b73d6eae1dc", "score": "0.6563467", "text": "public function rules()\n {\n return [\n 'name' => 'required',\n 'depreciation' => 'required|numeric',\n 'category' => $this->existsInCompanie('categories')\n ];\n }", "title": "" }, { "docid": "8b6daea023eb97d1179c4fa78173d7b9", "score": "0.6501086", "text": "public function validate()\n {\n if ($this->amount <= 0) {\n $this->errors[0] = 'Wpisz poprawną kwotę!';\n }\n\n if (!isset($this->category)) {\n $this->errors[1] = 'Wybierz kategorię!';\n }\n }", "title": "" }, { "docid": "a36a52eba8157c57ceaa36c26912308c", "score": "0.6486451", "text": "public function rules()\n {\n return [\n 'category_code' => 'required|min:3|max:50|unique:categories', //tên table cusc_chude\n 'category_name' => 'required|min:3|max:50|', //category_name la name tren form\n 'decription' => 'required|min:3|max:50|',\n ];\n }", "title": "" }, { "docid": "ee6ed25c6454a044cd8611633964007a", "score": "0.64685255", "text": "public function validate () {\n if ( Category::exists( $this->category_id ) === false ) {\n $this->errors->add( 'category_id', \"doesn't exist.\" );\n }\n }", "title": "" }, { "docid": "0b2fb9d807ddaecab8da9db5d143fcac", "score": "0.6461527", "text": "public function beforeValidate()\n {\n if (trim($this->category) === \"gaoxiao\") {\n $this->category = \"regular\";\n }\n return parent::beforeValidate();\n }", "title": "" }, { "docid": "0bd7b8a95c316037b4be19daaed82866", "score": "0.64412034", "text": "public function rules(CategoryRequest $request)\n {\n #return [\n //\n #];\n\n if ($request->isMethod('POST')){\n $reglas = ['name' => 'required|max:120|unique:categorias',];\n\n $mensaje = [\n 'name.required' => 'Este Campo Es Obligatorio',\n 'name.max' => 'El Número Máximo De Caracteres Es De 120',\n 'name.unique' => 'Esta Categoría Ya Existe',\n ];\n\n $validator = Validator::make($request->all(), $reglas, $mensaje);\n\n if ($validator->fails()){\n flash('El Formulario Presenta Errores De Validación', 'danger')->important();\n }\n }\n }", "title": "" }, { "docid": "cf4ba2a60535a616adb1cf6609555f83", "score": "0.6374339", "text": "public function testIsValidCategoryGroup()\n {\n $this->assertTrue($this->validator->isValidCategoryGroup('test', 'testInteger'));\n }", "title": "" }, { "docid": "a39449064db29f9111cf5769f76b5417", "score": "0.63687676", "text": "public function rules()\n {\n return [\n 'category'=>'required|unique:categories|string|max:50',\n 'image'=>'required|image'\n ];\n }", "title": "" }, { "docid": "2aff9a9385553f9048d1dd01e3aff452", "score": "0.63331103", "text": "public function rules()\n {\n return [\n 'categories' => ['required', 'array']\n ];\n }", "title": "" }, { "docid": "d763f10b2ff91778c32da1fa16f0aa8e", "score": "0.6308984", "text": "public function testIsValidCategoryGroupFails()\n {\n $this->assertFalse($this->validator->isValidCategoryGroup('test', 'x'));\n }", "title": "" }, { "docid": "b4f528ee05b1c51b1c3f7537b229c012", "score": "0.62776595", "text": "public function rules()\n {\n return [\n 'category_name' => 'required|string|unique:categories'\n ];\n }", "title": "" }, { "docid": "009d464e04bcc4e3b3e684e9c179bdfa", "score": "0.6268621", "text": "public function rules()\n {\n return [\n 'title' => [\n 'required',\n 'max:10',\n 'min:3',\n new KiemDuyet\n ],\n 'category_id' => 'required|exists:categories,id'\n ];\n }", "title": "" }, { "docid": "369efcf0c72737a3aa1f2a77627edd8a", "score": "0.62484735", "text": "public function guardarCategoria()\r\n\t{\r\n\t\t$sql = \"INSERT INTO categorias (categoria,depende,orden,estatus) VALUES ('$this->nombre','$this->depende','$this->orden','$this->estatus');\";\r\n\t\t\r\n\t\t$resp = $this->db->consulta($sql);\r\n\t\t$this->idcategoria = $this->db->id_ultimo();\r\n\t}", "title": "" }, { "docid": "16cc1fbea13a569a51f368c1b307490f", "score": "0.623363", "text": "protected function beforeValidate() {\n /*\n we should improve the perfermance of this method when we get a chance, cause when we batch upload inventories,\n this will call get types too many times, we should call it one time only.\n */\n if (!empty($this->category)) {\n if (!is_array($this->category) && strpos($this->category, \"|\") === 0) {\n // for the exception input, such as: |1|..|n|..\n $_tmps = substr($this->category, 1, -1);\n $this->category = explode(\"|\", $_tmps);\n }\n //print_r($this->category);\n //cause we used the refid's value as the dropdown values.\n //$categories = Types::model()->actived()->bytype('category')->findAllByPk(array_values($this->category));\n $categories = Types::model()->actived()->bytype('category')\n ->findAllByAttributes(array('refid' => array_values($this->category)));\n //print_r($categories);\n $data = array();\n if ($categories) {\n //$data = CHtml::listData($categories, 'id', 'typename');\n $data = CHtml::listData($categories, 'refid', 'typename');\n if (!empty($data)) $this->category_str = implode(\", \", array_values($data));\n }\n $this->category = \"|\".implode(\"|\", array_values($this->category)).\"|\";\n }\n //$this->category = serialize($this->category);\n\n if (!empty($this->accept_tasktype)) {\n if (!is_array($this->accept_tasktype) && strpos($this->accept_tasktype, \"|\") === 0) {\n $_tmps = substr($this->accept_tasktype, 1, -1);\n $this->accept_tasktype = explode(\"|\", $_tmps);\n }\n //cause we used the refid's value as the dropdown values.\n $tasktypes = Types::model()->actived()->bytype('linktask')\n ->findAllByAttributes(array('refid' => array_values($this->accept_tasktype)));\n $data = array();\n if ($tasktypes) {\n $data = CHtml::listData($tasktypes, 'refid', 'typename');\n if (!empty($data)) $this->accept_tasktype_str = implode(\", \", array_values($data));\n }\n $this->accept_tasktype = \"|\".implode(\"|\", array_values($this->accept_tasktype)).\"|\";\n }\n\n if (!empty($this->channel_id)) {\n if (!is_array($this->channel_id) && strpos($this->channel_id, \"|\") === 0) {\n $_tmps = substr($this->channel_id, 1, -1);\n $this->channel_id = explode(\"|\", $_tmps);\n }\n //cause we used the refid's value as the dropdown values.\n $channels = Types::model()->actived()->bytype('channel')\n ->findAllByAttributes(array('refid' => array_values($this->channel_id)));\n $data = array();\n if ($channels) {\n $data = CHtml::listData($channels, 'refid', 'typename');\n if (!empty($data)) $this->channel_str = implode(\", \", array_values($data));\n }\n $this->channel_id = \"|\".implode(\"|\", array_values($this->channel_id)).\"|\";\n }\n\n if (!empty($this->owner_channel_id)) {\n if (!is_array($this->owner_channel_id) && strpos($this->owner_channel_id, \"|\") === 0) {\n $_tmps = substr($this->owner_channel_id, 1, -1);\n $this->owner_channel_id = explode(\"|\", $_tmps);\n }\n $channels = Types::model()->actived()->bytype('channel')\n ->findAllByAttributes(array('refid' => array_values($this->owner_channel_id)));\n $data = array();\n if ($channels) {\n $data = CHtml::listData($channels, 'refid', 'typename');\n if (!empty($data)) $this->owner_channel_str = implode(\", \", array_values($data));\n }\n $this->owner_channel_id = \"|\".implode(\"|\", array_values($this->owner_channel_id)).\"|\";\n }\n\n if (!empty($this->client_id)) {\n if (!is_array($this->client_id) && strpos($this->client_id, \"|\") === 0) {\n $_tmps = substr($this->client_id, 1, -1);\n $this->client_id = explode(\"|\", $_tmps);\n }\n $clients = Client::model()->actived()->findAll();\n $data = array();\n if ($clients) {\n $data = CHtml::listData($clients,'id','company');\n if (!empty($data)) $this->client_str = implode(\", \", array_values($data));\n }\n $this->client_id = \"|\".implode(\"|\", array_values($this->client_id)).\"|\";\n }\n\n if ($this->isNewRecord) {\n $uid = Yii::app()->user->id;\n $roles = Yii::app()->authManager->getRoles($uid);\n if(isset($roles['Publisher'])){\n $this->user_id = $uid;\n }\n\n // set the create date, last updated date, then the user doing the creating\n // $this->created = new CDbExpression('NOW()');\n $this->created = date('Y-m-d H:i:s');\n $this->created_by = $uid;\n } else {\n //not a new record, so just set the last updated time and last updated user id\n //$this->modified = new CDbExpression('NOW()');\n $this->modified = date('Y-m-d H:i:s');\n $this->modified_by = Yii::app()->user->id;\n }\n\n return parent::beforeValidate();\n }", "title": "" }, { "docid": "c4a26de9dc921cf5966b1b9d356e71bd", "score": "0.61860776", "text": "function CadastraCategoria()\n{\n\t$erro = Array();\n \n foreach ($_POST as $chv => $vlr) \n {\n if($vlr == \"\" && substr($chv,0,3) == \"USR\") \n {\n $erro[] = \"O campo \" . substr($chv,4) . \" não foi informado\";\n }\n }\n\t\n\t$n = count($erro);\n\tif ($n > 0)\n\t{\n\t\theader(\"location: ../categorias.php?status=error\");\n\t\treturn;\n\t}\n\t\n\t$cat = new Categorias();\n\t\n\t$_nome = $_POST['CAT_NOME'];\n\t$_file = $_FILES['CAT_FILE'];\n\t\n\tif ($_file[\"error\"] > 0)\n\t{\n\t\theader(\"location: ../categorias.php?status=error\");\n\t\treturn;\n\t}\n\t\n\t$_imagem = Arquivos::UpdateArquivo(\"../\" . $_SESSION['categoriasImagePrefix'], $_file);\n\t\n\t$result = $cat->AdicionaCategoria($_nome, $_imagem);\n\t\n\t\tif ($result == TRUE)\n\t{\n\t\theader(\"location: ../categorias.php?status=success\");\t\n\t}\n\telse\n\t{\n\t\theader(\"location: ../categorias.php?status=error\");\t\t\n\t}\n\t\n\treturn;\n}", "title": "" }, { "docid": "bb9166eaf211a35800d675436e6bd202", "score": "0.61740994", "text": "public function rules()\n {\n return [\n 'catname' => 'required|unique:App\\Category,catname|max:255',\n 'catlogo' => 'image|max:150',\n ];\n }", "title": "" }, { "docid": "037bb6b5cb54a7d0b883246e729eca26", "score": "0.6163717", "text": "public function category()\n {\n $name = $this->input->post('categ_name');\n $type = $this->input->post('categ_type');\n\n $this->RegisterLoginModel->insert_category($name, $type, $this->session->user_id);\n }", "title": "" }, { "docid": "5f1243ec04360a7a369762e8f3c1c0b5", "score": "0.61499786", "text": "public function rules()\n {\n return [\n 'name' => 'required|min:3|max:100|unique:categories',\n 'slug' => 'required|min:3|max:100' ,\n 'status' => 'required|in:'.implode(',',config('common.categories.status')) ,\n ];\n }", "title": "" }, { "docid": "10a31942104e7f9dc6951ddc26e96619", "score": "0.6136866", "text": "public function rules()\n { \n return [\n 'title'=>'required|unique:categories|max:30',\n 'name'=>'required'\n ];\n }", "title": "" }, { "docid": "7ece1c4d1d520d68821fddef185c7e97", "score": "0.61078703", "text": "public function categoryValidate($post) {\n $params = [\n 'cat_name' => $post['category'],\n ];\n $length = iconv_strlen($post['category']);\n\n if($length < 2) {\n $this->error = 'Length of category sould be longre than 1 symbol';\n return false;\n }\n elseif($this->database->column('SELECT id FROM categories WHERE cat_name = :cat_name', $params)) {\n $this->error = 'Category exists already';\n return false;\n }\n \n return true;\n }", "title": "" }, { "docid": "376ec0d230680de52729d38194665a53", "score": "0.6051352", "text": "public function add () {\n if ($this->requete->existeParametre(array('nom_categorie', 'horaire_dbt', 'horaire_fin'))) {\n $cat = new Categorie();\n $cat->setNom($this->requete->getParametre('nom_categorie'));\n $cat->setHoraire_dbt_reserv($this->requete->getParametre('horaire_dbt'));\n $cat->setHoraire_fin_reserv($this->requete->getParametre('horaire_fin'));\n $cat->add();\n echo 'OK';\n }\n else {\n echo 'nOK';\n //throw new Exception(\"Paramètres categorie incomplets\");\n }\n }", "title": "" }, { "docid": "6fb37aa671551f18bfe59c93dca21568", "score": "0.604218", "text": "public function rules()\n {\n return [\n 'nombre' => 'required|min:3|unique:articulos',\n 'categoria_id' => 'min:1|numeric'\n ];\n }", "title": "" }, { "docid": "57b8b0f87ae218a93cfa5d44ad5a834b", "score": "0.60420287", "text": "public function rules()\n {\n \n return [\n 'title'=> 'required|unique:categories',\n 'show' => 'max:1|min:0|integer|required',\n ];\n }", "title": "" }, { "docid": "0ef2d6573fb432b372f701cbd7eb7ad1", "score": "0.60380733", "text": "public function rules()\n {\n return [\n 'name' => 'required',\n\n //Esta validacion verifique que al momento de actualizar ese slug no se verifique el slug que estamos tratando de actualizar ya que de lo contrario nunca sera posible actualizar por que encontrara como duplicado el slug \n \n 'slug' => 'required|unique:categories,slug,'.$this->category,\n ];\n }", "title": "" }, { "docid": "3fce8638fdac7d0ff331071129d4f893", "score": "0.60302335", "text": "public function rules()\n {\n return [\n // 'name' => 'required|alpha|unique:categories,name',\n 'name' => ['required', 'unique:categories,name', new InputName],\n 'image' => 'nullable|image',\n ];\n }", "title": "" }, { "docid": "5050112ef6db05a8b5230e47aae41259", "score": "0.6016592", "text": "function validate_form($id_category, $id)\t{\n\t\t//si el usuario deja sin categoria el formulario\n\t\tif ($id_category == '') {\n\t\t\techo '<script>alert(\"Debe seleccionar una categoría\")</script> ';\n\t\t\techo \"<script>location.href='../admin_products.php'</script>\";\t\n\t\t}\n\t\t//si el usuario deja el SKU en blanco en el formulario\n\t\tif ($this->sku == '') {\n\t\t\t//se obtiene la descripción de la categoria seleccionada\n\t\t\t$sql=(\"SELECT description FROM categories WHERE id = '$id_category'\");\n\t\t\t$execute=mysqli_query($this->connect_db, $sql);\n\t\t\tif ($category = mysqli_fetch_assoc($execute) ) {\n\t\t\t\t$str_Category = $category['description'];\n\t\t\t\tif ($id > 0) {\n\t\t\t\t\t//si esta editando, se obtiene el id del registro\n\t\t\t\t\t$this->nums = $id;\n\t\t\t\t} else\t{\n\t\t\t\t\t//si es nuevo, consulta el id mayor de la bd y le suma 1\n\t\t\t\t\t$execute=mysqli_query($this->connect_db,\"select max(id) as id from products\");\n\t\t\t\t\tif ($products = mysqli_fetch_assoc($execute)) {\n\t\t\t\t\t\t$this->nums\t= $products['id'] + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\t//si no logra obtener la categoria define uno por defecto\n\t\t\t\t$str_Category = 'Cate';\n\t\t\t}\n\t\t\t//se obtiene 4 caracteres en mayuscula de la categoria \n\t\t\t$str_Category = substr($str_Category, 0, 4);\n\t\t\t//finalmente concatena Prefijo, categoria y número\n\t\t\t$this->sku = 'SKU-' . strtoupper($str_Category) . '-' . $this->nums;\n\t\t} else\t{\n\t\t\t//en caso de se ingrese sku no hace nada\n\t\t}\n\t}", "title": "" }, { "docid": "2f50b61cb9dea6cfa0f41601d9fd97c3", "score": "0.6006769", "text": "public static function createCategory($request) { \n \n\t\t$rules = array(\n\t\t\t'category_name' => 'required', // category name is required\n\t\t //'parent_category' => 'required', // parent category is required\n\t\t\t'description' => 'required', // description is required\n\t\t\t'status'=> 'required'//status is required\n\t\t\t\n\t\t);\n\t\t$validator = Validator::make($request->input(), $rules);\n\t\t$messages = $validator->errors();\n\t\t\n\t\tSession::forget('msg');\n\t\t$category = new Category();\n\t\tif(!$messages->first('category_name')) \n\t\t{\n\t\t\t$categoryName = trim($request->input('category_name'));\n\t\t\t$alreadyExist = GStarBaseController::validateForExist('category',$categoryName,'category_name');\n\t\t if($alreadyExist)\n\t\t\t{\n\t\t\t\t\tSession::flash('msg', GStarBaseController::MSG_ALREADY_EXIST);\n\t\t\t\t\treturn ;\n\t\t }\n\t\t\t$category['category_name'] = $categoryName;\t\t \n\t\t} \n\t\telse \n\t\t{\n\t\t\tSession::flash('msg', $messages->first('category_name'));\n\t\t} \n\n\t\t// if(!$messages->first('parent_category')) {\n\t\t// \t$category['category_parent_id'] = trim($request->input('parent_category'));\n\t // }\n\t\t// else {\n\t\t// \tSession::flash('msg', $messages->first('parent_category'));\n\t\t// }\n\t\t\n\tif(!$messages->first('description')) {\n\t\t\t$category['description'] = trim($request->input('description'));\n\t }\n\t\telse {\n\t\t\tSession::flash('msg', $messages->first('description'));\n\t\t }\n\t\n\tif(!$messages->first('status')) {\n\t\t\t$category['status'] = trim($request->input('status'));\n\t }\n\t\telse {\n\t\t\tSession::flash('msg', $messages->first('status'));\n\t\t }\n\n\t\t $is_product=trim($request->input('is_product')); \n\t\t $is_tutorial=trim($request->input('is_tutorial')); \n\n\t\t if($is_product){\n\t\t \t$category['is_product'] = 1;//trim($request->input('is_product'));\n\t\t \tif($is_tutorial){\n\t\t\t \t\t$category['is_tutorial'] = 1;//trim($request->input('is_tutorial'));\n\t\t\t \t}\n\t\t }else{\n\t\t\t \tif($is_tutorial){\n\t\t\t \t\t$category['is_tutorial'] = 1;//trim($request->input('is_tutorial'));\n\t\t\t \t}\n\t\t\t \telse{\n\t\t\t \t\tSession::flash('msg', 'please select any one product or tutorial');\n\t\t\t \t}\n\t\t }\n\t\t \n\t\n\t\treturn $category;\n\t}", "title": "" }, { "docid": "6d06eb85ca937935e1191dd7b0230e83", "score": "0.5999847", "text": "public function rules()\n //validacion de que se esten ingresando datos en el formulario\n //verifica que los campos que se estan mandando por el formulario tengan algun conenido\n //si se cumplen las tres reglas de validacion con required seigue el programa\n \n {\n return [\n 'name'=> 'required|max:10',\n 'description'=> 'required|min:10',\n 'categoria'=> 'required'\n ];\n }", "title": "" }, { "docid": "8930449f5458869c77ab14d9947bc445", "score": "0.5981397", "text": "public function rules()\n {\n return [\n 'category_name' => 'required|min:3|max:150|string'\n ];\n }", "title": "" }, { "docid": "f6a0cb516d9fab386cfb055842d65c56", "score": "0.59707314", "text": "public function setCategoria()\n {\n\t\tif ($_POST)\n\t\t{\n\t\t //dep($_POST);\n\t \t\t//dep($_FILES);\n\t \t\t//exit();\n\n\t\t\tif (empty($_POST['txtNombre']) || empty($_POST['txtDescripcion']) || empty($_POST['listStatus']))\n\t\t\t{\n\t\t\t\t$arrResponse = array(\"status\" => false, \"msg\" => 'Datos incorrectos.' );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$intIdcategoria = intval($_POST['idCategoria']);\n\t\t\t\t$strCategoria = strClean($_POST['txtNombre']);\n\t\t\t\t$strDescripcion = strClean($_POST['txtDescripcion']);\n\t\t\t\t$intStatus = intval($_POST['listStatus']); \n\t\t\t\t//strlower convierte las mayusculas en minusculas\n\t\t\t //clear_cadena deja todas las letras sin tilde y sin ñ\n\t\t\t $ruta = strtolower(clear_cadena($strCategoria));\n\t\t\t //str_replace remplaza todos lo espacios en blanco con un -\n\t\t\t $ruta = str_replace(\" \",\"-\",$ruta);\n\n\n\t\t\t\t$foto = $_FILES['foto'];\n\t\t\t\t$nombre_foto = $foto['name'];\n\t\t\t\t$type = $foto['type'];\n\t\t\t\t$url_temp = $foto['tmp_name'];\n\t\t\t\t$imgPortada = 'portada_categoria.png';\n\t\t\t\t$request_categoria = \"\";\n\t\t\t\tif ($nombre_foto != '')\n\t\t\t\t{\n\t\t\t\t\t$imgPortada = 'img_'.md5(date('d-m-Y H:m:s')).'.jpg';\n\t\t\t\t}\n\n\t\t\t\tif ($intIdcategoria == 0)\n\t\t\t {\n\t\t\t //CREAR\n\t\t\t //permiso para crear\n\t\t\t if ($_SESSION['permisosMod']['w']) \n\t\t\t {\n\t\t\t \t$request_categoria = $this->model->insertCategoria($strCategoria, $strDescripcion, $imgPortada, $ruta, $intStatus);\n\t\t\t \t$option = 1;\n\t\t\t }\n\t\t\t \n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t //ACTUALIZAR\n\t\t\t //permiso para actualizar\n\t\t\t if ($_SESSION['permisosMod']['u'])\n\t\t\t {\n\t\t\t\t if ($nombre_foto == '')\n\t\t\t\t {\n\t\t\t\t \t//en el caso de que se cambie la foto\n\t\t\t\t \tif ($_POST['foto_actual'] != 'portada_categoria.png' && $_POST['foto_remove'] == 0)\n\t\t\t\t \t{\n\t\t\t\t \t\t$imgPortada = $_POST['foto_actual'];\n\t\t\t\t \t}\n\t\t\t\t }\n\t\t\t\t $request_categoria = $this->model->updateCategoria($intIdcategoria, $strCategoria, $strDescripcion, $imgPortada, $ruta, $intStatus);\n\t\t\t\t $option = 2;\n\t\t\t \t}\n\t\t\t }\n\n\t\t\t if ($request_categoria > 0)\n\t\t\t {\n\t\t\t if ($option == 1)\n\t\t\t {\n\t\t\t $arrResponse = array('status' => true, 'msg' => 'Datos guardados correctamente.' );\n\t\t\t if ($nombre_foto != ''){ uploadImage($foto,$imgPortada); }\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t $arrResponse = array('status' => true, 'msg' => 'Datos actualizados correctamente.' );\n\t\t\t if ($nombre_foto != ''){ uploadImage($foto,$imgPortada); }\n\t\t\t //en el caso de que se quite la foto actual y se deje la foto de portada O se quite la foto actual y se agregue una nueva foto.\n\t\t\t if (($nombre_foto == '' && $_POST['foto_remove'] == 1 && $_POST['foto_actual'] != 'portada_categoria.png') || ($nombre_foto != '' && $_POST['foto_actual'] != 'portada_categoria.png')) \n\t\t\t {\n\t\t\t \tdeleteFile($_POST['foto_actual']);\n\t\t\t }\n\t\t\t }\n\t\t\t\t}\n\t\t\t else if ($request_categoria == 'exist')\n\t\t {\n\t\t $arrResponse = array('status' => false, 'msg' => '!Atencion la categoria ya existe.' );\n\t\t }\n\t\t\t else\n\t\t {\n\t\t $arrResponse = array('status' => false, 'msg' => 'No es posible almacenar datos.' );\n\t\t }\n\t\t\t}\n\t\t\t//retornamos el array en formato jason con el satus y el msg y el segundo parametro es para enviar caracteres especiales\n\t //sleep(3);\n\t echo json_encode($arrResponse,JSON_UNESCAPED_UNICODE);\n\t\t}\n\t die(); \n }", "title": "" }, { "docid": "a1958ea379180faaf276b08c68817f4e", "score": "0.59597635", "text": "public function validateCategory($category){\n $errors = array();\n if (!isset($_SESSION['global_languages'])){\n return array(\"99\" => \"Session expired\");\n }\n \n foreach($_SESSION['global_languages'] as $lang_code => $lang_name){\n if (!isset($category[$lang_code]) || !$category[$lang_code]){\n $errors[$lang_code] = \"Please enter a $lang_name category title\";\n }\n }\n \n return $errors;\n }", "title": "" }, { "docid": "e55d24be5f6c3eb73c30f2204bdd3a25", "score": "0.5955845", "text": "public function guardarCategoria(Request $requerimiento){ \n\n $mensajes =[\n 'category.required' =>'El campo categoria es obligatorio',\n 'image.required' =>'La imagen es obligatoria',\n 'category.min' =>'El campo categoria debe tener al menos 2 caracteres',\n 'category.max' =>'El campo categoria debe tener como maximo 30 caracteres',\n 'category.unique' => 'La categoria ya ha sido registrada en la base de datos',\n 'category.regex' => 'El campo categoria solo acepta cadenas de texto y valores numericos',\n 'image.mimes' => 'La imagen debe ser un archivo de tipo: jpg, jpeg, bmp, png.'\n ];\n\n $reglas = [\n 'category' => 'required|min:2|max:30|unique:categories|regex:/^([0-9a-zA-ZñÑáéíóúÁÉÍÓÚ])+((\\s*)+([0-9a-zA-ZñÑáéíóúÁÉÍÓÚ]*)*)+$/',\n 'image' => 'required|mimes:jpg,jpeg,bmp,png' \n ];\n\n $this->validate($requerimiento,$reglas,$mensajes);\n\n $categoria = Category::create($requerimiento->only('category'));\n\n if($requerimiento->hasFile('image')){\n $foto = $requerimiento->file('image');\n $ruta = public_path().'/imagenes/categorias';\n $nombreFoto = uniqid().$foto->getClientOriginalName();\n $movido = $foto->move($ruta,$nombreFoto);\n\n if($movido){\n $categoria->image = $nombreFoto;\n $categoria->save();\n alert()->success('La categoria fue ingresada correctamente','Categoria Agregada')->autoclose(3000);\n }else{\n alert()->error('La categoria no pudo ser ingresada','Ocurrio un Error')->autoclose(3000);\n }\n }\n return redirect('administrador/categorias');\n }", "title": "" }, { "docid": "28d918782d358ad5eaaa83f430550808", "score": "0.5947748", "text": "public function rules()\n {\n //dd(name);\n return [\n 'name' => 'required|max:191|unique:categories',\n 'seo' => 'required|alpha_num|max:191',\n 'avatar' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n ];\n }", "title": "" }, { "docid": "0592acdf761c9960b6f50bd813e639ba", "score": "0.59474885", "text": "public function rules()\n {\n return [\n 'name' => 'required|unique:categories|string|max:85',\n 'slug' => 'nullable|unique:categories|alpha_dash|max:85',\n 'description' => 'min:3|string|nullable',\n 'genres' => 'nullable|array',\n 'genres.*' => 'nullable|string|min:2|max:60'\n ];\n }", "title": "" }, { "docid": "cd57bf1de2436de63918f2f18e4fd948", "score": "0.5946103", "text": "public function validateMessageCategory()\n {\n if ($this->enableI18N) {\n if (empty($this->messageCategory)) {\n $this->addError('messageCategory', 'Message Category cannot be blank.');\n } elseif (!preg_match('~^[\\w./-]+$~', $this->messageCategory)) {\n $this->addError('messageCategory', 'Message Category is not valid. It should contain only alphanumeric characters, \".\", \"-\", \"/\", and \"_\".');\n }\n }\n }", "title": "" }, { "docid": "fb21e2eb5b6bc3e4492fa53d0df49ea2", "score": "0.5942696", "text": "public function testIsValidCategoryGroupFailsWithException()\n {\n $this->assertFalse($this->validator->isValidCategoryGroup('fail', 'x'));\n }", "title": "" }, { "docid": "99322706229dc3232facbadd03c11133", "score": "0.5929975", "text": "public function create(categoriesValidation $request)\n {\n $validated = $request->validated();\n $addCategories = categorie::create([\n 'name'=>$request->name\n ]);\n if ($addCategories){\n toastr()->success('تم حفظ البيانات بنجاح!');\n return redirect()->route('dashboard.Category');\n }else{\n toastr()->error('يوجد خطأ حاول مره أخرى.');\n return redirect()->route('dashboard.Category');\n }\n }", "title": "" }, { "docid": "fd081b5495f206919ab91f4feea06270", "score": "0.59213406", "text": "public function store(Request $request)\n {\n \n #VALIDACION#\n $reglas=[\n 'catNombre'=> \"required|string|min:2|max:20\"\n ];\n \n $mensajes=[\n \"string\" =>\"El campo :attribute debe contener un texto.\",\n \"min\" =>\"El campo :attribute tiene que tener un minimo :min de caracteres\",\n \"max\" =>\"El campo :attribute tiene un máximo de :max\",\n \"required\" => \"El campo :attribute esta vacío.\"\n ];\n \n $this->validate($request,$reglas,$mensajes);\n\n $categoria = new Categoria();\n $categoria->catNombre = request('catNombre');\n $categoria->save();\n return redirect('/adminCategorias')->with('mensaje', 'Categoria '.$categoria->catNombre.' agregada con éxito');\n }", "title": "" }, { "docid": "c5235d1b255437516bdb52d20b2d5e45", "score": "0.5918748", "text": "public function rules()\n {\n switch($this->method())\n {\n // for add Category\n case 'POST':\n {\n \n return [\n 'name' =>'required|unique:categories|min:4|max:28',\n 'category_pic' =>'required'\n\n ];\n\n }\n // for edit Category\n case 'PUT':\n case 'PATCH':\n {\n return [\n 'name' =>'required|min:4|max:28',\n \n ];\n\n }\n default:break;\n }\n }", "title": "" }, { "docid": "945651837f7e797f4b45eefe048188c5", "score": "0.5913502", "text": "private function validate_condition(){\r\n $data_condition = array();\r\n array_push($data_condition, array('sub_category_name', $_POST['sub_category_name'], \"SubCategory Name\", array(1)));\r\n array_push($data_condition, array('category_id', $_POST['category_id'], \"Category\", array(1)));\r\n return $data_condition;\r\n }", "title": "" }, { "docid": "cdf2bf200d8d722be555ae0872ae53eb", "score": "0.59005743", "text": "public function addCustomValidate()\n {\n // sprawdza, czy data rozpoczecia nie jest mniejsza od daty zakonczenia\n if($this->date_end !== NULL && self::validIsDateTime($this->date_start) && self::validIsDateTime($this->date_end)){\n $date_start = date('Y-m-d H:i:s', strtotime($this->date_start));\n $date_end = date('Y-m-d H:i:s', strtotime($this->date_end));\n \n if($date_start > $date_end){\n $this->errors[] = \"Data rozpoczęcia jest większa od daty zakończenia.\";\n return false;\n }\n }\n \n \n // sprawdzanie czy kategoria ma jakies dziecii i czy glownej kategorii nie chce sie powiazac z inna kategorie glowna\n $item = new ClassMissionType($this->id_mission_type);\n \n // sprawdza czy klasa zostala poprawnie zaladowana\n if(!$item->load_class){\n $this->errors[] = \"Rodzaj misji nie istnieje.\";\n return false;\n }\n \n // sprawdza czy typ wyposazenia jest aktywny\n if($item->active != '1'){\n $this->errors[] = \"Rodzaj misji nie jest aktywny.\";\n return false;\n }\n \n // sprawdza wyposazenie chce sie powiazac z kategoria glowna\n if($item->id_parent === NULL){\n $this->errors[] = \"Misji nie można powiązać z kategorią główna rodzaju misji.\";\n return false;\n }\n \n // sprawdzenie czy rodzic podkategorii nie jest wylaczony\n $item_parent = new ClassMissionType($item->id_parent);\n \n // sprawdza czy klasa zostala poprawnie zaladowana\n if(!$item_parent->load_class){\n $this->errors[] = \"Kategoria główna rodzaju misji nie istnieje.\";\n return false;\n }\n \n // sprawdza czy typ wyposazenia jest aktywny\n if($item_parent->active != '1'){\n $this->errors[] = \"Kategoria główna rodzaju misji nie jest aktywna.\";\n return false;\n }\n \n return true;\n }", "title": "" }, { "docid": "87a540e9de54e4ab08f3212cebcecfe6", "score": "0.590008", "text": "public function rules()\n {\n $uniqueSlug = Rule::unique('category_types');\n if ($this->filled('id')) {\n $uniqueSlug->ignore($this->id)->whereNull('deleted_at');\n }\n\n return [\n 'name' => ['required', 'string', 'max:255'],\n 'slug' => ['required', new AlphaDash, $uniqueSlug, 'max:255'],\n 'select' => ['required', 'string'],\n 'is_multiple' => ['required', 'boolean'],\n 'is_enable' => ['boolean'],\n ];\n }", "title": "" }, { "docid": "a9b2b9c8e29b8896973006b76d996c15", "score": "0.5875726", "text": "public function rules()\n {\n $id = \\Request::segment(3);\n\n return [\n 'name' => 'required|between:2,30|unique:categorys,name,'.$id.',id',\n 'flag' => 'required|between:2,30|unique:categorys,flag,'.$id.',id',\n 'desc' => 'required|between:2,100',\n 'pid' => 'min:0',\n ];\n }", "title": "" }, { "docid": "4d39ccc9544d28395bb8286f66e3bf52", "score": "0.58515215", "text": "public function categorie($categorie)\n {\n\n }", "title": "" }, { "docid": "cca9b7436042d83b7b53a7e83fa4f817", "score": "0.58402085", "text": "public function rules()\n {\n $id = \"\";\n if (isset(request()->route()->parameters['categoria'])) {\n $id = request()->route()->parameters['categoria'];\n }\n\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n {\n return [\n 'name' => 'required|unique:categories'\n ];\n }\n case 'PUT':\n case 'PATCH':\n {\n return [\n 'name' => 'required|unique:categories,id,'.$id\n ];\n }\n default:break;\n }\n }", "title": "" }, { "docid": "b5884e4b20f9cde8c33138dc4a63004f", "score": "0.5835557", "text": "function create_new_category(){\n\t\t$this->form_validation->set_rules('category_title', 'Category Title', 'trim|required|xss_clean|min_length[2]|max_length[256]|callback_alpha_dash_space_number|callback_check_category_exist_by_title');\n\t\t$this->form_validation->set_rules('category_description', 'category Description', 'trim|xss_clean|max_length[500]');\n\t\t$this->form_validation->set_rules('category_for', 'Category Type', 'trim|required|xss_clean');\n\t\t\n\t\t$data = array();\n\t\t$result = array();\n\t\t// validation ok\n\t\tif ($this->form_validation->run()) {\n\t\t\t$data['category_title'] = $this->form_validation->set_value('category_title');\n\t\t\t$data['category_description']= $this->form_validation->set_value('category_description');\n\t\t\t$data['category_type'] = $this->form_validation->set_value('category_for');\n\t\t\t\n\t\t\t// Insert to DB\n\t\t\tif (!is_null($this->category_model->create_category($data))) {\n\t\t\t\t$result['code'] = 1;\n\t\t\t\t$result['info'] = 'Create category successfully';\n\t\t\t} \n\t\t\t// Insert to DB Fail\n\t\t\telse {\n\t\t\t\t$result['code'] = 0;\n\t\t\t\t$result['info'] = 'Error happens. Something went wrong when create this category. Please try again.';\n\t\t\t}\n\t\t// validation fail\n\t\t} else {\n\t\t\t$result['code'] = 0;\n\t\t\t$result['info'] = validation_errors();\n\t\t}\n\n\t\t$this->output\n\t\t\t->set_content_type('application/json')\n\t\t\t->set_output(json_encode($result));\n\t}", "title": "" }, { "docid": "0df2d54d3e88b6bf6f538b860747bf26", "score": "0.5833707", "text": "public function rules()\n {\n return [\n 'tx_name' => \"required|min:3|max:100|unique:produtos\",\n 'tx_url' => \"required|min:3|max:100|unique:produtos\",\n 'vl_price' => \"required\",\n 'tx_description' => 'max:9000',\n 'id_category' => 'required|exists:categories,id_category'\n ];\n }", "title": "" }, { "docid": "6ed554856bbff7daa0606b6c7034bc8d", "score": "0.5830424", "text": "public function rules()\n {\n return [\n 'name' => 'required|min:3|max:40',\n 'description' => 'required|min:3\"max:500',\n 'category_id' => 'required|numeric|exists:categories,id'\n ];\n }", "title": "" }, { "docid": "146d2ba8298d29fba528eaf9afbe229f", "score": "0.58290195", "text": "public function rules()\n {\n return [\n 'name' => 'required|min:5|max:190|unique:categories,name,' . $this->id . '|unique:categories,slug,' . $this->id,\n 'order' => 'required|integer|between:1,1000000|unique:categories,order,' . $this->id,\n 'visibility' => 'required|in:0,1',\n ];\n }", "title": "" }, { "docid": "1a0e4e65d9696136def593e2296d853b", "score": "0.5828265", "text": "public function store()\n {\n $this->validate(request(), [\n 'name' => 'required|string',\n 'type' => 'required|string',\n 'professional' => 'required|boolean',\n 'forms' => 'required_if:type,forms|json',\n 'gender' => 'required_if:type,weights|boolean',\n 'weapon' => 'required_if:type,weights|boolean',\n 'age_bracket' => 'required_if:type,weights|boolean',\n 'team' => 'required_if:type,weights|boolean',\n 'males' => 'required_if:gender,1|required_with_all:females|json',\n 'females' => 'required_if:gender,1|required_with_all:males|json',\n 'common' => 'required_if:gender,0|json',\n ]);\n\n if (request()->filled('forms')) {\n $forms = $this->collectPayload('forms');\n }\n\n if (request()->filled('gender') && request()->gender === '1') {\n $males = $this->collectPayload('males');\n $females = $this->collectPayload('females');\n }\n\n if (request()->filled('gender') && request()->gender === '0') {\n $commons = $this->collectPayload('common');\n }\n\n $category = Category::create(request()->only(['name', 'type', 'professional']));\n\n if (request()->get('type') === 'forms') {\n $category->setForms($forms);\n }\n\n if (request()->get('type') === 'weights') {\n if (request()->filled('common')) {\n $category->setCommons($commons);\n }\n\n if (!request()->filled('common')) {\n $category->setCommons($males, $females);\n }\n }\n\n return redirect()->route('admin.categories.index')->withInput([\n 'message' => 'Category created succcessful!',\n ]);\n }", "title": "" }, { "docid": "6995533ea6ea359d1039dbefcfeed9e7", "score": "0.5822214", "text": "public function rules()\n {\n return [\n 'naslov'=>'required',\n 'slika'=>'nullable|image|max:8000',\n 'idKategorija'=>'exists:kategorija,idKategorija',\n 'tagovi'=>'nullable',\n 'naslovna'=>'nullable',\n 'tekst'=>'required',\n ];\n }", "title": "" }, { "docid": "806f3d58e44db773b26d3def9750595a", "score": "0.58169854", "text": "public function rules()\n {\n $idCategory = $this->route('categories');\n /*return [\n 'name' => 'required|min:2',\n 'slug' => 'required|unique:categories,slug,'.$request->route()->parameter('id'),\n 'description' => 'min:5'\n ];*/\n return [\n 'name' => 'required|min:2',\n 'slug' => 'required|unique:categories,slug,' . $idCategory,\n 'description' => 'min:5',\n 'sort' => 'numeric'\n ];\n }", "title": "" }, { "docid": "d91e770d4d21a46c7c562c98b6eef0cc", "score": "0.58161116", "text": "public function rules()\n {\n return [\n 'cate_name' => 'required',\n 'cate_group_id' => 'required',\n\n ];\n }", "title": "" }, { "docid": "30de706b0e77549194dd90cf44db8f95", "score": "0.5815007", "text": "public function rules()\n {\n return [\n 'category_name' => 'required|unique:tbl_category,category_name',\n 'category_slug' => 'required|unique:tbl_category,category_slug',\n ];\n }", "title": "" }, { "docid": "7263f640e86f0f11dd91c55de8977366", "score": "0.580593", "text": "public function rules()\n {\n // request()->slug = Str::slug(request()->category_name, '-');\n\n return [\n 'category_name' => ['required', 'max:255'],\n // 'slug' => ['nullable', 'max:255', 'unique:App\\Models\\NewsCategory,category_name,slug', 'alpha_dash'],\n 'description' => ['nullable', 'string'],\n ];\n }", "title": "" }, { "docid": "0106f8692821fe3295225345bcf881c2", "score": "0.58029014", "text": "public function unique_product_category()\n\t{\n\t\t$val = $this->input->post('value');\n\t\t$type = $this->input->post('type');\n\n\t\t$type = implode(',', $type);\n\t\t$res = $this->Setting_model->product_category_unique($val, $type);\n\t\tif($res){ echo 1; }else{ echo 0; }\n\t}", "title": "" }, { "docid": "55746136f086990e7aa68d857d4b9066", "score": "0.58003163", "text": "public function rules()\n {\n return [\n 'nombre' => ['required',Rule::unique('categoria')->ignore($this->route('categorias/'))],\n 'id_estado' => 'required',\n 'descripcion' => ['max:255','required'],\n 'user_register_id' => '',\n ];\n }", "title": "" }, { "docid": "95b4312c734bf1be8a22e992fe9d2b88", "score": "0.57968223", "text": "public function store(Request $request)\n {\n \\Flash::success($request->get('title') . ' category saved.');\n $this->validate($request, [\n'title' => 'required|string|max:255|unique:kategoris',\n'parent_id' => 'exists:kategoris,id'\n]);\nKategori::create($request->all());\nreturn redirect()->route('kategori.index');\n }", "title": "" }, { "docid": "4bc1c200421068fc1345dca62878c79c", "score": "0.5788976", "text": "public function rules(): array\n {\n return [\n 'categories' => ['sometimes', new AtLeastOneFieldRequired()],\n 'existing_categories' => ['sometimes', new AtLeastOneFieldRequired()],\n ];\n }", "title": "" }, { "docid": "dcda2f7c96b68d2b590ed52f0fa386e1", "score": "0.5785555", "text": "protected function validation(){\t\t\n\t\t$this->validate(\"InclusionIn\", array(\n\t\t\t\"field\" => \"huerfano\",\n\t\t\t\"domain\" => array('0', '1', '2'),\n\t\t\t\"required\" => true\n\t\t));\n\t\t$this->validate(\"InclusionIn\", array(\n\t\t\t\"field\" => \"tiphij\",\n\t\t\t\"domain\" => array('0', '1', '2'),\n\t\t\t\"required\" => true\n\t\t));\n\t\t$this->validate(\"InclusionIn\", array(\n\t\t\t\"field\" => \"captra\",\n\t\t\t\"domain\" => array('N', 'I'),\n\t\t\t\"required\" => true\n\t\t));\n\t\t$this->validate(\"InclusionIn\", array(\n\t\t\t\"field\" => \"calendario\",\n\t\t\t\"domain\" => array('A', 'B', 'N'),\n\t\t\t\"required\" => true\n\t\t));\n\t\t$this->validate(\"InclusionIn\", array(\n\t\t\t\"field\" => \"estado\",\n\t\t\t\"domain\" => array('P', 'A', 'X'),\n\t\t\t\"required\" => true\n\t\t));\n\t\tif($this->validationHasFailed()==true){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "dc625d149d1c746ad65ad6559d3fc873", "score": "0.57843745", "text": "public function save_category()\n {\n if($this->isLoggedIn())\n {\n if ($_POST) {\n $config = array(\n array(\n 'field' => 'name',\n 'label' => 'Name',\n 'rules' => 'trim|required'\n ),\n array(\n 'field' => 'icon',\n 'label' => 'Font Icon',\n 'rules' => 'trim|required'\n )\n );\n $this->form_validation->set_rules($config);\n if ($this->form_validation->run() == false) {\n echo json_encode(([\"msg_type\" => \"error\", \"message\" => validation_errors() ]));\n } else {\n $this->Admin_model->add_category($_POST);\n echo json_encode(([\"msg_type\" => \"success\", \"message\" => \"Category Added Successfully\" ]));\n }\n }\n }\n else\n {\n redirect(base_url());\n }\n }", "title": "" }, { "docid": "32f23946147c83000826c99aa649d301", "score": "0.57762754", "text": "public function rules()\n {\n return [\n 'name' => [\n 'required', 'string',\n Rule::unique('categories', 'name')->ignore($this->get('id'))\n ],\n 'description' => 'required|string',\n ];\n }", "title": "" }, { "docid": "5d4d6626baba5ca4d530b737032c69bf", "score": "0.5756448", "text": "function insert_new_category()\n{\n // It will also check if the category is already exists or not\n // If not it will add the new category into the system\n if (isset($_POST['cat_submit'])) {\n $new_category = $_POST['cat_title'];\n $cat_connection = new Database();\n $existence = $cat_connection->category_is_exists($new_category);\n if ($existence == true || $new_category == \"\" || empty($new_category)) {\n echo \"<p><b>Category is invalid !!!</b></p>\";\n echo \"<p><b>Or it is already added !!!</b></p>\";\n } else {\n $sql_command = \"INSERT INTO Category(Cat_Title) VALUE('$new_category')\";\n $cat_connection->queryDatabase($sql_command);\n }\n }\n}", "title": "" }, { "docid": "98b11338ac120acca04cb1df5c47899f", "score": "0.5756432", "text": "public function postInsert () {\n $reglas=[\"Nombre\" => \"required|alpha|min:4\"];\n\n //Establecer los mensajes\n $mensajes = [\"required\" => \"Campo obligatorio\",\n \"alpha\" => \"Caracteres alfabéticos.\",\n \"min\" => \"Minimo :min caracteres\"];\n\n //Crear un objeto validador\n $validador = Validator::make( $_POST, $reglas, $mensajes );\n\n //Validar los datos:\n if ($validador->fails()){\n //Validacion fallo\n return Redirect::to('categoria/insert')->withErrors($validador);\n }else{\n //Validacion correcta\n //Creamos al categoria:\n\n $categoria = new Categoria();\n\n $categoria->Nombre = $_POST[\"Nombre\"];\n\n $categoria->save();\n return Redirect::to('categoria');\n }\n }", "title": "" }, { "docid": "57c80108fec32e8485766936665fe5d6", "score": "0.5738803", "text": "public function rules()\n {\n return [\n 'title' => 'required|unique:categories,title|between:3,255'\n ];\n }", "title": "" }, { "docid": "7602c747f389e43259250ce71374a653", "score": "0.5728097", "text": "public function rules()\n {\n return [\n 'title' => ['required', 'string', 'min:2', 'max:100', new UniqueForUserRule('categories', 'title')],\n 'icon' => 'string|nullable', // TODO: decide which package should we use\n 'banner' => ['nullable', 'string', new UploadedCategoryBannerIdRule()]\n ];\n }", "title": "" }, { "docid": "0eda0c3b37faf76a6e760ec0e5113f80", "score": "0.57273155", "text": "public function store(CategoriaRequest $request)\n {\n $count = Categoria::where('tamanho',$request->input('tamanho'))->count();\n if($count < 1) {\n $categoria = new Categoria();\n $categoria->tamanho = $request->input('tamanho');\n $categoria->valor = $request->input('valor');\n $categoria->save();\n Session::flash('mensagem', 'Categoria cadastrada com sucesso!');\n }else{\n Session::flash('mensagemErro', 'Não é possível cadastrar categorias repetidas!');\n }\n\n return redirect('/categoria/create');\n\n }", "title": "" }, { "docid": "13afc11dead7101c829a5bd0f321a1f7", "score": "0.57240963", "text": "public function testThatWeCanGetTheCategories()\n {\n $ads = new Categories;\n \n $ads->setCategories('Mobiles');\n\n $this->assertEquals(1 , preg_match( '/^[a-zA-Z]{5,30}$/', $ads->getCategories() ), $ads->getCategories() . ' is not available' );\n\n\n }", "title": "" }, { "docid": "95da07176bd105cb7d4bb6f1b84d0b03", "score": "0.5722887", "text": "public function store()\n {\n $rules = [\n 'name_nl' => 'required_without:name_en' ,\n 'name_en' => 'required_without:name_nl'\n ];\n\n $validator = Validator::make(Input::all(), $rules);\n\n if ($validator->passes()) {\n\n $category = new GameFunctionCategory();\n $category->game_function_category_name_nl = Input::get('name_nl');\n $category->game_function_category_name_en = Input::get('name_en');\n\n $category->save();\n\n return Redirect::route('admin.categories');\n\n } else {\n return Redirect::route('admin.categories.create')\n ->withInput()\n ->withErrors($validator); // Maakt $errors in View.\n }\n }", "title": "" }, { "docid": "6d66adba632805a4f3e1e5f0222c8b83", "score": "0.57202417", "text": "public function rules()\n {\n return [\n 'banner_id' => ['nullable', new CategoryBannerIdRule],\n 'title' => ['required', 'min:2', 'max:100', 'string', new UniqueForUser('categories', auth()->user()->id)],\n 'icon' => 'nullable|string'\n ];\n }", "title": "" }, { "docid": "f1cfb6790941bbfa9b99764729c9cd7a", "score": "0.5714915", "text": "public function store(CategoriaRequest $request)\n {\n try{\n\n $validatedCategoria = $request->validated();\n\n \n $categoria = Categoria::create($validatedCategoria);\n\n return response()->json('cadastrado com sucesso!', Response::HTTP_OK);\n\n }catch(\\Exception $e){\n return response()->json($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }", "title": "" }, { "docid": "74ccc8837016185d9ae7bda585cd2c61", "score": "0.5703507", "text": "public function ruleskategori()\n {\n return [\n [\n 'field' => 'nama_kategori',\n 'label' => 'Nama kategori',\n 'rules' => 'required',\n ] \n ];\n }", "title": "" }, { "docid": "957b82e565f1c3f48e4992e7f38290f9", "score": "0.5697545", "text": "public function rules()\n {\n $categories = Category::find($this->get('id'));\n switch ($this->method()) {\n case 'GET':\n # code...\n break;\n case 'POST':\n return [\n 'title' => 'required|unique:categories,title',\n 'title_alias' => 'required|unique:categories,title_alias|regex:/^[a-zA-Z0-9\\-]+$/',\n ];\n break;\n case 'PUT':\n return [\n 'title' => 'required|unique:categories,title,' . $categories->id,\n 'title_alias' => 'required|unique:categories,title_alias,' . $categories->id . '|regex:/^[a-zA-Z0-9\\-]+$/',\n ];\n break;\n default:\n # code...\n break;\n }\n\n }", "title": "" }, { "docid": "b01e2634ee6bd0726075365107ff6e85", "score": "0.5692217", "text": "public function rules()\n {\n return [\n\n 'industry_category' => 'required|array',\n 'category' => 'required',\n 'sub_category_name' => 'required',\n 'single_account_code' => ['required', 'string', 'min:1', 'max:1', new DuplicateAccountCodeCategory(2)]\n ];\n }", "title": "" }, { "docid": "d0568c83ff0ba5901e1f4d8a48c644dc", "score": "0.5689778", "text": "function create()\n\t{\n\t\t$this->load->library('form_validation'); \n\t\t$this->form_validation->set_rules($this->rules); \n\t\t\n\t\tif ($this->form_validation->run())\n\t\t{\n\t\t\tif ( $this->banner_categories_m->newCategory($_POST) )\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success', $this->lang->line('cat_add_success'));\n\t\t\t}\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('error', $this->lang->line('cat_add_error'));\n\t\t\t}\n\t\t\tredirect('admin/banner/categories');\t\t\n\t\t}\n\t\t\n\t\t \n\t\t \n\t\t$this->template->build('admin/banner_categories/form', $this->data);\n\t}", "title": "" }, { "docid": "c6ecf8850d0507fcf30bd5bfce388bda", "score": "0.5686174", "text": "public function store(Request $request)\n {\n\n $request->validate([\n 'nombre' => 'required|max:50|unique:categorias,nombre',\n 'slug' => 'required|max:50|unique:categorias,slug',\n\n ]);\n Categoria::create($request->all());\n return redirect()->route('admin.categoria.index')\n ->with('datos', 'Registro creado correctamente!');\n }", "title": "" }, { "docid": "dd50a4bcf4c0e2c06dec2f4d612edb4c", "score": "0.56729734", "text": "function insertCategoria(){\n $logueado = $this->controllerUsuario->checkLoggedIn();\n if ($logueado) {\n if (isset($_POST['input_nombre_categoria']) && isset($_POST['input_descripcion_categoria'])) {\n $this->model->insertCategoria($_POST['input_nombre_categoria'], $_POST['input_descripcion_categoria']);\n header(\"Location:\" . BASE_URL . \"categorias\");\n }\n } else {\n $this->view->showHomeLocation();\n }\n }", "title": "" }, { "docid": "74cdbe95025dad11f77cca7008c2cf16", "score": "0.5669721", "text": "protected function validating(){\n return $validated= request()->validate([\n 'categoryName'=>['required','min:5','max:25']\n ]);\n }", "title": "" }, { "docid": "2b8e75b8aa4ee1ec696fc4c4f7c226d6", "score": "0.56689656", "text": "public function rules()\n {\n return [\n 'title' => 'required',\n 'content' => 'required',\n 'category_id' => 'required|exists:categories,id'\n ];\n }", "title": "" }, { "docid": "a69d2e66420759d834a3859d0c85448b", "score": "0.56645584", "text": "public function categorias()\n\t{\n \t \t$seccion_id = e(\\Input::get('seccion2'));\n \t \t\n\t\treturn Categoria::where('seccion_id','=', $seccion_id)->get();\n\t}", "title": "" }, { "docid": "f2ded6d0c4b8c39e61b357c5696707cc", "score": "0.5661674", "text": "public function store(Request $request)\n {\n //\n $data = $this->validate($request,$this->validationRules());\n \n $categorie = Categorie::create($data);\n //dd($categorie);\n return redirect()->route('categorie.show', $categorie)->with('message','categorie ajouté avec succés'); \n }", "title": "" }, { "docid": "03b0d3657698dcb4878deeca5506c034", "score": "0.5659525", "text": "public function rules()\n {\n $blog_category_id = request()->route('blog_category');\n return [\n //loại bỏ name đã tồn tại trong bảng blog_categories \n 'name' => 'required|max:100|unique:blog_categories,name,'.$blog_category_id,\n ];\n }", "title": "" }, { "docid": "b64223c4edca5211d583fbd28aad1d14", "score": "0.5654739", "text": "public function store(Request $request)\n {\n $this->validate($request, ['nombre'=>'required',\n 'descripcion'=>'required']);\n $categoria = new Categoria;\n $categoria -> nombre = $request -> nombre;\n $categoria -> descripcion = $request -> descripcion;\n $categoria -> save();\n return back()->with('create','Categoria creada correctamente');\n\n }", "title": "" }, { "docid": "3465c91664319157450891057b9c656a", "score": "0.56516784", "text": "public function rules()\n {\n if (request()->isMethod(\"post\")) {\n return [\n \"category_create_name_en\" => config(\"rules.name_en\").\"|unique:categories,name_en\",\n \"category_create_name_ar\" => config(\"rules.name_ar\").\"|unique:categories,name_ar\",\n \"category_create_description_en\" => config(\"rules.edit_description_en\"),\n \"category_create_description_ar\" => config(\"rules.edit_description_ar\"),\n ];\n }elseif (request()->isMethod(\"patch\")) {\n return [\n \"category_edit_name_en\" => config(\"rules.edit_name_en\").\"|unique:categories,name_en,\".request(\"category\"),\n \"category_edit_name_ar\" => config(\"rules.edit_name_ar\").\"|unique:categories,name_ar,\".request(\"category\"),\n \"category_edit_description_en\" => config(\"rules.edit_description_en\"),\n \"category_edit_description_ar\" => config(\"rules.edit_description_ar\"),\n ];\n }elseif (request()->isMethod(\"delete\")) {\n return [\n\n ];\n }\n }", "title": "" }, { "docid": "dd7a1cc41c71a1d9d389abfd645efc6f", "score": "0.56491244", "text": "public function rules()\n {\n if(isset($this->performanceCategoryId)){\n return [\n 'performance_category_name' => 'required|unique:performance_category,performance_category_name,'.$this->performanceCategoryId.',performance_category_id'\n ];\n }\n return [\n 'performance_category_name'=>'required|unique:performance_category',\n ];\n }", "title": "" }, { "docid": "214829f611c564636fd5bd3a88ebaef2", "score": "0.5648908", "text": "function addCategory() {\n if(isset($_POST['submit'])){\n\n if(empty($_POST['categ'])){\n echo \"<p class='alert-danger'>this field is required</p>\";\n }else {\n $categ = escape($_POST['categ']);\n\n global $conn;\n \n $query = \"INSERT INTO categories(ctg_title) VALUES ('$categ')\";\n $result = mysqli_query($conn,$query);\n }\n }\n }", "title": "" }, { "docid": "dd67228dc9fee35bd96b57612f4c8c28", "score": "0.5645484", "text": "public function store(Request $request)\n { \n //\n $campos = [\n 'nombre' => 'required|string|max:100', \n 'detalle' => 'required|string|max:100', \n 'subcategorias_id' => 'required|max:100', \n ];\n \n $Mensaje = [\"required\"=>'El :attribute es requerido'];\n $this->validate($request,$campos,$Mensaje);\n \n \n $this->cliente->post('categorias', [\n 'json' => $request->all()\n ]);\n \n return back()->with('Mensaje','Categoria agregada correctamente');\n \n }", "title": "" }, { "docid": "00d684aad357d58a483627af1cee8755", "score": "0.56447494", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'nombre'=>'required|max:50|unique:categorias',\n 'descripcion'=>'required|string|min:10',\n ]);\n categoria::create($request->only('nombre','descripcion'));\n return redirect(route('categorias.index'))->with('success','ok'); \n \n /* $catNueva = new App\\Models\\Categoria();\n $catNueva->nombre = $request->nombre;\n $catNueva->descripcion = $request->descripcion;\n $catNueva->save();\n\n //return back()->with('mensaje','Categoria agregada!');\n return back()->with('enviar','ok'); */\n }", "title": "" }, { "docid": "ddfda0ef85d048d3eb584714ced7998a", "score": "0.56428105", "text": "public function store(Request $request)\n {\n //\n if(!(Gate::denies('create_categoria'))){\n //Validação\n $this->validate($request,[\n 'nome' => 'required|min:3',\n 'descricao' => 'required|min:15',\n 'valor' => 'required',\n ]);\n \n \n $categoria = new Categoria();\n $categoria->nome = $request->input('nome');\n $categoria->descricao = $request->input('descricao');\n $categoria->valor = $request->input('valor');\n\n \n //LOG ----------------------------------------\n $this->log(\"categoria.store\");\n //---------------------------------------------\n\n if($categoria->save()){\n return redirect('categorias/')->with('success', 'Categoria cadastrada com sucesso!');\n }else{\n return redirect('categorias/'.$id.'/edit')->with('danger', 'Houve um problema, tente novamente.');\n }\n }\n else{\n return view('errors.403');\n }\n }", "title": "" }, { "docid": "8d16df337723045a29fd249e526233f4", "score": "0.5640839", "text": "public function a_categoria_can_be_created()\n {\n $this->withoutExceptionHandling(); //Esta linea de código permite ver los errores sin excepciones\n\n $response = $this->put('/categoria', [\n 'nombre' => 'Categoria Prueba',\n 'descripcion' => 'Categoria Descripcion'\n ]);\n\n $response->assertOk();\n $this->assertCount(1, Categoria::all());\n\n $categoria = Categoria::first();\n\n $this->assertEquals($categoria->nombre, 'Categoria Prueba');\n $this->assertEquals($categoria->descripcion, 'Categoria Descripcion');\n }", "title": "" }, { "docid": "a287491589b674958eee84da0d89b05c", "score": "0.56316507", "text": "public function rules()\n {\n\t\t\n\t\t//getting all existing categories from DB {wpressimage_category}, get from DB only column \"id\". Used for validation in range {Rule::in(['admin', 'owner']) ]}, ['13', '17']\n\t\t$existingRoles = Wpress_images_Category::select('wpCategory_id')->get(); \n\t\t$rolesList = array(); // array to contain all roles id from DB in format ['13', '17']\n\t\tforeach($existingRoles as $n){\n\t\t\tarray_push($rolesList, $n->wpCategory_id);\t\n\t\t}\n\t\t\n\t\t//dd($rolesList);\n\t\t\n return [\n\t\t 'title' => 'required|string|min:3|max:255',\n\t\t 'description' => 'required|string|min:5|max:255',\n\t\t\t'category_sel' => ['required', 'string', Rule::in($rolesList) ], //integer]; //'category_sel' => ['required', 'string', Rule::in(['admin', 'second-zone']) ] , //integer];\n \n\t\t\t//image validation https://hdtuto.com/article/laravel-57-image-upload-with-validation-example\n\t\t\t//'filename' => ['required', /*'image',*/ 'mimes:jpeg,png,jpg,gif,svg', 'max:2048' ], // 'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',,\n\t\t \n\t\t\t'filename' => 'required',\n 'filename.*' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048' //min:2048\n\t\t];\n\n\t\t\n }", "title": "" }, { "docid": "d4bf57624881cf2834c0020f57054067", "score": "0.5629372", "text": "public function store(Request $request)\n { \n if(Auth::user()->role != 2) {\n $user_rule = UserRule::where('user_id',Auth::user()->id)\n ->where(\"rule_id\",$this->selected_rule_id_2)\n ->first();\n $messages = \"tidak ada akses ke setting parameter!\";\n if($user_rule == null || $user_rule->status == 0) {\n $request->session()->flash('alert-danger', $messages);\n return redirect()->route('home');\n }\n }\n try {\n $clean_name = strtoupper(trim($request->name,' '));\n\n if(strlen($clean_name) < 2) {\n $request->session()->flash('alert-warning', \"panjang character kurang dari 2\");\n return redirect()->route($this->redirectTo);\n }\n\n\n $exists = Category::where('name',$clean_name)->first();\n\n if($exists) {\n $request->session()->flash('alert-warning', \"data is exists\");\n return redirect()->route($this->redirectTo);\n }\n\n\n $data = new Category;\n $data->name = $clean_name;\n $data->created_by = Auth::user()->id;\n $data->updated_by = Auth::user()->id;\n $data->save();\n $request->session()->flash('alert-success', \"data \".$request->name.' has been created');\n return redirect()->route($this->redirectTo);\n }\n catch(Exception $e) {\n $request->session()->flash('alert-danger', $e->getMessage());\n return redirect()->route($this->redirectTo);\n }\n }", "title": "" }, { "docid": "2eed29c7e9b15242ff44da658d50599f", "score": "0.56172454", "text": "public function check_nombrecorto($str){\r\n \r\n //$this->load->model('Categoria');\r\n \r\n $categorias = (new Categoria())->get();\r\n \r\n //$tmp = $str.\"<br>\";\r\n foreach ($categorias as $cat){\r\n //$tmp .= $cat['cat_nombre_url'].\"<br>\";\r\n if ($cat['cat_nombre_url'] == $str){\r\n \r\n return true;\r\n }\r\n }\r\n $this->form_validation->set_message('check_nombrecorto', \"Ese nombre corto de categoria no existe.<br>Si quiere editarlo debe de \".anchor('categorias/addCatV/'.$str,'crear una categoria nueva').\".<br>\");\r\n return false;\r\n }", "title": "" }, { "docid": "0e282f2504329bd8fd4f3abb7d0b7cc2", "score": "0.5615201", "text": "public function rules()\n {\n return [\n 'intitule'=>'required',\n 'categorie_id'=>'required',\n 'secteur_id'=>'required',\n ];\n }", "title": "" }, { "docid": "337f5233a420360d6997ee982b74011f", "score": "0.5614435", "text": "public function creanuovacategoriaAction(){\n }", "title": "" }, { "docid": "1e4189583ae70a55f1e2195f9ff4786b", "score": "0.56141025", "text": "public function rules()\n {\n return [\n 'nombre'=>'required|string|max:50',\n 'descripcion'=>'required|string|max:50',\n 'marca'=>'required|string|max:50',\n 'imagen'=>'required|dimensions:min_width=100,min_height=200|mimes:jpeg,bmp,jpg,JPG,png,PNG,JPEG',\n 'precio'=>'required|integer',\n 'stock'=>'required|integer',\n 'user_id'=>'required|integer|exists:App\\User,id',\n 'categoria_id'=>'required|integer|exists:App\\Categoria,id|'\n ];\n }", "title": "" }, { "docid": "c413731656da9c071597fcdae2353901", "score": "0.5611416", "text": "public function rules()\n {\n return [\n 'name' => 'required|max:191|unique:product_categories,name,' . $this->segment(3),\n ];\n }", "title": "" } ]
747a216e349db9c71a3fa93ccc458c57
Transform fillout to string; Useful for textual display in ui Transform fillout to string; Useful for textual display in ui. Will return label of selected item if this fillout belongs to a choice field
[ { "docid": "1262d6c8398555c045275414b2143690", "score": "0.0", "text": "public function getTextualValue(): string\n {\n if ($this->value instanceof \\DateTimeInterface) {\n return $this->value->format('d.m.Y');\n }\n return '';\n }", "title": "" } ]
[ { "docid": "54607554206e2f1c6335ccc4716d1e5d", "score": "0.5524951", "text": "public function labelForRelationItem($item, $foreignKey): string\n {\n try {\n $relations = config('netcore.module-invoice.relations');\n $currentRelation = collect($relations)->where('foreignKey', $foreignKey)->first();\n\n $ajaxSelect = array_get($currentRelation, 'ajaxSelect', []);\n $translatable = array_get($ajaxSelect, 'translatable', []);\n $notTranslatable = array_get($ajaxSelect, 'notTranslatable', []);\n\n $textItems = [];\n\n foreach ($notTranslatable as $field) {\n $textItems[] = $item->$field;\n }\n\n foreach ($translatable as $field) {\n $textItems[] = $item->$field;\n }\n\n return trim(join($textItems, ' '));\n } catch (\\Throwable $e) {\n return '';\n }\n }", "title": "" }, { "docid": "d12f4a8385802dfa3d928343427e8478", "score": "0.5516428", "text": "function field_value() {//column_foreign\n //\n $x = $this->subfields->output->value;\n return is_null($x) ? \"Click To Select\": $x;\n }", "title": "" }, { "docid": "0fe0daef067008a4651be7aa7b818802", "score": "0.5418724", "text": "public function __toString()\n {\n return (string) $this->label;\n }", "title": "" }, { "docid": "5bcdd5c0732118469e5ca7ca73183aaa", "score": "0.54098225", "text": "function toString() {\n\n\t\t\t\t$selectField = '<select name=\"' . $this->name . '\">';\n\t\t\t\t$selectedValue = get_option($this->name);\n\t\t\t\tforeach ($this->selectItems as $optionTitle => $optionValue) {\n\t\t\t\t\t$selectField .= '<option value=\"' . $optionValue . '\"' . ($optionValue==$selectedValue ? ' selected' : '') . '>' . $optionTitle . '</option>';\n\t\t\t\t}\n\t\t\t\t$selectField .= '</select>';\n\t\t\t\treturn preg_replace('/#/', $selectField, $this->description);\n\n\t\t\t}", "title": "" }, { "docid": "5cab4740e1b0d1ba57e6f7bbcdb829aa", "score": "0.5330957", "text": "public function __toString()\n {\n return $this->label;\n }", "title": "" }, { "docid": "98ff596f5d98e53abb2123f2e8bf11ff", "score": "0.53057337", "text": "public function getChoiceLabel(Event $event, $choice);", "title": "" }, { "docid": "faa751458883592ca5fa2ddb2074476f", "score": "0.5283303", "text": "public function getSelectLabel(){\n return $this->nom . ' (' . $this->type . ')';\n }", "title": "" }, { "docid": "288ee3a775864047c67d722227e2c02b", "score": "0.52760386", "text": "protected function _getFieldInputLabel()\n {\n return __(html_escape($this->_element->name));\n// return html_escape($this->_annotationTypeElement->Element->name);\n }", "title": "" }, { "docid": "13ecf4270db47fd4c57e04fab7eb8364", "score": "0.5268127", "text": "public function GetSelectListBoxItemText($record)\n {\n return GetSelectOptionItemText($record);\n }", "title": "" }, { "docid": "97db3e6ca4a27cba5c062ef6e0020ea3", "score": "0.524925", "text": "public function __toString()\n {\n return $this->nombre;\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "93b8d1843d35f3eb7396c8199396e32b", "score": "0.5224663", "text": "private function get_choice_label($value) {\n foreach ($this->choices ?? [] as $choice) {\n if ($choice['value'] === $value) {\n return $choice['text'];\n }\n }\n return null;\n }", "title": "" }, { "docid": "c80a182e870b20976ab0a4783fc8d70f", "score": "0.51807314", "text": "public function __toString(){\n return $this->nomPays;\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "42d7f8553e3b91f925ba6f26b9081d40", "score": "0.51801354", "text": "public function __toString()\n {\n return $this->nom;\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "d95af5b09f83cfb892312e3f31582f50", "score": "0.5169538", "text": "public function get_source_label() {\n\t\tswitch( $this->source ) {\n\t\t\tcase 'frm' : return 'Formidable'; break;\n\t\t\tcase 'cf7' : return 'Contact Form 7'; break;\n\t\t\tcase 'grv' : return 'Gravity Forms'; break;\n\t\t}\n\t\treturn '';\n\t}", "title": "" }, { "docid": "28142748626a6c4fb0b0373c84dd7c7c", "score": "0.5165263", "text": "public function __toString(){\n return $this->activite->getTitre();\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "2591c6cdeb6165036f72d6f51a748f7a", "score": "0.5162813", "text": "function get_label($data) {\n $operator = $data['operator'];\n $value = $data['value'];\n $operators = $this->get_operators();\n\n if (empty($operator)) {\n return '';\n }\n if ($value==0) {\n $value = '0';\n } else {\n $value = format_time($value);\n }\n $a = (object)array(\n 'label' => $this->_label,\n 'value' => '\"'.s($value).'\"',\n 'operator' => $operators[$operator]\n );\n\n return get_string('selectlabel', 'filters', $a);\n }", "title": "" }, { "docid": "84a5eaa0c85773a7960a4e490df70bcc", "score": "0.5127516", "text": "public function __toString(){\n // to show the name of the Category in the select\n return $this->question;\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "e05606639812c5c821b529bc94425c0a", "score": "0.5117964", "text": "public function __toString(){\n return $this->code_jouet;\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "df196bdb88bf4e39b7cb257edddbf3b3", "score": "0.51069456", "text": "protected function _getLabel()\n {\n\n if (!empty($this->_properties['name'])){\n return '('.$this->_properties['id'].')'.$this->_properties['name'];\n }\n return '('.$this->_properties['id'].')';\n }", "title": "" }, { "docid": "a9e2cf2abe1c8a9e85562fa057c767e6", "score": "0.5105348", "text": "public function __toString(){\n // to show the name of the Category in the select\n $nomSociete = $this->nom;\n return $nomSociete;\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "97dcce589de7da2fba0c2b4a6a183d2d", "score": "0.5094902", "text": "public function get_label() {\n\t\treturn apply_filters('audition_get_form_field_label', $this->label, $this);\n\t}", "title": "" }, { "docid": "6c7bafcad3a640fea6fc1e4ef092211a", "score": "0.5092668", "text": "public function toText() {\n\t\tif ($this->id>0) {\n\t\t\t$son = $this->getSon();\n\t\t\tif($son != null) {\n\t\t\t\treturn $son->toText();\n\t\t\t}\n\t\t\telseif (!isset($this->__toText) || ($this->__toText == \"\")) {\n\t\t\t\treturn \"\".$this->id;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $this->evalByText($this->__toText);\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "34842f3d8941275d654829591ea005b7", "score": "0.5082801", "text": "function ois_option_label($data) \n{\n\tif (!empty($data['id'])) {\n\t\t$el_id = $data['id'];\n\t} else {\n\t\t$el_id = '';\n\t}\n\tif (!empty($data['class'])) {\n\t\t$el_class = 'class=\"' . $data['class'] . '\"';\n\t} else {\n\t\t$el_class = '';\n\t}\n\tif (!empty($data['style'])) {\n\t\t$style = 'style=\"' . $data['style'] . '\"';\n\t} else {\n\t\t$style = '';\n\t}\n\tif (!empty($data['inner_style'])) {\n\t\t$inner_style = $data['inner_style'];\n\t} else {\n\t\t$inner_style = '';\n\t}\n\t\n\techo '<tr id=\"' . $el_id . '\" ' . $el_class . ' ' . $style . '\"';\n\tif (!empty($data['alternative']) && $data['alternative'] == 'yes') {\n\t\techo ' class=\"alternate\" ';\n\t}\n\techo '>\n\t\t\t<td class=\"ois_label\" style=\"' . $inner_style . '\">\n\t\t\t\t' . $data['title'] . '\n\t\t\t\t<p>\n\t\t\t\t\t<small style=\"font-size:11px;\">' . $data['description'] . '</small>\n\t\t\t\t</p>\n\t\t\t</td>\n\t\t\t<td class=\"ois_field\">';\n\n\tif (!empty($data['image']) && trim($data['image']) != '') {\n\t\tif (!empty($data['image-right-padding']) \n\t\t\t&& trim($data['image-right-padding']) != '') {\n\t\t\t$right_padding = $data['image-right-padding'];\n\t\t} else {\n\t\t\t$right_padding = '50px';\n\t\t}\n\t\techo '<img src=\"' . OIS_URL . 'admin/images/' . $data['image'] . '\" style=\"float:right;\" />';\n\t}\n}", "title": "" }, { "docid": "e87e3a26101fb0b7732e21e5c2c6ee10", "score": "0.5073641", "text": "protected function _getFieldLabel()\n {\n return html_escape($this->_annotationTypeElement->prompt);\n }", "title": "" }, { "docid": "9eb556568882c7a6422079773666d9ca", "score": "0.5071534", "text": "public function GetSelectOptionItemText($record)\n {\n return addslashes($record[\"name\"]);\n }", "title": "" }, { "docid": "5ba2e5948ed33bb7ea2491211c6ee3c3", "score": "0.5068418", "text": "public function get_label();", "title": "" }, { "docid": "6584403e39b26ab3dd1ed654e4710cce", "score": "0.50635886", "text": "public function render(): string\n {\n $value = $this->value === null ? '' : ' value=\"'.$this->value.'\"';\n $sel = $this->selected ? ' selected=\"selected\"' : '';\n $title = $this->title === null ? '' : ' title=\"'.$this->title.'\"';\n\n return '<option'.$value.$sel.$title.'>'.$this->text.'</option>';\n }", "title": "" }, { "docid": "3ab522b74238cb9630e6e445e0283263", "score": "0.5050746", "text": "public function __toString()\n {\n return $this->getLabelCategory();\n }", "title": "" }, { "docid": "7b664205bb4025b2b80e45087f1bb783", "score": "0.50412565", "text": "public function __toString() {\n return $this->titol;\n }", "title": "" }, { "docid": "fde338078da79c9d3bad65b31eb1299c", "score": "0.5032619", "text": "public function __toString(){\n return $this->name;\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "150715e815098f15b3c74f4879cfd518", "score": "0.5025688", "text": "public function GetListItemText($callingResource=null)\n {\n if (isset($this->DB_Fields[\"name\"])){\n $requestText = \"\";\n\n if ($callingResource!=null){\n\n if ($callingResource->Name=='Storagepallet'){\n $palletID = $callingResource->ID;\n $productName = $this->PalletDetails[$palletID]['itemname'];\n $qty = $this->PalletDetails[$palletID]['item_qty'];\n $requestText .= \"$productName - In Storage [<b>\" . $qty . \"</b>]\";\n }\n else if ($callingResource->Name=='Storageitem'){\n $requestText .= $callingResource->GetField('name');\n }\n else{\n $requestText .= $callingResource->Name;\n }\n }\n $shippedDate = !empty($this->GetField('date_shipped')) ?\n Util::GetFormattedDateMySQL($this->GetField('date_shipped')) : \"Pending\";\n\n $requestText .= \" | \" . $this->GetField('qty') . \" | \" . $shippedDate;\n\n return $requestText;\n }\n else{\n return \"[db name field not set ]\";\n }\n }", "title": "" }, { "docid": "dc939a259a39bb4efda48182987ae4fc", "score": "0.5014558", "text": "public function __toString(){\n return $this->image;\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "534c0e941ea4749598ec77f2165e18cf", "score": "0.50131667", "text": "function get_label($data) {\n $retval = '';\n\n if(!empty($data['value'])) {\n if($data['value'] == 1) {\n $retval = get_string('all');\n } else if($data['value'] == 2) {\n $retval = get_string('inactive', 'block_curr_admin');\n }\n }\n\n return $retval;\n }", "title": "" }, { "docid": "ef974c398911bb96f1d5efc0c06efe4c", "score": "0.5000632", "text": "function wpv_get_filter_status_summary_txt($selected, $short=false) {\n\tob_start();\n\n\tif (sizeof($selected)) {\n\t\tif ($short) {\n\t\t\t_e('status of ', 'wpv-views');\n\t\t} else {\n\t\t\t_e('Select posts with status of ', 'wpv-views');\n\t\t}\n\t$first = true;\n\tforeach($selected as $value) {\n\t\tif ($first) {\n\t\techo '<strong>' . $value . '</strong>';\n\t\t$first = false;\n\t\t} else {\n\t\t_e(' or ', 'wpv-views');\n\t\techo '<strong>' . $value . '</strong>';\n\t\t}\n\t}\n\t} else { // !TODO review this wording: this filter is not applied and indeed disapears from the edit screen on save\n\t\tif ($short) {\n\t\t\t_e('any status.', 'wpv-views');\n\t\t} else {\n\t\t\t_e('Do not apply any filter based on status.', 'wpv-views');\n\t\t}\n\t}\n\t$data = ob_get_clean();\n\n\treturn $data;\n\n}", "title": "" }, { "docid": "9115853615e656152b1dc2fff0148b33", "score": "0.49989116", "text": "public function __toString()\n {\n return $this->getText();\n }", "title": "" }, { "docid": "009beae3b6d52693c5fc21caf823a79a", "score": "0.4974175", "text": "public function __toString(){\n return $this->classe.' '.$this->civilite;\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "d79715b87837509f2cc336148d525fa7", "score": "0.49714786", "text": "function format_value_select($value, $_value, $post_id, $field){\n \n $value = acf_get_array($_value);\n $array = array();\n \n foreach($value as $v){\n \n $array[] = acf_maybe_get($field['choices'], $v, $v);\n \n }\n \n return implode(', ', $array);\n \n }", "title": "" }, { "docid": "75aabd1710eaf9a243674513395c637e", "score": "0.49709073", "text": "private static function render_term_item($id, $name, $count, $path, $is_selected, $option_id) {\n\t\t?>\n\t\t<span data-id=\"<?php echo esc_attr($id); ?>\"\n\t\t data-count=\"<?php echo esc_attr($count); ?>\"\n\t\t data-path=\"<?php echo esc_attr($path); ?>\"<?php if ($is_selected) {\n\t\t\t?> class=\"mkb-term-selected\"<?php\n\t\t} ?>>\n\t\t\t\t\t\t<i class=\"fa fa-folder\"></i>\n\t\t\t<?php echo esc_html($name . ($count ? ' (' . $count . ')' : '')); ?>\n\n\t\t\t<input type=\"checkbox\"\n\t\t\t id=\"term_select_<?php echo esc_attr($id . '_' . $option_id); ?>\"\n\t\t\t name=\"term_select_<?php echo esc_attr($id . '_' . $option_id); ?>\"\n\t\t\t\t<?php if ( $is_selected ) {\n\t\t\t\t\techo 'checked=\"checked\"';\n\t\t\t\t} ?>\n\n\t\t\t\t/>\n\t\t\t<label for=\"term_select_<?php echo esc_attr($id . '_' . $option_id); ?>\"></label>\n\n\t\t</span>\n\t\t<?php\n\t}", "title": "" }, { "docid": "b62f50f3ec0a205909049918d94884c1", "score": "0.49694607", "text": "public function __toString(){\n // to show the name of the Lesson in the select\n return $this->title;\n // to show the id of the Lesson in the select\n // return $this->id;\n }", "title": "" }, { "docid": "2f80090f210a2bbe22d11803e37a1a94", "score": "0.49686712", "text": "public function getlabel() {\n return \"$this->nama, $this->produksi\";\n }", "title": "" }, { "docid": "46a0ab355b2c78f05958d18fa4142638", "score": "0.49660578", "text": "protected function getLabel()\r\n\t{\r\n\t\tif ($this->label !== false && !in_array($this->type, array('checkbox', 'radio')) && $this->hasModel()) {\r\n\t\t\treturn $this->form->labelEx($this->model, $this->attribute, $this->labelOptions);\r\n\t\t} else if ($this->label !== null) {\r\n\t\t\treturn $this->label;\r\n\t\t} else {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e5273e0432d33a581d7be262f7b7fcce", "score": "0.49647996", "text": "function description_outil_input1_callback($matches) {\r\n\t// pas de label : [[->qq chose]]\r\n\tif (!strlen($matches[1]))\r\n\t\treturn \"<fieldset><div>$matches[2]</div></fieldset>\";\r\n\t// retour a la ligne : [[-->qq chose]]\r\n\tif ($matches[1] == '-')\r\n\t\treturn \"<fieldset> <div>$matches[2]</div></fieldset>\";\r\n\t// fusion dans un <li> de boutons radio : [[radio->qq chose]]\r\n\telseif ($matches[1] == 'radio')\r\n\t\treturn \"<fusionradio>$matches[2]</li></ul></div></fieldset>\";\r\n\t// format complet : [[label->qq chose]]\r\n\treturn \"<fieldset><legend>$matches[1]</legend><div>$matches[2]</div></fieldset>\";\r\n}", "title": "" }, { "docid": "ea55386dea7af6192eef7492e62dffcd", "score": "0.4964756", "text": "public static function defaultSelectionLabel(): string\n {\n return Craft::t('app', 'Choose');\n }", "title": "" }, { "docid": "a954fc69a30db1cd88bc2d38ac5f593f", "score": "0.49542746", "text": "function format_value_post_object($value, $_value, $post_id, $field){\n \n $value = acf_get_array($_value);\n $array = array();\n \n foreach($value as $p_id){\n \n $array[] = get_the_title($p_id);\n \n }\n \n return implode(', ', $array);\n \n }", "title": "" }, { "docid": "4c8079dca30a13f2ec340964462e233b", "score": "0.4953841", "text": "public function __toString(){\n // to show the name of the Category in the select\n return $this->Questions;\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "cb454033b1d6d53256cb42c840fc8bee", "score": "0.49474278", "text": "public function __toString()\n {\n // to show the name of the Category in the select\n return $this->name;\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "f5dd23c792833da7f9d551e4cec05b09", "score": "0.49439463", "text": "private function getOutputChoice()\n {\n $outputChoice = $this->in('Presented as html or text?', ['H', 'T'], 'T');\n return strtolower($outputChoice);\n }", "title": "" }, { "docid": "c7a86689b57457222ad0f2f32c207a70", "score": "0.49391788", "text": "public function __toString()\n {\n $arr = [];\n foreach ($this->items as $item) {\n if ($item instanceof Builder and !$item->isBuildable()){\n continue;\n }\n $arr[] = $this->parse($item);\n }\n return implode($this->glue, $arr);\n }", "title": "" }, { "docid": "51c9a448f748094aa68040c4a9e80434", "score": "0.4932076", "text": "function getOutputLabel($key,$sheet,$field)\t{\n\t\t$dataF = nl2br(trim(strip_tags($this->pi_getFFvalue($this->cObj->data['pi_flexform'],$field,$sheet),'<b><i><a>')));\t\t// The possible entities from the flexform should theoretically be htmlspecialchars()'ed for XHTML compatibility - but this was not easy to just fix since SOME HTML should be allowed! Further, allowing HTML with strip_tags does not prevent wrong attributes and mixing of character case!\n\t\treturn $dataF ? $dataF : nl2br(trim($this->pi_getLL('oLabel_'.$key,'',1)));\n\t}", "title": "" }, { "docid": "32d13781f526fb279f254371b8c1727a", "score": "0.49310267", "text": "public function __toString()\n {\n $terms = $this->getValue();\n\n if (is_array($terms)) {\n return array_reduce($terms, function ($string, $t) {\n return $string . (strlen($string) ? ', ' : '') . $t->getName();\n }, '');\n } else {\n return $terms->getName();\n }\n }", "title": "" }, { "docid": "1def24fc48469e56b635eaf2e1b9544f", "score": "0.4929664", "text": "function acf_get_field_label( $field, $context = '' ) {\n}", "title": "" }, { "docid": "a78b3cdc11954c0d43239f7560da36ab", "score": "0.49219936", "text": "public function getInputLabel()\r\n {\r\n $label = $this->getFilterLabel();\r\n\r\n if ($this->getFilterGroup() && $this->getFilterGroup() != \\Filter\\Text::GROUP_MAIN)\r\n {\r\n $label = $this->getFilterGroup() . ' - ' . $label;\r\n }\r\n\r\n return new \\View\\Label(NULL, $this->getValueName() . '[]', $label, 'filterLabel');\r\n }", "title": "" }, { "docid": "ece28db36e036066949cebf0d445c2c6", "score": "0.49078032", "text": "public function __toString(){\n // to show the name of the Category in the select\n return $this->name;\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "8e4ef000180af46a1e1991ef9f013994", "score": "0.49067995", "text": "function Field() {\n\t\t$options = '';\n\t\t$odd = 0;\n\t\t$source = $this->getSource();\n\t\tforeach($source as $key => $value) {\n\t\t\t$itemID = $this->id() . \"_\" . ereg_replace('[^a-zA-Z0-9]+','',$key);\n\t\t\n\t\t\tif($key == $this->value/* || $useValue */) {\n\t\t\t\t$useValue = false;\n\t\t\t\t$checked = \" checked=\\\"checked\\\"\";\n\t\t\t} else {\n\t\t\t\t$checked=\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$odd = ($odd + 1) % 2;\n\t\t\t$extraClass = $odd ? \"odd\" : \"even\";\n\t\t\t$extraClass .= \" val\" . preg_replace('/[^a-zA-Z0-9\\-\\_]/','_', $key);\n\t\t\t$disabled = ($this->disabled || in_array($key, $this->disabledItems)) ? 'disabled=\"disabled\"' : '';\n\t\t\t\n\t\t\t$options .= \"<li class=\\\"\".$extraClass.\"\\\"><input id=\\\"$itemID\\\" name=\\\"$this->name\\\" type=\\\"radio\\\" value=\\\"$key\\\"$checked $disabled class=\\\"radio\\\" /> <label for=\\\"$itemID\\\">$value</label></li>\\n\";\n\t\t}\n\t\t$id = $this->id();\n\t\treturn \"<ul id=\\\"$id\\\" class=\\\"optionset {$this->extraClass()}\\\">\\n$options</ul>\\n\";\n\t}", "title": "" }, { "docid": "b127060ddfcdf7ac03db246ed3bb9fdd", "score": "0.49059877", "text": "public function __toString()\n\t{\n\t\treturn $this->getText();\n\t}", "title": "" }, { "docid": "af8760239bc88a1b8efb696d84ea203c", "score": "0.49042717", "text": "private function opt_in_text() {\n\t\treturn WP_Job_Manager_Usage_Tracking::get_instance()->opt_in_checkbox_text();\n\t}", "title": "" }, { "docid": "4114a0de5454b624a08eca2b62dc0583", "score": "0.49025005", "text": "public function getActionTextAttribute() {\n //if ($this->attributes['action']) {\n $action = \\Lang::has('accounts::lead.data.action.' . $this->attributes['action']) ? \\Lang::get('accounts::lead.data.action.' . $this->attributes['action']) : '';\n // } else {\n return $action . '<br>' . \\Form::compositeSelect('action', \\Lang::get('accounts::lead.data.action'), $this->attributes['action'], array('class' => 'leadAction', 'data-id' => $this->attributes['id']));\n // }\n }", "title": "" }, { "docid": "bbe28d8e6f48413c0170a38330d7c2e3", "score": "0.48915756", "text": "function _labelText($text) {\n\t\tif (strpos($text, '.') !== false) {\n\t\t\t$text = array_pop(explode('.', $text));\n\t\t} else {\n\t\t\t$text = $text;\n\t\t}\n\t\tif (substr($text, -3) == '_id') {\n\t\t\t$text = substr($text, 0, strlen($text) - 3);\n\t\t}\n\t\t$text = __(Inflector::humanize(Inflector::underscore($text)), true);\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "d5edefa984a00cd4ce97c51060e3f463", "score": "0.48890892", "text": "public function toString($item)\n {\n return $item->getNom();\n }", "title": "" }, { "docid": "c34076e90d61312c454e578a98a70cc7", "score": "0.4881257", "text": "function toText()\n {\n $text = '';\n foreach($this->childs as $c)\n {\n if(is_object($c))\n {\n $text.= $c->toString();\n }\n else\n {\n $text.= $c;\n }\n }\n return $text;\n }", "title": "" }, { "docid": "116aa38ef2aaae369d6dfa3fe13a799f", "score": "0.4855181", "text": "public function getLabel()\n {\n return Form::label($this->originalFieldName, $this->decorate->label);\n }", "title": "" }, { "docid": "6ee38bd2dc5ead31acb4c8143c7f8f52", "score": "0.48542458", "text": "function acf_get_choice_from_term( $term, $format = 'term_id' ) {\n}", "title": "" }, { "docid": "98884a357e5b307d95df85dca8072a4d", "score": "0.48405176", "text": "public function label() { return $this->label; }", "title": "" }, { "docid": "261c7e383709091eedcad142e17c22dd", "score": "0.48398283", "text": "protected function _getLabel() {\n\t\tif (!empty($this->label)) {\n\t\t\t$label = $this->label;\n\t\t}\n\t\telse {\n\t\t\t$modelName = get_class($this);\n\n\t\t\t// in case something went wrong\n\t\t\tif ($modelName == 'AppModel') {\n\t\t\t\treturn getEmptyValue(false);\n\t\t\t}\n\n\t\t\t$label = Inflector::humanize(Inflector::tableize($modelName));\n\t\t}\n\n\t\treturn $label;\n\t}", "title": "" }, { "docid": "415d9f5df10bf36b3d2ff7dd11a65ac8", "score": "0.48397067", "text": "public function optionLabel($row): string\n {\n return (string) $row->title;\n }", "title": "" }, { "docid": "d52ae3e0033add179a6dbf4a7739a615", "score": "0.48337102", "text": "public function get_label(){ return $this->label; }", "title": "" }, { "docid": "0406e71fe7732f45ceb39a0f7b88a09b", "score": "0.48318592", "text": "function acf_render_field_label( $field ) {\n}", "title": "" }, { "docid": "ecb2b5e62867653c55977f60e68e0309", "score": "0.48187333", "text": "private function _buildLabel() {\n $href = $this->getOption('href');\n //------------------------\n $element = $this->getElement();\n $label = $element->getLabel();\n $label = '<a href=\"'. $href .'\" id=\"' . $this->getElement()->getName() . '_label\">' . $label . '</a>';\n return $label;\n }", "title": "" }, { "docid": "883ec1683b42136901994463a823074b", "score": "0.4808625", "text": "public function __toString(){\n return (string)\"region\".$this->id;\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "0542bc9b049e2320ca093514f3c34425", "score": "0.47993058", "text": "public function getLabel() {\n if ($this->sourceEntity) {\n return $this->sourceEntity->label();\n }\n elseif ($this->webform->label()) {\n return $this->webform->label();\n }\n else {\n return '';\n }\n }", "title": "" }, { "docid": "c2674266c1f5f7bb5bb952e0dcf72fdc", "score": "0.47825995", "text": "public function __toString()\n {\n return $this->toSentence()->getValue();\n }", "title": "" }, { "docid": "8fb05852e4b9d3e7e0c03a07a989f84c", "score": "0.47797173", "text": "static function get_option_label( &$value, $index, $field )\n\t\t{\n\t\t\t$value = sprintf(\n\t\t\t\t'<a href=\"%s\" title=\"%s\">%s</a>',\n\t\t\t\tesc_url( get_term_link( $value ) ),\n\t\t\t\tesc_attr( $value->name ),\n\t\t\t\t$value->name\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "e20fdbdbb352edff13be0d869935bc0f", "score": "0.47674957", "text": "public function __toString(){\n return $this->region;\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "dd6400e0b92c9e97d25da4bee00ba384", "score": "0.47668737", "text": "public function __toString(){\n// return $this->name;\n // to show the id of the Category in the select\n return $this->id;\n }", "title": "" }, { "docid": "ade0d2ba000e80c728fe31d900c3619c", "score": "0.47649628", "text": "public function toText($value);", "title": "" }, { "docid": "dd20e280a39c0a6d492deb165c0cd8f6", "score": "0.47628936", "text": "public function __toString() {\n $l = $this->rel( \"rdfs:label\" );\n if($l) return (string) $l;\n return (string) $this->uri;\n }", "title": "" }, { "docid": "f28105b2519346bf06a3708174763b6f", "score": "0.47596294", "text": "function render(){\r\n $ret = \"\";\r\n foreach ( $this->getOptions() as $value => $name ) {\r\n $ret .= \"<input type='radio' name='\".$this->getName().\"' id='\".$this->getName().$value.\"' value='\".$value.\"'\";\r\n $selected = $this->getValue();\r\n if ( isset($selected) && ($value == $selected) ) {\r\n $ret .= \" checked='checked'\";\r\n }\r\n $ret .= $this->getExtra().\" />\".$name.\"\\n\";\r\n }\r\n return $ret;\r\n }", "title": "" }, { "docid": "381e529b099825a112251cadd9ab9f1a", "score": "0.47574937", "text": "function poll_choice_result_rendered($choice)\r\n{\r\n do_tp_action(\"tp_render_{$choice->type}_choice_result\", $choice);\r\n}", "title": "" }, { "docid": "59fdde4859b79443da9af98e05882105", "score": "0.47546574", "text": "protected function makeLabel(){\n\t\t// If no label use the name\n\t\tif (trim($this->label) == '')\n\t\t $this->label = ucfirst(str_replace('_',' ',$this->name));\n\t\t\n\t\t// Remove any \":\" from the label\n\t\tif (substr($this->label,-1) == ':')\n\t\t $this->label = substr($this->label,0,-1);\n\t\t \n\t\t// If this is a question or period leave it\n\t\tif (substr(strip_tags($this->label),-1) == '?' || substr(strip_tags($this->label),-1) == '.')\n\t\t return $this->label;\n\t\t\n\t\treturn $this->label;\n\t}", "title": "" }, { "docid": "cac46fda47f4b2164ba5283ac714eef8", "score": "0.47475845", "text": "public function getOptgroupLabel();", "title": "" }, { "docid": "5a6f1c27528903b435a305031635a565", "score": "0.47470742", "text": "private function _formatLabelByRecordElement($label) : string {\n if(is_array($label)) {\n return implode(', ', $label);\n }\n return trim($label);\n }", "title": "" }, { "docid": "e7bf4638055ad67d0b44629381904a39", "score": "0.47349042", "text": "public function __toString(){\n // to show the name of the Category in the select\n return $this->name;\n // to show the id of the Category in the select\n // return $this->id;\n }", "title": "" }, { "docid": "738a102333190f450b4176779c74d935", "score": "0.47347778", "text": "abstract protected function getOptionsSettingsLabel();", "title": "" }, { "docid": "aa182bf6f267506ef54c7da3b4b52e61", "score": "0.47341198", "text": "function create_selection($selection,$flag)\n{\n\treturn \"<tr><td align='right'><label for='\".clean_id_string($selection).\"'>\".get_lang($selection).\":</label></td>\n\t\t<td align='left'><input id='\".clean_id_string($selection).\"' type='checkbox' name='\".$selection.\"' value='1' checked='checked' /></td></tr><tr>\n\t\t<td align='left' class='info' colspan='2'>\".get_lang($selection.'_info').\"</td></tr>\";\n}", "title": "" }, { "docid": "921082e095391ca2c2eed12e4a208fb7", "score": "0.47316518", "text": "public function getString()\n {\n $default = $this->getSetting('default');\n $multi = $this->getAttribute('multiple', null) ? '[]' : '';\n $this->setAttribute('name', $this->getNameAttributeString() . $multi);\n $option = $this->getValue();\n $option = ! is_null($option) ? $option : $default;\n $generator = new Generator();\n $generator->newElement( 'select', $this->getAttributes() );\n\n if($option instanceof Collection) {\n $option = $option->pluck('id')->toArray();\n }\n\n foreach ($this->options as $key => $value) {\n if( is_array($value) ) {\n $optgroup = new Generator();\n $optgroup->newElement( 'optgroup', ['label' => $key] );\n foreach($value as $k => $v) {\n $attr['value'] = htmlentities($v);\n $this->setSelected($option, $v, $attr);\n $optgroup->appendInside( 'option', $attr, (string) $k );\n }\n $generator->appendInside( $optgroup );\n } else {\n $attr['value'] = htmlentities($value);\n $this->setSelected($option, $value, $attr);\n $generator->appendInside( 'option', $attr, (string) $key );\n }\n }\n return $generator->getString();\n }", "title": "" }, { "docid": "2a226aa55b3add5ec91fedf22951a443", "score": "0.4730988", "text": "public function getLabel()\n {\n $label = $this->_getValue('label');\n return is_string($label) && strlen($label) ? $label : (string) $this->getId();\n }", "title": "" }, { "docid": "73cd92a903e92cbab93876f4f22b1887", "score": "0.47301403", "text": "public function getTxtVal()\n {\n return ($this->item_value == 1) ? trans('fields.yes') : trans('fields.no');\n }", "title": "" }, { "docid": "ecca132b4ce998b7f6635e5068d13c5b", "score": "0.4722121", "text": "public function __toString()\n {\n return self::text($this);\n }", "title": "" }, { "docid": "3d86577920231b2fdca48303cdeaddf0", "score": "0.47110984", "text": "public function ListItem_Text() {\n\treturn $this->Description_forList();\n }", "title": "" }, { "docid": "1ecd977fa456b72b72fe6f43d72ade59", "score": "0.47011194", "text": "public function __toString() {\n\t\t$what = [$this->format];\n\t\tif ($this->subtype) {$what[] = $this->subtype;}\n\t\tif ($this->detail) {$what[] = $this->detail;}\n\t\t$ret = implode('.',$what);\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "487332db45470d6774295d64cb54f8d6", "score": "0.47005805", "text": "public function getLabel(){\n return \"$this->penulis, $this->penerbit\";\n }", "title": "" }, { "docid": "c87d445a8b3589e037af9d01571ed229", "score": "0.46845332", "text": "public function format_select();", "title": "" }, { "docid": "e8dcabf3ea0b54325c70ced3089508f6", "score": "0.46824723", "text": "public function __toString()\n {\n return (string) $this->getTitle();\n }", "title": "" }, { "docid": "e8dcabf3ea0b54325c70ced3089508f6", "score": "0.46824723", "text": "public function __toString()\n {\n return (string) $this->getTitle();\n }", "title": "" }, { "docid": "0d4448ff9bef5b2ecfdbeaddf6e934cb", "score": "0.46818295", "text": "public function str() {\n $string = '';\n foreach ($this->select as $sel) {\n if ('loc' == $sel)\n $string .= \"$this->loc\\n\";\n elseif ('comments' == $sel)\n $string .= \"$this->comments\\n\";\n elseif ('labels' == $sel)\n $string .= \"$this->labels\\n\";\n elseif ('jumps' == $sel)\n $string .= \"$this->jumps\\n\";\n }\n return $string;\n }", "title": "" }, { "docid": "b076aba590612d1d4fc4fa4b634a52f5", "score": "0.4676161", "text": "public function\t\ttoStringInfo(){ return $this->m_info->toString(); }", "title": "" }, { "docid": "cd26c3cf88e83585fbfbaa02797b3da9", "score": "0.46633917", "text": "public function label() {\n if (!$label = $this->get('label')) {\n $label = $this->id();\n }\n return $label;\n }", "title": "" }, { "docid": "b0d121f98bfb1b1928356202dfde61cc", "score": "0.46607584", "text": "public function getLabel(): string;", "title": "" }, { "docid": "b0d121f98bfb1b1928356202dfde61cc", "score": "0.46607584", "text": "public function getLabel(): string;", "title": "" }, { "docid": "b0d121f98bfb1b1928356202dfde61cc", "score": "0.46607584", "text": "public function getLabel(): string;", "title": "" }, { "docid": "8f4924b09837b5eccbac17d98bd0d69e", "score": "0.46602196", "text": "private function obter_formato($tipo_regiao)\n\t{\n\t\tswitch ($tipo_regiao)\n\t\t{\n\t\t\tcase 'rect':\n\t\t\t\treturn 'retângulo';\n\t\t\tcase 'poly':\n\t\t\t\treturn 'polígono';\n\t\t\tcase 'circle':\n\t\t\t\treturn 'círculo';\n\t\t}\n\t}", "title": "" } ]
3ee314a249a4bea3d561779e03e1c50c
Call uninstall parent method
[ { "docid": "50fdc4d6f2ef2deededc2faefe715fa7", "score": "0.68661255", "text": "public function uninstall()\n {\n return parent::uninstall() &&\n $this->uninstallBD() &&\n $this->removeAdminTab();\n }", "title": "" } ]
[ { "docid": "52d8389aee7914aaaf9ab740fe6c9679", "score": "0.84198064", "text": "function uninstall() {\n parent::uninstall();\n }", "title": "" }, { "docid": "99f86f038b7a3d2d3ca765969a309003", "score": "0.8368429", "text": "public function uninstall() {\n\n\t}", "title": "" }, { "docid": "5f658c01ffa26a3922614fc7b60dd622", "score": "0.8367387", "text": "public function uninstall() {\n // ...\n }", "title": "" }, { "docid": "882495b825b89bb9684388119fdc6adb", "score": "0.8341839", "text": "public function uninstall() {\n }", "title": "" }, { "docid": "7413e1200b24265336b0d3de7e6c5e96", "score": "0.832468", "text": "public function uninstall()\n\t{\n\t}", "title": "" }, { "docid": "98599077974fe0f5225c1b6a929ecf3f", "score": "0.8265556", "text": "public function uninstall()\n\t{\n\t $pkg = parent::uninstall();\n\t}", "title": "" }, { "docid": "ccc60be6dc823cec20800107d4893e5d", "score": "0.8239627", "text": "public static function uninstall() : void;", "title": "" }, { "docid": "fe89ae1715ecc092dca0573fc2b6763b", "score": "0.8223709", "text": "public static function uninstall() {\n\n }", "title": "" }, { "docid": "403c54c96743990c6bc7bd62f31b8aca", "score": "0.81868327", "text": "public static function uninstall() {\n\t}", "title": "" }, { "docid": "0c05ab2e507e13073139412f67f37847", "score": "0.81145257", "text": "public static function uninstall()\n\t{\n\t}", "title": "" }, { "docid": "5505b68b6e99c2cde2160a075a988131", "score": "0.80546093", "text": "public static function uninstall ()\n\t{\n\t}", "title": "" }, { "docid": "acb1d0493cea8923435e944245c12577", "score": "0.7938933", "text": "public function uninstall() {\n\t\t// TODO method stub\n\t}", "title": "" }, { "docid": "99bd823435c16984bfc976cfc1208b1f", "score": "0.7936064", "text": "public function uninstall($parent) {\n \n }", "title": "" }, { "docid": "47a01cd1e79d6d8208e84db955f86c0a", "score": "0.7911836", "text": "function uninstall($parent) \n {\n }", "title": "" }, { "docid": "6c8ab05aeeb9612e37722de8de24534d", "score": "0.78968614", "text": "function uninstall()\r\n\t{\r\n\t}", "title": "" }, { "docid": "23d34345658d06887c388c30eed14e52", "score": "0.78785026", "text": "function uninstall($parent)\n\t{\n\t\t// $parent is the class calling this method\n\t}", "title": "" }, { "docid": "c67c63abcb1aa17e4a570c9cf914c998", "score": "0.7863374", "text": "function uninstall () {\n\n }", "title": "" }, { "docid": "ad84aadf8a494f72d478dfa9c4e4b513", "score": "0.7849579", "text": "static function uninstall() {\n\t}", "title": "" }, { "docid": "58ddde5590f1e56c15bf94e4e7d9591a", "score": "0.7766329", "text": "protected function afterUninstall()\n {\n }", "title": "" }, { "docid": "847d1014a20f7e12d73cee91badaec5a", "score": "0.7720756", "text": "function uninstall($parent)\n\t{\n\t}", "title": "" }, { "docid": "c291c60af7d6e1b9131c8a86b36d01fc", "score": "0.76421994", "text": "function uninstall($parent) \n {\n // $parent is the class calling this method\n // echo '<p>' . JText::_('COM_HELLOWORLD_UNINSTALL_TEXT') . '</p>';\n // echo '<p>Uninstall successful</p>';\n }", "title": "" }, { "docid": "02070996d527679e86f6436124d137de", "score": "0.757973", "text": "function onUninstall()\n\t{\n\t\treturn;\n\t}", "title": "" }, { "docid": "0316277981e82e88ec2fa42cc2ec871e", "score": "0.75600433", "text": "function uninstall() {\r\n\t\t\r\n\t\treturn;\r\n\t}", "title": "" }, { "docid": "01e72c917f5594604679f0ad1ebd98f3", "score": "0.7540111", "text": "function on_uninstall ()\n{\n}", "title": "" }, { "docid": "670744a040a68f9dc65727823f342eb8", "score": "0.7500886", "text": "public function uninstall($parent)\r\n\t{\r\n\t}", "title": "" }, { "docid": "6e3153476752cedb94e3cdea56c217e9", "score": "0.74836594", "text": "public function uninstall($parent)\n\t{\n\t}", "title": "" }, { "docid": "55d7f42335b08c254c2672a360a64650", "score": "0.74150836", "text": "public static function uninstall()\n {\n self::cleanup();\n }", "title": "" }, { "docid": "12e8078c5e15a92a7f8a6c93c50210d2", "score": "0.73931617", "text": "public function uninstall(... $args)\n {\n\n }", "title": "" }, { "docid": "21cf7a1449a30ac91ba3ab5ca969acd3", "score": "0.7328111", "text": "public function uninstall()\n\t{\n\t\tif ($this->isUninstalled())\n\t\t{\n\t\t\tthrow new \\RuntimeException(\"Cannot enable Extension [{$this->slug}] as it is not installed.\");\n\t\t}\n\n\t\t$this->fireEvent('uninstalling');\n\n\t\t$this->resetMigrations();\n\n\t\t$this->databaseDelete();\n\n\t\t$this->fireEvent('uninstalled');\n\t}", "title": "" }, { "docid": "13f11ddee474ef61538b7a4002b71cd3", "score": "0.7311963", "text": "function uninstall($parent) \n\t{\n\t\techo JText::_('TPL_BOOTSTRAP4_UNINSTALL');\n\t}", "title": "" }, { "docid": "45b7916974147d77604e5495306e6831", "score": "0.72927314", "text": "function uninstall()\r\n {\r\n unsubscribeFromEvent($this->name, 'SAY');\r\n unsubscribeFromEvent($this->name, 'SAYTO');\r\n unsubscribeFromEvent($this->name, 'ASK');\r\n unsubscribeFromEvent($this->name, 'SAYREPLY');\r\n parent::uninstall();\r\n }", "title": "" }, { "docid": "7c40fb0a397a0401f94fbf3721052f66", "score": "0.72751945", "text": "function uninstall($parent)\n {\n // $parent is the class calling this method\n echo '<p>' . JText::_('COM_JBACKEND_UNINSTALL_TEXT') . '</p>';\n }", "title": "" }, { "docid": "a7739a652ec7c98ae89c4874570179f2", "score": "0.72570765", "text": "public function uninstall() {\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "8da8e6a74b874916841dc5652a263755", "score": "0.71832997", "text": "public function uninstall() {\n\t\tparent::uninstall();\n\t\t\n\t\t$clovNavigationStack = Stack::getByName('Clov Navigation');\n\t\tif($clovNavigationStack) {\n\t\t\t$clovNavigationStack->delete();\n\t\t}\n\t\t\n\t\t$db = Loader::db();\n\t\t\n\t\t// Clean up tables added by the package's db.xml.\n\t\t$db->Execute('drop table if exists atUserSettings');\n\t\t$db->Execute('drop table if exists PermissionAccessEntityUserAttributes');\n\t\t\n\t\tCache::flush();\n\t\t\n\t\tLog::addEntry(t('Clov package uninstalled successfully.'), 'clov');\n\t}", "title": "" }, { "docid": "6dcd16315b4481b13a9fdcc8c670dca5", "score": "0.71774256", "text": "function duplicator_deactivate() \n\t{\n //Logic has been added to uninstall.php\n }", "title": "" }, { "docid": "f5ca50ca7a5ad90aad40bd4a49be9557", "score": "0.7159588", "text": "private function com_uninstall()\n\t{\n\t}", "title": "" }, { "docid": "696177c5f7193f01f3eaec55ac7524f2", "score": "0.71418095", "text": "protected function _postUninstall(){\n\t\treturn true;\n\t}", "title": "" }, { "docid": "3b8b5fdb8182255a055c52b9340636bc", "score": "0.70816094", "text": "function uninstall()\n {\n return true;\n }", "title": "" }, { "docid": "763cb5a5d49b693e8abf56144dd4fa23", "score": "0.7050404", "text": "public function uninstall()\n {\n return true;\n }", "title": "" }, { "docid": "7118a5070e32e7e42c6d682dd8e9f251", "score": "0.7041264", "text": "static function uninstall() {\r\n do_action( 'ggpr_uninstall' );\t\r\n }", "title": "" }, { "docid": "277e8a2d2ff7e3b2dc7cc2136a2a2564", "score": "0.7032505", "text": "public static function uninstall()\r\r\n {\r\r\n return true;\r\r\n }", "title": "" }, { "docid": "85b7edaf538264ab9d861703dab26030", "score": "0.6997115", "text": "function uninstall($parent) \n {\n \techo '<p>' .JText::_('COM_EXTPORTER_UNINSTALL_TEXT') . '</p>';\n }", "title": "" }, { "docid": "b78f2d7e5a35a418457600ab5bfe4c16", "score": "0.69818604", "text": "public function uninstall()\n {\n return parent::uninstall()\n && $this->uninstallTab()\n && $this->uninstallHooks()\n && $this->uninstallDb();\n }", "title": "" }, { "docid": "73d603e94fd17b4e58bfc88d4dbfd521", "score": "0.6978727", "text": "public function uninstall()\r\r {\r\r return parent::uninstall()\r\r && $this->unregisterHook('displayHome')\r\r && $this->unregisterHook('actionShopDataDuplication')\r\r && $this->_deleteTables()\r\r && $this->_deleteConfigs()\r\r && $this->_deleteTab();\r\r }", "title": "" }, { "docid": "c719b8156f7b180c350486b4b738531d", "score": "0.6881261", "text": "function uninstall()\n {\n\n echo '<br>' . date('H:i:s') . \" Uninstall module {$this->name}.<br>\";\n\n // Остановим цикл модуля.\n echo date('H:i:s') . \" Stopping cycle cycle_{$this->name}.php.<br>\";\n setGlobal(\"cycle_{$this->name}Control\", 'stop');\n // Нужна пауза, чтобы главный цикл обработал запрос.\n $i = 0;\n while ($i < 6) {\n echo '.';\n $i++;\n sleep(1);\n }\n\n // Удалим слинкованные свойства объектов у метрик каждого ТВ.\n echo '<br>' . date('H:i:s') . ' Delete linked properties.<br>';\n $devices = SQLSelect(\"SELECT * FROM miio_devices\");\n if (!empty($devices)) {\n foreach ($devices as $device) {\n $this->DeleteLinkedProperties($device['ID']);\n }\n }\n\n // Удаляем таблицы модуля из БД.\n echo date('H:i:s') . ' Delete DB tables.<br>';\n SQLExec('DROP TABLE IF EXISTS miio_devices');\n SQLExec('DROP TABLE IF EXISTS miio_commands');\n SQLExec('DROP TABLE IF EXISTS miio_queue');\n\n // Удаляем служебные свойства контроля состояния цикла у объекта ThisComputer.\n echo date('H:i:s') . ' Delete cycles properties.<br>';\n $this->DeleteCycleProperties();\n\n // Удаляем модуль с помощью \"родительской\" функции ядра.\n echo date('H:i:s') . ' Delete files and remove frome system.<br>';\n parent::uninstall();\n }", "title": "" }, { "docid": "28012a2d6a2c24d3ce5c1fe9b8222a82", "score": "0.6880138", "text": "public function uninstall(){\n\n if (!parent::uninstall())\n return false;\n\n\n // Execute module install SQL statements\n /*if($this->sqlFileUinstall){\n if (!$this->loadSQLFile($this->sqlFileUinstall))\n return false;\n }*/\n\n\n // Uninstall admin tab\n /*if(!empty($this->tabs)){\n foreach ($this->tabs as $tab){\n // Install admin tab\n if (!$this->uninstallTab($tab['className']))\n return false;\n }\n }*/\n\n // All went well!\n return true;\n }", "title": "" }, { "docid": "6f35eb9514b771433f1a34d557b02fef", "score": "0.6849138", "text": "function uninstall() {\r\n SQLDropTable('methods');\r\n parent::uninstall();\r\n }", "title": "" }, { "docid": "f33c9fd888777936269175daa98be0fd", "score": "0.684186", "text": "public function uninstall()\n\t{\n\t\treturn parent::uninstall() && $this->uninstallTab();\n\t}", "title": "" }, { "docid": "fd70b95a3e6cefa5c31c8e3ea0a263c3", "score": "0.6838603", "text": "public function uninstall()\n\t{\n\t\tif ($this->addons_m->uninstall())\n\t\t{\n\t\t\t$this->session->set_flashdata('success', sprintf(lang('site.uninstall_success'), $this->slug));\n\n\t\t\tredirect('sites/addons/index/'.$this->ref);\n\t\t}\n\n\t\t$this->session->set_flashdata('error', sprintf(lang('site.uninstall_error'), $this->slug));\n\t\tredirect('sites/addons/index/'.$this->ref);\n\t}", "title": "" }, { "docid": "909bc9870084405d3b38b01855c25884", "score": "0.68255186", "text": "public function uninstall()\r\n {\r\n $this->setup();\r\n //$this->db->query(\"DROP TABLE IF EXISTS `\" . DB_PREFIX . \"orders_myparcel`;\");\r\n $this->model_extension_myparcelnl_init->uninstallMyParcelTotal();\r\n $this->model_extension_myparcelnl_init->uninstallMyParcelShipping();\r\n $this->load->model('setting/event');\r\n $code = 'module_myparcelnl';\r\n $this->model_setting_event->deleteEventByCode( $code );\r\n MyParcel()->helper->uninstall_ocmod();\r\n }", "title": "" }, { "docid": "8b64864ca6a2436bf61ac39260783d0d", "score": "0.680338", "text": "public function uninstall($parent)\n\t{\n\t\t// Uninstall extensions\n\t\t$this->com_uninstall();\n\n\t\tparent::uninstall($parent);\n\t}", "title": "" }, { "docid": "778d7f923fdd5e2bce97b3aaf6749f56", "score": "0.6730544", "text": "public function uninstall($parent) {\n\t\tif($this->componentName) {\n\t\t\tDH::uninstall($parent);\n\t\t}\n\t}", "title": "" }, { "docid": "02f16a477fd03ff87789cd948c1182f8", "score": "0.67045766", "text": "public function uninstall() {\n\t\tuninstallModule( $this->prefix );\n\n\t\t// Remove Menus\n\t\tremoveMenuItemsByPrefix( $this->prefix );\n\t}", "title": "" }, { "docid": "8162cd1c0bc586f1baad39044bb076a7", "score": "0.6689732", "text": "public function can_uninstall()\n {\n return true;\n }", "title": "" }, { "docid": "cd4c13f625482808e8d62a0fd7914f00", "score": "0.6680788", "text": "public static function uninstall($packName) {\r\n \r\n }", "title": "" }, { "docid": "c79b06f61a81a23c98822bba9fac4072", "score": "0.6680383", "text": "public function onUnInstall()\n {\n return true;\n }", "title": "" }, { "docid": "ddf94ebddc2b41a60b5442ff69968476", "score": "0.6673433", "text": "public function onBeforeUninstall()\n {\n return true;\n }", "title": "" }, { "docid": "50547d1eef9d7f294a6dcd245394c475", "score": "0.6669353", "text": "public function uninstall()\n {\n if (!parent::uninstall() ||\n !$this->unregisterHook('updateCarrier') ||\n !$this->unregisterHook('displayBeforeCarrier') ||\n !$this->unregisterHook('displayCarrierList') ||\n !$this->unregisterHook('actionCarrierProcess')\n )\n return false; \n \n \n // We delete the carriers we created earlier\n $Carrier1 = new Carrier((int)(Configuration::get('SCHOOL_CARRIER_ID')));\n \n //we choose another\n if (Configuration::get('PS_CARRIER_DEFAULT') == (int)($Carrier1->id))\n {\n global $cookie;\n $carriersD = Carrier::getCarriers($cookie->id_lang, true, false, false,\n NULL, PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE);\n \n foreach($carriersD as $carrierD)\n if ($carrierD['active'] AND !$carrierD['deleted']\n AND ($carrierD['name'] != $this->_config['name']))\n Configuration::updateValue('PS_CARRIER_DEFAULT',\n $carrierD['id_carrier']);\n }\n \n // Then we delete the carriers using variable delete\n // in order to keep the carrier history for orders placed with them\n \n $Carrier1->deleted = 1;\n \n if (!$Carrier1->update())\n return false;\n \n return true;;\n }", "title": "" }, { "docid": "252b5f5f668bfa17611efc080a7097e5", "score": "0.6665202", "text": "public function uninstall()\n {\n // Deletion not allowed\n return false;\n }", "title": "" }, { "docid": "d318799e1a8294608df974cb180d2fb9", "score": "0.6658415", "text": "function uninstallEntrypoint(EntryPoint $entryPoint);", "title": "" }, { "docid": "d559b1b2a4312680ab3745a0712921fe", "score": "0.6656235", "text": "function uninstall( $args, $assoc_args = array() ) {\n\t\tself::run( 'plugin uninstall', $args, $assoc_args );\n\t}", "title": "" }, { "docid": "f2fd753faa7d231e887035da65077d77", "score": "0.6653353", "text": "function uninstall() {\n\t\t/** globalising of the needed variables, objects and arrays */\n\t\tglobal $db, $apcms;\n\t\t\n\t\t\n\t\t/** Make the uninstall here as you need it */\n\t\t\n\t\t\n\t\t$query = \"DROP TABLE `\".$apcms['mysql_prefix'].\"plugin_example`\";\n\t\t$db->unbuffered_query($query);\n\t\n\t}", "title": "" }, { "docid": "0c14a9f107b8c70896b7a28d49094b73", "score": "0.6627647", "text": "public function uninstall()\n {\n //$this->load->model('setting/setting');\n //$this->model_setting_setting->deleteSetting('module_omni_auth');\n }", "title": "" }, { "docid": "02e797fb751117b0c2a5856166be8c7e", "score": "0.6626591", "text": "function uninstall() {\n SQLExec('DROP TABLE IF EXISTS apiai_actions');\n parent::uninstall();\n }", "title": "" }, { "docid": "5b6e416b5568a7e98297511536554f9f", "score": "0.6621222", "text": "function uninstall()\n {\n\n // Deletion successful\n return true;\n }", "title": "" }, { "docid": "da43f3d5300812199bf9bceb90242150", "score": "0.65993226", "text": "public function uninstall()\n\t{\n $result = parent::uninstall()\n && CdcGtmOrderLog::deleteTable()\n && $this->unregisterHook('displayAfterTitle')\n && $this->unregisterHook('displayAfterBodyOpeningTag')\n && $this->unregisterHook('displayBeforeBodyClosingTag')\n && $this->unregisterHook('header')\n && $this->unregisterHook('actionObjectOrderDetailUpdateAfter')\n && $this->unregisterHook('backOfficeHeader')\n && $this->unregisterHook('updateOrderStatus')\n && $this->unregisterHook('displayOrderConfirmation')\n && $this->deleteTab(\"AdminCdcGoogletagmanagerOrders\")\n && $this->deleteConfiguration();\n\n // dynamic remarketing\n $result &= Configuration::deleteByName(self::getConfigName('REMARKETING_ENABLE'))\n && Configuration::deleteByName(self::getConfigName('REMARKETING_PRODUCTID'))\n && Configuration::deleteByName(self::getConfigName('REMARKETING_PRODUCTPREF'));\n\n // google customer reviews\n foreach ($this->greviews_config as $greviews_config_var) {\n $result &= Configuration::deleteByName(self::getConfigName($greviews_config_var));\n }\n\n return $result;\n\t}", "title": "" }, { "docid": "8c3532ac69ffec82d1480bb091e71bf8", "score": "0.65951383", "text": "function uninstall( $parent )\n\t{\n\t\t// Display fatal errors, warnings, notices\n\t\terror_reporting(E_ERROR || E_WARNING || E_NOTICE);\n\t\tini_set('display_errors',1);\n\n\t\t$app = JFactory::getApplication();\n\n\t\t// Extra CSS needed for J3.x+\n\t\techo FLEXI_J40GE\n\t\t\t? '<link type=\"text/css\" href=\"components/com_flexicontent/assets/css/j3x.css\" rel=\"stylesheet\">'\n\t\t\t: '<link type=\"text/css\" href=\"components/com_flexicontent/assets/css/j4x.css\" rel=\"stylesheet\">';\n\n\t\t// Installed component manifest file version\n\t\t$this->release = $parent->getManifest()->version;\n\t\techo '<div class=\"alert alert-info\" style=\"margin:32px 0px 8px 0px;\">' .'Uninstalling FLEXIcontent '.$this->release. '</div>';\n\n\t\t// init vars\n\t\t$error = false;\n\t\t$extensions = array();\n\t\t$db = JFactory::getDbo();\n\t\t$dbprefix = $app->getCfg('dbprefix');\n\t\t$dbname = $app->getCfg('db');\n\n\t\t// Uninstall additional flexicontent modules/plugins found in Joomla DB,\n\t\t// This code part (for uninstalling additional extensions) originates from Zoo J1.5 Component:\n\t\t// Original uninstall.php file\n\t\t// @package Zoo Component\n\t\t// @author YOOtheme http://www.yootheme.com\n\t\t// @copyright Copyright (C) 2007 - 2009 YOOtheme GmbH\n\t\t// @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only\n\t\t$manifest = isset($parent) ? $parent->getParent()->manifest : $this->manifest;\n\t\t$additional = $manifest->xpath('additional');\n\t\t$additional = count($additional) ? reset($additional) : NULL;\n\n\t\tif ( is_object($additional) && count( $additional->children() ) )\n\t\t{\n\t\t\t$exts = $additional->children();\n\t\t\tforeach ($exts as $ext)\n\t\t\t{\n\t\t\t\t// set query\n\t\t\t\tswitch ( $ext->getName() )\n\t\t\t\t{\n\t\t\t\t\tcase 'plugin':\n\t\t\t\t\t\tif( $ext->attributes()->instfolder )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$query = 'SELECT * FROM #__extensions'\n\t\t\t\t\t\t\t\t.' WHERE type='.$db->Quote($ext->getName())\n\t\t\t\t\t\t\t\t.' AND element='.$db->Quote( $ext->attributes()->name )\n\t\t\t\t\t\t\t\t.' AND folder='.$db->Quote( $ext->attributes()->instfolder )\n\t\t\t\t\t\t\t\t;\n\t\t\t\t\t\t\t// query extension id and client id\n\t\t\t\t\t\t\t$db->setQuery($query);\n\t\t\t\t\t\t\t$res = $db->loadObject();\n\n\t\t\t\t\t\t\t$res_id = (int)( @$res->extension_id );\n\t\t\t\t\t\t\t$extensions[] = array(\n\t\t\t\t\t\t\t\t'name' => strip_tags( $ext->asXml() ),\n\t\t\t\t\t\t\t\t'type' => $ext->getName(),\n\t\t\t\t\t\t\t\t'id' => $res_id,\n\t\t\t\t\t\t\t\t'client_id' => isset($res->client_id) ? $res->client_id : 0,\n\t\t\t\t\t\t\t\t'installer' => new JInstaller(),\n\t\t\t\t\t\t\t\t'status' => false\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'module':\n\t\t\t\t\t\t$query = 'SELECT * FROM #__extensions'\n\t\t\t\t\t\t\t.' WHERE type='.$db->Quote($ext->getName())\n\t\t\t\t\t\t\t.' AND element='.$db->Quote($ext->attributes()->name)\n\t\t\t\t\t\t\t;\n\t\t\t\t\t\t// query extension id and client id\n\t\t\t\t\t\t$db->setQuery($query);\n\t\t\t\t\t\t$res = $db->loadObject();\n\n\t\t\t\t\t\t$res_id = (int)( @$res->extension_id );\n\t\t\t\t\t\t$extensions[] = array(\n\t\t\t\t\t\t\t'name' => $ext->asXml(),\n\t\t\t\t\t\t\t'type' => $ext->getName(),\n\t\t\t\t\t\t\t'id' => $res_id,\n\t\t\t\t\t\t\t'client_id' => isset($res->client_id) ? $res->client_id : 0,\n\t\t\t\t\t\t\t'installer' => new JInstaller(),\n\t\t\t\t\t\t\t'status' => false);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// uninstall additional extensions\n\t\tfor ($i = 0; $i < count($extensions); $i++) {\n\t\t\t$extension =& $extensions[$i];\n\n\t\t\tif ($extension['id'] > 0 && $extension['installer']->uninstall($extension['type'], $extension['id'], $extension['client_id'])) {\n\t\t\t\t$extension['status'] = true;\n\t\t\t}\n\t\t}\n\n\t\t?>\n\t\t<div class=\"alert alert-warning\" style=\"margin:24px 0px 2px 0px; width: 300px;\"><?php echo JText::_('COM_FLEXICONTENT_ADDITIONAL_EXTENSIONS'); ?></div>\n\t\t<table class=\"adminlist\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th style=\"text-align:left; width:500px;\">\n\t\t\t\t\t\t<span class=\"label\"><?php echo JText::_('COM_FLEXICONTENT_EXTENSION'); ?></span>\n\t\t\t\t\t</th>\n\t\t\t\t\t<th style=\"text-align:left\">\n\t\t\t\t\t\t<span class=\"label\"><?php echo JText::_('COM_FLEXICONTENT_STATUS'); ?></span>\n\t\t\t\t\t</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tfoot>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"2\">&nbsp;</td>\n\t\t\t\t</tr>\n\t\t\t</tfoot>\n\t\t\t<tbody>\n\t\t\t\t<?php foreach ($extensions as $i => $ext) : ?>\n\t\t\t\t\t<tr class=\"row<?php echo ($i+1) % 2; ?>\">\n\t\t\t\t\t\t<td class=\"key\" style=\"font-size:11px;\">[<?php echo JText::_($ext['type']); ?>] <?php echo $ext['name']; ?></td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<?php $status_class = $ext['status'] ? 'badge bg-success badge-success' : 'badge badge-error'; ?>\n\t\t\t\t\t\t\t<span class=\"<?php echo $status_class; ?>\"><?php echo $ext['status'] ? JText::_('COM_FLEXICONTENT_UNINSTALLED') : JText::_('uninstall FAILED'); ?></span>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</tbody>\n\t\t</table>\n\n\t\t<br/>\n\t\t<table class=\"adminlist\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th style=\"text-align:left; width:500px;\">\n\t\t\t\t\t\t<span class=\"label\"><?php echo JText::_('COM_FLEXICONTENT_TASKS'); ?></span>\n\t\t\t\t\t</th>\n\t\t\t\t\t<th style=\"text-align:left\">\n\t\t\t\t\t\t<span class=\"label\"><?php echo JText::_('COM_FLEXICONTENT_STATUS'); ?></span>\n\t\t\t\t\t</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tfoot>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"2\">&nbsp;</td>\n\t\t\t\t</tr>\n\t\t\t</tfoot>\n\t\t\t<tbody>\n\n\t\t<?php\n\t\t// Alter com_flexicontent jcomments comments to be com_content comments\n\t\t?>\n\t\t\t\t<tr class=\"row0\">\n\t\t\t\t\t<td class=\"key\" style=\"font-size:11px;\">Restore jComments comment to be of com_content Type</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t$queries = array();\n\n\t\t\t\t\t\t$query = 'SHOW TABLES LIKE \"' . JFactory::getApplication()->getCfg('dbprefix') . 'jcomments\"';\n\t\t\t\t\t\t$db->setQuery($query);\n\t\t\t\t\t\t$jcomments_tbl_exists = (boolean) count($db->loadObjectList());\n\t\t\t\t\t\tif ($jcomments_tbl_exists) {\n\t\t\t\t\t\t\t$queries['jcomments'] = 'UPDATE #__jcomments AS j SET j.object_group=\"com_content\" WHERE j.object_group=\"com_flexicontent\" ';\n\t\t\t\t\t\t\t$queries['jcomments_objects'] = 'UPDATE #__jcomments_objects AS j SET j.object_group=\"com_content\" WHERE j.object_group=\"com_flexicontent\" ';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( !empty($queries) ) {\n\t\t\t\t\t\t\t$count_rows = 0;\n\t\t\t\t\t\t\tforeach ($queries as $tbl => $query) {\n\t\t\t\t\t\t\t\t$db->setQuery($query);\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t$db->execute();\n\t\t\t\t\t\t\t\t\tif ($tbl=='jcomments') $count_rows = (int)$db->getAffectedRows();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch (Exception $e) {\n\t\t\t\t\t\t\t\t\techo '<span class=\"badge badge-error\">SQL Error</span> '. $e->getMessage() . '<br/>';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( $count_rows ) {\n\t\t\t\t\t\t\t\techo '<span class=\"badge bg-success badge-success\">'.JText::_(\"Comments restored\").' ('.$count_rows.' effected rows)</span>';\n\t\t\t\t\t\t\t} else echo '<span class=\"badge bg-info badge-info\">restoring not needed</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse echo '<span class=\"badge bg-info badge-info\">jComments not installed, nothing to do</span>';\n\t\t\t\t\t\t?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t<?php\n\t\t// Restore com_content component asset, as asset parent_id, for the top-level 'com_content' categories\n\t\t?>\n\t\t\t\t<tr class=\"row1\">\n\t\t\t\t\t<td class=\"key\" style=\"font-size:11px;\">Restore com_content top-level category assets</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t$asset\t= JTable::getInstance('asset');\n\t\t\t\t\t\t$asset_loaded = $asset->loadByName('com_content'); // Try to load component asset for com_content\n\t\t\t\t\t\tif (!$asset_loaded) {\n\t\t\t\t\t\t\t$result = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$cc_asset\t= JTable::getInstance('asset');\n\t\t\t\t\t\t\t$query = 'SELECT s.id FROM #__assets AS s'\n\t\t\t\t\t\t\t\t.' JOIN #__categories AS c ON s.id=c.asset_id'\n\t\t\t\t\t\t\t\t.' WHERE c.parent_id=1 AND c.extension=\"com_content\"';\n\t\t\t\t\t\t\t$db->setQuery($query);\n\t\t\t\t\t\t\t$asset_ids = $db->loadColumn();\n\n\t\t\t\t\t\t\t$result = 2;\n\t\t\t\t\t\t\tforeach ($asset_ids as $asset_id)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//echo $asset_id.\" parent to -> \" .$asset->id .\"<br/>\";\n\t\t\t\t\t\t\t\t$cc_asset->load($asset_id);\n\t\t\t\t\t\t\t\t$cc_asset->parent_id = $asset->id;\n\t\t\t\t\t\t\t\t$cc_asset->lft = $asset->rgt;\n\t\t\t\t\t\t\t\t$cc_asset->setLocation($asset->id, 'last-child');\n\n\t\t\t\t\t\t\t\t// Save the category asset (create or update it)\n\t\t\t\t\t\t\t\tif (!$cc_asset->check() || !$cc_asset->store(false)) {\n\t\t\t\t\t\t\t\t\techo $cc_asset->getError();\n\t\t\t\t\t\t\t\t\techo \" Problem restoring asset with id: \".$cc_asset ->id;\n\t\t\t\t\t\t\t\t\t//echo \" Problem for category with id: \".$category->id. \"(\".$category->title.\")\";\n\t\t\t\t\t\t\t\t\t//echo $cc_asset->getError();\n\t\t\t\t\t\t\t\t\t$result = 1;\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\n\t\t\t\t\t\t$status_class = $result==2 ? 'badge bg-success badge-success' : 'badge badge-error';\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<span class=\"<?php echo $status_class; ?>\"><?php\n\t\t\t\t\t\tif ($result==2) {\n\t\t\t\t\t\t\techo JText::_(\"Assets restored\");\n\t\t\t\t\t\t} else if ($result==1) {\n\t\t\t\t\t\t\techo JText::_(\"Failed to restore some assets\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo JText::_(\"Failed to load asset for com_content.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?></span>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\n\n\t\t<?php\n\t\t// Drop search tables\n\t\t?>\n\t\t\t\t<tr class=\"row0\">\n\t\t\t\t\t<td class=\"key\" style=\"font-size:11px;\">Remove search tables</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t$tbl_prefix = $dbprefix.'flexicontent_advsearch_index_field_';\n\t\t\t\t\t\t$query = \"SELECT TABLE_NAME\n\t\t\t\t\t\t\tFROM INFORMATION_SCHEMA.TABLES\n\t\t\t\t\t\t\tWHERE TABLE_SCHEMA = '\".$dbname.\"' AND TABLE_NAME LIKE '\".$tbl_prefix.\"%'\n\t\t\t\t\t\t\t\";\n\t\t\t\t\t\t$db->setQuery($query);\n\t\t\t\t\t\t$tbl_names = $db->loadColumn();\n\n\t\t\t\t\t\t$count_removed = 0;\n\t\t\t\t\t\tif (count($tbl_names)) {\n\t\t\t\t\t\t\tforeach($tbl_names as $tbl_name) {\n\t\t\t\t\t\t\t\t$db->setQuery( 'DROP TABLE '.$tbl_name );\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t$db->execute();\n\t\t\t\t\t\t\t\t\t$count_removed++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch (Exception $e) {\n\t\t\t\t\t\t\t\t\techo '<span class=\"badge badge-error\">SQL Error</span> '. $e->getMessage() . '<br/>';\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo '<span class=\"badge bg-success badge-success\">table(s) removed: '.$count_removed.'</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse echo '<span class=\"badge bg-info badge-info\">nothing to do</span>';\n\t\t\t\t\t\t?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\n\t\t<?php\n\t\t// Remove template overrides, TODO make this more robust ...\n\t\t?>\n\t\t\t\t<tr class=\"row0\">\n\t\t\t\t\t<td class=\"key\" style=\"font-size:11px;\">Remove template overrides</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t// Get DEFAULT backend ('administrator') and frontend ('site') Joomla template names\n\t\t\t\t\t\t$admin_tmpl = $app->getTemplate();\n\t\t\t\t\t\t$site_tmpl = $db->setQuery('SELECT template FROM #__template_styles WHERE client_id = 0 AND home = 1')->loadResult();\n\n\t\t\t\t\t\t$tmpl_override_files = array(\n\t\t\t\t\t\t\tJPATH_ADMINISTRATOR . '/templates/' . $admin_tmpl . '/html/com_media/images/default_fc.php',\n\t\t\t\t\t\t\tJPATH_ADMINISTRATOR . '/templates/' . $admin_tmpl . '/html/com_media/imageslist/default_fc.php',\n\t\t\t\t\t\t\tJPATH_SITE . '/templates/' . $site_tmpl . '/html/com_media/images/default_fc.php',\n\t\t\t\t\t\t\tJPATH_SITE . '/templates/' . $site_tmpl . '/html/com_media/imageslist/default_fc.php',\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$count_removed = 0;\n\n\t\t\t\t\t\tif (!empty($tmpl_override_files))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach($tmpl_override_files as $file)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (JFile::exists($file))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (!JFile::delete($file))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\techo 'Cannot delete legacy file: ' . $file . '<br />';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse $count_removed++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo '<span class=\"badge bg-success badge-success\">template override(s) removed: ' . $count_removed . '</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse echo '<span class=\"badge bg-info badge-info\">nothing to do</span>';\n\t\t\t\t\t\t?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t</tbody>\n\t\t</table>\n\t\t\t<?php\n\t}", "title": "" }, { "docid": "1e62795935a6548bf7dc50c24bc56c99", "score": "0.65933394", "text": "public function uninstall()\n {\n // clear the hook since we might have an old one\n \\Hongyukeji\\Plugin\\Event::clear(get_class().'::uninstall.'.$this->getJsonConfig('name'));\n\n // execute the bootstrap to get the events instantiated\n $this->bootstrap();\n\n \\Hongyukeji\\Plugin\\Hook::forge(get_class().'::uninstall.'.$this->getJsonConfig('name'))\n ->setObject($this)\n ->execute();\n\n return $this;\n }", "title": "" }, { "docid": "d86501dd23baeead0ecaef3fd08dc367", "score": "0.65914434", "text": "public static function uninstall () {\n // xxx remove any settings from the registry\n }", "title": "" }, { "docid": "1e98d5f6fc48e71239a9a9b86354c8cd", "score": "0.65892285", "text": "public function onAfterUninstall()\n {\n return true;\n }", "title": "" }, { "docid": "637a767b7565cb8550b6602d1a38e89f", "score": "0.6557666", "text": "public function uninstall($parent)\n\t{\n\t\t// Uninstall extensions\n\t\t$this->uninstallLibraries($parent);\n\t\t$this->uninstallModules($parent);\n\t\t$this->uninstallPlugins($parent);\n\t\t$this->uninstallTemplates($parent);\n\t}", "title": "" }, { "docid": "20beba0211d6bae264ee45c3b95e90f1", "score": "0.65547365", "text": "public function hookUninstall()\n {\n delete_option('alt_text_data');\n }", "title": "" }, { "docid": "fbe4fc8ad71d13a7a98f540a8e99a366", "score": "0.6529296", "text": "protected function _preUninstall(){\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f26d73386080d8deefa4fea140dc5441", "score": "0.6521326", "text": "public function uninstall()\n {\n // clear the hook since we might have an old one\n \\Foolz\\Plugin\\Event::clear(get_class().'::uninstall.'.$this->getJsonConfig('name'));\n\n // execute the bootstrap to get the events instantiated\n $this->bootstrap();\n\n \\Foolz\\Plugin\\Hook::forge(get_class().'::uninstall.'.$this->getJsonConfig('name'))\n ->setObject($this)\n ->execute();\n\n return $this;\n }", "title": "" }, { "docid": "01e7d7d4ae767b33b031df41c0e2c0bb", "score": "0.65026927", "text": "function uninstall() {\n // Delete Tables or settings if needed be deinstallation\n }", "title": "" }, { "docid": "2f154b04050fc3bd9ae039fd065e0ecd", "score": "0.6498814", "text": "public function uninstall()\n {\n $this->load->model('extension/event');\n $this->model_extension_event->deleteEvent('maxipago_check_capture');\n $this->model_extension_event->deleteEvent('maxipago_check_void');\n $this->model_extension_event->deleteEvent('maxipago_check_refund');\n\n $this->model_extension_event->deleteEvent('maxipago_delete_check_void');\n $this->model_extension_event->deleteEvent('maxipago_delete_check_refund');\n }", "title": "" }, { "docid": "999c8437873f948d63314c8da5473d6a", "score": "0.64869964", "text": "public static function uninstall()\n {\n $db = XenForo_Application::get('db');\n $db->query(self::$table['dropQuery']);\n }", "title": "" }, { "docid": "9e7c52bf7904459bcef3b0b52c787cce", "score": "0.6404873", "text": "function ssp__on_uninstall () {\n // TODO: Remove any added tables.\n}", "title": "" }, { "docid": "7f8a245ce682592bba1cce17744f2432", "score": "0.6387049", "text": "public function uninstall(UninstallContext $context): void\n {\n }", "title": "" }, { "docid": "e5b40fb0ea39aa272255fb343e2f22ea", "score": "0.6374607", "text": "public function uninstall()\r\n\t{\r\n\t\t$module = $this->Module->findByAlias('payment_type_discount');\r\n\t\t$this->Module->delete($module['Module']['id']);\r\n\t\t\r\n\t\t// Deletes the tables\r\n\t\t$uninstall_query = \"DROP TABLE `module_payment_type_discounts`;\";\r\n\t\t$this->Module->query($uninstall_query);\r\n\t\t\r\n\t\t$handlers = $this->Event->EventHandler->find('all', array('conditions' => array('EventHandler.originator' => 'PaymentTypeDiscountModule')));\r\n\t\tforeach($handlers AS $value)\r\n\t\t{\r\n\t\t\t$this->Event->EventHandler->delete($value['EventHandler']['id']);\r\n\t\t}\r\n\t\t\r\n\t\t$this->Session->setFlash(__('Module Uninstalled'));\r\n\t\t$this->redirect('/modules/admin/');\t\r\n\t}", "title": "" }, { "docid": "b0bdd888444358930a20ffd7966c28a2", "score": "0.634751", "text": "public function uninstall(){\n\n\t\terror_log(\"uninstall() under construction\");\n\t\tif(!$this->_source || !we_app_Common::isInstalled($this->_source)){\n\t\t\terror_log($this->_source . \" seems not to be installed. Aborting deinstallation.\");\n\t\t\treturn false;\n\t\t}\n\t\terror_log(\"starting deinstallation of application \\\"\" . $this->_appname . \"\\\"\");\n\n\t\t$filename = we_app_Common::getConfigElement(\"applicationpath\") . $this->_appname . '/conf/toc.xml';\n\t\tif(!is_readable(we_app_Common::getConfigElement(\"applicationpath\") . $this->_appname . '/conf/toc.xml')){\n\t\t\treturn false;\n\t\t}\n\t\t$this->_files = simplexml_load_file($filename);\n\n\t\t// beginn common installation process:\n\t\t/*\n\t\t * common uninstallation activities:\n\t\t * - do some checks\n\t\t * - delete all files in toc.xml\n\t\t * - delete all empty directories in the application's main directory (currently in apps)\n\t\t * - but leave database untouched\n\t\t * - remove entry from toc.xml\n\t\t */\n\t\t//if(!$this->_executeQueries(\"uninstall\")) return false;\n\t\tif(\n\t\t\t!$this->_preUninstall() ||\n\t\t\t!$this->_executeHook(\"preUninstall\") ||\n\t\t\t!$this->_uninstallFiles() ||\n\t\t\t!$this->_postUninstall() ||\n\t\t\t!$this->_executeHook(\"postUninstall\") ||\n\t\t\t!$this->_removeAppConfig() ||\n\t\t\t!we_app_Common::rebuildAppTOC($this->_appname)){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "72a960ff2234be95c0a12b74cd001880", "score": "0.63417226", "text": "function postUninstallEntryPoint(EntryPoint $entryPoint);", "title": "" }, { "docid": "82b283ea0b546355be10ef5660997bd5", "score": "0.6336233", "text": "public function hookUninstall()\n {\n $this->_uninstallOptions();\n try{\n\t$db = get_db();\n\t$sql = \"DROP TABLE IF EXISTS `$db->MmdAssign`; \";\n\t$db->query($sql);\n\t$sql = \"DROP TABLE IF EXISTS `$db->MmdProfile`; \";\n\t$db->query($sql);\n\t$sql = \"DROP TABLE IF EXISTS `\".$db->prefix.\"MmdProfileAux`; \";\n\t$db->query($sql);\n }catch(Exception $e) {\n\tthrow $e;\t\n }\n\n //TODO delete any temp directories\n\n }", "title": "" }, { "docid": "82b283ea0b546355be10ef5660997bd5", "score": "0.6336233", "text": "public function hookUninstall()\n {\n $this->_uninstallOptions();\n try{\n\t$db = get_db();\n\t$sql = \"DROP TABLE IF EXISTS `$db->MmdAssign`; \";\n\t$db->query($sql);\n\t$sql = \"DROP TABLE IF EXISTS `$db->MmdProfile`; \";\n\t$db->query($sql);\n\t$sql = \"DROP TABLE IF EXISTS `\".$db->prefix.\"MmdProfileAux`; \";\n\t$db->query($sql);\n }catch(Exception $e) {\n\tthrow $e;\t\n }\n\n //TODO delete any temp directories\n\n }", "title": "" }, { "docid": "f574022b6cd058449359b2524da6dded", "score": "0.6331142", "text": "public function uninstall()\n {\n $sqlQuery = \"SELECT *\n FROM project_modules\n WHERE NAME = '\" . $this->name . \"'\";\n\n $rec = SQLSelectOne($sqlQuery);\n\n if (isset($rec[\"ID\"])) {\n $sqlQuery = \"DELETE\n FROM project_modules\n WHERE ID = '\" . $rec[\"ID\"] . \"'\";\n SQLExec($sqlQuery);\n }\n\n $flag_filename = ROOT . 'cms/modules_installed/' . $this->name . '.installed';\n if (file_exists($flag_filename)) unlink($flag_filename);\n }", "title": "" }, { "docid": "9a43d0a89a2559e5dac08b84d7bb3789", "score": "0.63182354", "text": "protected function beforeUninstall(): bool\n {\n return true;\n }", "title": "" }, { "docid": "238b5e535a2fb0e04ef911347dfad6e0", "score": "0.63082814", "text": "public function uninstall()\n {\n // Deletion fail - we dont want users disabling this module!\n return false;\n }", "title": "" }, { "docid": "34f16aeed14d6329adeb530ac6ca5190", "score": "0.63069695", "text": "public function uninstall($parent)\n\t{\n\t\t// disable all the plugins\n\t\tforeach ($this->plugins as $plugin_name)\n\t\t{\n\t\t\t// Make the query to enable the plugin\n\t\t\t$db = JFactory::getDBO();\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->update('#__extensions')\n\t\t\t\t ->set(\"enabled = 0\")\n\t\t\t\t ->where('type=' . $db->quote('plugin') . ' AND name=' . $db->quote($plugin_name));\n\t\t\t$db->setQuery($query);\n\t\t\t$db->query();\n\n\t\t\t// NOTE: Do NOT complain if there was an error\n\t\t\t// (in case any plugin is already uninstalled and this query fails)\n\t\t}\n\t}", "title": "" }, { "docid": "a3bd14894c7a55851dbe78adf2cd882c", "score": "0.6305852", "text": "public function uninstall()\n {\n $sql = 'SELECT c.*, cl.delay\n FROM `'._DB_PREFIX_.'carrier` c\n LEFT JOIN `'._DB_PREFIX_.'carrier_lang` cl ON (c.`id_carrier` = cl.`id_carrier` AND cl.`id_lang` = '.(int)$this->context->language->id.Shop::addSqlRestrictionOnLang('cl').')\n WHERE c.`deleted` = 0 AND c.`external_module_name` = \"lowcostexpress\"';\n \n $carriers_res = Db::getInstance()->ExecuteS($sql);\n $carriers = array();\n foreach($carriers_res as $key => $val) {\n $carriers[] = new Carrier((int)$val['id_carrier']);\n }\n \n // Tag all carriers provided as deleted\n foreach($carriers as $key => $carrier) {\n $carrier->active = false;\n $carrier->save();\n }\n \n return parent::uninstall();\n }", "title": "" }, { "docid": "42e01e3e4ab10fda5e2dba370270dd11", "score": "0.62933433", "text": "function uninstall() {\n SQLExec('DROP TABLE IF EXISTS zmrn0808_devices');\n SQLExec('DROP TABLE IF EXISTS zmrn0808_relays');\n parent::uninstall();\n }", "title": "" }, { "docid": "32b1aa20e2861ea87f059d57474ac008", "score": "0.62896883", "text": "protected function uninstall()\n {\n if ($this->revisionPath && is_dir($this->revisionPath)) {\n unlink($this->revisionPath);\n }\n }", "title": "" }, { "docid": "efbb2da127ccad88ab6aedddfe5f2253", "score": "0.6278189", "text": "function uninstall() {\n SQLExec('DROP TABLE IF EXISTS ajaxdevices');\n SQLExec('DROP TABLE IF EXISTS ajaxdevicesproperty');\n SQLExec('DROP TABLE IF EXISTS ajaxdeviceslog');\n parent::uninstall();\n }", "title": "" }, { "docid": "eb5bee8dcdb3bc3d61beefa7424304fb", "score": "0.6263046", "text": "public function hookUninstall()\n {\n $db = $this->_db;\n $sql = \"DROP TABLE IF EXISTS `$db->Collate`; \";\n $db->query($sql);\n }", "title": "" }, { "docid": "91221c08ea87eb5561f9f411927fa8b5", "score": "0.6251632", "text": "public function _addon_uninstall()\n {\n appengine_live_guard();\n\n require_code('abstract_file_manager');\n force_have_afm_details();\n\n $name = post_param_string('name');\n\n $addon_info = read_addon_info($name);\n\n // Archive it off to exports/addons\n $file = preg_replace('#^[\\_\\.\\-]#', 'x', preg_replace('#[^\\w\\.\\-]#', '_', $name)) . '.tar';\n\n $new_addon_files = array();\n foreach ($addon_info['files'] as $_file) {\n if (substr($_file, -9) != '.editfrom') {// This would have been added back in automatically\n $new_addon_files[] = $_file;\n }\n }\n\n create_addon(\n $file,\n $new_addon_files,\n $addon_info['name'],\n implode(',', $addon_info['incompatibilities']),\n implode(',', $addon_info['dependencies']),\n $addon_info['author'],\n $addon_info['organisation'],\n $addon_info['version'],\n $addon_info['category'],\n implode(',', $addon_info['copyright_attribution']),\n $addon_info['licence'],\n $addon_info['description'],\n 'imports/addons'\n );\n\n uninstall_addon($name);\n\n // Clear some caching\n require_code('caches3');\n erase_comcode_page_cache();\n erase_block_cache(true);\n //persistent_cache_delete('OPTIONS'); Done by set_option\n erase_persistent_cache();\n erase_cached_templates(false, null, TEMPLATE_DECACHE_WITH_ADDON);\n\n // Show it worked / Refresh\n $url = build_url(array('page' => '_SELF', 'type' => 'browse'), '_SELF');\n return redirect_screen($this->title, $url, do_lang_tempcode('SUCCESS'));\n }", "title": "" }, { "docid": "aea0da9e61b7af966b046bca28ce6444", "score": "0.6241432", "text": "protected function afterInstall()\n {\n }", "title": "" }, { "docid": "e0be682b8dae51f21f9ae590d901eda1", "score": "0.62380373", "text": "public function deinstall()\n {\n return true;\n }", "title": "" }, { "docid": "4a8e7ab8bb2993c1fe832dcff0ede870", "score": "0.6226881", "text": "function uninstall__CarRentalSystem()\r\n{\r\n $GLOBALS['obj_crs']->uninstall();\r\n}", "title": "" }, { "docid": "6f7cbed11b19449793befc1a8db0e911", "score": "0.62152267", "text": "public function teardown()\n {\n $this->uninstall_addon();\n }", "title": "" }, { "docid": "174ecafcf1982fe7984fa1fba1f49ce5", "score": "0.62096345", "text": "function review_uninstall() {\r\n}", "title": "" }, { "docid": "3e9b18fc3e7907c3e22c512cf292d6f2", "score": "0.6203856", "text": "public function uninstall()\n\t{\n\t\t$this->dao->query(sprintf('DROP TABLE %s', $this->getTable_packages_items()));\n\t\t$this->dao->query(sprintf('DROP TABLE %s', $this->getTable_packages_assigned()));\n\t\t$this->dao->query(sprintf('DROP TABLE %s', $this->getTable_packages()));\n\n\t\tPreference::newInstance()->delete(array('s_section' => 'packages'));\n\t\tosc_run_hook('packages_uninstall');\n\t}", "title": "" } ]
b0d73925734123327c4e661c304dafaa
Method to autopopulate the model state. Note. Calling getState in this method will result in recursion.
[ { "docid": "e067ab191b847c352da59bbc12606ce2", "score": "0.0", "text": "protected function populateState($ordering = null, $direction = null)\n {\n // Initialise variables.\n $app = JFactory::getApplication('administrator');\n\n // Adjust the context to support modal layouts.\n if ($layout = JFactory::getApplication()->input->get('layout', 'default')) {\n $this->context .= '.'.$layout;\n }\n\n // Load the filter state.\n $search = $this->getUserStateFromRequest($this->context.'.filter.search', 'filter_search');\n $this->setState('filter.search', $search);\n\n\n $state = $this->getUserStateFromRequest($this->context.'.filter.state', 'filter_state', '');\n\n if ($state == '')\n {\n // XXX Check for sites with lots of users: this may hang this page until timeout if we show all users\n // XXX so we use a safe filter instead\n $total_moodle = JoomdleHelperContent::getMoodleUsersNumber ($search);\n $db = $this->getDbo();\n if ($search != '')\n $searchEscaped = $db->Quote( '%'.$db->escape( $search, true ).'%', false );\n else $searchEscaped = \"\";\n $total_joomla = JoomdleHelperContent::getJoomlaUsersNumber ($searchEscaped);\n\n $max_users = 1000;\n if (($total_joomla > $max_users) || ($total_moodle > $max_users))\n $state = 'joomla';\n\n }\n $this->setState('filter.state', $state);\n\n // Load the parameters.\n $params = JComponentHelper::getParams('com_joomdle');\n $this->setState('params', $params);\n\n\n // List state information.\n parent::populateState('id', 'asc'); //edited by mjt\n }", "title": "" } ]
[ { "docid": "e49e4d8ce027493f883fdbeda6563c2c", "score": "0.6243276", "text": "protected function populateState() {\n\t\t\tparent::populateState();\n\t\t}", "title": "" }, { "docid": "cef219605e67d9755485c21de584e854", "score": "0.6106365", "text": "protected function populateState()\n\t{\n\t\tparent::populateState();\n\t}", "title": "" }, { "docid": "4ac4655c247809f7bebe5a333755dbe9", "score": "0.59487045", "text": "protected function populateState() {\n \n $app = JFactory::getApplication();\n $params = $app->getParams();\n \n // Load the object state.\n $id = $app->input->getInt('id');\n $this->setState($this->context . '.id', $id);\n \n // Load the parameters.\n $this->setState('params', $params);\n }", "title": "" }, { "docid": "ca20f206340bcd708f55720d69a9ed8d", "score": "0.58258015", "text": "protected function populateState() {\n \n $app = JFactory::getApplication();\n \n // Load the object state.\n $value = $app->input->getInt('id');\n $this->setState($this->getName().'.id', $value);\n \n $value = $app->input->getInt('project_id');\n $this->setState('project_id', $value);\n \n // Load the parameters.\n $params = $app->getParams();\n $this->setState('params', $params);\n }", "title": "" }, { "docid": "d2d4b860c25f32680cc17e32eb67630a", "score": "0.5786189", "text": "function _setModelState()\n\t{\n\t\t$state = parent::_setModelState();\n\t\t$app = JFactory::getApplication();\n\t\t$model = $this->getModel( $this->get('suffix') );\n\t\t$ns = $this->getNamespace();\n\n\t\t$state['order'] = $app->getUserStateFromRequest($ns.'.filter_order', 'filter_order', 'tbl.lft', 'cmd');\n\t\t$state['filter_id_from'] \t= $app->getUserStateFromRequest($ns.'id_from', 'filter_id_from', '', '');\n\t\t$state['filter_id_to'] \t\t= $app->getUserStateFromRequest($ns.'id_to', 'filter_id_to', '', '');\n\t\t$state['filter_name'] \t\t= $app->getUserStateFromRequest($ns.'name', 'filter_name', '', '');\n\t\t$state['filter_parentid'] \t= $app->getUserStateFromRequest($ns.'parentid', 'filter_parentid', '', '');\n\t\t$state['filter_enabled'] \t= $app->getUserStateFromRequest($ns.'enabled', 'filter_enabled', '', '');\n\t\t$state['limit'] \t= $app->getUserStateFromRequest($ns.'limit', 'limit', 0, 'int');\n\t\t$state['limitstart'] \t= $app->getUserStateFromRequest($ns.'limitstart', 'limitstart', 0, 'int');\r\n\n\r\n\n\n\t\tforeach ($state as $key=>$value)\n\t\t{\n\t\t\t$model->setState( $key, $value );\n\t\t}\n\t\treturn $state;\n\t}", "title": "" }, { "docid": "eea9b9cc692cbd73166f2b880b965a66", "score": "0.5758418", "text": "protected function populateState()\n\t{\n\t\tparent::populateState();\n\n\t\t$id = $this->app->input->getInt('id');\n\t\t$this->setState('item.id', $id);\n\n\t\t$params = $this->app->getParams();\n\t\t$this->setState('params', $params);\n\n\t\t$this->setState('list.limit', 21);\n\t}", "title": "" }, { "docid": "e27adaec19f9558e9a6c638d02c0bdd0", "score": "0.55346054", "text": "protected function populateState() {\n \n $app = JFactory::getApplication();\n $params = $app->getParams();\n \n // Load the object state.\n $id = $app->input->getInt('id');\n $this->setState('project.id', $id);\n \n // Load the parameters.\n $this->setState('params', $params);\n }", "title": "" }, { "docid": "22a22d9c79946321449ccd57ab3f71e1", "score": "0.5524487", "text": "protected function populateState()\n\t{\n\t\t$app = JFactory::getApplication('com_xivetranscorder');\n\n\t\t// Load state from the request userState on edit or from the passed variable on default\n if (JFactory::getApplication()->input->get('layout') == 'edit') {\n $id = JFactory::getApplication()->getUserState('com_xivetranscorder.edit.api.id');\n } else {\n $id = JFactory::getApplication()->input->get('id');\n JFactory::getApplication()->setUserState('com_xivetranscorder.edit.api.id', $id);\n }\n\t\t$this->setState('api.id', $id);\n\n\t\t// Load the parameters.\n\t\t$params = $app->getParams();\n $params_array = $params->toArray();\n if(isset($params_array['item_id'])){\n $this->setState('api.id', $params_array['item_id']);\n }\n\t\t$this->setState('params', $params);\n\n\t}", "title": "" }, { "docid": "25839583af58dcc72fca23cb4efe139c", "score": "0.55025804", "text": "protected function populateState()\r\n {\r\n $app = JFactory::getApplication('site');\r\n\r\n // Load state from the request.\r\n $pk = $app->input->getInt('id');\r\n $this->setState('product.id', $pk);\r\n\r\n //Load the global parameters of the component.\r\n $params = $app->getParams();\r\n $this->setState('params', $params);\r\n }", "title": "" }, { "docid": "2d3f848a6e7f3b60fe388c389681677e", "score": "0.5479289", "text": "protected function populateState()\r\r\n\t{\r\r\n\t\t$app = Factory::getApplication();\r\r\n\r\r\n\t\t// Load state from the request.\r\r\n\t\t$pk = $app->input->getInt('id');\r\r\n\t\t$this->setState('mywalk.id', $pk);\r\r\n\r\r\n\t\t$offset = $app->input->getUInt('limitstart');\r\r\n\t\t$this->setState('list.offset', $offset);\r\r\n\r\r\n\t\t// Load the parameters.\r\r\n\t\t$params = $app->getParams();\r\r\n\t\t$this->setState('params', $params);\r\r\n\t}", "title": "" }, { "docid": "62b629a6295ce269fec3e97ef229588e", "score": "0.5360038", "text": "protected function populateState()\n\t{\n\t\t// Load the parameters.\n\t\t$value = JComponentHelper::getParams($this->option);\n\t\t$this->setState('params', $value);\n\t}", "title": "" }, { "docid": "15af519700a2b2ed8d8ff4e361cd9574", "score": "0.5338768", "text": "protected function _populateState()\n\t{\n\t\t$app\t\t= &JFactory::getApplication('administrator');\n\t\t$params\t\t= &JComponentHelper::getParams('com_eve');\n\n\t\t// Load the User state.\n\t\tif (JRequest::getWord('layout') === 'edit') {\n\t\t\t$keyID = (int) $app->getUserState('com_eve.edit.apikey.keyID');\n\t\t\t$this->setState('apikey.keyID', $keyID);\n\t\t} else {\n\t\t\t$keyID = (int) JRequest::getInt('keyID');\n\t\t\t$this->setState('apikey.keyID', $keyID);\n\t\t}\n\n\t\t// Load the parameters.\n\t\t$this->setState('params', $params);\n\t}", "title": "" }, { "docid": "9e638a1fed8149a44f35648214d95491", "score": "0.5337238", "text": "public function setNewModel(): self;", "title": "" }, { "docid": "6596327da6caa27d5255d9491721561b", "score": "0.5326905", "text": "protected function _populateState()\n\t{\n\t\t// Initialize variables.\n\t\t$app\t\t= &JFactory::getApplication('administrator');\n\t\t$params\t\t= JComponentHelper::getParams('com_eve');\n\t\t$context\t= $this->_context.'.';\n\n\t\tif ($this->_entity == 'user') {\n\t\t\t$user = JFactory::getUser();\n\t\t\t$entityID = $user->id;\n\t\t} else {\n\t\t\t$entityID = JRequest::getInt($this->_entity.'ID');\n\t\t}\n\t\t$this->setState('list.entityID', $entityID);\n\n\t\t// Load the filter state.\n\t\t$search = $app->getUserStateFromRequest($context.'filter.search', 'filter_search', '');\n\t\t$this->setState('filter.search', $search);\n\n\t\tparent::_populateState('aj.jobID', 'desc');\n\n\t\t$limitstart = JRequest::getInt('limitstart');\n\t\t$this->setState('list.start', $limitstart);\n\n\t\t// Load the parameters.\n\t\t$this->setState('params', $params);\n\t}", "title": "" }, { "docid": "7f735af0f5e7560a1d1ef9409e867e74", "score": "0.52847546", "text": "protected function populateState()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$app = JFactory::getApplication('com_gm_ceiling');\n\n\t\t\t// Load state from the request userState on edit or from the passed variable on default\n\t\t\tif (JFactory::getApplication()->input->get('layout') == 'edit')\n\t\t\t{\n\t\t\t\t$id = JFactory::getApplication()->getUserState('com_gm_ceiling.edit.client.id');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$id = JFactory::getApplication()->input->get('id');\n\t\t\t\tJFactory::getApplication()->setUserState('com_gm_ceiling.edit.client.id', $id);\n\t\t\t}\n\n\t\t\t$this->setState('client.id', $id);\n\n\t\t\t// Load the parameters.\n\t\t\t$params = $app->getParams();\n\t\t\t$params_array = $params->toArray();\n\n\t\t\tif (isset($params_array['item_id']))\n\t\t\t{\n\t\t\t\t$this->setState('client.id', $params_array['item_id']);\n\t\t\t}\n\n\t\t\t$this->setState('params', $params);\n\t\t}\n\t\tcatch(Exception $e)\n {\n Gm_ceilingHelpersGm_ceiling::add_error_in_log($e->getMessage(), __FILE__, __FUNCTION__, func_get_args());\n }\n\t}", "title": "" }, { "docid": "d8ce755319a2a07b69b6fa930bfe38e8", "score": "0.5267962", "text": "protected function initEditableModel() {\n \n }", "title": "" }, { "docid": "b828f87a0552db60f4e187e50d68766e", "score": "0.52625215", "text": "public function store()\n\t{\n\t\tparent::storeModel();\n\t}", "title": "" }, { "docid": "bc6c0ca1474e63464bdffb22226bb02a", "score": "0.52570814", "text": "protected function populateState() {\n $app = JFactory::getApplication('com_easysdi_catalog');\n\n // Load state from the request userState on edit or from the passed variable on default\n if (JFactory::getApplication()->input->get('layout') == 'edit') {\n $id = JFactory::getApplication()->getUserState('com_easysdi_catalog.edit.metadata.id');\n } else {\n $id = JFactory::getApplication()->input->get('id');\n if(isset($id)){\n JFactory::getApplication()->setUserState('com_easysdi_catalog.edit.metadata.id', $id);\n }\n }\n $this->setState('metadata.id', $id);\n\n // Load the parameters.\n $params = $app->getParams();\n $params_array = $params->toArray();\n if (isset($params_array['item_id'])) {\n $this->setState('metadata.id', $params_array['item_id']);\n }\n $this->setState('params', $params);\n }", "title": "" }, { "docid": "2c96c411840d7511c2621bdb6392e9b1", "score": "0.52221006", "text": "public function makeModel()\n {\n return $this->setModel($this->model());\n }", "title": "" }, { "docid": "65fda251fe4b2f0a7814451d9dfa7535", "score": "0.5193618", "text": "private function fillModel()\n {\n // If we've already filled this model don't fill it again\n if ($this->hydrated) return true;\n\n // Fire hydrating event\n if ($this->fireModelEvent('hydrating') === false) return false;\n\n // Fill from data and record we've filled it\n $this->fill($this->dataset);\n $this->hydrated = true;\n\n // Remove any fields from the model which can't be submitted, such as objects and arrays\n // - This will prevent errors with bound objects being saved twice\n $this->removeInvalidAttributes();\n\n $this->fireModelEvent('hydrated', false);\n\n return true;\n }", "title": "" }, { "docid": "44788d372a486e23b50a60f60a14b8ee", "score": "0.5192727", "text": "protected function state()\n {\n $this->parts['{state}'] = $this->form->field($this->model, $this->model->getStatePropertyName())->widget(DepDrop::className(), [\n 'options' => [\n 'id' => $this->fieldIds['state']\n , 'placeholder' => Yii::t('jlorente/location', 'Select state')\n , 'name' => $this->getSubmitModelName($this->model->getStatePropertyName())\n ]\n , 'data' => ArrayHelper::map(State::find()->where(['country_id' => $this->model->country_id])->orderBy(['name' => SORT_ASC])->all(), 'id', 'name')\n , 'pluginOptions' => [\n 'url' => Url::to([\"/{$this->module->id}/state/list\"])\n , 'depends' => [$this->fieldIds['country']]\n ]\n ]);\n }", "title": "" }, { "docid": "64323fc5cad9c998fa9541ea13156abc", "score": "0.5190779", "text": "public function getModelState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "3fd38099f47e5a6b61de90314de154be", "score": "0.5147881", "text": "protected function populateState()\n {\n try {\n $app = JFactory::getApplication('com_gm_ceiling');\n\n // Load state from the request userState on edit or from the passed variable on default\n $id = null;\n if (JFactory::getApplication()->input->get('layout') == 'edit') {\n $id = JFactory::getApplication()->getUserState('com_gm_ceiling.edit.canvas.id');\n } else {\n $id = JFactory::getApplication()->input->get('id');\n JFactory::getApplication()->setUserState('com_gm_ceiling.edit.canvas.id', $id);\n }\n $this->setState('canvas.id', $id);\n\n // Load the parameters.\n $params = $app->getParams();\n $params_array = $params->toArray();\n\n if (isset($params_array['item_id'])) {\n $this->setState('canvas.id', $params_array['item_id']);\n }\n\n $this->setState('params', $params);\n } catch (Exception $e) {\n Gm_ceilingHelpersGm_ceiling::add_error_in_log($e->getMessage(), __FILE__, __FUNCTION__, func_get_args());\n }\n }", "title": "" }, { "docid": "fdbfc47b106ff4659e9ddce801cae4f0", "score": "0.51377106", "text": "protected function populateState()\n\t{\n\t\t// Execute the parent method.\n\t\tparent::populateState();\n\n\t\t$app = JFactory::getApplication('administrator');\n\n\t\t// Load the User state.\n\t\t$pk = (int) JRequest::getInt('extension_id');\n\t\t$this->setState('extension.extension_id', $pk);\n\t}", "title": "" }, { "docid": "7811aa62022cd32582a12efc817f5253", "score": "0.51361424", "text": "protected function initState()\n {\n $this->state = new BasketState();\n }", "title": "" }, { "docid": "99275f8bbc4b4a7cd3dae95929476ec2", "score": "0.511079", "text": "public function updateState()\n {\n $this->state = $this->balance->data();\n\n return $this;\n }", "title": "" }, { "docid": "975028b41c9b607051c9b3be7090601e", "score": "0.50287235", "text": "protected function setModel()\n {\n if (!empty($this->getHeight()))\n {\n $this->blockModel = $this->find(\"height\",$this->getHeight(),1);\n }\n elseif (!empty($this->getHash()))\n {\n $this->blockModel = $this->find(\"hash\",$this->getHash(),1);\n }\n }", "title": "" }, { "docid": "846a7e929c4270a7e3b94280e4536389", "score": "0.5022501", "text": "public function loadEmptyFieldsFromModel()\n {\n $property = Property::ForBenuTechId($this->id)->first();\n\n if(!$property)\n {\n return $this;\n }\n\n if(!$this->estimatedValue && $property->estimated_value_max && $property->estimated_value_max > 0)\n {\n $this->estimatedValue = [\n \"human\" => '$' . number_format($property->estimated_value_max),\n \"value\" => $property->estimated_value_max\n ];\n }\n\n if(!$this->mortgageAmt && $property->mortgage_amt && $property->mortgage_amt > 0)\n {\n $this->mortgageAmt = '$' . number_format($property->mortgage_amt);\n }\n \n return $this;\n }", "title": "" }, { "docid": "3ad88c65c392c3138bdc8c27b884bf93", "score": "0.5019778", "text": "protected function populateState() {\n \n $app = JFactory::getApplication(\"Site\");\n /** @var $app JSite **/\n \n // Get the primary key of the record \n\t\t$value = JFactory::getUser()->id;\n\t\t$this->setState($this->option.'.profile.user_id', $value);\n\n\t\t// Load the parameters.\n $params\t= $app->getParams($this->option);\n\t\t$this->setState('params', $params);\n\t\t\n }", "title": "" }, { "docid": "dc2dd3ebc8fc0789cdc0b6efa4419c12", "score": "0.4964929", "text": "protected function populateState()\n {\n $app = JFactory::getApplication();\n /** @var $app JApplicationSite */\n\n $params = $app->getParams($this->option);\n $this->setState('params', $params);\n\n // Visitor\n $visitorId = (int)JFactory::getUser()->id;\n $this->setState($this->option . '.visitor.id', $visitorId);\n\n // If there is no ID in the URI, load profile of the visitor\n $userId = $app->input->getInt(\"id\");\n if (!$userId) {\n $userId = $visitorId;\n }\n $this->setState($this->option . '.profile.user_id', $userId);\n\n $value = ($userId == $visitorId) ? true : false;\n $this->setState($this->option . '.visitor.is_owner', $value);\n }", "title": "" }, { "docid": "f2c06d18faa9766676aa574389eb0351", "score": "0.49570036", "text": "public function model() {\n\t\tparent::model();\n\t\t$primaryKey = $this->_model->getTableSchema()->primaryKey;\n\t\tif (is_string($primaryKey)) $primaryKey = array($primaryKey);\n\t\t$this->removeAttributes = array_merge($this->removeAttributes, $primaryKey);\n\t\t$this->_model->unsetAttributes($this->removeAttributes);\n\t\t$this->_model->setIsNewRecord(TRUE);\n\t}", "title": "" }, { "docid": "f2d6174f3a1370a0aaf6ace61e09d7d2", "score": "0.49324095", "text": "public function applyState() {\n if($this->problem_msg) {\n $this->sum = array(\n ERROR,\n $this->problem_msg,\n null,\n null,\n null,\n );\n $this->members = Array();\n return;\n }\n\n if($this->hasMembers()) {\n foreach($this->members AS $MOBJ) {\n $MOBJ->applyState();\n }\n }\n\n // Use state summaries when some are available to\n // calculate summary state and output\n if($this->aStateCounts !== null) {\n // Calculate summary state and output\n\n // Only create summary from childs when not set yet (e.g by backend)\n if($this->sum[STATE] === null)\n $this->fetchSummaryStateFromCounts();\n\n // Only create summary from childs when not set yet (e.g by backend)\n if($this->sum[OUTPUT] === null)\n $this->fetchSummaryOutputFromCounts();\n } else {\n if($this->sum[STATE] === null)\n $this->fetchSummaryState();\n\n if($this->sum[OUTPUT] === null)\n $this->fetchSummaryOutput();\n }\n }", "title": "" }, { "docid": "f1c29b1e2536d0ab4023999bb78b681e", "score": "0.4930875", "text": "protected function afterInitEditableModel() {\n \n }", "title": "" }, { "docid": "ca086673afa6166b10dc48657c4de974", "score": "0.49242344", "text": "public function editState()\n {\n $this->state = 3;\n return $this->save();\n }", "title": "" }, { "docid": "d6d455294a9e8d17fa6f65ad9bc6f8ac", "score": "0.4904035", "text": "public function loadModel()\n {\n require APP . 'model/model.php';\n $this->model = new Model();\n }", "title": "" }, { "docid": "0b29038b9c34b38dd7d033d6edf2cf91", "score": "0.48953667", "text": "function post_model_init($from_cache = FALSE)\n {\n }", "title": "" }, { "docid": "e7341a1613e4d22e5f8346c58b00f135", "score": "0.48598439", "text": "public static function buildNewModel($props){\n return parent::buildNewModel($props);\n }", "title": "" }, { "docid": "c53610ad391e1724aab38ec1a57da9c3", "score": "0.48522884", "text": "public function setLoaded(): Model\n {\n $this->__meta['is_loaded'] = true;\n return $this;\n }", "title": "" }, { "docid": "4cd1d07d4400e7b5a3120aa94294651d", "score": "0.48258615", "text": "public function pickup()\n {\n $this->currentState = new State(State::STATE_PICKUP);\n $this->save();\n }", "title": "" }, { "docid": "a98d2776b85353f831c381cbb89803ea", "score": "0.48050424", "text": "protected function saveState() {\n $arr=array();\n foreach($this->toArray() as $product) {\n $arr[$product->id]=$product->getQuantity();\n }\n Yii::app()->user->setState(__CLASS__, $arr);\n }", "title": "" }, { "docid": "ddc179b6be3c2ea22796db8ded0deb2b", "score": "0.48018524", "text": "public function loadModel()\n {\n $data = User::find($this->modelId);\n $this->name = $data->name;\n $this->email = $data->email;\n }", "title": "" }, { "docid": "4b98e624caff30e2bb7810c6d984300b", "score": "0.47807634", "text": "protected function _populateState()\n\t{\n\t\t$app\t\t= & JFactory::getApplication('administrator');\n\t\t$user\t\t= & JFactory::getUser();\n\t\t$params\t\t= JComponentHelper::getParams('com_redirect');\n\t\t$context\t= 'com_redirect.links.';\n\n\t\t// Load the filter state.\n\t\t$this->setState('filter.search', $app->getUserStateFromRequest($context.'filter.search', 'filter_search', ''));\n\t\t$this->setState('filter.state', $app->getUserStateFromRequest($context.'filter.state', 'filter_state', '0', 'string'));\n\n\n\t\t// Load the list state.\n\t\t$this->setState('list.start', $app->getUserStateFromRequest($context.'list.start', 'limitstart', 0, 'int'));\n\t\t$this->setState('list.limit', $app->getUserStateFromRequest($context.'list.limit', 'limit', $app->getCfg('list_limit', 25), 'int'));\n\t\t$this->setState('list.ordering', $app->getUserStateFromRequest($context.'list.ordering', 'filter_order', 'updated_date', 'cmd'));\n\t\t$this->setState('list.direction', $app->getUserStateFromRequest($context.'list.direction', 'filter_order_Dir', 'DESC', 'word'));\n\n\t\t// Load the user parameters.\n\t\t$this->setState('user',\t$user);\n\t\t$this->setState('user.id', (int)$user->id);\n\n\t\t// Load the check parameters.\n\t\tif ($this->_state->get('filter.state') === '*') {\n\t\t\t$this->setState('check.state', false);\n\t\t} else {\n\t\t\t$this->setState('check.state', true);\n\t\t}\n\n\t\t// Load the parameters.\n\t\t$this->setState('params', $params);\n\t}", "title": "" }, { "docid": "f8e04ba2a25e88fe209027b0fe1d0a47", "score": "0.47471777", "text": "public function loadState()\n\t{\n\t}", "title": "" }, { "docid": "91d655cfd528d8e44f6e63d768847056", "score": "0.474696", "text": "protected function populateState()\n\t{\n\t\t$id = JFactory::getApplication()->input->get('server', 0, 'uint');\n\t\t$this->setState('server.id', $id);\n\t\t$redirect = JFactory::getApplication()->input->get('redirect');\n\t\t$this->setState('server.redirect', $redirect);\n\t\tparent::populateState();\n\t}", "title": "" }, { "docid": "831bfba2e27e7ce03709abca925b0c88", "score": "0.47409445", "text": "protected function _initModels()\n {\n $totalsConfig = $this->getNode($this->_totalsConfigNode);\n\n foreach ($totalsConfig->children() as $totalCode => $totalConfig) {\n $class = $totalConfig->getClassName();\n if (!empty($class)) {\n $this->_models[$totalCode] = $this->_initModelInstance($class, $totalCode, $totalConfig);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "7ec01ceb50c145297405458dc284c741", "score": "0.47090775", "text": "public function states() {\n\t\t$this->States = TableRegistry::get('Data.States');\n\t\t$states = $this->States->find('all', ['fields' => []]);\n\n\t\t$this->set(compact('states'));\n\t\t$this->set('_serialize', ['states']);\n\t}", "title": "" }, { "docid": "e7f15e4a56b45541e20605cec9e4c168", "score": "0.4698657", "text": "public function updateModel() {\n $path = $this->model->getApiPath();\n $response = $this->patch($path, $this->model->toArray());\n\n return $this->handleResponse($response);\n }", "title": "" }, { "docid": "4c12c9dea0007bf4209a753ff2a47701", "score": "0.46849254", "text": "abstract public function getModel();", "title": "" }, { "docid": "4c12c9dea0007bf4209a753ff2a47701", "score": "0.46849254", "text": "abstract public function getModel();", "title": "" }, { "docid": "2be6fd01476709b2d7c42b8e09854ca4", "score": "0.46839535", "text": "public function __construct()\n {\n $this->model = $this->resolveModel();\n }", "title": "" }, { "docid": "9ebcbf81fabd66f91d599467abfa1fb7", "score": "0.46658427", "text": "protected function _loadModel()\n {\n $id = $this->getRequest()->getParam('id');\n $model = $this->getWorkingModel();\n if ($model->getResource() instanceof Mage_Eav_Model_Entity_Abstract) {\n // avoid joining more attributes than necessary\n $model->load($id, $this->getFilter()->getAttributesToInclude());\n }\n else {\n $model->load($id);\n }\n if ($id != $model->getId()) {\n $this->_critical(self::RESOURCE_NOT_FOUND);\n }\n return $model;\n }", "title": "" }, { "docid": "a04f354fee7851e48aed8f81f11f264f", "score": "0.46643865", "text": "abstract public function ResetModel();", "title": "" }, { "docid": "11bfeea36782ed7337ed3980f7f6383f", "score": "0.46604684", "text": "public function fresh(): JsonModel\n {\n if ($this->hasJsonModelAttributes()) {\n $this->emptyJsonModelAttributeCache();\n }\n\n $linkedData = $this->getLinkedData();\n /**\n * If we somehow have an object, turn it back into an array.\n */\n if (is_object($linkedData)) {\n $linkedData = (array) $linkedData->toArray();\n }\n $this->fill($linkedData);\n // If you are being freshened from nothing, you are new,\n // 'exists' flag will cause your 'creating' and 'created' events to fire\n $this->exists = $linkedData !== null;\n $this->syncOriginal();\n return $this;\n }", "title": "" }, { "docid": "9aee771e9fe522c0af1603f591b11686", "score": "0.46532652", "text": "function buildModel()\r\n\t{\r\n\t\tglobal $mdlModel;\r\n\t\t$currentModel = new Model();\r\n\t\t$mdlModel = $currentModel;\r\n\t\treturn $currentModel;\t\t\r\n\t}", "title": "" }, { "docid": "44973e9829670cdb8c0184107ab7e4a9", "score": "0.46486777", "text": "protected function _populateWith($attributes)\n\t{\n\t\t$this->_model = minimee()->makeSettingsModel($attributes);\n\t}", "title": "" }, { "docid": "0b765dfb3b388e0cf564b8260f086ac4", "score": "0.46437323", "text": "public function loadState()\n\t{\n\t\tparent::loadState();\n\t\tif($this->getEnableViewState(true))\n\t\t{\n\t\t\t$this->getControls()->clear();\n\t\t\t$this->buildPager();\n\t\t}\n\t}", "title": "" }, { "docid": "f62c60996cbf573fee3816a003d9311a", "score": "0.4642625", "text": "public function run()\n {\n State::create(['name'=>'Dirba']);\n State::create(['name'=>'Nedirba']);\n State::create(['name'=>'Atostogauja']);\n }", "title": "" }, { "docid": "b5120ad841e94c08a60385b21d8b480f", "score": "0.4641236", "text": "public function prepareStates($model)\n {\n $checkedAccess = array();\n $result = array();\n if ($this->updateAuthItemTemplate !== null) {\n $authItem = $this->updateAuthItemTemplate;\n $checkedAccess[$authItem] = Yii::app()->user->checkAccess($authItem, array('model'=>$model));\n $result[] = array(\n 'label' => Yii::t('app', 'Update item'),\n 'icon' => 'pencil',\n 'url' => $this->controller->createUrl('update', array('id' => $model->getPrimaryKey())),\n 'enabled' => $checkedAccess[$authItem],\n 'class' => 'btn btn-success',\n );\n }\n $valid = true;\n $attribute = $model->stateAttributeName;\n $sourceState = $model->$attribute;\n foreach($model->getTransitionsGroupedByTarget() as $targetState => $target) {\n $state = $target['state'];\n $sources = $target['sources'];\n\n if (!isset($sources[$sourceState])) continue;\n\n $enabled = null;\n $sourceStateObject = $sources[$sourceState];\n //foreach($sources[$sourceState] as $sourceStateObject) {\n $authItem = $sourceStateObject->auth_item_name;\n if (isset($checkedAccess[$authItem])) {\n $status = $checkedAccess[$authItem];\n } else {\n $status = $checkedAccess[$authItem] = Yii::app()->user->checkAccess($authItem, array('model'=>$model));\n }\n $enabled = ($enabled === null || $enabled) && $status;\n //}\n\n $valid = !$enabled || $model->isTransitionAllowed($targetState);\n\n $entry = array(\n 'post' => $state->post_label,\n 'label' => $sources[$sourceState]->label,\n 'icon' => $state->icon,\n 'class' => $state->css_class,\n 'target' => $targetState,\n 'enabled' => $enabled && $valid,\n 'valid' => $valid,\n 'url' => $this->controller->createUrl($this->id, $this->getUrlParams($state, $model, $targetState)),\n );\n if ($state->display_order) {\n $result[$state->display_order] = $entry;\n } else {\n $result[] = $entry;\n }\n }\n ksort($result);\n return $result;\n }", "title": "" }, { "docid": "07bde514724d573a6865c4688ea5740a", "score": "0.46251032", "text": "function snfmModel(){\n\t\t$this->__construct();\n\n\t}", "title": "" }, { "docid": "6b8e366c6f5f671643a5ac5bfa953a97", "score": "0.46230167", "text": "public function _initialize()\r\n {\r\n parent::_initialize();\r\n $this->model = model('Industry');\r\n }", "title": "" }, { "docid": "4c4f5dff33497fb750df1a1d26cbf093", "score": "0.46216172", "text": "public function initialize($model) {\n $this->model = $model;\n }", "title": "" }, { "docid": "4c1d44839dcfb2993132730aa5384fe4", "score": "0.4606903", "text": "protected abstract function initializeDataModel();", "title": "" }, { "docid": "544d25b6771b2d5aa3e28e75e3aa57f4", "score": "0.45914733", "text": "function vote_model()\n\t{\n\t\t\tparent::Model();\n\t}", "title": "" }, { "docid": "9373c954906bd2e67ce1317375047b8f", "score": "0.4590131", "text": "abstract public function updateState();", "title": "" }, { "docid": "ea00f77c4119d6fd4b47e3e134372237", "score": "0.45684236", "text": "protected function populateState() {\n $guids = JFactory::getApplication()->input->get('guid', array(), 'array');\n\n $this->setState('report.guids', $guids);\n }", "title": "" }, { "docid": "839685e3a538d5d372825da2c91fbba4", "score": "0.45621347", "text": "public function initialize()\n\t{\n\t\t$application = $this->getContainer()->get('app');\n\n\t\t// Setup the model to query our data\n\t\t$this->model = new UseractivityModel($this->getContainer()->get('db'));\n\t\t$this->model->setProject($application->getProject());\n\n\t\t$state = $this->model->getState();\n\n\t\t$enteredPeriod = $application->input->getUint('period', 1);\n\n\t\t$state->set('list.activity_type', $application->input->getUint('activity_type', 0));\n\n\t\tif ($enteredPeriod == 5)\n\t\t{\n\t\t\t$startDate = $application->input->getCmd('startdate');\n\t\t\t$endDate = $application->input->getCmd('enddate');\n\n\t\t\tif ($this->datesValid($startDate, $endDate))\n\t\t\t{\n\t\t\t\t$state->set('list.startdate', $startDate);\n\t\t\t\t$state->set('list.enddate', $endDate);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$enteredPeriod = 1;\n\t\t\t}\n\t\t}\n\n\t\t$state->set('list.period', $enteredPeriod);\n\n\t\t$this->model->setState($state);\n\t}", "title": "" }, { "docid": "a3c73384e202692b0f0fced85f1d5c62", "score": "0.45612273", "text": "public function setState()\n {\n // get random values in array either Opened/Closed\n $options = array('Opened', 'Closed');\n $key = array_rand($options);\n\n $this->state = $options[$key];\n }", "title": "" }, { "docid": "16630e730836b10c6b9d64e36ab409bc", "score": "0.45608225", "text": "protected function model()\n {\n }", "title": "" }, { "docid": "56760b90254552b877bdecee8613704c", "score": "0.45570165", "text": "protected function _initModels()\n {\n $totals = $this->_salesConfig->getGroupTotals($this->_configSection, $this->_configGroup);\n foreach ($totals as $totalCode => $totalConfig) {\n $class = $totalConfig['instance'];\n if (!empty($class)) {\n $this->_models[$totalCode] = $this->_initModelInstance($class, $totalCode, $totalConfig);\n }\n }\n return $this;\n }", "title": "" }, { "docid": "3bde6030bb4ced465bd96b03eee944b5", "score": "0.45522198", "text": "public function makeModel()\n\t{\n\t\t$model = $this->app->make($this->model());\n\n\t\treturn $this->model = $model;\n\t}", "title": "" }, { "docid": "656ee1ce68e277091fbf41d83614407c", "score": "0.4549926", "text": "protected function parseModelConfig()\n {\n $defaultModelConfig = [\n 'name' => $this->defaultName(),\n 'dashboard' => true,\n 'available_actions' => ['create','update','delete'],\n ];\n $this->config = array_merge($defaultModelConfig, config('crudder.models.'.$this->className));\n\n // name_plural is separate so it can be derived from default OR manually set\n if(!isset($this->config['name_plural'])) $this->config['name_plural'] = str_plural($this->config['name']);\n }", "title": "" }, { "docid": "d845858358199a61dec74c9b85898c4c", "score": "0.4546391", "text": "protected function setModel(): void\n {\n $this->model = Employee::class;\n }", "title": "" }, { "docid": "65e287d6b6ad2d5091fc555ddf15604f", "score": "0.45454338", "text": "public function make()\n {\n return $this->model->with($this->with);\n }", "title": "" }, { "docid": "9dc397437d1ae97648d765e29d18688f", "score": "0.45377368", "text": "protected function populateState()\n\t{\n\t\t$app = JFactory::getApplication('administrator');\n\n\t\t// Load the User state.\n\t\t$id = $app->getUserState('com_templates.edit.source.id');\n\n\t\t// Parse the template id out of the compound reference.\n\t\t$temp\t= explode(':', base64_decode($id));\n\t\t$this->setState('extension.id', (int) array_shift($temp));\n\t\t$this->setState('filename', array_shift($temp));\n\n\t\t// Load the parameters.\n\t\t$params\t= JComponentHelper::getParams('com_templates');\n\t\t$this->setState('params', $params);\n\t}", "title": "" }, { "docid": "a413212995882518dab18776ee712d6b", "score": "0.45262867", "text": "public function formCreateModelObject()\n {\n return $this->createModel();\n }", "title": "" }, { "docid": "1d69b8cf6975f901e6ab081b88fefac3", "score": "0.4522433", "text": "function process_the_correct_model(){}", "title": "" }, { "docid": "1c4cbd4118bb0a8bf252621f665413b2", "score": "0.45122734", "text": "function getState()\n {\n }", "title": "" }, { "docid": "aa7e81de02e8ac70597e9565bb64dab7", "score": "0.45121667", "text": "protected function _setStateOrder()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$jinput = $app->input;\n\t\t$view = $jinput->getCmd('view', '');\n\t\t$fcform = $jinput->getInt('fcform', 0);\n\t\t$p = $this->ovid;\n\n\t\t// Use ordering parameter from component configuration if these exist and are set\n\t\t$default_order = $this->cparams->get($view . '_manager_order', $this->default_order);\n\t\t$default_order_dir = $this->cparams->get($view . '_manager_order_dir', $this->default_order_dir);\n\n\t\t$filter_order = $fcform ? $jinput->get('filter_order', $default_order, 'cmd') : $app->getUserStateFromRequest($p . 'filter_order', 'filter_order', $default_order, 'cmd');\n\t\t$filter_order_Dir = $fcform ? $jinput->get('filter_order_Dir', $default_order_dir, 'word') : $app->getUserStateFromRequest($p . 'filter_order_Dir', 'filter_order_Dir', $default_order_dir, 'word');\n\n\t\tif (!$filter_order)\n\t\t{\n\t\t\t$filter_order = $default_order;\n\t\t}\n\n\t\tif (!$filter_order_Dir)\n\t\t{\n\t\t\t$filter_order_Dir = $default_order_dir;\n\t\t}\n\n\t\t$this->setState('filter_order', $filter_order);\n\t\t$this->setState('filter_order_Dir', $filter_order_Dir);\n\n\t\t$app->setUserState($p . 'filter_order', $filter_order);\n\t\t$app->setUserState($p . 'filter_order_Dir', $filter_order_Dir);\n\t}", "title": "" }, { "docid": "75de16e41a93a90544490dbee0ceadc9", "score": "0.4511861", "text": "function setInputModel(InputModel $inputModel);", "title": "" }, { "docid": "f88a0109abbd344a9da033bda5f393f0", "score": "0.44904596", "text": "public function init()\n {\n if ($this->hasModel() && !isset($this->inputOptions['id'])) {\n $this->inputOptions['id'] = Html::getInputId($this->model, $this->attribute);\n }\n parent::init();\n }", "title": "" }, { "docid": "eea2cd09c372b0807ac84383839ccbe8", "score": "0.4484245", "text": "protected function initState()\n {\n $this->state = new WorldState();\n }", "title": "" }, { "docid": "9ef7ceddbd7867d22ddf3769bf9bd638", "score": "0.448025", "text": "public function MakeModel()\n {\n $filename = __DIR__.'/../stubs/module/Models/Model.stub';\n\n $contents = File::get($filename);\n $this->setNamespace('cms'.DIRECTORY_SEPARATOR.$this->modulename.DIRECTORY_SEPARATOR.'Models');\n $contents = $this->changeNamespace($contents);\n $contents = $this->changeClass($contents);\n $contents = $this->changeTable($contents);\n $this->content = $contents;\n $this->makePath('Models');\n\n $this->setPath($this->path.DIRECTORY_SEPARATOR.$this->modulename.DIRECTORY_SEPARATOR.'Models'.DIRECTORY_SEPARATOR.$this->classname.\".php\");\n\n return $this;\n }", "title": "" }, { "docid": "eea60e775745399bb3a4ff6c60b1bea1", "score": "0.44801396", "text": "public function initializeIsIntegrationModel()\n {\n $this->casts = array_merge(\n [\n 'active' => 'boolean',\n 'settings' => 'json',\n 'authentication_required' => 'boolean',\n ],\n $this->casts,\n );\n\n $this->hidden = array_merge(\n [\n 'error_details'\n ],\n $this->hidden,\n );\n\n $this->fillable = array_merge(\n ['name', 'key', 'version', 'model_type', 'model_id', 'uuid', 'settings', 'active'],\n $this->fillable,\n );\n }", "title": "" }, { "docid": "408667bd64e27864e1a54d6b5d5711d8", "score": "0.44764784", "text": "public function run()\n {\n //State Arr\n $states = [\n ['name'=>'Gujarat'],\n ['name'=>'Panjab'],\n ['name'=>'Maharashtra'],\n ];\n \\App\\Models\\State::insert($states);\n }", "title": "" }, { "docid": "29e19c8f76983f6dcfc728396855612b", "score": "0.44755095", "text": "abstract protected function createNewModel();", "title": "" }, { "docid": "1b7d735e231569584c3c396bea84c713", "score": "0.4467537", "text": "public function reload()\n {\n $entity = $this->getRemoteEntity();\n $fetchMethod = $this->fetchMethod;\n $this->remoteModels = $entity->$fetchMethod($this->model);\n $this->initialized = true;\n }", "title": "" }, { "docid": "6ee79506d02eb34dc1f8952bda8e35be", "score": "0.44672388", "text": "public function getState_post() {\r\n $StateData = $this->State_model->getState(TRUE, 1, 50);\r\n if (!empty($StateData)) {\r\n $this->Return['Data'] = $StateData['Data'];\r\n }\r\n }", "title": "" }, { "docid": "7ff5c0cc818b2843ac30932261a1ff76", "score": "0.44596803", "text": "public function load()\n\t{\n\t\tif(func_num_args() == 0) return show_error('Try to load model(s), without passing any parameter(s).');\n\n\t\t$models = func_get_args();\n\t\t$this->_load_model($models);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ba8247372f9cae8b3ba7ebf6e8db476b", "score": "0.44406283", "text": "public function model()\n {\n if (is_string($this->modelPlugin) && class_exists($this->modelPlugin) && is_object($this->model)) {\n $this->model->instance = $this->factory($this->modelPlugin);\n // Shorter version for direct plugin access.\n $this->models =& $this->model->instance;\n }\n }", "title": "" }, { "docid": "e60bde6b772257d2ec2b48bfceaafc7d", "score": "0.44385374", "text": "protected function configureModel()\n {\n $this\n ->addArgument(\n 'model',\n Input\\InputArgument::REQUIRED,\n 'Name of model'\n );\n\n return $this;\n }", "title": "" }, { "docid": "ca4727043bcc196bd2c3050b8effb35a", "score": "0.44365084", "text": "private function setDefaultModel() {\n $modelClass = self::MODEL_DIRECTORY_NAMESPACE . self::NAMESPACE_SEPARATOR .\n ucfirst(str_replace(self::POST_CONTROLLER_NAME, '', $this->className)) .\n self::POST_MODEL_NAME;\n if (class_exists($modelClass)) {\n $this->model = new $modelClass();\n }\n }", "title": "" }, { "docid": "b3bfa117ff01ba0981ed90287faee20d", "score": "0.44314128", "text": "public function getNewModel()\n {\n return new $this->model();\n }", "title": "" }, { "docid": "aa56add8d5b2ae20cabedaa2f4efab8d", "score": "0.44284946", "text": "protected function populateState($ordering = null, $direction = null)\r\n\t{\r\n\t\t$app = JFactory::getApplication();\r\n\t\t$this->setState('filter.extension', $this->_extension);\r\n\r\n\t\t$pk = $app->input->getInt('id');\r\n\t\t$this->setState('item.id', $pk);\r\n \r\n $pk = $app->input->getInt('catid');\r\n\t\t$this->setState('catid', $pk);\r\n\r\n\t\t$params = $app->getParams();\r\n\t\t$this->setState('params', $params);\r\n\r\n\t\t$this->setState('filter.published',\t1);\r\n\t\t$this->setState('filter.access',\ttrue);\r\n\t}", "title": "" }, { "docid": "2216d03d8ebd42e2144550d4cea34370", "score": "0.44174087", "text": "public function testModelChangesStateAsExpected()\n\t{\n\t\t$model = Jelly::factory('post');\n\t\t$model->_name = 'Foo';\n\t\t\n\t\t// Keys should now report as changed\n\t\t$this->assertTrue($model->changed('name'));\n\t\t$this->assertTrue($model->changed('_name'));\n\t\t\n\t\t$model->save();\n\t\t\n\t\t// Verify data is as it should be\n\t\t$this->assertTrue($model->saved());\n\t\t$this->assertTrue($model->loaded());\n\t\t$this->assertEquals(array(), $model->changed());\n\t\t$this->assertEquals('Foo', $model->name);\n\t\t\n\t\t// ID should be set\n\t\t$this->assertGreaterThan(0, $model->id);\n\t\t\n\t\t// Set data again, nothing should report as changed\n\t\t$model->name = 'Foo';\n\t\t$this->assertTrue($model->saved());\n\t\t$this->assertEquals(array(), $model->changed());\n\t\t\n\t\t// Change and verify we can update\n\t\t$model->name = 'Bar';\n\t\t$this->assertFalse($model->saved());\n\t\t\n\t\t// Update now\n\t\t$model->save();\n\t\t\n\t\t// Verify data is as it should be\n\t\t$this->assertTrue($model->saved());\n\t\t$this->assertTrue($model->loaded());\n\t\t$this->assertEquals(array(), $model->changed());\n\t\t$this->assertEquals('Bar', $model->name);\n\t\t\n\t\t// Cleanup\n\t\t$model->delete();\n\t}", "title": "" }, { "docid": "b875a7c1e511374b99b65f4ea3c78671", "score": "0.44163844", "text": "public function init()\n {\n $this->_init();\n\n if (isset($this->owner) && $this->owner instanceof \\atk4\\data\\Model) {\n $this->setUp($this->owner);\n }\n }", "title": "" }, { "docid": "6c4a1745ca8a311ebb6a67a2f24b13a1", "score": "0.44163716", "text": "public function beforeSave()\n {\n parent::beforeSave();\n\n if ($this->dataHasChangedFor('actions_serialized')) {\n $this->setData('action_select', null);\n $this->setData('action_select_bind', null);\n }\n\n return $this;\n }", "title": "" }, { "docid": "21547cb2b540fb47ced1484efdbc57e3", "score": "0.44098493", "text": "public function run()\n {\n $state = new State(['started' => false]);\n $state->save();\n }", "title": "" }, { "docid": "d643b73dbfe3700ee1553a6e9d2b2cf4", "score": "0.44067007", "text": "private function populate_model($fetch){\n // populate the model using the rows\n // Get the object properties and remove the ones that should not be added to the DB\n $values = $this->remove_non_db_properties(get_object_vars($this));\n\n // Get the keys for the table\n $keys = array_keys($values);\n\n // assign each key property from the DB search\n foreach ($keys as $key) {\n // Check if key exists in the fetch\n if(array_key_exists($key, $fetch)) {\n $this->$key = $fetch[$key];\n }\n }\n }", "title": "" }, { "docid": "b8d9900c5a327428e4efcf56af67063b", "score": "0.44065708", "text": "public function init(){\n $this->dataobj = new MobileclassifiedsModel();\n $this->dataobj->factoryInit($this);\n $this->initModel();\n }", "title": "" }, { "docid": "8c43dbb12f9473ea1e34b41702bf6a7e", "score": "0.44033214", "text": "public function fillModel(&$model, $input)\n {\n $model->{$this->getOption('foreign_key')} = $input !== 'false' ? $input : null;\n\n $model->__unset($this->getOption('field_name'));\n }", "title": "" }, { "docid": "a2694b1c03ce690f0dd0bd7b5b1ffa2e", "score": "0.44006625", "text": "public function __construct()\n {\n $this->originalState = $this->getPropertiesForIsModified();\n }", "title": "" } ]
90e5b0cba82e2bd7f9510a29f0263efc
///////// Meta // ///////// Get the submission fields
[ { "docid": "3feff3a20c82b295e172e7fb4a904202", "score": "0.7882464", "text": "public function get_submission_fields() {\n\t\treturn $this->get_post_meta( self::$meta_keys['submission'] );\n\t}", "title": "" } ]
[ { "docid": "d62ce129ea76dfcd4df4c0c122b64819", "score": "0.7174065", "text": "public function submissionFields()\n {\n return array(\n 'missing domain' => array('domain'),\n 'missing custom_nameservers' => array('custom_nameservers'),\n 'missing custom_tech_contact' => array('custom_tech_contact'),\n 'missing period' => array('period'),\n 'missing reg_username' => array('reg_username'),\n 'missing reg_password' => array('reg_password'),\n 'missing reg_type' => array('reg_type'),\n );\n }", "title": "" }, { "docid": "b3c7eda4b5ba5c095ea2ecf412363749", "score": "0.6896569", "text": "abstract public function getFormFields();", "title": "" }, { "docid": "c0d666f42222416847304c529ffc16b1", "score": "0.68264526", "text": "private function get_fields() {\n\t\treturn array(\n\t\t\t\"{$this->meta_type}_id\",\n\t\t\t'meta_key',\n\t\t\t'meta_value',\n\t\t);\n\t}", "title": "" }, { "docid": "8b3156a0060d4b73e50153522e222807", "score": "0.6627268", "text": "abstract function get_submitted_edit_form_data();", "title": "" }, { "docid": "1bb23d16795fe05b7f08ca5ec4a1d881", "score": "0.6550489", "text": "function atcf_shortcode_submit_fields() {\r\n\t$submit_campaign = atcf_submit_campaign();\r\n\r\n\t$fields = $submit_campaign->register_fields();\r\n\r\n\treturn $fields;\r\n}", "title": "" }, { "docid": "28f1fe027122888004a7d2c231d888e6", "score": "0.653327", "text": "function getFieldsForHTML(){\r\n\t\t//purely used by code.\r\n\t\treturn $this->getFields();\r\n\t}", "title": "" }, { "docid": "27fc3f13e02df939fcac8538fca2b985", "score": "0.652992", "text": "function flow_elated_get_quote_meta_fields(){\n\t\t\n\t\t$quote_params = array();\n\t\t$quote_text = '';\n\t\t$quote_author = '';\n\t\t$meta_text = esc_html(get_post_meta(get_the_ID(), \"eltd_post_quote_text_meta\", true));\n\t\t$meta_author = esc_html(get_post_meta(get_the_ID(), \"eltd_post_quote_author_meta\", true));\n\t\t\n\t\tif($meta_text != ''){\n\t\t\t$quote_text = $meta_text;\n\t\t}\n\t\tif($meta_author != ''){\n\t\t\t$quote_author = $meta_author;\n\t\t}\n\t\t\n\t\t$quote_params['quote_text'] = $quote_text;\n\t\t$quote_params['quote_author'] = $quote_author;\n\t\t\n\t\treturn $quote_params;\n\t}", "title": "" }, { "docid": "96b21f080d756be77b096fe673988132", "score": "0.6526923", "text": "private function get_form_elements(){\n\t\treturn $this->fields;\n\t}", "title": "" }, { "docid": "e7fe97dc68d305de5bb44ccebb448fc7", "score": "0.6525639", "text": "public static function getMetaFields()\n {\n return [];\n }", "title": "" }, { "docid": "f6944227b15303738e480718e3581aac", "score": "0.65201974", "text": "function getFormFields() {\n return $this->formFields;\n }", "title": "" }, { "docid": "301c3e74e89d6e9392f688d05258bbd8", "score": "0.647332", "text": "function get_fields ()\r\n {\r\n return $this->fields;\r\n }", "title": "" }, { "docid": "8a353e103172eb50a6f119136dcc7768", "score": "0.64069676", "text": "public function getFields() {\n return $this->form_fields;\n }", "title": "" }, { "docid": "a5b7b0fdf68a14811611383231b55e8d", "score": "0.6403772", "text": "public function get_fields() {\n\n\t\t$this->fields = array();\n\t\t$this->load_fields();\n\n\t\t// Load extra fields for workflow action.\n\t\tdo_action( $this->name . '_load_extra_fields', $this );\n\n\t\treturn $this->fields;\n\t}", "title": "" }, { "docid": "bd6ff93cf87686da91376ee79ee36118", "score": "0.6395792", "text": "public function getMeta()\n {\n if (!isset($this->_meta)) {\n $this->setMeta(array(\n 'formName' =>$this->name,\n 'isNewRecord' =>$this->owner->isNewRecord,\n 'primaryKey' =>$this->owner->primaryKey,\n ));\n }\n return $this->_meta;\n }", "title": "" }, { "docid": "a68647f31e7331f158671b8750ab19ed", "score": "0.6391244", "text": "public function instance_fields() { \n\n\t\t$fields['name'] \t= array('description'=>_('Instance Name'),'type'=>'textbox'); \n\t\t$fields['pid'] \t\t= array('description'=>_('PID File'),'type'=>'textbox'); \n\t\t$fields['playlist']\t= array('description'=>_('Playlist File'),'type'=>'textbox'); \n\t\t$fields['local_root']\t= array('description'=>_('Local Path to Files'),'type'=>'textbox'); \n\n\t\treturn $fields; \n\n\t}", "title": "" }, { "docid": "24a41100a21b0276d5d167558331c0c8", "score": "0.6377032", "text": "public static function getFormData()\n {\n $db = JFactory::getDBO();\n $db->setQuery(\"SHOW COLUMNS FROM #__jsn_uniform_submissions\");\n return $db->loadObjectList();\n }", "title": "" }, { "docid": "dfc9f81ca1a7f115ce170dcb08cbf7d8", "score": "0.6350067", "text": "public function getFeedSubmissionInfo()\n {\n return $this->fields['FeedSubmissionInfo']['FieldValue'];\n }", "title": "" }, { "docid": "e877cbe0a633d31a03d3269eac38beab", "score": "0.6333744", "text": "function formfields() //pour tous les objets (YO OVERWRITE !!)\n\t{\n\t\t$fields = $this->u_formfields();\n\t\t\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "3ae286ba57d50534f7898a5b81f47988", "score": "0.63155097", "text": "public function fields(){\n\n\t\treturn WP_Job_Manager_Field_Editor_Fields::get_instance();\n\n\t}", "title": "" }, { "docid": "a5972bb58d7404f51894ae7cfd588d9a", "score": "0.62823087", "text": "protected function getPostFields(): array\n {\n return [\n 'code' => true,\n 'name' => true,\n 'scope' => true,\n 'members' => true\n ];\n }", "title": "" }, { "docid": "2498cef5d0b4986c96a34a035f56400d", "score": "0.62755215", "text": "private function get_mapped_field_entry_data() {\n\t\t$akismet_fields = array(\n\t\t\t'comment_type' => 'gravity_form',\n\t\t);\n\n\t\tforeach ( $this->get_form_settings_values() as $key => $value ) {\n\t\t\t$akismet_fields[ $key ] = $this->get_mapped_form_settings_value_from_entry( $value );\n\t\t}\n\n\t\treturn $akismet_fields;\n\t}", "title": "" }, { "docid": "366ebcaa2cc3206274b70f9dda513710", "score": "0.62695986", "text": "protected function fields() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "ebabcf0aec3d1afb6c42812a329d29a4", "score": "0.6269157", "text": "function prepare_meta_form() {}", "title": "" }, { "docid": "bf03516bdb636f0fa87f0749f97c77ef", "score": "0.62618643", "text": "protected function form_fields() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'name' => 'header',\n\t\t\t\t'desc' => __( 'Title:', APP_TD ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'name' => 'description',\n\t\t\t\t'desc' => __( 'Description:', APP_TD ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'select',\n\t\t\t\t'name' => 'layout',\n\t\t\t\t'desc' => __( 'Layout type:', APP_TD ),\n\t\t\t\t'choices' => array( 'grid' => __( 'Grid', APP_TD ), 'list' => __( 'List', APP_TD ) ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'number',\n\t\t\t\t'name' => 'grid_cols',\n\t\t\t\t'desc' => __( 'Number of columns in a grid:', APP_TD ),\n\t\t\t\t'extra' => array(\n\t\t\t\t\t'class' => 'widefat',\n\t\t\t\t\t'min' => 1,\n\t\t\t\t\t'max' => 8,\n\t\t\t\t\t'step' => 1,\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'name' => 'category__in',\n\t\t\t\t'desc' => __( 'Filter posts by category.', APP_TD ) . \" \" . __( 'Enter categories IDs delimited by comma:', APP_TD ),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "da7118f7abb49cd2bba63e6c447cd4d8", "score": "0.62450373", "text": "public static function getFields() {\n return array(\n 'title' => 'Titre',\n 'description' => 'Description'\n );\n }", "title": "" }, { "docid": "9ffe56eceba397e3d45af95ed303fd27", "score": "0.62305975", "text": "function getRequiredFields(){\n\t\treturn $this->requiredFields;\n\t}", "title": "" }, { "docid": "33db475a19db2bd56da44e9ba4954620", "score": "0.6225184", "text": "protected function getFields()\n\t{\n\t\treturn $this->field_data;\n\t}", "title": "" }, { "docid": "1f051a50aa1850124792e4d853f1e349", "score": "0.62080204", "text": "abstract function get_edit_form_fields();", "title": "" }, { "docid": "3c2354f2f3c1162ddf3de9739d5abec3", "score": "0.62046254", "text": "public function fields_AllWithMeta(){\n return $this->fields('all_with_meta');\n }", "title": "" }, { "docid": "0d7a2779876b4648d841e0fe17030da9", "score": "0.61969304", "text": "protected function getBlogPostFormFields() {\n\t\t$postFormFields = $this->enabledFields;\n\t\tif ($this->conf['useCaptcha'] == 1) {\n\t\t\tarray_push($postFormFields, 'captcha', 'captchaimage');\n\t\t}\n\t\tif ($this->conf['uploadAllowed'] == 1){\n\t\t\tarray_push($postFormFields, 'fileupload', 'maxFileSize');\n\t\t}\n\t\tif ($this->conf['subscribeForComments'] == 1) {\n\t\t//TODO imlement subscription for comments\n\t\t\t//array_push($postFormFields, 'subscribe');\n\t\t}\n\t\t\n\t\t// add all requiredFields if not already in array\n\t\tforeach ($this->requiredFields as $fieldName){\n\t\t\tif (!in_array($fieldName, $postFormFields, true)){\n\t\t\t\tarray_push($postFormFields, $fieldName);\n\t\t\t}\n\t\t}\n\t\t\n/*\t\t//devlog\n\t\t$this->msg = 'getBlogPostFormFields';\n\t\t$this->severity = 0;\n\t\t$this->dataVar = array(\n\t\t\t'postFormFields' => $postFormFields\n\t\t\t);\n\t\tt3lib_div::devLog($this->msg, $this->extKey, $this->severity, $this->dataVar);\n\t\t// devlog end*/\n\t\t\n\t\treturn $postFormFields;\n\t}", "title": "" }, { "docid": "db371fbab0f1436bb414cbfccd5ef134", "score": "0.6186512", "text": "public function getForm();", "title": "" }, { "docid": "db371fbab0f1436bb414cbfccd5ef134", "score": "0.6186512", "text": "public function getForm();", "title": "" }, { "docid": "db371fbab0f1436bb414cbfccd5ef134", "score": "0.6186512", "text": "public function getForm();", "title": "" }, { "docid": "db371fbab0f1436bb414cbfccd5ef134", "score": "0.6186512", "text": "public function getForm();", "title": "" }, { "docid": "292d9f5308c2d6a785a7e9064245ba6f", "score": "0.618549", "text": "public function get_fields( $settings, $form, $entry, $action, $akismet_fields = array() ) {\n\t\t$this->hydrate( $settings, $form, $entry, $action );\n\n\t\t// Use this variable instead of reassigning $akismet_fields to make it clear that we never use the original data.\n\t\t$initial_prepared_fields = $this->initialize_akismet_fields();\n\t\t$additional_fields = array(\n\t\t\t'comment_author_IP' => $this->ip,\n\t\t\t'user_ip' => $this->ip,\n\t\t\t'permalink' => rgar( $this->entry, 'source_url' ),\n\t\t\t'user_agent' => rgar( $this->entry, 'user_agent' ),\n\t\t\t'referrer' => $this->action === 'submit' ? rgar( $_SERVER, 'HTTP_REFERER' ) : '',\n\t\t\t'blog' => get_option( 'home' ),\n\t\t\t'blog_lang' => get_locale(),\n\t\t\t'blog_charset' => get_option( 'blog_charset' ),\n\t\t);\n\n\t\tif ( $this->action !== 'submit' ) {\n\t\t\t$additional_fields['comment_date_gmt'] = rgar( $this->entry, 'date_created' );\n\t\t}\n\n\t\tif ( Akismet::is_test_mode() || stripos( $additional_fields['permalink'], 'gf_page=preview&id=' . rgar( $this->form, 'id' ) ) !== false ) {\n\t\t\t// Prevent test submissions training the Akismet filters.\n\t\t\t$additional_fields['is_test'] = 'true';\n\t\t} elseif ( ! empty( $this->entry['created_by'] ) ) {\n\t\t\t// Akismet will return false for admins.\n\t\t\t$additional_fields['user_role'] = Akismet::get_user_roles( $this->entry['created_by'] );\n\t\t}\n\n\t\t$this->prepared_fields = array_merge( $initial_prepared_fields, $additional_fields );\n\n\t\treturn $this->prepared_fields;\n\t}", "title": "" }, { "docid": "d54fe65cfe8cedcbd0c55d47de13cfe7", "score": "0.61843616", "text": "function librafireEmployeeMeta()\n{\n\tglobal $post;\n\n\t// Nonce field to validate form request came from current site\n\twp_nonce_field(basename(__FILE__), 'employee_fields');\n\n\t// Get the employee data if it's already been entered\n\t$employee = get_post_meta($post->ID, 'employee', true);\n\n\t// Output the field\n\techo '<input type=\"text\" name=\"employee\" value=\"' . esc_textarea($employee) . '\" class=\"widefat\">';\n}", "title": "" }, { "docid": "cac32e2d8be97da0bb7fa6faa63f0ede", "score": "0.61767405", "text": "public function getFields(){\n $ret_map = array();\n\n foreach($this as $name => $field){\n \n // canary, skip submit buttons...\n if($field instanceof Submit){ continue; }//if\n \n $ret_map[$name] = $field;\n\n }//foreach\n\n return $ret_map;\n\n }", "title": "" }, { "docid": "704b1f18748d5063abbf0cba717f18c0", "score": "0.61650115", "text": "public function get_view_fields()\n {\n do {\n display ( \"Enter a field: ( name:data type:max length ) \\n\" );\n $field = get_input ();\n\n if ($field != 'n') {\n $x = explode ( \":\", $field );\n\n $this->_fields[ $x[ 0 ] ] = array( 'name' => $x[ 0 ],\n 'data_type' => $x[ 1 ],\n 'length' => $x[ 2 ] );\n }\n\n } while ( $field != 'n' );\n }", "title": "" }, { "docid": "b71bbc15ea293cf5f9c8129a7e7395fd", "score": "0.616344", "text": "public static function getFormFields()\n {\n return array (\n array (\n \"Field\" => \"Name\",\n \"Type\" => \"text\",\n \"Label\" => \"Your name\"\n ),\n array (\n \"Field\" => \"Email\",\n \"Type\" => \"email\",\n \"Label\" => \"Your email address\"\n ),\n array (\n \"Field\" => \"Message\",\n \"Type\" => \"textarea\",\n \"Label\" => \"Your message\"\n ),\n );\n }", "title": "" }, { "docid": "5a02f76dd80dd00d72d931a0196c4964", "score": "0.61488926", "text": "function et_lead_gen_get_fields() {\n\t$fields = array(\n\t\t'name' => array(\n\t\t\t'label' => __( 'Name', 'et-lead-gen' ),\n\t\t\t'type' => 'text',\n\t\t\t'required' => 'required',\n\t\t),\n\t\t'phone' => array(\n\t\t\t'label' => __( 'Phone Number', 'et-lead-gen' ),\n\t\t\t'type' => 'text',\n\t\t\t'required' => 'required',\n\t\t),\n\t\t'email' => array(\n\t\t\t'label' => __( 'Email Address', 'et-lead-gen' ),\n\t\t\t'type' => 'email',\n\t\t\t'required' => 'required',\n\t\t),\n\t\t'budget' => array(\n\t\t\t'label' => __( 'Desired Budget', 'et-lead-gen' ),\n\t\t\t'type' => 'number',\n\t\t\t'required' => 'required',\n\t\t),\n\t\t'message' => array(\n\t\t\t'label' => __( 'Message', 'et-lead-gen' ),\n\t\t\t'type' => 'textarea',\n\t\t),\n\t);\n\n\treturn $fields;\n}", "title": "" }, { "docid": "6c924651b838c4a4045f856b6ebb382c", "score": "0.61300385", "text": "public function get_meta() {\n\n\t\tcheck_ajax_referer( 'tb_save_layout', 'security' );\n\n\t\techo get_post_meta( $_POST['post_id'], $_POST['key'], true );\n\n\t\tdie();\n\n\t}", "title": "" }, { "docid": "09b9593f84f8f0e56dd6ebde9b970546", "score": "0.61152065", "text": "function revision_meta_fields( $fields ) {\n\t\t$fields[ $this->revision_meta_key ] = __( 'Meta Fields', 'fieldmanager-revisions' );\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "4596c426011ac33e5ab50e7ad2d2aef4", "score": "0.6114389", "text": "function MetadataEntryForm() {\n\t\t// create a registerForm (uses the static searchForm value)\n\t\t$registerForm = self::get_registration_form_name();\n\t\t\n\t\t$form = new $registerForm($this,'MetadataEntryForm');\t\t\n\t\t\n\t\t// \n\t\t\n\t\t//SpamProtectorManager::update_form($form, null, array('Title', 'Content', 'Name', 'Website', 'Email'));\n\t\t///SpamProtectorManager::update_form($form);\n\t\t\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "ef0cfbc8d9a74a30585a7c49c1d67227", "score": "0.6098008", "text": "function readForm() {\n\t\t$this->ObjectID = $this->formHelper(\"ObjectID\", 0);\n\t\t$this->NetBeheerderID = $this->formHelper(\"NetBeheerderID\", 0);\n\t\t$this->LeverancierID = $this->formHelper(\"LeverancierID\", 0);\n\t\t$this->IngangsDatumLeverancier = $this->formHelper(\"IngangsDatumLeverancier\", \"\");\n\t\t$this->StroomType = $this->formHelper(\"StroomType\", 0);\n\t\t$this->ContractNummerNetbeheerder = $this->formHelper(\"ContractNummerNetbeheerder\", \"\");\n\t\t$this->ContractNummerLeverancier = $this->formHelper(\"ContractNummerLeverancier\", \"\");\n\t\t$this->GewijzigdDoor = $this->formHelper(\"GewijzigdDoor\", 0);\n\t\t$this->GewijzigdOp = $this->formHelper(\"GewijzigdOp\", \"\");\n\t}", "title": "" }, { "docid": "1c97bc1e78a0b0a9e85ee02f0886153a", "score": "0.60934454", "text": "public function set_submission_fields( $fields = array() ) {\n\t\t$this->save_post_meta( array(\n\t\t\tself::$meta_keys['submission'] => $fields,\n\t\t) );\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "416e3fd6ad9f97cc5a9d65d0fdc4bb00", "score": "0.6091263", "text": "abstract protected function getRequiredFields();", "title": "" }, { "docid": "4606dadfa9a79ebae04f82045a3e5ae7", "score": "0.60857034", "text": "public function getFields() {\n\n $fields = array(\"consumer_id\" => array('required'=> true, 'type'=>'hidden', 'disableDecorator' => array('HtmlTag', 'Label', 'DtDdWrapper')),\n \"date\" => array('label'=>'Date', 'required'=> true, 'attributes'=> array('class'=>'date_widget')),\n \"description\"=>array('label'=>'Description', 'required'=> true, 'attributes'=>array('rows'=>'4', 'cols'=>'8')), \n \"result\"=>array('label'=>'Result', 'required'=> false, 'attributes'=>array('rows'=>'4', 'cols'=>'8') ));\n \n if( isset( $this->_id ) ) {\n \n $fields['id'] = array('default'=>$this->_id, 'type'=>'hidden', 'required'=> true,\n 'disableDecorator' => array('HtmlTag', 'Label', 'DtDdWrapper')); \n }\n \n return $fields;\n }", "title": "" }, { "docid": "9482d566d5c54be3f87bdabb2e9fa0f2", "score": "0.6082324", "text": "public function getPostFields()\n {\n return $this->route;\n }", "title": "" }, { "docid": "abf27fadd65deb38a35a20ac8b1ee5db", "score": "0.6068035", "text": "function u_formfields() //pour cet objet uniquement\n\t{\n\t\t//print_r(get_object_vars($this->form_data));\n\t\t$liste = array();\n\t\tforeach($this->form as $name=>$Ffield) \n\t\t{\t\t\t \n\t\t\t$liste[$name] = $Ffield->get($this->getformdata($name));\n\t\t}\n\t\t\n\t\treturn $liste;\n\t}", "title": "" }, { "docid": "61d9af6e7003eaa63278928dfae151de", "score": "0.60677856", "text": "public function get_form_data() {\n\t\t\treturn $this->form_data;\n\t\t}", "title": "" }, { "docid": "872a96cf1c0f3e04e46e0aa2a0e9a964", "score": "0.6056315", "text": "public function fields()\n\t{\n\t\t$fields = array(\n\t\t\t'tech_title'\t=> array(\n\t\t\t\t'label'\t\t\t=> __( 'Title', 'purple' ),\n\t\t\t\t'option'\t\t=> 'tech_title',\n\t\t\t),\n\t\t\t'tech_items'\t=> array(\n\t\t\t\t'label'\t\t\t=> __( 'Items to display (coma separated)', 'purple' ),\n\t\t\t\t'option'\t\t=> 'tech_items',\n\t\t\t),\n\t\t);\n\n\t\t/**\n\t\t * Filters the Tech Options fields\n\t\t * @param array $fields\n\t\t *\n\t\t * @since Purple 1.0.0\n\t\t */\n\t\treturn apply_filters( 'purple_tech_fields', $fields );\n\t}", "title": "" }, { "docid": "2ef0929111da4e66cb0e6dd13ee9fbca", "score": "0.60560864", "text": "protected function getSubmissionData()\n {\n $dt = Loader::helper('form/date_time');\n $text = Loader::helper('text');\n\n $submission = array();\n foreach ($this->post() as $key => $value) {\n if ($key != 'submit') {\n if (!is_array($value)) {\n if ($key == $this->config->honeypotHandle) {\n $submission['honeypot'] = $text->sanitize(trim($value));\n } else {\n $submission[$key] = $text->sanitize(trim($value));\n }\n } elseif (is_array($value) && count($value) > 0) {\n $submission[$key] = $text->sanitize(trim(implode(\",\", $value)));\n }\n }\n }\n\n return $submission;\n }", "title": "" }, { "docid": "4b6c58585d8af46c5c5d6449043ba2ed", "score": "0.6048408", "text": "public function get_custom_meta_fields() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "2b1c4cc66cb96e969109b6d1b8c172a9", "score": "0.6021834", "text": "protected function _get_meta_vars()\n\t{\n\t\t$meta = $_POST['meta'];\n\n\t\tif (empty($meta))\n\t\t{\n\t\t\tthrow new Channel_form_exception(lang('form_decryption_failed'));\n\t\t}\n\n\t\t$meta = ee('Encrypt')->decode($meta, ee()->config->item('session_crypt_key'));\n\n\t\t$this->_meta = unserialize($meta);\n\n\t\tif ( ! isset($this->_meta['decrypt_check']))\n\t\t{\n\t\t\tthrow new Channel_form_exception(lang('form_decryption_failed'));\n\t\t}\n\n\t\tforeach ($this->all_params as $name)\n\t\t{\n\t\t\t$this->_meta[$name] = (isset($this->_meta[$name])) ? $this->_meta[$name] : FALSE;\n\t\t\t// none of these fields are allowed by direct POST\n\n\t\t\t// url_title in the meta array tells us which entry we're editing, not what\n\t\t\t// to set the url_title to, so allow it to be in POST for editing;\n\t\t\t// Do not allow category or allow_comments to be overridden by POST\n\t\t\t// if set as a parameter\n\t\t\tif ($name == 'url_title' OR\n\t\t\t\t($name == 'category' && $this->_meta[$name] === FALSE) OR\n\t\t\t\t($name == 'allow_comments' && $this->_meta[$name] === FALSE))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tunset($_POST[$name]);\n\t\t}\n\n\t\t// Override allow_comments in POST if its set as a param\n\t\tif (($allow_comments = $this->bool_string($this->_meta['allow_comments'], NULL)) !== NULL)\n\t\t{\n\t\t\t$_POST['allow_comments'] = $allow_comments ? 'y' : 'n';\n\t\t}\n\n\t\tif ($this->_meta['category'] !== FALSE)\n\t\t{\n\t\t\t$this->_meta['category'] = array_filter(explode('|', $this->_meta['category']), function($cat)\n\t\t\t{\n\t\t\t\treturn is_numeric($cat);\n\t\t\t});\n\t\t}\n\n\t\t$this->_meta['channel_id'] = ($this->_meta['channel_id'] != FALSE) ? $this->_meta['channel_id'] : $this->_meta['channel'];\n\n\t\t//is an edit form? This seems madly overkill\n\t\tif ($this->_meta['require_entry'])\n\t\t{\n\t\t\t$this->_meta['entry_id'] = $this->_meta['require_entry'];\n\t\t}\n\t}", "title": "" }, { "docid": "5b74ef328e630e4f226d73b2a5301d5d", "score": "0.600343", "text": "public function getPostFields(): array\n {\n return $this->postFields;\n }", "title": "" }, { "docid": "4a34c5477388712a2aac615c557caff2", "score": "0.59969676", "text": "public function fields(Request $request)\n {\n return [\n ID::make()->sortable(),\n BelongsTo::make('Market'),\n Text::make('Slug')\n ->sortable()\n ->rules('required', 'max:255'), \n Text::make('Title')\n ->sortable()\n ->rules('required'),\n Froala::make('Content')\n ->withFiles('trix'),\n Images::make('Images', 'slider')\n ->customPropertiesFields([\n Text::make('Credit'),\n Textarea::make('Caption'),\n ])\n ->conversion('full')\n ->conversionOnView('card')\n ->thumbnail('card')\n ->multiple()\n ->fullSize() \n ->hideFromIndex(),\n ];\n }", "title": "" }, { "docid": "698d18d27150a96c1bab7d423c5e820e", "score": "0.5995631", "text": "public function getFields()\n {\n return $this->action->getFields();\n }", "title": "" }, { "docid": "4d3916726e1442d67934cf19a95dbb23", "score": "0.5978279", "text": "function jr_get_resume_listing_fields() {\n\n\t$fields = array(\n\t\t'desired_salary' => '_desired_salary',\n\t\t'desired_position' => '_desired_position',\n\t\t'mobile' => '_mobile',\n\t\t'tel' => '_tel',\n\t\t'email_address' => '_email_address',\n\t\t'education' => '_education',\n\t\t'experience' => '_experience',\n\t\t'skills' => '_skills',\n\t);\n\treturn apply_filters( 'jr_resume_fields', $fields, $_POST );\n}", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5971604", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5971604", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5971604", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5971604", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5971604", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5971604", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5971604", "text": "public function getFields();", "title": "" }, { "docid": "ca8fdcc805bd2d6076ccf78b426a03b4", "score": "0.5970998", "text": "public function fields() {\n $f = [\n 'id' => 'id',\n 'lk' => 'lk',\n 'isDeleted' => 'is_deleted',\n 'level' => 'level',\n 'thread' => 'thread',\n 'timestamp' => 'time_created',\n 'body' \t=> 'body_jvx',\n 'author'\t=> 'author'\n ];\n\n return $f;\n }", "title": "" }, { "docid": "c0ac46512424d32ef6979cf503aa7535", "score": "0.59696066", "text": "public function getCMSFields() {\n\t}", "title": "" }, { "docid": "2427ddc82294ef0666707d23ebe28b6d", "score": "0.5964317", "text": "function get_fields_from_post(){\r\n\t\t$this->name=htmlentities($_POST[$this->ddbb_name]);\r\n\t\t$this->name_web=htmlentities($_POST[$this->ddbb_name_web]);\r\n\t\t$this->descrip=htmlentities($_POST[$this->ddbb_descrip]);\r\n\t\t//Cogemos los checkboxn de modulos-grupos\r\n\t\t$this->get_modules_methods_from_post();\r\n\r\n\t\treturn 0;\r\n\t}", "title": "" }, { "docid": "9d336b98ea9f21c380e6ef9bf79e1d89", "score": "0.59594214", "text": "protected function _getFields()\n\t{\n\t\treturn array(\n\t\t\t'kmkform__field' => array(\n\t\t\t\t'field_id' => array('type' => self::TYPE_UINT, 'autoIncrement' => true),\n\t\t\t\t'type'\t\t\t\t\t=> array('type' => self::TYPE_STRING, 'default' => 'user', 'allowedValues' => array('user', 'template', 'global')),\n\t\t\t\t'parent_field_id'\t\t=> array('type' => self::TYPE_UINT),\n\t\t\t\t'form_id'\t\t\t\t=> array('type' => self::TYPE_UINT),\n\t\t\t 'page_id' => array('type' => self::TYPE_UINT),\n\t\t\t\t'display_order' => array('type' => self::TYPE_UINT),\n\t\t\t\t'field_name'\t\t\t=> array('type' => self::TYPE_STRING, 'maxLength' => 25, 'required' => true, 'verification' => array('KomuKu_SimpleForms_DataWriter_Helper_Field', 'VerifyFieldName')),\n\t\t\t\t'field_type' => array('type' => self::TYPE_STRING, 'default' => 'textbox',\n\t\t\t\t\t'allowedValues' => array('textbox', 'textarea', 'select', 'radio', 'checkbox', 'multiselect', 'wysiwyg', 'date', 'rating', 'datetime', 'time')\n\t\t\t\t),\n\t\t\t\t'field_choices' => array('type' => self::TYPE_SERIALIZED, 'default' => ''),\n\t\t\t\t'match_type' => array('type' => self::TYPE_STRING, 'default' => 'none',\n\t\t\t\t\t'allowedValues' => array('none', 'number', 'alphanumeric', 'email', 'url', 'regex', 'callback')\n\t\t\t\t),\n\t\t\t\t'match_regex' => array('type' => self::TYPE_STRING, 'default' => '', 'maxLength' => 250),\n\t\t\t\t'match_callback_class' => array('type' => self::TYPE_STRING, 'default' => '', 'maxLength' => 75),\n\t\t\t\t'match_callback_method' => array('type' => self::TYPE_STRING, 'default' => '', 'maxLength' => 75),\n\t\t\t\t'max_length' => array('type' => self::TYPE_UINT),\n\t\t\t\t'min_length' => array('type' => self::TYPE_UINT),\n\t\t\t\t'required' => array('type' => self::TYPE_BOOLEAN),\n\t\t\t\t'hide_title'\t\t\t=> array('type' => self::TYPE_BOOLEAN, 'default' => 0),\n\t\t\t\t'default_value'\t\t\t=> array('type' => self::TYPE_STRING, 'default' => '', 'verification' => array('KomuKu_SimpleForms_DataWriter_Helper_Field', 'VerifyDefaultValue')),\n\t\t\t\t'placeholder'\t\t\t=> array('type' => self::TYPE_STRING, 'default' => ''),\n\t\t\t\t'active'\t\t\t\t=> array('type' => self::TYPE_BOOLEAN),\n\t\t\t\t'pre_text'\t\t\t\t=> array('type' => self::TYPE_STRING, 'default' => ''),\n\t\t\t\t'post_text'\t\t\t\t=> array('type' => self::TYPE_STRING, 'default' => '')\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "c3d818b0c88985626616fb285713cd58", "score": "0.5959198", "text": "function getFields()\n {\n return $this->_fields;\n }", "title": "" }, { "docid": "c44ecce6fdc089431ffe494e100fc4e8", "score": "0.5950091", "text": "public function getDetailsSubmitted() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"details_submitted\");\n\t}", "title": "" }, { "docid": "e8e8b4be3b2af41c51a1420cf134ce5c", "score": "0.594538", "text": "public function getSubmissionData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "e8e8b4be3b2af41c51a1420cf134ce5c", "score": "0.594538", "text": "public function getSubmissionData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "e8e8b4be3b2af41c51a1420cf134ce5c", "score": "0.594538", "text": "public function getSubmissionData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "e8e8b4be3b2af41c51a1420cf134ce5c", "score": "0.594538", "text": "public function getSubmissionData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "e8e8b4be3b2af41c51a1420cf134ce5c", "score": "0.594538", "text": "public function getSubmissionData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "e8e8b4be3b2af41c51a1420cf134ce5c", "score": "0.594538", "text": "public function getSubmissionData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "25b5c88af3e9ba7ad41d5a606a423734", "score": "0.59431267", "text": "private function widget_fields() {\n $fields = array(\n 'section_title' => array(\n 'shopay_widgets_name' => 'section_title',\n 'shopay_widgets_title' => __( 'Section Title', 'shopay' ),\n 'shopay_widgets_default' => __( 'Sponsors', 'shopay' ),\n 'shopay_widgets_field_type' => 'text'\n ),\n\n 'section_info' => array(\n 'shopay_widgets_name' => 'section_info',\n 'shopay_widgets_title' => __( 'Info', 'shopay' ),\n 'shopay_widgets_description' => sprintf( __( 'Sponsors items are managed from %1$s customizer panel %2$s.', 'shopay' ), '<a href=\"'. esc_url( admin_url( '/customize.php?autofocus[section]=shopay_section_home_sponsors' ) ) .'\">', '</a>' ),\n 'shopay_widgets_field_type' => 'info'\n )\n\n );\n return $fields;\n }", "title": "" }, { "docid": "8df5b9c96ab0642f932d2e70445bfd78", "score": "0.5938093", "text": "public function getFields()\n\t{\n\t\treturn $this->fields; \n\n\t}", "title": "" }, { "docid": "6f1f00cee400c15825d63657a60bc0fe", "score": "0.59359914", "text": "public function getFormField() {\n\t\tuser_error(\"Please implement a getFormField() on your EditableFormClass \". $this->ClassName, E_USER_ERROR);\n\t}", "title": "" }, { "docid": "36b68bc367a55148485236f46c62636c", "score": "0.5932856", "text": "public function getFields()\r\n {\r\n $fields = parent::getFields();\r\n if (!in_array('score', $fields)) {\r\n $fields[] = 'score';\r\n }\r\n\r\n return $fields;\r\n }", "title": "" }, { "docid": "dd222d390ca0f080c55cefdd06b42119", "score": "0.5927816", "text": "public function fields() {\n\t\t$location = array(\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'param' => 'options_page',\n\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t'value' => 'message-settings',\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\tif ( function_exists( 'acf_add_local_field_group' ) ) {\n\n\t\t\tacf_add_local_field_group(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'group_' . $this->key,\n\t\t\t\t\t'title' => __( 'Message Options Fields', 'leagle' ),\n\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'key' => 'field_' . $this->key,\n\t\t\t\t\t\t\t'label' => __( 'Partners', 'leaglecup' ),\n\t\t\t\t\t\t\t'name' => 'partners',\n\t\t\t\t\t\t\t'type' => 'gallery',\n\t\t\t\t\t\t\t'return_format' => 'url',\n\t\t\t\t\t\t\t'library' => 'all',\n\t\t\t\t\t\t\t'insert' => 'append',\n\t\t\t\t\t\t\t'preview_size' => 'medium',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'location' => $location,\n\t\t\t\t)\n\t\t\t);\n\n\t\t}\n\t}", "title": "" }, { "docid": "c9615193f9498d9b9ecc8d9cb6d31752", "score": "0.5916443", "text": "abstract public function getForm();", "title": "" }, { "docid": "94399e399f5dbb0bae23fa35a7d0edc6", "score": "0.59121495", "text": "static public function fields() {\n return array();\n }", "title": "" }, { "docid": "3f698b345394744dda9145e6e8e4640b", "score": "0.5911565", "text": "public function fields()\n {\n return array_merge(\n parent::fields()\n );\n }", "title": "" }, { "docid": "c80c74b4342d5192485c0766c6a46252", "score": "0.5910058", "text": "function be_attachment_field_credit( $form_fields, $post ) {\n $form_fields['be-photographer-name'] = array(\n 'label' => 'Photographer Name',\n 'input' => 'text',\n 'value' => get_post_meta( $post->ID, 'be_photographer_name', true ),\n 'helps' => 'If provided, photo credit will be displayed',\n );\n\n $form_fields['be-photographer-url'] = array(\n 'label' => 'Photographer URL',\n 'input' => 'text',\n 'value' => get_post_meta( $post->ID, 'be_photographer_url', true ),\n 'helps' => 'Add Photographer URL',\n );\n\n return $form_fields;\n}", "title": "" }, { "docid": "8740fa0e8746a5a4bf302a2d07d26b4c", "score": "0.59083974", "text": "function lpop_gform_get_entry ( $attrs )\r\n{\r\n /* Parse the id */\r\n $entry = RGFormsModel::get_lead( 1 );\r\n $form = GFFormsModel::get_form_meta( $entry['form_id'] );\r\n\r\n LPOP_Logger::logit ( \"Loading Mini Audits: Form = \" .\r\n\t\t\t $form['title'] . \", Entry = \" . $entry['id'] );\r\n LPOP_Mini_Audits::process_mini_audit_entry( $entry );\r\n LPOP_Logger::flush();\r\n}", "title": "" }, { "docid": "8a49fff150a2854c966f7fa2c5886a1f", "score": "0.59079164", "text": "protected function fields()\n {\n\n $this->request->route()->setParameter('resource', $this->parentForm->resourceName);\n\n $fields = $this->filterFields()->map(function ($field) {\n if ($field instanceof NestedForm) {\n $field->attribute = $this->attribute($field->attribute);\n } else {\n $field->withMeta([\n 'attribute' => $this->attribute($field->attribute),\n 'originalAttribute' => $field->attribute\n ]);\n }\n\n $field->resolve($this->model);\n\n return $this->setComponent($field)->jsonSerialize();\n })->values();\n\n\n $this->request->route()->setParameter('resource', $this->parentForm->viaResource);\n\n return $fields;\n }", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.5905553", "text": "public function fields();", "title": "" }, { "docid": "cb4f9cb0bbe308062534b388bae36fdd", "score": "0.5902679", "text": "public function getFields()\n {\n $res = [];\n\n // mapa de campos del formulario de donde se genero el lead\n $form_fields_map = [];\n if($this->form){\n $form_fields_map = $this->form->getFields();\n }\n\n $fields = unserialize($this->data);\n foreach ($fields as $key => $value) {\n\n $item = new \\stdClass();\n $item->value = $value;\n $item->key = $key;\n\n\n\n\n if (strpos($key, 'alt_') === false) {\n\n // busco info del campo en la definicion de campos de usuario\n if (strpos($key, 'userfield_') !== false) {\n\n $fieldId = str_replace('userfield_','',$key);\n\n $userField = UserFieldModel::find($fieldId);\n\n $item->title = $userField->title;\n\n $item->nature = 'userfield';\n\n }\n else{\n\n // busco info del campo en la definicion json del formulario\n if($obj = findObjectInArray($form_fields_map,'id_name',$key)){\n $item->title = $obj->title;\n }\n\n }\n\n array_push($res,$item);\n\n }\n\n\n\n\n }\n\n\n return $res;\n }", "title": "" }, { "docid": "f9cebdf014cad6484b146d852182b50d", "score": "0.5900701", "text": "function gscr_home_prayer_requests_metabox_content() {\n \n $gravity_forms = wp_list_pluck( RGFormsModel::get_forms( null, 'title' ), 'title', 'id' );\n\t\n\trbm_do_field_media(\n 'gscr_home_prayer_request_left_image',\n _x( 'Left-side Image', 'Home Prayer Requests Left Side Image Label', 'good-shepherd-catholic-radio' ),\n false,\n array(\n\t\t\t'description' => _x( 'This will optionally show on the left-hand side', 'Home Prayer Requests Left Side Image Description', 'good-shepherd-catholic-radio' ),\n 'type' => 'image',\n 'button_text' => _x( 'Upload/Choose Image', 'Prayer Requests Image Upload Button Text', 'good-shepherd-catholic-radio' ),\n 'button_remove_text' => _x( 'Remove Image', 'Prayer Requests Image Remove Button Text', 'good-shepherd-catholic-radio' ),\n 'window_title' => _x( 'Choose Image', 'Prayer Requests Image Window Title', 'good-shepherd-catholic-radio' ),\n 'window_button_text' => _x( 'Use Image', 'Prayer Requests Image Select Button Text', 'good-shepherd-catholic-radio' ),\n )\n );\n\t\n\trbm_do_field_wysiwyg(\n\t\t'gscr_home_prayer_request_text',\n\t\t_x( 'Prayer Request Content', 'Home Prayer Request Text Label', 'good-shepherd-catholic-radio' ),\n\t\tfalse,\n\t\tarray(\n\t\t)\n\t);\n\t\n\trbm_do_field_select(\n 'gscr_home_prayer_request_form',\n _x( 'Prayer Requests Form', 'Home Prayer Requests Form Label', 'good-shepherd-catholic-radio' ),\n false,\n array(\n 'description' => __( 'Choose the Gravity Form through which Visitors will submit Prayer Requests.', 'good-shepherd-catholic-radio' ),\n 'options' => $gravity_forms,\n )\n );\n\t\n\trbm_do_field_select(\n\t\t'gscr_home_prayer_request_background',\n\t\t_x( 'Prayer Requests Background Color', 'Home Prayer Requests Background Color Label', 'good-shepherd-catholic-radio' ),\n\t\tfalse,\n\t\tarray(\n\t\t\t'default' => 'primary',\n\t\t\t'options' => array(\n\t\t\t\t'' => __( 'White', 'good-shepherd-catholic-radio' ),\n\t\t\t\t'primary' => _x( 'Purple', 'Primary Theme Color', 'good-shepherd-catholic-radio' ),\n\t\t\t\t'secondary' => _x( 'Green', 'Secondary Theme Color', 'good-shepherd-catholic-radio' ),\n\t\t\t\t'tertiary' => _x( 'Blue', 'Tertiary Theme Color', 'good-shepherd-catholic-radio' ),\n\t\t\t\t'quaternary' => _x( 'Gold', 'Quaternary Theme Color', 'good-shepherd-catholic-radio' ),\n\t\t\t\t'quinary' => _x( 'Rose', 'Quinary Theme Color', 'good-shepherd-catholic-radio' ),\n ),\n\t\t)\n\t);\n\t\n\trbm_do_field_select(\n\t\t'gscr_home_prayer_request_button_color',\n\t\t_x( 'Prayer Requests Button Color', 'Home Prayer Requests Button Color Label', 'good-shepherd-catholic-radio' ),\n\t\tfalse,\n\t\tarray(\n\t\t\t'description' => __( 'This changes the color of the button on the right-hand side of the section', 'good-shepherd-catholic-radio' ),\n\t\t\t'default' => 'secondary',\n\t\t\t'options' => array(\n\t\t\t\t'primary' => _x( 'Purple', 'Primary Theme Color', 'good-shepherd-catholic-radio' ),\n\t\t\t\t'secondary' => _x( 'Green', 'Secondary Theme Color', 'good-shepherd-catholic-radio' ),\n\t\t\t\t'tertiary' => _x( 'Blue', 'Tertiary Theme Color', 'good-shepherd-catholic-radio' ),\n\t\t\t\t'quaternary' => _x( 'Gold', 'Quaternary Theme Color', 'good-shepherd-catholic-radio' ),\n\t\t\t\t'quinary' => _x( 'Rose', 'Quinary Theme Color', 'good-shepherd-catholic-radio' ),\n ),\n\t\t)\n\t);\n\t\n\trbm_do_field_media(\n 'gscr_home_prayer_request_image',\n _x( 'Background Image', 'Home Prayer Requests Background Image Label', 'good-shepherd-catholic-radio' ),\n false,\n array(\n 'type' => 'image',\n 'button_text' => _x( 'Upload/Choose Image', 'Prayer Requests Image Upload Button Text', 'good-shepherd-catholic-radio' ),\n 'button_remove_text' => _x( 'Remove Image', 'Prayer Requests Image Remove Button Text', 'good-shepherd-catholic-radio' ),\n 'window_title' => _x( 'Choose Image', 'Prayer Requests Image Window Title', 'good-shepherd-catholic-radio' ),\n 'window_button_text' => _x( 'Use Image', 'Prayer Requests Image Select Button Text', 'good-shepherd-catholic-radio' ),\n )\n );\n \n}", "title": "" }, { "docid": "8a78e117c4af4d559585c5bd7b38e69a", "score": "0.58998287", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "351b70e1fe1ee5807e418a814c9220ce", "score": "0.58983386", "text": "public function get_form_fields () {\n\t \t\t\n\t \t\t$fields = array(\n\t \t\t\t\t\tarray(\n\t \t\t\t\t\t\t\t'field' \t=> 'reservation_date', \n\t \t\t\t\t\t\t\t'type' \t\t=> 'date', \n\t \t\t\t\t\t\t\t'message' \t=> __( 'Please enter a valid date for your reservation.', 'woothemes' ), \n\t \t\t\t\t\t\t\t'required' \t=> 1\n\t \t\t\t\t\t\t), \n\t \t\t\t\t\tarray(\n\t \t\t\t\t\t\t\t'field' \t=> 'reservation_time', \n\t \t\t\t\t\t\t\t'type' \t\t=> 'time', \n\t \t\t\t\t\t\t\t'message' \t=> __( 'Please select a valid time for your reservation.', 'woothemes' ), \n\t \t\t\t\t\t\t\t'required' \t=> 1\n\t \t\t\t\t\t\t),\n\t \t\t\t\t\tarray(\n\t \t\t\t\t\t\t\t'field' \t=> 'number_of_people', \n\t \t\t\t\t\t\t\t'type' \t\t=> 'number_of_people', \n\t \t\t\t\t\t\t\t'message' \t=> __( 'Please enter a valid number of people for your reservation.', 'woothemes' ), \n\t \t\t\t\t\t\t\t'required' \t=> 0\n\t \t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t \t\t\t\t\t\t\t'field' \t=> 'year', \n\t \t\t\t\t\t\t\t'type' \t\t=> 'select', \n\t \t\t\t\t\t\t\t'message' \t=> __( 'Please select the year your vehicle was made.', 'woothemes' ), \n\t \t\t\t\t\t\t\t'required' \t=> 1\n\t \t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t \t\t\t\t\t\t\t'field' \t=> 'make', \n\t \t\t\t\t\t\t\t'type' \t\t=> 'select', \n\t \t\t\t\t\t\t\t'message' \t=> __( 'Please select the make of your vehicle.', 'woothemes' ), \n\t \t\t\t\t\t\t\t'required' \t=> 1\n\t \t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t \t\t\t\t\t\t\t'field' \t=> 'model', \n\t \t\t\t\t\t\t\t'type' \t\t=> 'text', \n\t \t\t\t\t\t\t\t'message' \t=> __( 'Please enter the model of your vehicle.', 'woothemes' ), \n\t \t\t\t\t\t\t\t'required' \t=> 1\n\t \t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t \t\t\t\t\t\t\t'field' \t=> 'services', \n\t \t\t\t\t\t\t\t'type' \t\t=> 'multiple', \n\t \t\t\t\t\t\t\t'message' \t=> __( 'Please select the services your vehicle requires.', 'woothemes' ), \n\t \t\t\t\t\t\t\t'required' \t=> 1\n\t \t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t \t\t\t\t\t\t\t'field' \t=> 'services_other', \n\t \t\t\t\t\t\t\t'type' \t\t=> 'text', \n\t \t\t\t\t\t\t\t'message' \t=> __( 'Please enter instructions for your reservation.', 'woothemes' ), \n\t \t\t\t\t\t\t\t'required' \t=> 0\n\t \t\t\t\t\t\t),\n\t \t\t\t\t\tarray(\n\t \t\t\t\t\t\t\t'field' \t=> 'additional_notes', \n\t \t\t\t\t\t\t\t'type' \t\t=> 'text', \n\t \t\t\t\t\t\t\t'message' \t=> __( 'Please enter instructions for your reservation.', 'woothemes' ), \n\t \t\t\t\t\t\t\t'required' \t=> 0\n\t \t\t\t\t\t\t),\n\t \t\t\t\t\tarray(\n\t \t\t\t\t\t\t\t'field' \t=> 'contact_name', \n\t \t\t\t\t\t\t\t'type' \t\t=> 'text', \n\t \t\t\t\t\t\t\t'message' \t=> __( 'Please enter your full name.', 'woothemes' ), \n\t \t\t\t\t\t\t\t'required' \t=> 1\n\t \t\t\t\t\t\t),\n\t \t\t\t\t\tarray(\n\t \t\t\t\t\t\t\t'field' \t=> 'contact_tel', \n\t \t\t\t\t\t\t\t'type' \t\t=> 'text', \n\t \t\t\t\t\t\t\t'message' \t=> __( 'Please enter a valid telephone number.', 'woothemes' ), \n\t \t\t\t\t\t\t\t'required' \t=> 1\n\t \t\t\t\t\t\t),\n\t \t\t\t\t\tarray(\n\t \t\t\t\t\t\t\t'field' \t=> 'contact_email', \n\t \t\t\t\t\t\t\t'type' \t\t=> 'email', \n\t \t\t\t\t\t\t\t'message' \t=> __( 'Please enter your e-mail address (a confirmation link will be sent).', 'woothemes' ), \n\t \t\t\t\t\t\t\t'required' \t=> 1\n\t \t\t\t\t\t\t),\n\t \t\t\t\t\tarray(\n\t \t\t\t\t\t\t\t'field' \t=> 'no_cookie', \n\t \t\t\t\t\t\t\t'type' \t\t=> 'int', \n\t \t\t\t\t\t\t\t'message' \t=> __( 'Please select if you are on a public computer (if you are, we won\\'t save your details.)', 'woothemes' ), \n\t \t\t\t\t\t\t\t'required' \t=> 0\n\t \t\t\t\t\t\t) \t\t\n\t \t\t\t\t\t);\n\t \t\t\n\t \t\t$fields = apply_filters( 'wootable_form_fields', $fields );\n\t \t\n\t \t\treturn $fields;\n\t \t\n\t \t}", "title": "" }, { "docid": "05c33b89529c4a0f1a94050f0cbc76ff", "score": "0.5889998", "text": "public function fields() {\n // The fields are defined in the Constructor for this plugin.\n return $this->fields;\n }", "title": "" }, { "docid": "f76ffbc612666f653224a49a28e55009", "score": "0.5887506", "text": "public function getCMSFields()\r\n {\r\n $fields = parent::getCMSFields();\r\n $fields->addFieldToTab('Root.Main', TextField::create('Task','Task to be completed'),'Content');\r\n $fields->addFieldToTab('Root.Main', DateField::create('Deadline','Task is due by'),'Content');\r\n $fields->addFieldToTab('Root.Main', TextField::create('Dog','Dog name'),'Content');\r\n $fields->addFieldToTab('Root.Main', TextField::create('Volunteer','Volunteer name'),'Content');\r\n $fields->addFieldToTab('Root.Main', TextareaField::create('Details')\r\n ->setDescription('This is a summary of important information about the task.'),\r\n 'Content'\r\n );\r\n\r\n return $fields;\r\n }", "title": "" }, { "docid": "acf1696eaa7d442f5fe424924e86125b", "score": "0.588285", "text": "public function fields() {\n return $this->fields;\n }", "title": "" }, { "docid": "be2edcbbc887d1a5fa453d42a3efe0f6", "score": "0.5875155", "text": "function team_member_details_html($post)\n{\n $fields = [\n 'name',\n 'role',\n 'email',\n ];\n\n foreach($fields as $field) {\n $$field = get_post_meta($post->ID, 'team_member_meta_' . $field, true);\n }\n ?>\n <table style=\"width: 100%;\">\n <tr>\n <td style=\"width: 20%;\">\n <label for=\"team_member_name\">Name:</label>\n </td>\n <td>\n <input type=\"text\" name=\"team_member_name\" id=\"team_member_name\" value=\"<?= $name ?>\">\n </td>\n </tr>\n <tr>\n <td>\n <label for=\"team_member_role\">Role:</label>\n </td>\n <td>\n <input type=\"text\" name=\"team_member_role\" id=\"team_member_role\" value=\"<?= $role ?>\">\n </td>\n </tr>\n </table>\n <?php\n}", "title": "" }, { "docid": "194c807f063978ebbf8e12aa1efe33c6", "score": "0.5871374", "text": "public function fields(Request $request)\n {\n return [\n ID::make()->sortable(),\n Text::make('Youtube Id'),\n Text::make('Video Link', function () {\n return view('vendor.nova.partials.link', [\n 'text' => 'https://www.youtube.com/watch?v=' . $this->youtube_id . '&t=' . $this->youtube_start_time . 's',\n 'link' => 'https://www.youtube.com/watch?v=' . $this->youtube_id . '&t=' . $this->youtube_start_time . 's',\n 'new_tab' => true\n ])->render();\n })->asHtml()->exceptOnForms(),\n Number::make('Start Time (Seconds)', 'youtube_start_time'),\n BelongsTo::make('Race')->searchable(),\n Boolean::make('Valid Thumbnail', 'valid_thumbnail')->hideWhenCreating(),\n Text::make('Thumbnail', function () {\n return view('vendor.nova.partials.image', [\n 'src' => \"https://img.youtube.com/vi/{$this->youtube_id}/maxresdefault.jpg\"\n ])->render();\n })->asHtml(),\n DateTime::make('Created At')->onlyOnDetail(),\n DateTime::make('Updated At')->onlyOnDetail()\n ];\n }", "title": "" }, { "docid": "7808574c965b79bef913483bb1135966", "score": "0.5871019", "text": "public function getForm() {\n\t\t$html = $this->load_html();\n\t\treturn $this->add_data( $html );\n\t}", "title": "" }, { "docid": "3526d6a85877622912aa415d09e36338", "score": "0.58575326", "text": "public function fields(Request $request)\n {\n return [\n ID::make(__('ID'), 'id')\n ->sortable()\n ->canSee(function($request) {\n return $request->user()->isDeveloper();\n }),\n\n Text::make(__('Task Number'), 'tracking_code')\n ->exceptOnForms(),\n\n BelongsTo::make(__('Task Creator'), 'auth', User::class)\n ->exceptOnForms(),\n\n // Text::make(__('Task Type'), function() {\n // return forward_static_call([Nova::resourceForModel($this->taskable_type), 'singularLabel']);\n // })->onlyOnIndex(),\n\n Badge::make(__('Status'), 'marked_as')\n ->sortable()\n ->addTypes([ \n 'draft' => 'bg-60 text-90',\n 'accepted'=> 'bg-info-light text-success-dark'\n ])\n ->map([ \n 'published' => 'info',\n 'inprogress' => 'success',\n 'completed' => 'success',\n 'rejected' => 'danger',\n 'pending' => 'warning',\n ]),\n\n static::datetimeField(__('Created At'), 'created_at') \n ->exceptOnForms()\n ->sortable(),\n\n static::datetimeField(__('Updated At'), 'updated_at') \n ->onlyOnDetail(),\n\n BelongsTo::make(__('Higher Task'), 'task', static::class)\n ->withoutTrashed()\n ->nullable()\n ->sortable()\n ->canSee(function($request) {\n return $request->viaResource() == static::uriKey();\n }),\n\n MorphTo::make(__('Task Type'), 'taskable')\n ->types(Helper::taskableResources()->all())\n ->showCreateRelationButton()\n ->withoutTrashed()\n // ->hideFromIndex()\n ->required()\n ->rules('required'),\n\n MorphTo::make(__('Member'), 'member')\n ->types([User::class, Team::class])\n ->showCreateRelationButton()\n ->withoutTrashed() \n ->required()\n ->rules('required'),\n\n BelongsTo::make(__('Task Priority'), 'priority', Priority::class)\n ->showCreateRelationButton()\n ->withoutTrashed()\n ->sortable()\n ->required()\n ->rules('required'),\n\n VoiceRecorder::make(__('Voice'), 'voice'),\n\n Trix::make(__('Task Note'), 'note')\n ->withFiles('public')\n ->help(__('Write something if need to describe the working')),\n\n Boolean::make(__('Publish Task'), 'marked_as')\n ->onlyOnForms()\n ->hideWhenUpdating()\n ->default(true)\n ->fillUSing(function($request, $model, $attribute) {\n if(boolval($request->get($attribute))) {\n $model->asPublished();\n }\n }),\n\n Board::make(__('Activities'), [ \n EventHistory::make()\n ->actionResource(Activity::class)\n ->only(static::class)\n ->onlyOnDetail(),\n ]), \n\n // HasMany::make(__('Activities'), 'activities', Activity::class),\n\n HasMany::make(__('Tasks'), 'tasks', static::class)->canSee(function($request) {\n return $request->viaResource() == static::uriKey();\n }),\n ];\n }", "title": "" } ]
1b023bf7c2826d9ee37f96ee3378b1ff
/ User record can be delete by this function
[ { "docid": "032c02299f1bc7eea658018cc3cf4748", "score": "0.0", "text": "public function deleteSingleUser(Request $request)\n {\n $user = \\App\\User::find($request->id);\n $status = $user->delete();\n\n if($status) {\n\t\t\t$message \t\t= \"User deleted successfully\";\n $returnStatus \t= 1;\n\n } else {\n\t\t\t$message \t\t= \"Unable to delete this user\";\n\t\t\t$returnStatus \t= 0;\n }\n return json_encode(array('status' => $returnStatus, 'message' => $message));\n }", "title": "" } ]
[ { "docid": "f3b6cc0afeeb59a7cc330db084cfcf8a", "score": "0.7986874", "text": "function deleteRecord() {\r\n if (!$vBulletin_userdata = $this->vBulletin_sync->user_delete($this->recUid)) {\r\n $this->error = '###TEMPLATE_NO_PERMISSIONS###';\r\n return;\r\n }\r\n return parent::deleteRecord();\r\n }", "title": "" }, { "docid": "31337f7def9a8ce60aae222518abbd23", "score": "0.76919925", "text": "public function delete()\n\t{\n\t\t$this->userStatus = 3;\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "b913c2515504be65f9421a9b55cbd36b", "score": "0.7663389", "text": "public function delete_user()\n {\n }", "title": "" }, { "docid": "cf5e4e94b21588f2a065d69c7851ca6e", "score": "0.7636999", "text": "function delete() {\n\t\t$sql = \"DELETE FROM `user`\n\t\t\t\tWHERE `user_id`=?\";\n\t\t$this->db->query($sql, array($this->user_id));\n\t}", "title": "" }, { "docid": "664e6338449f286795abaac85cf9988b", "score": "0.7604891", "text": "private function deleteUser(){\n\t\t\tif($this->get_request_method() != \"DELETE\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t$id = (int)$this->_request['id'];\n\t\t\tif($id > 0){\n\t\t\t\tmysql_query(\"DELETE FROM users WHERE user_id = $id\");\n\t\t\t\t$success = array('status' => \"Success\", \"msg\" => \"Successfully one record deleted.\");\n\t\t\t\t$this->response($this->json($success),200);\n\t\t\t}else{\n\t\t\t\t$this->response('',204);\t// If no records \"No Content\" status\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e417eba39a8e8510b862ad6014a9c269", "score": "0.75554115", "text": "private function deleteUser(){\n\t\t\tif($this->get_request_method() != \"DELETE\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t$id = (int)$this->_request['id'];\n\t\t\tif($id > 0){\t\t\t\t\n\t\t\t\tmysql_query(\"DELETE FROM users WHERE user_id = $id\");\n\t\t\t\t$success = array('status' => \"Success\", \"msg\" => \"Successfully one record deleted.\");\n\t\t\t\t$this->response($this->json($success),200);\n\t\t\t}else\n\t\t\t\t$this->response('',204);\t// If no records \"No Content\" status\n\t\t}", "title": "" }, { "docid": "4c1a9f43e6de93ef09dbe9f1e5c7e60b", "score": "0.7519107", "text": "public function action_userDelete() {\n $this->form->userId = ParamUtils::getFromPost('idperson');\n try {\n // 2. usunięcie rekordu\n App::getDB()->delete(\"user\", [\n \"idUser\" => $this->form->userId\n ]);\n Utils::addInfoMessage('Deleted successfully');\n } catch (\\PDOException $e) {\n Utils::addErrorMessage('Something has gone wrong!');\n if (App::getConf()->debug)\n Utils::addErrorMessage($e->getMessage());\n } \n // 3. Przekierowanie na stronę listy osób\n Utils::addInfoMessage(\"User deleted successfully\");\n \n \n }", "title": "" }, { "docid": "25873730373ae5216ae5f3d3c321bf59", "score": "0.7480122", "text": "public\n\t\tfunction deleteUser() {\n\t\t\t$this->_db->query('DELETE FROM users WHERE userid= \"'.$userid.'\"');\n\t\t}", "title": "" }, { "docid": "cc4eb3a1764931d3230b1acd66ae61f2", "score": "0.73840886", "text": "function delete_user() {\n // load model\n Load::loadModel(\"user\");\n\n // create model object\n $userObj = new UserModel();\n\n //change status\n $userObj->deleteUser();\n\n\n exit;\n }", "title": "" }, { "docid": "ce747f54e87433422a4c2a931d541ae3", "score": "0.73831916", "text": "public function delete($user) {\n \n }", "title": "" }, { "docid": "4d7bc884d68c25a7b7e4bc3e6cb589a8", "score": "0.7373696", "text": "function delete() {\n\t\t$sql = \"DELETE FROM umuser\n\t\t\t\tWHERE UsID=?\";\n\t\t \n\t\t$this->ums->query($sql, array($this->UsID));\n\t}", "title": "" }, { "docid": "a396957befd155e99d7408e1f30dd31c", "score": "0.7348039", "text": "public function delete($user) {}", "title": "" }, { "docid": "9786ab5eace8f99a0a362ccc0cd4f305", "score": "0.73317665", "text": "function delete($user)\n {\n }", "title": "" }, { "docid": "7bf79846fe7c650c7d7cf964f2fdfe04", "score": "0.7330293", "text": "public function delete_user()\n\t{\n\t\t$this->db->where('id', $this->input->get(\"id\"));\n\t\t$this->db->delete('UTILISATEUR');\n\t}", "title": "" }, { "docid": "bff9be23063679037bdd27121aa93aad", "score": "0.73246783", "text": "function delete_user()\n\t{\n\t\tcheck_user_access($this, 'delete_user', 'redirect');\n\n\t\t# Get the passed details into the url data array if any\n\t\t$urldata = $this->uri->uri_to_assoc(3, array('m', 'i', 't'));\n\n\t\t# Pick all assigned data\n\t\t$data = assign_to_data($urldata);\n\n\t\tif(!empty($data['i'])){\n\t\t\t$result = $this->db->query($this->Query_reader->get_query_by_code('deactivate_user', array('id'=>decryptValue($data['i'])) ));\n\t\t}\n\n\t\tif(!empty($result) && $result){\n\t\t\t$this->session->set_userdata('duser', \"The user data has been successfully deleted.\");\n\t\t}\n\t\telse if(empty($data['msg']))\n\t\t{\n\t\t\t$this->session->set_userdata('duser', \"ERROR: The user could not be deleted or was not deleted correctly.\");\n\t\t}\n\n\t\tif(!empty($data['t']) && $data['t'] == 'super'){\n\t\t\t$tstr = \"/t/super\";\n\t\t}else{\n\t\t\t$tstr = \"\";\n\t\t}\n\t\tredirect(\"admin/manage_users/m/duser\".$tstr);\n\t}", "title": "" }, { "docid": "7925a84da7c8a261b28f080d682e2e1c", "score": "0.7296778", "text": "function delete($user_id)\n\t{\n\t}", "title": "" }, { "docid": "4d01b70379d07f62f90aef86bd44d956", "score": "0.7281653", "text": "function delete_user_data($user_id)\n {\n $this->db->where('id',$user_id);\n $this->db->delete('employee');\n \n }", "title": "" }, { "docid": "123f979ab9f8b405de456ccf31da12c7", "score": "0.7274509", "text": "function deleteRecord() {\n\t\tif ($this->conf['delete']) {\n\t\t\t// If deleting is enabled\n\t\t\t$origArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable, $this->recUid);\n\t\t\tif ($GLOBALS['TSFE']->loginUser || $this->aCAuth($origArr)) {\n\t\t\t\t \n\t\t\t\t// Must be logged in OR be authenticated by the aC code in order to delete\n\t\t\t\t// If the recUid selects a record.... (no check here)\n\t\t\t\tif (is_array($origArr)) {\n\t\t\t\t\tif ($this->aCAuth($origArr) || $this->cObj->DBmayFEUserEdit($this->theTable, $origArr, $GLOBALS['TSFE']->fe_user->user, $this->conf['allowedGroups'], $this->conf['fe_userEditSelf'])) {\n\t\t\t\t\t\t// Display the form, if access granted.\n\t\t\t\t\t\tif (!$this->TCA['ctrl']['delete'] || $this->conf['forceFileDelete']) {\n\t\t\t\t\t\t\t// If the record is fully deleted... then remove the image attached.\n\t\t\t\t\t\t\t$this->deleteFilesFromRecord($this->recUid);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t\t\t\t$query = $this->cObj->DBgetDelete($this->theTable, $this->recUid);\n\t\t\t\t\t\t$GLOBALS[ 'TYPO3_DB' ]->sql(TYPO3_db, $query);\n\t\t\t\t\t\techo $GLOBALS[ 'TYPO3_DB' ]->sql_error();\n\t\t\t\t\t\t$this->currentArr = $origArr;\n\t\t\t\t\t\t$this->saved = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->error = '###TEMPLATE_NO_PERMISSIONS###';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "120b3f619070806ea3c99546a098f8bf", "score": "0.7230879", "text": "function user_delete($olduser) {\n delete_records('openid_urls', 'userid', $olduser->id);\n }", "title": "" }, { "docid": "869b3876b65cbfc3889ab7e5e9c8da1f", "score": "0.72295165", "text": "function deleteuser($id){\n\t\t$this->model->deleteUser($id);\n\t}", "title": "" }, { "docid": "5913684444582be0a93161f7a36c16a8", "score": "0.72160405", "text": "function delete_user()\n\t{\n\t\tif( ! $this->jempe_admin->is_authenticated())\n\t\t{\n\t\t\tredirect('admin/login');\n\t\t}\n\n\t\tif( ! $this->jempe_admin->user_permission('users','write'))\n\t\t{\n\t\t\tredirect('admin');\n\t\t}\n\n\t\tif($this->input->post('user_id') > 1)\n\t\t{\n\t\t\t$this->jempe_admin->edit_user(array('user_id' => $this->input->post('user_id'), 'user_active' => 0));\n\t\t}\n\n\t\t$this->output->set_output('<user><success>1</success></user>');\n\t}", "title": "" }, { "docid": "d01e30ebe1222f9f76cb770d985aef8e", "score": "0.71858054", "text": "public function deleteAction() {\n\t\t//delete expertise\n\t\t$table = new User();\n\t\t$rowset = $table->find($this->userId);\n\n\t\tif (count($rowset) == 1) {\n\t\t\t$data = array(\n\t\t\tUser::COL_ACTIVE => 0,\n\t\t\tUser::COL_CITY => NULL,\n\t\t\tUser::COL_COUNTRY => NULL,\n\t\t\tUser::COL_EMAIL => '',\n\t\t\tUser::COL_FAX => NULL,\n\t\t\tUser::COL_FIRSTNAME => '',\n\t\t\tUser::COL_INSTITUTION => NULL,\n\t\t\tUser::COL_LASTNAME => '',\n\t\t\tUser::COL_PASSWORD => '',\n\t\t\tUser::COL_PHONE => NULL,\n\t\t\tUser::COL_ROLE => NULL,\n\t\t\tUser::COL_STREET => NULL,\n\t\t\tUser::COL_USERNAME => uniqid('')\n\t\t\t);\n\t\t\t$where = $table->getAdapter()->quoteInto(User::COL_ID.' = ?', $this->userId, 'int');\n\t\t\t$table->update($data, $where);\n\n\t\t\t$table = new UserHasExpertise();\n\t\t\t$table->delete($table->getAdapter()->quoteInto(UserHasExpertise::COL_USER_ID.' = ?', $this->userId, 'int'));\n\n\t\t\t//logout\n\t\t\t$redirect = new Zend_Controller_Action_Helper_Redirector();\n\t\t\t$redirect->setGoto('logout', 'login', 'default');\n\t\t}\n\t}", "title": "" }, { "docid": "47200400e27ab4f6714acf6bdd8469cf", "score": "0.71774995", "text": "public function deleting(User $user)\n {\n\n }", "title": "" }, { "docid": "c5a934b4d30f9eef1babda8d419aed53", "score": "0.71702313", "text": "public function delete($user)\n {\n }", "title": "" }, { "docid": "c77e0acf3c20ad0a8498e784c5e3e5ff", "score": "0.7159828", "text": "public function delete()\n\t{\n\t\t$allow = true;\n\t\t$allow = Plugins::filter( 'user_delete_allow', $allow, $this );\n\t\tif ( ! $allow ) {\n\t\t\treturn;\n\t\t}\n\t\tPlugins::act( 'user_delete_before', $this );\n\n\t\t// remove any userinfo records\n\t\t$this->info->delete_all();\n\n\t\t// remove all this user's permissions\n\t\tDB::query( 'DELETE FROM {user_token_permissions} WHERE user_id=?', array( $this->id ) );\n\t\t// remove user from any groups\n\t\tDB::query( 'DELETE FROM {users_groups} WHERE user_id=?', array( $this->id ) );\n\t\tEventLog::log( _t( 'User deleted: %s', array( $this->username ) ), 'info', 'default', 'filmio' );\n\t\t$result = parent::deleteRecord( DB::table( 'users' ), array( 'id' => $this->id ) );\n\t\tPlugins::act( 'user_delete_after', $this );\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "7d101e9658e314c789204e5066eb8ee7", "score": "0.7145845", "text": "public function deleteUser ($id) {\n }", "title": "" }, { "docid": "e02e3936d8fc8d4018bb957a0b47eff0", "score": "0.7132644", "text": "public function delete() {\r\n\r\n // get database connection\r\n\r\n\r\n $sql_delete = \"delete from users where userID = '$this->userID'\";\r\n if ($this->dbc->query($sql_delete)) {\r\n\r\n \r\n echo \"<p> User Successfully Deleted </p>\";\r\n return true;\r\n } else {\r\n\r\n echo \"<p> Could not run query </p>\";\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "f41bce4b6f5ea78f5f3e8c68ca7ce256", "score": "0.71245664", "text": "function access_delete()\n {\n // load model\n Load::loadModel(\"user\");\n // create model object\n $userObj = new UserModel();\n // delete user access\n $userObj->access_delete();\n \n \techo json_encode(array(\"result\" => \"success\",\"title\" => \"Delete User\",\"message\" => \"User(s) have been deleted successfully\"));\n\t\t\texit;\n }", "title": "" }, { "docid": "7b6f060fd147523f758c6c7a8b15c96b", "score": "0.7101723", "text": "public function delete($arg) {\n # only user has access to deletion\n if($this->user->user_id != \"$arg\") {\n die(\"<p>Sorry. We can't do that. <a href='/'>Home</a></p>\");\n }\n\n if(!$arg) {\n die(\"<p>Sorry. We can't do that. <a href='/'>Home</a></p>\");\n }\n\n # delete row with this user_id\n DB::instance(DB_NAME)->delete('users', \"WHERE user_id = '$arg'\");\n\n # reroute to home\n Router::redirect('/');\n }", "title": "" }, { "docid": "5a243ba526ad9a673116c170d82857c6", "score": "0.7097731", "text": "function delete_user(){\n\t\textract($_POST);\n\t\t$delete = $this->db->query(\"DELETE FROM users where id = \".$id);\n\t\tif($delete)\n\t\t\treturn 1;\n\t}", "title": "" }, { "docid": "9e37c2d62f8d511d8f1641d5cea81677", "score": "0.7090185", "text": "public function delete()\n {\n\n //If no log in is performed redirect to login page\n if (!$this->loggedIn()) {\n header('Location: index.php?c=login&m=login');\n }\n\n //If no user id is provided redirect to login page\n if (!isset($_GET['id'])) {\n header('Location: index.php?c=user&m=index');\n }\n\n //Fetch all records for a user by id\n $userCollection = new UserCollection();\n $clean = $this->cleanInput($_GET['id']);\n $user = $userCollection->getOne($clean);\n\n //If no records are fetched for a user redirect\n if (is_null($user)) {\n header('Location: index.php?c=user&m=index');\n }\n\n //Delete a user from the database and redirect to users index page\n $userCollection->delete($user->getId());\n header('Location: index.php?c=user&m=index');\n }", "title": "" }, { "docid": "187db2b2282d365b2d8149b475de543a", "score": "0.70846844", "text": "public function delete_user() {\n $del_id = intval($this->uri->segment(3));\n return $this->dashboard_model->delete_user($del_id);\n }", "title": "" }, { "docid": "39fcf5fee5bde1085628795df6718afa", "score": "0.7075657", "text": "public function delete($idUser) {\r\n\r\n $this->restrict();\r\n $this->model->init();\r\n $this->model->deleteById($idUser);\r\n $this->model->close();\r\n $this->redirect('/user');\r\n }", "title": "" }, { "docid": "5513c1e978e5b408ba3c9d7e78cda766", "score": "0.7072448", "text": "public function deleted(User $user)\n {\n\n }", "title": "" }, { "docid": "4f1236836db9335369d1f5f3594b6577", "score": "0.7066041", "text": "public function delete()\n {\n $database = new Database();\n $database->deleteUser($this->getId());\n }", "title": "" }, { "docid": "abd1884d8324b8cc667aed99ede26ada", "score": "0.7054512", "text": "public function deleting(User $user)\n {\n //\n }", "title": "" }, { "docid": "abd1884d8324b8cc667aed99ede26ada", "score": "0.7054512", "text": "public function deleting(User $user)\n {\n //\n }", "title": "" }, { "docid": "0de0b06cc0ab105009d9b85b3ea0e23b", "score": "0.7050252", "text": "public function delete()\n {\n $this->forge->deleteUser($this->id);\n }", "title": "" }, { "docid": "16bcf6b8877f7684c9cd96340de2f13c", "score": "0.70328605", "text": "function Delete() {\n $connection = Database::Connect();\n $this->pog_query = \"delete from `user` where `UserId`='\".$this->UserId.\"'\";\n return Database::NonQuery($this->pog_query, $connection);\n }", "title": "" }, { "docid": "b64def630668b63c4cd9e3f3135c57e0", "score": "0.70265335", "text": "function delete_user($uid) {\n\tglobal $db;\n\t$db->delete_record('User_ID',$uid,'USER');\n\tdelete_all_course_user($uid);\n}", "title": "" }, { "docid": "746fd8d220a0e946c64e910a2833850a", "score": "0.7021777", "text": "public function delete()\n {\n $id = htmlspecialchars($this->request->getParam('id'));\n $user = $this->Users->find('all', [\n 'conditions' => ['id' => $id]\n ])->toArray();\n // Check this user is exist or not\n if ($user) {\n $thisUser = $this->Users->get($id);\n // Check delete this user is success or not\n if ($this->Users->delete($thisUser)) {\n // After delete user: redirect to login page\n $this->redirect('/');\n $this->Flash->success('Delete user success.');\n } else {\n // Delete fail: redirect to login page\n $this->redirect('/');\n $this->Flash->error('Cannot delete this user. Please, try again.');\n }\n } else {\n // User is not exist: redirect to login page\n $this->redirect('/');\n $this->Flash->error('That user is not exist.');\n }\n }", "title": "" }, { "docid": "f848d9c5775949744c991a42e595697c", "score": "0.70181555", "text": "public function delete_user() \n{\n $reg_id = $_POST['reg_id'];\n $data = array(\n 'is_delete' => 1\n );\n\n $update = $this->common->update_data($data, 'freelancer_hire_reg', 'reg_id', $reg_id);\n die();\n}", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.70074904", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.70074904", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.70074904", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.70074904", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.70074904", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.70074904", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.70074904", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.70074904", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.70074904", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.70074904", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "cb651008af41dbae52a640635126b1d0", "score": "0.70063895", "text": "function deleteuser()\n {\n if(!$this->isSuperAdmin() && !$this->isMainAdmin() && !$this->isTeacher()){\n echo(json_encode(array('status'=>'access')));\n }\n else\n {\n $userId = $this->input->post('userId');\n $userInfo = array('is_deleted'=> '1','updated_by'=>$this->vendorId, 'deleted_date'=>date('Y-m-d H:i:s'));\n \n $result = $this->user_model->deleteUser($userId, $userInfo);\n\n if ($result > 0) { \t\t\t\t\t\t\t\t\t\t\n\t\t\t\techo(json_encode(array('status'=>TRUE))); \n\t\t\t}\n else { \n\t\t\t\techo(json_encode(array('status'=>FALSE))); \n\t\t\t}\n \n \n }\n }", "title": "" }, { "docid": "444b94788fe2b5933a945dd3ecb172c0", "score": "0.7000634", "text": "function deleteRecord($id){\n\t\tglobal $db;\n\t\n\t\t$sql = \"DELETE FROM apdusers WHERE id = $id\";\n\t\tBasic::EventLog(\"APDUser->deleteRecord: \".$sql);\n\t\t$res =& $db->query($sql);\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "b1a337889bee6fcd7592e2a0286ff75e", "score": "0.6984821", "text": "function deleteUser() {\n /*\n * Delete user from table:\n * 1. user\n * 2. problemsolve\n * 3. paragraphrating\n * 4. discussion\n */\n if($_POST[\"deleteUser\"] != $_POST[\"userid\"]) {\n showFrame(\"Pro smazání uživatele musí být zaškrtnuto políčko nalevo od tlačítka.\", false);\n return;\n }\n\n $con = db_connect();\n\n $ok = $con->query(\"DELETE FROM user, problemsolve, paragraphrating, discussion\n WHERE userid=\".(int) $_POST[\"userid\"]);\n if($ok) {\n showFrame(\"Uživatel byl <b>úspěšně smazán</b>!\", true);\n } else {\n showFrame(\"Nastala chyba: \".$con->error, false);\n }\n}", "title": "" }, { "docid": "0ecc7d485da1e7bce61b4044c755ffd3", "score": "0.69799626", "text": "public function delete()\n\t{\n\t\tSecurity::demand(USER, $this->getMedlem());\n\t\tparent::delete();\n\t}", "title": "" }, { "docid": "e136fb209e6e6901dc14080d423f0221", "score": "0.69772285", "text": "public function delete() {\n $db = static::$current_db;\n global $$db;\n $DB = $$db;\n\n $current_child_table_name = static::$table_name;\n\n /*\n * { - Create query - end\n */\n $query = \"DELETE FROM \";\n $query .= $current_child_table_name . \" \";\n $query .= \"WHERE id=\" . $DB->mysql_prep_value($this->id) . \" \";\n $query .= \"LIMIT 1\";\n\n /*\n * } - Create query - end\n */\n if($DB->run_query($query)) {\n br();\n echo \"User with id\" . $this->id . \"was successfully deleted\";\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "d9ae6e4b8114ffc1251173d0b989eebe", "score": "0.69764996", "text": "public function delete(User $user);", "title": "" }, { "docid": "9947bd322136dd405ebc7628cebc64e7", "score": "0.69756436", "text": "public function deleteRecord()\n {\n if ($this->conf['delete']) { // If deleting is enabled\n $origArr = $this->getTypoScriptFrontendController()->sys_page->getRawRecord($this->theTable, $this->recUid);\n if ($this->getTypoScriptFrontendController()->loginUser || $this->aCAuth($origArr)) {\n // Must be logged in OR be authenticated by the aC code in order to delete\n // If the recUid selects a record.... (no check here)\n if (is_array($origArr)) {\n if ($this->aCAuth($origArr) || $this->DBmayFEUserEdit($this->theTable, $origArr, $this->getTypoScriptFrontendController()->fe_user->user, $this->conf['allowedGroups'], $this->conf['fe_userEditSelf'])) {\n // Display the form, if access granted.\n if (!$GLOBALS['TCA'][$this->theTable]['ctrl']['delete']) {\n // If the record is fully deleted... then remove the image (or any file) attached.\n $this->deleteFilesFromRecord($this->recUid);\n }\n $this->DBgetDelete($this->theTable, $this->recUid, true);\n $this->currentArr = $origArr;\n $this->saved = 1;\n } else {\n $this->error = '###TEMPLATE_NO_PERMISSIONS###';\n }\n }\n }\n }\n }", "title": "" }, { "docid": "f8e4e813e8f4d248c8dd27fa869c131b", "score": "0.6971975", "text": "public function delete() {\n\n // Does the User object have an ID?\n if ( is_null( $this->id ) ) trigger_error ( \"User::delete(): Attempt to delete a User object that does not have its ID property set.\", E_USER_ERROR );\n\n // Delete the User\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $st = $conn->prepare ( \"DELETE FROM users WHERE id = :id LIMIT 1\" );\n $st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "title": "" }, { "docid": "22b6b90678141909cfc947f19a895275", "score": "0.69593996", "text": "function deleteUserDetail(Request $req){\n //dd($req);\n $user=new Userdetail;\n $emp_data=$user->find($req->id);//dd($emp_data); \n $emp_data->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "d77ae4d102a1bf7816182d663611f174", "score": "0.6958873", "text": "function deleteUser($username)\r\n {\r\n \r\n }", "title": "" }, { "docid": "674fb1c6df07ef9910e7c91321e90105", "score": "0.6951406", "text": "public function userlist_delete() //delete userlist data\n {\n $getid=$this->uri->segment(4);\n $this->db->where('user_id',$getid);\n $this->db->delete('user');\n }", "title": "" }, { "docid": "e41c99a9cd955756b8e2f07dd6a90edb", "score": "0.6938596", "text": "public function deleteAction()\n {\n $userRow = new Admin_Model_DbRow_User($this->dbUser->find($this->checkUserIdParam()));\n $form = new App_Form_Delete($userRow); //FIXME: this file is missing\n\n IF($this->getRequest()->isPost()) {\n IF($form->isValid($this->getRequest()->getParams()) \n && $form->getElement('del_checkbox')->isChecked() === TRUE) {\n\n //FIXME: Here we have some DB Columns in the controller\n // Find a solution with the DbRow_User Class\n $this->dbUser->update(array(\n 'uu_deleted' => date('Y-m-d H:i:s', time())\n ), $this->dbUser->getAdapter()->quoteInto('uu_id = ?', $userRow->get('id'), Zend_Db::PARAM_INT));\n\n $this->_redirect('admin/user/index');\n } ELSE {\n $form->setDescription('Failed to delete the user');\n }\n }\n\n $this->view->form = $form;\n $this->view->user = $userRow;\n }", "title": "" }, { "docid": "db10d1e247e9eb975a74eba6e17f4a58", "score": "0.693496", "text": "public function deleted(Alumno $user)\n {\n //\n }", "title": "" }, { "docid": "9c5f618be28273498c58184b1cae28a8", "score": "0.69208354", "text": "function userDelete($user_id) \n\t{\n\t\t\n\t\t $this->db->where('user_id', $user_id);\n\t\t $this->db->delete('register');\n\t\treturn 1;\n\t\t// $this->db->delete('employees', array('id' => $id)); // optional method to delete data in one line as an array; just remove the comment tag in front of 'return'.\n\t}", "title": "" }, { "docid": "e47ba0b542d91da8d5d75afcd007e654", "score": "0.691563", "text": "public function delete($id){\n \n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n\n // Get existing user from model\n $user = $this->adminuserModel->getUserById($id);\n $cat=$this->admincatModel->getCatByUserId($id);\n if($this->adminuserModel->deleteUser($id)&&($this->admincatModel->deleteCat($id))){\n\n messageBox('admuser_message', 'User Deleted');\n redirect('adminusers');\n }else {\n die('there is an issue.');\n }\n }\n else {\n redirect('posts');\n }\n }", "title": "" }, { "docid": "dc07a32b5b92f7e5821e14b9274e5eee", "score": "0.6908063", "text": "function delete() {\n $resDeleteUser = sql(\"\n DELETE FROM utilisateur\n WHERE id='\".$this->id.\"'\n \");\n \n if($resDeleteUser) {\n return TRUE;\n header('Location: utilisateur.php');\n }\n else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "7d24402d85ad02f8cdc3a6a8ce89bf1a", "score": "0.6902661", "text": "public function delete(User $user)\n {\n //\n }", "title": "" }, { "docid": "3d08f24d51dd609dd888b211d58da50d", "score": "0.6900768", "text": "function userDelID($id)\n\t{\n\t\t$this->db->where('id', $id);\n\t\t$this->db->delete('user');\n\n\t}", "title": "" }, { "docid": "45f52c3b7eb9039ef8698045d64f1b62", "score": "0.6899337", "text": "function hapus_data($user)\n\t{\n\t\t$this->db->where($this->user,$user);\n\t\treturn\t$this->db->delete($this->member);\n\t}", "title": "" }, { "docid": "eeefb414bb890b846d3a59a5766715ff", "score": "0.6884683", "text": "public function usersdelete()\n {\n $by_id = $_POST[\"_id\"];\n //$_data = $this->user->_deleteuser($by_id);\n\n // delete to db\n $_data =$this->Generic->delete($by_id, $tablename=\"users\");\n if($_data)\n {\n $this->session->set_flashdata('success','success');\n $this->session->set_flashdata('message', 'User Deleted');\n $Json_resultSave = array ('status' => '1');\n echo json_encode($Json_resultSave);\n exit();\n }\n else \n {\n $this->session->set_flashdata('error','error');\n $this->session->set_flashdata('message', 'An error occur when Deleting User');\n $Json_resultSave = array ('status' => '0');\n echo json_encode($Json_resultSave);\n exit();\n }\n }", "title": "" }, { "docid": "7c01025db0aa0e3abdc16d668bebd2ff", "score": "0.68794674", "text": "function remove(){\n $modelUser = new User();\n $id = $_POST['id'];\n $modelUser->remove((int)$id);\n }", "title": "" }, { "docid": "314513306e3edc5c78bfc8d1a87f8da4", "score": "0.68780017", "text": "public function delete()\n {\n $this->item_tax_details()->delete();\n $this->item_barcode_details()->delete();\n \n\n // as suggested by Dirk in comment,\n // it's an uglier alternative, but faster\n // Photo::where(\"user_id\", $this->id)->delete()\n\n // delete the user\n return parent::delete();\n }", "title": "" }, { "docid": "1ce4caeca7365c34f5d7071c28dbae3c", "score": "0.68728805", "text": "public function deleteByUser(){\r\n // delete query\r\n $query = \"DELETE FROM \" . $this->table_name . \" WHERE user_id=:user_id\";\r\n $stmt = $this->conn->prepare($query);\r\n\r\n // sanitize\r\n $this->user_id=htmlspecialchars(strip_tags($this->user_id));\r\n\r\n // bind id\r\n $stmt->bindParam(\":user_id\", $this->user_id);\r\n\r\n if($stmt->execute()){\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "e797187653e625bec3d671d4a159f199", "score": "0.6861023", "text": "function _method_delete_user() {\n if (IS_AJAX) {\n $id_user = $this->Misc->decode_id($_POST['item']);\n /* Check User if Exist */\n $row = $this->users_model->getFields($id_user);\n if ($row) {\n $datas = array(\n 'enabled' => 0,\n 'updated_by' => $this->my_session->get('admin', 'user_id'),\n 'updated_date' => date('Y-m-d H:i:s')\n );\n /* Delete User */\n $this->users_model->update_table($datas, array(\"id_user\" => $id_user));\n parent::save_log($id_user, \"deleted user \" . $this->Misc->display_name($row->user_fname, $row->user_mname, $row->user_lname));\n $arr = array(\n 'message_alert' => \"User $row->user_code Deleted \",\n 'redirect' => $_POST['redirect'],\n 'status' => \"success\",\n 'id' => $id_user\n );\n $this->load->view(admin_dir('template/print'), array('print' => json_encode($arr)));\n }\n }\n }", "title": "" }, { "docid": "d04c754a4c52698047cac919c2278fff", "score": "0.68371665", "text": "static function removeUser()\r\n {\r\n if (isset($_POST['userInfo']))\r\n {\r\n //get the user info\r\n $userInfo = json_decode($_POST['userInfo']);\r\n if (isset($userInfo->login_id))\r\n {\r\n $login_id = $userInfo->login_id; \r\n \r\n //get the login_id of the user\r\n $result = DB::queryDB(\"SELECT * FROM \" . DBConfig::$tUser . \" where login_id='$login_id'\");\r\n if ($result)\r\n {\r\n $info = mysqli_fetch_assoc($result);\r\n $login_id = $info['login_id'];\r\n\r\n //delete the user from both database\r\n DB::queryDB(\"DELETE FROM \" . DBConfig::$tPermissions . \" where login_id='$login_id'\");\r\n DB::queryDB(\"DELETE FROM \" . DBConfig::$tUser . \" where login_id='$login_id'\");\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "794002e4a5740bff86492827ecc8ec1e", "score": "0.6830431", "text": "public function delUser($id){\n\t\t$this->db->delete('users', array(\"username\" => $id));\n\t\t// arahkan ke method 'books' di kontroller 'dashboard'\n\t\t//redirect('dashboard/books');\n\t}", "title": "" }, { "docid": "368f4b00e84c94a85bfc91e95f685403", "score": "0.68203413", "text": "public function delete() {\r\n global $db;\r\n \r\n $query = \"DELETE FROM `user` WHERE User_id = ?\";\r\n \r\n $statement = $db->prepare($query);\r\n \r\n if ($statement == FALSE) {\r\n display_db_error($db->error);\r\n }\r\n \r\n $statement->bind_param(\"i\", $this->id);\r\n \r\n $success = $statement->execute();\r\n \r\n if ($success) {\r\n $count = $db->affected_rows;\r\n $statement->close();\r\n return $count;\r\n } else {\r\n display_db_error($db->error);\r\n }\r\n }", "title": "" }, { "docid": "fb8919c7cd3e898effac91740837463e", "score": "0.6816697", "text": "function delete_course_user($cid,$uid) {\n\tglobal $db;\n\t$db->delete_record_with_two_identifier('Course_ID',$cid,'User_ID',$uid,'USER_COURSE');\n}", "title": "" }, { "docid": "67400cd8676434b8c47c4ed0f02bc7e8", "score": "0.6816005", "text": "function deleteAccount($user_Id, $link) {\n $sql = \"DELETE FROM users WHERE id=\".$user_Id.\"\";\n\n if ($link->query($sql) === TRUE) {\n echo \"Record deleted successfully\";\n header('location: index.html');\n } else {\n echo \"Error deleting record: \" . $link->error;\n }\n\n $link->close();\n }", "title": "" }, { "docid": "8e135e3e97de8b7de481bbfceb9409c8", "score": "0.6811527", "text": "function deleteUser()\n {\n if($this->isAdmin() == TRUE)\n {\n echo(json_encode(array('status'=>'access')));\n }\n else\n {\n $userId = $this->input->post('userId');\n $userInfo = array('isDeleted'=>1,'updatedBy'=>$this->vendorId, 'updatedDtm'=>date('Y-m-d H:i:s'));\n \n $result = $this->user_model->deleteUser($userId, $userInfo);\n \n if ($result > 0) { echo(json_encode(array('status'=>TRUE))); }\n else { echo(json_encode(array('status'=>FALSE))); }\n }\n }", "title": "" }, { "docid": "38d1310f789ad4245a87793e541f2af3", "score": "0.6808591", "text": "public function deleteuser(){\n\t\tif (!isset($_POST[\"id\"])) {\n\t\t\tthrow new Exception(\"DNI is mandatory\");\n\t\t}\n\t\tif (!isset($this->currentUser)) {\n\t\t\tthrow new Exception(\"Not in session. Delete a table requires login\");\n\t\t}\n\t\t\n\t\t/*if($this->userMapper->findType() != \"admin\"){\n\t\t throw new Exception(\"You aren't an admin. Deleting an user requires be admin\");\n\t\t}*/\n\t\t\n\t\t$tableId = $_REQUEST[\"idtable\"];\n\t\t$dni = $_REQUEST[\"id\"];\n\t\t\n\t\t\n\t\t$this->tableMapper->deleteUserFromTable($tableId, $dni);\n\t\t\n\t\t$this->view->setFlash(sprintf(i18n(\"User \\\"%s\\\" successfully deleted to table \\\"%s\\.\"), $tableId, $dni));\n\t\t$this->view->redirect(\"table\", \"showusers\", \"id=$tableId\");\n\t}", "title": "" }, { "docid": "1b9eeaf1882b5902659330d56cef5686", "score": "0.680631", "text": "function deleteUser()\n {\n if($_SESSION['company_admin_email'] != $_SESSION['user_email']){\n return;\n }\n \n $user_email = $_GET['email'];\n \n //Cannot delete the company admin\n if($user_email == $_SESSION['company_admin_email']){\n return;\n }\n \n require_once(\"Model/UserModel.php\");\n $UserModel = new UserModel();\n $UserModel->deleteUser($user_email, $_SESSION['company_id']);\n }", "title": "" }, { "docid": "f5bcd2495421d2ce1e337adf2fb581b1", "score": "0.680464", "text": "function delete_user($id)\n {\n //delete user record\n $this->db->where('id', $id);\n $this->db->delete('user_login');\n redirect('deleteuser/index');\n }", "title": "" }, { "docid": "e4074b6db912cfe6e7b057d37011d81c", "score": "0.6798766", "text": "public function actionDeleteuser($userId) {\n $model = Userinfo::find()->where(['userId' => $userId])->one();\n if($model) {\n //deleting from userinfo table\n $model->delete();\n $loginmodel = Userlogin::find()->where(['id' => $userId])->one();\n //deleting from userinfo table\n $loginmodel->delete();\n //deleting user's ads\n Yii::$app\n ->db\n ->createCommand()\n ->delete('adsinfo', ['userId' => $userId])\n ->execute();\n return Yii::$app->response->redirect(Url::to(['user/listusers',\n ]));\n }\n \n }", "title": "" }, { "docid": "8c9dc0a547801c641053917453b4d6d3", "score": "0.67984545", "text": "public function details_delete_save(){\n\n\t\t// Require user\n\t\tif (!$user = $this->_requireUser('Please sign in to change your account details.')){\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get optional parameters\n\t\t$parameters = array('reason' => Request::getString('reason', null));\n\n\t\t// Delete user.\n\t\t$userModel = $this->getModel('user');\n\t\t$deleted = $userModel->delete($user, $parameters);\n\n\t\t// Redirect.\n\t\tif ($deleted){\n\t\t\tMessages::addMessage('Your '.BluApplication::getSetting('storeName').' account has been deleted.');\n\t\t\treturn $this->logout();\n\t\t} else {\n\t\t\tMessages::addMessage('Sorry, your account couldn\\'t be deleted, please try again.', 'error');\n\t\t\treturn $this->_redirect('/'.$this->_controllerName.'/details?tab=delete');\n\t\t}\n\n\t}", "title": "" }, { "docid": "704657891cf8c3131f384f5da80969ef", "score": "0.6797967", "text": "public function deleteUserAction($userId)\r\n {\r\n \r\n }", "title": "" }, { "docid": "9bef70d09c57ad0c2864a2c68a671d92", "score": "0.67869174", "text": "public function delete()\n {\n\t\t$res = $this->getDB()->delete('users',['userid'=>$this->getId()]);\n \n // Check to see if the query ran properly.\n if(!$res)\n {\n throw new Exception('The product was not deleted from the user.');\n }\n }", "title": "" }, { "docid": "e12b3bfcdc26a5225fe8480af3e4c748", "score": "0.67850137", "text": "function contact_form_delete_user($user_id)\n{\n pwg_query('DELETE FROM '. CONTACT_FORM_TABLE .' WHERE user_id = '. $user_id .';');\n}", "title": "" }, { "docid": "dec8008a7ff4971074f78c213ebaaa3e", "score": "0.6784016", "text": "public function deleting()\n {\n //\n }", "title": "" }, { "docid": "e383572cb7dbec23bbd69fe428cb4823", "score": "0.67760396", "text": "function delete_user($user_id) {\n\tglobal $Auth;\n\t\n\t## multiclient\n\t$client_id = $Auth->auth[\"client_id\"];\n\n\t## first we check if recieved an template_id\n\tif($user_id) {\n\t\t## prepare the db-object\n\t\t$db_connection = new DB_Sql(); \n\t\n\t\t## okay we can delete this user\n\t\t$select_query = \"DELETE FROM \".USERS.\" WHERE user_id='$user_id' AND client_id='$client_id'\";\n\t\t$result_pointer = $db_connection->query($select_query);\t\n\t} else {\n\t\treturn -1;\n\t}\n}", "title": "" }, { "docid": "799b31275e281cf972475c232ee692f5", "score": "0.6768377", "text": "public function deleteUser(Request $request)\n {\n// ->first();\n\n\n $user = User::find($request->id);\n $user->delete();\n return back();\n\n }", "title": "" }, { "docid": "eeb2ea27ee51882bab6e5b773b1fea67", "score": "0.6764282", "text": "function deleteUser()\n {\n if ($this->isAdmin() == TRUE) {\n echo(json_encode(array('status' => 'access')));\n } else {\n $userId = $this->input->post('userId');\n $userInfo = array('isDeleted' => 1, 'updatedBy' => $this->vendorId, 'updatedDtm' => date('Y-m-d H:i:sa'));\n\n $result = $this->user_model->deleteUser($userId, $userInfo);\n\n if ($result > 0) {\n echo(json_encode(array('status' => TRUE)));\n } else {\n echo(json_encode(array('status' => FALSE)));\n }\n }\n }", "title": "" }, { "docid": "781062271ab2451cf4aad20b1f941997", "score": "0.6759196", "text": "public function destroy($id)\n {\n //\n $user =\\App\\User::find($id);\n //$invoice = \\DB::table(\"invoicing\")->where(\"job_paper_size\",\"=\",$paper->name)->get();\n if($user->verified){\n return response()->json(\"This Record cannot be deleted!<br>User is already varified\");\n exit;\n }else{\n\n $user->delete();\n Session::flash(\"success_message\",\"Record Successfully deleted\");\n echo \"Record Successfully Deleted\";\n exit;\n }\n\n }", "title": "" }, { "docid": "47472cb3d7c5d48b1482868e87d30a9f", "score": "0.67591393", "text": "public function action_del(){\n $user_id = $_GET['id'];\n\n $user = Model_Groups::find_by_id($user_id);\n $user->defunct = Model_User::DEFUNCT_YES;\n $user->save();\n\n //TODO: use ajax\n $this->action_index();\n }", "title": "" }, { "docid": "582da5407b4cf195431f27f704d58c00", "score": "0.67590207", "text": "public function delete()\n {\n if(isset($_SESSION['user_id']) && isset($_SESSION['user_email']))\n {\n // Suppresion du user\n if($this->model->deleteOne(array(\n 'table' => 'users',\n 'column' => 'idUser',\n 'id' => $_SESSION['user_id']\n )))\n {\n // Détruire la session\n session_unset();\n session_destroy();\n unset($_COOKIE['fbsr_941553679268599']);\n\n // Message de confirmation et redirection\n session_start();\n $messageFlash = 'Done ! Your information has been deleted !';\n $this->coreSetFlashMessage('sucess', $messageFlash, 4);\n header('Location:?');\n exit();\n }\n else\n {\n // User non supprimé\n $messageFlash = 'Error ! An error occur !';\n $this->coreSetFlashMessage('error', $messageFlash, 5);\n define(\"TITLE_HEAD\", \"Error | Volunteers\");\n $this->load->view('view_error.php');\n }\n }\n else\n {\n // Pas de session\n $messageFlash = 'Error ! You are not logged in !';\n $this->coreSetFlashMessage('error', $messageFlash, 5);\n define(\"TITLE_HEAD\", \"Error | Volunteers\");\n $this->load->view('view_error.php');\n }\n }", "title": "" }, { "docid": "86e5072bc414ebff5dd5f022bdf623d6", "score": "0.67555946", "text": "function del_user($conn,$where){\n\t$res = pg_delete($conn, 'user_tbl', $where);\t\n\tif ($res) {\n\t //echo \"Deleted successfully.\";\n\t $is_deleted = true;\n\t} else {\n\t //echo \"Error in input..\";\n\t $is_deleted = false;\n\t}\t\n\treturn $is_deleted ;\n}", "title": "" }, { "docid": "aee8c7581abf4c4c9598abc8fc6cfe1f", "score": "0.67541766", "text": "public function deleteRecord(){\n\t\t/* Variable initialization */\n\t\t$intUserRoleCode \t= ($this->input->post('txtDeleteRecordCode') !='') ? $this->input->post('txtDeleteRecordCode') : 0;\n\n\t\t/* if not role code pass then do needful */\n\t\tif($intUserRoleCode == 0){\n\t\t\t/* Return error message */\n\t\t\tjsonReturn(array('status'=>0,'message'=>\"Invalid user role code requested.\"), true);\n\t\t}\n\t\t/* Setting the updated array */\n\t\t$strUpdatedArr\t= array(\n\t\t\t\t\t\t\t\t\t'table'=>$this->_strPrimaryTableName,\n\t\t\t\t\t\t\t\t\t'data'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t'deleted'=>1,\n\t\t\t\t\t\t\t\t\t\t\t\t'updated_by'=>$this->getUserCode(),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'where'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t'id'=>$intUserRoleCode\n\t\t\t\t\t\t\t\t\t\t\t)\n\n\t\t\t\t\t\t\t\t);\n\t\t/* Updating the requested record set */\n\t\t$intNunberOfRecordUpdated = $this->_objDataOperation->setUpdateData($strUpdatedArr);\n\n\t\tif($intNunberOfRecordUpdated > 0){\n\t\t\tjsonReturn(array('status'=>1,'message'=>'Requested User Role deleted successfully.'), true);\n\t\t}else{\n\t\t\tjsonReturn(array('status'=>0,'message'=>DML_ERROR), true);\n\t\t}\n\n\t\t/* removed variables */\n\t\tunset($strUpdatedArr);\n\t}", "title": "" }, { "docid": "d71cc8fca3ac956e18855863f20e9cf8", "score": "0.6737944", "text": "function delete_user($id) {\n $sql = \"delete from User where user_id = ?\";\n DB::delete($sql, array($id));\n}", "title": "" }, { "docid": "6a06ccecb014f3fa62467aefc09c9878", "score": "0.6737538", "text": "function delUser($id)\r\n {\r\n $select = \"DELETE FROM users WHERE user_id = :id\";\r\n \r\n $statement = $this->_pdo->prepare($select);\r\n $statement->bindValue(':id', $id, PDO::PARAM_INT);\r\n $statement->execute();\r\n }", "title": "" } ]
5fe951e2bda8061dea0d896323fb6e0b
Tests for `is('admin')` detector
[ { "docid": "4c37ce603994d253173409fafb3868d7", "score": "0.0", "text": "public function testIsAdmin(): void\n {\n $this->assertFalse($this->Request->is('admin'));\n $this->assertTrue((new ServerRequest())->withParam('prefix', ADMIN_PREFIX)->is('admin'));\n }", "title": "" } ]
[ { "docid": "03fe591156254305bf5e454dbed3d860", "score": "0.8251137", "text": "public function isAdmin() {}", "title": "" }, { "docid": "ec8c614520cd3fe3f810b1ed8aa84e14", "score": "0.81065464", "text": "public function isAdmin();", "title": "" }, { "docid": "097d1463bbe6ee68140d9e8f24d1d6ff", "score": "0.804563", "text": "public function isAdmin()\n {\n }", "title": "" }, { "docid": "b211aea6d1718e98ea8f98062e15a565", "score": "0.7984096", "text": "protected function isAdminUser() {}", "title": "" }, { "docid": "56a29240cb088017e8c588243810da2a", "score": "0.79225534", "text": "public function getIsAdmin();", "title": "" }, { "docid": "56a29240cb088017e8c588243810da2a", "score": "0.79225534", "text": "public function getIsAdmin();", "title": "" }, { "docid": "9187d83e39c5d9ef16dd1e065f6bbdce", "score": "0.7732661", "text": "public function isAdmin(){\n $role = $this->role->type;\n\n return $role === 'admin';\n }", "title": "" }, { "docid": "b42e970c7c792cdc186b04c7e45fc388", "score": "0.7730233", "text": "public function isAdmin(): bool\n {\n return $this->type() === self::ADMIN;\n }", "title": "" }, { "docid": "67f0f46b209215cfb5a6657bad102953", "score": "0.7719324", "text": "public static function isAdmin(){\n if(self::exists('auth_type')&& self::get('auth_type')=='admin'){\n return true;\n }else\n return false;\n\n }", "title": "" }, { "docid": "8b6b24249e02af5904b07c832148a8ed", "score": "0.770488", "text": "function isAdmin() {\n return ($this->userType == 'admin');\n }", "title": "" }, { "docid": "cbdc723408518efb5af39e8ca6bbca27", "score": "0.76943254", "text": "public function isAdmin()\n {\n return $this->type == self::TYPE_ADMIN ;\n }", "title": "" }, { "docid": "f283139cf52843b15511775dabf8b6dc", "score": "0.7676837", "text": "function is_user_admin()\n {\n }", "title": "" }, { "docid": "76eaabd763599e148d5a1a31c037d931", "score": "0.7659244", "text": "public function IsAdmin ();", "title": "" }, { "docid": "22f05e8dc432e7999ad1a733b2d6c1cc", "score": "0.7654082", "text": "function isAdmin(){\r\n\r\n\t\tif($this->user_type == 'Admin'){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "ce89892c93522fe7a33ef0055986746f", "score": "0.7639748", "text": "public function checkAdmin();", "title": "" }, { "docid": "3773b42f50ad1c3bebdbf82a62dc3194", "score": "0.76177096", "text": "protected function isAdmin()\n\t{\n\t\treturn is_admin();\n\t}", "title": "" }, { "docid": "4345a9f3ed823ae6da6def0526d8d3d4", "score": "0.76073354", "text": "public function isAdmin()\n {\n return ($this->username === \"admin\");\n }", "title": "" }, { "docid": "166d5be9922e2419e3798de8fb1cb728", "score": "0.75774246", "text": "public function isAdmin(string $name): bool;", "title": "" }, { "docid": "ca940f0a000a33a38c223c59674922b2", "score": "0.75683564", "text": "function in_admin()\n {\n return auth()->getDefaultDriver() == 'admin';\n }", "title": "" }, { "docid": "227ff33cbdf0d27d62e3f555534b4be7", "score": "0.75387275", "text": "public function isAdmin(): bool\n {\n return $this->is_admin === true;\n }", "title": "" }, { "docid": "241065fea71ea58bb6dac4c17562b136", "score": "0.75351954", "text": "private function isAdmin() : bool\n {\n return $this->role('admin');\n }", "title": "" }, { "docid": "c20439cb11e987f5dcad65dbffe77dbe", "score": "0.75069505", "text": "public function isAdmin()\n {\n return $this->hasCredential('admin');\n }", "title": "" }, { "docid": "16c7aae9a1821236596403b27bf2ff77", "score": "0.75022835", "text": "private function isAdmin() {\n\t\tif (Auth::user()->user == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "title": "" }, { "docid": "ff61e7eb5e6a1a80a0c1f5902c9ac238", "score": "0.74817693", "text": "public function getIsAdministrator() {}", "title": "" }, { "docid": "e5b70fd8070a09ffad2fee76e9ccf68c", "score": "0.7470418", "text": "public function isAdmin()\n {\n return $this->getAttribute('type') === User::ADMIN_TYPE;\n }", "title": "" }, { "docid": "8aed5081c7e8a5cbdc66d1176a071a3d", "score": "0.74700665", "text": "public static function isAdmin() {\r\n\r\n return Session::get('admin') == 1;\r\n\r\n }", "title": "" }, { "docid": "f4c7e3771f631b6a4ccf712845627fb5", "score": "0.74689704", "text": "public function isAdmin(){\n\t\tparent::isAdmin();\n\t}", "title": "" }, { "docid": "3400c6e84350702eed03abbb6216a06f", "score": "0.74533683", "text": "public function isAdmin()\n\t{\n\t\t$this->reply(true);\n\t}", "title": "" }, { "docid": "38b995ef5f5ff31893ab649bbb08cb61", "score": "0.74531263", "text": "public function isAdmin()\n {\n return (\\Auth::user()->role == 'admin');\n }", "title": "" }, { "docid": "b62287532cb95e801d32019809ad912e", "score": "0.74452317", "text": "public function isAdmin(){\n $user = Auth::guard('web') -> user();\n if ($user -> state != 1) {\n return 0;\n }\n else {\n return 1;\n }\n }", "title": "" }, { "docid": "c2f8229304ac6918b03ed9250a351576", "score": "0.7435797", "text": "public function isAdmin(){\n if($this->role==\"admin\"){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "5f2852a2a5e7495868df05973b70f60c", "score": "0.7418924", "text": "public function isAdmin(){\n return $this->hasRoles([\"admin\"]);\n }", "title": "" }, { "docid": "a98fd92d918e0d91d10552ebd8dcc01d", "score": "0.74061805", "text": "public function isAdmin()\n {\n return ($this->type === User::ADMIN_USER);\n }", "title": "" }, { "docid": "3546df3317842f441da85eded6b40734", "score": "0.7399717", "text": "function is_admin() {\n\tif (defined('ADMIN') && ADMIN === true) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "f0ef0cc83cd84616239c30bd9b319975", "score": "0.7389606", "text": "public function isAdmin(){\n return $this->role=='admin';\n }", "title": "" }, { "docid": "ca44deb3a7cf881979d8a6af4efed2c5", "score": "0.7386838", "text": "function is_admin()\n\t{\n\t\treturn strtolower($this->ci->session->userdata('DX_role_name')) == 'admin';\n\t}", "title": "" }, { "docid": "ac4290d79a7332b10c42fa2c42595634", "score": "0.7378931", "text": "public function checkAdmin()\n {\n // there ..... need\n // END Check\n $auth = false;\n if($auth) {\n return true;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "5b549fdd72eaaecf9e75d673680e74a7", "score": "0.73656577", "text": "function isAdmin(){\n\t\treturn (isset($this->params['admin']) && $this->params['admin']);\n\t}", "title": "" }, { "docid": "b0b24020f1352a1e64fa3e061d83f20e", "score": "0.7357005", "text": "function isAdmin() {\n //FIXME: This needs to (eventually) evaluate that the user is both logged in *and* has admin credentials.\n //Change to false to see nav and detail buttons auto-magically disappear.\n return true;\n}", "title": "" }, { "docid": "5e0bcc9025e3cebacef782b0dc6a3e16", "score": "0.7354812", "text": "public function isAdmin()\n {\n return $this->role == 'admin';\n }", "title": "" }, { "docid": "f7825f88f4e46ac5a1a617c98002058a", "score": "0.7351633", "text": "public function isSuperAdmin();", "title": "" }, { "docid": "49ac4febd8155e5c1f6da74128680e48", "score": "0.73467654", "text": "function user_AuthIsAdmin() {\n\tglobal $AUTH;\n\t\n\treturn isset($AUTH['admin']) && ($AUTH['admin'] === 1);\n}", "title": "" }, { "docid": "4e764534eb922820044c55f4e4386f8c", "score": "0.7344352", "text": "public function isAdmin(): bool\n {\n return $this->is_admin;\n }", "title": "" }, { "docid": "ed1d2bd2911ce4927e1dd725ecf5a50c", "score": "0.73393023", "text": "public function isAdmin() {\n return $this->hasPermission('is_admin');\n }", "title": "" }, { "docid": "0e2fe431076fd3ccc4c3482bc0a53db1", "score": "0.733729", "text": "function IsAdmin()\n{\n\treturn false;\n}", "title": "" }, { "docid": "c3e5eb113e3360dbb3cf6a03d2d184e1", "score": "0.73319554", "text": "public static function isAdmin()\n\t{\n\t\treturn in_array( Auth::user()->username, Config::get( 'admin.usernames' ) );\n\t}", "title": "" }, { "docid": "82b204b356601baf9315643685488677", "score": "0.7326955", "text": "function is_admin()\n {\n //is a user logged in?\n\n //if so, check admin status\n\n //returns true/false\n\n }", "title": "" }, { "docid": "4e01005eb52bdac9efa7358ca1dae64a", "score": "0.7320306", "text": "public function checkIsAdmin()\n {\n return $this->user_admin;\n }", "title": "" }, { "docid": "06eb41914926f349008676edd2747b53", "score": "0.7319123", "text": "function isAdmin()\n\t{\n\t\treturn $this->role == 3;\n\t}", "title": "" }, { "docid": "ef45b5b7c74119d4d18c9abfbe9192e6", "score": "0.7318934", "text": "public function isAdmin() {\n\t\treturn $this->admin;\n\t}", "title": "" }, { "docid": "b03e52d1dd364bedaf580638e883a6b5", "score": "0.7306577", "text": "function _lean_is_admin() {\n global $user;\n if (in_array('administrator', array_values($user->roles))) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "6ee32967d44efc87129dd9e6939fa399", "score": "0.730319", "text": "public function is_admin()\n {\n return $this->type == 0;\n }", "title": "" }, { "docid": "e8f54cb5951ab81bd0bbe25971f851ef", "score": "0.7295077", "text": "public function isAdmin()\n {\n return $this->role == 1;\n }", "title": "" }, { "docid": "b4fb5e97c3a26fc18358ec9d9501bc17", "score": "0.728655", "text": "protected function isCurrentUserAdmin() {}", "title": "" }, { "docid": "b4fb5e97c3a26fc18358ec9d9501bc17", "score": "0.72843957", "text": "protected function isCurrentUserAdmin() {}", "title": "" }, { "docid": "d0cad93644af00d7e46817799ebf30b8", "score": "0.7282262", "text": "public function isAdmin() {\n\t\t\n\t\treturn $this->is_admin;\n\t\t\n\t}", "title": "" }, { "docid": "ef55a7ec9f3707dff9bb27cf93a0e136", "score": "0.72776514", "text": "function HasAdmin()\n {\n return true;\n }", "title": "" }, { "docid": "da30d78f6b3f783514752b63dfe4fd01", "score": "0.72770756", "text": "public function adminControl()\n {\n $row = $this->currentUserData();\n if(isset($_SESSION['sess_user_type']) &&\n $_SESSION['sess_user_type'] == 'admin' && $row['user_type'] == 'admin'){\n return true;\n }\n }", "title": "" }, { "docid": "e326fbf373893039002e3fe9c704045b", "score": "0.7266847", "text": "public function isAdmin()\n {\n if (strtolower($this->name) == 'administrator')\n {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "972764290b4baf1a7d7791e1a834bd90", "score": "0.7247305", "text": "public function isAdmin(){\n if($this->role->name = 'Administrator'){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "60f7b7437996f69521942b3395d4e04e", "score": "0.72449404", "text": "public function is_admin(): bool {\n\t\treturn $this->is_admin;\n\t}", "title": "" }, { "docid": "894cac8f8b42e1378b08f0788c516e00", "score": "0.7233494", "text": "public function isAdmin()\n {\n return $this->isSuperUser() || $this->isMemberOf('admin');\n }", "title": "" }, { "docid": "ff6f86a9bc4042e9b62897fc1c4a8528", "score": "0.7224122", "text": "public function isAdmin(): bool\n {\n return $this->_admin;\n }", "title": "" }, { "docid": "1b5430a7797ec52de013dbee29545b4a", "score": "0.72175485", "text": "public function isAdmin()\n\t{\n\t\treturn $this->is_admin;\n\t}", "title": "" }, { "docid": "daea158eb6848efebd3054f8c9f71b8f", "score": "0.72146696", "text": "public function isAdmin()\n {\n return $this->group_id === 1;\n }", "title": "" }, { "docid": "0f1e87df2c8ad2ccff33507b8beadc7b", "score": "0.72097063", "text": "public static function isAdmin()\n {\n return auth()->check() && auth()->user()->panichd_admin;\n }", "title": "" }, { "docid": "230deed94382da419787d76edfcae610", "score": "0.72095746", "text": "public function isAdmin()\n\t{\n\t\treturn $this->isAdmin;\n\t}", "title": "" }, { "docid": "1bddc9e8982286ff2b6ef620ecce1efe", "score": "0.72038275", "text": "private function isAdmin() : bool\n {\n return $this->user->hasRole('admin');\n }", "title": "" }, { "docid": "c14ffc5d4502e9840b5e8860bcea9266", "score": "0.7202907", "text": "public function isAdmin()\n {\n return (bool) $this->admin;\n }", "title": "" }, { "docid": "b158d98e19fc09a885e412c72674e9ea", "score": "0.7194511", "text": "public function isUserOnAdminArea()\n\t{\n\t\treturn is_admin();\n\t}", "title": "" }, { "docid": "0343e61bc4124386a4ee0c68a617900c", "score": "0.718196", "text": "public function isAdmin()\n {\n return $this->is_admin;\n }", "title": "" }, { "docid": "79cec93c4843cb30bbe6ae1e48077b74", "score": "0.7180906", "text": "public function check_admin() {\n return current_user_can('administrator');\n }", "title": "" }, { "docid": "30b4c44753b72192938b88f0eaa9e81c", "score": "0.7179584", "text": "public function isAdmin()\n {\n return ((string) strtoupper($this->data->user_role) === \"ADMIN\") ? true : false;\n }", "title": "" }, { "docid": "dafbf98f34db8c1bf2c134f6e8f96190", "score": "0.7179564", "text": "public static function am_i_admin() \n {\n return ($_SESSION['_user'] == AV_DEFAULT_ADMIN || $_SESSION['_is_admin']);\n }", "title": "" }, { "docid": "c838fafd16f02dfd53f8094fe46a6221", "score": "0.7173195", "text": "public function isAdmin() {\n return $this->admin; // cerca la colonna admin nella tabella users\n }", "title": "" }, { "docid": "5864779a9feefa0abe0132afaa05ff24", "score": "0.71725506", "text": "function isAdmin() {\n\tif (isset($_SESSION['user']) && $_SESSION['user']['user_type'] == 'admin' ) {\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "b6b50560962179bc8c6019196e1f663f", "score": "0.71679157", "text": "public function is_admin()\n\t{\n\t\t$user = $this->get_current_user();\n\t\tif($user !== NULL)\n\t\t{\n\t\t\tif($user['auth'] == 255)\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "7776335bcfac98f8b7b70ac794229967", "score": "0.71508986", "text": "public function memberIsAdmin()\n {\n return $_SESSION['__COMMENTIA__']['member_role'] === 'admin';\n }", "title": "" }, { "docid": "4f2215afc878bac653242c3a792f63fc", "score": "0.71432924", "text": "public static function authAdmin() {\n if (Yii::$app->user->can(\"administrator\") || Yii::$app->user->can(\"adminsite\")) {\n return TRUE; //admin ใหญ่\n }\n }", "title": "" }, { "docid": "2ee515a3ae88fabedf616b92148e5138", "score": "0.71421987", "text": "function is_admin()\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->auth_model->is_admin();\n\t}", "title": "" }, { "docid": "2ee515a3ae88fabedf616b92148e5138", "score": "0.71421987", "text": "function is_admin()\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->auth_model->is_admin();\n\t}", "title": "" }, { "docid": "deb98591285bf337f599c74936a12090", "score": "0.71381164", "text": "protected static function isAdminUser() {\r\n throw new \\Excpetion('yet to implement');\r\n }", "title": "" }, { "docid": "e31295f56c0e442adf852e61cc4736ed", "score": "0.71346134", "text": "function is_admin()\n{\n global $app;\n if (is_authenticated()) {\n $user = $app->auth->getUserData();\n return ($user['role'] === '1');\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "1cdb7cd6449d4e6e38acd33e7886b7a6", "score": "0.7131162", "text": "public function is_admin(){\n\t\treturn $this->account_type == \"manager\";\n\t}", "title": "" }, { "docid": "9891fd763a09919751200988367035c2", "score": "0.7129013", "text": "public function isAdmin()\n {\n return ($this->role == 1) ? true : false;\n }", "title": "" }, { "docid": "7d8a4b09159c3a65060066232ee26ce0", "score": "0.712054", "text": "function isAdmin(){\n\t\treturn ($this->userlevel == ADMIN_LEVEL || $this->username == ADMIN_NAME);\n\t}", "title": "" }, { "docid": "2008407a7b5ee6f4d5a47422c251b8a1", "score": "0.71187484", "text": "public function isAdminRoute();", "title": "" }, { "docid": "93c11c2f93b076fdf1b87e9ed86c1a6c", "score": "0.7103582", "text": "public function check_admin()\n {\n return current_user_can('administrator');\n }", "title": "" }, { "docid": "1c6a26316a22971ac8021b80b9bda763", "score": "0.7102766", "text": "protected function userIsAdmin ()\n {\n $tokenHeader = apache_request_headers();\n $token = $tokenHeader['token'];\n $datosUsers = JWT::decode($token, $this->key, $this->algorithm);\n\n if($datosUsers->nombre==\"admin\")\n {\n return true;\n }\n else\n {\n return false;\n } \n }", "title": "" }, { "docid": "5b1b2c1ceb34473f533dd766688226b2", "score": "0.70925254", "text": "public function IsAdmin() {\n\t\t\treturn $this->intPersonTypeId == PersonType::Administrator;\n\t\t}", "title": "" }, { "docid": "1251afd827d617177b0842162c66cf65", "score": "0.7089995", "text": "public static function isAdmin(): bool {\n if ($user = self::user() && self::user()->isAdmin) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "8224992ec21021cd457738b5225e9b55", "score": "0.70806855", "text": "function isAdmin() {\n if (\\Illuminate\\Support\\Facades\\Auth::user()->rol_id == 1) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "6102f17596a958c7911afb868c567221", "score": "0.7075043", "text": "public function authorize()\n {\n return Auth::user()->type == 'admin';\n }", "title": "" }, { "docid": "b81a5bc7b5555ef9de4e249b12bd4821", "score": "0.7070464", "text": "function isAdmin(){\n\tif(isset($_SESSION['type']) && $_SESSION['type']!='user')\n\t\treturn true;\n\telse\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7fed474c456cf9039e19e0cf9d8c7914", "score": "0.7068259", "text": "public function isAdmin()\n {\n return $this->hasRole('ROLE_ADMIN');\n }", "title": "" }, { "docid": "f5420037c97748f53c544a140197f13c", "score": "0.7067407", "text": "public function isAdmin()\n\t{\n\t\treturn ($this->role == self::ROLE_ADMIN);\n\t}", "title": "" }, { "docid": "4101eb2f6a4c95dfc4c0534e6f8bfc90", "score": "0.7066401", "text": "function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }", "title": "" }, { "docid": "4101eb2f6a4c95dfc4c0534e6f8bfc90", "score": "0.7066401", "text": "function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }", "title": "" }, { "docid": "36458b3fffb59cbef5a4e75843731b36", "score": "0.70651436", "text": "public function isSuperAdmin(){\r\n if($this->user_type == 'SuperAdmin'){\r\n return true;\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "c852736cba78a232e6ec85fabd80cff9", "score": "0.70627016", "text": "public function getIsAdminAttribute()\n {\n return $this->attributes['user_type'] == '1';\n }", "title": "" }, { "docid": "edc26f1437e9e046f776e8190222e336", "score": "0.7057389", "text": "public function getIsAdminAttribute(){\n\n\t return $this->attributes['admin'] == 1;\n\t}", "title": "" } ]
4bdbe6ba8b67f45f35f118b888029742
get location data for given location id
[ { "docid": "5199b50167442adcdbc811e7f79aaefa", "score": "0.7514588", "text": "public function get_location($id)\n {\n $this->db->where('id', $id);\n $query = $this->db->get($this->table_name);\n return $query->result();\n }", "title": "" } ]
[ { "docid": "974db3cee47a7a1bd2e1a5f7e67a7f58", "score": "0.7775371", "text": "function get_location($id) {\n\t\t$url = 'http://' . $this->domain . '/frommers/location.feed?locationId=' . $id;\n\n\t\t$data = array();\n\t\ttry {\n\t\t\t$xml = simplexml_load_file($url);\n\n\t\t\t$data = array(\n\t\t\t\t'id' => (int) $xml['id'],\n\t\t\t\t'type' => (int) $xml['type'],\n\t\t\t\t'name' => (int) $xml['name'],\t\n\t\t\t\t'latitude' => (float) $xml['latitude'],\t\n\t\t\t\t'longitude' => (float) $xml['longitude'],\t\n\t\t\t);\n\n\t\t\t// need to add some processing for parent hierarch pish\n\t\t\t\t\n\t\t} catch (exception $e) {\n\t\t\t$data = array(\n\t\t\t\t'error' => $e->getMessage()\n\t\t\t);\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "44f83eb6843488f91b8cdf8e74907869", "score": "0.72830033", "text": "public function location_details ($locationid = null) {\r\n\t\tif ($this->location_exists($locationid)) {\r\n\t\t\t$key = $this->get_location_key($locationid);\r\n\t\t\treturn $this->locationData[$key];\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a5b403dd3d55fc0fa50839c3326c4a07", "score": "0.72791654", "text": "function getLocation($location_id=null)\n{\n\t$data = array();\n\tif(! empty($location_id))\n\t{\n\t\t$location_sql = \"SELECT * FROM location WHERE location_id='$location_id'\";\n\t}else\n\t{\n\t\t$location_sql = \"SELECT * FROM location\";\t\n\t}\n\t$conn = new Dbconnect();\n\t$db = $conn->dbmsConnect();\n\t$location_result = $db->query($location_sql);\n\tif($location_result->num_rows > 0 ) \n\t{ \n\t\twhile($location = $location_result->fetch_assoc())\n\t\t{\n\t\t\t$data[] = $location;\n \t\t}\n\t}\n\treturn $data;\n}", "title": "" }, { "docid": "38c5ed6036e240f83b53bea11cbbd588", "score": "0.726275", "text": "public function get_location_info($id) {\n\t\tif($this->bw_config->location_list_source == 'Default') {\n\t\t\t$this->db->where('id', $id);\n\t\t\t$query = $this->db->get('locations_default_list');\n\t\t\t\n\t\t} else if($this->bw_config->location_list_source == 'Custom') {\n\t\t\t$this->db->where('id', $id);\n\t\t\t$query = $this->db->get('locations_custom_list');\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn ($query->num_rows() > 0) ? $query->row_array() : FALSE;\n\t}", "title": "" }, { "docid": "f15bd84848ed0ffc49071b10af0b6bf3", "score": "0.7245853", "text": "function get_location($id)\n {\n $q = ci()->db->get_where($this->t_locations, array('deleted'=>0,'id' => $id)); \n if($q->num_rows()>0)\n {\n return $data = $q->row();\n }\n else\n {\n return FALSE;\n } \n }", "title": "" }, { "docid": "8ae095912bac3c1424dc42533d873be7", "score": "0.71698713", "text": "public function loadLocation($id);", "title": "" }, { "docid": "35d02496a72c0e034b9bf6c374043ae7", "score": "0.7086795", "text": "public function get_one_data_user_location($id)\n\t{\n $this->db->select(\n 'ul.*,\n l.NAWIL as location_name,\n u.username,\n del.name as idelete_name'\n );\n\t\t$this->db->where(\"ul.id\",$id);\n\t\t$this->db->where('ul.idelete',0);\n\t\t$this->db->from('user_location ul');\n\n\t\t// diganti dengan join ke tabel ARF10\n //$this->db->join('location l','l.id=ul.location_id');\n $this->db->join($this->prefix.'_AR..ARF10 l', 'l.WIL=ul.location_id');\n\n\t\t$this->db->join('[user] u','u.id=ul.user_id');\n\t\t$this->db->join('idelete del','del.id=ul.idelete');\n\t\t$query = $this->db->get()->row();\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "1e6a1fc3b8c8e4fbe0ded0a6f9914082", "score": "0.70505625", "text": "public function read(int $id)\n {\n return $this->buildEntity(\n $this->client->get(sprintf('locations/%d', $id)),\n Location::class\n );\n }", "title": "" }, { "docid": "07369329252b494ae267df14f73b1d07", "score": "0.69215196", "text": "public function custom_location_by_id($id){\n\t\t$this->db->where('id', $id);\n\t\t$query = $this->db->get('locations_custom_list');\n\t\tif($query->num_rows() > 0) {\n\t\t\treturn $query->row_array();\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "a10e0dfea344fac479a5643f341ab8c2", "score": "0.69102395", "text": "function getInfoByID($locationid){\n $query = 'SELECT * FROM '\n .$this->TABLE_NAME.\n ' WHERE '\n .$this->TABLE_LOCATIONID.\n '=\"'\n .$locationid.\n '\";';\n // echo $query;\n $stmt = $this->conn->prepare($query);\n if($stmt->execute()){\n if($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n return json_encode(array('status'=>'success','data'=>$row,'action' => 'Get Location Info'));\n\n }\n return json_encode(array('status'=>'fail','message'=>'Location ID not Found.','action' => 'Get Location Info'));\n\n\n }\n return json_encode(array('status'=>'fail','message'=>'Connection Error.','action' => 'Get Location Info'));\n\n }", "title": "" }, { "docid": "bef91ff8709ae7f0870dc4fdc0b73742", "score": "0.68135035", "text": "function get_location_id(){\n\t\treturn $this->location_id;\n\t}", "title": "" }, { "docid": "2cc1ed8b7c02133784b086b8d8dfbd2d", "score": "0.6790658", "text": "public function getLocationID() { return $this->locationID; }", "title": "" }, { "docid": "831e5a9e6630b4aacc924f43e86bb7c3", "score": "0.6745096", "text": "public function location_by_id($id) {\n\t\tif($id == 'worldwide')\n\t\t\treturn 'Worldwide';\n\t\t\t\n\t\t$location = $this->get_location_info($id);\n\t\treturn ($location == FALSE) ? FALSE : $location['location'];\n\t}", "title": "" }, { "docid": "8281accd71265cd074882b1431a2c626", "score": "0.67315", "text": "public function get($location_id)\n\t{\n\t\t$location = $this->locationModel->get_location_by_id($location_id);\n\n\t\t$data['location'] = $location;\n\t\t$data['page_title'] = sprintf(lang('data_for_location'), $location->name);\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('location_view', $data);\n\t\t$this->load->view('templates/footer');\n\t}", "title": "" }, { "docid": "bdb47383438c72253921e4254d8f2ae9", "score": "0.671985", "text": "private function _load($id) {\n\t\t$id = abs(intval($id));\n\t\t$db = Denkmal_Db::get();\n\t\t$sql = 'SELECT id, name, url, notes, enabled, showalways, blocked, latitude, longitude\n\t\t\t\tFROM location\n\t\t\t\tWHERE id=?';\n\t\t$this->_data = $db->fetchRow($sql, $id);\n\n\t\tif (!$this->_data) {\n\t\t\tthrow new Denkmal_Exception(\"Location doesn't exist (\" . $id . \")\");\n\t\t}\n\t}", "title": "" }, { "docid": "6a17506b43e4800607f324d8088cf239", "score": "0.66817516", "text": "public function getLocationByID($idShopLocation){\n\t\n\t$rows = $this->fetchRow(\"`id_shop_location_head` = \".$idShopLocation);\n\treturn $rows->toArray();\n\t\n\t}", "title": "" }, { "docid": "d2a754f7b7125330fd3c6a9f0e577e4a", "score": "0.66811556", "text": "public function getLocation($location_id) {\n $cache_store_location_status = false;\n if($this->config->get('module_oc_cache_status') && (isset($this->config->get('module_oc_cache_store_location')['status']) && $this->config->get('module_oc_cache_store_location')['status'])){\n $cache_store_location_status = true;\n $lang_store_id = '.'.(int)$this->config->get('config_language_id') . '.' . (int)$this->config->get('config_store_id');\n\n if (self::$getCacheInstance == null) {\n self::$getCacheInstance = $this->webkulcache->get_InstanceCache('files');\n }\n $CachedString = self::$getCacheInstance->getItem('store_location');\n $store_location_container = $CachedString->get('store_location'.$lang_store_id);\n if(isset($store_location_container['store_location'.$lang_store_id][$location_id])){\n return $store_location_container['store_location'.$lang_store_id][$location_id];\n }\n }\n /**\n * opencart cache code end here\n */\n \n\t\t$query = $this->db->query(\"SELECT location_id, name, address, geocode, telephone, fax, image, open, comment FROM \" . DB_PREFIX . \"location WHERE location_id = '\" . (int)$location_id . \"'\");\n\n\n /**\n * opencart cache code start here\n */\n if($cache_store_location_status){\n $store_location_container['store_location'.$lang_store_id][$location_id] = $query->row;\n if($this->config->get('module_oc_cache_store_location')['expire'])\n $CachedString->set($store_location_container)->expiresAfter($this->config->get('module_oc_cache_store_location')['expire']);\n else\n $CachedString->set($store_location_container);\n\n self::$getCacheInstance->save($CachedString);\n }\n /**\n * opencart cache code end here\n */\n \n\t\treturn $query->row;\n\t}", "title": "" }, { "docid": "a4aff34877d4c62c0ee275a9c1f1043d", "score": "0.645082", "text": "public function getLocations($id)\n {\n $locations = Location::where('game_id', $id)->get();\n return $this->sendResponse($locations, 'Locations retrieved succesfully.');\n }", "title": "" }, { "docid": "516ecd52b51f71a7f93ff565d5edb489", "score": "0.6441072", "text": "public function selectlocation($data){ \r\n $this->db->select('*')->from('tbllocation')->where(array('locationID'=> $data['locationID']));;\r\n $query=$this->db->get();\r\n return $query->result_array();\r\n $db->close();\r\n }", "title": "" }, { "docid": "c47d30071e2708ea3724c5d682d8d82f", "score": "0.64350224", "text": "function get_program_location($i_id) {\n\t\t$this->db->where('id', $i_id);\n\t\t$r_result = $this->db->get(TBL_CENTRE_LOCATIONS);\n\n\t\t$m_return = false; \n\t\tif($r_result->num_rows > 0){\n\t\t\t$m_return = $r_result->row();\n\t\t}\n\n\t\treturn $m_return;\n\t}", "title": "" }, { "docid": "b195211ff0c1d885a04522d731dddffb", "score": "0.6432339", "text": "public function getForDataTable($location_id = null)\n {\n \n if($location_id != null){\n return $this->query()\n ->select([\n config('module.products.table') . '.id',\n config('module.products.table') . '.name',\n config('module.products.table') . '.locations',\n config('module.products.table') . '.created_at',\n config('module.products.table') . '.updated_at',\n ])->where('locations', 'LIKE', '%' . $location_id . '%');\n }else{\n return $this->query()\n ->select([\n config('module.products.table') . '.id',\n config('module.products.table') . '.name',\n config('module.products.table') . '.locations',\n config('module.products.table') . '.created_at',\n config('module.products.table') . '.updated_at',\n ]);\n }\n }", "title": "" }, { "docid": "b4b99a725c75631753605e59de2f3e71", "score": "0.6430217", "text": "public function show($id)\n {\n $location = Location::where('id',$id)->get()->first();\n\n return response()->json( $location );\n }", "title": "" }, { "docid": "cab0d74986ceb88266379af110206966", "score": "0.6412286", "text": "function getLocations ($location_id)\n{\n\t$result = usePreparedSelectBlade\n\t(\n\t\t'SELECT id, name FROM Location WHERE parent_id = ? ORDER BY name',\n\t\tarray ($location_id)\n\t);\n\treturn reduceSubarraysToColumn (reindexById ($result->fetchAll (PDO::FETCH_ASSOC)), 'name');\n}", "title": "" }, { "docid": "58cbd874597b558e71be4cbfd806740b", "score": "0.63947326", "text": "public function findOneById($id)\n {\n\t\t$location = $this->connection->findById($id);\n\t\t\n\t\tif(!empty($location)){\n\t\t\t\n\t\t\t$date = $location['created_at'];\n\t\t\t\n\t\t\tif(!empty($date)){\n\t\t\t\t$date = \\DateTime::createFromForm('d/m/Y', $date);\n\t\t\t}\n\t\t\t\n\t\t\treturn new Location($location['id'], $location['name'], $date);\t\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "85966fe4021ecc97d8de143bd4936596", "score": "0.63830566", "text": "public function get_location_name($id){\n $q = $this->db->select('location')->where('id',$id)->get('istaff.locations');\n return $q->row('location');\n}", "title": "" }, { "docid": "1fba3578d56e0f6085e55c8163e6ca83", "score": "0.6366284", "text": "public function floor_details ($locationid = null, $floorid = null) {\r\n $data = false;\r\n\t\t\r\n\t\t\r\n\t\tif ($this->location_exists($locationid) && $this->floor_id_exists($locationid, $floorid)) {\r\n\t\t\t$key = $this->get_location_key($locationid);\r\n\t\t\t$floorKey = $this->get_floor_key($floorid, $key);\r\n\t\t\t$data = $this->locationData[$key]['floor'][$floorKey];\r\n\t\t}\r\n \r\n return $data;\r\n\t}", "title": "" }, { "docid": "412b793f1524594d40f2c7e1ae7421bd", "score": "0.6307955", "text": "public function get($id = null): Location\n\t{\n\t\treturn Location::get($id);\n\t}", "title": "" }, { "docid": "fcbc9e9d2367d99801581507be9e31b4", "score": "0.62936133", "text": "public function get($id = null, $fields = \"*\") {\n\t\tif($id) {\n\t\t\tif(!$location = $this->_db->get($this->_table, array('id', '=', $id), $fields)) {\n\t\t\t\tthrow new Exception(\"There was a problem getting location data\");\n\t\t\t}\n\t\t\treturn $location->first();\n\t\t}\n\n\t\tif(!$location = $this->_db->get($this->_table, array('1', '=', '1'), $fields)) {\n\t\t\tthrow new Exception(\"There was a problem getting location data\");\n\t\t}\n\t\treturn $location->results();\n\t}", "title": "" }, { "docid": "b5647b7692b256d79bfea8bb899ca9a5", "score": "0.62780505", "text": "public function get_class_location($id) {\n return $this->db->get_where('class_locations',array('idclass_locations'=>$id));\n }", "title": "" }, { "docid": "2d8abaf5cd4694adb7ddf3b03ca70e16", "score": "0.6215447", "text": "function &getData()\r\n\t{\r\n\t\t// Load the data\r\n\t\tif (empty( $this->_data )) {\r\n\t\t\t$query = ' SELECT * FROM #__location '.\r\n\t\t\t\t\t' WHERE id = '.$this->_id;\r\n\t\t\t$this->_db->setQuery( $query );\r\n\t\t\t$this->_data = $this->_db->loadObject();\r\n\t\t}\r\n\t\tif (!$this->_data) {\r\n\t\t\t$this->_data = new stdClass();\r\n\t\t\t$this->_data->id = 0;\r\n\t\t\t$this->_data->region_title = null; // string;ordering, e.g. ('Indy North;1')\r\n\t\t\t$this->_data->location_name = null; // (e.g. 'Zionsville')\r\n\t\t\t$this->_data->address1 = null;\r\n\t\t\t$this->_data->address2 = null;\r\n\t\t\t$this->_data->city = null;\r\n\t\t\t$this->_data->state = null;\r\n\t\t\t$this->_data->zip = null;\r\n\t\t\t$this->_data->phone = null;\r\n\t\t\t$this->_data->map_link = null;\r\n\t\t\t$this->_data->hours = null; // associative array ('sunday' => '12:00-6:00', etc... )\r\n\t\t\t$this->_data->photo_main_url = null;\r\n\t\t\t$this->_data->photo_thumb_url = null;\r\n\t\t\t$this->_data->photo_carousel_list = null; //(string array)\r\n\t\t\t$this->_data->offerpage_url = null;\r\n\t\t\t\r\n\t\t}\r\n\t\treturn $this->_data;\r\n\t}", "title": "" }, { "docid": "f6ff84f13e35264266383e51e99efde7", "score": "0.6120781", "text": "function get_city_data($id) {\r\n\t\t\t\t$this->db->where('city_id', $id);\r\n\t\t\t\t$state = $this->db->get('pt_cities')->result();\r\n\t\t\t\t$data['state'] = $state[0]->city_state;\r\n\t\t\t\t$this->db->where('state_id', $state[0]->city_state);\r\n\t\t\t\t$country = $this->db->get('pt_states')->result();\r\n\t\t\t\t$data['country'] = $country[0]->country_id;\r\n\t\t\t\treturn $data;\r\n\t\t}", "title": "" }, { "docid": "4b8746823e92c4ff9596a7b90f36a4e4", "score": "0.60807186", "text": "public function show($id)\n {\n $list_location = ListLocations::find($id);\n return response()->json($list_location);\n }", "title": "" }, { "docid": "472dc7713b814e42d1b34165ad1d427b", "score": "0.6076379", "text": "public function get_location_name($id) {\n\t\t\tif($id>0) {\n\t\t\t\t$stmt = $this->conn->prepare(\"SELECT country_name FROM countries WHERE id = ?\");\n\t\t\t\t$stmt->execute(array($id));\n\t\t\t\t$name = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\treturn $name['country_name'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "15d41566ca726fc2d4674fad36548705", "score": "0.6043594", "text": "public function getData($id) {\n return $this->run('getData', array($id));\n }", "title": "" }, { "docid": "d6fa3b2a9827327599736ccf601dae5e", "score": "0.60425377", "text": "public function getAfvalLocation()\n {\n $conn = Db::getInstance();\n $statement = $conn->prepare(\"SELECT pins.*, locations.lat, locations.lng, rubrieken.icon_url, subrubrieken.name FROM pins, locations, rubrieken, subrubrieken WHERE pins.location_id = locations.id AND pins.rubriek_id = rubrieken.id AND pins.subrubriek_id = subrubrieken.id AND subrubrieken.rubriek_id = rubrieken.id AND rubriek.id=1 AND pins.public=1\");\n $statement->execute();\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n }", "title": "" }, { "docid": "6f9ee25d7377aaebc66c24058e08fb81", "score": "0.60267335", "text": "public function get_location_meta( $post_id = 0, $key = '' ) {\n\n if ( ! $post_id ) {\n global $post;\n $post_id = $post->ID;\n }\n\n if ( $key ) {\n return get_post_meta( $post_id, $this->get_db_prefix() . trim( strtolower( $key ) ), true );\n } else {\n\n $data = array();\n $fields = $this->get_fields();\n\n foreach ( $fields as $field ) {\n $data[$field['slug']] = get_post_meta( $post_id, $this->get_db_prefix() . $field['slug'], true );\n }\n\n return $data;\n }\n }", "title": "" }, { "docid": "b2f0e3e5b7a773cb564220ae5234c81c", "score": "0.601941", "text": "public function fetchWarehouseSecData($location);", "title": "" }, { "docid": "4817fabf023c4f651fc68409a190a476", "score": "0.601888", "text": "public function getData($id = null);", "title": "" }, { "docid": "a5a3f1fcea6c3fac97a88ce6cfa061e0", "score": "0.6014672", "text": "private function get_location_key ($locationid) {\r\n\t\t\r\n\t\t//-- loop through locations\r\n\t\tforeach ($this->locationData AS $key => $location) {\r\n\t\t\tif ($location['id'] == $locationid) {\r\n\t\t\t\treturn $key;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "title": "" }, { "docid": "2659af7ba41ecd6292d3ef5a41419b89", "score": "0.59904647", "text": "public static function getData($id)\n\t{\n\t\treturn static::find($id);\n\t}", "title": "" }, { "docid": "48fce035a0ae26f86b48806dcd6d6db6", "score": "0.599045", "text": "function getLocation($loc_state)\n {\n $stmt = $this->conn->prepare(\"SELECT trans_loc_id, loc_name FROM location WHERE loc_state=?;\");\n $stmt->bind_param(\"s\",$loc_state);\n $stmt->execute();\n $stmt->bind_result($id, $loc);\n\n $locations = array();\n\n while($stmt->fetch()){\n $location = array();\n $location['id'] = $id;\n $location['loc_name'] = $loc;\n\n array_push($locations, $location);\n }\n\n return $locations;\n\n $stmt->close();\n }", "title": "" }, { "docid": "62c1765ede4f91b2d273f370931aff18", "score": "0.59626544", "text": "public function getLocation()\n {\n return $this->data->location;\n }", "title": "" }, { "docid": "7383ecfab13ce1ace10f3c54e64fb546", "score": "0.5954101", "text": "public function getCityAndHigherLocation($restaurant_id) {\n $location = false;\n\n $restaurant = Yii::app()->db->createCommand()\n ->select(array('city', 'state', 'country', 'name'))\n ->from(self::model()->tableName())\n ->where('id=:id', array(':id' => $restaurant_id))\n ->queryRow();\n if ($restaurant) {\n if (!empty($restaurant['city']))\n $location = $restaurant['city'];\n if (!empty($restaurant['state']))\n $location.=', ' . $restaurant['state'];\n elseif (!empty($restaurant['country']))\n $location.=', ' . $restaurant['country'];\n\n if (!$location && !empty($restaurant['name']))\n $location = $restaurant['name'];\n }\n\n return $location;\n }", "title": "" }, { "docid": "4e12596b8121280a127d53ef0a6aef29", "score": "0.5942737", "text": "public function get_location_name($location_id){\n //preparing query\n $this->db->where('location_id',$location_id);\n $query=$this->db->get('regions');\n if($query==true){\n\n return $query->row()->location_name;\n\n }else{\n return false;\n }\n\n\n }", "title": "" }, { "docid": "2a94a32234c9adbbd3eeb4be85d8cec4", "score": "0.5937666", "text": "public function findLocationByCityId($id)\n\t{\n\n\t\tif($location = $this->findOneByCity($id)){\n\n\t\t\treturn $location;\n\t\t}\n\t\telse {\n\t\t\t$city = $this->_em->getRepository('ZogsWorldBundle:City')->findOneById($id);\n\t\t\treturn $this->createLocationFromCity($city);\t\n\t\t}\n\t}", "title": "" }, { "docid": "3a1c8f88233538f4ed8e3f675fdbaf93", "score": "0.59210545", "text": "public function getLocationId(): string\n {\n return $this->locationId;\n }", "title": "" }, { "docid": "3a1c8f88233538f4ed8e3f675fdbaf93", "score": "0.59210545", "text": "public function getLocationId(): string\n {\n return $this->locationId;\n }", "title": "" }, { "docid": "08b30c376bdc160716803068dc99d9d8", "score": "0.59128", "text": "public function getGeo($id)\n {\n return $this->get('geo/id/' . $id);\n }", "title": "" }, { "docid": "3bf92d40809e07c15195b61eef46d535", "score": "0.5901292", "text": "function fetchLocationUpdate($id, $conn)\n {\n\n $sql = \"SELECT * FROM `tbl_location` WHERE `id` = '$id' \";\n $res = mysqli_query($conn, $sql);\n while ($data = mysqli_fetch_assoc($res)) {\n $row[] = $data;\n }\n return $row;\n }", "title": "" }, { "docid": "c22b63f2285f66f62dd36a01435f0b6a", "score": "0.5897113", "text": "public function loadFromId($id) {\n $select = $this->table->getSql()->select();\n $select->columns(array('*',\n 'point'=>new \\Zend\\Db\\Sql\\Expression('asText(main_place)')\n ));\n $select->where(array($this->primary=>$id));\n $data = $this->table->selectWith($select)->current();\n if (is_object($data)) {\n $this->data = $data->getArrayCopy();\n $this->rawData = $this->data;\n }\n else {\n $mysqli = $this->table->getAdapter()->getDriver()->getConnection()->getResource(); \n throw new \\Exception('Error on query '.$select->getSqlString($this->table->getAdapter()->getPlatform()).' '.$mysqli->errno.' '.$mysqli->error,1401301242);\n }\n\n \n $this->getCoordinates();\n }", "title": "" }, { "docid": "29d179f125317e38da9a541e6a7fcb46", "score": "0.5887219", "text": "function getTweetLocations($tweetid, $db) {\n $sql = \"SELECT tweetid, location FROM data \" .\n \"WHERE tweetid > '\" . $tweetid . \"' ORDER BY tweetid ASC\";\n return $db->query($sql);\n\t}", "title": "" }, { "docid": "018a7d60f12595692a86c52ef2f1213d", "score": "0.5886963", "text": "public function show($id)\n {\n //get single restaurants by id and lazy load its location\n $restaurant = Restaurant::find($id);\n\n $restaurant->load('location');\n return $restaurant;\n }", "title": "" }, { "docid": "f6b2d36ebb78ad5eeb3276bf451166b2", "score": "0.58848083", "text": "function get_restaurant($id) {\n\t\t$result = $this->get_item($id);\n\n\t\t$xml = $result['xml'];\n\t\t$data = $result['data'];\n\n\t\t$data['price_category'] = strtolower( (string) $xml['priceCategoryName']);\n\t\t$data['opening_hours'] = (string) $xml['openingHours'];\n\n\t\t// Load up the extra fields\n\t\tif ($xml->fields) {\n\t\t\tforeach ($xml->fields->field as $f) {\n\t\t\t\t$key = (string) $f['key'];\n\n\t\t\t\tswitch ($key) {\n\t\t\t\t\tcase 'CREDIT_CARDS':\n\t\t\t\t\t\t$data['credit_cards'] = $f['value'];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'RESERVATIONS':\n\t\t\t\t\t\t$data['reservations'] = $f['value'];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'CUISINE_TYPE1':\n\t\t\t\t\t\t$data['cuisine'] = $f['value'];\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "6bfe746bce46ce22a3461276fdce2b53", "score": "0.58777505", "text": "public static function getPlace($id)\n\t{\n\t\t// Initialiase variables.\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\n\t\t// Create the base select statement.\n\t\t$query->select('a.*');\n\t\t$query->from($db->quoteName('#__albums_places') . ' AS a');\n\t\t$query->where($db->quoteName('a.id') . ' = ' . $db->quote($id));\n\n\t\t// Join over the categories.\n\t\t$query->select('c.title AS category_title, c.path AS category_route, c.access AS category_access, c.alias AS category_alias');\n\t\t$query->join('LEFT', '#__categories AS c ON c.id = a.catid');\n\n\t\t// Set the query and load the result.\n\t\t$db->setQuery($query);\n\t\t$result = $db->loadObject();\n\n\t\t// Check for a database error.\n\t\tif ($db->getErrorNum())\n\t\t{\n\t\t\tJError::raiseWarning(500, $db->getErrorMsg());\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "7123d42c13a731b99db6209a965ab8c2", "score": "0.587691", "text": "public function edit($id)\n {\n $location = Location::findOrFail($id);\n\n return response()->json($location);\n }", "title": "" }, { "docid": "fda5e6dab39354fe13b612b011011a20", "score": "0.58766764", "text": "public function getLocations($id, Request $request)\n {\n Log::debug(\"The request params are\".$request->input('api_key'));\n $origin_url = $request->server('HTTP_REFERER');\n $code_key = \\App\\CodeSnippetWebsite::where('company_id', '=', $id)->where('api_key', '=', $request->input('api_key'))->first();\n\n if ((auth()->check()) || count($code_key) == 1) {\n if ($code_key->network_id != 0) {\n $network = \\App\\Network::where('id', '=', $code_key->network_id)->firstOrFail();\n echo $network->officeLocations;\n } else {\n $company = \\App\\Company::where('id', '=', $id)->firstOrFail();\n echo $company->officeLocations;\n }\n } else {\n abort(401);\n }\n }", "title": "" }, { "docid": "b2cb6310575ce65cdd0483d7ad4c6f97", "score": "0.58713466", "text": "function get_data_by_id($id)\r\n {\r\n return $this->db->get_where($this->table, ['id' => $id])->row();\r\n }", "title": "" }, { "docid": "b22aa73e9aa78d4f7233ece796d481d5", "score": "0.5850803", "text": "public static function getTrainingsByLocation($id)\n {\n try {\n $conn = Db::getConnection();\n $stmt = $conn->prepare(\"SELECT * FROM training WHERE location = :location\");\n $stmt->bindValue(':location', (int)$id, PDO::PARAM_INT);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_CLASS);\n } catch (PDOException $err) {\n Logger::logError('Could not get locations', $err);\n return false;\n }\n }", "title": "" }, { "docid": "258c8f578d34f722bc0549bc492417fb", "score": "0.58403033", "text": "public function getAddressAction($id)\n {\n $result=Address::find($id);\n return $this->extractData($result);\n }", "title": "" }, { "docid": "ed7493dec87da223e4d0516ca240d7b0", "score": "0.58307827", "text": "public function edit($id)\n {\n $location = location::find($id);\n $location['country_code'] = country::where('id',$location->country_code)->first();\n $location['city_code'] = city::where('id',$location->city_code)->first();\n $location['province_code'] = province::where('id',$location->province_code)->first();\n $location['all_city'] = city::all();\n $location['all_province'] = province::all();\n $location['all_country'] = country::all();\n return response()->json($location);\n }", "title": "" }, { "docid": "9de19107a29ad92d378226eb1296b26b", "score": "0.5814249", "text": "public function testGetValidLocationByLocationId() {\n\t\t// create a new Location\n\t\t$newLocation = new Location(null, $this->VALID_storageCode, $this->VALID_description);\n\n\t\t$newLocation->insert($this->getPDO());\n\n\t\t// grab the data from guzzle\n\t\t$response = $this->guzzle->get('https://bootcamp-coders.cnm.edu/~invtext/backend/php/api/location/?locationId=' . $newLocation->getLocationId());\n\t\t$this->assertSame($response->getStatusCode(), 200);\n\t\t$body = $response->getBody();\n\t\t$location = json_decode($body);\n\t\t$this->assertSame(200, $location->status);\n\t}", "title": "" }, { "docid": "9234c03abe1415839163d0116f8945db", "score": "0.5810085", "text": "public function byLocation()\n { \n return Price::with('service')->with('location')->where('location_id' , request('location_id'))->get();\n }", "title": "" }, { "docid": "b94b0486c4faeebcda862cca3016aedb", "score": "0.57991266", "text": "public function getUserData(int $id);", "title": "" }, { "docid": "240a1b8ddc219f371856d66a6ab4b5fa", "score": "0.5793088", "text": "private function getUserLocation()\n {\n $query = @unserialize (file_get_contents('http://ip-api.com/php/'));\n\n return ([\n 'latitude' => $query['lat'],\n 'longitude' => $query['lon'],\n 'country' => $query['country'],\n 'city' => $query['city'],\n ]);\n }", "title": "" }, { "docid": "cbcd381dac74e1a3471d32113c16c725", "score": "0.578627", "text": "public function get( $id ) {\n\t\treturn $this->map[ $id ];\n\t}", "title": "" }, { "docid": "df0dc31c540b9435a4a2067bf91b449d", "score": "0.57798445", "text": "public function getData($id){\n\t\treturn self::getLineData($this->getDb(), $id);\n\t}", "title": "" }, { "docid": "f729d15a7683634913503c0488948f08", "score": "0.5771264", "text": "function get_lat($id, $latlong) {\n\n $ci = & get_instance();\n return $latlong[$id][0]; //$latlong[$id.'lat'];\n }", "title": "" }, { "docid": "eae19c88b76e3ef6fa1543d3b173203f", "score": "0.5757919", "text": "public function getDataItem($id){\n \t\tif(!isset($id) || !isset($this->data[$id])){\n \t\t\treturn null;\n \t\t}\n \t\t\n \t\treturn $this->data[$id];\n\n \t}", "title": "" }, { "docid": "5242dc30a4befef459799a6c6ab79140", "score": "0.57484114", "text": "function get_location()\r\n {\r\n return $this->location;\r\n }", "title": "" }, { "docid": "b6e3ef8efbca3a3b38ceb273294e25cd", "score": "0.57363313", "text": "function getlocationmasterbyid($conn,$id){\r\n\t$ds=mysqli_query($conn,\"SELECT `name` FROM `locationmaster` where `id`='$id'\"); \r\n\t$ds1=mysqli_fetch_assoc($ds);\r\n\treturn $ds1['name'];\r\n \r\n}", "title": "" }, { "docid": "5d1c3df7ce9ab43dc80f3d90bbc0a791", "score": "0.57348573", "text": "function get_event($id) {\n\t\t$result = $this->get_item($id);\n\n\t\t$xml = $result['xml'];\n\t\t$data = $result['data'];\n\n\t\t// Crummy way of getting the display location\n\t\t$data['display_location'] = (string) $xml->locationInfos->locationInfo['locationName'];\n\n\t\t// Date info\n\t\t$data['display_date'] = (string) $xml['displayDate'];\n\t\t$data['start_date'] = (string) $xml->dateRanges->dateRange['startDate'];\n\t\t$data['end_date'] = (string) $xml->dateRanges->dateRange['endDate'];\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "62ef3426703c744d7ab656a317ec47a7", "score": "0.5721709", "text": "function get_locations(){\n\t$pdo = make_connection();\n\t$json = '{\"locations\":[';\n\t$stmt = $pdo->query(\"SELECT * FROM locations ORDER BY location_id ASC\");\n\t$stmt->setFetchMode(PDO::FETCH_OBJ);\n\twhile ($row = $stmt->fetch()) { \n\n\t\t$json .= '[{\"id\":\"' . $row->location_id . '\", ';\n\t\t$json .= '\"latitude\":\"' . $row->latitude . '\", ';\n\t\t$json .= '\"longitude\":\"' . $row->longitude . '\", ';\n\t\t$json .= '\"address\":\"' . $row->address . '\", ';\n\t\t$json .= '\"name\":\"' . $row->name . '\"}],';\n\n\t}\n\techo substr($json,0,-1) . \"]}\";\n\t$pdo = NULL;\n}", "title": "" }, { "docid": "77d1c8574142e3c8445d00de79fa1cb2", "score": "0.5712985", "text": "public function KhujTheSearchApp($id)\n {\n $place = Place::where('device_ID','=',$id)->where('user_id', null)->get();\n // $lon = $place->longitude;\n // $lat = $place->latitude;\n // $Address = $place->Address;\n return $place->toJson();\n /*response()->json([\n 'lon' => $lon,\n 'lat' => $lat,\n 'address' => $Address\n ]);*/\n }", "title": "" }, { "docid": "0df5964d209927be36a130cd2d508386", "score": "0.57098466", "text": "public function Get_Location()\n {\n $query = mysql_query(\"SELECT `name` FROM `gs_city` where 1 GROUP BY `name` ORDER BY `name` ASC \");\n $row = mysql_num_rows($query);\n if($row)\n {\n while ($row = mysql_fetch_assoc($query))\n {\n $data[] = $row;\n }\n return $data;\n }\n else\n {\n return 0;\n }\n }", "title": "" }, { "docid": "733c37fc8abc5ebb509911d6597ffdfe", "score": "0.5704048", "text": "public function show($id)\n {\n $permissions = User::GetPermissions();\n foreach($permissions as $permission) {\n if ($permission->description == \"Allow Access To Specific Location\")\n {\n return new LocationResource(Location::where('id',$id)->firstOrFail());\n }\n }\n return response()->json(['error' => 'Not Authorised.'], 401); \n }", "title": "" }, { "docid": "09e1baa6b11b8d2dc5ea4cebfdcf4ad3", "score": "0.57003194", "text": "public function getDetail($id) {\n $endpoint = '/spots';\n\n $client = $this->_constructClient($endpoint . '/' . $id);\n try {\n $response = $client->request();\n } catch (Zend_Http_Client_Exception $e) { // timeout or host not accessible\n return;\n }\n\n // error in response\n if ($response->isError()) return;\n\n $entry = Zend_Json::decode($response->getBody());\n\n $poi = new GSAA_Model_POI(self::TYPE);\n $poi->name = $entry['name'];\n $urlExploded = explode('/', $entry['url']);\n $poi->id = $urlExploded[2];\n $poi->url = self::PUBLIC_URL . $entry['url'];\n $poi->lat = $entry['lat'];\n $poi->lng = $entry['lng'];\n if (isset($entry['location']['address']))\n $poi->address = $entry['address']['locality'];\n\n if (isset($entry['phone_number']))\n $poi->phone = $entry['phone_number'];\n\n if (isset($entry['description']))\n $poi->description = trim($entry['description']);\n\n /*\n * Links\n */\n if (isset($entry['websites'])) {\n foreach ($entry['websites'] as $websiteIndex => $website)\n $poi->links[] = array(\"Website\" => (strncmp($website, 'http', 4) == 0 ? '' : 'http://') . $website);\n }\n if (isset($entry['twitter_username'])) // twitter account\n $poi->links[] = array(\"Twitter\" => \"http://twitter.com/\" . $entry['twitter_username']);\n\n /*\n * Categories\n */\n foreach ($entry['spot_categories'] as $category) {\n $tmpCategory = array();\n $tmpCategory['name'] = $category['name'];\n $urlExploded = explode('/', $category['url']);\n $tmpCategory['id'] = $urlExploded[2];\n\n $clientCategory = $this->_constructClient('/categories/' . $tmpCategory['id']);\n try {\n $responseCategory = $clientCategory->request();\n\n // error in response\n if ($responseCategory->isError()) return;\n\n $resultCategory = Zend_Json::decode($responseCategory->getBody());\n $tmpCategory['icon'] = $resultCategory['small_image_url'];\n } catch (Zend_Http_Client_Exception $e) { // timeout or host not accessible\n // dont add category\n continue;\n }\n $poi->categories[] = $tmpCategory;\n }\n\n /**\n * Add photos\n */\n if ($entry['photos_count'] > 0) {\n $clientPhotos = $this->_constructClient($endpoint . '/' . $id . '/photos');\n try {\n $responsePhotos = $clientPhotos->request();\n\n // error in response\n if ($responsePhotos->isError()) return;\n\n $resultPhotos = Zend_Json::decode($responsePhotos->getBody());\n $entryPhotos = $resultPhotos['activity'];\n\n if (count($entryPhotos) > 0) {\n foreach ($entryPhotos as $photo) {\n if ($photo['type']!='photo') continue;\n $tmpDate = new Zend_Date(substr($photo['created_at'], 0, -1) . '+00:00', Zend_Date::W3C);\n $tmpPhoto = array(\n 'url' => $photo['photo_urls']['high_res_320x480'],\n 'thumbnail' => $photo['photo_urls']['square_100'],\n 'id' => md5($photo['checkin_url']), // create \"static\" url\n 'date' => $tmpDate->get(Zend_Date::TIMESTAMP),\n 'title' => trim($photo['message'])\n );\n // check whether image really exists - do HEAD request for each of them\n $tmpClient = new Zend_Http_Client($tmpPhoto['thumbnail']);\n try {\n if ($tmpClient->request('HEAD')->isSuccessful()) $poi->photos[] = $tmpPhoto;\n } catch (Zend_Http_Client_Exception $e) { // timeout or host not accessible\n // don't add\n }\n }\n }\n } catch (Zend_Http_Client_Exception $e) { // timeout or host not accessible\n // keep photos empty\n }\n }\n\n /*\n * Add tips (aka highlights)\n */\n $clientTips = $this->_constructClient($endpoint . '/' . $id . '/highlights');\n try {\n $responseTips = $clientTips->request();\n\n // error in response\n if ($responseTips->isError()) return;\n\n $resultTips = Zend_Json::decode($responseTips->getBody());\n $entryTips = $resultTips['highlights'];\n\n if (count($entryTips) > 0) {\n foreach ($entryTips as $tip) {\n if (empty($tip['comment'])) continue; // skip highlights without text\n $tmpDate = new Zend_Date(substr($tip['updated_at'], 0, -1) . '+00:00', Zend_Date::W3C);\n $tmpTip = array(\n 'id' => md5($tip['updated_at']), // create \"static\" url\n 'text' => $tip['comment'],\n 'date' => $tmpDate->get(Zend_Date::TIMESTAMP)\n );\n $poi->tips[] = $tmpTip;\n }\n }\n } catch (Zend_Http_Client_Exception $e) { // timeout or host not accessible\n // keep tips empty\n }\n\n return $poi;\n\n }", "title": "" }, { "docid": "39b8aefe3fe32173c58ae0e0cd03f86b", "score": "0.5696907", "text": "function index_by_location($id)\r\n\t{\r\n\t\t$this->helpers[] = 'Javascript';\r\n\t\t$this->layout = 'guest';\r\n\t\t\r\n\t\t//Consulta todos las instancias de Hotel según el id de Location. Se aisla de Room xq no se necesita mostrar ese modelo.\r\n\t\t$this->Hotel->unbindModel(array(\r\n\t\t\t\t'hasMany' => array('activity_schedules', 'activity_wtbrings')\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t$this->data = $this->Hotel->find('all', array(\r\n\t\t\t'fields'=> array('Hotel.id', 'Hotel.product_id', 'Hotel.hotel_category_id', 'Hotel.hotel_name', 'Product.id', 'Product.location_id', 'HotelCategory.id', 'HotelCategory.category_name'),\r\n\t\t\t'conditions' => array('Product.location_id' => $id)));\r\n\t\t\t\r\n\t\t//Consulta la primer imagen de cada hotel. Primero se aisla el modelo Image antes de consultar.\r\n\t\tfor($i=0; $i < count($this->data); $i++){\r\n\t\t\t$this->Hotel->Product->Image->unbindModel(array('belongsTo'=>array('Product')));\r\n\t\t\t$this->data[$i]['Product']['image'] = $this->Hotel->Product->Image->find('first', array('conditions' => array( 'Image.product_id'=>$this->data[$i]['Product']['id'])));\r\n\t\t}\r\n\t\t\t\r\n\t\t//Se consultan los Regions Y Locations.\r\n\t\t$this->set('regions', $this->Hotel->Product->Location->Region->findAll()); \r\n\t\t\r\n\t\t//Se asigna la variable con los datos de los hoteles.\r\n\t\t$this->set('hotels', $this->data);\r\n\t}", "title": "" }, { "docid": "06dabf8785dfbf882000576711373cdf", "score": "0.56873065", "text": "public function getLocation()\n {\n\n $this->db->select('*');\n $this->db->from('location');\n $query=$this->db->get();\n return $query->result();\n }", "title": "" }, { "docid": "2ccf4fee903ee8484dbedf4a56b778bb", "score": "0.5684829", "text": "public function getPropertyByID($id){\n $select = $this->select();\n $select->where('id = ?', (int)$id);\n $address = $this->fetchRow($select);\n return $address;\n }", "title": "" }, { "docid": "da901a73a93876ae30e0e240a2a50e3c", "score": "0.56831086", "text": "public function show($id)\n\t{\n $location = $this->locationRepository->findOrFail($id);\n\n return $this->render('admin.locations.show', compact('location'));\n\t}", "title": "" }, { "docid": "230c571a9446e0fdbd3500b783ad1bad", "score": "0.5669363", "text": "public function getLocation($get) {\n if (!array_key_exists('user_id', $get)) {\n return array('success' => false, 'message' => 'Invalid Parameters');\n }\n\t\t\t\n $res = EDMSQuery::instance('user_location')->findOne(array('user_id' => $get['user_id']));\n\t\t\n\t\t//Check if no user was not found in database.\n\t\tif(!$res) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$data['data'] = array(\n\t\t\t'user_id' => $res['user_id'],\n\t\t\t'x' => $res['x'],\n\t\t\t'y' => $res['y'],\n\t\t\t'datetime' => $res['datetime'],\n\t\t);\n\t\t\n return $data;\n }", "title": "" }, { "docid": "6fe9176c6387a1976dbdf88a4a49b308", "score": "0.5665697", "text": "public function getForLocationAction(Application $app, $location_id)\n {\n if ('json' !== guessBestFormat()) {\n return $app->redirect($app['url_generator']->generate('location_get', array('id' => $location_id)));\n }\n\n $location = (new LocationFinder($app['db']))->findOneById($location_id);\n\n if (empty($location)) {\n return new JsonResponse('Location not found', 404);\n }\n\n $parties = (new PartyFinder($app['db']))->findAllForLocation($location);\n\n return new JsonResponse($parties);\n }", "title": "" }, { "docid": "ce07a43a8d184da8bdaf532fed9e35cc", "score": "0.5664522", "text": "function get_location_details(){\n\t\tif ($this->detail_info_is_loaded==false){\n\t\t\t$this->load_detail_info();\n\t\t}\n\t\t$location_details=$this->location_details;\n\t\treturn $this->stripDangerousHTML($location_details);\n\t}", "title": "" }, { "docid": "a97654034f441911c2df89fee802d49b", "score": "0.5663995", "text": "public function getPlanLocation($plan_id){\n\n $data = array();\n $num_rows = 0;\n\n $SQL = \"SELECT location FROM m00_05_plan WHERE `plan_id` = '$plan_id'\";\n\n\n $rslt = mysqli_query($this->conn,$SQL);\n $num_rows = mysqli_num_rows($rslt);\n\n while($row = mysqli_fetch_assoc($rslt)){\n\n\n $objPlan = new stdClass();\n $objPlan = $this->getLocationMinimInfo($row['location']);\n \n\n array_push($data, $objPlan);\n\n }\n return $data;\n }", "title": "" }, { "docid": "ec2b7eee5977805b93b9aaf7ddb0416c", "score": "0.5661022", "text": "public function locationList () {\n\t\t$args = array();\n\n\t\treturn $this->getData('location/list', $args);\n\t}", "title": "" }, { "docid": "e40c4a25713ee94ad46800c583d0ed5e", "score": "0.5660801", "text": "function GeoIdToLink($id) {\n $res=GetSelectField(\"SELECT * FROM geodata WHERE id='\".$id.\"'\",\"url\"); \n return $res;\n }", "title": "" }, { "docid": "4b3721a9da5b5c17e428972745d4f4d8", "score": "0.5658998", "text": "public function runData($id = -1){\n\t\treturn $this->_handler->getData($id);\n\t}", "title": "" }, { "docid": "b7d0bd162c65e62515d3ec8ed1cf42ba", "score": "0.56575763", "text": "function get_poi($id) {\n\t\treturn get_ioi($id);\n\t}", "title": "" }, { "docid": "729a4b098f446c27f693a0d712c28595", "score": "0.56484485", "text": "public function getLocation($name) {\n $sql = \"SELECT l.id FROM locations l WHERE l.name ='\" . $name . \"';\";\n\n // execute query\n $list = Yii::$app->db->createCommand($sql)->queryAll();\n\n $rs = array();\n foreach ($list as $item) {\n $rs[] = $item['id'];\n }\n return $rs;\n }", "title": "" }, { "docid": "ef79ce75d6145ef1f58091e185689bdb", "score": "0.5633872", "text": "public function weather($id)\n {\n $tide_location = TideLocation::where('id',$id)->first();\n $weather = WeatherInformation::where('location',$tide_location->location)->get();\n return response()->json(\n $weather\n );\n }", "title": "" }, { "docid": "cdb8a669fb97fbac694d06a90a66beca", "score": "0.5619376", "text": "function selectRoutePointByID($id)\r\n {\r\n $answer = $this->_DAO->select(new SelectRoutePointByID($id));\r\n if (!isset($answer[0])) return null;\r\n return new RoutePointData($answer[0]);\r\n }", "title": "" }, { "docid": "c83cf6fd9161314b04e732f639ba501f", "score": "0.5611103", "text": "public function _add_data($user_id, $location_id){\n\t\t$idelete = 0;\n\t\t$data = array(\n\t\t\t'user_id'=>$user_id,\n\t\t\t'location_id'=>$location_id,\n\t\t\t'idelete'=>$idelete);\n\n\t\treturn $this->db->insert(\"user_location\", $data);\n\t}", "title": "" }, { "docid": "190e1add116b586701cc9d71e41f5288", "score": "0.56054777", "text": "private function location_exists ($locationid = null) {\r\n\t\t\r\n\t\t//-- check if locationid provided\r\n\t\tif (intval($locationid)) {\r\n\t\t\r\n\t\t\t//-- get locations payload\r\n\t\t\t$this->get_locations();\r\n\t\t\t\r\n\t\t\t//-- loop through locations\r\n\t\t\tforeach ($this->locationData AS $location) { \r\n\t\t\t\tif ($location['id'] == $locationid) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//-- error message\r\n\t\t\t$this->error = \"Location id ({$locationid}) does not exist\";\r\n\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\t//-- error message\r\n\t\t\t$this->error = \"Location id is required\";\r\n\t\t}\r\n\t\t\t\t\r\n\t\t\r\n\t\t//-- bool\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "490ee1fdac5fa36321b569db2ab933a7", "score": "0.5596048", "text": "public function show($id)\n {\n $location = Location::findOrFail($id); //Find service location of id = $id\n\n return view ('locations.show', compact('location'));\n }", "title": "" }, { "docid": "b093f5cce1d361c211117b1d81dfd520", "score": "0.55898213", "text": "public function getLotInfo($id)\n {\n // Find lot by id\n $lot = $this->lotRepository->find($id, array('regions'));\n\n // Check if lot exists\n if (!$lot) {\n return 'Lot does not exist';\n }\n\n // Set lot array\n $lot = array(\n 'id' => $lot->id,\n 'name' => $lot->name,\n 'address' => $lot->address,\n 'longitude' => $lot->longitude,\n 'latitude' => $lot->latitude,\n 'regions' => $lot->regions\n );\n\n // Return the lot\n return $lot;\n }", "title": "" }, { "docid": "9002565c4d8a57c4d878283de599e34d", "score": "0.5589177", "text": "public function getLocationId() {\n\t\tswitch ($this->setting('location_source_mode')) {\n\t\t\tcase 'location_from_selector':\n\t\t\t\tif (($this->cType==\"event\") \n\t\t\t\t\t&& (ze\\module::inc('zenario_ctype_event')) \n\t\t\t\t\t&& ($contentItem = zenario_ctype_event::getEventDetails($this->cID,$this->cVersion))\n\t\t\t\t) {\n\t\t\t\t\treturn $contentItem['location_id'];\n\t\t\t\t} else {\n\t\t\t\t\treturn zenario_location_manager::getLocationIdFromContentItem($this->cID,$this->cType);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'location_from_organizer':\n\t\t\t\treturn $this->setting('location');\n\t\t\tcase 'location_from_url':\n\t\t\t\tif($this->setting('use_custom_url_request') && ($urlRequest = $this->setting('url_request'))){\n\t\t\t\t\treturn ($_GET[$urlRequest] ?? false);\n\t\t\t\t}else{\n\t\t\t\t\treturn ($_GET['l_id'] ?? false);\n\t\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "09c8646b9d72bb003ec9287a78be796b", "score": "0.55855745", "text": "function getLocation() {}", "title": "" }, { "docid": "32fe4f1038d15726a3fea41ca5748842", "score": "0.557601", "text": "public function getLocation();", "title": "" }, { "docid": "32fe4f1038d15726a3fea41ca5748842", "score": "0.557601", "text": "public function getLocation();", "title": "" }, { "docid": "32fe4f1038d15726a3fea41ca5748842", "score": "0.557601", "text": "public function getLocation();", "title": "" } ]
2e92d1884e7c2813249a7790ac7a4dfc
/===== 2016/02/10 =======================================D E C K===>>>> DESCRIPCION: Retorna informacion de un registro especifico AUTOR:Luis Prieto HISTORIAL DE MODIFICACIONES FECHAAUTORMODIFICACION 2016/10/02Luis PrietoCreacion de la fuincion ===========================================================================
[ { "docid": "ba40df4d29f1079c933ebb257ad13333", "score": "0.0", "text": "function f_get_info(){\n\t\t\tif(!$this->cod_insumo)return false;\n\t\t\tglobal $db;\n\n\t\t\t$query = \"select * from insumo where cod_insumo = \".$this->cod_insumo;\n\t\t\t$row=$db->consultar_registro($query);\n\t\t\treturn $row;\n\n\t\t}", "title": "" } ]
[ { "docid": "e9d7c27ce24eff02568d12a859790e46", "score": "0.6435654", "text": "public function Registro_Actualizar_Datos_Basicos() {\n /** MAYO 30 2015\n * REALIZA REGISTRO DE DATOS DEL REGISTRO OCASIONAL PERSONA NATURAL\n */\n $Texto_Respuesta = '';\n $idtipo_plan_compras = 0;\n $codigo_usuario_generado = '';\n $codigoterceropresenta = General_Functions::Validar_Entrada('codigoterceropresenta','TEXT');\n $codigoterceropresenta_inicial = $codigoterceropresenta;\n $idterceropresenta = General_Functions::Validar_Entrada('idterceropresenta','NUM');\n $es_cliente = General_Functions::Validar_Entrada('es_cliente','BOL');\n $es_empresario = General_Functions::Validar_Entrada('es_empresario','BOL');\n $idtercero = General_Functions::Validar_Entrada('idtercero','NUM');\n\n $idtppersona_nat = General_Functions::Validar_Entrada('idtppersona_nat','BOL');\n $idtppersona_jur = General_Functions::Validar_Entrada('idtppersona_jur','BOL');\n $idtregimen_comun = General_Functions::Validar_Entrada('idtregimen_comun','BOL');\n $idtregimen_simplif = General_Functions::Validar_Entrada('idtregimen_simplif','BOL');\n\n\n if ( $idtppersona_nat == TRUE ){ $idtppersona = 1 ;} // Natural\n if ( $idtppersona_jur == TRUE ){ $idtppersona = 2 ;} // Juridica\n\n if ( $idtregimen_comun == TRUE ){ $regimen = 1 ;} // Comun\n if ( $idtregimen_simplif == TRUE ){ $regimen = 2 ;} // Simplificado\n\n if ( $es_cliente == TRUE ){ $idtipo_plan_compras = 2 ;}\n if ( $es_empresario == TRUE ){ $idtipo_plan_compras = 3 ;}\n\n\n $idtpidentificacion = General_Functions::Validar_Entrada('idtpidentificacion','TEXT');\n $identificacion = General_Functions::Validar_Entrada('identificacion','TEXT');\n $pnombre = General_Functions::Validar_Entrada('pnombre','TEXT');\n $papellido = General_Functions::Validar_Entrada('papellido','TEXT');\n $genero = General_Functions::Validar_Entrada('genero','TEXT');\n $idmcipio = 0;\n $direccion = '';\n $barrio = '';\n $celular1 = '';\n $email = General_Functions::Validar_Entrada('email','TEXT');\n $es_e_mail = General_Functions::Validar_Entrada('email','EMAIL');\n $passwordusuario = General_Functions::Validar_Entrada('passwordusuario','TEXT');\n $passwordusuario = md5( $passwordusuario );\n\n //DATOS DIFERENCIALES EMPRESA\n $nit = General_Functions::Validar_Entrada('nit','TEXT');\n $digitoverificacion = '';\n $razonsocial = General_Functions::Validar_Entrada('razonsocial','TEXT');\n\n $mesnacimiento = General_Functions::Validar_Entrada('mesnacimiento','NUM');\n $dianacimiento = General_Functions::Validar_Entrada('dianacimiento','NUM');\n\n if ($mesnacimiento < 9) { $mesnacimiento = '0'.$mesnacimiento ; }\n if ($dianacimiento < 9) { $dianacimiento = '0'.$dianacimiento ; }\n\n $Datos_Validacion = compact('idtpidentificacion','identificacion','pnombre','papellido','genero','email','mesnacimiento','dianacimiento','es_e_mail','es_cliente','es_empresario','passwordusuario','razonsocial');\n\n $this->Registro_Nuevo_Usuario_Validaciones ( $Datos_Validacion );\n $Texto_Respuesta = $this->Texto_Respuesta ;\n if ( strlen( $Texto_Respuesta ) != 0 ){\n $Datos = compact('Texto_Respuesta' );\n echo json_encode($Datos,256);\n return ;\n }else\n {\n $dianacimiento = intval($dianacimiento);\n $mesnacimiento = intval($mesnacimiento);\n $email = strtolower($email);\n\n if ($idtpidentificacion == '31'){ $genero = '0';}\n\n $pnombre = strtoupper(trim( $pnombre ));\n $papellido = strtoupper(trim( $papellido ));\n $razonsocial = strtoupper(trim( $razonsocial ));\n\n\n $Datos_Terceros = compact('idtercero','idtipo_plan_compras','idtpidentificacion','identificacion','pnombre','papellido','razonsocial','genero','mesnacimiento','dianacimiento','email','passwordusuario', 'idtppersona','regimen');\n\n // GRABAR DATOS DEL TERCERO\n $Texto_Respuesta = '';\n $Registro = $this->Terceros->Actualizar_Registro_Basico_Usuario($Datos_Terceros);\n\n if ( $Registro ) {\n $Texto_Respuesta = \"ACTUALIZADO-OK\";\n $Registro = $this->Terceros->Consulta_Datos_Por_Password_Email( $email , $passwordusuario );\n $this->Validar_Ingreso_Usuario_Asignar_Datos($Registro);\n $_SESSION['logueado'] = TRUE;\n Session::Set('logueado', TRUE);\n $Datos = compact('Texto_Respuesta','idtipo_plan_compras' );\n }else {\n $Texto_Respuesta = \"ACTUALIZADO-NO-OK\";\n }\n }\n\n echo json_encode($Datos,256);\n }", "title": "" }, { "docid": "33cfe58e387f3b849debf232d79e3e31", "score": "0.637846", "text": "static function poner_descuento(){\n if(date('m-d-y') > '10-22-20'){//Uso de la funcion date para obteber el formato de mes, dia y aņo\n self::$descuento = 4500; \n }\n }", "title": "" }, { "docid": "b05f77083132bd6f063ae3379c434c88", "score": "0.6310514", "text": "function gestorConsultaRangoFecha(){\n\t\t\n\t\t\t\n\t}", "title": "" }, { "docid": "cadfcf57e0387cc20ae17df4ca42f54b", "score": "0.62944704", "text": "function reporteSeguro(){\n\t\t $this -> validar();\n\t\t\t\n\t\t //Se vacian los registros de la tabla temporal\n\t\t $registrosTemp = new registrosTemp();\n\t\t $result = $registrosTemp -> truncate_registrosTemp('2');\n\t\t}", "title": "" }, { "docid": "bf5a0214f52d709164d547df77ab24ba", "score": "0.6246648", "text": "function Init_Dossier_AEV_Situation_12($formx) {\n//$AEV_Type = utf8_decode($formx->getFormVar('AEV_Type'));\n//$formx->setVar('L_AEV_Situation',$situation);\n\n\n$ids = $formx->getIDS();\n$id_instance = $formx->getIdInstance();\n$idu = $formx->getVar('ids');\n\neko ($ids);\neko ($id_instance);\neko ($idu);\n\n// On va supprimer tous les fichiers Dossier_Colectomie_Periode_P1 de la table formx\n// $requete=new clRequete(BDD,TABLEFORMX,$param);\n// $sql=$requete->delRecord(\"idformx='Dossier_Colectomie_Periode_P1' and ids='\".$ids.\"'\");\n\n//$param[nomitem] = addslashes(stripslashes($this->getMedecin ( ))) ;\n//$req = new clResultQuery ;\n//$res = $req -> Execute ( \"Fichier\", \"getMatriculeMedecin\", $param, \"ResultQuery\" ) ;\n\n$item=utf8_decode($formx->getVar('L_AEV_Date_Accident_Situation_12'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Date_Accident_Situation_12',date(\"d\").\"-\".date(\"m\").\"-\".date(\"Y\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Heure_Accident_Situation_12'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Heure_Accident_Situation_12',date(\"H\").\":\".date(\"i\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Date_Prophylaxie_Situation_12'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Date_Prophylaxie_Situation_12',date(\"d\").\"-\".date(\"m\").\"-\".date(\"Y\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Heure_Prophylaxie_Situation_12'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Heure_Prophylaxie_Situation_12',date(\"H\").\":\".date(\"i\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Accident_Travail_Situation_12'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Accident_Travail_Situation_12',\"Non\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Accident_Travail_Hyeres_Situation_12'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Accident_Travail_Hyeres_Situation_12',\"Oui\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Accident_Travail_Etablissement_Situation_12'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Accident_Travail_Etablissement_Situation_12',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Nom_Situation_12'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Nom_Situation_12',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Prenom_Situation_12'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Prenom_Situation_12',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Jour_Naissance_Situation_12'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Jour_Naissance_Situation_12',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Mois_Naissance_Situation_12'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Mois_Naissance_Situation_12',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Annee_Naissance_Situation_12'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Annee_Naissance_Situation_12',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Complement_Situation_12'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Complement_Situation_12',\"\");\n }\n\nreturn \"O\";\n}", "title": "" }, { "docid": "a35a4348a10895179ca50b7164316bc7", "score": "0.62211764", "text": "function Init_Dossier_AEV_Situation_14($formx) {\n//$AEV_Type = utf8_decode($formx->getFormVar('AEV_Type'));\n//$formx->setVar('L_AEV_Situation',$situation);\n\n\n$ids = $formx->getIDS();\n$id_instance = $formx->getIdInstance();\n$idu = $formx->getVar('ids');\n\neko ($ids);\neko ($id_instance);\neko ($idu);\n\n// On va supprimer tous les fichiers Dossier_Colectomie_Periode_P1 de la table formx\n// $requete=new clRequete(BDD,TABLEFORMX,$param);\n// $sql=$requete->delRecord(\"idformx='Dossier_Colectomie_Periode_P1' and ids='\".$ids.\"'\");\n\n//$param[nomitem] = addslashes(stripslashes($this->getMedecin ( ))) ;\n//$req = new clResultQuery ;\n//$res = $req -> Execute ( \"Fichier\", \"getMatriculeMedecin\", $param, \"ResultQuery\" ) ;\n\n$item=utf8_decode($formx->getVar('L_AEV_Date_Accident_Situation_14'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Date_Accident_Situation_14',date(\"d\").\"-\".date(\"m\").\"-\".date(\"Y\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Heure_Accident_Situation_14'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Heure_Accident_Situation_14',date(\"H\").\":\".date(\"i\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Nom_Situation_14'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Nom_Situation_14',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Prenom_Situation_14'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Prenom_Situation_14',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Jour_Naissance_Situation_14'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Jour_Naissance_Situation_14',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Mois_Naissance_Situation_14'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Mois_Naissance_Situation_14',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Annee_Naissance_Situation_14'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Annee_Naissance_Situation_14',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Complement_Situation_14'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Complement_Situation_14',\"\");\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\nreturn \"O\";\n}", "title": "" }, { "docid": "48c150b2b533ef8d47615f489cc778c6", "score": "0.62094223", "text": "public function getDescription(): string\n {\n return 'Se crea campo que define el tiempo de respuesta';\n }", "title": "" }, { "docid": "89185305c0979f9d7418398e3b9b1fa7", "score": "0.61396945", "text": "public function gen_detacapituloview($_capitulos, $r_preguntans, $r_secciones, $r_pregunta, $formanumber, $_permisos, $_modelogenerales, $_modelbasicos, $_modelbasicos_coordenadas, $_modelbasicos_ubicacion,$_modelogeneralesriego,$_modelriego_ubicacion,$_modelgeneralescomunitarioap,$_modelcomunitarioap_ubicacion,$_modelgeneralespublicos,$_modelpublicos_ubicacion)\n { \n $this->_larray = 0;\n $this->_stringvista = array();\n $this->vactual = 'detcapitulo/genvistaformato';\n\n /*Asignando Permisos=====================================================*/\n $this->_pcrear = $_permisos['p_crear'];\n $this->_pactualizar = $_permisos['p_actualizar'];\n $this->_pborrar = $_permisos['p_borrar'];\n $this->_pejecutar = $_permisos['p_ejecutar'];\n\n //Asignando Vista para las preguntas de Datos generales si se necesitan*/\n if (!empty($_modelogenerales)) {\n $this->gen_capitulogenerales($this->_pactualizar);\n }\n\n //Asignando Vista para las preguntas de Datos basicos*/\n if (!empty($_modelbasicos) or !empty($_modelbasicos_coordenadas) or !empty($_modelbasicos_ubicacion)) {\n $this->gen_capitulobasico($this->_pactualizar, $_modelbasicos_ubicacion, $_modelbasicos_coordenadas);\n }\n \n //Asignando Vista para las preguntas de Datos generales para riego*/ - mfceron agrego para que permita el ingreso a la función para la ficha de riego\n if (!empty($_modelogeneralesriego) and !empty($_modelriego_ubicacion)) {\n $this->gen_capitulogeneralesriego($this->_pactualizar,$_modelriego_ubicacion,$_modelogeneralesriego);\n }\n \n //Asignando Vista para las preguntas de Datos generales comunitario para aps*/ - \n if (!empty($_modelgeneralescomunitarioap) and !empty($_modelcomunitarioap_ubicacion)) {\n $this->gen_capitulogeneralescomunitarioap($this->_pactualizar,$_modelcomunitarioap_ubicacion);\n }\n //Asignando Vista para las preguntas de Datos generales prestadores públicos*/ - \n if (!empty($_modelgeneralespublicos) and !empty($_modelpublicos_ubicacion)) {\n $this->gen_capitulogeneralespublicos($this->_pactualizar,$_modelpublicos_ubicacion);\n } \n \n /*Declara arrays para grabar preguntas y respuestas --mceron */\n $capitulo_seccion = array();\n $pregunta_respuesta = array();\n $pregunta_atributo = array();\n \n /*Organizando titulo de capitulo ==========================================*/\n foreach ($_capitulos as $_cpclave) { \n $_indicecap = $_cpclave['id_capitulo'];\n\n /*Asignando total de columnas=============================================*/\n $_tcolumnas = $_cpclave['num_columnas'];\n\n /*Habilitando numeracion==================================================*/\n if ($formanumber == 'S') {\n $this->_numcapitulo = $_cpclave['orden'];\n $this->_estnumerado = 'S';\n }\n\n //Agregando Titulo del capitulo encontrado==============================\n $this->gen_capitulo($_cpclave, $_tcolumnas);\n\n /*Organizando preguntas sin seccion ====================================*/\n\n if (!empty($r_preguntans[$_indicecap])) {\n $this->gen_preguntans($r_preguntans[$_indicecap], $_tcolumnas, $this->_larray);\n }\n \n /*Organiznado secciones===================================================\n *Aqui se generar tambien las preguntas con seccion gen_preguntassec\n **/\n if (!empty($r_secciones[$_indicecap]) and !empty($r_pregunta[$_indicecap])) {\n $_vsecciones = $this->gen_secciones($r_secciones[$_indicecap], $_tcolumnas, $r_pregunta[$_indicecap], $this->_larray);\n } \n /*Se recorre el array para validar las preguntas que tengan respuestas --mceron*/ \n if(!empty($r_pregunta[$_indicecap]))\n {\n $capitulo_seccion=$r_pregunta[$_indicecap]; \n foreach($capitulo_seccion as $valor)\n { \n foreach($valor as $v)\n {\n $pregunta= $v['id_pregunta']; \n $respuesta= $v['respuesta'];\n /*Para los casos de check*/\n if($respuesta=='S')$respuesta=1; \n $pregunta_respuesta[$pregunta]=$respuesta;\n $atributo = $v['atributos'];\n $pregunta_atributo[$pregunta] =$atributo;\n } \n }\n }\n }\n \n $this->_stringvista[] = '</table>';\n $this->_stringhtml = $this->_stringvista;\n \n $_disablestring = \"\"; \n $_stringjavascript =\"\"; \n if (!empty($this->preguntascondiciones) and !empty($this->preguntashabilitadoras)) {\n \n $_stringjavascript = '<script>'\n .'function condiciones(larrayhab){ '\n .' var arrayRelaciones= new Array(); ';\n \n $_stringjavascript .= ' arrayRelaciones={';\n \n $coma_ini=\"\";\n //print_r($pregunta_respuesta);\n for ($q = 0; $q < count($this->preguntashabilitadoras); ++$q) {\n $js_hab = $this->preguntashabilitadoras[$q];\n $js_cond = $this->preguntascondiciones[$q];\n $_larrayhabilitadora = $this->_vrelaciones[$js_hab];\n $_larraycondicionada = $this->_vrelaciones[$js_cond];\n \n $_pregunta = $js_hab;\n $_bloqueos = \\common\\models\\poc\\FdElementoCondicion::find()\n ->where(['id_pregunta_habilitadora'=>$_pregunta])->all();\n $_countbloqueos = \\common\\models\\poc\\FdElementoCondicion::find()\n ->where(['id_pregunta_habilitadora'=>$_pregunta])->count(); \n \n /*Se valida si la pregunta habilitadora fue respondida, para que en la edici&oacute;n se habilite o no los campos -- mceron*/\n $band_respuesta=false; \n \n if(array_key_exists($js_hab,$pregunta_respuesta)){\n $band_respuesta=true; //mceron: valor 2 respuesta NO valor 1 respuesta si, valor 0 campo entero respuesta 0\n\n\t\t //vALIDACION PARA RESPUESTA SI O NO DONDE 2 ES NO Y 1 ES SI =======================================================================\n if($pregunta_respuesta[$js_hab]==2 or $pregunta_respuesta[$js_hab]=='' or $pregunta_respuesta[$js_hab]==0)$band_respuesta=false; \n\n //sE VALIDA LA RESPUESTA PARA VER SI SE BLOQUEA O NO EL CAMPO ==========================================================\n if($_countbloqueos==1){ \n $valor =$_bloqueos[0]['valor']; \n $operacion = $_bloqueos[0]['operacion'];\n $id_pregunta_condicionada = $_bloqueos[0]['id_pregunta_condicionada'];\n \n $band_respuesta = TRUE; /*Modificado Diana B: 2019-02-25 se agrega*/\n \n if($operacion == '=' and $valor == $pregunta_respuesta[$js_hab]){\n $band_respuesta = FALSE;\n }else if($operacion == '<>' and $valor != $pregunta_respuesta[$js_hab]){\n $band_respuesta = FALSE;\n }else if($operacion == '!=' and $valor != $pregunta_respuesta[$js_hab]){\n $band_respuesta = FALSE;\n }else if($operacion == '>' and $valor<$pregunta_respuesta[$js_hab]){ //Si la respuesta a la pregunta habilitadora es mayor que el dato en fd_elemento_condicion.valor\n $band_respuesta = FALSE; /*Modificado Diana B: 2019-02-25 se quita un igual*/\n }else if($operacion == '<' and $valor>$pregunta_respuesta[$js_hab] ){ //Si la respuesta a la pregunta habilitadora es menor que el dato en fd_elemento_condicion.valor\n $band_respuesta = FALSE; /*Modificado Diana B: 2019-02-25 se quita un igual*/ \n }\n\t\t \n }\n }\n \n \n \n //=====================================================PARA CUANDO SE TIENEN MUCHAS PREGUNTAS CODICIONADAS POR UNA SOLA ===================//\n $coma=\"\";\n $i=0;\n $j=0;\n $_stringjavascript .= $coma_ini.' \"'.$_larrayhabilitadora.'\"';\n if($_countbloqueos>1)\n {\n \n $_stringjavascript .= ' :{';\n foreach($_bloqueos as $bloque)\n {\n \n /*Modificado por Diana B: 2019-0-25*/\n $valor =$bloque->valor; \n $operacion = $bloque->operacion;\n $band_respuesta = TRUE; /*Modificado Diana B: 2019-02-25 se agrega*/\n $data_response = (!empty($pregunta_respuesta[$bloque->id_pregunta_habilitadora]))? $pregunta_respuesta[$bloque->id_pregunta_habilitadora]:'';\n \n $coma_condi=\"\";\n if($i>0)$coma=\",\"; \n $_pregunta_condiciona=$bloque->id_pregunta_condicionada;\n $_condi=$this->_vrelaciones[$_pregunta_condiciona]; \n \n \n \n \n if($operacion == '=' and $valor == $data_response){\n $band_respuesta = FALSE;\n }else if($operacion == '<>' and $valor != $data_response){\n $band_respuesta = FALSE;\n }else if($operacion == '!=' and $valor != $data_response){\n $band_respuesta = FALSE;\n }else if($operacion == '>' and $data_response>$valor){\n $band_respuesta = FALSE; /*Modificado Diana B: 2019-02-25 se quita un igual*/\n }else if($operacion == '<' and $data_response<$valor){\n $band_respuesta = FALSE; /*Modificado Diana B: 2019-02-25 se quita un igual*/ \n }\n /*Quemo para la información del RUC -- validacion inútil solicitada*/\n if($bloque->id_pregunta_habilitadora==1298)\n { \n if($data_response==1)\n { \n $_disablestring .= 'document.getElementById(\"detcapitulo-rpta10\").disabled =false;';\n $_disablestring .= 'document.getElementById(\"detcapitulo-rpta9\").disabled =true;';\n \n } \n else\n {\n $_disablestring .= 'document.getElementById(\"detcapitulo-rpta10\").disabled =true;'; \n }\n }\n else\n {\n \n if(!empty($band_respuesta)){\n $_disablestring .= 'document.getElementById(\"detcapitulo-rpta'.$_condi.'\").disabled = '.$band_respuesta.';';\n \n if($band_respuesta == TRUE){\n \n //Averiguando tipo de pregunta de la pregunta condicionada ======================================================\n $_tipo = $this->getTipoPregunta($bloque->id_pregunta_condicionada);\n \n if($_tipo != \"NA\"){\n $_disablestring .= 'document.getElementById(\"detcapitulo-rpta'.$_condi.'\").value = \"'.$_tipo.'\";';\n } \n }\n }\n }\n /*Final modificacion*/\n \n if($j<$_countbloqueos-1)$coma_condi=\",\"; \n $_stringjavascript .= ' \"'.$j.'\" : '.$_condi.$coma_condi;\n $i++;\n $j++;\n } \n $_stringjavascript .= '}';\n\n }\n else\n {\n $_stringjavascript .= ' : '.$_larraycondicionada.'';\n \n /*Quemo para la información del RUC -- validacion inútil solicitada*/\n if($js_hab==1299)\n { \n if($pregunta_respuesta[$js_hab] == 1)\n { \n $_disablestring .= 'document.getElementById(\"detcapitulo-rpta10\").disabled =false;'; \n }\n else\n {\n if(!empty($pregunta_respuesta[$js_hab]))\n $_disablestring .= 'document.getElementById(\"detcapitulo-rpta10\").disabled =true;';\n } \n }\n else \n { \n /*Modificado Diana B: 2019-02-25 se re-programa*/\n if(!empty($band_respuesta)){\n $_disablestring .= 'document.getElementById(\"detcapitulo-rpta'.$_larraycondicionada.'\").disabled = '.$band_respuesta.';';\n if($band_respuesta == TRUE){\n $_tipo = $this->getTipoPregunta($id_pregunta_condicionada);\n if($_tipo != \"NA\"){\n $_disablestring .= 'document.getElementById(\"detcapitulo-rpta'.$_larraycondicionada.'\").value = \"'.$_tipo.'\";';\n }\n }\n }\n }\n \n \n }\n $coma_ini=\",\";\n \n }\n\n $_stringjavascript .= '}; return arrayRelaciones[larrayhab]; '\n .' }</script>';\n\n \n Yii::trace(\"probando la funcion de javascript dinamica \".$_stringjavascript,\"DEBUG\");\n }\n \n /*Se valida para bloqueo del caso especial de los valores */\n if(!empty($pregunta_atributo)){\n $buscar=\"T:\";\n $suma = 0;\n \n $resultados_v = array();\n foreach($pregunta_atributo as $k=>$att)\n {\n if(strpos($att,$buscar)!== false){ \n $suma+=$pregunta_respuesta[$k];\n $_larraycondicionada = $this->_vrelaciones[$k];\n $resultados_v[$k]=$pregunta_respuesta[$k];\n if($suma==100)\n { \n if($pregunta_respuesta[$k]>0){\n $band_respuesta=\"false\";\n $_disablestring .= 'document.getElementById(\"detcapitulo-rpta'.$_larraycondicionada.'\").disabled = '.$band_respuesta.';';\n }\n else\n {\n $band_respuesta=\"true\";\n $_disablestring .= 'document.getElementById(\"detcapitulo-rpta'.$_larraycondicionada.'\").disabled = '.$band_respuesta.';';\n }\n } \n }\n } \n if($suma==100)\n {\n foreach($resultados_v as $k=>$v)\n {\n $_larraycondicionada = $this->_vrelaciones[$k];\n if($v>0)\n {\n $band_respuesta=\"false\";\n $_disablestring .= 'document.getElementById(\"detcapitulo-rpta'.$_larraycondicionada.'\").disabled = '.$band_respuesta.';';\n }\n else\n {\n $band_respuesta=\"true\";\n $_disablestring .= 'document.getElementById(\"detcapitulo-rpta'.$_larraycondicionada.'\").disabled = '.$band_respuesta.';';\n }\n }\n } \n } \n \n $_stringjavascript .= '<script>'\n .'window.onload = function (){ '\n .$_disablestring.'} </script>';\n\n $this->_stringjavascriptcond = $_stringjavascript;\n return true;\n }", "title": "" }, { "docid": "b328594b6ea7d7ffe3df9ac2c55c7bb4", "score": "0.6117918", "text": "function insertarFechaHora(){\n\t\t$this->procedimiento='vef.ft_fecha_hora_ime';\n\t\t$this->transaccion='VF_FECHIMP_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('fecha_hora','fecha_hora','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "e36a5f111b412430eb504a2b5930b178", "score": "0.61105865", "text": "public function Guardar_Informe_Remision($data){\n $modelo = new Visita();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n $data_usuario = $modelo->get_dato_usuario($_SESSION['idUsuario']);\n $datos_user = $data_usuario->fetch();\n $nombre_us = $datos_user['empleado'];\n \n $tiporegistro = (\"Documento Remisión Informe Visita Domiciliaria\");\n $accion = \"Registra un Nuevo \".$tiporegistro.\" En el Sistema (T. Social) TRABAJO SOCIAL\";\n $detalle = $nombre_us.\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 10;\n $idusuario = $_SESSION['idUsuario'];\n \n date_default_timezone_set('America/Bogota'); \n $fecha_remision = date('Y-m-d');\n $anio = date('Y');\n $year=date('y'); \n // DATOS LOG PARA SIGDOC\n $tiporegistroD = \"Salida de Documento\";\n $accionD = \"Registra una Nueva \".$tiporegistroD.\" En el Sistema (SIGDOC) REGISTRO DE DOCUMENTOS SALIENTES\";\n $detalleD = $nombre_us.\" \".$accionD.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipologD = 4;\n $tipodocumento = 2;\n \n //ECHO \"TIPO REg. ts \".$tiporegistro.\" detalle: \".$detalle;\n //echo \"<br> tipo reg Doc: \".$tiporegistroD.\" detalle: \".$detalleD;\n $asunto = \"REMISION INFORME SOCIAL\";\n \n try {\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n \n $listar = $this->pdo->prepare(\"SELECT MAX(di.id) AS idmaximo,di.sigla,di.contador\n FROM sigdoc_pa_consecutivo AS di\n WHERE di.idtipodocumento = '$tipodocumento'\");\n $listar->execute();\n $field = $listar->fetch();\n \n $numeroconsecutivo = $field['contador'];\n $consecutivo = $numeroconsecutivo + 1; \n\n if($consecutivo >= 0 && $consecutivo <= 9) {$consecutivo = \"00\".$consecutivo;}\n if($consecutivo > 9 && $consecutivo <= 99){$consecutivo = \"0\".$consecutivo;}\n\n echo $ndocumento = $field['sigla'].\"\".$year.\"-\".$consecutivo;\n if($data->num_oficio ==\"\"){\n $sql = \"UPDATE visitas_informe_remision \n SET inf_rem_id_usuarioReg = ?,\n inf_rem_fecha_remision = ?,\n inf_rem_num_oficio = ?,\n inf_rem_num_folios = ?,\n inf_rem_observaciones = ?,\n inf_rem_enviado = ?\n WHERE inf_rem_id = ?\";\n\n $this->pdo->prepare($sql)\n ->execute(\n array( \n $idusuario,\n $fecha_remision,\n $ndocumento,\n $data->num_folios,\n $data->comentarios,\n 0,\n $data->id\n )\n );\n $this->pdo->exec(\"UPDATE sigdoc_pa_consecutivo SET contador = '$consecutivo' WHERE idtipodocumento = '$tipodocumento'\");\n $this->pdo->exec(\"INSERT INTO sigdoc_documentos_internos (idusuario,idusuarioedita,identrada,idtipodocumento,numero,\n dirigidoa, cargo, dependencia, fechageneracion,fechaedita,asunto,contenido,aniodoc)\n VALUES (\n '$idusuario',0,0,'$tipodocumento','$ndocumento','7','JUEZ','$data->juzgadoSolicitante','$fecha_remision','0000-00-00',\n '$asunto','$data->contenidoDoc','$anio'\n )\");\n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accionD','$detalleD','$idusuario','$tipologD')\");\n }else{\n $sql = \"UPDATE visitas_informe_remision \n SET inf_rem_id_usuarioReg = ?,\n inf_rem_fecha_remision = ?,\n inf_rem_num_folios = ?,\n inf_rem_observaciones = ?,\n inf_rem_enviado = ?\n WHERE inf_rem_id = ?\";\n\n $this->pdo->prepare($sql)\n ->execute(\n array( \n $idusuario,\n $fecha_remision,\n $data->num_folios,\n $data->comentarios,\n 0,\n $data->id\n )\n );\n }\n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "5ce0f7cfd8f8a605967de6b75fbd86ff", "score": "0.6108882", "text": "public function getDescription(): string\n {\n return 'Se crea campo para mostrar u ocultar campo vacios';\n }", "title": "" }, { "docid": "942bca497eff6f2e27926e20533c1129", "score": "0.6094506", "text": "function iEmpleado_dep($cve_dependencia,$noControl) {\n\t$iConn = odbc_connect(\"pensiones\",\"\",\"\",\"\");\t#Realizo Conexion\n\t\n\t$iClave = 0;\n $sNombre = \"\";\n \t$sPuesto = \"\";\n\t$sTipoTrabajador = \"\";\n\t$sTelefono = \"\";\n\t$sDomicilio = \"\";\n\t$sFechaIng = \"\";\n\t$sDependencia = \"\";\n\t\n\t###### Funcion para obtener el numero de registros que devuelve un Select, ya que no funciona la funcion de odbc\n\tfunction numRows ($result,$odbcId,$sCriterio)\n\t{\n\t\t$numRecords = odbc_num_rows ($result);\n\t\tif ($numRecords < 0)\n\t\t{\n\t\t\t$sQry = \"SELECT count(*) as results FROM \".$sCriterio;\n\t\t\t$count = odbc_exec ($odbcId, $sQry);\n\t\t\t$numRecords = odbc_result ($count, \"results\");\n\t\t}\n\t\t\n\t\treturn $numRecords;\n\t} \n\t####### Fin Funcion\n\t\n\t$sQryInf = \"SELECT e.ficha_df, e.nom_df, e.curp, e.telefono, e.domi_df, e.numint_df, e.ingreso_em, e.cve_ea, e.cve_tt, e.cve_de, e.cve_pto FROM \";\n\t$sCriterio = $sCriterio = \"empleados as e\n\t\t\t\t WHERE e.ficha_df=\".$noControl.\" AND e.cve_tt=\".$cve_dependencia;\n\t$sQryInf.= $sCriterio;\n\t\n\tif ($iConn) {\n\t\t$iRs = odbc_exec($iConn, $sQryInf);\n\t\t\n\t\t$iNumRegs = numRows($iRs, $iConn, $sCriterio);\n\t\t\n\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\t$rows = odbc_fetch_object($iRs);\n\t\t\t\n\t\t\t$sTipoTrabajador = \"\";\n\t\t\t$sDependencia = \"\";\n\t\t\t$sPuesto = \"\";\n\t\t\t\n\t\t\t$iClave = $rows->cve_ea;\n\t\t\t$iCveTT = $rows->cve_tt;\t#Clave del tipo de trabajador\n\t\t\t$iCveDep = $rows->cve_de;\t#Clave de la dependencia\n\t\t\t$iCvePu = $rows->cve_pto;\t#Clave del puesto\n\t\t\t\n\t\t\t######### Obtengo el TIPO DE TRABAJADOR\n\t\t\t$sQryTipoT = \"SELECT nom_tt FROM \";\n\t\t\t$sCriterioT = \"tipotrab WHERE cve_tt=\".$iCveTT;\n\t\t\t$sQryTipoT.= $sCriterioT;\n\t\t\t$iRsTT = odbc_exec($iConn, $sQryTipoT);\n\t\t\n\t\t\t$iNumRegs = numRows($iRsTT, $iConn, $sCriterioT);\n\t\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\t\t$aTipoT = odbc_fetch_object($iRsTT);\n\t\t\t\t$sTipoTrabajador = $aTipoT->nom_tt;\t###\n\t\t\t}\n\t\t\t\n\t\t\t######### Obtengo el Nombre de la DEPENDENCIA\n\t\t\t$sQryTipoD = \"SELECT nom_de FROM \";\n\t\t\t$sCriterioD = \"depend WHERE cve_de=\".$iCveDep;\n\t\t\t$sQryTipoD.= $sCriterioD;\n\t\t\t$iRsD = odbc_exec($iConn, $sQryTipoD);\n\t\t\n\t\t\t$iNumRegs = numRows($iRsD, $iConn, $sCriterioD);\n\t\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\t\t$aTipoD = odbc_fetch_object($iRsD);\n\t\t\t\t$sDependencia = $aTipoD->nom_de;\t###\n\t\t\t}\n\t\t\t\n\t\t\t######### Obtengo el Nombre de la PUESTO\n\t\t\t$sQryTipoP = \"SELECT nom_pto FROM \";\n\t\t\t$sCriterioP = \"puestos WHERE cve_pto=\".$iCvePu;\n\t\t\t$sQryTipoP.= $sCriterioP;\n\t\t\t$iRsP = odbc_exec($iConn, $sQryTipoP);\n\t\t\n\t\t\t$iNumRegs = numRows($iRsP, $iConn, $sCriterioP);\n\t\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\t\t$aTipoP = odbc_fetch_object($iRsP);\n\t\t\t\t$sPuesto = $aTipoP->nom_pto;\t###\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t$sNombre = $rows->nom_df;\t\t\t\t\t\t\t\t\n\t\t\t$sTelefono = $rows->telefono;\n\t\t\t$sDomicilio = $rows->domi_df;\n\t\t\t\n\t\t\t$aFechaI = explode(\"-\",$rows->ingreso_em);\n\t\t\t$sFechaIng=$aFechaI[2].\"/\".$aFechaI[1].\"/\".$aFechaI[0];\t\t\t\n\t\t}\n\t}\n\todbc_close($iConn);\n\t\n\treturn array(\"clave\" => $iClave,\n\t\t\t\t \"nombre\" => $sNombre,\n\t\t\t\t \"puesto\" => $sPuesto,\n\t\t\t\t \"tipoTrabajador\" => $sTipoTrabajador,\n\t\t\t\t \"telefono\" => $sTelefono,\n\t\t\t\t \"domicilio\" => $sDomicilio,\n\t\t\t\t \"fechaIng\" => $sFechaIng,\n\t\t\t\t \"dependencia\" => $sDependencia\n\t\t\t);\n}", "title": "" }, { "docid": "20d49753d02e9e665242ebe9e5ca556b", "score": "0.60727584", "text": "private function registrarAccesoHistorial($pIdUsuario = NULL, $pTipo = 0) {\r\n //obtener url\r\n $dataUrl = $this->uri->segment(1);\r\n //obtener id de la url\r\n $dataIdUrl = $this->crud_model->obtenerRegistros(\"modulo\", 'mod_url = \"' . $dataUrl . '\"', \"mod_id, mod_nombre, mod_clase_icono, mod_url, mod_dependencia\");\r\n //tipo de consulta\r\n if ($pTipo == 0): // si es normal\r\n //verifico que no venga vacio la consulta\r\n if ($dataIdUrl != NULL):\r\n //array para el ingreso los datos\r\n $dataInsert = array(\r\n 'mod_id' => $dataIdUrl[0]->mod_id,\r\n 'usu_id' => $pIdUsuario,\r\n 'log_acc_his_fecha' => date(\"Y-m-d H:i:s\")\r\n );\r\n $this->crud_model->agregarRegistro('log_acceso_historial', $dataInsert);\r\n endif;\r\n elseif ($pTipo == 2): //si se quiere recibir datos de la uri\r\n //obtener el nombvre de la url\r\n $dataIdUrl = $this->crud_model->obtenerRegistros(\"modulo\", 'mod_url = \"' . $dataUrl . '\"', \"mod_id, mod_nombre, mod_clase_icono, mod_url, mod_dependencia\");\r\n //retornar estos datos\r\n return $dataIdUrl;\r\n else:\r\n if ($dataIdUrl != NULL): //si no está vacio\r\n //$dataIdUrl[1] = NULL;\r\n $dataIdUrl [\"mod_sub\"] = NULL;\r\n if ($this->uri->segment(2) != NULL): //Si se ingresa a un modulo del acceso\r\n $dataSegmento = strpos($this->uri->segment(2), \"editar\"); //busco la palabra editar\r\n //echo $this->uri->segment(2);\r\n //var_dump($dataSegmento);\r\n if ($dataSegmento !== false): //si se encuentra la cadena\r\n //echo \"se ha encontrado la palabra deseada!!!!\";\r\n //echo $this->uri->segment(2);\r\n $dataDatos = array(\r\n \"mod_sub\" => \"Editar \" . $dataIdUrl[0]->mod_nombre\r\n );\r\n $dataIdUrl = array_merge((array) $dataIdUrl, (array) $dataDatos);\r\n //añado una posicion al resultado\r\n endif;\r\n endif;\r\n endif;\r\n return $dataIdUrl;\r\n endif;\r\n }", "title": "" }, { "docid": "5b01df44ef6cda822785c25efafd0ee1", "score": "0.6059215", "text": "public static function setLogEstudiante(){\n return Database::executeRow('INSERT INTO bitacora_alumno(id_personal,id_funcion,descripcion,detalle_request,fecha)\n VALUES (?,?,?,?,(SELECT now()))', self::getParamsForQuery());\n }", "title": "" }, { "docid": "ec144f3ef5ab9cd51c9f51c741c9f058", "score": "0.60454434", "text": "function infoEmpleado($curp,$noControl) {\t\t######### Metodo para obtener los datos del empleado\n\t$iConn = odbc_connect(\"pensiones\",\"\",\"\",\"\");\t#Realizo Conexion\n\t\n\t$iClave = 0;\n $sNombre = \"\";\n \t$sPuesto = \"\";\n\t$sTipoTrabajador = \"\";\n\t$sTelefono = \"\";\n\t$sDomicilio = \"\";\n\t$sFechaIng = \"\";\n\t$sDependencia = \"\";\n\t\n\t###### Funcion para obtener el numero de registros que devuelve un Select, ya que no funciona la funcion de odbc\n\tfunction numRows ($result,$odbcId,$sCriterio)\n\t{\n\t\t$numRecords = odbc_num_rows ($result);\n\t\tif ($numRecords < 0)\n\t\t{\n\t\t\t$sQry = \"SELECT count(*) as results FROM \".$sCriterio;\n\t\t\t$count = odbc_exec ($odbcId, $sQry);\n\t\t\t$numRecords = odbc_result ($count, \"results\");\n\t\t}\n\t\t\n\t\treturn $numRecords;\n\t} \n\t####### Fin Funcion\n\t\n\t$sQryInf = \"SELECT e.ficha_df, e.nom_df, e.curp, e.telefono, e.domi_df, e.numint_df, e.ingreso_em, e.cve_ea, e.cve_tt, e.cve_de, e.cve_pto FROM \";\n\t$sCriterio = \"empleados as e\n\t\t\t\t WHERE e.ficha_df=\".$noControl.\" AND ltrim(upper(e.curp))='\".trim(strtoupper($curp)).\"'\";\n\t$sQryInf.= $sCriterio;\n\t\n\tif ($iConn) {\n\t\t$iRs = odbc_exec($iConn, $sQryInf);\n\t\t\n\t\t$iNumRegs = numRows($iRs, $iConn, $sCriterio);\n\t\t\n\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\t$rows = odbc_fetch_object($iRs);\n\t\t\t\n\t\t\t$sTipoTrabajador = \"\";\n\t\t\t$sDependencia = \"\";\n\t\t\t$sPuesto = \"\";\n\t\t\t\n\t\t\t$iClave = $rows->cve_ea;\n\t\t\t$iCveTT = $rows->cve_tt;\t#Clave del tipo de trabajador\n\t\t\t$iCveDep = $rows->cve_de;\t#Clave de la dependencia\n\t\t\t$iCvePu = $rows->cve_pto;\t#Clave del puesto\n\t\t\t\n\t\t\t######### Obtengo el TIPO DE TRABAJADOR\n\t\t\t$sQryTipoT = \"SELECT nom_tt FROM \";\n\t\t\t$sCriterioT = \"tipotrab WHERE cve_tt=\".$iCveTT;\n\t\t\t$sQryTipoT.= $sCriterioT;\n\t\t\t$iRsTT = odbc_exec($iConn, $sQryTipoT);\n\t\t\n\t\t\t$iNumRegs = numRows($iRsTT, $iConn, $sCriterioT);\n\t\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\t\t$aTipoT = odbc_fetch_object($iRsTT);\n\t\t\t\t$sTipoTrabajador = $aTipoT->nom_tt;\t###\n\t\t\t}\n\t\t\t\n\t\t\t######### Obtengo el Nombre de la DEPENDENCIA\n\t\t\t$sQryTipoD = \"SELECT nom_de FROM \";\n\t\t\t$sCriterioD = \"depend WHERE cve_de=\".$iCveDep;\n\t\t\t$sQryTipoD.= $sCriterioD;\n\t\t\t$iRsD = odbc_exec($iConn, $sQryTipoD);\n\t\t\n\t\t\t$iNumRegs = numRows($iRsD, $iConn, $sCriterioD);\n\t\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\t\t$aTipoD = odbc_fetch_object($iRsD);\n\t\t\t\t$sDependencia = $aTipoD->nom_de;\t###\n\t\t\t}\n\t\t\t\n\t\t\t######### Obtengo el Nombre de la PUESTO\n\t\t\t$sQryTipoP = \"SELECT nom_pto FROM \";\n\t\t\t$sCriterioP = \"puestos WHERE cve_pto=\".$iCvePu;\n\t\t\t$sQryTipoP.= $sCriterioP;\n\t\t\t$iRsP = odbc_exec($iConn, $sQryTipoP);\n\t\t\n\t\t\t$iNumRegs = numRows($iRsP, $iConn, $sCriterioP);\n\t\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\t\t$aTipoP = odbc_fetch_object($iRsP);\n\t\t\t\t$sPuesto = $aTipoP->nom_pto;\t###\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t$sNombre = $rows->nom_df;\t\t\t\t\t\t\t\t\n\t\t\t$sTelefono = $rows->telefono;\n\t\t\t$sDomicilio = $rows->domi_df;\n\t\t\t\n\t\t\t$aFechaI = explode(\"-\",$rows->ingreso_em);\n\t\t\t$sFechaIng=$aFechaI[2].\"/\".$aFechaI[1].\"/\".$aFechaI[0];\t\t\t\n\t\t}\n\t}\n\todbc_close($iConn);\n\t\n\treturn array(\"clave\" => $iClave,\n\t\t\t\t \"nombre\" => $sNombre,\n\t\t\t\t \"puesto\" => $sPuesto,\n\t\t\t\t \"tipoTrabajador\" => $sTipoTrabajador,\n\t\t\t\t \"telefono\" => $sTelefono,\n\t\t\t\t \"domicilio\" => $sDomicilio,\n\t\t\t\t \"fechaIng\" => $sFechaIng,\n\t\t\t\t \"dependencia\" => $sDependencia\n\t\t\t);\n}", "title": "" }, { "docid": "1a2dccf8ed850e7b311db93c049f918e", "score": "0.60249376", "text": "static public function ctrCrearReclamo()\n {\n\n if (isset($_POST[\"nuevEstablecimiento\"]) || isset($_POST[\"nuevDescripcion\"])) {\n\n\n\n date_default_timezone_set('America/Lima');\n\n $fecha = date('Y-m-d');\n $hora = date('H:i:s');\n\n $fechaActual = $fecha . ' ' . $hora;\n\n $tabla = \"tap_reclamo\";\n\n /* var_dump($_POST[\"nuevFecha\"]); */\n\n $datos = array(\n\n \"entidad\" => $_POST[\"nuevEntidad\"],\n \"codigo_reclamo\" => $_POST[\"codigoUnicoReclamo\"],\n \"establecimiento\" => $_POST[\"nuevEstablecimiento\"],\n \"tipo_doc_ligitimado\" => $_POST[\"nuevTipoDocumentoLigitimado\"],\n \"num_doc_ligitimado\" => $_POST[\"dniLigitimado\"],\n \"nombre_ligitimado\" => $_POST[\"nuevNombreLigitimado\"],\n \"telefono_ligitimado\" => $_POST[\"nuevTelefonoLigitimado\"],\n \"email_ligitimado\" => $_POST[\"nuevEmailLigitimado\"],\n \"distrito_ligitimado\" => $_POST[\"nuevDistritoLigitimado\"],\n \"direccion_ligitimado\" => $_POST[\"nuevDireccionLigitimado\"],\n \"tipo_doc\" => $_POST[\"nuevTipoDocumento\"],\n \"num_doc\" => $_POST[\"dni\"],\n \"nombre\" => $_POST[\"nuevNombre\"],\n \"telefono\" => $_POST[\"nuevTelefono\"],\n \"email\" => $_POST[\"nuevEmail\"],\n \"distrito\" => $_POST[\"nuevDistrito\"],\n \"direccion\" => $_POST[\"nuevDireccion\"],\n \"descripcion\" => $_POST[\"nuevDescripcion\"],\n \"fecha\" => $fechaActual\n );\n\n $correoLigitimado = $_POST[\"nuevEmailLigitimado\"];\n $correoUsuario = $_POST[\"nuevEmail\"];\n\n $respuesta = ModeloReclamo::mdlIngresaReclamo($tabla, $datos);\n\n $item_ = \"codigo_reclamo\";\n $valor_ = $_POST[\"codigoUnicoReclamo\"];\n\n $reclamo = ModeloReclamo::mdlMostrarReclamo('tap_reclamo', $item_, $valor_);\n\n $num_reclamo = $reclamo[\"id\"];\n\n /* =============================================\n CORREOS DONDE SE ENVIARA EL FORMULARIO\n ============================================= */\n /*$emailTo = '[email protected]' . ', ';\n $emailTo .= $correoLigitimado . ', ';\n $emailTo .= $correoUsuario; */\n $emailTo = array('[email protected]', $correoLigitimado, $correoUsuario);\n\n /* =============================================\n CONFIGURACION DEL PHPMAILER \n ============================================= */\n $subject = \"LIBRO DE RECLAMACIONES - DIRIS LIMA SUR\";\n\n /* $message = \"<html><head><meta http-equiv='Content-Type' content='text/html; charsert=utf-8'/></head><body>\";\n $message .= \"<table width='100%' bgcolor='#e0e0e0' cellpadding='0' cellspacing='0' border='0'>\";\n\n $message .= \"<tr><td>\";\n\n $message .= \"<table align='center' width='100%' border='0' cellpadding='0' cellspacing='0' style='max-width:650px; background-color:#fff; font-family:Verdana, Geneva, sans-serif;'>\";\n\n $message .= \"<thead>\n <tr height='80'>\n <th colspan='4' style='background-color:#f5f5f5; border-bottom:solid 1px #bdbdbd; font-family:Verdana, Geneva, sans-serif; color:#333; font-size:34px;' >Libro de Reclamaciones Virtual <br><a href='https://www.dirislimasur.gob.pe/'>DIRIS LIMA SUR</a></th>\n </tr>\n </thead>\";\n\n $message .= \"<tbody>\n \n <tr align='center' height='50' style='font-family:Verdana, Geneva, sans-serif;'>\n <td style='background-color:#00a2d1; text-align:center;'><a href='#' style='color:#fff; text-decoration:none;'>Mesa Virtual</a></td>\n <td style='background-color:#00a2d1; text-align:center;'><a href='http://consultatramite.dirislimasur.gob.pe:8085/consulta/' style='color:#fff; text-decoration:none;'>Consulta Tramite</a></td>\n <td style='background-color:#00a2d1; text-align:center;'><a href='#' style='color:#fff; text-decoration:none;' >Libro de Reclamaciones Virutal</a></td>\n <td style='background-color:#00a2d1; text-align:center;'><a href='https://www.dirislimasur.gob.pe/' style='color:#fff; text-decoration:none;' >DIRIRS LIMA SUR</a></td>\n </tr>\n \n <tr>\n <td colspan='4' style='padding:15px;'>\n <hr/> \n <p style='font-size:20px;' align='center'><strong>Numero de Reclamo - 00\" . $num_reclamo . \"</strong></p> \n <hr/>\n <hr/> \n <p style='font-size:20px;'><strong>IDENTIFICACION DEL USUARIO O TERCERO LEGITIMADO</strong></p> \n <hr/>\n <p style='font-size:20px;'>Tipo Documento : \" . $_POST[\"nuevTipoDocumentoLigitimado\"] . \"</p>\n <p style='font-size:20px;'>N&°acute de Documento : \" . $_POST[\"dniLigitimado\"] . \"</p>\n <p style='font-size:20px;'>Nombre de Documento : \" . $_POST[\"nuevNombreLigitimado\"] . \"</p>\n <p style='font-size:20px;'>Telefono : \" . $_POST[\"nuevTelefonoLigitimado\"] . \"</p>\n <p style='font-size:20px;'>Correo : \" . $_POST[\"nuevEmailLigitimado\"] . \"</p>\n <p style='font-size:20px;'>Distrito : \" . $_POST[\"nuevDistritoLigitimado\"] . \"</p>\n <p style='font-size:20px;'>Direccion : \" . $_POST[\"nuevDireccionLigitimado\"] . \"</p>\n <hr/>\n <p style='font-size:20px;'><strong>IDENTIFICACION DE QUIEN PRESENTA EL RECLAMO (En caso de ser el usuario afectado no es necesario su llenado) </strong></p> \n <hr/>\n <p style='font-size:20px;'>Tipo Documento : \" . $_POST[\"nuevTipoDocumento\"] . \"</p>\n <p style='font-size:20px;'>N&°acute de Documento : \" . $_POST[\"dni\"] . \"</p>\n <p style='font-size:20px;'>Nombre de Documento : \" . $_POST[\"nuevNombre\"] . \"</p>\n <p style='font-size:20px;'>Telefono : \" . $_POST[\"nuevTelefono\"] . \"</p>\n <p style='font-size:20px;'>Correo : \" . $_POST[\"nuevEmail\"] . \"</p>\n <p style='font-size:20px;'>Distrito : \" . $_POST[\"nuevDistrito\"] . \"</p>\n <p style='font-size:20px;'>Direccion : \" . $_POST[\"nuevDireccion\"] . \"</p>\n <hr/>\n <p style='font-size:20px;'><strong>DESCRIPCION:</strong></p>\n <hr/>\n <p style='font-size:20px;'>\" . $_POST[\"nuevDescripcion\"] . \"</p>\n <p style='font-size:25px;'>Direccion de Redes Integradas de Salud Lima Sur</p>\n <img src='https://www.dirislimasur.gob.pe/wp-content/uploads/2020/07/logoemail.jpg' alt='Direccion de Redes Integradas de Salud Lima Sur' title='Dirección de Redes Integradas de Salud Lima Sur' style='height:auto; width:100%; max-width:100%;' />\n <hr/>\n </td>\n </tr>\n \n </tbody>\";\n\n $message .= \"</table>\";\n\n $message .= \"</td></tr>\";\n $message .= \"</table>\";\n\n $message .= \"</body></html>\"; */\n $message = \"<html>\n\n <body>\n \n <table width='100%' background='#e0e0e0' cellpadding='0' cellspacing='0'>\n \n <tr>\n <td>\n \n <table text-align='center' width='100%' cellpadding='0' cellspacing='0'\n style='max-width:650px; background-color:#fff; font-family:Verdana, Geneva, sans-serif;'>\n \n <thead>\n <tr height='80'>\n <th colspan='4'\n style='background-color:#f5f5f5; border-bottom:solid 1px #bdbdbd; font-family:Verdana, Geneva, sans-serif; color:#333; font-size:34px;'>\n Libro de Reclamaciones Virtual <br><a href='https://www.dirislimasur.gob.pe/'>DIRIS LIMA\n SUR</a></th>\n </tr>\n </thead>\n \n <tbody>\n \n <tr text-align='center' height='50' style='font-family:Verdana, Geneva, sans-serif;'>\n <td style='background-color:#00a2d1; text-align:center;'><a href='#'\n style='color:#fff; text-decoration:none;'>Mesa Virtual</a></td>\n <td style='background-color:#00a2d1; text-align:center;'><a\n href='http://consultatramite.dirislimasur.gob.pe:8085/consulta/'\n style='color:#fff; text-decoration:none;'>Consulta Tramite</a></td>\n <td style='background-color:#00a2d1; text-align:center;'><a href='#'\n style='color:#fff; text-decoration:none;'>Libro de Reclamaciones Virutal</a></td>\n <td style='background-color:#00a2d1; text-align:center;'><a\n href='https://www.dirislimasur.gob.pe/'\n style='color:#fff; text-decoration:none;'>DIRIRS LIMA SUR</a></td>\n </tr>\n \n <tr>\n <td colspan='4' style='padding:15px;'>\n <hr />\n <p style='font-size:20px;' text-align='center'><strong>Numero de Reclamo - 00\" . $num_reclamo. \"</strong></p>\n <hr />\n <hr />\n <p style='font-size:20px;'><strong>IDENTIFICACION DEL USUARIO O TERCERO LEGITIMADO</strong></p>\n <hr />\n <p style='font-size:20px;'>Tipo Documento : \" . $_POST[\"nuevTipoDocumentoLigitimado\"] .\"</p>\n <p style='font-size:20px;'>N&°acute de Documento : \" . $_POST[\"dniLigitimado\"] . \"</p>\n <p style='font-size:20px;'>Nombre de Documento : \" . $_POST[\"nuevNombreLigitimado\"] . \"</p>\n <p style='font-size:20px;'>Telefono : \" . $_POST[\"nuevTelefonoLigitimado\"] . \"</p>\n <p style='font-size:20px;'>Correo : \" . $_POST[\"nuevEmailLigitimado\"] . \"</p>\n <p style='font-size:20px;'>Distrito : \" . $_POST[\"nuevDistritoLigitimado\"] . \"</p>\n <p style='font-size:20px;'>Direccion : \" . $_POST[\"nuevDireccionLigitimado\"] . \"</p>\n <hr />\n <p style='font-size:20px;'><strong>IDENTIFICACION DE QUIEN PRESENTA EL RECLAMO (En caso\n de ser el usuario afectado no es necesario su llenado) </strong></p>\n <hr />\n <p style='font-size:20px;'>Tipo Documento : \" . $_POST[\"nuevTipoDocumento\"] . \"</p>\n <p style='font-size:20px;'>N&°acute de Documento : \" . $_POST[\"dni\"] . \"</p>\n <p style='font-size:20px;'>Nombre de Documento : \" . $_POST[\"nuevNombre\"] . \"</p>\n <p style='font-size:20px;'>Telefono : \" . $_POST[\"nuevTelefono\"] . \"</p>\n <p style='font-size:20px;'>Correo : \" . $_POST[\"nuevEmail\"] . \"</p>\n <p style='font-size:20px;'>Distrito : \" . $_POST[\"nuevDistrito\"] . \"</p>\n <p style='font-size:20px;'>Direccion : \" . $_POST[\"nuevDireccion\"] . \"</p>\n <hr />\n <p style='font-size:20px;'><strong>DESCRIPCION:</strong></p>\n <hr />\n <p style='font-size:20px;'>\" . $_POST[\"nuevDescripcion\"] . \"</p>\n <p style='font-size:25px;'>Direccion de Redes Integradas de Salud Lima Sur</p>\n <hr />\n </td>\n </tr>\n \n </tbody>\n \n </table>\n \n </td>\n </tr>\n </table>\n \n </body>\n \n </html>\";\n\n\n $EnviadoPor = \"[email protected]\";\n $NombreEnviado = \"LIBRO DE RECLAMACIONES VIRUTAL\";\n $host = \"smtp.gmail.com\";\n $port = 587;\n $SMTPAuth = true;\n $SMTSecure = \"tls\";\n $password = \"1597531994Vlad\";\n\n require \"vistas/bower_components/PHPMailer/PHPMailerAutoload.php\";\n\n $mail = new PHPMailer();\n\n $mail->isSMTP();\n\n\n $mail->SMTPDebug = 0;\n $mail->Host = $host;\n $mail->Port = $port;\n $mail->SMTPAuth = $SMTPAuth;\n $mail->SMTPSecure = $SMTSecure;\n $mail->Username = $EnviadoPor;\n $mail->Password = $password;\n\n $mail->setFrom($EnviadoPor, $NombreEnviado);\n\n if (is_array($emailTo)) {\n foreach ($emailTo as $key => $value) {\n $mail->addAddress($value);\n }\n } else {\n $mail->addAddress($emailTo);\n }\n /* $mail->addAddress($emailTo); */\n\n\n $mail->isHTML(true);\n $mail->Subject = $subject;\n\n $mail->Body = $message;\n\n if (!$mail->send()) {\n\n echo '<script>console.log(\"ERROR AL ENVIAR MENSAJE\");</script>';\n }\n echo '<script>console.log(\"MENSAJE ENVIADO\");</script>';\n\n if ($respuesta == \"ok\") {\n\n echo '<script>\n\n\t\t\t\t\tswal({\n\n\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\ttitle: \"¡El Reclamo N°- 0' . $num_reclamo . ' ha sido Generado!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"https://libroreclamaciones.dirislimasur.gob.pe/\";\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\t\t</script>';\n } else {\n echo '<script>\n\n\t\t\t\t\tswal({\n\n\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\ttitle: \"¡Error, Contactar con el Administrador!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t}).then(function(result){\n\n\n\t\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\t\t</script>';\n }\n }\n }", "title": "" }, { "docid": "92da631b8b8e5bc1e804353d7baeb95f", "score": "0.6010408", "text": "public function informacionTabla(){\r\n $sql=\"SELECT * FROM tbl_inventario_seguros ORDER BY idSeguros DESC\";\r\n\t\treturn ejecutarConsulta($sql); \r\n }", "title": "" }, { "docid": "0ce92cfb82330bb6f09588329a014f8f", "score": "0.60086757", "text": "static public function ctrDescargasMDN()\n {\n\tif(isset($_POST[\"idPDescargas\"]))\n\t {\n\t \t//$ruta = ControladorRuta::ctrRuta();\n\t\t$idP = $_POST[\"idPDescargas\"];\n\t\t$tabla = \"modelodenegocio\";\n\t\t$respuesta = ModeloMDN::mdlDesacargasMDN($tabla, $idP);\n\t\n\t\t}\n\t\t\n\t }", "title": "" }, { "docid": "d68d26955a6cd92e803d8009a7cec7d5", "score": "0.5995747", "text": "function modificarFechaHora(){\n\t\t$this->procedimiento='vef.ft_fecha_hora_ime';\n\t\t$this->transaccion='VF_FECHIMP_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('fecha_hora_id','fecha_hora_id','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('fecha_hora','fecha_hora','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "0a6509c5de28a38fe00a713785f2be41", "score": "0.59922105", "text": "public function RegistreAbonoTitulo($fecha, $IDCuenta, $Abono, $Observaciones,$CentroCosto,$idColaborador,$idUser, $Vector){\r\n \r\n $DatosCentro=$this->DevuelveValores(\"centrocosto\",\"ID\",$CentroCosto);\r\n $DatosCuentaXCobrar=$this->DevuelveValores(\"titulos_cuentasxcobrar\",\"ID\",$IDCuenta);\r\n $DatosColaborador=$this->DevuelveValores(\"colaboradores\",\"Identificacion\",$idColaborador);\r\n $idCliente=$DatosCuentaXCobrar[\"idTercero\"];\r\n $DatosCliente=$this->DevuelveValores(\"clientes\",\"Num_Identificacion\",$idCliente);\r\n $CuentaClientes=$this->DevuelveValores(\"parametros_contables\",\"ID\",6);\r\n \r\n //$DatosCuentasFrecuentes=$this->DevuelveValores(\"cuentasfrecuentes\",\"CuentaPUC\",$CuentaDestino);\r\n $CuentaDestino=\"110505\";\r\n $NombreCuenta=\"CAJA GENERAL\";\r\n $NIT=$DatosCliente[\"Num_Identificacion\"];\r\n $RazonSocialC=$DatosCliente[\"RazonSocial\"];\r\n $NuevoSaldo=$DatosCuentaXCobrar[\"Saldo\"]-$Abono;\r\n $TotalAbonos=$DatosCuentaXCobrar[\"TotalAbonos\"]+$Abono;\r\n $Concepto=\"ABONO AL TITULO $DatosCuentaXCobrar[Mayor] DE LA PROMOCION $DatosCuentaXCobrar[Promocion] Nuevo Saldo \".number_format($NuevoSaldo);\r\n //////Creo el comprobante de Ingreso\r\n \r\n $tab=\"comprobantes_ingreso\";\r\n $NumRegistros=6;\r\n\r\n $Columnas[0]=\"Fecha\";\t\t$Valores[0]=$fecha;\r\n $Columnas[1]=\"Clientes_idClientes\"; $Valores[1]=$DatosCliente[\"idClientes\"];\r\n $Columnas[2]=\"Valor\"; $Valores[2]=$Abono;\r\n $Columnas[3]=\"Tipo\";\t\t$Valores[3]=\"EFECTIVO\";\r\n $Columnas[4]=\"Concepto\";\t\t$Valores[4]=$Concepto;\r\n $Columnas[5]=\"Usuarios_idUsuarios\";\t$Valores[5]= $idUser;\r\n \r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n \r\n $idIngreso=$this->ObtenerMAX($tab,\"ID\", 1,\"\");\r\n \r\n ////Registro el anticipo en el libro diario\r\n $DatosSucursal= $this->DevuelveValores(\"empresa_pro_sucursales\", \"Actual\", 1); \r\n \r\n $tab=\"librodiario\";\r\n $NumRegistros=27;\r\n $CuentaPUC=$CuentaDestino;\r\n //$NombreCuenta=$NombreCuenta;\r\n $CuentaPUCContraPartida=$CuentaClientes[\"CuentaPUC\"];\r\n $NombreCuentaContraPartida=\"Clientes Nacionales\";\r\n \r\n\r\n\r\n $Columnas[0]=\"Fecha\";\t\t\t$Valores[0]=$fecha;\r\n $Columnas[1]=\"Tipo_Documento_Intero\";\t$Valores[1]=\"ComprobanteIngreso\";\r\n $Columnas[2]=\"Num_Documento_Interno\";\t$Valores[2]=$idIngreso;\r\n $Columnas[3]=\"Tercero_Tipo_Documento\";\t$Valores[3]=$DatosCliente['Tipo_Documento'];\r\n $Columnas[4]=\"Tercero_Identificacion\";\t$Valores[4]=$NIT;\r\n $Columnas[5]=\"Tercero_DV\";\t\t\t$Valores[5]=$DatosCliente['DV'];\r\n $Columnas[6]=\"Tercero_Primer_Apellido\";\t$Valores[6]=$DatosCliente['Primer_Apellido'];\r\n $Columnas[7]=\"Tercero_Segundo_Apellido\"; $Valores[7]=$DatosCliente['Segundo_Apellido'];\r\n $Columnas[8]=\"Tercero_Primer_Nombre\";\t$Valores[8]=$DatosCliente['Primer_Nombre'];\r\n $Columnas[9]=\"Tercero_Otros_Nombres\";\t$Valores[9]=$DatosCliente['Otros_Nombres'];\r\n $Columnas[10]=\"Tercero_Razon_Social\";\t$Valores[10]=$RazonSocialC;\r\n $Columnas[11]=\"Tercero_Direccion\";\t\t$Valores[11]=$DatosCliente['Direccion'];\r\n $Columnas[12]=\"Tercero_Cod_Dpto\";\t\t$Valores[12]=$DatosCliente['Cod_Dpto'];\r\n $Columnas[13]=\"Tercero_Cod_Mcipio\";\t\t$Valores[13]=$DatosCliente['Cod_Mcipio'];\r\n $Columnas[14]=\"Tercero_Pais_Domicilio\"; $Valores[14]=$DatosCliente['Pais_Domicilio'];\r\n $Columnas[15]=\"CuentaPUC\";\t\t\t$Valores[15]=$CuentaPUC;\r\n $Columnas[16]=\"NombreCuenta\";\t\t$Valores[16]=$NombreCuenta;\r\n $Columnas[17]=\"Detalle\";\t\t\t$Valores[17]=\"AbonoVentaTitulo\";\r\n $Columnas[18]=\"Debito\";\t\t\t$Valores[18]=$Abono;\r\n $Columnas[19]=\"Credito\";\t\t\t$Valores[19]=0;\r\n $Columnas[20]=\"Neto\";\t\t\t$Valores[20]=$Abono;\r\n $Columnas[21]=\"Mayor\";\t\t\t$Valores[21]=\"NO\";\r\n $Columnas[22]=\"Esp\";\t\t\t$Valores[22]=\"NO\";\r\n $Columnas[23]=\"Concepto\";\t\t\t$Valores[23]=$Concepto;\r\n $Columnas[24]=\"idCentroCosto\";\t\t$Valores[24]=$CentroCosto;\r\n $Columnas[25]=\"idEmpresa\";\t\t\t$Valores[25]=$DatosCentro[\"EmpresaPro\"];\r\n $Columnas[26]=\"idSucursal\"; $Valores[26]=$DatosSucursal[\"ID\"];\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n\r\n\r\n ///////////////////////Registramos contra partida del anticipo\r\n\r\n $CuentaPUC=$CuentaPUCContraPartida; \r\n $NombreCuenta=$NombreCuentaContraPartida;\r\n\r\n $Valores[15]=$CuentaPUC;\r\n $Valores[16]=$NombreCuenta;\r\n $Valores[18]=0;\r\n $Valores[19]=$Abono; \t\t\t//Credito se escribe el total de la venta menos los impuestos\r\n $Valores[20]=$Valores[19]*(-1); \t\t\t\t\t\t\t\t\t\t\t//Credito se escribe el total de la venta menos los impuestos\r\n\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n\t\t\r\n \r\n $sql=\"UPDATE titulos_cuentasxcobrar SET TotalAbonos='$TotalAbonos', Saldo='$NuevoSaldo', UltimoPago='$fecha' WHERE ID='$IDCuenta'\";\r\n $this->Query($sql);\r\n $sql=\"UPDATE titulos_ventas SET TotalAbonos='$TotalAbonos', Saldo='$NuevoSaldo' WHERE ID='$DatosCuentaXCobrar[idDocumento]'\";\r\n $this->Query($sql);\r\n $sql=\"UPDATE titulos_listados_promocion_$DatosCuentaXCobrar[Promocion] SET TotalAbonos='$TotalAbonos', Saldo='$NuevoSaldo' WHERE Mayor1='$DatosCuentaXCobrar[Mayor]'\";\r\n $this->Query($sql);\r\n \r\n //////Agrego a la tabla abonos\r\n \r\n $tab=\"titulos_abonos\";\r\n $NumRegistros=8;\r\n\r\n $Columnas[0]=\"Fecha\"; $Valores[0]=$fecha;\r\n $Columnas[1]=\"idVenta\"; $Valores[1]=$DatosCuentaXCobrar[\"idDocumento\"];\r\n $Columnas[2]=\"Monto\"; $Valores[2]=$Abono;\r\n $Columnas[3]=\"idColaborador\";\t\t$Valores[3]=$idColaborador;\r\n $Columnas[4]=\"NombreColaborador\";\t\t$Valores[4]=$DatosColaborador[\"Nombre\"];\r\n $Columnas[5]=\"idComprobanteIngreso\";\t$Valores[5]=$idIngreso;\r\n $Columnas[6]=\"Observaciones\"; $Valores[6]=$Observaciones;\r\n $Columnas[7]=\"Hora\"; $Valores[7]=date(\"H:i:s\");\r\n \r\n \r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n //$idComprobanteAbono=$this->ObtenerMAX($tab,\"ID\", 1,\"\");\r\n \r\n return($idIngreso);\r\n \r\n \r\n\t}", "title": "" }, { "docid": "8a0b406640c97eb5b8b6469f9bdc748b", "score": "0.59410775", "text": "public function RegistreVentaTitulo($Fecha,$idPromocion,$Mayor,$idColaborador,$idCliente,$VectorTitulos) {\r\n $Consulta= $this->ConsultarTabla(\"titulos_ventas\",\" WHERE Mayor1='$Mayor' AND Promocion='$idPromocion' AND Estado=''\");\r\n $DatosVenta= $this->FetchArray($Consulta);\r\n if($DatosVenta[\"Mayor1\"]==\"\"){\r\n $TablaTitulos=\"titulos_listados_promocion_$idPromocion\";\r\n $DatosTitulo=$this->DevuelveValores($TablaTitulos, \"Mayor1\", $Mayor);\r\n $DatosColaborador=$this->DevuelveValores(\"colaboradores\", \"Identificacion\", $idColaborador);\r\n $DatosCliente=$this->DevuelveValores(\"clientes\", \"Num_Identificacion\", $idCliente);\r\n $NombreColaborador=$DatosColaborador[\"Nombre\"];\r\n $DatosPromocion=$this->DevuelveValores(\"titulos_promociones\", \"ID\", $idPromocion);\r\n \r\n $tab=\"titulos_ventas\";\r\n $NumRegistros=15;\r\n\r\n $Columnas[0]=\"Fecha\"; $Valores[0]=$Fecha;\r\n $Columnas[1]=\"Promocion\"; $Valores[1]=$idPromocion;\r\n $Columnas[2]=\"Mayor1\"; $Valores[2]=$Mayor;\r\n $Columnas[3]=\"Mayor2\"; $Valores[3]=$DatosTitulo[\"Mayor2\"];\r\n $Columnas[4]=\"Adicional\"; $Valores[4]=$DatosTitulo[\"Adicional\"];\r\n $Columnas[5]=\"Valor\"; $Valores[5]=$DatosPromocion[\"Valor\"];\r\n $Columnas[6]=\"TotalAbonos\"; $Valores[6]=0;\r\n $Columnas[7]=\"Saldo\"; $Valores[7]=$DatosPromocion[\"Valor\"];\r\n $Columnas[8]=\"idCliente\"; $Valores[8]=$idCliente;\r\n $Columnas[9]=\"NombreCliente\"; $Valores[9]=$DatosCliente[\"RazonSocial\"];\r\n $Columnas[10]=\"idColaborador\"; $Valores[10]=$idColaborador;\r\n $Columnas[11]=\"NombreColaborador\"; $Valores[11]=$NombreColaborador;\r\n $Columnas[12]=\"idUsuario\"; $Valores[12]=$this->idUser;\r\n $Columnas[13]=\"ComisionAPagar\"; $Valores[13]=$DatosPromocion[\"ComisionAPagar\"];\r\n $Columnas[14]=\"SaldoComision\"; $Valores[14]=$DatosPromocion[\"ComisionAPagar\"];\r\n \r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n $idVenta=$this->ObtenerMAX($tab, \"ID\", 1, \"\");\r\n \r\n $sql=\"UPDATE $TablaTitulos SET FechaVenta='$Fecha', idColaborador='$idColaborador',\"\r\n . \" NombreColaborador='$NombreColaborador', idCliente='$idCliente', NombreCliente='$DatosCliente[RazonSocial]',\"\r\n . \" Saldo='$DatosPromocion[Valor]' \"\r\n . \"WHERE Mayor1 ='$Mayor'\";\r\n $this->Query($sql);\r\n \r\n return($idVenta);\r\n \r\n }else{\r\n $idVenta=\"E\";\r\n return($idVenta); \r\n }\r\n }", "title": "" }, { "docid": "db5ad5f309e1219f10341ff8ad783565", "score": "0.59397995", "text": "function descontar_inventarios($enlaceCon,$cod_salida, $cod_almacen, $cod_material, $cantidad, $precio, $descuento, $montoparcial, $orden){\n\t$cantidadPivote=$cantidad;\n\t\n\t$banderaError=1;\n\t\n\t$sqlExistencias=\"select id.cod_material, id.cantidad_restante, id.lote, id.fecha_vencimiento, id.cod_ingreso_almacen \n\t\tfrom ingreso_almacenes i, ingreso_detalle_almacenes id \n\t\twhere i.cod_ingreso_almacen=id.cod_ingreso_almacen and i.cod_almacen='$cod_almacen' and i.ingreso_anulado=0 \n\t\tand id.cod_material='$cod_material' and id.cantidad_restante>0 order by id.lote, id.fecha_vencimiento asc\";\n\t\n\t//AQUI SE DEBE CORREGIR EL DATO DE CANTIDAD RESTANTE >0 OJO\n\t\n\t//echo $sqlExistencias.\"<br>\";\n\t$respExistencias=mysqli_query($enlaceCon,$sqlExistencias);\n\twhile($datExistencias=mysqli_fetch_array($respExistencias)){\n\t\tif($cantidadPivote>0){\n\t\t\t$codMaterial=$datExistencias[0];\n\t\t\t$cantidadRestante=$datExistencias[1];\n\t\t\t$loteProducto=$datExistencias[2];\n\t\t\t$fechaVencProducto=$datExistencias[3];\n\t\t\t$codIngreso=$datExistencias[4];\n\t\t\t\n\t\t\t//echo $codMaterial.\" \".$cantidadRestante.\" \".$loteProducto.\" \".$fechaVencProducto.\"<br>\";\n\t\t\t\n\t\t\tif($cantidadPivote<=$cantidadRestante){\n\t\t\t\t$cantidadInsert=$cantidadPivote;\n\t\t\t\t$cantidadPivote=0;\n\t\t\t}else{\n\t\t\t\t$cantidadPivote=$cantidadPivote-$cantidadRestante;\n\t\t\t\t$cantidadInsert=$cantidadRestante;\n\t\t\t}\n\t\t\t$montoparcial=$cantidadInsert*$precio;\n\t\t\t\n\t\t\t$sqlInsert=\"insert into salida_detalle_almacenes (cod_salida_almacen, cod_material, cantidad_unitaria, lote, fecha_vencimiento, precio_unitario,\n\t\t\tdescuento_unitario, monto_unitario, cod_ingreso_almacen, orden_detalle) values ('$cod_salida', '$codMaterial', '$cantidadInsert', '$loteProducto', '$fechaVencProducto',\n\t\t\t'$precio','$descuento','$montoparcial','$codIngreso','$orden')\";\n\t\t\t\n\t\t\t//echo $sqlInsert;\n\t\t\t$respInsert=mysqli_query($enlaceCon,$sqlInsert);\n\t\t\t\n\t\t\t//AQUI DAMOS DE BAJA EL DESCUENTO POR SI HUBIERAN DOS REGISTROS O MAS\n\t\t\t$descuento=0;\n\t\t\t\t\t\t\n\t\t\tif($respInsert!=1){\n\t\t\t\t$banderaError=2;\n\t\t\t}\n\t\t\t\n\t\t\t$sqlUpd=\"update ingreso_detalle_almacenes set cantidad_restante=cantidad_restante-$cantidadInsert where \n\t\t\tcod_ingreso_almacen='$codIngreso' and lote='$loteProducto' and cod_material='$codMaterial'\";\n\t\t\t$respUpd=mysqli_query($enlaceCon,$sqlUpd);\n\t\t\t\n\t\t\tif($respUpd!=1){\n\t\t\t\t$banderaError=3;\n\t\t\t}\n\t\t}\n\t}\n\t//recalculaCostos($codMaterial, $cod_almacen);\n\treturn($banderaError);\n}", "title": "" }, { "docid": "36c23869da1d4daf59bdf1cb7253eea6", "score": "0.5921514", "text": "function encabezado($configuracion,$proyecto){\n \n //Busca los periodos/\n $cadena_sql = $this->sql->cadena_sql($configuracion,$this->accesoOracle,'periodo');\n $resultadoPeriodo = $this->ejecutarSQL($configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n //busca el periodo activo\n foreach ($resultadoPeriodo as $key => $value) \n { if($resultadoPeriodo[$key]['ESTADO']=='A')\n {$per_actual=$resultadoPeriodo[$key]['ANIO'].'-'.$resultadoPeriodo[$key]['PERIODO'];}\n }\n //busca datos de la asignatura\n if($_REQUEST['espacio'])\n { $variable=array('proyecto'=>$_REQUEST['proyecto'],\n 'asignatura'=>isset($_REQUEST['espacio'])?$_REQUEST['espacio']:'', \n 'anio'=>isset($_REQUEST['periodo'])?substr($_REQUEST['periodo'],-6,4):substr($per_actual,-6,4), \n 'periodo'=>isset($_REQUEST['periodo'])?substr($_REQUEST['periodo'],-1):substr($per_actual,-1), \n 'tipoBusca'=>is_numeric($_REQUEST['espacio'])?'codigo':'nombre'\n );\n $cadena_sql=$this->sql->cadena_sql($configuracion,$this->accesoOracle, \"consultaAsignatura\", $variable);\n $rsAsignatura=$this->ejecutarSQL($configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n if($rsAsignatura)\n {$totalRegAsig=$this->totalRegistros($configuracion, $this->accesoOracle);}\n else{ //busca asignatura con el periodo activo\n $variable['anio']=substr($per_actual,-6,4);\n $variable['periodo']=substr($per_actual,-1);\n $cadena_sql=$this->sql->cadena_sql($configuracion,$this->accesoOracle, \"consultaAsignatura\", $variable);\n $rsAsignatura=$this->ejecutarSQL($configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n if($rsAsignatura)\n {$totalRegAsig=$this->totalRegistros($configuracion, $this->accesoOracle);}\n else{ $totalRegAsig=0; } \n } \n }\n\n \n\t ?>\n\t <table class=\"tablaBase centrar\">\n\t\t<tr>\n\t\t\t<td colspan=\"6\" class=\"cuadro_plano centrar\"><h3 >\n\t\t\t\tGESTI&Oacute;N DE HORARIOS <BR><BR>\n\t\t\t\tPROYECTO CURRICULAR - <? echo $proyecto[0]['NOMBRE_LARGO'];?></h3>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?\n \n $indice=$configuracion[\"host\"].$configuracion[\"site\"].\"/index.php?\";\n\t\t$ruta=\"pagina=adminConsultaHorarios\";\n $ruta.=\"&opcion=\";\n\t\t$rutainicio=$this->cripto->codificar_url($ruta,$configuracion);\n //enlace crear horario\n\t\t$indice=$configuracion[\"host\"].$configuracion[\"site\"].\"/index.php?\";\n\t\t$ruta=\"pagina=adminConsultaHorarioCurso\";\n\t\t$ruta.=\"&opcion=generar\";\n\t\t$ruta.=\"&item=crear\";\n $ruta.='&proyecto='.$proyecto[0]['CODIGO'];\n if($totalRegAsig==1)\n {$ruta.='&espacio='.$rsAsignatura[0]['COD_ESPACIO'];}\n else{$ruta.='&espacio='.$_REQUEST['espacio'];}\n //para creacion solo se envia el periodo actual\n //$ruta.='&periodo='.$per_actual;\n // permite envia cualquier periodo --\n if(isset($_REQUEST['periodo']))\n {$ruta.='&periodo='.$_REQUEST['periodo'];}\n else {$ruta.='&periodo='.$per_actual;}\n $rutaadd=$this->cripto->codificar_url($ruta,$configuracion);\n //enlace copiar horario\n\t\t$ruta=\"pagina=adminCopiarHorarios\";\n\t\t$ruta.=\"&opcion=copiarHorarios\";\n $ruta.='&proyecto='.$proyecto[0]['CODIGO'];\n\t\t$rutacopia=$this->cripto->codificar_url($ruta,$configuracion);\n\t\t//enlace consultar horario\n\t\t$ruta='pagina=adminConsultaHorarios';\n $ruta.='&opcion=consultarGrupos';\n $ruta.='&tipoConsulta=todos';\n $ruta.='&proyecto='.$proyecto[0]['CODIGO'];\n if(isset($_REQUEST['periodo']))\n {$ruta.='&periodo='.$_REQUEST['periodo'];}\n else {$ruta.='&periodo='.$per_actual;}\n\t\t$rutaconsulta=$this->cripto->codificar_url($ruta,$configuracion);\n \n //enlace reporte horario\n\t\t$ruta='pagina=adminConsultaHorarios';\n $ruta.='&opcion=reporteGrupos';\n $ruta.='&tipoConsulta=todos';\n $ruta.='&proyecto='.$proyecto[0]['CODIGO'];\n if(isset($_REQUEST['periodo']))\n {$ruta.='&periodo='.$_REQUEST['periodo'];}\n else {$ruta.='&periodo='.$per_actual;}\n if($totalRegAsig==1)\n {$ruta.='&espacio='.$rsAsignatura[0]['COD_ESPACIO'];}\n else{$ruta.='&espacio='.$_REQUEST['espacio'];}\n\t\t$rutaReporte=$this->cripto->codificar_url($ruta,$configuracion);\n\n\t\t?>\n \t\t\n\t\t<tr>\n\t\t\t<td class=\"cuadro_plano centrar\">\n\t\t\t\t<a href=\"<?echo $indice.$rutainicio?>\"><img width=\"30\" src=\"<?echo $configuracion['site'].$configuracion['grafico']?>/go-first.png\" alt=\"ir\" border=\"0\"><br>Inicio</a>\n\t\t\t</td>\n <td class=\"cuadro_plano centrar\">\n\t\t\t\t<a href=\"<?echo $indice.$rutacopia?>\"><img width=\"30\"src=\"<?echo $configuracion['site'].$configuracion['grafico']?>/copiarHorario.PNG\" alt=\"copiar\" border=\"0\"><br>Copiar Horario</a>\n\t\t\t</td>\n\t\t\t<td class=\"cuadro_plano centrar\">\n\t\t\t\t<a href=\"<?echo $indice.$rutaadd?>\"><img width=\"30\" src=\"<?echo $configuracion['site'].$configuracion['grafico']?>/addHorario.PNG\" alt=\"add\" border=\"0\"><br>Crear Horario</a>\n\t\t\t</td>\n\t\t\t<td class=\"cuadro_plano centrar\">\t\t\n\t\t\t\t<a href=\"<?echo $indice.$rutaconsulta?>\"><img width=\"30\" src=\"<?echo $configuracion['site'].$configuracion['grafico']?>/verHorario.PNG\" alt=\"ver\" border=\"0\"><br>Listar Horarios</a>\n\t\t\t</td>\n \t\t\t<td class=\"cuadro_plano centrar\">\t\t\n\t\t\t\t<a href=\"<?echo $indice.$rutaReporte?>\"><img width=\"30\" src=\"<?echo $configuracion['site'].$configuracion['grafico']?>/reporte.png\" alt=\"rep\" border=\"0\"><br>Reporte Horarios</a>\n\t\t\t</td>\n\n <td class=\"cuadro_plano centrar\" width=\"60%\" rowspan='2'>\n <!-- <form class=\"centrar\" name=\"busquedaRapida\" id=\"busquedaRapida\">-->\n <? $formulario='admin_consultaHorarios'?>\n \n <form enctype='tipo:multipart/form-data,application/x-www-form-urlencoded,text/plain' method='GET' action='index.php' name='<? echo $formulario?>'> \n <center>\n <table style=\"width:100%\" class=\"formulario contenidotabla centrar\">\n <tr>\n <th colspan=\"2\"><center>BUSQUEDA POR ASIGNATURA:</center></th>\n </tr>\t\t\n <tr>\n <td valign='top'>ASIGNATURA:<br/><br/>\n <input class=\"required\" type=\"text\" name=\"espacio\" id=\"espacio\" value=\"<? if(isset($_REQUEST['espacio'])){echo strtoupper($_REQUEST['espacio']);} ?>\"/>\n <? if(isset($totalRegAsig)){echo '<br>'.$totalRegAsig.' Asignaturas coinciden con la búsqueda';}?>\n </td>\n <td>PERIODO:\n <? for($j=0;$j<count($resultadoPeriodo);$j++){\n $checked=$j==0?'checked':'';\n if(!isset($_REQUEST['periodo']) && $resultadoPeriodo[$j]['ESTADO']=='A')\n {$checked='checked';}\n elseif(isset($_REQUEST['periodo']) && $_REQUEST['periodo']==($resultadoPeriodo[$j]['ANIO'].\"-\".$resultadoPeriodo[$j]['PERIODO']) )\n {$checked='checked';}\n else {$checked='';}\n echo \"<br/><input type='radio' name='periodo' value='\".$resultadoPeriodo[$j]['ANIO'].\"-\".$resultadoPeriodo[$j]['PERIODO'].\"' \".$checked.\" />\";\n if($resultadoPeriodo[$j]['ESTADO']=='A')\n {echo \"<b>\".$resultadoPeriodo[$j]['ANIO'].\"-\".$resultadoPeriodo[$j]['PERIODO'].\"</b>\";}\n else{echo $resultadoPeriodo[$j]['ANIO'].\"-\".$resultadoPeriodo[$j]['PERIODO'];}\n \n }\n ?>\n </td>\n </tr>\n <tr>\n <td valign='middle' width=\"50px\" colspan=\"2\" align='center' >\n <input type='hidden' name='action' value='<? echo $formulario;?>'> \n <input type='hidden' name='tipoConsulta' value='rapida'>\n <input type='hidden' name='opcion' value='buscar'>\n <input type='hidden' name='proyecto' value='<? echo $proyecto[0]['CODIGO'];?>'>\n <input name='buscar' value='Buscar' type='submit'> \n </td>\n </tr>\t\n </table>\n\n </center></form>\n\t\t\t</td>\n\t\t</tr>\n <tr>\n\t\t\t<td colspan=\"5\" align=\"center\">\n <table class=\"tablaMarco\" align=\"center\">\n <tr>\n <td align=\"rigth\">\n\t\t\t\t\t<p><a href=\"https://condor.udistrital.edu.co/appserv/manual/gestion_de_horarios.pdf\">\n\t\t\t\t\t<img border=\"0\" alt=\" \" width=\"20\" src=\"<? echo $configuracion[\"host\"].$configuracion[\"site\"].$configuracion[\"grafico\"].\"/acroread.png\"?>\" />\n\t\t\t\t\tVer Manual de Usuario.</a></p>\n </td>\n\t\t\t\t</tr>\n </table>\n\t\t\t</td>\n\t\t</tr>\n\n\n\t </table>\n\t <?\n }", "title": "" }, { "docid": "a6d6f3a4e52a731359faf22ed4ac4346", "score": "0.59054166", "text": "public function create_referencia($fechaLimite, $registro, $idTramite, $tipoPersona, $otherTypeP){\n\n\t\t $cajaReferencia = new CajaReferencia();\n\n\t\t //Validacion de los digitos del registro segun el tipo de persona\n\t\t if($tipoPersona == 2)\n\t\t {\n\t\t $registroRef = \"00000002\";\n\t\t\t$registro = \"\";\n\t\t }\n\t\t \n\t\t else if($tipoPersona == 4 && $otherTypeP == 1)\n\t\t {\n\t\t $registroRef = \"00000041\";\n\t\t\t$registro = \"\";\n\t\t }\n\t\t\t\n\t\t else\n\t\t {\n\t\t if(strlen($registro) == 3)\n\t\t $registroRef = \"00000\".$registro;\n\t\t\t \n\t\t else if(strlen($registro) == 4)\n\t\t $registroRef = \"0000\".$registro;\n\t\t\t \n\t\t else if(strlen($registro) == 5)\n\t\t $registroRef = \"000\".$registro;\n\t\t\t \n\t\t else if(strlen($registro) == 6)\n\t\t $registroRef = \"00\".$registro;\n\t\t\t\n\t else if(strlen($registro) == 7)\n\t\t $registroRef = \"0\".$registro;\n\t\t\t\n\t\t else\n\t\t $registroRef = $registro;\n\t\t }\n\t\t \n\t\t //Se genera la fecha condesada\n\t\t foreach($fechaLimite AS $valueFecha)\n\t\t {\n\t\t\t//Se genera la fecha condesada\n\t\t\tlist($diaPago,$mesPago,$anioPago) = split(\"-\",$valueFecha);\n\t\t\t \n\t\t\t$anioCondesado = ($anioPago - 1988) * 372;\n\t\t\t$mesCondesado = ($mesPago - 1) * 31;\n\t\t\t$diaCondesado = ($diaPago - 1);\n\t\t\t \n\t\t\t//Se obtiene la fecha condesada\n\t\t\t$fechaCondesada[] = ($anioCondesado + $mesCondesado + $diaCondesado);\n\t\t }\n\t\t\n\t\t $actaExtrasTitulos = Array();\n\t\t //Se obtienen el costo de los conceptos solicitados para posteriormente sacar el importe condesado \n\t\t foreach($idTramite AS $value)\n\t\t { \n\t\t\t//la variable $importe de tipo array guarda el costo de los conceptos solicitados en un arreglo\n\t\t\t$importe = Array();\n\t\t\t$importe = $this -> find_all_by_sql(\"SELECT c.costo, t.actas\n\t\t\t FROM caja_conceptos c\n\t\t\t\t\t\t\t\t\t\t\t\t JOIN caja_tramites t ON t.concepto = c.id\n\t\t\t\t\t\t\t\t\t\t\t\t WHERE t.id = \".$value); \n \n //Obtiene el importe por cada concepto solicitado \t\t\t\n\t\t foreach($importe AS $value)\n\t\t {\n\t\t $importeCon = $value -> costo;\n\t\t\t $importeConcepto = explode(\".\",$importeCon);\n\t\t\t $importeEntero = $importeConcepto[0].$importeConcepto[1];\n\n\t\t\t //Se valida el importe y se obtendra el importe a multiplicar\n\t\t\t if(strlen($importeEntero) == 3)\n\t\t\t $importeMultiplicar = \"00000\".$importeEntero;\n\n\t\t\t else if(strlen($importeEntero) == 4)\n\t\t\t $importeMultiplicar = \"0000\".$importeEntero;\n\n\t\t\t else if(strlen($importeEntero) == 5)\n\t\t\t $importeMultiplicar = \"000\".$importeEntero;\n\t\t\t\t\n\t\t\t else if(strlen($importeEntero) == 6)\n\t\t\t $importeMultiplicar = \"00\".$importeEntero;\n\t\t\t\t\n\t\t\t else if(strlen($importeEntero) == 7)\n\t\t\t $importeMultiplicar = \"0\".$importeEntero;\n\t\t\t\t\n\t\t\t else\n\t\t\t $importeMultiplicar = $importeEntero;\n\t\t\t \n\t\t\t //Esta variable contiene el numero de factor de peso el cual se multiplicara con $importeMultiplicar\n\t\t\t $numFactoPeso = \"37137137\";\n\t\t\t \n\t\t\t //Iniciamos la variable suma en cero\n\t\t\t $suma = 0;\n\t\t\t \n\t\t\t //For que recorre el arreglo y realiza la multipplicacion\n\t\t\t for($i = strlen($importeMultiplicar)-1; $i >= 0; $i--)\n\t\t\t {\n\t\t\t\t//Se realiza la multiplicacion numero x numero\n\t\t\t $numero = substr($importeMultiplicar,$i,1) * substr($numFactoPeso,$i,1);\n\t\t\t\t \n\t\t\t\t//Se realiza la suma con los resultados de la multiplicacion\n\t\t\t\t$suma = $suma + $numero;\n\t\t\t }\n\t\t\t \n\t\t\t //Se obtiene el importe condesado\n\t\t\t $importeCondesado[] = $suma % 10;\n\t\t\t \n\n //Valida el numero de caracterede de extras, titulos y cursos\n\t\t\t if(strlen($value -> actas) == 0)\n\t\t\t\t $actaExtrasTitulos[] = \"00000\";\n\t\t\t\t \n\t\t\t else if(strlen($value -> actas) == 1)\n\t\t\t\t $actaExtrasTitulos[] = \"0000\".$value -> actas;\n\t\t\t\t\t\n\t\t\t else if(strlen($value -> actas) == 2)\n\t\t\t\t $actaExtrasTitulos[] = \"000\".$value -> actas;\n\t\t\t\t\t \n\t\t\t else if(strlen($value -> actas) == 3)\n\t\t\t\t $actaExtrasTitulos[] = \"00\".$value -> actas;\n\t\t\t\t\t \n\t\t\t else if(strlen($value -> actas) == 4)\n\t\t\t\t $actaExtrasTitulos[] = \"0\".$value -> actas;\n\t\t\t\t\t \n\t\t\t /*else if(strlen($value -> actas) == 5)\n\t\t\t\t $actaExtrasTitulos[] = \"0\".$value -> actas;*/\n\t\t\t\t\t \n\t\t\t else\n\t\t\t\t $actaExtrasTitulos[] = $value -> actas;\n\t\t }\n\t\t }\n\n\t\t //Segun el nivel que solicito el concepto es la variable que se utilizara\n\t\t $tecnologo = \"1\";\n\t\t $ingenieria = \"2\";\n\t\t\t \n\t\t //Se declara la variable constante y se le da el valor 2 (EL VALOR NO CAMBIA) \n\t\t $constante = \"2\";\n\t\t\t \n\t\t //Plantel (Colomos - 2 ______ Tonala - 6)\n\t\t $colomos = \"2\";\n\t\t \n\t\t //Numero de factor de peso a multiplicar para obtener el numero verificador\n\t\t //Para 40 digitos $factorPesoDV = \"1713112319171311231917131123191713112319171311231917131123191713112319171311\";\n\t\t $factorPesoDV = \"2319171311231917131123191713112319171311231917131123191713112319171311\"; //Para 37 digitos\n\t\t //Se inicia la variable $sumRef en cero\n\t\t $sumRef = 0;\n\t\t \n\t\t for($i=0; $i < count($idTramite); $i++)\n\t\t {\n\t\t //la variable $consulCon de tipo array guarda el concepto\n\t\t\t$consulCon = Array();\n\t\t\t$consulCon = $this -> find_all_by_sql(\"SELECT concepto\n\t\t\t FROM caja_tramites \n\t\t\t\t\t\t\t\t\t\t\t\t WHERE id = \".$idTramite[$i]); \n\t\t\t\n //Se validan los digitos del id para ser usados para la referencia (debe de ser de 6 digitos)\t\t\t\n\t\t if(strlen($idTramite[$i]) == 1)\n\t\t\t $tramiteRef = \"00000\".$idTramite[$i];\n\n else if(strlen($idTramite[$i]) == 2)\n\t\t\t $tramiteRef = \"0000\".$idTramite[$i];\n\t\t\t\t\n\t\t\telse if(strlen($idTramite[$i]) == 3)\n\t\t\t $tramiteRef = \"000\".$idTramite[$i];\n\t\t\t\t\n\t\t\telse if(strlen($idTramite[$i]) == 4)\n\t\t\t $tramiteRef = \"00\".$idTramite[$i];\n\t\t\t\t \n\t\t\telse if(strlen($idTramite[$i]) == 5)\n\t\t\t $tramiteRef = \"0\".$idTramite[$i];\n\t\t\t\t \n\t\t\telse\n\t\t\t $tramiteRef= $idTramite[$i]; \n\t\t \n\t\t\t\n\t\t\t//Valida la cantidad de caracteres del concepto (debe ser de 3 digitos) y se guarda en un arreglo\n\t\t\tforeach($consulCon AS $key=>$value)\n\t\t {\n\t\t\t if(strlen($value -> concepto) == 1)\n\t\t\t\t$conceptoRef[] = \"00\".$value -> concepto;\n\t\t\t\t \n\t\t\t else if(strlen($value -> concepto) == 2)\n\t\t\t\t$conceptoRef[] = \"0\".$value -> concepto;\n\t\t\t\t \n\t\t\t else if(strlen($value -> concepto) == 3)\n\t\t\t\t$conceptoRef[] = $value -> concepto;\n\t\t\t\t \n\t\t\t /* else\n\t\t\t\t$conceptoRef[] = $value -> concepto;*/\n\t\t\t}\n\n\t\t\t//Periodo que se cursa\n\t\t $periodo = Session::get_data('periodo');\n\t\t\t\n\t\t\t//Se declara la variable que guardara la primera parte de la referencia\n\t\t\t$referencia1[] = $colomos.$tramiteRef.$registroRef.$conceptoRef[$i].$ingenieria.$actaExtrasTitulos[$i].$periodo.$fechaCondesada[$i].$importeCondesado[$i].$constante;\n\n\t\t\t//For que recorre el arrelo y realiza la multipplicacion\n\t\t\tfor($x = strlen($referencia1[$i])-1; $x >= 0; $x--)\n\t\t\t{\n\t\t\t $y = $x+$x;\n\t\t\t //Se realiza la multiplicacion numero x numero\n\t\t\t $numeroRef = substr($referencia1[$i],$x,1) * substr($factorPesoDV,$y,2);\n\t\t\t\t\n\t\t\t //Se realiza la suma con los resultados de la multiplicacion\n\t\t\t $sumRef = $sumRef + $numeroRef;\n\t\t\t}\n\t\t\t\n\t\t\t//Se obtiene el remanente \n\t\t\t$digitoVer[] = ($sumRef % 97) + 1;\n\t\t \n\t\t\t//Se reinicia la variable en cero\n\t\t\t$sumRef = 0;\n\t }\n\n\t\t //For para obtener la $referencia1 \n\t\t for($i=0; $i < count($referencia1); $i++)\n\t\t {\n\t\t //Se valida el digito verificador (debe de ser de 2 digitos)\n\t\t if(strlen($digitoVer[$i]) == 1)\n\t\t\t $digitoVerificador = \"0\".$digitoVer[$i];\n\t\t\t \n\t\t\telse\n\t\t\t $digitoVerificador = $digitoVer[$i];\n\t\t\t\n //Se obtiene la referencia completa\t\t\t\n\t\t\t$referenciaCompleta = $referencia1[$i].$digitoVerificador;\n \n //Se guarda la referencia completa junto con el id del tramite y el registro de quien solicita\n\t\t\t$cajaReferencia -> idTramite = $idTramite[$i];\n\t\t\t$cajaReferencia -> referencia = $referenciaCompleta;\n\t\t\t$cajaReferencia -> registro = $registro;\t\n\t\t\t$cajaReferencia -> create();\t\n\t\t\t\n\t\t //Obtiene el ultimo id insertado\n\t\t\t$idReferencia[] = mysql_insert_id();\n\t\t }\n\t\t $cajaReferencia -> crear_fichaPago_PDF($idReferencia,$fechaLimite,$tipoPersona,$otherTypeP);\n die();\n\t\t}", "title": "" }, { "docid": "5c3aa1e5fbe18bf96f4e6f98c615286d", "score": "0.58933544", "text": "function datosCabeceraFactura(){\r\n\t\t$this->procedimiento='vef.ft_venta_facturacion_exportacion_sel';\r\n\t\t$this->transaccion='VF_FACT_CAB_EXPO_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\t\t$this->setCount(false);\r\n\r\n\t\t$this->setParametro('id_venta','id_venta','integer');\r\n\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('lugar','varchar');\r\n\t\t$this->captura('fecha_literal','varchar');\r\n\t\t$this->captura('nombre_factura','varchar');\r\n\t\t$this->captura('direccion_cliente','varchar');\r\n\t\t$this->captura('nit','varchar');\r\n\t\t$this->captura('incoterm','varchar');\r\n\t\t$this->captura('moneda_venta','varchar');\r\n\t\t$this->captura('tipo_cambio_venta','numeric');\r\n\t\t$this->captura('nro_factura','numeric');\r\n\t\t$this->captura('nro_autorizacion','varchar');\r\n\t\t$this->captura('actividad_economica','varchar');\r\n\t\t$this->captura('codigo_sucursal','varchar');\r\n\t\t$this->captura('nombre_sucursal','varchar');\r\n\t\t$this->captura('direccion_sucursal','varchar');\r\n\t\t$this->captura('telefono_sucursal','varchar');\r\n\t\t$this->captura('lugar_sucursal','varchar');\r\n\r\n\t\t$this->captura('valor_bruto','numeric');\r\n\t\t$this->captura('transporte_fob','numeric');\r\n\t\t$this->captura('seguros_fob','numeric');\r\n\t\t$this->captura('otros_fob','numeric');\r\n\t\t$this->captura('transporte_cif','numeric');\r\n\t\t$this->captura('seguros_cif','numeric');\r\n\t\t$this->captura('otros_cif','numeric');\r\n\t\t$this->captura('codigo','varchar');\r\n\t\t$this->captura('totales_fob','numeric');\r\n\t\t$this->captura('totales_cif','numeric');\r\n\r\n\t\t$this->captura('fecha_limite_dosificacion','varchar');\r\n\t\t$this->captura('cod_control','varchar');\r\n\r\n\t\t$this->captura('glosa_impuestos','varchar');\r\n\t\t$this->captura('glosa_empresa','varchar');\r\n\t\t$this->captura('hora_estimada_entrega','varchar');\r\n\t\t$this->captura('cuenta_cajero','varchar');\r\n\t\t$this->captura('leyenda','varchar');\r\n\t\t$this->captura('id_venta','int4');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\t\t//var_dump(\"aqui llega data\",$this->respuesta);\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "247718b15ab8ff58d2044d403a3fdb8d", "score": "0.5885657", "text": "private function generarCodigoFechaVcto()\r\n\t\t{\r\n\t\t\t$fecha = date('d-m-Y', strtotime($this->_model->fecha));\r\n\r\n\t\t\t// se debe quitar los separadores de la fecha.\r\n\t\t\t// El resultado debe ser una cadena de digito.\r\n\t\t\t$cadena = str_replace(\"-\", \"\", $fecha);\r\n\t\t\t$cadena = str_replace(\"/\", \"\", $cadena);\r\n\r\n\t\t\t$digito = self::getDigitoControlNumero($cadena);\r\n\t\t\t$long = self::getLongitud($cadena);\r\n\r\n\t\t\t$this->_codigoFechaVcto = $digito . $long;\r\n\r\n\t\t}", "title": "" }, { "docid": "b0986e413dc6bfc7e06657d4425a5f0e", "score": "0.5882695", "text": "function genera_descripcion_oc($id_licitacion,$id_producto){\r\r\n global $monto_comprado;\r\r\n$sql=\"select fila.cantidad, oc.nro_orden,fila.id_producto,\r\r\n (fila.precio_unitario * case when oc.id_moneda=1 then 1 else oc.valor_dolar end) as precio_unitario,\r\r\n oc.id_moneda,oc.valor_dolar \r\r\n from licitaciones.licitacion\r\r\n join compras.orden_de_compra oc using (id_licitacion)\r\r\n join compras.fila using(nro_orden)\r\r\n where id_licitacion=$id_licitacion and id_producto=$id_producto\r\r\n and es_agregado=0 and oc.estado<>'n'\";\r\r\n \r\r\n $res=sql($sql) or fin_pagina();\r\r\n $cantidad=0;\r\r\n $datos=array();\r\r\n for($i=0;$i<$res->recordcount();$i++){\r\r\n $datos[]=array(\"nro_orden\"=>$res->fields[\"nro_orden\"],\r\r\n \"cantidad\"=>$res->fields[\"cantidad\"],\r\r\n \"precio_unitario\"=>$res->fields[\"precio_unitario\"],\r\r\n \"valor_dolar\"=>$res->fields[\"valor_dolar\"],\r\r\n );\r\r\n $cantidad+=$res->fields[\"cantidad\"];\r\r\n \r\r\n $monto_comprado+=$res->fields[\"cantidad\"] * $res->fields[\"precio_unitario\"];\r\r\n $res->movenext(); \r\r\n }\r\r\n \r\r\n $datos[\"cantidad\"]=$cantidad;\r\r\n \r\r\nreturn $datos; \r\r\n}", "title": "" }, { "docid": "de4b975519a8960d2514e7ba9d417646", "score": "0.5878609", "text": "function reporteMovmiento(){\n $this->procedimiento = 'pre.ft_presupuesto_ids_sel';\n $this->transaccion = 'PRE_RPM_SEL';\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\n $this->setCount(false);\n $this->setParametro('id_gestion','id_gestion','int4');\n\n //Definicion de la lista del resultado del query\n $this->captura('id_cuenta','int4');//#9\n $this->captura('nro_cuenta','varchar');//#9\n $this->captura('nombre_cuenta', 'varchar');//#9\n $this->captura('id_centro_costo','int4');\n $this->captura('codigo_tcc','varchar');\n $this->captura('descripcion_tcc', 'varchar');\n $this->captura('importe_debe_mb','numeric');//#9\n $this->captura('importe_haber_mb','numeric');//#9\n $this->captura('saldo_mb','numeric');//#9\n $this->captura('importe_debe_mt','numeric');//#9\n $this->captura('importe_haber_mt','numeric');//#9\n $this->captura('saldo_mt','numeric');//#9\n $this->captura('importe_debe_ma','numeric');//#9\n $this->captura('importe_haber_ma','numeric');//#9\n $this->captura('saldo_ma','numeric');//#9\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n // var_dump($this->respuesta); exit;\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "6348766ff43e80b6438dc0ddcd0a0c7b", "score": "0.5873344", "text": "public function InsertarFacturaLibroDiario($Datos){\r\n \r\n $idFact=$Datos[\"ID\"];\t\t\r\n $DatosFactura=$this->DevuelveValores(\"facturas\",\"idFacturas\",$idFact);\r\n $idUsuario=$DatosFactura[\"Usuarios_idUsuarios\"];\r\n $DatosCaja=$this->DevuelveValores(\"cajas\",\"idUsuario\",$idUsuario);\r\n $fecha=$DatosFactura[\"Fecha\"];\t\r\n $CuentaDestino=$Datos[\"CuentaDestino\"];\r\n $DatosCliente=$this->DevuelveValores(\"clientes\",\"idClientes\",$DatosFactura['Clientes_idClientes']);\r\n $idCliente=$DatosFactura['Clientes_idClientes'];\r\n $NIT=$DatosCliente[\"Num_Identificacion\"];\r\n $RazonSocialC=$DatosCliente[\"RazonSocial\"];\r\n $EmpresaPro=$DatosFactura[\"EmpresaPro_idEmpresaPro\"];\r\n $CentroCostos=$DatosFactura[\"CentroCosto\"];\r\n $idSucursal=$DatosFactura[\"idSucursal\"];\r\n $DatosSucursal= $this->DevuelveValores(\"empresa_pro_sucursales\", \"Actual\", $idSucursal);\r\n \t \r\n $tab=\"librodiario\";\r\n $NumRegistros=28;\r\n $Entra=0;\r\n \r\n $Columnas[0]=\"Fecha\";\t\t\t$Valores[0]=$fecha;\r\n\t\t$Columnas[1]=\"Tipo_Documento_Intero\";\t$Valores[1]=\"FACTURA\";\r\n\t\t$Columnas[2]=\"Num_Documento_Interno\";\t$Valores[2]=$idFact;\r\n\t\t$Columnas[3]=\"Tercero_Tipo_Documento\";\t$Valores[3]=$DatosCliente['Tipo_Documento'];\r\n\t\t$Columnas[4]=\"Tercero_Identificacion\";\t$Valores[4]=$NIT;\r\n\t\t$Columnas[5]=\"Tercero_DV\";\t\t$Valores[5]=$DatosCliente['DV'];\r\n\t\t$Columnas[6]=\"Tercero_Primer_Apellido\";\t$Valores[6]=$DatosCliente['Primer_Apellido'];\r\n\t\t$Columnas[7]=\"Tercero_Segundo_Apellido\";$Valores[7]=$DatosCliente['Segundo_Apellido'];\r\n\t\t$Columnas[8]=\"Tercero_Primer_Nombre\";\t$Valores[8]=$DatosCliente['Primer_Nombre'];\r\n\t\t$Columnas[9]=\"Tercero_Otros_Nombres\";\t$Valores[9]=$DatosCliente['Otros_Nombres'];\r\n\t\t$Columnas[10]=\"Tercero_Razon_Social\";\t$Valores[10]=$RazonSocialC;\r\n\t\t$Columnas[11]=\"Tercero_Direccion\"; $Valores[11]=$DatosCliente['Direccion'];\r\n\t\t$Columnas[12]=\"Tercero_Cod_Dpto\";\t$Valores[12]=$DatosCliente['Cod_Dpto'];\r\n\t\t$Columnas[13]=\"Tercero_Cod_Mcipio\";\t$Valores[13]=$DatosCliente['Cod_Mcipio'];\r\n\t\t$Columnas[14]=\"Tercero_Pais_Domicilio\"; $Valores[14]=$DatosCliente['Pais_Domicilio'];\t\t\r\n\t\t$Columnas[15]=\"CuentaPUC\";\t\t$Valores[15]=\"\";\r\n\t\t$Columnas[16]=\"NombreCuenta\";\t\t$Valores[16]=\"\";\r\n\t\t$Columnas[17]=\"Detalle\";\t\t$Valores[17]=\"Ventas\";\r\n\t\t$Columnas[18]=\"Debito\";\t\t\t$Valores[18]=$DatosFactura[\"Total\"];\r\n\t\t$Columnas[19]=\"Credito\";\t\t$Valores[19]=\"0\";\r\n\t\t$Columnas[20]=\"Neto\";\t\t\t$Valores[20]=$Valores[18];\r\n\t\t$Columnas[21]=\"Mayor\";\t\t\t$Valores[21]=\"NO\";\r\n\t\t$Columnas[22]=\"Esp\";\t\t\t$Valores[22]=\"NO\";\r\n\t\t$Columnas[23]=\"Concepto\";\t\t$Valores[23]=\"Ventas\";\r\n\t\t$Columnas[24]=\"idCentroCosto\";\t\t$Valores[24]=$CentroCostos;\r\n\t\t$Columnas[25]=\"idEmpresa\";\t\t$Valores[25]=$EmpresaPro;\r\n $Columnas[26]=\"idSucursal\";\t\t$Valores[26]=$DatosSucursal[\"ID\"];\r\n $Columnas[27]=\"Num_Documento_Externo\"; $Valores[27]=$DatosFactura[\"NumeroFactura\"];\r\n \r\n //Si se paga solo en efectivo\r\n if($DatosFactura['FormaPago']==\"Contado\" and $DatosFactura[\"Tarjetas\"]==0 and $DatosFactura[\"Cheques\"]==0){\r\n $CuentaPUC=$CuentaDestino;\r\n $DatosCuenta=$this->DevuelveValores(\"cuentasfrecuentes\",\"CuentaPUC\",$CuentaPUC);\r\n if($DatosCuenta[\"Nombre\"]==''){\r\n $DatosCuenta=$this->DevuelveValores(\"subcuentas\",\"PUC\",$CuentaPUC); //Si no hay cuentas frecuentes \r\n }\r\n $NombreCuenta=$DatosCuenta[\"Nombre\"];\r\n $NombreCuentaDestino=$NombreCuenta; //se utiliza en caso de haber pagos por otros medios\r\n $Valores[15]=$CuentaPUC;\r\n $Valores[16]=$NombreCuenta;\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores); \r\n \r\n }\r\n \r\n //Si es a credito\r\n if($DatosFactura['FormaPago']<>\"Contado\" and $DatosFactura['FormaPago']<>\"Separado\"){\r\n $Parametros=$this->DevuelveValores(\"parametros_contables\", \"ID\", 6); //Cuenta para Clientes\r\n $CuentaPUC=$Parametros[\"CuentaPUC\"]; //cuenta para bancos\r\n $NombreCuenta=$Parametros[\"NombreCuenta\"];\r\n $Valores[15]=$CuentaPUC;\r\n $Valores[16]=$NombreCuenta;\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores); \r\n \r\n }\r\n \r\n //Si es factura de un separado\r\n if($DatosFactura['FormaPago']==\"Separado\" ){\r\n $Parametros= $this->DevuelveValores(\"parametros_contables\", \"ID\", 20); //parametros de la cuenta para anticipos \r\n $CuentaPUC=$Parametros[\"CuentaPUC\"];\r\n $NombreCuenta=$Parametros[\"NombreCuenta\"];\r\n $Valores[15]=$CuentaPUC;\r\n $Valores[16]=$NombreCuenta;\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores); \r\n }\r\n //Si se paga con tarjeta \r\n \r\n if($DatosFactura['FormaPago']==\"Contado\" and $DatosFactura[\"Tarjetas\"]>0){\r\n \r\n $Parametros=$this->DevuelveValores(\"parametros_contables\", \"ID\", 17);\r\n $CuentaPUC=$Parametros[\"CuentaPUC\"]; //cuenta para bancos\r\n\r\n $NombreCuenta=$Parametros[\"NombreCuenta\"];\r\n\r\n $Valores[15]=$CuentaPUC;\r\n $Valores[16]=$NombreCuenta;\r\n $Valores[18]=$DatosFactura[\"Tarjetas\"];//Debito se escribe el costo de la mercancia vendida\r\n $Valores[19]=\"0\"; \t\t\t\r\n $Valores[20]=$DatosFactura[\"Tarjetas\"]; \t//para la sumatoria contemplar el balance\r\n\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n \r\n \r\n \r\n }\r\n \r\n //Si se paga con cheques hay que debitar bancos \r\n if($DatosFactura['FormaPago']==\"Contado\" and $DatosFactura[\"Cheques\"]>0){\r\n $Entra=1;\r\n $Parametros=$this->DevuelveValores(\"parametros_contables\", \"ID\", 18); //Cuenta de cheques\r\n $CuentaPUC=$Parametros[\"CuentaPUC\"]; \r\n\r\n $NombreCuenta=$Parametros[\"NombreCuenta\"];\r\n\r\n $Valores[15]=$CuentaPUC;\r\n $Valores[16]=$NombreCuenta;\r\n $Valores[18]=$DatosFactura[\"Cheques\"];//Debito se escribe el costo de la mercancia vendida\r\n $Valores[19]=\"0\"; \t\t\t\r\n $Valores[20]=$DatosFactura[\"Cheques\"]; \t//para la sumatoria contemplar el balance\r\n\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n\r\n }\r\n //Calculo la diferencia entre las tarjetas y el efectivo\r\n $TotalOtrasFormasPago=$DatosFactura[\"Tarjetas\"]+$DatosFactura[\"Cheques\"];\r\n if($TotalOtrasFormasPago>0 and $Entra==0){\r\n $Entra=1;\r\n $DiferenciaEfectivo=$DatosFactura[\"Total\"]-$TotalOtrasFormasPago;\r\n $CuentaPUC=$CuentaDestino;\r\n $DatosCuenta=$this->DevuelveValores(\"cuentasfrecuentes\",\"CuentaPUC\",$CuentaPUC);\r\n if($DatosCuenta[\"Nombre\"]==''){\r\n $DatosCuenta=$this->DevuelveValores(\"subcuentas\",\"PUC\",$CuentaPUC); //Si no hay cuentas frecuentes \r\n }\r\n $NombreCuenta=$DatosCuenta[\"Nombre\"];\r\n $NombreCuentaDestino=$NombreCuenta; //se utiliza en caso de haber pagos por otros medios\r\n $Valores[15]=$CuentaDestino;\r\n $Valores[16]=$NombreCuentaDestino;\r\n if($DiferenciaEfectivo>0){\r\n $Valores[18]=$DiferenciaEfectivo;//lo que sobra deberia entrar a la caja\r\n $Valores[19]=\"0\"; \t\t\t\r\n $Valores[20]=$DiferenciaEfectivo; \t//para la sumatoria contemplar el balance\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n }\r\n if($DiferenciaEfectivo<0){\r\n $Valores[18]=0;\r\n $Valores[19]=$DiferenciaEfectivo*(-1); //lo que falte deberia salir de la caja\r\n $Valores[20]=$DiferenciaEfectivo; \t//para la sumatoria contemplar el balance\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n }\r\n\r\n }\r\n \r\n $sql=\"SELECT PorcentajeIVA,CuentaPUC, TipoItem, sum(SubtotalItem) as SubtotalItem,sum(TotalItem) as TotalItem,sum(IVAItem) as IVAItem ,sum(SubtotalCosto) as SubtotalCosto \"\r\n . \"FROM facturas_items WHERE idFactura='$idFact' GROUP BY CuentaPUC, PorcentajeIVA\";\r\n $Consulta=$this->Query($sql);\r\n \r\n while($DatosItems=$this->FetchArray($Consulta)){\r\n \r\n\t\t$Subtotal=round($DatosItems[\"SubtotalItem\"],2);\r\n //$Total=round($DatosItems[\"TotalItem\"],2);\r\n $Impuestos=round($DatosItems[\"IVAItem\"],2);\r\n $Total=$Subtotal+$Impuestos;\r\n $TotalCostosM=$DatosItems[\"SubtotalCosto\"];\r\n\t\t\r\n\t\t\r\n\t\t///////////////////////Registramos ingresos\r\n\t\t\r\n\t\t$CuentaPUC=$DatosItems[\"CuentaPUC\"]; \r\n\t\t$Longitud=strlen($CuentaPUC);\r\n if($Longitud>4){\r\n $TablaCuenta=\"subcuentas\";\r\n $idTablaCuenta=\"PUC\";\r\n }else{\r\n $TablaCuenta=\"cuentas\";\r\n $idTablaCuenta=\"idPUC\";\r\n }\r\n\t\t$DatosCuenta=$this->DevuelveValores($TablaCuenta,$idTablaCuenta,$CuentaPUC);\r\n\t\t$NombreCuenta=$DatosCuenta[\"Nombre\"];\r\n\t\t\r\n\t\t$Valores[15]=$CuentaPUC;\r\n\t\t$Valores[16]=$NombreCuenta;\r\n\t\t$Valores[18]=\"0\";\r\n\t\t$Valores[19]=$Subtotal;\r\n\t\t$Valores[20]=$Valores[19]*(-1); \t\t\t\t\t\t\t\t\t\t\t//Credito se escribe el total de la venta menos los impuestos\r\n\t\t\r\n\t\t$this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n\t\t\r\n\t\t///////////////////////Registramos IVA Generado si aplica\r\n\t\t\r\n\t\tif($Impuestos<>0){\r\n $TipoIVA=str_replace(\"%\", \"\", $DatosItems[\"PorcentajeIVA\"]);\r\n $TipoIVA=str_pad($TipoIVA, 2, \"0\", STR_PAD_LEFT);\r\n $TipoIVA=\"0.\".$TipoIVA;\r\n $DatosIVA=$this->DevuelveValores(\"porcentajes_iva\", \"Valor\", $TipoIVA);\r\n $CuentaPUC=$DatosIVA[\"CuentaPUCIVAGenerado\"]; // IVA Generado\r\n \r\n $NombreCuenta=$DatosIVA[\"NombreCuenta\"];\r\n\r\n $Valores[15]=$CuentaPUC;\r\n $Valores[16]=$NombreCuenta;\r\n $Valores[18]=\"0\";\r\n $Valores[19]=$Impuestos; \t\t\t//Credito se escribe el total de la venta\r\n $Valores[20]=$Valores[19]*(-1); \t//para la sumatoria contemplar el balance\r\n\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n\t\t\r\n\t\t}\r\n\t\t\t\t\t\r\n \r\n ///////////////////////Ajustamos el inventario\r\n\r\n if($DatosItems[\"TipoItem\"]==\"PR\"){\r\n $Parametros=$this->DevuelveValores(\"parametros_contables\", \"ID\", 2);\r\n $CuentaPUC=$Parametros[\"CuentaPUC\"]; //6135 costo de mercancia vendida\r\n \r\n $NombreCuenta=$Parametros[\"NombreCuenta\"];\r\n\r\n $Valores[15]=$CuentaPUC;\r\n $Valores[16]=$NombreCuenta;\r\n $Valores[18]=$TotalCostosM;//Debito se escribe el costo de la mercancia vendida\r\n $Valores[19]=\"0\"; \t\t\t\r\n $Valores[20]=$TotalCostosM; \t//para la sumatoria contemplar el balance\r\n\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n\r\n ///////////////////////Ajustamos el inventario\r\n $Parametros=$this->DevuelveValores(\"parametros_contables\", \"ID\", 4);\r\n $CuentaPUC=$Parametros[\"CuentaPUC\"]; //1435 Mercancias no fabricadas por la empresa\r\n\r\n //$DatosCuenta=$this->DevuelveValores('cuentas',\"idPUC\",$CuentaPUC);\r\n $NombreCuenta=$Parametros[\"NombreCuenta\"];\r\n\r\n $Valores[15]=$CuentaPUC;\r\n $Valores[16]=$NombreCuenta;\r\n $Valores[18]=\"0\";\r\n $Valores[19]=$TotalCostosM;//Credito se escribe el costo de la mercancia vendida\t\t\t\r\n $Valores[20]=$TotalCostosM*(-1); \t//para la sumatoria contemplar el balance\r\n\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n\r\n }\r\n\r\n }\r\n \r\n\r\n\r\n\r\n }", "title": "" }, { "docid": "806cdcaf314713d259cff12aa0dd3bbc", "score": "0.58698696", "text": "function genera_descripcion_pm($id_licitacion,$id_tipo_prod)\r\r\n{\r\r\n \r\r\n $sql=\"select dm.cantidad,pe.descripcion,mm.id_movimiento_material \r\r\n from mov_material.movimiento_material mm\r\r\n join mov_material.detalle_movimiento dm using(id_movimiento_material)\r\r\n join general.producto_especifico pe using(id_prod_esp)\r\r\n where mm.estado<>3 and id_licitacion=$id_licitacion and pe.id_tipo_prod=$id_tipo_prod\r\r\n and es_pedido_material=1\";\r\r\n \r\r\n $res=sql($sql) or fin_pagina();\r\r\n $cantidad=0;\r\r\n $datos=array();\r\r\n\r\r\n for($i=0;$i<$res->recordcount();$i++){\r\r\n \r\r\n $datos[]=array(\"id_movimiento_material\"=>$res->fields[\"id_movimiento_material\"],\r\r\n \"cantidad\"=>$res->fields[\"cantidad\"]);\r\r\n \r\r\n $cantidad+=$res->fields[\"cantidad\"];\r\r\n $res->movenext(); \r\r\n }\r\r\n \r\r\n $datos[\"cantidad\"]=$cantidad; \r\r\nreturn $datos; \r\r\n}", "title": "" }, { "docid": "5d265c67aec52cbd4e1227e22b81fff2", "score": "0.5869258", "text": "public function modificarOrden($idf, $pares, $lug, $fecd, $hord, $caud, $lud, $panv, $hov, $ubv, $fev, $igv, $prpv, $tempv, $horv, $ate, $mode, $ure, $modee, $cae, $creme, $eme, $otre, $adoe, $luge, $care, $trase, $sube, $ime, $cere, $ote, $obe, $tote, $nomf, $domfin, $ciu, $fechf, $edf, $apf, $nuf, $colf, $ecf, $escf, $apmf, $naf, $ocf, $dhf, $sef, $nev, $apav, $apmae, $fede, $abono) {\n $res=$tote-$abono;\n $datos = array(\n \n// 'FechaOrden' => $fec,\n// 'Solicitantes_idSolicitantes' => $soli,\n// 'Sucursal_idSucursal' => $suc,\n// 'PersonaAtendio' => $pers,\n 'Parentesco' =>$pares,\n 'LugarDifuncion' => $lug,\n 'Fecha' => $fecd,\n 'Hora' => $hord,\n 'Causa' => $caud,\n 'LugarVelacion' => $lud,\n 'Panteon' => $panv,\n 'HoraMisa' => $hov,\n 'Ubicacion' => $ubv,\n 'FechaMisa' => $fev,\n 'Iglesia' => $igv,\n 'Perpetuidad' => $prpv,\n 'Temporal' => $tempv,\n 'HoraSepelio' => $horv,\n 'Ataud' => $ate,\n 'ModeloAtaud' => $mode,\n 'Urna' => $ure,\n 'ModeloUrna' => $modee,\n 'Capillas' => $cae,\n 'Cremacion' => $creme,\n 'Embalsamado' => $eme,\n 'OtrosGastos' => $otre,\n 'Adomicilio' => $adoe,\n 'LugarCremacion' => $luge,\n 'Carroza' => $care,\n 'Traslado' => $trase,\n 'SubTotal' => $sube,\n 'Impuestos' => $ime,\n 'CertificadoMedico' => $cere,\n 'Otros' => $ote,\n 'Observaciones' => $obe,\n 'Total' => $tote,\n 'NombreFinado' => $nomf,\n 'ApellidoFinPa' => $apf,\n 'ApellidoFinMa' => $apmf,\n 'DomicilioFinado' => $domfin,\n 'NumeroFinado' => $nuf,\n 'Nacionalidad' => $naf,\n 'CiudadFinado' => $ciu,\n 'ColoniaFinado' => $colf,\n 'Ocupacion' => $ocf,\n 'FechaNacimiento' => $fechf,\n 'EstadoCivil' => $ecf,\n 'DerechoHabiente' => $dhf,\n 'Edad' => $edf,\n 'Escolaridad' => $escf,\n 'Sexo' => $sef,\n 'NombreFinExhumar' => $nev,\n 'ApellidoPaterno' => $apav,\n 'ApellidoMaterno' => $apmae,\n 'FechaDifuncionExhumar' => $fede,\n 'Restante' => $res\n );\n\n $this->db->where('Folio', $idf);\n $this->db->update('orden', $datos);\n \n }", "title": "" }, { "docid": "5b0164c80bd8f2c612649e5a0237fd5d", "score": "0.5853912", "text": "public function aviso_fecha(){\r\n Utils::isIdentity();\r\n $empleado_id=$_SESSION['identity']->id;\r\n $aviso=new Aviso(); \r\n //sacar los registros del empleado\r\n $aviso->setEmpleado_id($empleado_id);\r\n $avisos=$aviso->getAllByUser();\r\n //var_dump($registro); \r\n require_once 'vistas/empleado/historial.php'; \r\n }", "title": "" }, { "docid": "56340a334b8a058a0b8640070e5d1220", "score": "0.58514714", "text": "function listarFacturaDescripcion(){\r\n\t\t$this->procedimiento='vef.ft_venta_facturacion_sel';\r\n\t\t$this->transaccion='VF_REDESCRIP_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\t\t$this->setCount(false);\r\n\r\n\t\t//$this->setParametro('id_venta','id_venta','integer');\r\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','integer');\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('nombre','varchar');\r\n\t\t$this->captura('columna','numeric');\r\n\t\t$this->captura('fila','numeric');\r\n\t\t$this->captura('valor','varchar');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "03f4eb14d1e35067a51025d899686359", "score": "0.584387", "text": "function recordLog($registro, $accion, $fecha){\n \n\t\t $logCaja = new LogCaja();\n\n $logCaja -> usuario = $registro;\t\n $logCaja -> accion = $accion;\t\n $logCaja -> fecha_accion = $fecha;\t\n\t\t $logCaja -> create();\n\t\t}", "title": "" }, { "docid": "cb3fd602a9b8aeed7a8ab6d8ca20afc2", "score": "0.58425", "text": "function modificarLiquiFormaPago(){\n $this->procedimiento='decr.ft_liqui_forma_pago_ime';\n $this->transaccion='DECR_TLP_MOD';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_liqui_forma_pago','id_liqui_forma_pago','int4');\n $this->setParametro('estado_reg','estado_reg','varchar');\n $this->setParametro('id_liquidacion','id_liquidacion','int4');\n $this->setParametro('id_medio_pago','id_medio_pago','int4');\n $this->setParametro('id_auxiliar','id_auxiliar','int4');\n $this->setParametro('pais','pais','varchar');\n $this->setParametro('ciudad','ciudad','varchar');\n $this->setParametro('fac_reporte','fac_reporte','varchar');\n $this->setParametro('cod_est','cod_est','varchar');\n $this->setParametro('lote','lote','varchar');\n $this->setParametro('comprobante','comprobante','varchar');\n $this->setParametro('fecha_tarjeta','fecha_tarjeta','date');\n $this->setParametro('nro_tarjeta','nro_tarjeta','varchar');\n $this->setParametro('importe','importe','numeric');\n $this->setParametro('nro_documento_pago','nro_documento_pago','varchar');\n $this->setParametro('nombre','nombre','varchar');\n $this->setParametro('administradora','administradora','varchar');\n\n $this->setParametro('autorizacion','autorizacion','varchar');\n $this->setParametro('fecha_cierre','fecha_cierre','date');\n $this->setParametro('nro_terminal','nro_terminal','varchar');\n $this->setParametro('nombre_comercio','nombre_comercio','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "04ee5d2e6c827596ee3e981267dd7bb4", "score": "0.58396184", "text": "function generarConformidad(){\n $this->procedimiento='tes.f_plan_pago_ime';\n $this->transaccion='TES_GENCONF_IME';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_plan_pago','id_plan_pago','int4');\n $this->setParametro('conformidad','conformidad','text');\n $this->setParametro('fecha_conformidad','fecha_conformidad','date');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "dcc78dbbf3176bae1e77521fe3a7684d", "score": "0.5834329", "text": "function cambiarRevision(){\r\n $this->procedimiento='mat.ft_cotizacion_detalle_ime';\r\n $this->transaccion='MAT_CDE_REV';\r\n $this->tipo_procedimiento='IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_cotizacion_det','id_cotizacion_det','int4');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "494516ad8be059d3751f65c27cef6c1a", "score": "0.5832987", "text": "public function guardarNuevo(){ \n $ggral = new Application_Model_DbTable_GerenciaGeneralCoordinacion();\n $nrotrab = $this->getValue(self::E_RESPONSABLE); \n $tpgcia = $this->getValue(self::E_TPGCIA);\n $gggral = null;\n $ggcosto = null; \n $trabajador = Fmo_Model_Personal::findOneByFicha($nrotrab); \n $usuario = $trabajador->{Fmo_Model_Personal::SIGLADO}; \n if ($usuario== null){\n $usuario = 'N/A';\n }\n \n \n if ($tpgcia == 2) {\n $descri= trim($this->getValue(self::E_COORD));\n } else{\n $descri = $this->getElement(self::E_CENTRO_COSTO)->getMultiOption($this->getValue(self::E_CENTRO_COSTO));\n $ggcosto = trim($this->getValue(self::E_CENTRO_COSTO));\n $gggral = substr($this->getValue(self::E_CENTRO_COSTO),-5,2);\n }\n //Guarda Gerencia o Coordinacion \n $registro = $ggral->createRow(); \n $idnew = $registro->id;\n $registro->gga_ggral = $gggral;\n $registro->gga_costo = $ggcosto ;\n $registro->descripcion = $descri; \n $registro->cedula = $trabajador->{Fmo_Model_Personal::CEDULA};//$this->getValue(self::E_CEDULA);\n $registro->siglas = $this->getValue(self::E_SIGLAS); \n $registro->usuario_responsable= $usuario;\n $registro->tipo_gerencia = $this->getValue(self::E_TPGCIA); \n $registro->save();\n \n Fmo_Logger::debug($registro->toArray());\n }", "title": "" }, { "docid": "4a987d45b9f1ca246c6a0bd292c0ed88", "score": "0.58280885", "text": "public function listarConsultas($CONTRATO)\n {\n try\n {\n date_default_timezone_set(\"America/Mexico_city\");\n $dao=new ConsultasDAO();\n $lista= $dao->listarConsultas($CONTRATO);\n $hoy = new Datetime();\n\t $al = strftime(\"%d - %B - %y\");\n $hoy = new Datetime($al);\n foreach($lista as $key=>$value)\n {\n // $dias = 0;\n // if($value[\"fecha_inicio\"] != \"0000-00-00\")\n // {\n $fecha_inicio = new Datetime($value[\"fecha_inicio\"]);\n $frecuencia = $value[\"frecuencia\"];\n \n if($frecuencia == \"DIARIO\")\n {\n $dias = strtotime(strftime(\"%d-%B-%y\",$hoy -> getTimestamp())) - strtotime(strftime(\"%d-%B-%y\",$fecha_inicio -> getTimestamp()));\n $diario = $dias / 86400;\n // $lista[$key][\"CANTIDAD_REALIZAR\"] = $year;\n $lista[$key][\"evidencias_realizar\"] = $diario+1;\n }\n\n if($frecuencia == \"SEMANAL\")\n {\n $dias = strtotime(strftime(\"%d-%B-%y\",$hoy -> getTimestamp())) - strtotime(strftime(\"%d-%B-%y\",$fecha_inicio -> getTimestamp()));\n $dias = $dias / 86400;\n $semanas = $dias/7;\n $lista[$key][\"evidencias_realizar\"] = floor($semanas);\n }\n\n if($frecuencia == \"MENSUAL\")\n {\n $cantidad_a_realizar = 0;\n $dias = strtotime(strftime(\"%d-%B-%y\",$hoy -> getTimestamp())) - strtotime(strftime(\"%d-%B-%y\",$fecha_inicio -> getTimestamp()));\n $dias = $dias / 86400;\n $mesInicio = strftime(\"%m\",$fecha_inicio->getTimestamp());\n $yearInicio = strftime(\"%Y\",$fecha_inicio->getTimestamp());\n $finWhile=true;\n while($finWhile)\n {\n $mensual = cal_days_in_month(CAL_GREGORIAN,$mesInicio,$yearInicio);\n if($mesInicio==12)\n {\n $mesInicio=0;\n $yearInicio++;\n }\n if($dias > 0)\n {\n $cantidad_a_realizar++;\n }\n if($dias < 0)\n {\n $finWhile=false;\n }\n if($dias == 0)\n {\n $finWhile=false;\n $cantidad_a_realizar++;\n }\n $mesInicio++;\n $dias = $dias - $mensual;\n };\n $lista[$key][\"evidencias_realizar\"] = $cantidad_a_realizar;\n }\n\n if($frecuencia == \"BIMESTRAL\")\n {\n $cantidad_a_realizar = 0;\n $dias = strtotime(strftime(\"%d-%B-%y\",$hoy -> getTimestamp())) - strtotime(strftime(\"%d-%B-%y\",$fecha_inicio -> getTimestamp()));\n $dias = $dias / 86400;\n $mesInicio = strftime(\"%m\",$fecha_inicio->getTimestamp());\n $yearInicio = strftime(\"%Y\",$fecha_inicio->getTimestamp());\n $finWhile=true;\n while($finWhile)\n {\n $mensual = cal_days_in_month(CAL_GREGORIAN,$mesInicio,$yearInicio);\n $mensual = $mensual + cal_days_in_month(CAL_GREGORIAN,$mesInicio+1,$yearInicio);\n\n if($mesInicio==11)\n {\n $mesInicio=-1;\n $yearInicio++;\n }\n else\n {\n if($mesInicio==12)\n {\n $mesInicio=0;\n $yearInicio++;\n }\n }\n if($dias > 0)\n {\n $cantidad_a_realizar++;\n }\n if($dias < 0)\n {\n $finWhile=false;\n }\n if($dias == 0)\n {\n $finWhile=false;\n $cantidad_a_realizar++;\n }\n $mesInicio+=2;\n $dias = $dias - $mensual;\n };\n $lista[$key][\"evidencias_realizar\"] = $cantidad_a_realizar;\n }\n\n if($frecuencia == \"ANUAL\")\n {\n $cantidad_a_realizar = 1;\n $yearInicio = strftime(\"%Y\",$fecha_inicio->getTimestamp());\n $yearHoy = strftime(\"%Y\",$hoy->getTimestamp());\n // $diasInicio = strftime(\"%d\",$fecha_inicio->getTimestamp());\n // $diasHoy = strftime(\"%d\",$hoy->getTimestamp());\n // if($diasInicio < $diasHoy)\n // {\n // $cantidad_a_realizar++;\n // $yearInicio++;\n // }\n // if($diasInicio == $diasHoy)\n // {\n // $cantidad_a_realizar++;\n // }\n $finWhile=true;\n while($finWhile)\n {\n if($yearInicio >= $yearHoy)\n {\n $finWhile=false;\n }\n else\n {\n $yearInicio++;\n $cantidad_a_realizar++;\n }\n }\n $lista[$key][\"evidencias_realizar\"] = $cantidad_a_realizar;\n // echo $diasInicio.\"\\n\";\n // echo $diasHoy.\"\\n\";\n // echo $yearInicio.\"\\n\";\n // echo $yearHoy.\"\\n\";\n // echo $cantidad_a_realizar.\"\\n\";\n }\n\n if($frecuencia == \"INDEFINIDO\")\n {\n $lista[$key][\"evidencias_realizar\"] = -1;\n }\n\n if($frecuencia == \"POR EVENTO\")\n {\n $lista[$key][\"evidencias_realizar\"] = -1;\n }\n // }\n // else\n // {\n // $lista[$key][\"evidencias_realizar\"] = \"X\";\n // }\n \n if($value[\"id_registro\"]==null)\n {\n $lista[$key][\"evidencias_realizar\"] = \"X\";\n }\n\n if($lista[$key][\"evidencias_realizar\"]==0)\n $lista[$key][\"cumplimiento_evidencias\"] = 100;\n\n if($lista[$key][\"evidencias_realizar\"]>0)\n $lista[$key][\"cumplimiento_evidencias\"] = ($lista[$key][\"evidencias_validadas\"]/$lista[$key][\"evidencias_realizar\"])*100;\n\n if($lista[$key][\"evidencias_realizar\"]==-1)\n {\n if( $lista[$key][\"evidencias_totales\"] == $lista[$key][\"evidencias_validadas\"] && $lista[$key][\"evidencias_totales\"]>0)\n $lista[$key][\"cumplimiento_evidencias\"] = 100;\n else\n if( $lista[$key][\"evidencias_totales\"]>0 )\n {\n $lista[$key][\"cumplimiento_evidencias\"] = ($lista[$key][\"evidencias_validadas\"]/$lista[$key][\"evidencias_totales\"])*100;\n }\n else\n $lista[$key][\"cumplimiento_evidencias\"] = 0;\n }\n\n if($lista[$key][\"evidencias_realizar\"]==\"X\")\n $lista[$key][\"cumplimiento_evidencias\"] = \"X\";\n }\n // var_dump($lista);\n return $lista;\n } catch (Exception $ex)\n {\n throw $ex;\n return-1;\n }\n }", "title": "" }, { "docid": "3eebb6cc0eb174606caba7362aa40abb", "score": "0.5820628", "text": "function modificarCabeceraExportacion(){\r\n\t\t$this->procedimiento='vef.ft_venta_facturacion_exportacion_ime';\r\n\t\t$this->transaccion='VF_FACTEXPOR_MOD';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_venta','id_venta','int4');\r\n\t\t$this->setParametro('id_cliente','id_cliente','varchar');\r\n\t\t$this->setParametro('observaciones','observaciones','text');\r\n\t\t$this->setParametro('nombre_factura','nombre_factura','varchar');\r\n\t\t$this->setParametro('nit','nit','varchar');\r\n\t\t$this->setParametro('id_formula','id_formula','int4');\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "63ed77b32404965a9ce5a295f7c484b3", "score": "0.58191496", "text": "public static function setLogPersonal(){ \n return Database::executeRow('INSERT INTO bitacora_personal(id_personal,id_funcion,descripcion,detalle_request,fecha)\n VALUES (?,?,?,?,(SELECT now()))',self::getParamsForQuery());\n }", "title": "" }, { "docid": "3a929750c70716dadd8be430ee71aa16", "score": "0.58180743", "text": "function insertarCabeceraExportacion(){\r\n\t\t$this->procedimiento='vef.ft_venta_facturacion_exportacion_ime';\r\n\t\t$this->transaccion='VF_FACTEXPOR_INS';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_cliente','id_cliente','varchar');\r\n\t\t$this->setParametro('id_punto_venta','id_punto_venta','int4');\r\n\t\t$this->setParametro('id_sucursal','id_sucursal','int4');\r\n\t\t$this->setParametro('id_usuario_cajero','id_usuario_cajero','int4');\r\n\t\t$this->setParametro('cod_control','cod_control','varchar');\r\n\t\t$this->setParametro('estado','estado','varchar');\r\n\t\t$this->setParametro('nro_factura','nro_factura','int4');\r\n\t\t$this->setParametro('observaciones','observaciones','text');\r\n\t\t$this->setParametro('id_moneda_venta','id_moneda_venta','int4');\r\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\r\n\t\t$this->setParametro('tipo_cambio','tipo_cambio','numeric');\r\n\t\t$this->setParametro('nombre_factura','nombre_factura','varchar');\r\n\t\t$this->setParametro('nit','nit','varchar');\r\n\t\t$this->setParametro('direccion_cliente','direccion_cliente','varchar');\r\n\t\t$this->setParametro('id_formula','id_formula','integer');\r\n\t\t$this->setParametro('tipo_factura','tipo_factura','varchar');\r\n\t\t//$this->setParametro('nombre_factura','nombre_factura','varchar');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "9d7ecd826bd5e94e706a3b79a218ed69", "score": "0.58172613", "text": "public function RegFactLibroDiario($NumFact,$CuentaDestino,$CuentaIngresos,$TablaCuentaIngreso,$CuentaIVAGen, $TablaIVAGen, $CuentaCostoMercancia,$CuentaInventarios,$AjustaInventario,$RegCREE){\r\n\r\n \r\n\r\n $DatosFactura=$this->DevuelveValores(\"facturas\",\"idFacturas\",$NumFact);\r\n $fecha=\t$DatosFactura[\"Fecha\"];\t\r\n $idFact=$DatosFactura[\"idFacturas\"];\r\n $TotalVenta=$DatosFactura[\"Total\"];\r\n $Subtotal=$DatosFactura[\"Subtotal\"];\r\n $Impuestos=$DatosFactura[\"IVA\"];\r\n $TotalCostosM=$DatosFactura[\"TotalCostos\"];\r\n\r\n\r\n $DatosCliente=$this->DevuelveValores(\"clientes\",\"idClientes\",$DatosFactura['Clientes_idClientes']);\r\n $idCliente=$DatosFactura['Clientes_idClientes'];\r\n $NIT=$DatosCliente[\"Num_Identificacion\"];\r\n $RazonSocialC=$DatosCliente[\"RazonSocial\"];\r\n\r\n $tab=\"librodiario\";\r\n $NumRegistros=24;\r\n\r\n if($DatosFactura['FormaPago']==\"Contado\"){\r\n $CuentaPUC=$CuentaDestino;\r\n $DatosCuenta=$this->DevuelveValores(\"cuentasfrecuentes\",\"CuentaPUC\",$CuentaPUC);\r\n\r\n $NombreCuenta=$DatosCuenta[\"Nombre\"];\r\n }else{\t\r\n $CuentaPUC=\"130505\";\r\n $NombreCuenta=\"Clientes Nacionales $RazonSocialC NIT $NIT\";\r\n }\r\n\r\n\r\n $Columnas[0]=\"Fecha\";\t\t\t\t\t$Valores[0]=$fecha;\r\n $Columnas[1]=\"Tipo_Documento_Intero\";\t$Valores[1]=\"FACTURA\";\r\n $Columnas[2]=\"Num_Documento_Interno\";\t$Valores[2]=$idFact;\r\n $Columnas[3]=\"Tercero_Tipo_Documento\";\t$Valores[3]=$DatosCliente['Tipo_Documento'];\r\n $Columnas[4]=\"Tercero_Identificacion\";\t$Valores[4]=$NIT;\r\n $Columnas[5]=\"Tercero_DV\";\t\t\t\t$Valores[5]=$DatosCliente['DV'];\r\n $Columnas[6]=\"Tercero_Primer_Apellido\";\t$Valores[6]=$DatosCliente['Primer_Apellido'];\r\n $Columnas[7]=\"Tercero_Segundo_Apellido\";$Valores[7]=$DatosCliente['Segundo_Apellido'];\r\n $Columnas[8]=\"Tercero_Primer_Nombre\";\t$Valores[8]=$DatosCliente['Primer_Nombre'];\r\n $Columnas[9]=\"Tercero_Otros_Nombres\";\t$Valores[9]=$DatosCliente['Otros_Nombres'];\r\n $Columnas[10]=\"Tercero_Razon_Social\";\t$Valores[10]=$RazonSocialC;\r\n $Columnas[11]=\"Tercero_Direccion\";\t\t$Valores[11]=$DatosCliente['Direccion'];\r\n $Columnas[12]=\"Tercero_Cod_Dpto\";\t\t$Valores[12]=$DatosCliente['Cod_Dpto'];\r\n $Columnas[13]=\"Tercero_Cod_Mcipio\";\t\t$Valores[13]=$DatosCliente['Cod_Mcipio'];\r\n $Columnas[14]=\"Tercero_Pais_Domicilio\"; $Valores[14]=$DatosCliente['Pais_Domicilio'];\r\n\r\n $Columnas[15]=\"CuentaPUC\";\t\t\t\t$Valores[15]=$CuentaPUC;\r\n $Columnas[16]=\"NombreCuenta\";\t\t\t$Valores[16]=$NombreCuenta;\r\n $Columnas[17]=\"Detalle\";\t\t\t\t$Valores[17]=\"ventas\";\r\n $Columnas[18]=\"Debito\";\t\t\t\t\t$Valores[18]=$TotalVenta;\r\n $Columnas[19]=\"Credito\";\t\t\t\t$Valores[19]=\"0\";\r\n $Columnas[20]=\"Neto\";\t\t\t\t\t$Valores[20]=$Valores[18];\r\n $Columnas[21]=\"Mayor\";\t\t\t\t\t$Valores[21]=\"NO\";\r\n $Columnas[22]=\"Esp\";\t\t\t\t\t$Valores[22]=\"NO\";\r\n $Columnas[23]=\"Concepto\";\t\t\t\t$Valores[23]=\"Ventas Por Atn Admin\";\r\n\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n\r\n\r\n ///////////////////////Registramos ingresos\r\n\r\n $CuentaPUC=$CuentaIngresos; //4135 comercio al por menor y mayor\r\n\r\n $DatosCuenta=$this->DevuelveValores($TablaCuentaIngreso,\"idPUC\",$CuentaPUC);\r\n $NombreCuenta=$DatosCuenta[\"Nombre\"];\r\n\r\n $Valores[15]=$CuentaPUC;\r\n $Valores[16]=$NombreCuenta;\r\n $Valores[18]=\"0\";\r\n $Valores[19]=$Subtotal; \t\t\t//Credito se escribe el total de la venta menos los impuestos\r\n $Valores[20]=$Valores[19]*(-1); \t\t\t\t\t\t\t\t\t\t\t//Credito se escribe el total de la venta menos los impuestos\r\n\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n\r\n ///////////////////////Registramos IVA Generado si aplica\r\n\r\n if($Impuestos<>0){\r\n\r\n $CuentaPUC=$CuentaIVAGen; //2408 IVA Generado\r\n\r\n $DatosCuenta=$this->DevuelveValores($TablaIVAGen,\"idPUC\",$CuentaPUC);\r\n\r\n $NombreCuenta=$DatosCuenta[\"Nombre\"];\r\n\r\n $Valores[15]=$CuentaPUC;\r\n $Valores[16]=$NombreCuenta;\r\n $Valores[18]=\"0\";\r\n $Valores[19]=round($Impuestos); \t\t\t//Credito se escribe el total de la venta\r\n $Valores[20]=$Valores[19]*(-1); \t//para la sumatoria contemplar el balance\r\n\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n\r\n }\r\n\r\n\r\n ///////////////////////////////////////////////////////////////\r\n ////////////Registramos Autoretencion\r\n if($RegCREE==\"SI\"){\r\n\r\n $CREE=$this->DevuelveValores(\"impret\",\"Nombre\",\"CREE\");\r\n\r\n $ValorCREE=round($Subtotal*$CREE['Valor']);\r\n\r\n $CuentaPUC=135595; // Autorretenciones CREE\r\n\r\n $DatosCuenta=$this->DevuelveValores(\"subcuentas\",\"PUC\",$CuentaPUC);\r\n $NombreCuenta=$DatosCuenta[\"Nombre\"];\r\n\r\n $Valores[15]=$CuentaPUC;\r\n $Valores[16]=$NombreCuenta;\r\n $Valores[18]=$ValorCREE; //Valor del CREE\r\n $Valores[19]=0; \t\t\t\r\n $Valores[20]=$ValorCREE; \t//para la sumatoria contemplar el balance\r\n\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n\r\n ///////////////////////////////////////////////////////////////\r\n ////////////contra partida de la Autoretencion\r\n\r\n $CuentaPUC=23657502; // Cuentas por pagar Autorretenciones CREE\r\n\r\n $DatosCuenta=$this->DevuelveValores(\"subcuentas\",\"PUC\",$CuentaPUC);\r\n $NombreCuenta=$DatosCuenta[\"Nombre\"];\r\n\r\n $Valores[15]=$CuentaPUC;\r\n $Valores[16]=$NombreCuenta;\r\n $Valores[18]=0; //Valor del CREE\r\n $Valores[19]=$ValorCREE; \t\t\t\r\n $Valores[20]=$ValorCREE*(-1); \t//para la sumatoria contemplar el balance\r\n\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n\r\n }\r\n\r\n ///////////////////////Ajustamos el inventario\r\n\r\n if($AjustaInventario==\"SI\"){\r\n\r\n $CuentaPUC=$CuentaCostoMercancia; //6135 costo de mercancia vendida\r\n\r\n $DatosCuenta=$this->DevuelveValores('cuentas',\"idPUC\",$CuentaPUC);\r\n $NombreCuenta=$DatosCuenta[\"Nombre\"];\r\n\r\n $Valores[15]=$CuentaPUC;\r\n $Valores[16]=$NombreCuenta;\r\n $Valores[18]=$TotalCostosM;//Debito se escribe el costo de la mercancia vendida\r\n $Valores[19]=\"0\"; \t\t\t\r\n $Valores[20]=$TotalCostosM; \t//para la sumatoria contemplar el balance\r\n\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n\r\n ///////////////////////Ajustamos el inventario\r\n\r\n $CuentaPUC=$CuentaInventarios; //1435 Mercancias no fabricadas por la empresa\r\n\r\n $DatosCuenta=$this->DevuelveValores('cuentas',\"idPUC\",$CuentaPUC);\r\n $NombreCuenta=$DatosCuenta[\"Nombre\"];\r\n\r\n $Valores[15]=$CuentaPUC;\r\n $Valores[16]=$NombreCuenta;\r\n $Valores[18]=\"0\";\r\n $Valores[19]=$TotalCostosM;//Credito se escribe el costo de la mercancia vendida\t\t\t\r\n $Valores[20]=$TotalCostosM*(-1); \t//para la sumatoria contemplar el balance\r\n\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n\r\n }\r\n}", "title": "" }, { "docid": "244540b1982604956f4db07ebcf421de", "score": "0.58158606", "text": "function mostrarHorarioEstudiante() {\r\n\r\n if ($this->datosEstudiante['CODIGO']) {\r\n $cadena_sql = $this->sql->cadena_sql(\"periodoActivo\");\r\n $resultado_periodo = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\r\n $this->periodo=$resultado_periodo;\r\n\r\n $variablesInscritos = array($this->datosEstudiante['CODIGO'], $resultado_periodo[0][0], $resultado_periodo[0][1]);\r\n $cadena_sql = $this->sql->cadena_sql(\"consultaGrupo\", $variablesInscritos);\r\n $registroGrupo = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\r\n\r\n $this->HorarioEstudianteConsulta($registroGrupo);\r\n\r\n\r\n $creditos = $this->calcularCreditos($registroGrupo);\r\n }\r\n }", "title": "" }, { "docid": "1fe13f14c8283f98d3308ec417387c2d", "score": "0.5809317", "text": "public static function mdlConsultarNotas($idAsignatura, $idCurso)\n {\n\n\n $concatenar = \"\";\n\n $objRespuestaNombreNotas = notaModelo::cargarNotas($idAsignatura, $idCurso);\n $objPerido = new notaModelo;\n $periodo = $objPerido->retornarIdPeriodo();\n\n\n if($periodo==false){\n\n $mensaje=\"No se ha realizado la creacion del periodo\";\n return $mensaje;\n\n\n\n }else{\n\n $idPeriodo = $periodo[0][0];\n\n\n }\n\n\n \n $ciclosNotas = count($objRespuestaNombreNotas);\n $contado = 0;\n\n\n\n foreach ($objRespuestaNombreNotas as $key => $value) {\n\n if ($contado + 1 != $ciclosNotas) {\n $concatenar .= \"sum(case when Nnota ='\" . $value[\"nombreNota\"] . \"' then Calificacion else 0 end )as '\" . $value[\"nombreNota\"] . \"',\";\n } else {\n $concatenar .= \"sum(case when Nnota ='\" . $value[\"nombreNota\"] . \"' then Calificacion else 0 end )as '\" . $value[\"nombreNota\"] . \"'\";\n }\n $contado++;\n }\n\n\n $objConsultaNotas = conexion::conectar()->prepare(\"select idAsignaturaNota, idCursoF,idAsignaturaF,cod_Estudiante, Nombre,Apellidos,\" . $concatenar . \" from (select asignaturanota.idAsignaturaNota as idAsignaturaNota, nota.idCurso as idCursoF ,asignatura.idasignatura as idAsignaturaF,estudiante.idEstudiante as cod_Estudiante, estudiante.nombres as Nombre,estudiante.apellidos as Apellidos,asignatura.nombreAsignatura as Asignatura,nota.nombreNota as Nnota,asignaturanota.nota as Calificacion from asignaturanota inner join estudiante on asignaturanota.idEstudiante=estudiante.idEstudiante inner join nota on asignaturanota.idNota=nota.idNota inner join asignatura on nota.idAsignatura=asignatura.idAsignatura where nota.idCurso=\" . $idCurso . \" and nota.idAsignatura=\" . $idAsignatura . \" and nota.idPeriodo=\" . $idPeriodo . \") as tb group by Nombre \");\n\n try {\n $objConsultaNotas->execute();\n\n $lista = $objConsultaNotas->fetchAll();\n $objConsultaNotas = null;\n\n return $lista;\n } catch (Exception $e) {\n $nada = \"No hay notas\";\n\n return $nada;\n }\n }", "title": "" }, { "docid": "fe55e9f7170e334a2dc6e62ee0706a19", "score": "0.580875", "text": "function insertarVentaFacturacionExportacionDetalle(){\r\n\t\t$this->procedimiento='vef.ft_venta_facturacion_exportacion_ime';\r\n\t\t$this->transaccion='VF_FACEXP_DET_INS';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_venta','id_venta','int4');\r\n\t\t$this->setParametro('descripcion','descripcion','text');\r\n\t\t$this->setParametro('cantidad_det','cantidad','numeric');\r\n\t\t$this->setParametro('tipo','tipo','varchar');\r\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\r\n\t\t$this->setParametro('id_producto','id_producto','int4');\r\n\t\t//$this->setParametro('id_sucursal_producto','id_sucursal_producto','int4');\r\n\t\t$this->setParametro('precio','precio','numeric');\r\n\t//\t$this->setParametro('excento','excento','numeric');\r\n\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "16f4e4cf4871275fd287fc925e73bf98", "score": "0.5807468", "text": "public function vincularDocumento($pai, $filho, $vinculacao) {\n\n try {\n /* Validar se os documentos pai e filho ainda estao na area de trabalho do usuario */\n /* Inicar transacao */\n Controlador::getInstance()->getConnection()->connection->beginTransaction();\n\n $dt_ativacao = date('Y-m-d');\n //$operacao = ($vinculacao == 1) ? 'anexado' : 'apensado';\n\n switch ($vinculacao) {\n case 1:\n $operacao = 'anexado';\n break;\n case 2:\n $operacao = 'apensado';\n break;\n case 3:\n $operacao = 'associado';\n break;\n default:\n $operacao = 'erro';\n break;\n }\n\n if ($operacao != 'erro') {\n\n $informacoes = array('USUARIO' => Zend_Auth::getInstance()->getIdentity()->ID,\n 'NOME_USUARIO' => Zend_Auth::getInstance()->getIdentity()->NOME,\n 'ID_UNIDADE_HISTORICO' => Zend_Auth::getInstance()->getIdentity()->ID_UNIDADE,\n 'DIRETORIA' => current(CFModelUnidade::factory()->find(Zend_Auth::getInstance()->getIdentity()->ID_UNIDADE))->NOME,\n 'ID_DOCUMENTO' => 0,\n 'TIPO_DOCUMENTO' => '',\n 'ID_PAI' => 0,\n 'OPERACAO' => $operacao,\n 'ACAO' => '');\n\n //var_dump($informacoes,1);\n $acao0 = \"Este documento foi {$operacao} ao documento {$pai}\";\n $acao1 = \"O documento {$filho} foi {$operacao}.\";\n $acao2 = \"Este documento foi {$operacao} ao documento {$pai}.\";\n\n /* Historico - Documento Pai */\n $informacoes['ID_DOCUMENTO'] = $pai;\n $informacoes['ACAO'] = $acao1;\n $this->historicoDocumento($informacoes);\n\n /* Limpa o aray informacao para o próximo registro com id_pai */\n $informacoes['ID_PAI'] = Controlador::getInstance()->getConnection()->connection->lastInsertId('TB_HISTORICO_TRAMITE_DOCUMENTOS_ID_SEQ');\n $informacoes['ID_DOCUMENTO'] = $filho;\n $informacoes['ACAO'] = $acao0;\n $this->historicoDocumento($informacoes);\n\n /**/\n $id_filho = Controlador::getInstance()->getConnection()->connection->lastInsertId('TB_HISTORICO_TRAMITE_DOCUMENTOS_ID_SEQ');\n\n /* Ultimo tramite - Documento Filho */\n $stmt = Controlador::getInstance()->getConnection()->connection->prepare(\"UPDATE TB_DOCUMENTOS_CADASTRO SET ULTIMO_TRAMITE = ? WHERE DIGITAL = ?\");\n $stmt->bindParam(1, $acao2, PDO::PARAM_STR);\n $stmt->bindParam(2, $filho, PDO::PARAM_STR);\n $stmt->execute();\n\n $id_unidade = Controlador::getInstance()->usuario->ID_UNIDADE;\n\n /* Vincular */\n $sttm = Controlador::getInstance()->getConnection()->connection->prepare(\"INSERT INTO TB_DOCUMENTOS_VINCULACAO (ID_DOCUMENTO_PAI,ID_DOCUMENTO_FILHO,ID_USUARIO,ID_HISTORICO_TRAMITE_PAI,ID_HISTORICO_TRAMITE_FILHO,ID_VINCULACAO,DT_ATIVACAO,ID_UNIDADE) VALUES (?,?,?,?,?,?,?,?)\");\n $sttm->bindParam(1, DaoDocumento::getDocumento($pai, 'id'), PDO::PARAM_INT);\n $sttm->bindParam(2, DaoDocumento::getDocumento($filho, 'id'), PDO::PARAM_INT);\n $sttm->bindParam(3, $informacoes['USUARIO'], PDO::PARAM_INT);\n $sttm->bindParam(4, $informacoes['ID_PAI'], PDO::PARAM_INT);\n $sttm->bindParam(5, $id_filho, PDO::PARAM_INT);\n $sttm->bindParam(6, $vinculacao, PDO::PARAM_INT);\n $sttm->bindParam(7, $dt_ativacao, PDO::PARAM_INT);\n $sttm->bindParam(8, $id_unidade, PDO::PARAM_INT);\n $sttm->execute();\n\n /* Comitar */\n Controlador::getInstance()->getConnection()->connection->commit();\n\n return new Output(array('success' => 'true', 'message' => \"Documento {$operacao} com sucesso!\"));\n } else {\n throw new PDOException();\n }\n } catch (PDOException $e) {\n Controlador::getInstance()->getConnection()->connection->rollback();\n return new Output(array('success' => 'false', 'error' => $e->getMessage()));\n }\n }", "title": "" }, { "docid": "2029d472804fb92a9a0cb5989e080315", "score": "0.5801666", "text": "function getTablaOrdenesPaciente($parametros) {\r\n $oEPaciente = new EPaciente();\r\n $oEPaciente->setIid_persona($parametros[\"iid_persona\"]);\r\n //echo \"<br>familia_producto: \".$parametros[\"familia_producto\"].\"<br>\";\r\n $parametros[\"familia_producto\"] = $parametros[\"familia_producto\"] == \"\" ? \"\" : $parametros[\"familia_producto\"];\r\n $parametros[\"iid_tafiliacion\"] = $parametros[\"iid_tafiliacion\"] == \"\" ? 0 : $parametros[\"iid_tafiliacion\"];\r\n //echo \"<br>longitud:\".$parametros[\"fechas\"].\"<br>\";\r\n $fecha = array(substr(trim($parametros[\"fechas\"]), 0, 10), substr(trim($parametros[\"fechas\"]), 10, 10));\r\n $fecha1 = split(\"/\", $fecha[0]);\r\n $fecha2 = split(\"/\", $fecha[1]);\r\n $f1 = $fecha1[2] . \"-\" . $fecha1[1] . \"-\" . $fecha1[0];\r\n $f2 = $fecha2[2] . \"-\" . $fecha2[1] . \"-\" . $fecha2[0];\r\n //echo \"<br>familia_producto: \".$parametros[\"familia_producto\"].\"<br>\";\r\n //echo \"<br>longitud:\".strlen(trim($parametros[\"fechas\"])).\"<br>\";\r\n $parametros[\"fechas\"] = strlen(trim($parametros[\"fechas\"])) == \"20\" ? $f1 . $f2 : \"\";\r\n //echo \"<br>$f1:$f2<br>\";\r\n //echo \"<br>fecha:\".$parametros[\"fechas\"].\"<br>\";\r\n $parametros[\"iestado_orden\"] = $parametros[\"iestado_orden\"] == \"\" ? 0 : $parametros[\"iestado_orden\"];\r\n ///////Parametros de funcion///////\r\n $arrayTabla = $this->o_LOrden->getArrayOrdenesPaciente($oEPaciente, $parametros);\r\n //var_dump($arrayTabla);\r\n $arrayCabecera = array(\"11\" => \"checkbox\", \"0\" => \"Nº ORDEN\", \"1\" => \"FECHA\", \"2\" => \"AFILIACION\", \"12\" => \"#\", \"3\" => \"CONCEPTO\", \"4\" => \"PRECIO\", \"5\" => \"CANTIDAD\", \"6\" => \"TOTAL\");\r\n $o_Tabla = new Tabla1($arrayCabecera, 15, $arrayTabla, 'tablaOrden', '', '', 'filaSeleccionada', 'OnDblClick', 'alert', 8, 9);\r\n $tablaHtml = $o_Tabla->getTabla();\r\n return $tablaHtml;\r\n }", "title": "" }, { "docid": "2c1e1d3ca34ea6194a966a21c66dc248", "score": "0.5794869", "text": "public function agregarOrden($soli,$pares,$foa, $fec, $suc, $pers, $lug, $fecd, $hord, $caud, $lud, $panv, $hov, $ubv, $fev, $igv, $prpv, $tempv, $horv, $ate, $mode, $ure, $modee, $cae, $creme, $eme, $otre, $adoe, $luge, $care, $trase, $sube, $ime, $cere, $ote, $obe, $tote\n , $nomf, $domfin, $ciu, $fechf, $edf, $apf, $nuf, $colf, $ecf, $escf, $apmf, $naf, $ocf, $dhf, $sef, $nev, $apav, $apmae, $fede, $abono) {\n $res=$tote-$abono;\n $datos = array(\n 'Solicitantes_idSolicitantes' => $soli,\n 'Parentesco' => $pares,\n 'ApoyoPert' => $foa,\n 'FechaOrden' => date('Y-m-d'),\n 'Sucursal_idSucursal' => $suc,\n 'PersonaAtendio' => $pers,\n 'LugarDifuncion' => $lug,\n 'Fecha' => $fecd,\n 'Hora' => $hord,\n 'Causa' => $caud,\n 'LugarVelacion' => $lud,\n 'Panteon' => $panv,\n 'HoraMisa' => $hov,\n 'Ubicacion' => $ubv,\n 'FechaMisa' => $fev,\n 'Iglesia' => $igv,\n 'Perpetuidad' => $prpv,\n 'Temporal' => $tempv,\n 'HoraSepelio' => $horv,\n 'Ataud' => $ate,\n 'ModeloAtaud' => $mode,\n 'Urna' => $ure,\n 'ModeloUrna' => $modee,\n 'Capillas' => $cae,\n 'Cremacion' => $creme,\n 'Embalsamado' => $eme,\n 'OtrosGastos' => $otre,\n 'Adomicilio' => $adoe,\n 'LugarCremacion' => $luge,\n 'Carroza' => $care,\n 'Traslado' => $trase,\n 'SubTotal' => $sube,\n 'Impuestos' => $ime,\n 'CertificadoMedico' => $cere,\n 'Otros' => $ote,\n 'Observaciones' => $obe,\n 'Total' => $tote,\n 'NombreFinado' => $nomf,\n 'DomicilioFinado' => $domfin,\n 'CiudadFinado' => $ciu,\n 'FechaNacimiento' => $fechf,\n 'Edad' => $edf,\n 'ApellidoFinPa' => $apf,\n 'NumeroFinado' => $nuf,\n 'ColoniaFinado' => $colf,\n 'EstadoCivil' => $ecf,\n 'Escolaridad' => $escf,\n 'ApellidoFinMa' => $apmf,\n 'Nacionalidad' => $naf,\n 'Ocupacion' => $ocf,\n 'DerechoHabiente' => $dhf,\n 'Sexo' => $sef,\n 'NombreFinExhumar' => $nev,\n 'ApellidoPaterno' => $apav,\n 'ApellidoMaterno' => $apmae,\n 'FechaDifuncionExhumar' => $fede,\n 'Restante' => $res,\n 'Estatus' => 'si'\n );\n $this->db->insert('orden', $datos);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "79adf487d5b3b1de816390b6de4e1607", "score": "0.57881594", "text": "function reporteArchivoACM(){\n if($this->objParam->getParametro('id_archivo_acm') != ''){\n $this->objParam->addFiltro(\"taa.id_archivo_acm = \". $this->objParam->getParametro('id_archivo_acm'));\n// var_dump($this->objParam->getParametro('id_archivo_acm'));exit;\n }\n\n\n /*if($this->objParam->getParametro('id_agencia') != ''){\n $this->objParam->addFiltro(\" aad.id_agencia = ''\".$this->objParam->getParametro('id_agencia').\"''\");\n }\n if($this->objParam->getParametro('officce_id') != ''){\n $this->objParam->addFiltro(\"aad.officce_id\" . $this->objParam->getParametro('officce_id'));\n }*/\n $this->objFunc=$this->create('MODArchivoAcm');\n $this->res=$this->objFunc->reporteGenArchivoACM($this->objParam);\n //obtener titulo de reporte\n //var_dump($this->res);exit;\n $titulo ='ARCHIVO ACM DOMESTICO';\n //Genera el nombre del archivo (aleatorio + titulo)\n $nombreArchivo=uniqid(md5(session_id()).$titulo);\n $nombreArchivo.='.xls';\n $this->objParam->addParametro('nombre_archivo',$nombreArchivo);\n $this->objParam->addParametro('datos',$this->res->datos);\n //Instancia la clase de excel\n $this->objReporteFormato=new RReporteArchivoAcm($this->objParam);\n $this->objReporteFormato->generarDatos();\n $this->objReporteFormato->generarReporte();\n\n $this->mensajeExito=new Mensaje();\n $this->mensajeExito->setMensaje('EXITO','Reporte.php','Reporte generado',\n 'Se generó con éxito el reporte: '.$nombreArchivo,'control');\n $this->mensajeExito->setArchivoGenerado($nombreArchivo);\n $this->mensajeExito->imprimirRespuesta($this->mensajeExito->generarJson());\n\n }", "title": "" }, { "docid": "d07a9e1b2f9d763c1434edf0e3213340", "score": "0.5788129", "text": "public function obtenerDescripcion();", "title": "" }, { "docid": "2bf015351cff4651f030294ba2d540a4", "score": "0.57787263", "text": "public function CrearTraslado($fecha,$hora,$Concepto,$Destino,$VectorTraslado){\r\n $idBodega= $VectorTraslado[\"idBodega\"]; \r\n $sql=\"SELECT Identificacion FROM usuarios WHERE idUsuarios='$this->idUser'\";\r\n $Consulta=$this->Query($sql);\r\n $DatosUsuario=$this->FetchArray($Consulta);\r\n $DatosSucursalActual=$this->DevuelveValores(\"empresa_pro_sucursales\", \"Actual\", 1);\r\n $Consecutivo=$this->ObtenerMAX(\"traslados_mercancia\", \"ConsecutivoInterno\", \"Origen\", $DatosSucursalActual[\"ID\"]);\r\n $Consecutivo++;\r\n \r\n $tab=\"traslados_mercancia\";\r\n $NumRegistros=10; \r\n $id= $DatosSucursalActual[\"ID\"].\"-\".$Destino.\"-\".$Consecutivo;\r\n $Columnas[0]=\"Fecha\"; $Valores[0]=$fecha;\r\n $Columnas[1]=\"Descripcion\"; $Valores[1]=$Concepto;\r\n $Columnas[2]=\"Hora\"; $Valores[2]=$hora;\r\n $Columnas[3]=\"Abre\"; $Valores[3]=$DatosUsuario[\"Identificacion\"];\r\n $Columnas[4]=\"Estado\"; $Valores[4]=\"EN DESARROLLO\";\r\n $Columnas[5]=\"ID\"; $Valores[5]=$id;\r\n $Columnas[6]=\"Destino\"; $Valores[6]=$Destino;\r\n $Columnas[7]=\"Origen\"; $Valores[7]=$DatosSucursalActual[\"ID\"];\r\n $Columnas[8]=\"ConsecutivoInterno\"; $Valores[8]=$Consecutivo;\r\n $Columnas[9]=\"idBodega\"; $Valores[9]=$idBodega;\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n \r\n return($id); \r\n \r\n }", "title": "" }, { "docid": "d041e88304e26f919eedeb7abeed86f3", "score": "0.5774721", "text": "public function informacion(){\n \n $infoMedico='';\n $infoPaciente='';\n $infoCentro='';\t \n\t $webroot = Yii::getPathOfAlias('webroot');\n $documento=simplexml_load_file($webroot.\"/images/documento.xml\");;\n $infoCentro=utf8_decode($documento->toy->titulo);\n $medico=Usuario::model()->findByPk($this->id_u);\n $historia=Historia::model()->findByPk(Yii::app()->user->ultimaHistoria);\n $paciente=Persona::model()->findByPk($historia->id_p);\n\n $infoMedico=utf8_decode(\"Dr(a). \".$medico->nombre.\" \".$medico->apellido.\"\\n CI \".$medico->ci.\"\\n No. Registro \".$medico->registro.\"\\n \"); \n $infoPaciente=utf8_decode($paciente->nombre.\" \".$paciente->apellido.\"\\n CI \".$paciente->cedula.\"\\nfecha: \".$this->fecha_rec);\n\n return array('infoPaciente'=>$infoPaciente,'infoMedico'=>$infoMedico,'infoCentro'=>$infoCentro);\n }", "title": "" }, { "docid": "3becdf0f56b02c542da467f826bc2479", "score": "0.57713085", "text": "function modificarGestion(){\n\t\t$this->procedimiento='ccb.f_gestion_ime';\n\t\t$this->transaccion='CCB_GES_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_gestion','id_gestion','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('gestion','gestion','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "d38c6b08992861ee439721b1e1e5bca5", "score": "0.57583976", "text": "function get_descripciones()\n\t{\n\t\t$sql = \"SELECT carrera, nombre FROM sga_carreras\";\n\t\treturn toba::db('ledig')->consultar($sql);\n\t}", "title": "" }, { "docid": "63cfddc014f9c220f70908deddde8c6f", "score": "0.5745933", "text": "function imprimirDocFacturacion($tipoDoc, $id)\n\t{\n\t\tglobal $__BD, $__CAT, $__LIB;\n\n\t\t$codigo = \"\";\n\n\t\tswitch ($tipoDoc) {\n\t\t\tcase \"pedido\":\n\t\t\t\t$tabla = \"pedidoscli\";\n\t\t\t\t$tablaL = \"lineaspedidoscli\";\n\t\t\t\t$campoId = \"idpedido\";\n\t\t\t\t$mostrarEnvio = 1;\n\t\t\t\t$mostrarPago = 1;\n\t\t\t\tbreak;\n\t\t\tcase \"albaran\":\n\t\t\t\t$tabla = \"albaranescli\";\n\t\t\t\t$tablaL = \"lineasalbaranescli\";\n\t\t\t\t$campoId = \"idalbaran\";\n\t\t\t\t$mostrarEnvio = 1;\n\t\t\t\t$mostrarPago = 1;\n\t\t\t\tbreak;\n\t\t\tcase \"factura\":\n\t\t\t\t$tabla = \"facturascli\";\n\t\t\t\t$tablaL = \"lineasfacturascli\";\n\t\t\t\t$campoId = \"idfactura\";\n\t\t\t\t$mostrarEnvio = 0;\n\t\t\t\t$mostrarPago = 1;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$ordenSQL = \"select * from $tabla where $campoId = $id\";\n\t\t$result = $__BD->db_query($ordenSQL);\n\t\t$datos = $__BD->db_fetch_array($result);\n\n\t\t$ordenSQL = \"select * from $tablaL where $campoId = $id\";\n\t\t$datosLin = $__BD->db_query($ordenSQL);\n\n\t\t$codigo .= '<h2 class=\"top\">'.constant(strtoupper('_'.$tipoDoc)).' '.$datos[\"codigo\"].'</h2>';\n\n\t\t$codigo .= '<p><b>'._FECHA.'</b>: '.date(\"d-m-Y\", strtotime($datos[\"fecha\"]));\n\n\t\tif ($tipoDoc == 'pedido') {\n\t\t\t$codigo .= '<br/><b>'._ENVIADO.'</b>: '.$datos[\"servido\"];\n\t\t\tif ($datos[\"servido\"] <> 'No') {\n\t\t\t\t$fechaEnvio = date(\"d-m-Y\", strtotime($datos[\"fechasalida\"]));\n\t\t\t\tif ($fechaEnvio > '01-01-1970')\n\t\t\t\t$codigo .= '&nbsp;&nbsp;&nbsp;&nbsp;<b>'._FECHA_ENVIO.'</b>: '.date(\"d-m-Y\", strtotime($datos[6]));\n\t\t\t}\n\t\t}\n\n\t\t$codigo .='<br/><br/>';\n\n\t\t$codigo .= '<table class=\"cesta\" cellspacing=\"5\">';\n\t\t\n\t\t$codigo .= '<tr>';\n\t\t$codigo .= '<th align=\"left\" class=\"desc\">'._ARTICULO.'</th>';\n\t\t\t\t\n\t\t\t\tif ($__LIB->esTrue($_SESSION[\"opciones\"][\"desglosariva\"])) {\n \t\t\t\t\t$codigo .= '<th align=\"left\">'._PRECIO.'</th>';\n \t\t\t\t\t$codigo .= '<th align=\"left\">'._IVA.'</th>';\n \t\t\t\t}\n \t\t\t\telse\n\t\t$codigo .= '<th align=\"left\">'._PRECIO.'</th>';\n\t\t\t\n\t\t$codigo .= '<th align=\"left\">'._CANTIDAD.'</th>\n\t\t\t\t<th align=\"left\">'._IMPORTE.'</th>';\n\t\t\n\t\t$codigo .= '</tr>';\n\t\n\t\t$arrayImpuestos;\n\t\t$arrayImpuestos[18] = 0;\n\t\t$arrayImpuestos[8] = 0;\n\t\t$arrayImpuestos[4] = 0;\n\t\twhile ($row = $__BD->db_fetch_array($datosLin)) {\n\n\t\t\t$descripcion = $this->traducir(\"articulos\", \"descripcion\", $row[\"referencia\"], $row[\"descripcion\"]);\n\n// \t\t\t$precio = $__CAT->precioNeto($row, false, true, true);\n// \t\t\t$impuesto = $__CAT->impuestoArticulo($row, true);\n// \t\t\t$pvpUnitario = $precio + $impuesto;\n// \t\t\t$pvpTotal = $pvpUnitario * $row[\"cantidad\"];\n\t\t\tif(isset($row[\"iva\"]) && $row[\"iva\"] != \"0\") {\n\t\t\t\t$arrayImpuestos[$row[\"iva\"]] += $row[\"pvptotal\"];\n\t\t\t}\n\n\t\t\t$codigo .= '<tr\">';\n\t\t\t$codigo .= '<td class=\"desc\">'.$descripcion.'</td>';\n\n\t\t\tif ($this->esTrue($_SESSION[\"opciones\"][\"desglosariva\"])) {\n\t\t\t\t$codigo .= '<td>'.$__CAT->precioDivisa($row[\"pvpunitario\"]).'</td>';\t\n\t\t\t}\n\t\t\telse\n\t\t\t\t$codigo .= '<td>'.$__CAT->precioDivisa($row[\"pvpunitarioiva\"]).'</td>';\n\n\t\t\t$codigo .= '<td>'.round($row[\"cantidad\"]).'</td>';\n\t\t\tif ($this->esTrue($_SESSION[\"opciones\"][\"desglosariva\"])) {\n\t\t\t\t$codigo .= '<td>'.$__CAT->precioDivisa($row[\"pvptotal\"]).'</td>';\t\n\t\t\t}\n\t\t\telse\n\t\t\t\t$codigo .= '<td>'.$__CAT->precioDivisa($row[\"pvptotaliva\"]).'</td>';\n\t\t\t\n\t\t\t$codigo .= '</tr>';\n\t\t}\n\t\t\n\t\tif ($__LIB->esTrue($_SESSION[\"opciones\"][\"desglosariva\"])){\n\t\t\t$codigo .= '<tr class=\"subtotales\">';\n\t\t\t$codigo .= '<td colspan=\"3\" class=\"txtsubtotal\">'._NETO.'</td>';\n\t\t\t\n\t\t\t$codigo .= '<td>'.$__CAT->precioDivisa($datos[\"neto\"]).'</td>';\n\t\t\t$codigo .= '</tr>';\n\n\t\t\tif($arrayImpuestos[\"18\"] != 0) {\n\t\t\t\t$codigo .= '<tr><td colspan=\"3\" class=\"txtsubtotal\">IVA 18%</td>';\n\t\t\t\t$iva = $arrayImpuestos[\"18\"]* 18 / 100;\n\t\t\t\t$codigo .= '<td>'.$__CAT->precioDivisa($iva).'</td></tr>';\n\t\t\t}\n\t\t\tif($arrayImpuestos[\"8\"] != 0) {\n\t\t\t\t$codigo .= '<tr><td colspan=\"3\" class=\"txtsubtotal\">IVA 8%</<td>';\n\t\t\t\t$iva = $arrayImpuestos[\"8\"]* 8 / 100;\n\t\t\t\t$codigo .= '<td>'.$__CAT->precioDivisa($iva).'</td></tr>';\n\t\t\t}\n\t\t\tif($arrayImpuestos[\"4\"] != 0) {\n\t\t\t\t$codigo .= '<tr><td colspan=\"3\" class=\"txtsubtotal\">IVA 4%</td>';;\n\t\t\t\t$iva = $arrayImpuestos[\"4\"]* 4 / 100;\n\t\t\t\t$codigo .= '<td>'.$__CAT->precioDivisa($iva).'</td></tr>';\n\t\t\t}\n\t\t}\n\t\n\t\t$codigo .= '<tr class=\"totales\">';\n\t\t$codigo .= '<td colspan=\"3\" class=\"total\">'._TOTAL.'</td>';;\n\t\t$codigo .= '<td>'.$__CAT->precioDivisa($datos[\"total\"]).'</td>';\n\t\t$codigo .= '</tr>'\n\t\t\t\t;\n\t\t$codigo .= '</table>';\n\t\t\n\n\n\t\t$pais = $__BD->db_valor(\"select nombre from paises where codpais = '\".$datos[\"codpais\"].\"'\");\n\t\t$paisEnv = $__BD->db_valor(\"select nombre from paises where codpais = '\".$datos[\"codpaisenv\"].\"'\");\n\n\t\t$formaPago = $__BD->db_valor(\"select descripcion from formaspago where codpago = '\".$datos[\"codpago\"].\"'\");\n\t\t$formaEnvio = $__BD->db_valor(\"select descripcion from formasenvio where codenvio = '\".$datos[\"codenvio\"].\"'\");\n\n\t\t// Envio\n\t\t$codigoEnvio = '';\n\t\t$codigoEnvio .='<br/><br/>';\n\t\t$codigoEnvio .= '<h2>'._DATOS_ENVIO.'</h2>';\n\n\t\tif ($formaEnvio) {\n\t\t\t$codigoEnvio .= '<p><b>'._FORMA_ENVIO.'</b><br/>';\n\t\t\t$codigoEnvio .= $formaEnvio;\n\t\t\t$codigoEnvio .= '<p><b>'._DIRECCION.'</b>';\n\t\t}\n\n\t\t$codigoEnvio .= '&nbsp;<br/>';\n\t\t$codigoEnvio .= $datos[\"nombreenv\"].' '.$datos[\"apellidosenv\"];\n\t\tif ($datos[\"empresaenv\"]) {\n\t\t\t$codigoEnvio .= '<br/>';\n\t\t\t$codigoEnvio .= $datos[\"empresaenv\"];\n\t\t}\n\t\t$codigoEnvio .= '<p>';\n\t\t$codigoEnvio .= $datos[\"direccionenv\"];\n\t\t$codigoEnvio .= '<br/>';\n\t\t$codigoEnvio .= $datos[\"codpostalenv\"].' '.$datos[\"ciudadenv\"].'&nbsp;&nbsp;'.$datos[\"provinciaenv\"];\n\t\t$codigoEnvio .= '<br/>';\n\t\t$codigoEnvio .= $paisEnv;\n\t\t\t\n\t\tif ($mostrarEnvio)\n\t\t$codigo .= $codigoEnvio;\n\n\t\t// Pago\n\t\t$codigoPago = '';\n\t\t$codigoEnvio .='<br/><br/>';\n\t\t$codigoPago .= '<h2>'._DATOS_PAGO.'</h2>';\n\n\t\tif ($formaEnvio) {\n\t\t\t$codigoPago .= '<p><b>'._FORMA_PAGO.'</b><br/>';\n\t\t\t$codigoPago .= $formaPago;\n\t\t\t$codigoPago .= '<p><b>'._DIRECCION.'</b>';\n\t\t}\n\n\t\t$codigoPago .= '&nbsp;<br/>';\n\t\t$codigoPago .= $datos[\"nombre\"].' '.$datos[\"apellidos\"];\n\t\tif ($datos[\"empresa\"]) {\n\t\t\t$codigoPago .= '<br/>';\n\t\t\t$codigoPago .= $datos[\"empresa\"];\n\t\t}\n\t\t$codigoPago .= '<p>';\n\t\t$codigoPago .= $datos[\"direccion\"];\n\t\t$codigoPago .= '<br/>';\n\t\t$codigoPago .= $datos[\"codpostal\"].' '.$datos[\"ciudad\"].'&nbsp;&nbsp;'.$datos[\"provincia\"];\n\t\t$codigoPago .= '<br/>';\n\t\t$codigoPago .= $pais;\n\n\t\tif ($mostrarPago)\n\t\t$codigo .= $codigoPago;\n\n\t\treturn $codigo;\n\t}", "title": "" }, { "docid": "8fac9ea6ed9fae33239ccc8917036622", "score": "0.57457614", "text": "function modificarVentaFacturacionExportacionDetalle(){\r\n\t\t$this->procedimiento='vef.ft_venta_facturacion_exportacion_ime';\r\n\t\t$this->transaccion='VF_FACEXP_DET_MOD';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_venta_detalle','id_venta_detalle','int4');\r\n\t\t$this->setParametro('id_venta','id_venta','int4');\r\n\t\t$this->setParametro('descripcion','descripcion','text');\r\n\t\t$this->setParametro('estado','estado','varchar');\r\n\t\t$this->setParametro('tipo','tipo','varchar');\r\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\r\n\t\t$this->setParametro('id_producto','id_producto','int4');\r\n\t\t$this->setParametro('precio','precio','numeric');\r\n\t\t$this->setParametro('cantidad_det','cantidad','numeric');\r\n\t\t$this->setParametro('funcion','funcion','varchar');\r\n\t\t$this->setParametro('excento','excento','numeric');\r\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\r\n\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\t//var_dump($this->respuesta);\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "574330558a16325123e0390739ed4f34", "score": "0.5742789", "text": "function modificarVenta(){\r\n\t\t$this->procedimiento='vef.ft_venta_facturacion_ime';\r\n\t\t$this->transaccion='VF_fact_MOD';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_venta','id_venta','int4');\r\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\r\n\t\t$this->setParametro('id_dosificacion','id_dosificacion','int4');\r\n\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\r\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\r\n\t\t$this->setParametro('id_punto_venta','id_punto_venta','int4');\r\n\t\t$this->setParametro('id_sucursal','id_sucursal','int4');\r\n\t\t$this->setParametro('id_usuario_cajero','id_usuario_cajero','int4');\r\n\t\t$this->setParametro('id_cliente_destino','id_cliente_destino','int4');\r\n\t\t$this->setParametro('transporte_fob','transporte_fob','numeric');\r\n\t\t$this->setParametro('tiene_formula','tiene_formula','varchar');\r\n\t\t$this->setParametro('cod_control','cod_control','varchar');\r\n\t\t$this->setParametro('estado','estado','varchar');\r\n\t\t$this->setParametro('total_venta_msuc','total_venta_msuc','numeric');\r\n\t\t$this->setParametro('otros_cif','otros_cif','numeric');\r\n\t\t$this->setParametro('nro_factura','nro_factura','int4');\r\n\t\t$this->setParametro('observaciones','observaciones','text');\r\n\t\t$this->setParametro('seguros_cif','seguros_cif','numeric');\r\n\t\t$this->setParametro('comision','comision','numeric');\r\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\r\n\t\t$this->setParametro('id_movimiento','id_movimiento','int4');\r\n\t\t$this->setParametro('transporte_cif','transporte_cif','numeric');\r\n\t\t$this->setParametro('correlativo_venta','correlativo_venta','varchar');\r\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\r\n\t\t$this->setParametro('nro_tramite','nro_tramite','varchar');\r\n\t\t$this->setParametro('tipo_cambio_venta','tipo_cambio_venta','numeric');\r\n\t\t$this->setParametro('a_cuenta','a_cuenta','numeric');\r\n\t\t$this->setParametro('contabilizable','contabilizable','varchar');\r\n\t\t$this->setParametro('nombre_factura','nombre_factura','varchar');\r\n\t\t$this->setParametro('excento','excento','numeric');\r\n\t\t$this->setParametro('valor_bruto','valor_bruto','numeric');\r\n\t\t$this->setParametro('descripcion_bulto','descripcion_bulto','varchar');\r\n\t\t$this->setParametro('id_grupo_factura','id_grupo_factura','int4');\r\n\t\t$this->setParametro('fecha','fecha','date');\r\n\t\t$this->setParametro('nit','nit','varchar');\r\n\t\t$this->setParametro('tipo_factura','tipo_factura','varchar');\r\n\t\t$this->setParametro('seguros_fob','seguros_fob','numeric');\r\n\t\t$this->setParametro('total_venta','total_venta','numeric');\r\n\t\t$this->setParametro('forma_pedido','forma_pedido','varchar');\r\n\t\t$this->setParametro('porcentaje_descuento','porcentaje_descuento','numeric');\r\n\t\t$this->setParametro('hora_estimada_entrega','hora_estimada_entrega','time');\r\n\t\t$this->setParametro('id_vendedor_medico','id_vendedor_medico','varchar');\r\n\t\t$this->setParametro('otros_fob','otros_fob','numeric');\r\n\t\t$this->setParametro('fecha_estimada_entrega','fecha_estimada_entrega','date');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "051e91815605122da23aae5f279a25bb", "score": "0.57289356", "text": "function datosNuevoSoftware($id_componente = NULL,$nombre,$referencia,$descripcion,$version,$id_tipo = 3) {\n\t\t$this->id_componente = $id_componente;\n\t\t$this->nombre = $nombre;\n\t\t$this->referencia = $referencia;\n\t\t$this->descripcion = $descripcion;\n\t\t$this->version = $version;\n\t\t$this->id_tipo = $id_tipo;\n\t}", "title": "" }, { "docid": "3b8b189942724088fb2d6a6c4391636e", "score": "0.57222414", "text": "public function notificacion($cedula) {\n $consulsol = paraTodos::arrayConsulta(\"ID, TP_PREST, ESTATUS\", \"solict_prest\", \"CEDULA='$cedula' and ESTATUS<>'ELIMINADO'\");\n foreach ($consulsol as $row){\n\t\t\t/*De poseerlo se obtiene la ultima notificacion que tuvo el cliente con el prestamo selccionado*/\n\t\t\t\t$consulnotifnum = paraTodos::arrayConsultanum(\"*\", \"notificacion\", \"notif_cedula='$cedula' and notif_tipprest=$row[TP_PREST] order by notif_codigo desc limit 1\");\n\t\t\tif ($consulnotifnum>0){\n\t\t\t\t$consulnotif = paraTodos::arrayConsulta(\"*\", \"notificacion\", \"notif_cedula='$cedula' and notif_tipprest=$row[TP_PREST] order by notif_codigo desc limit 1\");\n\t\t\t\tforeach ($consulnotif as $notif){\n\t\t\t\t\t$datoscredito = paraTodos::arrayConsulta(\"*\", \"tp_prest\", \"ID=$row[TP_PREST]\");\n\t\t\t\t\tforeach($datoscredito as $rowdatosc){\n\t\t\t\t\t\t$credito = $rowdatosc[NAME];\n\t\t\t\t\t}\n\t\t\t\t\t$estatusant= $notif[notif_estatusprest];\n\t\t\t\t\t$colaant= $notif[notif_cola];\n\t\t\t\t\t$estatus = $row[ESTATUS];\n\t\t\t\t\tif ($estatusant != $estatus){\n\t\t\t\t\t\tif ($estatus=='APROBADO'){\n\t\t\t\t\t\t\t$descripcion = \"Su solicitud para el prestamo $credito ha sido aprobada.\";\n\t\t\t\t\t\t\t$icono = \"glyphicon glyphicon-ok text-red\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($estatus=='RECHAZADO'){\n\t\t\t\t\t\t\t$descripcion = \"Su solicitud para el prestamo $credito ha sido rechazada.\";\n\t\t\t\t\t\t\t$icono = \"glyphicon glyphicon-remove text-red\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/*Se guarda la notificacion con la fecha actual y la bandera de leido en 0 para false y 1 para true*/\n\t\t\t\t\t\tparaTodos::arrayInserte(\"notif_cedula, notif_descripcion, notif_tipprest, notif_estatusprest, notif_cola, notif_icono, notif_fecha, notif_leido\", \"notificacion\", \"'$cedula', '$descripcion', $row[TP_PREST], '$estatus', 0, '$icono', current_date, 0\");\n\t\t\t\t\t}\n\t\t\t\t\t/*Se verifican cuantas personas tienen solicitudes mas antiguas a la del cliente consultado*/\n\t\t\t\t\t$consulpersonas = paraTodos::arrayConsultanum(\"*\", \"solict_prest\", \"TP_PREST=$row[TP_PREST] and ID<$row[ID] and ESTATUS<>'APROBADO' and ESTATUS<>'ELIMINADO'\");\n\t\t\t\t\t/*Se consultan los datos del tipo de prestamo*/\n\t\t\t\t\tif ($consulpersonas<$colaant){\n\t\t\t\t\t\t/*Si la cantidad de personas es mayor a 0 entonces se muestra la posicion de la persona else se estima el prestamo se encuentra en revision*/\n\t\t\t\t\t\tif ($consulpersonas>0 and $estatus!='APROBADO'){\n\t\t\t\t\t\t\t$descripcion = \"Su puesto en la cola para el prestamo $credito es el Nº $consulpersonas.\";\n\t\t\t\t\t\t\t$icono = \"fa fa-users text-red\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($consulpersonas==0 and $estatus!='APROBADO'){\n\t\t\t\t\t\t\t$descripcion = \"Su prestamo $credito se encuentra en revision.\";\n\t\t\t\t\t\t\t$icono = \"fa fa-tag text-red\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/*Se guarda la notificacion con la fecha actual y la bandera de leido en 0 para false y 1 para true*/\n\t\t\t\t\t\tparaTodos::arrayInserte(\"notif_cedula, notif_descripcion, notif_tipprest, notif_estatusprest, notif_cola, notif_icono, notif_fecha, notif_leido\", \"notificacion\", \"'$cedula', '$descripcion', $row[TP_PREST], '$estatus', $consulpersonas, '$icono', current_date, 0\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t/*Se no tiene notificaciones para este tipo de prestamo se ingreso por primera vez con los datos actuales del prestamo*/\n\t\t\t\t$estatus = $row[ESTATUS];\n\t\t\t\t/*Se verifican cuantas personas tienen solicitudes mas antiguas a la del cliente consultado*/\n\t\t\t\t$consulpersonas = paraTodos::arrayConsultanum(\"*\", \"solict_prest\", \"TP_PREST=$row[TP_PREST] and ID<$row[ID] and ESTATUS<>'APROBADO' and ESTATUS<>'ELIMINADO'\");\n\t\t\t\t$consulpersonas = $consulpersonas+1;\n\t\t\t\t/*Se consultan los datos del tipo de prestamo*/\n\t\t\t\t$datoscredito = paraTodos::arrayConsulta(\"*\", \"tp_prest\", \"ID=$row[TP_PREST]\");\n\t\t\t\tforeach($datoscredito as $rowdatosc){\n\t\t\t\t\t$credito = $rowdatosc[NAME];\n\t\t\t\t}\n\t\t\t\t/*Si la cantidad de personas es mayor a 0 entonces se muestra la posicion de la persona else se estima el prestamo se encuentra en revision*/\n\t\t\t\tif ($consulpersonas>0){\n\t\t\t\t\t$descripcion = \"Su puesto en la cola para el prestamo $credito es el Nº $consulpersonas.\";\n\t\t\t\t\t$icono = \"fa fa-users text-red\";\n\t\t\t\t} else {\n\t\t\t\t\t$descripcion = \"Su prestamo para $credito se encuentra en revision.\";\n\t\t\t\t\t$icono = \"fa fa-tag text-red\";\n\t\t\t\t}\n\t\t\t\t/*Se guarda la notificacion con la fecha actual y la bandera de leido en 0 para false y 1 para true*/\n\t\t\t\tparaTodos::arrayInserte(\"notif_cedula, notif_descripcion, notif_tipprest, notif_estatusprest, notif_cola, notif_icono, notif_fecha, notif_leido\", \"notificacion\", \"'$cedula', '$descripcion', $row[TP_PREST], '$estatus', $consulpersonas, '$icono', current_date, 0\");\n\t\t\t}\n\n }\n }", "title": "" }, { "docid": "752ba2c6dddb3ceea51157fb0a1403ed", "score": "0.5719", "text": "function ordine_do_mod($id){\n global $o_descrizione,\n $o_data_apertura,\n $o_data_chiusura,\n $o_costo_trasporto,\n $o_costo_gestione,\n $o_note_ordine,\n $o_old_data_apertura,\n $o_old_data_chiusura;\n\n global $db;\n\n //sistemo lo stato\n\n $s_a = stato_from_id_ord($id);\n $o_stato = $s_a;\n\n if($o_data_apertura<>$o_old_data_apertura){\n // DATA APERTURA NEL FUTURO\n if(gas_mktime($o_data_apertura)>gas_mktime(date(\"d/m/Y H:i\"))){\n if($s_a==1){\n $msg .= \"Apertura spostata\";\n $o_stato = 1;\n }\n if($s_a==2){\n $msg .= \"Ordine sospeso\";\n $o_stato = 1;\n }\n if($s_a==3){\n $msg .= \"Io credo risorgeròooo\";\n $o_stato = 1;\n }\n\n }\n\n //DATA APERTURA GIA' PASSATA\n if(gas_mktime($o_data_apertura)<=gas_mktime(date(\"d/m/Y H:i\"))){\n if($s_a==1){\n $o_data_apertura = date(\"d/m/Y H:i\");\n $msg .= \"Aperto subito !\";\n $o_stato = 2;\n }\n\n\n }\n }\n\n\n if($o_data_chiusura<>$o_old_data_chiusura){\n //DATA CHIUSURA NEL FUTURO\n if(gas_mktime($o_data_chiusura)>gas_mktime(date(\"d/m/Y H:i\"))){\n if($s_a==3){\n $msg .= \"Ordine riesumato !\";\n $o_stato = 2;\n }\n if($s_a==2){\n $msg .= \"Ordine allungato\";\n $o_stato = 2;\n }\n if($s_a==1){\n $msg .= \"Ordine spostato\";\n $o_stato = 1;\n }\n }\n }\n\n //tratto le variabili\n $o_data_apertura = conv_date_to_db($o_data_apertura);\n $o_data_chiusura = conv_date_to_db($o_data_chiusura);\n $o_descrizione = strip_tags(sanitize($o_descrizione));\n $o_note_ordine = sanitize($o_note_ordine);\n\n // QUERY INSERT\n $my_query=\"UPDATE retegas_ordini\n SET\n retegas_ordini.data_apertura = '$o_data_apertura',\n retegas_ordini.data_chiusura = '$o_data_chiusura',\n retegas_ordini.costo_gestione = '$o_costo_gestione',\n retegas_ordini.costo_trasporto = '$o_costo_trasporto',\n retegas_ordini.id_stato = '$o_stato',\n retegas_ordini.note_ordini = '$o_note_ordine'\n WHERE\n retegas_ordini.id_ordini = '$id' LIMIT 1;\";\n //echo $my_query;\n\n //INSERT BEGIN ---------------------------------------------------------\n $result = $db->sql_query($my_query);\n\n //echo $msg;\n if (is_null($result)){\n return 0;\n exit;\n }else{\n return $o_stato;\n exit;\n }\n\n\n }", "title": "" }, { "docid": "22b8a1a8601db63aa491d987ea173cdf", "score": "0.5711538", "text": "public function CrearFacturaDesdePrefactura($DatosFactura) {\r\n \r\n $idCliente=$DatosFactura['CmbCliente'];\r\n \r\n $CentroCostos=$DatosFactura[\"CmbCentroCostos\"];\r\n $ResolucionDian=$DatosFactura[\"CmbResolucion\"];\r\n $TipoPago=$DatosFactura[\"CmbFormaPago\"];\r\n $CuentaDestino=$DatosFactura[\"CmbCuentaDestino\"];\r\n $OrdenCompra=$DatosFactura[\"TxtOrdenCompra\"];\r\n $OrdenSalida=$DatosFactura[\"TxtOrdenSalida\"];\r\n $ObservacionesFactura=$DatosFactura[\"TxtObservacionesFactura\"];\r\n $FechaFactura=$DatosFactura[\"TxtFechaFactura\"];\r\n $NumeroForzado=$DatosFactura[\"TxtNumeroFactura\"];\r\n $Colaborador=$DatosFactura[\"CmbColaborador\"];\r\n $Consulta=$this->DevuelveValores(\"centrocosto\", \"ID\", $CentroCostos);\r\n \r\n $EmpresaPro=$Consulta[\"EmpresaPro\"];\r\n if($TipoPago==\"Contado\"){\r\n $SumaDias=0;\r\n }else{\r\n $SumaDias=$TipoPago;\r\n }\r\n \r\n ////////////////////////////////Preguntamos por disponibilidad\r\n ///////////\r\n ///////////\r\n \r\n $ID=\"\";\r\n $DatosResolucion=$this->DevuelveValores(\"empresapro_resoluciones_facturacion\", \"ID\", $ResolucionDian);\r\n if($DatosResolucion[\"Completada\"]==\"NO\"){ ///Pregunto si la resolucion ya fue completada\r\n $Disponibilidad=$DatosResolucion[\"Estado\"];\r\n //si entra a verificar es porque estaba ocupada y cambiará a 1\r\n while($Disponibilidad==\"OC\"){ //miro que esté disponible para facturar, esto para no crear facturas dobles\r\n print(\"Esperando disponibilidad<br>\");\r\n usleep(300);\r\n $DatosResolucion=$this->DevuelveValores(\"empresapro_resoluciones_facturacion\", \"ID\", $ResolucionDian);\r\n $Disponibilidad=$DatosResolucion[\"Estado\"];\r\n \r\n }\r\n \r\n $DatosResolucion=$this->DevuelveValores(\"empresapro_resoluciones_facturacion\", \"ID\", $ResolucionDian);\r\n if($DatosResolucion[\"Completada\"]<>\"SI\"){\r\n $this->ActualizaRegistro(\"empresapro_resoluciones_facturacion\", \"Estado\", \"OC\", \"ID\", $ResolucionDian); //Ocupo la resolucion\r\n \r\n $sql=\"SELECT MAX(NumeroFactura) as FacturaActual FROM facturas WHERE Prefijo='$DatosResolucion[Prefijo]' \"\r\n . \"AND TipoFactura='$DatosResolucion[Tipo]' AND idResolucion='$ResolucionDian'\";\r\n $Consulta=$this->Query($sql);\r\n $Consulta=$this->FetchArray($Consulta);\r\n $FacturaActual=$Consulta[\"FacturaActual\"];\r\n $idFactura=$FacturaActual+1;\r\n if($NumeroForzado>0){\r\n $sql=\"SELECT NumeroFactura FROM facturas WHERE Prefijo='$DatosResolucion[Prefijo]' \"\r\n . \"AND TipoFactura='$DatosResolucion[Tipo]' AND idResolucion='$ResolucionDian'\";\r\n $Consulta=$this->Query($sql);\r\n $Consulta=$this->FetchArray($Consulta);\r\n $Existe=$Consulta[\"NumeroFactura\"];\r\n if($Existe==$NumeroForzado){\r\n //libero la resolucion\r\n $this->ActualizaRegistro(\"empresapro_resoluciones_facturacion\", \"Estado\", \"\", \"ID\", $ResolucionDian);\r\n exit(\"<a href='FacturaCotizacion.php'>La factura $NumeroForzado ya existe, no se puede crear, Volver</a>\");\r\n }else{\r\n $idFactura=$NumeroForzado;\r\n }\r\n }\r\n //Verificamos si ya se completó el numero de la resolucion y si es así se cambia su estado\r\n if($DatosResolucion[\"Hasta\"]==$idFactura){ \r\n $this->ActualizaRegistro(\"empresapro_resoluciones_facturacion\", \"Completada\", \"SI\", \"ID\", $ResolucionDian);\r\n }\r\n //Verificamos si es la primer factura que se creará con esta resolucion\r\n //Si es así se inicia desde el numero autorizado\r\n if($idFactura==1){\r\n $idFactura=$DatosResolucion[\"Desde\"];\r\n }\r\n //Convertimos los dias en credito\r\n $FormaPagoFactura=$TipoPago;\r\n if($TipoPago<>\"Contado\"){\r\n $FormaPagoFactura=\"Credito a $TipoPago dias\";\r\n }\r\n ////////////////Inserto datos de la factura\r\n /////\r\n ////\r\n $ID=date(\"YmdHis\").microtime(false);\r\n $ID= str_replace(\" \", \"_\", $ID);\r\n $ID= str_replace(\".\", \"_\", $ID);\r\n $tab=\"facturas\";\r\n $NumRegistros=25; \r\n \r\n $Columnas[0]=\"TipoFactura\";\t\t $Valores[0]=$DatosResolucion[\"Tipo\"];\r\n $Columnas[1]=\"Prefijo\"; $Valores[1]=$DatosResolucion[\"Prefijo\"];\r\n $Columnas[2]=\"NumeroFactura\"; $Valores[2]=$idFactura;\r\n $Columnas[3]=\"Fecha\"; $Valores[3]=$FechaFactura;\r\n $Columnas[4]=\"OCompra\"; $Valores[4]=$OrdenCompra;\r\n $Columnas[5]=\"OSalida\"; $Valores[5]=$OrdenSalida;\r\n $Columnas[6]=\"FormaPago\"; $Valores[6]=$FormaPagoFactura;\r\n $Columnas[7]=\"Subtotal\"; $Valores[7]=\"\";\r\n $Columnas[8]=\"IVA\"; $Valores[8]=\"\";\r\n $Columnas[9]=\"Descuentos\"; $Valores[9]=\"\";\r\n $Columnas[10]=\"Total\"; $Valores[10]=\"\";\r\n $Columnas[11]=\"SaldoFact\"; $Valores[11]=\"\";\r\n $Columnas[12]=\"Cotizaciones_idCotizaciones\";$Valores[12]=\"\";\r\n $Columnas[13]=\"EmpresaPro_idEmpresaPro\"; $Valores[13]=$EmpresaPro;\r\n $Columnas[14]=\"Usuarios_idUsuarios\"; $Valores[14]=$this->idUser;\r\n $Columnas[15]=\"Clientes_idClientes\"; $Valores[15]=$idCliente;\r\n $Columnas[16]=\"TotalCostos\"; $Valores[16]=\"\";\r\n $Columnas[17]=\"CerradoDiario\"; $Valores[17]=\"\";\r\n $Columnas[18]=\"FechaCierreDiario\"; $Valores[18]=\"\";\r\n $Columnas[19]=\"HoraCierreDiario\"; $Valores[19]=\"\";\r\n $Columnas[20]=\"ObservacionesFact\"; $Valores[20]=$ObservacionesFactura;\r\n $Columnas[21]=\"CentroCosto\"; $Valores[21]=$CentroCostos;\r\n $Columnas[22]=\"idResolucion\"; $Valores[22]=$ResolucionDian;\r\n $Columnas[23]=\"idFacturas\"; $Valores[23]=$ID;\r\n $Columnas[24]=\"Hora\"; $Valores[24]=date(\"H:i:s\");\r\n \r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n \r\n //libero la resolucion\r\n $this->ActualizaRegistro(\"empresapro_resoluciones_facturacion\", \"Estado\", \"\", \"ID\", $ResolucionDian);\r\n \r\n //////////////////////Agrego Items a la Factura desde la devolucion\r\n /////\r\n /////\r\n \r\n $Datos[\"NumFactura\"]=$idFactura;\r\n $Datos[\"FechaFactura\"]=$FechaFactura;\r\n $Datos[\"ID\"]=$ID;\r\n $Datos[\"CuentaDestino\"]=$CuentaDestino;\r\n $Datos[\"EmpresaPro\"]=$EmpresaPro;\r\n $Datos[\"CentroCostos\"]=$CentroCostos;\r\n $this->InsertarItemsCotizacionAItemsFactura($Datos);///Relaciono los items de la factura\r\n \r\n $this->InsertarFacturaLibroDiario($Datos);///Inserto Items en el libro diario\r\n \r\n if($TipoPago<>\"Contado\"){ //Si es a Credito\r\n $Datos[\"Fecha\"]=$FechaFactura; \r\n $Datos[\"Dias\"]=$SumaDias;\r\n $FechaVencimiento=$this->SumeDiasFecha($Datos);\r\n $Datos[\"idFactura\"]=$Datos[\"ID\"]; \r\n $Datos[\"FechaFactura\"]=$FechaFactura; \r\n $Datos[\"FechaVencimiento\"]=$FechaVencimiento;\r\n $Datos[\"idCliente\"]=$idCliente;\r\n $this->InsertarFacturaEnCartera($Datos);///Inserto La factura en la cartera\r\n }\r\n if($Colaborador<>\"NO\"){\r\n $this->AgregueVentaColaborador($ID, $Colaborador);\r\n }\r\n return ($ID);\r\n } \r\n \r\n }\r\n \r\n \r\n }", "title": "" }, { "docid": "909f6a97599e96104bbb00f0efd965f4", "score": "0.5708986", "text": "public function Registro_Datos_Usuario() {\n $Texto_Respuesta = '';\n $codigoterceropresenta = Session::Get('codigousuario_presenta');\n $codigoterceropresenta_inicial = $codigoterceropresenta;\n $idterceropresenta = Session::Get('idtercero_presenta');\n $idtipo_plan_compras = Session::Get('idtipo_plan_compras');\n $codigo_usuario_generado = '';\n if ( $idterceropresenta == 0 ){ /// SI NADIE LO PRESENTA, DEJÓ EN BLANCO DEBO ASIGNARLO\n $nadie_presenta = 1;\n }else{\n $nadie_presenta = 0;\n }\n\n // SI NADIE PRESENTA ASIGNO CODIGO AUTOMATICO\n if ( ($idtipo_plan_compras == 2 && $nadie_presenta == 1) || ($idtipo_plan_compras == 3 && $nadie_presenta == 1) ){\n //$Datos_Codigo = $this->Terceros->Generar_Codigo_Registro_Nadie_Presenta();\n $idterceropresenta = 81442 ; // Termporalmente se asigna a balquimia... $Datos_Codigo[0]['idtercero'];\n $codigoterceropresenta = 'BALQUIMIA' ; // Termporalmente se asigna a balquimia... $Datos_Codigo[0]['codigousuario'];\n $codigoterceropresenta_inicial = 'BALQUIMIA' ; // Termporalmente se asigna a balquimia... $codigoterceropresenta ;\n Session::Set('codigousuario_presenta',$codigoterceropresenta);\n Session::Set('idtercero_presenta', $idterceropresenta);\n }\n\n\n $idtpidentificacion = General_Functions::Validar_Entrada('idtpidentificacion','NUM');\n $identificacion = General_Functions::Validar_Entrada('identificacion','TEXT');\n $pnombre = General_Functions::Validar_Entrada('pnombre','TEXT');\n $papellido = General_Functions::Validar_Entrada('papellido','TEXT');\n $genero = General_Functions::Validar_Entrada('genero','TEXT');\n $idmcipio = General_Functions::Validar_Entrada('idmcipio','NUM');\n $direccion = General_Functions::Validar_Entrada('dirrecion','TEXT');\n $barrio = General_Functions::Validar_Entrada('barrio','TEXT');\n $celular1 = General_Functions::Validar_Entrada('celular1','TEXT');\n $e_mail = General_Functions::Validar_Entrada('e_mail','TEXT');\n $es_e_mail = General_Functions::Validar_Entrada('e_mail','EMAIL');\n $email_confirm = General_Functions::Validar_Entrada('email_confirm','TEXT');\n $es_email_confirm = General_Functions::Validar_Entrada('email_confirm','EMAIL');\n //DATOS DIFERENCIALES EMPRESA\n $nit = General_Functions::Validar_Entrada('nit','TEXT');\n $digitoverificacion = General_Functions::Validar_Entrada('digitoverificacion','TEXT');\n $razonsocial = General_Functions::Validar_Entrada('razonsocial','TEXT');\n if ( strlen($identificacion) == 0){\n $identificacion = $nit ;\n }\n //\n $mes = General_Functions::Validar_Entrada('mes','NUM');\n $dia = General_Functions::Validar_Entrada('dia','NUM');\n if ($mes < 9) { $mes = '0'.$mes ; }\n if ($dia < 9) { $dia = '0'.$dia ; }\n\n if ( strlen($identificacion) == 0){\n $Texto_Respuesta = $Texto_Respuesta . 'Debe registrar el número de identificación o N.I.T. para grabar el registro.<br>';\n }\n\n if ($idtpidentificacion != 31){\n if ( strlen( $pnombre)== 0 || strlen( $papellido ) == 0 ){\n $Texto_Respuesta = $Texto_Respuesta . 'El nombre y apellido no pueden estar en blanco.<br>';\n }\n }else{\n if ( strlen( $razonsocial )== 0){\n $Texto_Respuesta = $Texto_Respuesta . 'El nombre de la empresa no puede quedar en blanco.<br>';\n }\n if ( strlen($digitoverificacion) == 0 ){\n $Texto_Respuesta = $Texto_Respuesta . 'Registre el dígito de verificación.<br>';\n }\n }\n\n if ( $idmcipio ==0 ){\n $Texto_Respuesta = $Texto_Respuesta . 'Debe seleccionar el municipio o ciudad en donde recide.<br>';\n }\n if ( strlen( $direccion)== 0 ){\n $Texto_Respuesta = $Texto_Respuesta . 'La dirección no puede quedar vacía.<br>';\n }\n if ( strlen( $barrio)== 0 ){\n $Texto_Respuesta = $Texto_Respuesta . 'Registre el barrio en donde reside.<br>';\n }\n if ( strlen( $celular1)== 0 ){\n $Texto_Respuesta = $Texto_Respuesta . 'Debe registrar un número de celular.<br>';\n }\n if ( $es_e_mail == FALSE || $es_email_confirm = FALSE ){\n $Texto_Respuesta = $Texto_Respuesta . 'La dirección de correo electrónico y su confirmación no pueden estar vacías y contener un formato válido.<br>';\n }\n if ( strlen( $Texto_Respuesta) == 0){\n $Texto_Respuesta ='<strong>Ya casi hemos terminado !!!</strong><br><br>Hemos enviado un enlace a tu cuenta de correo desde el cual podrás finalizar tu registro.<br><br>';\n}\n // PLAN 3 , PERSONAS NATURALES.\nif ( $idtipo_plan_compras == 3 && ( $idtpidentificacion == 13 || $idtpidentificacion == 42) ){\n if ( $mes == 0 || $dia == 0 ){\n $Texto_Respuesta ='<strong>Es necesario que registre el día y mes de nacimiento ya que estos datos se utilizan para generar su código de usuario.<br><br>';\n }\n}\n // GENERACIÓN CÓDIGO DE USUARIO. SI NO ES EMPRESA ->Generar_Codigo_Usuario .... SINO Generar_Codigo_Emmpresa\nif ( $idtpidentificacion != 31 ) {\n $Datos_Nuevo_Codigo = $this->Terceros->Generar_Codigo_Usuario($pnombre ,$papellido, $dia, $mes);\n $codigo_usuario_generado = $Datos_Nuevo_Codigo [0]['codigo_generado'];\n $genero = 0;\n}\nif ( $idtpidentificacion == 31 ) {\n $Datos_Nuevo_Codigo = $this->Terceros->Generar_Codigo_Emmpresa( $razonsocial);\n $codigo_usuario_generado = $Datos_Nuevo_Codigo [0]['codigo_generado'];\n $genero = 0;\n}\n\n\n\n$codigousuario = $codigo_usuario_generado;\n$codautorizacionmenoredad = '';\n$dianacimiento = intval($dia);\n$mesnacimiento = intval($mes);\n$email = strtolower($e_mail);\n$passwordusuario = '';\n$contacto = '';\n$telefono = '';\n$registroconfirmado = 0;\n$registro_organizado = 0;\n$param_tiene_compras = 0;\n$registro_inactivo = 0;\n$param_confirmar_nuevos_amigos_x_email = 1 ;\n$param_acepto_pago_valor_transferencia = 1;\n$valor_minimo_transferencia = 0;\n$param_idtpidentificacion_titular_cuenta = 0;\n$param_identificacion_titular_cuenta = '';\n$param_nombre_titular_cuenta = '';\n$param_idbanco_transferencias = '0';\n$param_nro_cuenta_transferencias = '';\n$param_tipo_cuenta_transferencias = '';\n$param_idmcipio_transferencias = 0;\n$param_acepto_retencion_comis_para_pago_pedidos = 0 ;\n$param_valor_comisiones_para_pago_pedidos = 0 ;\n$idtppersona = 2;\nif ($idtpidentificacion != 31){ $idtppersona = 1;}\n\n$pnombre = strtoupper($pnombre);\n$papellido = strtoupper($papellido);\n$razonsocial = strtoupper($razonsocial);\n$direccion = strtoupper($direccion);\n$barrio = strtoupper($barrio);\n\n\n$Datos_Terceros = compact('idtpidentificacion' ,'identificacion' ,'digitoverificacion' ,'pnombre' ,'papellido' , 'razonsocial' ,'genero' ,\n 'dianacimiento' ,'mesnacimiento' ,'passwordusuario' , 'direccion' ,'barrio' ,'contacto' ,'telefono' ,'celular1' ,\n 'email' ,'idmcipio' ,'codigousuario' ,'codautorizacionmenoredad' ,'codigoterceropresenta_inicial' ,\n 'codigoterceropresenta' ,'idterceropresenta' ,'registroconfirmado' ,'fechahoraregistro' ,'registro_organizado' ,\n 'param_tiene_compras' ,'registro_inactivo' , 'param_confirmar_nuevos_amigos_x_email' ,\n 'param_acepto_pago_valor_transferencia' ,'valor_minimo_transferencia' ,'param_idtpidentificacion_titular_cuenta' ,\n 'param_identificacion_titular_cuenta' ,'param_nombre_titular_cuenta' ,'param_idbanco_transferencias' ,\n 'param_nro_cuenta_transferencias' ,'param_tipo_cuenta_transferencias' ,'param_idmcipio_transferencias' ,\n 'param_acepto_retencion_comis_para_pago_pedidos' , 'param_valor_comisiones_para_pago_pedidos' ,\n 'idtppersona','nadie_presenta', 'idtipo_plan_compras');\n\n // GRABAR DATOS DEL TERCERO\n$Registro = $this->Terceros->Grabar($Datos_Terceros);\n$idtercero = $Registro[0]['idtercero'];\n$telefono = $celular1;\n$destinatario = $pnombre . ' ' . $papellido;\n$destinatario = strtoupper($destinatario);\n$iddireccion_despacho = 0;\n\n // GRABAR DIRECCION DE DESPACHO\n //------------------------------\n$Datos_Direccion_Despacho = compact('iddireccion_despacho','idtercero','idmcipio','direccion','barrio','telefono','barrio','destinatario');\n$this->Terceros->Direcciones_Despacho_Grabar_Actualizar($Datos_Direccion_Despacho);\n // ESTABLECER VARIABLES DEL DESPACHO EN CASO DE QUE SE HAGA UN PEDIDO LUEGO DEL REGISTRO\n //--------------------------------------------------------------------------------------\n$this->Consultar_Datos_Mcipio_x_Id_Direccion_Despacho(0,$idmcipio);\n\n$this->Registro_Datos_Usuario_Envio_Correo_Activacion($idtercero ,$email, $pnombre, $genero, $idtipo_plan_compras ,\n $idtpidentificacion,$razonsocial, $codigousuario);\n\n // DEJAR LAS VARIABLES EN BLANCO\n$this->Registro_Re_Establecer_Tercero_Presenta();\nSession::Destroy('idtipo_plan_compras');\n\n\n$Datos = compact('Texto_Respuesta' );\necho json_encode($Datos,256);\n}", "title": "" }, { "docid": "91520ed4f86ccf7e31112d1095b500ce", "score": "0.5707754", "text": "public function agregarEstudianteControlador()\n\t\t{\n\t\t\t//Administrador\n\t\t\t$dni = modeloPrincipal::limpiarCadena($_POST['dni-reg']);\n\t\t\t$nombre = modeloPrincipal::limpiarCadena($_POST['nombre-reg']);\n\t\t\t$apellido = modeloPrincipal::limpiarCadena($_POST['apellido-reg']);\n\t\t\t$telefono = modeloPrincipal::limpiarCadena($_POST['telefono-reg']);\n\t\t\t$direccion = modeloPrincipal::limpiarCadena($_POST['direccion-reg']);\n\t\t\t$privilegio = \"Estudiante\";\n\n\t\t\t//Cuenta\n\t\t\t$usuario = modeloPrincipal::limpiarCadena($_POST['usuario-reg']);\n\t\t\t$password1 = modeloPrincipal::limpiarCadena($_POST['password1-reg']);\n\t\t\t$password2 = modeloPrincipal::limpiarCadena($_POST['password2-reg']);\n\t\t\t$email = modeloPrincipal::limpiarCadena($_POST['email-reg']);\n\t\t\t$genero = modeloPrincipal::limpiarCadena($_POST['optionsGenero']);\n\n\t\t\t$rol = 3;\n\n\n\t\t\tif ($genero == \"Masculino\") \n\t\t\t{\n\t\t\t\t$foto = \"estudianteHombre.png\";\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\t$foto = \"estudianteMujer.png\";\n\t\t\t}\n\n\t\t\tif ($password1 != $password2)\n\t\t\t{\n\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\"Texto\" => \"Contraseñas NO coinciden, verifique nuevamente\",\n\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$consultaDNI = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT PersonaDNI FROM persona WHERE PersonaDNI='$dni'\");\n\n\t\t\t\t\tif ($consultaDNI->rowCount()>=1) {\n\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\"Texto\" => \"El DNI ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif($email != \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$consultaEmail = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT CuentaEmail FROM cuenta WHERE CuentaEmail='$email'\");\n\t\t\t\t\t\t\t$resultadoEmail = $consultaEmail->rowCount();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$resultadoEmail = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($resultadoEmail >= 1) {\n\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\"Texto\" => \"El EMAIL ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$consultaUsuario = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT CuentaUsuario FROM cuenta WHERE CuentaUsuario='$usuario'\");\n\t\t\t\t\t\t\tif($consultaUsuario->rowCount() >= 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\"Texto\" => \"El USUARIO ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t];\t\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$consultaID = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT id FROM cuenta\");\n\n\t\t\t\t\t\t\t\t$numero = ($consultaID->rowCount())+1;\n\n\t\t\t\t\t\t\t\t$codigo = modeloPrincipal::generarCodigo(\"LM\", 5, $numero);\n\n\t\t\t\t\t\t\t\t$clave = modeloPrincipal::encriptar($password1);\n\n\t\t\t\t\t\t\t\t$datosCuenta = [\n\t\t\t\t\t\t\t\t\t\"Codigo\" => $codigo,\n\t\t\t\t\t\t\t\t\t\"Usuario\" => $usuario,\n\t\t\t\t\t\t\t\t\t\"Clave\" => $clave,\n\t\t\t\t\t\t\t\t\t\"Email\" => $email,\n\t\t\t\t\t\t\t\t\t\"Estado\" => \"Activo\",\n\t\t\t\t\t\t\t\t\t\"Rol\" => $rol,\n\t\t\t\t\t\t\t\t\t\"Genero\" => $genero,\n\t\t\t\t\t\t\t\t\t\"Foto\" => $foto\n\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t\t$cuentaAgregada = modeloPrincipal::agregarCuenta($datosCuenta);\n\n\t\t\t\t\t\t\t\tif ($cuentaAgregada)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$datosEstudiante = [\n\t\t\t\t\t\t\t\t\t\t\"DNI\" => $dni,\n\t\t\t\t\t\t\t\t\t\t\"Nombre\" => $nombre,\n\t\t\t\t\t\t\t\t\t\t\"Apellidos\" => $apellido,\n\t\t\t\t\t\t\t\t\t\t\"Telefono\" => $telefono,\n\t\t\t\t\t\t\t\t\t\t\"Direccion\" => $direccion,\n\t\t\t\t\t\t\t\t\t\t\"Codigo\" => $codigo,\n\t\t\t\t\t\t\t\t\t\t\"Privilegio\" => $privilegio\n\t\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t\t\t$estudianteAgregado = estudianteModelo::agregarEstudianteModelo($datosEstudiante);\n\n\t\t\t\t\t\t\t\t\tif ($estudianteAgregado)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"limpiar\",\n\t\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Éxito\",\n\t\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"Estudiante registrado con éxito\",\n\t\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"success\"\n\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tmodeloPrincipal::eliminarCuenta($codigo);\n\n\t\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"El ESTUDIANTE NO pudo ser registrado. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\n\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{\n\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"La CUENTA NO pudo ser registrada. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\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\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn modeloPrincipal::mostrarAlerta($alerta);\n\t\t}", "title": "" }, { "docid": "5dbdb0afb143d266bea4db2b3ff8e67d", "score": "0.57064366", "text": "public function idr_encabezado( $data,$dFechaInicialAnalisis = null,$dFechaFinalAnalisis = null){ // encabezado para todos los IDR\n\t$dFechaEmision = date('Y-m-d h:m:s');\t\n\tif (isset($data[0]->FECHA_PLAGUICIDAS)){ $dFechaEmision = $data[0]->FECHA_PLAGUICIDAS; }\n\tif (isset($data[0]->FECHA_ALTA_METALES)){ $dFechaEmision = $data[0]->FECHA_ALTA_METALES; }\n\tif (isset($data[0]->FECHA_AFLATOXINAS)){ $dFechaEmision = $data[0]->FECHA_AFLATOXINAS; }\n\tif (isset($data[0]->FECHA_ALTA_MERCURIO)){ $dFechaEmision = $data[0]->FECHA_ALTA_MERCURIO; }\n\tif (isset($data[0]->FECHA_ALTA_METALES)){ $dFechaEmision = $data[0]->FECHA_ALTA_METALES; }\n\tif (isset($data[0]->FECHA_MICROBIOLOGIA)){ $dFechaEmision = $data[0]->FECHA_MICROBIOLOGIA; }\n\t\n\n\t// DATOS CLIENTE\n $cNombreCte = utf8_decode($data[0]->NOMBRE_CLIENTE);\n if (!(empty($data[0]->NOMBRE_IDR_CLIENTE )) ) {\n\t\t$cNombreCte = utf8_decode($data[0]->NOMBRE_IDR_CLIENTE);\n\t}\t\n $cDireCte = utf8_decode($data[0]->DOMICILIO_CLIENTE);\n if (!(empty($data[0]->DOMICILIO_IDR_CLIENTE) ) ){\n\t\t$cDireCte = utf8_decode($data[0]->DOMICILIO_IDR_CLIENTE);\t\t\n\t}\t\n $cAtenciona = utf8_decode($data[0]->CONTACTO_CLIENTE);\n if (!(empty($data[0]->CONTACTO_IDR_CLIENTE )) ) {\n\t\t$cAtenciona = utf8_decode($data[0]->CONTACTO_IDR_CLIENTE);\n\t}\t\n $cRfc = $data[0]->RFC_CLIENTE;\n $cTel = $data[0]->TELEFONO_CLIENTE;\n $cEmail = $data[0]->EMAIL_CLIENTE;\n \n // 2017-11-27\n $nFontSize = 7;\n \n // DATOS MUESTRA\n $cDescMuestra = utf8_decode($data[0]->DESCRIPCION_MUESTRA); // YA NO SE USA\n \n $cTipoMuestra\t\t= utf8_decode($data[0]->TIPO_MUESTRA);\n $cPesoVol\t\t\t= utf8_decode($data[0]->PESO_VOL_MUESTRA);\n $nLote = utf8_decode($data[0]->LOTE_MUESTRA); \n $dFechaRecepcion = $data[0]->FECHA_RECEPCION;\n \n \n $cOrigenMuestra\t\t= utf8_decode($data[0]->LOTE_MUESTRA); \n $IdAsigCliente = utf8_decode($data[0]->ID_ASIGNADO_CLIENTE);\n $nCant = $data[0]->NO_MUESTRAS;\n $cTemperatura\t\t= $data[0]->TEMPERATURA_MUESTRA;\n $cUbicacion = 'NA';\n \n //$dFechaAnalisis = $data[0]->FECHA_ANALISIS; --> VARIA MUY VARIADO POR CADA REPORTE SE APUNTA, ESTA VARIABLE LLEGA COMO PARAMETRO..!\n \n\t$nPosEnc = array('col1' => 10,'col2'=>20,'col3'=>38,'col4' =>60,'col5' => 90,'col6'=>110,'col7'=>135,'col8' =>155,'col9'=>165,'col10'=>205,'col11'=>206);\n \n $r =18;\n $r = $this->pdf->getY();\n $nObj = count($data );\n $nInc = 10;\n if ($nObj>4 and $nObj <12 ) { $nInc = 9;}\n if ($nObj>11 and $nObj <15 ) { $nInc = 8;}\n if ($nObj>15 and $nObj <20 ) { $nInc = 7;}\n if ($nObj>20 ) { $nInc = 7;} // este es correcto\n if ($nObj>30 ) { $nInc = 6;}\n if ($nObj>40 ) { $nInc = 5;}\n $nInc = 10;\n \n $this->pdf->setxy($nPosEnc['col1'],$r+2);\n\n $this->pdf->SetFont('Arial','B',$nFontSize+4);\n $this->pdf->cell(0,$nInc/2,'INFORME DE RESULTADOS',0,2,'C');\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col3']-$nPosEnc['col1'],$nInc/2,utf8_decode('Fecha/hora de Emisión:'),0,'C',1,false);\n $this->pdf->SetFont('Arial','B',$nFontSize); \n $this->pdf->Multicelda($nPosEnc['col5']-$nPosEnc['col3'],$nInc/2,$dFechaEmision,0,'L',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col8']-$nPosEnc['col5'],$nInc/2,'IDR:',0,'R',1,false);\n $this->pdf->SetFont('Arial','B',$nFontSize+2);\n $this->pdf->Multicelda($nPosEnc['col10']-$nPosEnc['col8'],$nInc/2,str_pad($data[0]->ID_IDR.'/'.date('y'),4,'0',STR_PAD_LEFT),0,'L',1,false);\n $this->pdf->ln($nInc/2);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col8']-$nPosEnc['col1'],$nInc/2,'ID de Muestra:',0,'R',1,false);\n $this->pdf->SetFont('Arial','B',$nFontSize+2);\n $this->pdf->Multicelda($nPosEnc['col11']-$nPosEnc['col8'],$nInc/2, $this->utilerias->Personaliza_ID_MUESTRA($data[0]->ID_MUESTRA),0,'L',1,false);\n \n $this->pdf->ln($nInc/2);\n \n /******************************************************************************************\n ********************* DATOS DEL CLIENTE ***************************************************\n ******************************************************************************************/\n \n $this->pdf->SetFont('Arial','B',$nFontSize+2);\n $this->pdf->cell(0,$nInc/2,'DATOS DEL CLIENTE',1,1,'C');\n \n $this->pdf->SetFont('Arial','',$nFontSize); \n $this->pdf->Multicelda($nPosEnc['col3']-$nPosEnc['col1'],$nInc/2,'Nombre:',1,'R',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col7']-$nPosEnc['col3'],$nInc/2,$cNombreCte,1,'L',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col9']-$nPosEnc['col7'],$nInc/2,'RFC:',1,'R',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col11']-$nPosEnc['col9'],$nInc/2,$cRfc,1,'L',1,false);\n \n $this->pdf->ln($nInc/2);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col3']-$nPosEnc['col1'],$nInc/2,utf8_decode('Dirección:'),1,'R',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n //Multicelda($ancho,$alto,$txt,$nBorde,$alig ,$nDesplaza ,$lFill =false ){\n \t\n $this->pdf->Multicelda($nPosEnc['col7']-$nPosEnc['col3'],$nInc/2,$cDireCte,1,'L',1,false); \n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col9']-$nPosEnc['col7'],$nInc/2,utf8_decode('Teléfono:'),1,'R',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col11']-$nPosEnc['col9'],$nInc/2,$cTel,1,'L',1,false); \n \n $this->pdf->ln($nInc/2);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col3']-$nPosEnc['col1'],$nInc/2,utf8_decode('Atención a:'),1,'R',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col7']-$nPosEnc['col3'],$nInc/2,$cAtenciona,1,'L',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col9']-$nPosEnc['col7'],$nInc/2,utf8_decode('Correo electrónico:'),1,'R',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicell($nPosEnc['col11']-$nPosEnc['col9'],$nInc/2,$cEmail,1,'J',false); \n \n /* ****************************************************************************\n ********************* DESCRIPCION DE LA MUESTRA *******************************\n *******************************************************************************/ \n \n $this->pdf->SetFont('Arial','B',$nFontSize+2);\n $this->pdf->cell(0,$nInc/2,utf8_decode('DESCRIPCIÓN DE LA MUESTRA'),1,1,'C');\n \n $nPosEnc = array('col1' => 10,'col2'=>25,'col3'=>38,'col4' =>60,'col5' => 90,'col6'=>135,'col7'=>135,'col8' =>155,'col9'=>165,'col10'=>205,'col11'=>206);\n \n $cTipoMuestra\t\t= utf8_decode($data[0]->TIPO_MUESTRA);\n $cPesoVol\t\t\t= utf8_decode($data[0]->PESO_VOL_MUESTRA);\n $nLote = utf8_decode($data[0]->LOTE_MUESTRA); \n $dFechaRecepcion = $data[0]->FECHA_RECEPCION;\n \n \n $cOrigenMuestra\t\t= utf8_decode($data[0]->LOTE_MUESTRA); \n $IdAsigCliente = utf8_decode($data[0]->ID_ASIGNADO_CLIENTE);\n $nCant = $data[0]->NO_MUESTRAS;\n $cTemperatura\t\t= utf8_decode($data[0]->TEMPERATURA_MUESTRA);\n $cUbicacion = 'NA';\n \n //2017-08-16\n $cDestinoMuestra\t= utf8_decode($data[0]->DESTINO_MUESTRA);\n \n //2017-11-27 \n $cRespTomaMuestra \t= utf8_decode($data[0]->TOMO_MUESTRA);\n $dFechaHoraTomaMuestra = $data[0]->FECHA_HORA_TOMA_MUESTRA;\n \n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col3']-$nPosEnc['col1'],$nInc/2,utf8_decode('Tipo de Muestra:'),1,'R',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col7']-$nPosEnc['col3'],$nInc/2,$cTipoMuestra,1,'L',1,false);\n \n $this->pdf->SetFont('Arial','',$nFontSize); \n $this->pdf->Multicelda($nPosEnc['col9']-$nPosEnc['col7'],$nInc/2,utf8_decode('Destino de la Muestra:'),1,'R',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col11']-$nPosEnc['col9'],$nInc/2,$cDestinoMuestra,1,'L',1,false); \n \n $this->pdf->ln($nInc/2);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col3']-$nPosEnc['col1'],$nInc/2,'Peso/Volumen:',1,'R',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col6']-$nPosEnc['col3'],$nInc/2,$cPesoVol,1,'L',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col9']-$nPosEnc['col6'],$nInc/2,'ID. Asignada por el Cliente:',1,'R',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col11']-$nPosEnc['col9'],$nInc/2,$IdAsigCliente,1,'L',1,false); \n \n $this->pdf->ln($nInc/2);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col3']-$nPosEnc['col1'],$nInc/2,'Lote/Origen:',1,'R',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col6']-$nPosEnc['col3'],$nInc/2,$nLote,1,'L',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col9']-$nPosEnc['col6'],$nInc/2,'Temperatura:',1,'R',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col11']-$nPosEnc['col9'],$nInc/2,$cTemperatura,1,'L',1,false); \n \n $this->pdf->ln($nInc/2);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col3']-$nPosEnc['col1'],$nInc/2,utf8_decode('Fecha/hora de Recepción:'),1,'R',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col7']-$nPosEnc['col3'],$nInc/2,$dFechaRecepcion,1,'L',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col9']-$nPosEnc['col7'],$nInc/2,utf8_decode('Fecha de Análisis:'),1,'R',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n \n $x1 = strftime(\"%Y-%m-%d\", strtotime($dFechaInicialAnalisis));\n $x2 = strftime(\"%Y-%m-%d\", strtotime($dFechaFinalAnalisis));\n $cRangoFechas = $x2;\n if (substr($data[0]->ID_MUESTRA,2,1)=='Q'){ $cRangoFechas = $x1 .' / '. $x2; }\n $this->pdf->Multicelda($nPosEnc['col11']-$nPosEnc['col9'],$nInc/2,$cRangoFechas,1,'L',1,false); \n \n //2017-11-27 anexar responsable toma de muestras\n $this->pdf->ln($nInc/2);\n $this->pdf->SetFont('Arial','',$nFontSize);\n //$this->pdf->Multicelda($nPosEnc['col3']-$nPosEnc['col1'],$nInc/2,utf8_decode('Fecha Recepción:'),1,'R',1,false);\n $this->pdf->Multicelda($nPosEnc['col3']-$nPosEnc['col1'],$nInc/2,utf8_decode('Responsable de toma de muestra:'),1,'R',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col7']-$nPosEnc['col3'],$nInc/2,utf8_decode($cRespTomaMuestra),1,'L',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col9']-$nPosEnc['col7'],$nInc/2,utf8_decode('Fecha/hora:'),1,'R',1,false);\n $this->pdf->SetFont('Arial','',$nFontSize);\n $this->pdf->Multicelda($nPosEnc['col11']-$nPosEnc['col9'],$nInc/2,utf8_decode($dFechaHoraTomaMuestra),1,'L',1,false);\n //$this->pdf->ln($nInc/2); \t\t\n $nPosEnc = array('col1' => 10,'col2'=>20,'col3'=>35,'col4' =>60,'col5' => 90,'col6'=>110,'col7'=>135,'col8' =>155,'col9'=>165,'col10'=>205,'col11'=>206);\n \n\t}", "title": "" }, { "docid": "095d437360aad38f7ea06d724a95305c", "score": "0.57059515", "text": "function afficher_appel()\r\n{\r\n global $conn ;\r\n global $_REQUEST ;\r\n global $action ;\r\n global $redirect ;\r\n global $footer_msg ;\r\n\r\n $date1 = $_REQUEST[\"date1\"] ;\r\n $date2 = $_REQUEST[\"date2\"] ;\r\n\r\n // pour que le lien retour ramène selon les cas\r\n // - à la page de saisie\r\n // - à la liste d'appels\r\n $provenance=$_REQUEST[\"provenance\"] ;\r\n if ($provenance==\"saisie\")\r\n {\r\n $action=\"saisir\" ;\r\n }\r\n elseif ($provenance==\"consultation\")\r\n {\r\n $action=\"consulter\" ;\r\n }\r\n else\r\n {\r\n $action=\"consulter.liste\" ;\r\n }\r\n\r\n $idAppel = $_REQUEST[\"idAppel\"] ;\r\n\r\n $sql = \"SELECT a.date_appel, a.envoimail, a.commentaire, a.tel, s.nom, l.nom, p.nom, \".\r\n \"h.libelle, d.prenom, t.libelle, i.libelle \".\r\n \"FROM appel a, structure s, lieu l, personne p, humeur h, destinataire d, type t, issue i \".\r\n \"WHERE a.id =\".$_REQUEST[\"idAppel\"].\" AND s.id = a.id_structure AND \".\r\n \"l.id = a.id_lieu AND p.id = a.id_personne AND \".\r\n \"h.id = a.id_humeur AND d.id = a.id_destinataire AND \".\r\n \"t.id = a.id_type AND i.id = a.id_issue \" ;\r\n $res = $conn->Execute($sql) ;\r\n\r\n if (!$res)\r\n {\r\n print \"Error 1: \" . $conn->ErrorMsg() ;\r\n die;\r\n }\r\n\r\n echo \"<BR>\" ;\r\n \r\n // on récupère les résultats de la requête\r\n $timestamp = $conn->UnixTimeStamp($res->fields[0]) ;\r\n $date = date ((\"d/m/Y\"),$timestamp) ;\r\n $heure = date ((\"H:i\"),$timestamp) ;\r\n $structure = $res->fields[4];\r\n $lieu = $res->fields[5];\r\n $appelant = $res->fields[6];\r\n $humeur = $res->fields[7];\r\n $destinataire = $res->fields[8];\r\n $type = $res->fields[9];\r\n $issue = $res->fields[10];\r\n $notif = $res->fields[1];\r\n if ($notif!=\"oui\")\r\n {\r\n $notif=\"non\" ;\r\n }\r\n $numero = $res->fields[3] ;\r\n $commentaire = $res->fields[2] ;\r\n\r\n\r\n $html = <<<END\r\n\r\n <TABLE class=\"RESULTAT\" align=\"center\">\r\n <TR>\r\n <TH>Date</TH>\r\n <TD>&nbsp; $date</TD>\r\n </TR>\r\n <TR>\r\n <TH>Heure</TH>\r\n <TD>&nbsp; $heure</TD>\r\n </TR>\r\n <TR>\r\n <TH>Structure appelante</TH>\r\n <TD>&nbsp; $structure</TD>\r\n </TR>\r\n <TR>\r\n <TH>Localisation</TH>\r\n <TD>&nbsp; $lieu</TD>\r\n </TR>\r\n <TR>\r\n <TH>Appelant</TH>\r\n <TD>&nbsp; $appelant</TD>\r\n </TR>\r\n <!--\r\n <TR>\r\n <TH>Humeur appelant</TH>\r\n <TD>&nbsp; $humeur</TD>\r\n </TR>\r\n -->\r\n <TR>\r\n <TH>Destinataire</TH>\r\n <TD>&nbsp; $destinataire</TD>\r\n </TR>\r\n <TR>\r\n <TH>Type d'appel</TH>\r\n <TD>&nbsp; $type</TD>\r\n </TR>\r\n <TR>\r\n <TH>Issue de l'appel</TH>\r\n <TD>&nbsp; $issue</TD>\r\n </TR>\r\n <TR>\r\n <TH>Notification par m&eacute;l du destinataire</TH>\r\n <TD>&nbsp; $notif</TD>\r\n </TR>\r\n <TR>\r\n <TH>Num&eacute;ro de l'appelant</TH>\r\n <TD>&nbsp; $numero</TD>\r\n </TR>\r\n <TR>\r\n <TH>Commentaire</TH>\r\n <TD>&nbsp; $commentaire</TD>\r\n </TR>\r\n </TABLE>\r\n <BR>\r\n <CENTER>\r\n <A HREF=\"index.php?action=$action&date1=$date1&date2=$date2\">Retour</A>&nbsp;|&nbsp;\r\n <A HREF=\"index.php?action=saisir.modifier&idAppel=$idAppel&date1=$date1&date2=$date2&provenance=$provenance\">Modifier</A>\r\n </CENTER>\r\n <BR><BR>\r\nEND;\r\n\r\n return(array($html, null));\r\n}", "title": "" }, { "docid": "688221cdba437e1753011a83a526e5dc", "score": "0.5705884", "text": "public function IngreseMovimientoLibroDiario($Fecha,$TipoDocInterno,$DocumentoInterno,$DocumentoExterno,$idTercero,$CuentaPUC,$NombreCuenta,$Detalle,$TipoMovimiento,$Valor,$Concepto,$idCentroCostos,$idSede,$Vector) {\r\n if($Valor<>0){\r\n if($TipoMovimiento==\"DB\"){\r\n $Debito=$Valor;\r\n $Credito=0;\r\n $Neto=$Valor;\r\n }else{\r\n $Debito=0;\r\n $Credito=$Valor;\r\n $Neto=$Valor*(-1);\r\n }\r\n $DatosTercero=$this->DevuelveValores(\"proveedores\", \"Num_Identificacion\", $idTercero);\r\n if($DatosTercero['Num_Identificacion']==''){\r\n $DatosTercero=$this->DevuelveValores(\"clientes\", \"Num_Identificacion\", $idTercero);\r\n }\r\n $DatosCentro=$this->DevuelveValores(\"centrocosto\", \"ID\", $idCentroCostos);\r\n $tab=\"librodiario\";\r\n $NumRegistros=29;\r\n \r\n $Columnas[0]=\"Fecha\";\t\t\t$Valores[0]=$Fecha;\r\n $Columnas[1]=\"Tipo_Documento_Intero\";\t$Valores[1]=$TipoDocInterno;\r\n $Columnas[2]=\"Num_Documento_Interno\";\t$Valores[2]=$DocumentoInterno;\r\n $Columnas[3]=\"Tercero_Tipo_Documento\";\t$Valores[3]=$DatosTercero['Tipo_Documento'];\r\n $Columnas[4]=\"Tercero_Identificacion\";\t$Valores[4]=$DatosTercero['Num_Identificacion'];\r\n $Columnas[5]=\"Tercero_DV\";\t\t\t$Valores[5]=$DatosTercero['DV'];\r\n $Columnas[6]=\"Tercero_Primer_Apellido\";\t$Valores[6]=$DatosTercero['Primer_Apellido'];\r\n $Columnas[7]=\"Tercero_Segundo_Apellido\"; $Valores[7]=$DatosTercero['Segundo_Apellido'];\r\n $Columnas[8]=\"Tercero_Primer_Nombre\";\t$Valores[8]=$DatosTercero['Primer_Nombre'];\r\n $Columnas[9]=\"Tercero_Otros_Nombres\";\t$Valores[9]=$DatosTercero['Otros_Nombres'];\r\n $Columnas[10]=\"Tercero_Razon_Social\";\t$Valores[10]=$DatosTercero['RazonSocial'];;\r\n $Columnas[11]=\"Tercero_Direccion\";\t\t$Valores[11]=$DatosTercero['Direccion'];\r\n $Columnas[12]=\"Tercero_Cod_Dpto\";\t\t$Valores[12]=$DatosTercero['Cod_Dpto'];\r\n $Columnas[13]=\"Tercero_Cod_Mcipio\";\t\t$Valores[13]=$DatosTercero['Cod_Mcipio'];\r\n $Columnas[14]=\"Tercero_Pais_Domicilio\"; $Valores[14]=$DatosTercero['Pais_Domicilio'];\r\n $Columnas[15]=\"CuentaPUC\";\t\t\t$Valores[15]=$CuentaPUC;\r\n $Columnas[16]=\"NombreCuenta\";\t\t$Valores[16]=$NombreCuenta;\r\n $Columnas[17]=\"Detalle\";\t\t\t$Valores[17]=$Detalle;\r\n $Columnas[18]=\"Debito\";\t\t\t$Valores[18]=$Debito;\r\n $Columnas[19]=\"Credito\";\t\t\t$Valores[19]=$Credito;\r\n $Columnas[20]=\"Neto\";\t\t\t$Valores[20]=$Neto;\r\n $Columnas[21]=\"Mayor\";\t\t\t$Valores[21]=\"NO\";\r\n $Columnas[22]=\"Esp\";\t\t\t$Valores[22]=\"NO\";\r\n $Columnas[23]=\"Concepto\";\t\t\t$Valores[23]=$Concepto;\r\n $Columnas[24]=\"idCentroCosto\";\t\t$Valores[24]=$idCentroCostos;\r\n $Columnas[25]=\"idEmpresa\";\t\t\t$Valores[25]=$DatosCentro[\"EmpresaPro\"];\r\n $Columnas[26]=\"idSucursal\"; $Valores[26]=$idSede;\r\n $Columnas[27]=\"Num_Documento_Externo\"; $Valores[27]=$DocumentoExterno;\r\n $Columnas[28]=\"idUsuario\"; $Valores[28]=$this->idUser;\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n }\r\n }", "title": "" }, { "docid": "51ac76796d72c0c4a0aed3b4da837577", "score": "0.5704991", "text": "function insertarLiquiFormaPago(){\n $this->procedimiento='decr.ft_liqui_forma_pago_ime';\n $this->transaccion='DECR_TLP_INS';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('estado_reg','estado_reg','varchar');\n $this->setParametro('id_liquidacion','id_liquidacion','int4');\n $this->setParametro('id_medio_pago','id_medio_pago','int4');\n $this->setParametro('id_auxiliar','id_auxiliar','int4');\n $this->setParametro('pais','pais','varchar');\n $this->setParametro('ciudad','ciudad','varchar');\n $this->setParametro('fac_reporte','fac_reporte','varchar');\n $this->setParametro('cod_est','cod_est','varchar');\n $this->setParametro('lote','lote','varchar');\n $this->setParametro('comprobante','comprobante','varchar');\n $this->setParametro('fecha_tarjeta','fecha_tarjeta','date');\n $this->setParametro('nro_tarjeta','nro_tarjeta','varchar');\n $this->setParametro('importe','importe','numeric');\n $this->setParametro('nro_documento_pago','nro_documento_pago','varchar');\n $this->setParametro('nombre','nombre','varchar');\n $this->setParametro('administradora','administradora','varchar');\n $this->setParametro('autorizacion','autorizacion','varchar');\n $this->setParametro('fecha_cierre','fecha_cierre','date');\n $this->setParametro('nro_terminal','nro_terminal','varchar');\n $this->setParametro('nombre_comercio','nombre_comercio','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "523dfa3cf277ee7f91de3069f09e30bc", "score": "0.5702498", "text": "function getNombre($parametros)\n\t{\n\t\treturn 'Constancia CUIT - presentado en: ' . date('d-m-Y',strtotime($parametros['fechaPresentacion']));\n\t}", "title": "" }, { "docid": "e65e1aafe36d536011b2158c5bde9589", "score": "0.570169", "text": "function registros_asistencia_por_fecha($fecha,$excluidos = array())\n\t{\t\n\t\t$query = $this->db->select(\"ROW_NUMBER() OVER (ORDER BY out_cedula) AS nro\"\n\t\t\t\t\t\t.\", b.out_id_trabajador AS id_trabajador\"\n\t\t\t\t\t\t.\", b.out_cedula AS cedula\"\n\t\t\t\t\t\t.\", out_fecha AS fecha\"\n\t\t\t\t\t\t.\", out_apellidos_nombres AS apellidos_nombres \"\n\t\t\t\t\t\t.\", out_cargo AS cargo, out_cargo_id AS cargo_id \"\n\t\t\t\t\t\t.\", out_condicion_laboral AS condicion_laboral\"\n\t\t\t\t\t\t.\", out_condicion_laboral_id AS condicion_laboral_id \"\n\t\t\t\t\t\t.\", out_coordinacion AS coordinacion\"\n\t\t\t\t\t\t.\", out_coordinacion_id AS coordinacion_id \"\n\t\t\t\t\t\t.\", out_direccion AS direccion\"\n\t\t\t\t\t\t.\", out_direccion_id AS direccion_id \"\n\t\t\t\t\t\t.\", out_hora_entrada AS hora_entrada\"\n\t\t\t\t\t\t.\", out_hora_salida AS hora_salida \"\n\t\t\t\t\t\t.\", out_horas_trabajadas AS horas_trabajadas\"\n\t\t\t\t\t\t.\", out_horas_extras AS horas_extras \"\n\t\t\t\t\t\t.\", out_observaciones AS observaciones \")\n\t\t\t\t\t\t->from(\"( SELECT * FROM asistencia.consulta_registros_asistencia('{$fecha}') ) AS b\");\n\n\t\tif( count($excluidos) > 0) $query = $this->db->where_not_in(\"b.out_cargo_id\",$excluidos);\n\n\t\t$query = $this->db->get()->result_array();\n\t\tif (count($query)>0) {\n\t\t\tforeach ($query as $key => $value) {\n\t\t\t\t$f_hora = \"\".date('h:i:s A',strtotime($value['hora_entrada'])).\"\";\n\t\t\t\t$query[$key]['hora_entrada'] = $f_hora;\n\t\t\t\t$f_hora = ($value['hora_salida'] != '00:00:00')\n\t\t\t\t\t?\"\".date('h:i:s A',strtotime($value['hora_salida'])).\"\"\n\t\t\t\t\t:$value['hora_salida'];\n\t\t\t\t$query[$key]['hora_salida'] = $f_hora;\n\t\t\t}\n\t\t}\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "3ff3bfaf346a50f52e35bb4d59b6796d", "score": "0.56950915", "text": "function creaContratoCompra($params)\n{\n //Ya registre un coche nuevo\n $COCHE = constructObjCoche($params);\n $resultCoche = $COCHE->queryaddCoche();\n $VENDEDOR = construcObjtCliente($params);\n $resultVendedor = $params['no_cliente']>0 ? $VENDEDOR->queryupdateCliente(): $VENDEDOR->queryaddCliente();\n\n if($resultVendedor && $resultCoche){\n // 1 - C_COMPRA 0-Contrato_Vta\n $tipoContrato = 1; // Compra de vehiculo\n $plazos = 1; // Porque defino que ya lo pago TORRES\n $fechaPrimerPago = date('Y-m-d');\n $totalCoche = $params['total'];\n $enganche = $totalCoche;\n $estatusContrato = 1; // va a ser terminado\n $formaPago = $params['forma_pago'];\n $CONTRATO = constructObjContrato($formaPago,$VENDEDOR->getNoCliente(),$COCHE->getNoVehiculo(),\n $tipoContrato,$plazos,$fechaPrimerPago, $totalCoche, $enganche,$estatusContrato);\n\n $resultContrato = $CONTRATO->queryaddContrato();\n\n if($resultContrato){\n include_once \"./controlPago.php\";\n $noDePago = 1;\n $concepto=\"Pago de Adquisición de Vehiculo\";\n $tipo=\"CARGO\";\n $fechaLimiTePago = date('Y-m-d H:i:s');\n $StatusPago = 1; //Liquidado de forma automatica\n $detalles = \"Se compró un vehiculo con placa \".$COCHE->getPlaca().\" año \".$COCHE->getAnio();\n //Funcion para Insertar y crear un objeto PAGO\n include_once \"tool_ids_generate.php\";\n $idPago = gen_noPago();\n $resultPago = insertaObjPago($idPago,$CONTRATO->getNoContrato(),$concepto,$tipo,$CONTRATO->getTotal(),$noDePago,$detalles,$StatusPago,$fechaLimiTePago);\n //SI YA SE CREO EL PAGO CREO EL ABONO\n if ($resultPago){\n //Crerar el OBJ de abono\n $resutlAbono = insertaAbono($idPago,$CONTRATO->getTotal(),\"Este abono es por la compra de la nueva adquisicion\");\n return $resutlAbono;\n }\n\n } else return false;\n } else return false;\n\n}", "title": "" }, { "docid": "e1fb56b084c32c8319bc02822da9cf64", "score": "0.5694517", "text": "static public function ctrCrearProveedor(){\n\n\t\tif(isset($_POST[\"nuevoRUC\"])){\n\n\t\t\tdate_default_timezone_set('America/Lima');\n\t\t\t$fecha = new DateTime();\n\t\t\t$PcReg= gethostbyaddr($_SERVER['REMOTE_ADDR']);\n\n\n\t\t\t$tabla=\"proveedor\";\n\t\t\t$datos = array(\"Cod_Local\"=>'01',\n\t\t\t\t\t\t\t\"Cod_Entidad\"=>'01',\n\t\t\t\t\t\t\t\"CodRuc\"=>$_POST[\"nuevoCodigoPro\"],\n\t\t\t\t\t\t\t\"TipPro\"=>$_POST[\"nuevoTipoProv\"],\n\t\t\t\t\t\t\t\"RucPro\"=>$_POST[\"nuevoRUC\"],\n\t\t\t\t\t\t\t\"RazPro\"=>$_POST[\"nuevaRazPro\"],\n\t\t\t\t\t\t\t\"DirPro\"=>$_POST[\"nuevaDireccion\"],\n\t\t\t\t\t\t\t\"UbiPro\"=>$_POST[\"nuevoUbiPro\"],\n\t\t\t\t\t\t\t\"TelPro1\"=>$_POST[\"nuevoTlf1\"],\n\t\t\t\t\t\t\t\"TelPro2\"=>$_POST[\"nuevoTlf2\"],\n\t\t\t\t\t\t\t\"TelPro3\"=>$_POST[\"nuevoTlf3\"],\n\t\t\t\t\t\t\t\"FaxPro\"=>$_POST[\"nuevoTlf4\"],\n\t\t\t\t\t\t\t\"ConPro\"=>$_POST[\"nuevoContacto\"],\n\t\t\t\t\t\t\t\"EmaPro\"=>$_POST[\"nuevoEmail1\"],\n\t\t\t\t\t\t\t\"EmaPro2\"=>$_POST[\"nuevoEmail2\"],\n\t\t\t\t\t\t\t\"WebPro\"=>$_POST[\"nuevaWeb\"],\n\t\t\t\t\t\t\t\"TieEnt\"=>$_POST[\"nuevoTipoEntr\"],\n\t\t\t\t\t\t\t\"ForPag\"=>$_POST[\"nuevaFormaPago\"],\n\t\t\t\t\t\t\t\"Dia\"=>$_POST[\"nuevoDias\"],\n\t\t\t\t\t\t\t\"Banco\"=>$_POST[\"nuevoBanco\"],\n\t\t\t\t\t\t\t\"Moneda\"=>$_POST[\"nuevaMoneda\"],\n\t\t\t\t\t\t\t\"NroCta\"=>$_POST[\"nuevoNroCuenta\"],\n\t\t\t\t\t\t\t\"Banco1\"=>$_POST[\"nuevoBanco1\"],\n\t\t\t\t\t\t\t\"Moneda1\"=>$_POST[\"nuevaMoneda1\"],\n\t\t\t\t\t\t\t\"NroCta1\"=>$_POST[\"nuevoNroCuenta1\"],\n\t\t\t\t\t\t\t\"EstPro\"=>'1',\n\t\t\t\t\t\t\t\"Observa\"=>$_POST[\"nuevaObservacion\"],\n\t\t\t\t\t\t\t\"FecReg\"=>$fecha->format(\"Y-m-d H:i:s\"),\n\t\t\t\t\t\t\t\"PcReg\"=>$PcReg,\n\t\t\t\t\t\t\t\"UsuReg\"=>$_SESSION[\"id\"]);\n\n\t\t\t\t\t\t\t// var_dump($datos);\n\n\t\t\t \t$respuesta = ModeloProveedores::mdlIngresarProveedor($tabla,$datos);\n\n\t\t\t \tif($respuesta == \"ok\"){\n\n\t\t\t\t\techo'<script>\n\n\t\t\t\t\tswal({\n\t\t\t\t\t\t type: \"success\",\n\t\t\t\t\t\t title: \"El proveedor ha sido guardado correctamente\",\n\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\t\twindow.location = \"proveedor\";\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t</script>';\n\n\t\t\t\t}\n\n\t\t\t\n\n\t\t}\n\n }", "title": "" }, { "docid": "80700b3b04709c34bd287cc1f0f1b551", "score": "0.56934494", "text": "function agrega_emergencia_ctraslado_edit (\n $_fecha,$_telefono,\n $_plan,$_horallam,\n $_socio,$_nombre,\n $_tiposocio,$_edad,$_sexo,\n $_identificacion,$_documento,\n $_calle,$_numero,\n $_piso,$_depto,\n $_casa,$_monoblok,\n $_barrio,$_entre1,\n $_entre2,$_localidad,\n $_referencia,$_zona,\n $_motivo1,\n $_color,\n $_observa1,$_observa2,\n $_opedesp ,$_id_ate_edit\n )\n{\n $moti_explode ['0'] = substr($_motivo1, 0, 1);\n $moti_explode ['1'] = substr($_motivo1, 1, 2);\n\n // CALCULO DE FECHA Y DIA EN QUE SE MUESTRA EL TRASLADO EN PANTALLA\n $fecha_aux = explode (\".\" ,$_fecha );\n $hora_aux = explode (\":\" ,$_horallam);\n\n $_dia_tr =$fecha_aux[2];\n $_mes_tr =$fecha_aux[1];\n $_anio_tr =$fecha_aux[0];\n $_hora_tr =$hora_aux[0];\n $_min_tr =$hora_aux[1];\n $_param_tr =12; // parametro para mostrar en pantalla\n\n $traslado_aux = restaTimestamp ($_dia_tr , $_mes_tr, $_anio_tr , $_hora_tr , $_min_tr , $_param_tr);\n //***********************************************************\n $_plan = $_plan + 0;\n $update_emergencia = '\n UPDATE atenciones_temp\n SET\n\t\t\t\t fecha = \"'.$_fecha.'\" ,\n telefono = \"'.$_telefono.'\",\n plan = \"'.$_plan.'\",\n horallam =\"'.$_horallam.'\",\n socio = \"'.($_socio).'\",\n nombre = \"'.($_nombre).'\",\n tiposocio = \"'.($_tiposocio).'\",\n edad = \"'.($_edad).'\",\n sexo = \"'.($_sexo).'\",\n identificacion = \"'.($_identificacion).'\",\n documento = \"'.($_documento).'\",\n calle = \"'.($_calle).'\",\n numero = \"'.($_numero).'\",\n piso = \"'.($_piso9).'\",\n depto = \"'.($_depto).'\",\n casa = \"'.($_casa).'\",\n monoblok = \"'.($_monoblok).'\",\n barrio = \"'.($_barrio).'\",\n entre1 = \"'.($_entre1).'\",\n entre2 =\"'.($_entre2).'\",\n localidad = \"'.($_localidad).'\",\n referencia = \"'.($_referencia).'\",\n zona = \"'.($_zona).'\",\n motivo1 ='.$moti_explode[0].',\n motivo2 = '.$moti_explode[1].',\n color = '.$_color.',\n observa1 =\"'.($_observa1).'\",\n observa2 =\"'.($_observa2).'\",\n operec =\"'.($_opedesp).'\" ,\n traslado_aux = \"'.$traslado_aux.'\"\n WHERE id = '.$_id_ate_edit.'\n ';\n\n // insert de la emergencia en atenciones temp\n mysql_query($update_emergencia);\n\n // mysql_query($insert_atencion);\n $update_emergencia='';\n //$insert_atencion='';\n //instanciamos el objeto para generar la respuesta con ajax\n $respuesta = new xajaxResponse();\n //escribimos en la capa con id=\"respuesta\" el texto que aparece en $salida\n $respuesta->addAssign(\"mensaje_agrega\",\"innerHTML\",$update_emergencia);\n\n //tenemos que devolver la instanciación del objeto xajaxResponse\n return $respuesta;\n}", "title": "" }, { "docid": "18731bdf7a19dad587757c72d892c636", "score": "0.5691847", "text": "function modificarAislador(){\n\t\t$this->procedimiento='snx.ft_aislador_ime';\n\t\t$this->transaccion='SNX_AIS_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_aislador','id_aislador','int4');\n\t\t$this->setParametro('aislador','aislador','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "90598cd61bf80c305e7612a6fd6af011", "score": "0.5689936", "text": "function insertarGestion(){\n\t\t$this->procedimiento='ccb.f_gestion_ime';\n\t\t$this->transaccion='CCB_GES_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('gestion','gestion','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "a1d21875459b713d3a1eb118b1c460b5", "score": "0.5689193", "text": "function primerDetalle(){\n\t\t$this->movBase = array(\n\t\t\t'det_regnumero' => \t$this->record->com_regnumero,\n\t\t\t'det_tipocomp' => \t$this->record->com_tipocomp,\n\t\t\t'det_numcomp' => \t$this->record->com_numcomp,\n\t\t\t'det_secuencia'=> \t0,\n\t\t\t'det_clasregistro' \t=> 0,\n\t\t\t'det_idauxiliar'=> \t0,\n\t\t\t'det_valdebito' =>\t 0,\n\t\t\t'det_valcredito'=>\t0,\n\t\t\t'det_glosa' => '',\n\t\t\t'det_estejecucion' \t=> 0,\n\t\t\t'det_fecejecucion' \t=> '2020-12-31',\n\t\t\t'det_estlibros' \t=> 0,\n\t\t\t'det_feclibros' \t=> '2020-12-31',\n\t\t\t'det_refoperativa' \t=> $this->record->com_refoperat,\n\t\t\t'det_numcheque' \t=> $this->record->com_numcomp,\n\t\t\t'det_feccheque' \t=> 0,\n\t\t\t'det_codcuenta' \t=> '' ) ;\n\t\t\t//if ($this->record->cla_ImpFlag) // Se aplica impuestos a la transaccion\n\t\t\t$this->secActual = 1;\n\n\t}", "title": "" }, { "docid": "30c01b66928fb2e88852db59a63cdf01", "score": "0.5687755", "text": "function insertarDosificacionRO(){\n $this->objFunc=$this->create('MODDosificacion');\n if($this->objParam->insertar('id_dosificacion_ro')){\n $this->res=$this->objFunc->insertarDosificacionRO($this->objParam);\n } else{\n $this->res=$this->objFunc->modificarDosificacionRO($this->objParam);\n }\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "title": "" }, { "docid": "9329de6263242fc66a31ac273c0d73a4", "score": "0.568756", "text": "public function getEdad(){\n $array_nacimiento = explode ( \"-\", $this->fnac );\n $array_actual = explode ( \"-\", date (\"Y-m-d\") );\n\n $anos = $array_actual[0] - $array_nacimiento[0]; // calculamos años\n $meses = $array_actual[1] - $array_nacimiento[1]; // calculamos meses\n $dias = $array_actual[2] - $array_nacimiento[2]; // calculamos días\n\n //ajuste de posible negativo en $días\n if ($dias < 0)\n {\n --$meses;\n\n //ahora hay que sumar a $dias los dias que tiene el mes anterior de la fecha actual\n switch ($array_actual[1]) {\n case 1: $dias_mes_anterior=31; break;\n case 2: $dias_mes_anterior=31; break;\n case 3:\n if ($this->bisiesto($array_actual[0]))\n {\n $dias_mes_anterior=29; break;\n } else {\n $dias_mes_anterior=28; break;\n }\n case 4: $dias_mes_anterior=31; break;\n case 5: $dias_mes_anterior=30; break;\n case 6: $dias_mes_anterior=31; break;\n case 7: $dias_mes_anterior=30; break;\n case 8: $dias_mes_anterior=31; break;\n case 9: $dias_mes_anterior=31; break;\n case 10: $dias_mes_anterior=30; break;\n case 11: $dias_mes_anterior=31; break;\n case 12: $dias_mes_anterior=30; break;\n }\n\n $dias=$dias + $dias_mes_anterior;\n }\n\n //ajuste de posible negativo en $meses\n if ($meses < 0)\n {\n --$anos;\n $meses=$meses + 12;\n }\n\n if ($meses==1) {\n $alisAnos= ' Anos ';\n $alisMeses= ' mes ';\n } else {\n $alisAnos= ' Anos ';\n $alisMeses= ' meses ';\n }\n\n return $anos . $alisAnos . $meses . $alisMeses . $dias . ' dias';\n }", "title": "" }, { "docid": "be34972a52b702279df4b091ea0620a0", "score": "0.5686542", "text": "function descricaoEvento(){\n\t$id_user = isset($_REQUEST['id_user'])? \t $_REQUEST['id_user'] \t : null;\n\t$idcalenEvent = isset($_REQUEST['calendEventId'])? $_REQUEST['calendEventId'] : null;\n\n\t$usuario \t= new Usuario();\n\t$permission = $usuario->verificarEventoPermission($id_user);\n\t\n\n\t$editable = $usuario->verificaPodeEditar($id_user, $idcalenEvent);\n\tif($editable){ $editar = true; }else{ $editar = false; }\n\n\tif($permission){\n\t\t$agenda = new Agenda();\n\t\theader('Content-Type: application/json; charset=utf-8');\n\t\t$file_json_array = array();\n\t\t$file_json_array = $agenda->getCalenInfo($idcalenEvent,$editar);\n\n\t\t$file_json \t\t = json_encode($file_json_array, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);\n\t\techo $file_json;\n\t}else{\n\t\t$agenda = new Agenda();\n\t\t$file_json = $agenda->ErrorPermission();\n\t\techo $file_json;\n\t}\n}", "title": "" }, { "docid": "d6f8b5e97d9382683e388b9ab1126d3f", "score": "0.5685437", "text": "function evt__form_docente__guardar($datos)\r\n\t{\r\n if($datos['legajo']==0){//si todavia no tiene legajo entoces puede rectificar datos personales\r\n $datos['nro_tabla']=1;\r\n $datos['nro_cuil1']=substr($datos['cuil'], 0, 2);\r\n $datos['nro_cuil']=substr($datos['cuil'], 2, 8);\r\n $datos['nro_cuil2']=substr($datos['cuil'], 10, 1);\r\n unset($datos['registro_firma']);//cuando el docente no tiene legajo no toca el registro firma\r\n $this->controlador()->dep('datos')->tabla('docente')->set($datos); \r\n $this->controlador()->dep('datos')->tabla('docente')->sincronizar();\r\n }else{//si el docente tiene legajo entonces solo puede actualizar correos y registro de firma\r\n $doc=$this->controlador()->dep('datos')->tabla('docente')->get();\r\n $band=$this->controlador()->dep('datos')->tabla('docente')->puede_modificar($doc['id_docente']);\r\n if($band){\r\n $datos2['correo_personal']=$datos['correo_personal'];\r\n $datos2['correo_institucional']=$datos['correo_institucional'];\r\n if (isset($datos['registro_firma'])) {\r\n $nombre=\"registro_firma_\".$doc['legajo'].\".pdf\";\r\n //$destino=\"C:/proyectos/toba_2.6.3/proyectos/designa/www/registro_firmas/\".$nombre;\r\n $destino=\"/home/andrea/toba_2.7.13/proyectos/designa/www/registro_firmas/\".$nombre;\r\n if(move_uploaded_file($datos['registro_firma']['tmp_name'], $destino)){//mueve un archivo a una nueva direccion, retorna true cuando lo hace y falso en caso de que no\r\n $datos2['registro_firma']=strval($nombre);}\r\n }\r\n $this->controlador()->dep('datos')->tabla('docente')->set($datos2); \r\n $this->controlador()->dep('datos')->tabla('docente')->sincronizar();\r\n $mensaje='SOLO SE PUEDE ACTUALIZAR CORREOS. NO ESTA PERMITIDO MODIFICAR OTROS DATOS DE UN DOCENTE QUE TIENE LEGAJO. LOS MISMOS SERAN ACTUALIZADOS PERIODICAMENTE CON INFORMACIÓN SIU-MAPUCHE';\r\n toba::notificacion()->agregar(utf8_decode($mensaje), \"info\"); \r\n }else{//no es docente de mi facultad\r\n toba::notificacion()->agregar('No es docente de su UA', \"info\"); \r\n }\r\n }\r\n if (!$this->controlador()->dep('datos')->tabla('docente')->esta_cargada()) {\r\n $doc=$this->controlador()->dep('datos')->tabla('docente')->get();\r\n $datosc['id_docente']=$doc['id_docente']; \r\n $this->controlador()->dep('datos')->tabla('docente')->cargar($datosc);\r\n }\r\n }", "title": "" }, { "docid": "2b5d722d972651c6120edb9b0b3136fd", "score": "0.56843954", "text": "function verificarTipoDosificacion(){\r\n\t\t\t$this->procedimiento='vef.ft_venta_facturacion_en_linea_ime';\r\n\t\t\t$this->transaccion='VF_REV_DOSI_IME';\r\n\t\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t\t//Define los parametros para la funcion\r\n\r\n\r\n\t\t\t$this->setParametro('id_sucursal','id_sucursal','int4');\r\n\r\n\t\t\t//Ejecuta la instruccion\r\n\t\t\t$this->armarConsulta();\r\n\t\t\t$this->ejecutarConsulta();\r\n\r\n\t\t\t//Devuelve la respuesta\r\n\t\t\treturn $this->respuesta;\r\n\t\t}", "title": "" }, { "docid": "ff24cb435354d02ea3635138849694e8", "score": "0.56827444", "text": "function autogenerate_trans($kd_docno){\n $nopo=\"\";$nomorpo=0;\n $param=array(\n 'kd_docno' => $kd_docno,\n 'kd_dealer' => $this->session->userdata(\"kd_dealer\"),\n 'tahun_docno' => date('Y'),\n // 'bulan_docno' => (int)substr($this->input->post('tahun_docno'), 3, 2),\n 'nama_docno' => 'NO TRANS File UDPRG',\n 'reset_docno' => 1,\n 'created_by' => $this->session->userdata('user_id'),\n 'lastmodified_by' => $this->session->userdata('user_id'),\n 'limit' => 1,\n 'offset' => 0\n );\n $bulan_kirim = date('m');\n $nomor_po=$this->curl->simple_get(API_URL.\"/api/setup/docno\",$param);\n $kd_dealer = str_pad($this->session->userdata(\"kd_dealer\"), 3, 0, STR_PAD_LEFT);\n //format nomor po : Nama Document-Kode Dealer-Tahunbulan-nomorurut\n if ($nomor_po == 0) {\n $nopo = $kd_docno . $kd_dealer . $param[\"tahun_docno\"] . str_pad($bulan_kirim, 2, '0', STR_PAD_LEFT) . \"-00001\";\n $param['urutan_docno'] = $nomor_po+1;\n $this->curl->simple_post(API_URL.\"/api/setup/setup_docno\",$param, array(CURLOPT_BUFFERSIZE => 10));\n } else {\n $nomorpo = $nomor_po+1;\n $nopo = $kd_docno . $kd_dealer . $param[\"tahun_docno\"] . str_pad($bulan_kirim, 2, '0', STR_PAD_LEFT) . \"-\" . str_pad($nomorpo, 5, '0', STR_PAD_LEFT);\n $param['urutan_docno'] = $nomor_po;\n $this->curl->simple_put(API_URL.\"/api/setup/docno\",$param, array(CURLOPT_BUFFERSIZE => 10));\n }\n //var_dump($nopo);exit();\n return $nopo;\n }", "title": "" }, { "docid": "69954549671b53510e6be97edca738a6", "score": "0.5682225", "text": "public function RegistrePagoComisionTitulo($fecha, $IDVenta, $Pago, $Observaciones,$CuentaOrigen,$CentroCosto,$idUser, $Vector){\r\n \r\n $DatosCentro=$this->DevuelveValores(\"centrocosto\",\"ID\",$CentroCosto);\r\n $DatosVenta=$this->DevuelveValores(\"titulos_ventas\",\"ID\",$IDVenta);\r\n $CuentaDestino= $this->DevuelveValores(\"parametros_contables\", \"ID\", 8);\r\n \r\n $Concepto=\"Pago de comision por Venta de Titulo $DatosVenta[Mayor1] de la promocion $DatosVenta[Promocion] al Sr. $DatosVenta[NombreColaborador] con CC $DatosVenta[idColaborador]\";\r\n $idProveedor=$DatosVenta[\"idColaborador\"];\r\n $VectorEgreso[\"Origen\"]=\"comisionestitulos\";\r\n $idEgreso=$this->CrearEgreso($fecha, $fecha, $idUser, $CentroCosto, \"Contado\", $CuentaOrigen, $CuentaDestino[\"CuentaPUC\"], 0, $idProveedor, $Concepto, $DatosVenta[\"ID\"], \"\", 1, $Pago, 0, $Pago, 0, 0, 0, 0, 0, 0, $VectorEgreso);\r\n //////Agrego a la tabla abonos\r\n \r\n $tab=\"titulos_comisiones\";\r\n $NumRegistros=9;\r\n\r\n $Columnas[0]=\"Fecha\"; $Valores[0]=$fecha;\r\n $Columnas[1]=\"idVenta\"; $Valores[1]=$IDVenta;\r\n $Columnas[2]=\"Monto\"; $Valores[2]=$Pago;\r\n $Columnas[3]=\"idColaborador\";\t\t$Valores[3]=$DatosVenta[\"idColaborador\"];\r\n $Columnas[4]=\"NombreColaborador\";\t\t$Valores[4]=$DatosVenta[\"NombreColaborador\"];\r\n $Columnas[5]=\"idEgreso\"; $Valores[5]=$idEgreso;\r\n $Columnas[6]=\"Observaciones\"; $Valores[6]=$Observaciones;\r\n $Columnas[7]=\"Hora\"; $Valores[7]=date(\"H:i:s\");\r\n $Columnas[8]=\"idUsuario\"; $Valores[8]= $this->idUser;\r\n \r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n \r\n $SaldoComision=$DatosVenta[\"SaldoComision\"]-$Pago;\r\n $TotalPagos=$DatosVenta[\"ComisionAPagar\"]-$SaldoComision;\r\n \r\n $sql=\"UPDATE titulos_ventas SET SaldoComision='$SaldoComision' WHERE ID='$IDVenta'\";\r\n $this->Query($sql);\r\n $sql=\"UPDATE titulos_listados_promocion_$DatosVenta[Promocion] SET TotalPagoComisiones='$TotalPagos' WHERE Mayor1='$DatosVenta[Mayor1]'\";\r\n $this->Query($sql);\r\n //$idComprobanteAbono=$this->ObtenerMAX($tab,\"ID\", 1,\"\");\r\n \r\n return($idEgreso);\r\n \r\n \r\n\t}", "title": "" }, { "docid": "c3c2ef55724389bd5d7ac4d604513368", "score": "0.5679408", "text": "public function setNotaCredito( $comprobantePago )\n { //dd($comprobantePago->motivoNota);\n $note = new Note();\n $note\n ->setTipDocAfectado( $comprobantePago->tipoDocumentoPago->codigo_sunat ) //01 factura 03 boleta\n ->setNumDocfectado( $comprobantePago->tipoDocumentoPago->prefijo. $comprobantePago->serie->name.'-'.$comprobantePago->numero ) //doc 'F001-111'\n\n //->setCodMotivo( $comprobantePago->codMotivo ) //estaba 07, por item, CATALOGO 09\n //->setCodMotivo( '07' ) //estaba 07, por item, CATALOGO 09\n ->setCodMotivo( $comprobantePago->nota->motivoNota->codigo_sunat ) //estaba 07, por item, CATALOGO 09\n //->setDesMotivo( $comprobantePago->desMotivo )\n ->setDesMotivo( $comprobantePago->nota->motivo )\n ->setFechaEmision(new \\DateTime( $comprobantePago->nota->fecha_emision ))\n\n ->setUblVersion('2.1')\n ->setTipoDoc('07') //07 Nota de credito\n ->setSerie( $comprobantePago->tipoDocumentoPago->prefijo. $comprobantePago->nota->serie->name )\n ->setCorrelativo( $comprobantePago->nota->numero )\n //->setSerie( 'B001' )// si el documento modifica a una factura sera F si modifica a una boleta sera B\n //->setCorrelativo( '0001' )\n ->setTipoMoneda( 'PEN' )\n ->setCompany( $this->company )\n ->setClient( $this->client )\n ->setMtoOperGravadas( $comprobantePago->monto_gravada )\n ->setMtoOperInafectas( $comprobantePago->monto_inafecta )\n ->setMtoOperExoneradas( $comprobantePago->monto_exogerado )\n ->setMtoOperGratuitas( $comprobantePago->monto_gratuito )\n ->setMtoIGV( $comprobantePago->igv_total )\n ->setTotalImpuestos( $comprobantePago->igv_total )\n ->setMtoImpVenta( $comprobantePago->monto_importe_total_venta )\n ->setLegends( [\n (new Legend())\n ->setCode('1000')\n ->setValue( NumberLetter::convertToLetter( $comprobantePago->monto_importe_total_venta ) )\n ]);\n\n //->setMtoDescuentos Total Descuento Global\n //->setDescuentos Descuento Global\n\n $detalles = [];\n foreach ($comprobantePago->invoiceDetail as $key => $invoiceDetail) {\n\n $item = new SaleDetail();\n $item->setCodProducto( $invoiceDetail->concepto->codigo )\n ->setCodProdSunat( $invoiceDetail->concepto->codigo_sunat )\n ->setUnidad( $invoiceDetail->concepto->unidad_medida )\n ->setCantidad( $invoiceDetail->cantidad )\n ->setDescripcion( $invoiceDetail->descripcion )\n ->setMtoBaseIgv( $invoiceDetail->base_igv )\n ->setPorcentajeIgv( $invoiceDetail->porcentaje_igv )\n ->setIgv( $invoiceDetail->igv )\n ->setTipAfeIgv($invoiceDetail->concepto->tipo_afecta_igv)\n ->setTotalImpuestos( $invoiceDetail->igv )\n ->setMtoValorUnitario( $invoiceDetail->valor_unitario )\n ->setMtoPrecioUnitario( $invoiceDetail->precio_unitario )\n ->setMtoValorVenta( $invoiceDetail->valor_venta );\n\n if ($invoiceDetail->descuento_linea > 0) {\n $montoBase = $invoiceDetail->cantidad * $invoiceDetail->precio;\n $item->setDescuentos([(\n new Charge())\n ->setCodTipo('00')\n ->setFactor( round($invoiceDetail->descuento_linea / $montoBase,4) )\n ->setMonto( $invoiceDetail->descuento_linea )\n ->setMontoBase( $montoBase )\n ]);\n }\n array_push($detalles, $item);\n\n }\n $note->setDetails($detalles);\n\n return $note;\n }", "title": "" }, { "docid": "d1861968e577e85411dece912b1a23e8", "score": "0.56683487", "text": "public function crear_factura_por_conexion()\n\t{\n\t\t//Para hacer uso de los métodos\n\t\t$this->load->model('Impresiones_model');\n\t\t$conexiones = $this->input->post(\"miselect\");\n\t\t//var_dump($conexiones);die();\n\t\t$datos[\"resultado\"] = $this->Impresiones_model->buscar_lote_por_conexion($conexiones);\n\t\t//var_dump($datos[\"resultado\"]);die();\n\t\t$datos[\"configuracion\"] = $this->Crud_model->get_data(\"configuracion\");\n \t\t//var_dump($nuevafecha,$fecha );die();\n\t\t$pdf = new eFPDF();\n\t\t$pdf->probando_tabla_por_lote($datos);\n\t}", "title": "" }, { "docid": "acc1a2d6272f9c444d5ae9253b8e8025", "score": "0.56659305", "text": "final public function fomacionInfo() : array{\n\n $success=0;\n $message='not successfull';\n $data=[];\n\n $p = $this->db->select('fm_escuela,fm_periodo_ini,fm_periodo_end,fm_terminado,fm_carrera','jc_formacion','fm_id_user='.$this->user.'');\n \n if (false != $p ) {\n \n $data = $p;\n $success=1;\n $message='success';\n } \n\n return ['success'=>$success,'message'=>$message,'data'=>$data];\n\n }", "title": "" }, { "docid": "09f55e0ddbda75db09e579719e22f7ca", "score": "0.56633013", "text": "function requisiciones()\n {\n $resultReq = $this->ComprasModel->getPeriodoFecha();\n if($resultReq->num_rows>0){\n $periodoFecha = $resultReq->fetch_assoc();\n\n $ano=$periodoFecha['ano'];\n $mes=$periodoFecha['mes'];\n $cerrado=$periodoFecha['cerrado'];\n $pc=$periodoFecha['permitir_cerrados'];\n $pa=$periodoFecha['periodos_abiertos'];\n $diaActual=date('d');\n if(strlen($mes)==1){ $mes='0'.$mes; }\n\n if($cerrado==1 && $pc==0){\n $sd=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed=$ano.\"-\".$mes.\"-\".$diaActual;\n\n $sd2=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed2=$ano.\"-\".$mes.\"-\".$diaActual;\n }\n\n if($cerrado==1 && $pc==1 && $pa==1){\n $sd=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed=($ano+1).\"-\".$mes.\"-\".$diaActual;\n\n $sd2=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed2=($ano+1).\"-\".$mes.\"-\".$diaActual;\n }\n\n if($cerrado==1 && $pc==1 && $pa==0){\n $sd=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed=($ano+1).\"-\".$mes.\"-31\";\n\n $sd2=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed2=($ano+1).\"-\".$mes.\"-31\";\n }\n\n if($cerrado==1 && $pc==0 && $pa==1){\n $sd=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed=($ano+1).\"-\".$mes.\"-\".$diaActual;\n\n $sd2=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed2=($ano+1).\"-\".$mes.\"-\".$diaActual;\n }\n\n if($cerrado==0 && $pa==0){\n $sd=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed=$ano.\"-\".$mes.\"-31\";\n\n $sd2=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed2=($ano+1).\"-12-31\";\n }\n\n if($cerrado==0 && $pa==1){\n $sd=$ano.\"-\".$mes.\"-01\";\n $ed=($ano).\"-12-31\";\n\n $sd2=$ano.\"-\".$mes.\"-01\";\n $ed2=($ano+1).\"-12-31\";\n }\n\n //$sd=$ano.\"-\".$mes.\"-\".$diaActual;\n //echo '<br>';\n //$ed=$ano.\"-\".$mes.\"-31\";\n\n \n\n\n\n }else{\n $periodoFecha=0;\n }\n\n $resultReq = $this->ComprasModel->getAlmacen();\n if($resultReq->num_rows>0){\n while ($r = $resultReq->fetch_assoc()) {\n $almacenes[]=$r;\n }\n }else{\n $almacenes=0;\n }\n\n $resultReq = $this->ComprasModel->getEmpleados();\n if($resultReq->num_rows>0){\n while ($r = $resultReq->fetch_assoc()) {\n $empleados[]=$r;\n }\n }else{\n $empleados=0;\n }\n\n $resultReq = $this->ComprasModel->getTipoGasto();\n if($resultReq->num_rows>0){\n while ($r = $resultReq->fetch_assoc()) {\n $tipoGasto[]=$r;\n }\n }else{\n $tipoGasto=0;\n }\n\n $resultReq = $this->ComprasModel->getProveedores();\n if($resultReq->num_rows>0){\n while ($r = $resultReq->fetch_assoc()) {\n $proveedores[]=$r;\n }\n }else{\n $proveedores=0;\n }\n\n $resultReq = $this->ComprasModel->getProductos();\n if($resultReq->num_rows>0){\n while ($r = $resultReq->fetch_assoc()) {\n $productos[]=$r;\n }\n }else{\n $productos=0;\n }\n\n $resultReq = $this->ComprasModel->getMonedas();\n if($resultReq->num_rows>0){\n while ($r = $resultReq->fetch_assoc()) {\n $monedas[]=$r;\n }\n }else{\n $monedas=0;\n }\n\n $resultReq = $this->ComprasModel->getUsuario();\n if($resultReq->num_rows>0){\n $set = $resultReq->fetch_assoc();\n $username=$set['username'];\n $iduser=$set['idempleado'];\n }else{\n $username='Favor de salir y loguearse nuevamente';\n $iduser='0';\n }\n\n require('views/compras/requisiciones.php');\n }", "title": "" }, { "docid": "f4a3517f6de012b6696652b3abd222d7", "score": "0.5661655", "text": "function getDatosActa()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'acta'));\n $oDatosCampo->setEtiqueta(_(\"acta\"));\n // Las actcas de otras r sólo tienen la sigla de la r\n $oDatosCampo->setRegExp(\"/^(\\?|\\w{1,6}\\??)(\\s+([0-9]{0,3})\\/([0-9]{2})\\??)?$/\");\n $txt = \"No tienen el formato: 'dlxx nn/aa'. Debe tener sólo un espacio.\";\n $txt .= \"\\nSi sólo se sabe la region/dl poner la sigla.\\nSi no se sabe nada poner ?.\\n\";\n $oDatosCampo->setRegExpText(_($txt));\n return $oDatosCampo;\n }", "title": "" }, { "docid": "f768d8470a3b73ada1491b25f9a099c3", "score": "0.5661052", "text": "public function RegistreComprobanteEgresoLibre($idComprobante){\r\n $Hora=date(\"H:i:s\");\r\n $DatosGenerales=$this->DevuelveValores(\"egresos\",\"idEgresos\",$idComprobante);\r\n $Consulta=$this->ConsultarTabla(\"comprobantes_egreso_items\", \"WHERE idComprobante='$idComprobante'\");\r\n while($DatosComprobante=$this->FetchArray($Consulta)){\r\n $Fecha=$DatosComprobante[\"Fecha\"];\r\n \r\n if($DatosComprobante[\"OrigenMovimiento\"]=='cartera'){\r\n $DatosCuentasXPagar=$this->DevuelveValores(\"cuentasxpagar\", \"ID\", $DatosComprobante[\"idOrigen\"]);\r\n $NuevoSaldo=$DatosCuentasXPagar[\"Saldo\"]-$DatosComprobante[\"Debito\"];\r\n $TotalAbonos=$DatosCuentasXPagar[\"Abonos\"]+$DatosComprobante[\"Debito\"];\r\n $NumRegistros=6;\r\n $Columnas[0]=\"Fecha\"; $Valores[0]=$Fecha;\r\n $Columnas[1]=\"Hora\";\t\t$Valores[1]=$Hora;\r\n $Columnas[2]=\"idCuentaXPagar\";\t$Valores[2]=$DatosCuentasXPagar[\"ID\"];\r\n $Columnas[3]=\"Monto\";\t\t$Valores[3]=$DatosComprobante[\"Debito\"];\r\n $Columnas[4]=\"idUsuarios\"; $Valores[4]=$this->idUser;\r\n $Columnas[5]=\"idComprobanteEgreso\"; $Valores[5]=$idComprobante;\r\n\r\n $this->InsertarRegistro(\"cuentasxpagar_abonos\",$NumRegistros,$Columnas,$Valores);\r\n\r\n $this->ActualizaRegistro(\"cuentasxpagar\", \"Saldo\", $NuevoSaldo, \"ID\", $DatosCuentasXPagar[\"ID\"]);\r\n $this->ActualizaRegistro(\"cuentasxpagar\", \"Abonos\", $TotalAbonos, \"ID\", $DatosCuentasXPagar[\"ID\"]);\r\n $this->ActualizaRegistro(\"cuentasxpagar\", \"Estado\", \"\", \"ID\", $DatosCuentasXPagar[\"ID\"]);\r\n //$idComprobanteAbono=$this->ObtenerMAX($tab,\"ID\", 1,\"\");\r\n }\r\n \r\n \r\n $tab=\"librodiario\";\r\n $NumRegistros=28;\r\n $CuentaPUC=$DatosComprobante[\"CuentaPUC\"];\r\n $NombreCuenta=$DatosComprobante[\"NombreCuenta\"];\r\n $DatosCliente=$this->DevuelveValores(\"clientes\", \"Num_Identificacion\", $DatosComprobante[\"Tercero\"]);\r\n if($DatosCliente[\"Num_Identificacion\"]==''){\r\n $DatosCliente=$this->DevuelveValores(\"proveedores\", \"Num_Identificacion\", $DatosComprobante[\"Tercero\"]);\r\n }\r\n $DatosCentro=$this->DevuelveValores(\"centrocosto\", \"ID\", $DatosComprobante[\"CentroCostos\"]);\r\n \r\n $Columnas[0]=\"Fecha\";\t\t\t$Valores[0]=$Fecha;\r\n $Columnas[1]=\"Tipo_Documento_Intero\";\t$Valores[1]=\"CompEgreso\";\r\n $Columnas[2]=\"Num_Documento_Interno\";\t$Valores[2]=$idComprobante;\r\n $Columnas[3]=\"Tercero_Tipo_Documento\";\t$Valores[3]=$DatosCliente['Tipo_Documento'];\r\n $Columnas[4]=\"Tercero_Identificacion\";\t$Valores[4]=$DatosCliente['Num_Identificacion'];\r\n $Columnas[5]=\"Tercero_DV\"; $Valores[5]=$DatosCliente['DV'];\r\n $Columnas[6]=\"Tercero_Primer_Apellido\";\t$Valores[6]=$DatosCliente['Primer_Apellido'];\r\n $Columnas[7]=\"Tercero_Segundo_Apellido\"; $Valores[7]=$DatosCliente['Segundo_Apellido'];\r\n $Columnas[8]=\"Tercero_Primer_Nombre\";\t$Valores[8]=$DatosCliente['Primer_Nombre'];\r\n $Columnas[9]=\"Tercero_Otros_Nombres\";\t$Valores[9]=$DatosCliente['Otros_Nombres'];\r\n $Columnas[10]=\"Tercero_Razon_Social\";\t$Valores[10]=$DatosCliente['RazonSocial'];\r\n $Columnas[11]=\"Tercero_Direccion\"; $Valores[11]=$DatosCliente['Direccion'];\r\n $Columnas[12]=\"Tercero_Cod_Dpto\"; $Valores[12]=$DatosCliente['Cod_Dpto'];\r\n $Columnas[13]=\"Tercero_Cod_Mcipio\"; $Valores[13]=$DatosCliente['Cod_Mcipio'];\r\n $Columnas[14]=\"Tercero_Pais_Domicilio\"; $Valores[14]=$DatosCliente['Pais_Domicilio'];\r\n\r\n $Columnas[15]=\"CuentaPUC\"; $Valores[15]=$CuentaPUC;\r\n $Columnas[16]=\"NombreCuenta\";\t\t$Valores[16]=$NombreCuenta;\r\n $Columnas[17]=\"Detalle\"; $Valores[17]=$DatosGenerales[\"Concepto\"];\r\n $Columnas[18]=\"Debito\";\t\t\t$Valores[18]=$DatosComprobante[\"Debito\"];\r\n $Columnas[19]=\"Credito\"; $Valores[19]=$DatosComprobante[\"Credito\"];\r\n $Columnas[20]=\"Neto\";\t\t\t$Valores[20]=$Valores[18]-$Valores[19];\r\n $Columnas[21]=\"Mayor\";\t\t\t$Valores[21]=\"NO\";\r\n $Columnas[22]=\"Esp\";\t\t\t$Valores[22]=\"NO\";\r\n $Columnas[23]=\"Concepto\"; $Valores[23]=$DatosComprobante[\"Concepto\"];\r\n $Columnas[24]=\"idCentroCosto\";\t\t$Valores[24]=$DatosComprobante[\"CentroCostos\"];\r\n $Columnas[25]=\"idEmpresa\"; $Valores[25]=1;\r\n $Columnas[26]=\"idSucursal\"; $Valores[26]=$DatosComprobante[\"idSucursal\"];\r\n $Columnas[27]=\"Num_Documento_Externo\"; $Valores[27]=$DatosComprobante[\"NumDocSoporte\"];\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n \r\n \r\n }\r\n $this->ActualizaRegistro(\"egresos\", \"TipoEgreso\", \"EgresoLibre\", \"idEgresos\", $idComprobante);\r\n \r\n }", "title": "" }, { "docid": "286e4910daf6542ada551862c10837a1", "score": "0.565958", "text": "static public function ctrAgregarRentaAuto(){\n\t//.................................................estatus_auto\n\t// $ChecarRenta = ModeloRentas::mdlChecarAuto(\"estatus_auto\",$_POST[\"id_auto\"]);\n\t\t$tabla = \"renta_autos\";\n\n\t\t$contratos = ModeloRentas::mdlMostrarContratos($tabla);\n\n\t\t$folio = 0;\n\t\tif(!$contratos){\n\t\t\t$folio = 1;\n\t\t }else{\n\t\t \t$folio = intval($contratos[\"num_contrato\"])+ 1;\n\t\t }\n\t\t$ser = 1;\n\t\t$servicios = $_POST[\"Servicios_Adicionales\"];\n\t\tif($servicios == \"\" || $servicios == null || $servicios == \"[]\" ){\n\t\t\t$ser = 0;\n\n\t\t} \n\t\t$por = 0;\n\t\t$precioH = 0;\n\n\t\tif(isset($_POST[\"Por\"]) && isset($_POST[\"input_precio\"])){\n\t\t\t$por = $_POST[\"Por\"];\n\t\t\t$precioH = $_POST[\"input_precio\"];\n\t\t}\n\t\t$tabla2 =\"factura_renta\";\n\n\t\tif($_POST[\"nuevoFactura\"] == 1){\n\n\n\t\t\t$datos = array(\"id\" => $_POST[\"id_user\"],\n\t\t\t\t\t \"dias\" => $_POST[\"num_dias\"],\n\t\t\t\t\t \"folio\" => $folio,\n\t\t\t\t\t \"horas\" => $_POST[\"num_horas\"],\n\t\t\t\t\t \"fecha_regreso\" => $_POST[\"fecha_regreso\"],\n\t\t\t\t\t \"hora_regreso\" => $_POST[\"hora_regreso\"],\n\t\t\t\t\t \"fecha_salida\" => $_POST[\"fecha_salida\"],\n\t\t\t\t\t \"hora_salida\" => $_POST[\"hora_salida\"],\n\t\t\t\t\t \"hora_extra\" => $_POST[\"DiaE\"],\n\t\t\t\t\t \"id_auto\" => $_POST[\"id_auto\"],\n\t\t\t\t\t \"monto\" => $_POST[\"input_monto\"],\n\t\t\t\t\t \"plus\" => $_POST[\"input_plus\"],\n\t\t\t\t\t \"factura\" => $_POST[\"nuevoFactura\"],\n\t\t\t\t\t \"iva\" => $_POST[\"radio_iva\"],\n\t\t\t\t\t \"check\" => $_POST[\"che\"],\n\t\t\t\t\t \"domicilio\" => $_POST[\"direccion_particular\"],\n\t\t\t\t\t \"tipo_factura\" => $_POST[\"nuevoTipoFac\"],\n\t\t\t\t\t \"cobrar\" => $_POST[\"Cobrar\"],\n\t\t\t\t\t \"cobrar_por\" => $por,\n\t\t\t\t\t \"precio\" => $precioH,\n\t\t\t\t\t \"total_horas\" => $_POST[\"TotalHoras\"],\n\t\t\t\t\t \"datos_factura\" => $_POST[\"direccion_fiscal\"]);\n\n\t\t\t$respuesta = ModeloRentas::mdlCrearRentaFactura($tabla, $datos,$tabla2);\n\t\t\t\n\t\t\t$res = ModeloRentas::mdlObtenerIdRenta($tabla,$_POST[\"id_auto\"],$_POST[\"fecha_salida\"]);\n\t\t\t\n\t\t\tif($ser==1){\n\t\t\t\t$tabla_ser = \"renta_servicios_adicionales\";\n\t\t\t\t$id_renta = $res[\"id_renta\"];\n\t\t\t\t$serVi = ModeloRentas::mdlAgregarServiciosA($tabla_ser,$id_renta,$servicios,$_POST[\"TotalServi\"]);\n\n\t\t\t}\n\t\t\t$tablaStatus = \"estatus_auto\";\n\t\t\t$desactivar = ModeloRentas::mdlDesactivarAutoRentado($tablaStatus,$_POST[\"id_auto\"]);\n\t\t\treturn $res[\"id_renta\"];\n\t\t\t\n\n\t\t}else{\n\n\t\t\t$datos = array(\"id\" => $_POST[\"id_user\"],\n\t\t\t\t\t \"dias\" => $_POST[\"num_dias\"],\n\t\t\t\t\t \"folio\" => $folio,\n\t\t\t\t\t \"horas\" => $_POST[\"num_horas\"],\n\t\t\t\t\t \"fecha_regreso\" => $_POST[\"fecha_regreso\"],\n\t\t\t\t\t \"hora_regreso\" => $_POST[\"hora_regreso\"],\n\t\t\t\t\t \"fecha_salida\" => $_POST[\"fecha_salida\"],\n\t\t\t\t\t \"hora_salida\" => $_POST[\"hora_salida\"],\n\t\t\t\t\t \"hora_extra\" => $_POST[\"DiaE\"],\n\t\t\t\t\t \"id_auto\" => $_POST[\"id_auto\"],\n\t\t\t\t\t \"monto\" => $_POST[\"input_monto\"],\n\t\t\t\t\t \"plus\" => $_POST[\"input_plus\"],\n\t\t\t\t\t \"factura\" => $_POST[\"nuevoFactura\"],\n\t\t\t\t\t \"iva\" => $_POST[\"radio_iva\"],\n\t\t\t\t\t \"check\" => $_POST[\"che\"],\n\t\t\t\t\t \"domicilio\" => $_POST[\"direccion_particular\"],\n\t\t\t\t\t \"cobrar\" => $_POST[\"Cobrar\"],\n\t\t\t\t\t \"cobrar_por\" => $por,\n\t\t\t\t\t \"precio\" => $precioH,\n\t\t\t\t\t \"total_horas\" => $_POST[\"TotalHoras\"]);\n\t\t\t$respuesta = ModeloRentas::mdlCrearRentaSinFactura($tabla, $datos);\n\n\t\t\t$res = ModeloRentas::mdlObtenerIdRenta($tabla,$_POST[\"id_auto\"],$_POST[\"fecha_salida\"]);\n\n\t\t\tif($ser==1){\n\t\t\t\t$tabla_ser = \"renta_servicios_adicionales\";\n\t\t\t\t$id_renta = $res[\"id_renta\"];\n\t\t\t\t$serVi = ModeloRentas::mdlAgregarServiciosA($tabla_ser,$id_renta,$servicios,$_POST[\"TotalServi\"]);\n\n\t\t\t}\n\t\t\t$tablaStatus = \"estatus_auto\";\n\t\t\t$desactivar = ModeloRentas::mdlDesactivarAutoRentado($tablaStatus,$_POST[\"id_auto\"]);\n\t\t\treturn $res[\"id_renta\"];\n\n\t\t\t\n\t\n\t\t}\n\t\t\n\n\t//.................................................\t\n\t}", "title": "" }, { "docid": "1bcbf0a8d5d8e2ce9192b06a4a397412", "score": "0.56565034", "text": "function RecuperarCliente(){\r\n\t\t\t$this->procedimiento='vef.ft_venta_facturacion_exportacion_ime';\r\n\t\t\t$this->transaccion='VEF_CLIEXPO_MOD';\r\n\t\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t\t//Define los parametros para la funcion\r\n\t\t\t$this->setParametro('nit','nit','varchar');\r\n\t\t\t$this->setParametro('razon_social','razon_social','varchar');\r\n\t\t\t$this->setParametro('complemento_nit','complemento_nit','varchar');\r\n\t\t\t//Ejecuta la instruccion\r\n\t\t\t$this->armarConsulta();\r\n\r\n\t\t\t$this->ejecutarConsulta();\r\n\r\n\t\t\t//Devuelve la respuesta\r\n\t\t\treturn $this->respuesta;\r\n\t\t}", "title": "" }, { "docid": "fde5bf2e25380753507f255a25c89f06", "score": "0.5649712", "text": "function modificarBoletosObservados(){\r\n $this->procedimiento='obingresos.ft_boletos_observados_ime';\r\n $this->transaccion='OBING_BOBS_MOD';\r\n $this->tipo_procedimiento='IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_boletos_observados','id_boletos_observados','int4');\r\n $this->setParametro('estado_reg','estado_reg','varchar');\r\n $this->setParametro('pnr','pnr','varchar');\r\n $this->setParametro('nro_autorizacion','nro_autorizacion','varchar');\r\n $this->setParametro('moneda','moneda','varchar');\r\n $this->setParametro('importe_total','importe_total','numeric');\r\n $this->setParametro('fecha_emision','fecha_emision','date');\r\n $this->setParametro('estado_p','estado_p','varchar');\r\n $this->setParametro('forma_pago','forma_pago','varchar');\r\n $this->setParametro('medio_pago','medio_pago','varchar');\r\n $this->setParametro('instancia_pago','instancia_pago','varchar');\r\n $this->setParametro('office_id_emisor','office_id_emisor','varchar');\r\n $this->setParametro('pnr_prov','pnr_prov','varchar');\r\n $this->setParametro('nro_autorizacion_prov','nro_autorizacion_prov','varchar');\r\n $this->setParametro('office_id_emisor_prov','office_id_emisor_prov','varchar');\r\n $this->setParametro('importe_prov','importe_prov','numeric');\r\n $this->setParametro('moneda_prov','moneda_prov','varchar');\r\n $this->setParametro('estado_prov','estado_prov','varchar');\r\n $this->setParametro('fecha_autorizacion_prov','fecha_autorizacion_prov','date');\r\n $this->setParametro('tipo_error','tipo_error','varchar');\r\n $this->setParametro('tipo_validacion','tipo_validacion','varchar');\r\n $this->setParametro('prov_informacion','prov_informacion','varchar');\r\n //$this->setParametro('id_instancia_pago','id_instancia_pago','int4');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "3bb9119cdc01e23dbe21cc8a010d96d2", "score": "0.56461763", "text": "static public function ctrRegistroBitacoraReporte(){\n\n\n\t\t$tabla = \"bitacora\";\n\n\t\t$datos = array(\"usuario\" => $_SESSION['nombre'],\n\t\t\t\t\t\t\t \"perfil\" => $_SESSION['perfil'],\n\t\t\t\t\t\t\t \"accion\" => 'Descarga Reporte Facturación',\n\t\t\t\t\t\t\t \"folio\" => 'Sin folio');\n\n\t\t$respuesta = ModeloFacturasTiendas::mdlRegistroBitacoraReporte($tabla, $datos);\n\n\t\treturn $respuesta;\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "54f6b9dab61d7c70011bd82432450314", "score": "0.56449014", "text": "function buscar_info_transito($Id_inventario_material, $todos, $orden)\r\n\t{\r\n\t\t$Info = array();\r\n\t\t\r\n\t\tif($todos == 'si')\r\n\t\t{\r\n\t\t\t$SQL = '';\r\n\t\t}\r\n\t\telseif($todos == '')\r\n\t\t{\r\n\t\t\t$SQL = 'and tran.finalizado = \"n\"';\r\n\t\t}\r\n\t\t//Consulta extraer la informacion del pedido en transito solicitado.\r\n\t\t$Consulta = 'select cantidad, tran.orden, mate.numero_individual,\r\n\t\t\t\t\t\t\t\ttran.cantidad_solicitada, mate.id_inventario_material, tran.finalizado,\r\n\t\t\t\t\t\t\t\ttran.detalle, tran.tipo, mate.numero_cajas, tran.fecha_ingreso\r\n\t\t\t\t\t\t\t\tfrom inventario_material mate, pedido_transito tran\r\n\t\t\t\t\t\t\t\twhere mate.id_inventario_material = tran.id_inventario_material\r\n\t\t\t\t\t\t\t\t'.$SQL.'\r\n\t\t\t\t\t\t\t\tand tran.id_grupo = \"'.$this->session->userdata[\"id_grupo\"].'\"\r\n\t\t\t\t\t\t\t\tand mate.id_inventario_material = \"'.$Id_inventario_material.'\"\r\n\t\t\t\t\t\t\t\torder by tran.id_ped_transito asc\r\n\t\t\t\t\t\t\t\t';\r\n\t\t//echo $Consulta;\r\n\t\t//Ejecutamos la consulta.\r\n\t\t$Resultado = $this->db->query($Consulta);\r\n\t\r\n\t\tif(0 < $Resultado->num_rows())\r\n\t\t{\r\n\t\t\tforeach($Resultado->result_array() as $Datos)\r\n\t\t\t{\r\n\t\t\t\t$Orden = $Datos['orden'];\r\n\t\t\t\t$Info[$Orden]['orden'] = $Orden;\r\n\t\t\t\t$Info[$Orden]['detalle'] = $Datos['detalle'];\r\n\t\t\t\t$Info[$Orden]['cantidad_solicitada'] = $Datos['cantidad_solicitada'];\r\n\t\t\t\t$Info[$Orden]['cantidad_placas'] = number_format((($Datos['cantidad'] / $Datos['numero_individual']) / $Datos['numero_cajas']), 2);\r\n\t\t\t\t$Info[$Orden]['id_inventario_material'] = $Datos['id_inventario_material'];\r\n\t\t\t\t$Info[$Orden]['fecha_ingreso'] = $Datos['fecha_ingreso'];\r\n\t\t\t\t$Info[$Orden]['finalizado'] = $Datos['finalizado'];\r\n\t\t\t\t$Info[$Orden]['tipo'] = $Datos['tipo'];\r\n\t\t\t\t\r\n\t\t\t\t//Consulta para extraer el historial del pedido en transito.\r\n\t\t\t\t$Consulta = 'select * from\r\n\t\t\t\t\t\t\t\t\t\tpedido_transito_cantidad cant, pedido_transito trans\r\n\t\t\t\t\t\t\t\t\t\twhere cant.orden = \"'.$Orden.'\"\r\n\t\t\t\t\t\t\t\t\t\tand cant.id_inventario_material = \"'.$Id_inventario_material.'\"\r\n\t\t\t\t\t\t\t\t\t\tand cant.orden = trans.orden\r\n\t\t\t\t\t\t\t\t\t\tand trans.id_inventario_material = cant.id_inventario_material\r\n\t\t\t\t\t\t\t\t\t\torder by cant.id_ped_tran_cantidad';\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t//echo $Consulta;\t\t\t\t\t\r\n\t\t\t\t//Ejecutamos la consulta.\r\n\t\t\t\t$Resultado = $this->db->query($Consulta);\r\n\t\t\t\t$Info[$Orden]['detalles'] = array();\r\n\t\t\t\t//Asignamos la informacion a un array.\r\n\t\t\t\tforeach($Resultado->result_array() as $Datos_cantidad)\r\n\t\t\t\t{\r\n\t\t\t\t\t$Info[$Orden]['detalles'][$Datos_cantidad['id_ped_tran_cantidad']]['cant_anterior'] = $Datos_cantidad['cant_anterior'];\r\n\t\t\t\t\t$Info[$Orden]['detalles'][$Datos_cantidad['id_ped_tran_cantidad']]['cant_ingresar'] = $Datos_cantidad['cant_ingresar'];\r\n\t\t\t\t\t$Info[$Orden]['detalles'][$Datos_cantidad['id_ped_tran_cantidad']]['fecha'] = $Datos_cantidad['fecha'];\r\n\t\t\t\t\t$Info[$Orden]['detalles'][$Datos_cantidad['id_ped_tran_cantidad']]['restante'] = $Datos_cantidad['cant_anterior'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//print_r($Info);\r\n\t\treturn $Info;\r\n\t}", "title": "" }, { "docid": "2f9ec3083f4c707133e5e6a99d93e3c2", "score": "0.5634544", "text": "public function mostrarVentanaTesoreriaAperturaDeDocumentos() {\r\n $oLOrden = new LOrden();\r\n\r\n $codPerCajero = $_SESSION['id_persona']; //c_cod_per de persona logueada //se muestra en la vista\r\n $nomCompletoCajero = htmlentities($_SESSION['nombre']); //Nombre completo del usuario logueado //se muestra en la vista\r\n//$c_cod_per=\"0151860\";//njaimes caja 34 serie 034 para recibos\r\n//$c_cod_per=\"0364835\";//Patty caja 28 serie 028 para recibos\r\n//$codCaja=$oLOrden->spListaCaja($c_cod_per);\r\n $codCaja = $_SESSION[\"iIdCaja\"]; //se muestra en la vista\r\n//$numFormato=103;\r\n $numFormato = 121;\r\n $rs = $oLOrden->spListaFechaServidor($numFormato);\r\n $fechaActualServidor = $rs[0][\"fechaServidor\"]; //se muestra en la vista\r\n\r\n $rptaCrearCierreTesoreria = $oLOrden->spCrearCierreTesoreria();\r\n\r\n $indSeleccionado = \"\";\r\n $opcionesCboTipoComprobante = $this->listarOpcionesCboTipoComprobante($codCaja, $fechaActualServidor, $indSeleccionado);\r\n require_once(\"../../cvista/orden/vistaAperturaDeDocumentos.php\");\r\n }", "title": "" }, { "docid": "e31340e97841311ab1242f2cd682ca57", "score": "0.5632035", "text": "public function extrato()\r\n\t{\r\n\t\techo \"Cliente {$this->cliente} possui a conta $this->conta na agencia $this->agencia \r\n\t\tcom saldo \".parent::getSaldo().\" e conta tipo $this->tipoConta <br/>\";\r\n\t}", "title": "" }, { "docid": "164d788ed6094e996fe102a7485c8434", "score": "0.56314546", "text": "function modificarCotizacionDetalle(){\r\n\t\t$this->procedimiento='mat.ft_cotizacion_detalle_ime';\r\n\t\t$this->transaccion='MAT_CDE_MOD';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_cotizacion_det','id_cotizacion_det','int4');\r\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\r\n\t\t$this->setParametro('id_detalle','id_detalle','int4');\r\n\t\t$this->setParametro('id_solicitud','id_solicitud','int4');\r\n\t\t$this->setParametro('cantidad_det','cantidad_det','int4');\r\n\t\t$this->setParametro('precio_unitario','precio_unitario','numeric');\r\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\r\n\t\t$this->setParametro('precio_unitario_mb','precio_unitario_mb','numeric');\r\n\t\t$this->setParametro('cd','cd','varchar');\r\n\t\t$this->setParametro('id_day_week','id_day_week','int4');\r\n $this->setParametro('nro_parte_cot','nro_parte_cot','varchar');\r\n $this->setParametro('nro_parte_alterno_cot','nro_parte_alterno_cot','varchar');\r\n $this->setParametro('referencia_cot','referencia_cot','varchar');\r\n $this->setParametro('descripcion_cot','descripcion_cot','varchar');\r\n $this->setParametro('explicacion_detallada_part_cot','explicacion_detallada_part_cot','varchar');\r\n $this->setParametro('tipo_cot','tipo_cot','varchar');\r\n\r\n\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "8fb0c5d7d6981db85be0f3657ebb3c52", "score": "0.56311303", "text": "function insertarPrueba(){\n\t\t$this->procedimiento='cobra.f_tcb_prueba_ime';\n\t\t$this->transaccion='CB_PRUEBA_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('empleado','empleado','bool');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('fecha','fecha','date');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('sueldo','sueldo','numeric');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "6a54daf1013e400e147e8994a25be59e", "score": "0.56292623", "text": "function modificarPrueba(){\n\t\t$this->procedimiento='cobra.f_tcb_prueba_ime';\n\t\t$this->transaccion='CB_PRUEBA_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_prueba','id_prueba','int4');\n\t\t$this->setParametro('empleado','empleado','bool');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('fecha','fecha','date');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('sueldo','sueldo','numeric');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "1ea4fc6e55ff9547586402de798a1a0e", "score": "0.5624961", "text": "private function create($data)\n\t{\n\t\t// POR DEFAULT EL ESTADO ES ACTIVO\n\t\t$fields = array('estado' => BD_TRATAMIENTO_ACTIVO);\n\t\t// FORMATEO LA FECHA DE INICIO ENVIADA, O SETEO NOW POR DEFAULT\n\t\t$data['fecha_hora_inicio'] = empty($data['fecha_hora_inicio']) ? date('Y-m-d H:i:s') : self::format_date($data['fecha_hora_inicio']);\n\t\t// SI LA TECNICA NO VIENE, ENTONCES USO UNA DEFAULT\n\t\t$data['tecnica'] = isset($data['tecnica']) && is_numeric($data['tecnica']) ? $data['tecnica'] : BD_TECNICA_DEFAULT;\n\t\t// FILTRO LOS CAMPOS VALIDOS\n\t\tforeach ($data as $k => $v) {\n\t\t\t// VALIDO QUE EL CAMPO SEA VALIDO\n\t\t\tif (self::valid_field($k) && $v) {\n\t\t\t\t// Y AGREGO EL VALOR\n\t\t\t\t$value = self::DB()->escape(utf8_decode($v));\n\n\t\t\t\tif ($value) {\n\t\t\t\t\t$fields[$k] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// CREO EL ODONTOGRAMA PARA EL TRATAMIENTO\n\t\t$Odontogram = new Odontogram();\n\t\t$fields['id_odontograma'] = $Odontogram->id;\n\t\t// LA HISTORIA DEL DIAGNOSTICO PARA EL TRATAMIENTO\n\t\t$History = new History();\n\t\t$fields['id_historia'] = $History->id;\n\t\t// ASIGNO EXAMEN AL TRATAMIENTO\n\t\t$Exam = new Exam();\n\t\t$fields['id_examen'] = $Exam->id;\n\t\t// AGEGO EL DIAGNOSTICO PARA EL TRATAMIENTO\n\t\t$Diagnostic = new Diagnostic();\n\t\t$fields['id_diagnostico'] = $Diagnostic->id;\n\t\t// CREO EL RESUMEN DEL DIAGNOSTICO PARA EL TRATAMIENTO\n\t\t$Resume = new Resume();\n\t\t$fields['id_resumen'] = $Resume->id;\n\t\t// IMPLODE CON LAS COLUMNAS\n\t\t$implode_keys = implode(\",\", array_keys($fields));\n\t\t// IMPLODE CON LOS VALORES\n\t\t$implode_values = implode(\"','\", $fields);\n\t\t// ARMO LA QUERY\n\t\t$q = \"INSERT INTO tratamientos ({$implode_keys}) VALUES ('{$implode_values}')\";\n\t\t// EJECUTO LA QUERY\n\t\tself::DB()->query($q);\n\t\t// SETEO EL ID A LA INSTANCIA\n\t\t$this->id = self::DB()->lastID();\n\t}", "title": "" }, { "docid": "9be51f92d91401bb960f14e20af8bea4", "score": "0.5623412", "text": "function crear($nombre,$evento,$aparato)\n{\n\t$link = mysql_connect('localhost', 'suprema', 'suprema')\n\t or die('No se pudo conectar: ' . mysql_error());\n\tmysql_select_db('Suprema') or die('No se pudo seleccionar la base de datos');\n\n\t// Realizar una consulta MySQL\n\t$query = 'select u.Nombre as nombre, r.Evento as evento, r.Dispositivo as dispositivo from Registro r join (select max(time) a from Registro group by Dispositivo) x on r.Time = x.a join Usuarios u on r.Usuario = u.Id join Dispositivos d on d.Id = r. Dispositivo join Eventos e on r.Evento = e.Id';\n\t$result = mysql_query($query) or die('Consulta fallida: ' . mysql_error());\n\n\t// Sacamos de a una las lineas de la consulta\n\twhile ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {\n\t\t$fullname = $line[\"nombre\"];\n \t\t$evento = $line[\"evento\"];\n \t\t$aparato = $line[\"dispositivo\"];\n\n\t\t//Manipulamos para poner el nombre y debajo el apellido\n\t\t$fullname = explode(\" \",$fullname);\n\t\t$string = $fullname[0].\"\\n\".$fullname[1];\n\n \t\t//Elegimos el prediseño de la imagen\n \t\tif($evento == \"3\") $imagepath=\"images/ok.png\";\n \t\telse if($evento == \"4\")$imagepath=\"images/NotOk.png\";\n\t\telse{ \n\t\t\t$imagepath = \"images/warning.png\";\n\t\t\t$string = \"Usuario No\\nRegistrado\";\n\t\t}\n\n \t\t//$string = $nombre.\" \".$evento.\" \".$aparato;\n\t\techo $string;\n\t\n\t\t//Creamos la imagen y añadimos el texto\n\t\t$image1 = @imagecreatefrompng( $imagepath)\n \t\t\tor die('No se puede Iniciar el nuevo flujo a la imagen GD');\n\t\t$color_texto = imagecolorallocate($image1, 0, 0, 0);\n\t\timagettftext($image1,25,0,60,60,$color_texto,\"/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf\",$string);\n\t\timagepng($image1,\"images/\".$aparato.\".png\");\n\t\timagedestroy($image1);\n\n\t}\n\n\t// Liberar resultados\n\tmysql_free_result($result);\n\n\t// Cerrar la conexión\n\tmysql_close($link);\n}", "title": "" } ]
4cfc3c708cbb8b07ea84f58cfa7fc4c8
Create request for operation 'getPageInkAnnotations'
[ { "docid": "152c0c93fdb37bd7c908580c9ca03f28", "score": "0.588101", "text": "protected function getPageInkAnnotationsRequest($name, $page_number, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getPageInkAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling getPageInkAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/ink';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" } ]
[ { "docid": "5d614f330d4adc1953a539ce8db21799", "score": "0.54514915", "text": "protected function postPageInkAnnotationsRequest($name, $page_number, $annotations, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling postPageInkAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling postPageInkAnnotations'\n );\n }\n // verify the required parameter 'annotations' is set\n if ($annotations === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $annotations when calling postPageInkAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/ink';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($annotations)) {\n $_tempBody = $annotations;\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "d88a1334aa7a13ca3eedbb18882bcd3d", "score": "0.53496116", "text": "protected function getDocumentInkAnnotationsRequest($name, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getDocumentInkAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/annotations/ink';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "ed2f10ce237b76e3f567f110de6804cd", "score": "0.52617836", "text": "public function getPageInkAnnotationsWithHttpInfo($name, $page_number, $storage = null, $folder = null)\n {\n $returnType = '\\Aspose\\PDF\\Model\\InkAnnotationsResponse';\n $request = $this->getPageInkAnnotationsRequest($name, $page_number, $storage, $folder);\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 '\\Aspose\\PDF\\Model\\InkAnnotationsResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "8f6c78812cf54702babf88cf87edf0e7", "score": "0.50137866", "text": "public function getPageInkAnnotations($name, $page_number, $storage = null, $folder = null)\n {\n try\n {\n list($response) = $this->getPageInkAnnotationsWithHttpInfo($name, $page_number, $storage, $folder);\n return $response;\n }\n catch (ApiException $ex)\n {\n if ($ex->getCode() == 401)\n {\n $this->_requestToken();\n list($response) = $this->getPageInkAnnotationsWithHttpInfo($name, $page_number, $storage, $folder);\n return $response;\n }\n else\n {\n throw $ex;\n }\n }\n }", "title": "" }, { "docid": "2b1280f2f94b8daeea627ec37b215a78", "score": "0.49787438", "text": "protected function getPageStrikeOutAnnotationsRequest($name, $page_number, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getPageStrikeOutAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling getPageStrikeOutAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/strikeout';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "80d844a5b593935c9a8dce596bb8917a", "score": "0.49294555", "text": "public function getPageInkAnnotationsAsync($name, $page_number, $storage = null, $folder = null)\n {\n return $this->getPageInkAnnotationsAsyncWithHttpInfo($name, $page_number, $storage, $folder)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "25467c62ffcf74946690b1d42c167d37", "score": "0.49197435", "text": "function getAnnotations($annotationName, $elementName='');", "title": "" }, { "docid": "d6998bc78147833852e54c386b2aff4e", "score": "0.49125588", "text": "protected function getInkAnnotationRequest($name, $annotation_id, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getInkAnnotation'\n );\n }\n // verify the required parameter 'annotation_id' is set\n if ($annotation_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $annotation_id when calling getInkAnnotation'\n );\n }\n\n $resourcePath = '/pdf/{name}/annotations/ink/{annotationId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($annotation_id !== null) {\n $resourcePath = str_replace(\n '{' . 'annotationId' . '}',\n ObjectSerializer::toPathValue($annotation_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 ['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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "ff70a1db4277f46222d194bd3bef7500", "score": "0.48763448", "text": "public function getMethodAnnotations();", "title": "" }, { "docid": "ec365a805abb5c5707751a494874fd4b", "score": "0.4848843", "text": "public function getPageInkAnnotationsAsyncWithHttpInfo($name, $page_number, $storage = null, $folder = null)\n {\n $returnType = '\\Aspose\\PDF\\Model\\InkAnnotationsResponse';\n $request = $this->getPageInkAnnotationsRequest($name, $page_number, $storage, $folder);\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 }", "title": "" }, { "docid": "89d5167bb7f2c021f2b358a4a91bf50a", "score": "0.47308642", "text": "public function getDocumentInkAnnotationsWithHttpInfo($name, $storage = null, $folder = null)\n {\n $returnType = '\\Aspose\\PDF\\Model\\InkAnnotationsResponse';\n $request = $this->getDocumentInkAnnotationsRequest($name, $storage, $folder);\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 '\\Aspose\\PDF\\Model\\InkAnnotationsResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "e6b2bb41475f1fecdac5f1996a5cc9e4", "score": "0.46987325", "text": "protected function getPageHighlightAnnotationsRequest($name, $page_number, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getPageHighlightAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling getPageHighlightAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/highlight';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "67468124289a7b32b97aebe5107413b0", "score": "0.46678466", "text": "public function getAnnotationsCategory()\n {\n $response = $this->api->getAnnotationsCategory($this->request->query->all());\n\n return $this->json($response);\n }", "title": "" }, { "docid": "9f1e297247ba36c7a25600e7fe584b94", "score": "0.46579385", "text": "protected function getAnnotations()\n {\n return array();\n }", "title": "" }, { "docid": "4fe15c677b4e54d131b29d00054e0303", "score": "0.46443588", "text": "protected function getPageUnderlineAnnotationsRequest($name, $page_number, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getPageUnderlineAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling getPageUnderlineAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/underline';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "36ffecc18d708d041a9705d6f5ca4168", "score": "0.46356863", "text": "public function getPropertiesAnnotations() {}", "title": "" }, { "docid": "f852acf7ed67191f66ad45c6972f7809", "score": "0.45545793", "text": "protected function postPageStrikeOutAnnotationsRequest($name, $page_number, $annotations, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling postPageStrikeOutAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling postPageStrikeOutAnnotations'\n );\n }\n // verify the required parameter 'annotations' is set\n if ($annotations === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $annotations when calling postPageStrikeOutAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/strikeout';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($annotations)) {\n $_tempBody = $annotations;\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "826cb9027f211fb26ec109553f968b34", "score": "0.4546558", "text": "protected function getPageAnnotationsRequest($name, $page_number, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getPageAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling getPageAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "efe6956d5c4f4d8f19129dc950ff6a58", "score": "0.45295334", "text": "public function postPageInkAnnotationsWithHttpInfo($name, $page_number, $annotations, $storage = null, $folder = null)\n {\n $returnType = '\\Aspose\\PDF\\Model\\AsposeResponse';\n $request = $this->postPageInkAnnotationsRequest($name, $page_number, $annotations, $storage, $folder);\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 '\\Aspose\\PDF\\Model\\AsposeResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "e9d7537e38ad2715b2ac272e19877379", "score": "0.45215848", "text": "public function getAnnotationPages($request, $response, $argument)\n {\n $id = $argument['id'];\n $data = $this->api->getAnnotationPages($id, $this->request->query->all());\n\n return $this->json($data);\n }", "title": "" }, { "docid": "7954aeddb4d366014d98efb511d0ab03", "score": "0.44631016", "text": "function getAnnotoriousResourceAnnotations($resource, $page = 0)\n {\n global $baseurl;\n\n $annotations = array();\n\n /*\n Build an annotations array of Annotorious annotation objects\n\n IMPORTANT: until ResourceSpace will have text fields implemented as nodes, text should be left blank.\n \n NOTE: src attribute is generated per resource (dummy source) to avoid issues when source is\n loaded from download.php\n */\n foreach(getResourceAnnotations($resource, $page) as $annotation)\n {\n $annotations[] = array(\n 'src' => \"{$baseurl}/annotation/resource/{$resource}\",\n 'text' => '',\n 'shapes' => array(\n array(\n 'type' => 'rect',\n 'geometry' => array(\n 'x' => (float) $annotation['x'],\n 'y' => (float) $annotation['y'],\n 'width' => (float) $annotation['width'],\n 'height' => (float) $annotation['height'],\n )\n )\n ),\n 'editable' => annotationEditable($annotation),\n\n // Custom ResourceSpace properties for Annotation object\n 'ref' => (int) $annotation['ref'],\n 'resource' => (int) $annotation['resource'],\n 'resource_type_field' => (int) $annotation['resource_type_field'],\n 'page' => (int) $annotation['page'],\n 'tags' => getAnnotationTags($annotation),\n );\n }\n\n return $annotations;\n }", "title": "" }, { "docid": "7253b5d5019db2166e3185bfdb5ba281", "score": "0.4446134", "text": "public static function getRequest()\n {\n $attr = new \\stdClass();\n $attr->coords = Utility::loadParam('coords', []);\n $attr->regions = Utility::loadParam('regions', []);\n $attr->wkt = Utility::loadParam('wkt', []);\n $attr->output = Utility::loadParam('output', 'png');\n $attr->width = (float)Utility::loadParam('width', 900);\n $attr->height = (float)Utility::loadParam('height', $attr->width/2);\n $attr->projection = Utility::loadParam('projection', 'epsg:4326');\n $attr->projection_map = Utility::loadParam('projection_map', 'epsg:4326');\n $attr->origin = (int)Utility::loadParam('origin', false);\n $attr->bbox_map = Utility::loadParam('bbox_map', '-180,-90,180,90');\n $attr->bbox_rubberband = Utility::loadParam('bbox_rubberband', []);\n $attr->pan = Utility::loadParam('pan', false);\n $attr->layers = Utility::loadParam('layers', []);\n $attr->graticules = (array_key_exists('grid', $attr->layers)) ? true : false;\n $attr->watermark = Utility::loadParam('watermark', false);\n $attr->gridspace = Utility::loadParam('gridspace', false);\n $attr->hide_gridlabel = Utility::loadParam('hide_gridlabel', false);\n $attr->download = Utility::loadParam('download', false);\n $attr->crop = Utility::loadParam('crop', false);\n $attr->options = Utility::loadParam('options', []);\n $attr->border_thickness = (float)Utility::loadParam('border_thickness', 1.25);\n $attr->rotation = (int)Utility::loadParam('rotation', 0);\n $attr->zoom_in = Utility::loadParam('zoom_in', false);\n $attr->zoom_out = Utility::loadParam('zoom_out', false);\n $attr->download_factor = (int)Utility::loadParam('download_factor', 1);\n $attr->file_name = Utility::loadParam('file_name', time());\n $attr->download_token = Utility::loadParam('download_token', md5(time()));\n setcookie(\"fileDownloadToken\", $attr->download_token, time()+3600, \"/\");\n\n return $attr;\n }", "title": "" }, { "docid": "4aa63403912747501d20d77c2365223a", "score": "0.44448662", "text": "protected function getPageLinkAnnotationsRequest($name, $page_number, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getPageLinkAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling getPageLinkAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/links';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "e5877edcf6e6d3a39378c3ebad7b92eb", "score": "0.44430482", "text": "protected function getPageLineAnnotationsRequest($name, $page_number, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getPageLineAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling getPageLineAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/line';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "2010f09bfa41f2dea115ed2dcfdda65b", "score": "0.44202253", "text": "public function getPageStrikeOutAnnotationsWithHttpInfo($name, $page_number, $storage = null, $folder = null)\n {\n $returnType = '\\Aspose\\PDF\\Model\\StrikeOutAnnotationsResponse';\n $request = $this->getPageStrikeOutAnnotationsRequest($name, $page_number, $storage, $folder);\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 '\\Aspose\\PDF\\Model\\StrikeOutAnnotationsResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "0dfb7a5b4730c09161c4c12c897b47fe", "score": "0.44168067", "text": "function getResourceAnnotations($resource, $page = 0)\n {\n if(0 >= $resource)\n {\n return array();\n }\n\n $resource = escape_check($resource);\n $page = escape_check($page);\n\n $sql_page_filter = 'AND `page` IS NULL';\n if(0 < $page)\n {\n $sql_page_filter = \"AND `page` IS NOT NULL AND `page` = '{$page}'\";\n }\n\n return sql_query(\"SELECT * FROM annotation WHERE resource = '{$resource}' {$sql_page_filter}\");\n }", "title": "" }, { "docid": "c9734bfac12cfe34a2023cda86c7c0f9", "score": "0.44035694", "text": "protected function getPageCircleAnnotationsRequest($name, $page_number, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getPageCircleAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling getPageCircleAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/circle';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "afd642c274fddd980a9c7bc9687ee29b", "score": "0.44032168", "text": "public function getAnnotations()\r\n {\r\n throw new Exception('Annotation isteme hatası. Bu özellik kaldırıldı.');\r\n }", "title": "" }, { "docid": "2195c00c49475afc001a4e00d58d337f", "score": "0.44006687", "text": "function list_annotations($entity_guid, $name = \"\", $limit = 25, $asc = true) {\n\t\t\n\t\tif ($asc) {\n\t\t\t$asc = \"asc\";\n\t\t} else {\n\t\t\t$asc = \"desc\";\n\t\t}\n\t\t$count = count_annotations($entity_guid, \"\", \"\", $name);\n\t\t$offset = (int) get_input(\"annoff\",0);\n\t\t$annotations = get_annotations($entity_guid, \"\", \"\", $name, \"\", \"\", $limit, $offset, $asc);\n\t\t\n\t\treturn elgg_view_annotation_list($annotations, $count, $offset, $limit);\n\t\t\n\t}", "title": "" }, { "docid": "dec1c73b27688f36e6674fdf27372a80", "score": "0.4396507", "text": "public function GetAttributesAnotations ();", "title": "" }, { "docid": "418bd3ecd3f081cb135b43eee2c129c5", "score": "0.4385917", "text": "public function getAnnotations()\n {\n return $this->annotations;\n }", "title": "" }, { "docid": "418bd3ecd3f081cb135b43eee2c129c5", "score": "0.4385917", "text": "public function getAnnotations()\n {\n return $this->annotations;\n }", "title": "" }, { "docid": "ba56d56f2ee53b005550a3a3ddd9d785", "score": "0.43724087", "text": "protected function getImageAttributes()\n {\n return $this->cObj->parameters;\n }", "title": "" }, { "docid": "cdec68ffdfae150310df76f2c22f3247", "score": "0.43591744", "text": "public function getDocumentInkAnnotationsAsyncWithHttpInfo($name, $storage = null, $folder = null)\n {\n $returnType = '\\Aspose\\PDF\\Model\\InkAnnotationsResponse';\n $request = $this->getDocumentInkAnnotationsRequest($name, $storage, $folder);\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 }", "title": "" }, { "docid": "a80213c94a8da47e378e0412fcf40b02", "score": "0.43555048", "text": "protected function getDocumentStrikeOutAnnotationsRequest($name, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getDocumentStrikeOutAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/annotations/strikeout';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "533c3972c857d9dfd6d5e93b1fb06042", "score": "0.43542632", "text": "protected function putAnnotationsFlattenRequest($name, $start_page = null, $end_page = null, $annotation_types = null, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling putAnnotationsFlatten'\n );\n }\n\n $resourcePath = '/pdf/{name}/annotations/flatten';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($start_page !== null) {\n $queryParams['startPage'] = ObjectSerializer::toQueryValue($start_page);\n }\n // query params\n if ($end_page !== null) {\n $queryParams['endPage'] = ObjectSerializer::toQueryValue($end_page);\n }\n // query params\n if (is_array($annotation_types)) {\n $annotation_types = ObjectSerializer::serializeCollection($annotation_types, 'csv', true);\n }\n if ($annotation_types !== null) {\n $queryParams['annotationTypes'] = ObjectSerializer::toQueryValue($annotation_types);\n }\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "282ddfea4ee772dc6525eb6c1ca6a1c9", "score": "0.4349507", "text": "public function getAnnotations(): array\n {\n return $this->annotations;\n }", "title": "" }, { "docid": "5116abb2d80230748dc77690b19e6545", "score": "0.43449247", "text": "public function getAllAnnotations() {\r\n\t\t$this->analyzeComment();\r\n\r\n\t\treturn $this->docComment->getAllAnnotations();\r\n\t}", "title": "" }, { "docid": "02c590edf6be5db2af4b6b9ea4c5d5c9", "score": "0.43353593", "text": "public function getClassAnnotations() {}", "title": "" }, { "docid": "6b2d03ae44b37a2c84ce6ccaae58bef3", "score": "0.4332232", "text": "function recognise($fileName) {\n\n $r = array();\n\n # instantiates a client\n $imageAnnotator = new ImageAnnotatorClient();\n\n # prepare the image to be annotated\n $image = file_get_contents($fileName);\n\n # performs label detection on the image file\n $response = $imageAnnotator->labelDetection($image);\n $labels = $response->getLabelAnnotations();\n\n if ($labels) {\n //echo(\"Labels:\" . PHP_EOL);\n foreach ($labels as $label) {\n if (goolge_label_filter($label->getDescription()))\n $r['labels'][] = $label->getDescription();\n }\n }\n\n $response = $imageAnnotator->landmarkDetection($image);\n $locations = $response->getLandmarkAnnotations();\n\n if ($locations) {\n //echo(\"Labels:\" . PHP_EOL);\n foreach ($locations as $label) {\n //echo($label->getDescription() . PHP_EOL);\n $r['locations'][] = $label->getDescription();\n }\n }\n\n return $r;\n}", "title": "" }, { "docid": "8b5e1a1fcbbd5c24de2c22c2014543e3", "score": "0.4323863", "text": "public function getAnnotationsAttribute()\n {\n return $this->annotations()->get()->toArray();\n }", "title": "" }, { "docid": "d32a37f087cc367246c329b26bec39d4", "score": "0.4320721", "text": "public function request_overviews()\n {\n return $this->hasMany(RequestOverview::class);\n }", "title": "" }, { "docid": "8e76342cc17313b54e5ffc87c40b8880", "score": "0.43188977", "text": "public function getDocumentInkAnnotationsAsync($name, $storage = null, $folder = null)\n {\n return $this->getDocumentInkAnnotationsAsyncWithHttpInfo($name, $storage, $folder)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "b322b49a1c01b47791508ff63e3c7978", "score": "0.43095312", "text": "function pusia_add_markers() {\r\n global $post;\r\n\r\n $annotations = get_post_meta($post->ID,'img_annotation');\r\n $html = \"\";\r\n foreach($annotations as $anno) {\r\n $a = json_decode($anno);\r\n //$html .= \"<div rel ='anno{$a->id}' class='pu_simple_image_annotation_marker gloss' style='top:{$a->top}%;left:{$a->left}%;'><span class='dashicons dashicons-location imganno-marker'></span></div>\\n\";\r\n $html .= \"<span class='dashicons dashicons-location imganno-marker' style='top:{$a->top}%;left:{$a->left}%;'rel ='anno{$a->id}'></span>\\n\";\r\n }\r\n return $html;\r\n}", "title": "" }, { "docid": "0435dbb167d08d7008f880394aeefbfc", "score": "0.43087548", "text": "public function getDocumentInkAnnotations($name, $storage = null, $folder = null)\n {\n try\n {\n list($response) = $this->getDocumentInkAnnotationsWithHttpInfo($name, $storage, $folder);\n return $response;\n }\n catch (ApiException $ex)\n {\n if ($ex->getCode() == 401)\n {\n $this->_requestToken();\n list($response) = $this->getDocumentInkAnnotationsWithHttpInfo($name, $storage, $folder);\n return $response;\n }\n else\n {\n throw $ex;\n }\n }\n }", "title": "" }, { "docid": "1bc57240fe1e375c5b7d310519ef5e55", "score": "0.43000603", "text": "public function __construct(Ink $inks)\n {\n $this->inks = $inks;\n }", "title": "" }, { "docid": "abfce8f9a3b2e16ddd555ac5eeda0526", "score": "0.4288335", "text": "protected function getPageCaretAnnotationsRequest($name, $page_number, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getPageCaretAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling getPageCaretAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/caret';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "3ecf9425b412cfbf71327a35f34ad923", "score": "0.42836916", "text": "protected function putInkAnnotationRequest($name, $annotation_id, $annotation, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling putInkAnnotation'\n );\n }\n // verify the required parameter 'annotation_id' is set\n if ($annotation_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $annotation_id when calling putInkAnnotation'\n );\n }\n // verify the required parameter 'annotation' is set\n if ($annotation === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $annotation when calling putInkAnnotation'\n );\n }\n\n $resourcePath = '/pdf/{name}/annotations/ink/{annotationId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($annotation_id !== null) {\n $resourcePath = str_replace(\n '{' . 'annotationId' . '}',\n ObjectSerializer::toPathValue($annotation_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($annotation)) {\n $_tempBody = $annotation;\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "e7291b2ede2339a17271d580f1b16d9a", "score": "0.42726478", "text": "public function getObjectAnnotations(\\ReflectionObject $reflector);", "title": "" }, { "docid": "bd58c079048bced1a18d61b8cbc894aa", "score": "0.4266156", "text": "public function ImageRequest($objheader){\n $oh = $objheader;\n $hitImage = array();\n for ($num = 0; $num < count($oh[\"hits\"]); $num++) {\n array_push($hitImage, $oh[\"hits\"][$num][\"recipe\"][\"image\"]);\n }\n return $hitImage;\n}", "title": "" }, { "docid": "d284fc56fe9bb915d58afe038b0fb3d8", "score": "0.4261547", "text": "protected function getPageRedactionAnnotationsRequest($name, $page_number, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getPageRedactionAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling getPageRedactionAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/redaction';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "451d8209b4f6693adb2fd7543e071789", "score": "0.4260428", "text": "protected function getPagePolyLineAnnotationsRequest($name, $page_number, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getPagePolyLineAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling getPagePolyLineAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/polyline';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "03838029b57bb70347097d39472f3c4b", "score": "0.42501792", "text": "protected function postPageUnderlineAnnotationsRequest($name, $page_number, $annotations, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling postPageUnderlineAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling postPageUnderlineAnnotations'\n );\n }\n // verify the required parameter 'annotations' is set\n if ($annotations === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $annotations when calling postPageUnderlineAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/underline';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($annotations)) {\n $_tempBody = $annotations;\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "a687780b87fee51710082d531911ce26", "score": "0.42481416", "text": "public function getAnnotations(\\Reflector $reflector);", "title": "" }, { "docid": "c656624db5539d9a2cbf5450c71deba0", "score": "0.4248051", "text": "protected function getPageScreenAnnotationsRequest($name, $page_number, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getPageScreenAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling getPageScreenAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/screen';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "bdb65b8c78eb24f325df4951130634e5", "score": "0.42441675", "text": "protected function postPageHighlightAnnotationsRequest($name, $page_number, $annotations, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling postPageHighlightAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling postPageHighlightAnnotations'\n );\n }\n // verify the required parameter 'annotations' is set\n if ($annotations === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $annotations when calling postPageHighlightAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/highlight';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($annotations)) {\n $_tempBody = $annotations;\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "425f3fcf9e468739baecef8a791765f8", "score": "0.42332837", "text": "protected function getRequestAnnotationName()\n {\n return 'Json';\n }", "title": "" }, { "docid": "8ff0d9966e933206765a232fa506838f", "score": "0.42239556", "text": "public function getSearchAttributes(): array;", "title": "" }, { "docid": "0a17481a70b0213d73a521942fa2cc2b", "score": "0.4199463", "text": "protected function getNetworkInfoRequest()\n {\n\n $resourcePath = '/v1/graph/info';\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 // \\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\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 }", "title": "" }, { "docid": "b6a5672dd19d86bb401a27dbbcd90fda", "score": "0.4178245", "text": "public function getPageStrikeOutAnnotations($name, $page_number, $storage = null, $folder = null)\n {\n try\n {\n list($response) = $this->getPageStrikeOutAnnotationsWithHttpInfo($name, $page_number, $storage, $folder);\n return $response;\n }\n catch (ApiException $ex)\n {\n if ($ex->getCode() == 401)\n {\n $this->_requestToken();\n list($response) = $this->getPageStrikeOutAnnotationsWithHttpInfo($name, $page_number, $storage, $folder);\n return $response;\n }\n else\n {\n throw $ex;\n }\n }\n }", "title": "" }, { "docid": "2562b912a6d18ee900d14417d2c79dfc", "score": "0.4164668", "text": "protected function paginationInformation($request)\n {\n $paginated = $this->resource->resource->toArray();\n\n return [\n 'meta' => $this->meta( $paginated),\n ];\n }", "title": "" }, { "docid": "04f0c6a591c9c0430ca516f9199fe104", "score": "0.41584048", "text": "public function postPageInkAnnotationsAsyncWithHttpInfo($name, $page_number, $annotations, $storage = null, $folder = null)\n {\n $returnType = '\\Aspose\\PDF\\Model\\AsposeResponse';\n $request = $this->postPageInkAnnotationsRequest($name, $page_number, $annotations, $storage, $folder);\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 }", "title": "" }, { "docid": "a4f70fdf01a713d8c79b0d2afd34d573", "score": "0.41369525", "text": "public function request()\n {\n $request = new S_Types\\GetCategoryInfoRequestType();\n $request->CategoryID = (string) $this->category_id;\n $request->IncludeSelector = 'ChildCategories';\n return $request;\n\n }", "title": "" }, { "docid": "c0ea8b5b1e9102e3ee894bc6e226c34c", "score": "0.4125153", "text": "public function getInkAnnotation($name, $annotation_id, $storage = null, $folder = null)\n {\n try\n {\n list($response) = $this->getInkAnnotationWithHttpInfo($name, $annotation_id, $storage, $folder);\n return $response;\n }\n catch (ApiException $ex)\n {\n if ($ex->getCode() == 401)\n {\n $this->_requestToken();\n list($response) = $this->getInkAnnotationWithHttpInfo($name, $annotation_id, $storage, $folder);\n return $response;\n }\n else\n {\n throw $ex;\n }\n }\n }", "title": "" }, { "docid": "3c88f88d028dce1e140d4d55a3b0a2a1", "score": "0.41249937", "text": "protected function getDocumentHighlightAnnotationsRequest($name, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getDocumentHighlightAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/annotations/highlight';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "f5a7a8394e6cb9f7b6276c128b05f774", "score": "0.41190866", "text": "function paginationConditions() {\n // Only retrieve attributes in the current dictionary\n\n $ret = array();\n\n $ret['conditions']['DictionaryEntry.dictionary_id'] = $this->request->params['named']['dictionary'];\n\n return $ret;\n }", "title": "" }, { "docid": "7c67b2660dd65f3423668b34ad271e5a", "score": "0.4117804", "text": "protected function _buildRequest() {\r\n$request = $this->_apiUrl . '?set=' . $this->_panoramioSet . '&from=0&to=' . $this->_panoramioImageNumber .\r\n'&minx=' . $this->_requiredMinLongitude . '&miny=' . $this->_requiredMinLatitude.\r\n'&maxx=' . $this->_requiredMaxLongitude . '&maxy=' . $this->_requiredMaxLatitude .\r\n'&size=' . $this->_panoramioImageSize . '&order=' . $this->_panoramioOrdering;\r\nreturn $request;\r\n}", "title": "" }, { "docid": "653d3c18cd747d1f9b46ff9e1004c5c6", "score": "0.41098678", "text": "public function getAnnotations() {\n $n= '$'.$this->_reflect->getName();\n if (\n !($details= XPClass::detailsForMethod($this->_details[0], $this->_details[1])) || \n !isset($details[DETAIL_TARGET_ANNO][$n])\n ) { // Unknown or unparseable\n return array();\n }\n return $details[DETAIL_TARGET_ANNO][$n];\n }", "title": "" }, { "docid": "437c9312900a1224cdbbdb446de9c298", "score": "0.41044503", "text": "public function getAnnotatedResources()\n {\n return $this->_annotatedResources;\n }", "title": "" }, { "docid": "c21c71e122f516bc14f2aee062d36ba9", "score": "0.40946996", "text": "protected function postPageLineAnnotationsRequest($name, $page_number, $annotations, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling postPageLineAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling postPageLineAnnotations'\n );\n }\n // verify the required parameter 'annotations' is set\n if ($annotations === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $annotations when calling postPageLineAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/line';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($annotations)) {\n $_tempBody = $annotations;\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "be9732f95c94a019b2c2710e080fe47e", "score": "0.40840417", "text": "public function action_interests()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$db = new Model_Api_Locations_Interests();\n\t\t\techo json_encode($db->get_records('interests', $_GET['limit']));\t\t\n\t\t}\n\t\tcatch ( Database_Exception $e )\n\t\t{\n\t\t\techo $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "e4a00682f187732fe1aef2986e77a8f9", "score": "0.40822512", "text": "private function getAllIpsRequest(): Request\n {\n $allData = [\n ];\n\n $validationConstraints = [];\n\n $this\n ->addParamConstraints(\n [\n ],\n $validationConstraints\n );\n\n $this->validateParams($allData, $validationConstraints);\n\n $resourcePath = '/email/1/ips';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n $headers = [\n 'Accept' => 'application/json',\n\n ];\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n $formParams = \\json_decode($this->objectSerializer->serialize($formParams), true);\n\n if ($headers['Content-Type'] === 'multipart/form-data') {\n $boundary = '----' . hash('sha256', uniqid('', true));\n $headers['Content-Type'] .= '; boundary=' . $boundary;\n $multipartContents = [];\n\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = (\\is_array($formParamValue)) ? $formParamValue : [$formParamValue];\n\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents, $boundary);\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = $this->objectSerializer->serialize($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = Query::build($formParams);\n }\n }\n\n $apiKey = $this->config->getApiKey();\n\n if ($apiKey !== null) {\n $headers[$this->config->getApiKeyHeader()] = $apiKey;\n }\n\n $defaultHeaders = [];\n\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 foreach ($queryParams as $key => $value) {\n if (\\is_array($value)) {\n continue;\n }\n\n $queryParams[$key] = $this->objectSerializer->toString($value);\n }\n\n $query = Query::build($queryParams);\n\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "513efeb71749e4471c3078d7d7804c38", "score": "0.40821487", "text": "public function getMethodsAnnotations() {}", "title": "" }, { "docid": "dd80d10c5997b84cbcac81e2d41a76d3", "score": "0.40800408", "text": "public function getPageHighlightAnnotationsWithHttpInfo($name, $page_number, $storage = null, $folder = null)\n {\n $returnType = '\\Aspose\\PDF\\Model\\HighlightAnnotationsResponse';\n $request = $this->getPageHighlightAnnotationsRequest($name, $page_number, $storage, $folder);\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 '\\Aspose\\PDF\\Model\\HighlightAnnotationsResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "01f6cefd5ddb3043b606fc22ea6fb897", "score": "0.40787387", "text": "protected function annotationLabelsListRequest($ordering = null, $owner = null, $slug = null, $private = null, $trusted = null, $limit = null, $offset = null)\n {\n\n $resourcePath = '/annotation_labels/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($ordering !== null) {\n $queryParams['ordering'] = ObjectSerializer::toQueryValue($ordering);\n }\n // query params\n if ($owner !== null) {\n $queryParams['owner'] = ObjectSerializer::toQueryValue($owner);\n }\n // query params\n if ($slug !== null) {\n $queryParams['slug'] = ObjectSerializer::toQueryValue($slug);\n }\n // query params\n if ($private !== null) {\n $queryParams['private'] = ObjectSerializer::toQueryValue($private);\n }\n // query params\n if ($trusted !== null) {\n $queryParams['trusted'] = ObjectSerializer::toQueryValue($trusted);\n }\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit);\n }\n // query params\n if ($offset !== null) {\n $queryParams['offset'] = ObjectSerializer::toQueryValue($offset);\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('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $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 }", "title": "" }, { "docid": "19e7ac23219dc98dadef301b62254f2d", "score": "0.40698513", "text": "public static function oermetadata_requests_parameters() {\n return new external_function_parameters(\n array(\n 'x5goninfotype' => new external_value(PARAM_TEXT, 'Information type needed to be known by x5gon. By default it is \"Specify your request\"', VALUE_DEFAULT, 'Specify your request'),\n 'x5goninfoparam' => new external_value(PARAM_TEXT, 'Information parameters. By default it is \"Specify your parameters\"', VALUE_DEFAULT, 'Specify your parameters')\n )\n );\n }", "title": "" }, { "docid": "994898ab9c1603070f9248a06a405e06", "score": "0.40568227", "text": "protected function getPageFileAttachmentAnnotationsRequest($name, $page_number, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getPageFileAttachmentAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling getPageFileAttachmentAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/fileattachment';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "c31c4085de2ee3f53f1ffd71a766c1d1", "score": "0.40532985", "text": "protected function getPagePopupAnnotationsRequest($name, $page_number, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getPagePopupAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling getPagePopupAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/popup';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "042194c727e78f280a855b62b87604cb", "score": "0.40386283", "text": "public function getPagination();", "title": "" }, { "docid": "278b73de1764cd28fab97af5e7edadc7", "score": "0.40360218", "text": "public function NicInfo();", "title": "" }, { "docid": "8690b5b9f6cbdc35a510bb569b297d32", "score": "0.4035263", "text": "function annotation(){\n //echo \"FUNCTION annotation() Workspaces.php<br />\";\n \n $this->load->model('workspaces_model');\n $store_Mysql = $this->workspaces_model->connect_workspace($this->input->post('workspace'));\n \n //get all annotations properties of a class\n $annotation_properties = 'SELECT DISTINCT ?class ?property ?literal WHERE{\n {\n ?class ?property ?literal .\n FILTER ( ?class = <'.$this->input->post('selected_class').'> ) .\n FILTER ( ?property = <http://www.w3.org/2000/01/rdf-schema#comment> \n || ?property = <http://www.w3.org/2000/01/rdf-schema#seeAlso> \n || ?property = <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> \n || ?property = <http://www.w3.org/2000/01/rdf-schema#label>) .\n }\n UNION\n {\n ?class ?property ?literal .\n ?property ?y <http://www.w3.org/2002/07/owl#AnnotationProperty> .\n FILTER (?class = <'.$this->input->post('selected_class').'>) .\n }\n }';\n \n $class_annotations = $store_Mysql->query($annotation_properties, 'rows');\n \n $this->load->model('prefixes_model');\n for($i=0;$i<count($class_annotations);$i++){\n $annotation_data = $this->prefixes_model->get_prefix_and_uri($class_annotations[$i]['property']);\n $class_annotations[$i]['annotation_class'] = ucfirst($annotation_data['class']);\n }\n $data['class_annotations'] = $class_annotations;\n \n $annotation_dataproperty = 'SELECT DISTINCT ?class ?relation WHERE {\n {\n ?relation <http://www.w3.org/2000/01/rdf-schema#domain> <'.$this->input->post('selected_class').'>.\n ?relation <http://www.w3.org/2000/01/rdf-schema#range> ?class .\n }\n UNION\n {\n ?relation <http://www.w3.org/2000/01/rdf-schema#range> <'.$this->input->post('selected_class').'> .\n ?relation <http://www.w3.org/2000/01/rdf-schema#domain> ?class .\n }\n ?relation <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?type .\n FILTER isIRI( ?class ) .\n FILTER ( ?type = <http://www.w3.org/2002/07/owl#DatatypeProperty> || ?type = <http://www.w3.org/2000/01/rdf-schema#Datatype> ) . \n }'; \n \n $class_dataproperties = $store_Mysql->query($annotation_dataproperty, 'rows');\n \n $new_array_dataproperty = array();\n for($i=0;$i<count($class_dataproperties);$i++){\n $class_data = $this->prefixes_model->get_prefix_and_uri($class_dataproperties[$i]['class']);\n $relation_data = $this->prefixes_model->get_prefix_and_uri($class_dataproperties[$i]['relation']);\n $new_array_dataproperty[$i]['class'] = ucfirst($class_data['class']);\n $new_array_dataproperty[$i]['relation'] = ucfirst($relation_data['class']);\n }\n \n $data['class_dataproperties'] = $new_array_dataproperty;\n \n $selected_class = $this->prefixes_model->get_prefix_and_uri($this->input->post('selected_class'));\n $data['class_name'] = $selected_class['class'];\n $data['ontology_prefix'] = $selected_class['prefix'];\n \n $this->load->view('workspace/tooltip_annotations',$data);\n \n //echo \"END FUNCTION annotation() Workspaces.php<br />\";\n }", "title": "" }, { "docid": "8beb11ec0fe3a156586f1b0d523e92cc", "score": "0.40328282", "text": "public function getAnnotations($annotationName) {\r\n\t\t$this->analyzeComment();\r\n\r\n\t\treturn $this->docComment->getAnnotations($annotationName);\r\n\t}", "title": "" }, { "docid": "ff25741e37ec08c58a8e70e88318b3f6", "score": "0.40214768", "text": "protected function convertDocumentKeynoteToPngRequest($input_file)\n {\n // verify the required parameter 'input_file' is set\n if ($input_file === null || (is_array($input_file) && count($input_file) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $input_file when calling convertDocumentKeynoteToPng'\n );\n }\n\n $resourcePath = '/convert/key/to/png';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // form params\n if ($input_file !== null) {\n $multipart = true;\n $formParams['inputFile'] = \\GuzzleHttp\\Psr7\\Utils::tryFopen(ObjectSerializer::toFormValue($input_file), 'rb');\n }\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n ['multipart/form-data']\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('Apikey');\n if ($apiKey !== null) {\n $headers['Apikey'] = $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 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "9bf7fc0c35ee97eb50458662abb388fe", "score": "0.40205288", "text": "public function getInkAnnotationWithHttpInfo($name, $annotation_id, $storage = null, $folder = null)\n {\n $returnType = '\\Aspose\\PDF\\Model\\InkAnnotationResponse';\n $request = $this->getInkAnnotationRequest($name, $annotation_id, $storage, $folder);\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 '\\Aspose\\PDF\\Model\\InkAnnotationResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "e7378ea99dc1d3ea2c84e645f41ad6a2", "score": "0.40061685", "text": "protected function getPageStampAnnotationsRequest($name, $page_number, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getPageStampAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling getPageStampAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/stamp';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "8ddaba047d17d506ccceca9ed3b4259e", "score": "0.40053517", "text": "protected function postPageCircleAnnotationsRequest($name, $page_number, $annotations, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling postPageCircleAnnotations'\n );\n }\n // verify the required parameter 'page_number' is set\n if ($page_number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $page_number when calling postPageCircleAnnotations'\n );\n }\n // verify the required parameter 'annotations' is set\n if ($annotations === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $annotations when calling postPageCircleAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/pages/{pageNumber}/annotations/circle';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($page_number !== null) {\n $resourcePath = str_replace(\n '{' . 'pageNumber' . '}',\n ObjectSerializer::toPathValue($page_number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($annotations)) {\n $_tempBody = $annotations;\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "a23097ac67b9dcd80d77cb3d82ba694b", "score": "0.39983043", "text": "public function getInkAnnotationAsync($name, $annotation_id, $storage = null, $folder = null)\n {\n return $this->getInkAnnotationAsyncWithHttpInfo($name, $annotation_id, $storage, $folder)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "1f2242df6a902c87fb834ae0caa7ad52", "score": "0.39866358", "text": "protected function getStrikeOutAnnotationRequest($name, $annotation_id, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getStrikeOutAnnotation'\n );\n }\n // verify the required parameter 'annotation_id' is set\n if ($annotation_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $annotation_id when calling getStrikeOutAnnotation'\n );\n }\n\n $resourcePath = '/pdf/{name}/annotations/strikeout/{annotationId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\n $resourcePath\n );\n }\n // path params\n if ($annotation_id !== null) {\n $resourcePath = str_replace(\n '{' . 'annotationId' . '}',\n ObjectSerializer::toPathValue($annotation_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 ['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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "edb6083f1b628a9b6e95da6c2530d54f", "score": "0.3980772", "text": "function getAnnotations($resource = 0, $resource_type_field = 0, $user = 0, $page = 0)\n {\n if(!is_numeric($resource) || !is_numeric($resource_type_field) || !is_numeric($user) || !is_numeric($page))\n {\n return array();\n }\n\n $resource = escape_check($resource);\n $resource_type_field = escape_check($resource_type_field);\n $user = escape_check($user);\n $page = escape_check($page);\n $sql_where_clause = '';\n\n if(0 < $resource)\n {\n $sql_where_clause = \" resource = '{$resource}'\";\n }\n\n if(0 < $resource_type_field)\n {\n if('' != $sql_where_clause)\n {\n $sql_where_clause .= ' AND';\n }\n\n $sql_where_clause .= \" resource_type_field = '{$resource_type_field}'\";\n }\n\n if(0 < $user)\n {\n if('' != $sql_where_clause)\n {\n $sql_where_clause .= ' AND';\n }\n\n $sql_where_clause .= \" user = '{$user}'\";\n }\n\n if(0 < $page)\n {\n if('' != $sql_where_clause)\n {\n $sql_where_clause .= ' AND';\n }\n\n $sql_where_clause .= \" page = '{$page}'\";\n }\n\n if('' != $sql_where_clause)\n {\n $sql_where_clause = \"WHERE {$sql_where_clause}\";\n }\n\n return sql_query(\"SELECT * FROM annotation {$sql_where_clause}\");\n }", "title": "" }, { "docid": "49268faca2de08d0d65a59c75d124b25", "score": "0.39806807", "text": "public function apiV2ClientsNationalDocumentsListRequest($limit = null, $offset = null)\n {\n\n $resourcePath = '/api/v2/clients/national_documents/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($limit !== null) {\n if('form' === 'form' && is_array($limit)) {\n foreach($limit as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['limit'] = $limit;\n }\n }\n // query params\n if ($offset !== null) {\n if('form' === 'form' && is_array($offset)) {\n foreach($offset as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['offset'] = $offset;\n }\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Session');\n if ($apiKey !== null) {\n \n }\n // this endpoint requires Bearer (JWT) authentication (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $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 }", "title": "" }, { "docid": "c15bc817995479a5b5f8aa781dff787e", "score": "0.39801323", "text": "protected function convertDocumentAutodetectGetInfoRequest($input_file)\n {\n // verify the required parameter 'input_file' is set\n if ($input_file === null || (is_array($input_file) && count($input_file) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $input_file when calling convertDocumentAutodetectGetInfo'\n );\n }\n\n $resourcePath = '/convert/autodetect/get-info';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // form params\n if ($input_file !== null) {\n $multipart = true;\n $formParams['inputFile'] = \\GuzzleHttp\\Psr7\\Utils::tryFopen(ObjectSerializer::toFormValue($input_file), 'rb');\n }\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n ['multipart/form-data']\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('Apikey');\n if ($apiKey !== null) {\n $headers['Apikey'] = $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 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "ada192f03dcf0766b56fc53eb4f88b6b", "score": "0.39755824", "text": "public function getInnerAttributes();", "title": "" }, { "docid": "180f14f60f472f0d64b0b27333bbc92b", "score": "0.39724505", "text": "public function with($request)\n {\n $images = $this->images->map(function ($image) {\n return [\n 'links' => [\n 'self' => route(\"api.images.show\", [\"image\" => $image]),\n ],\n 'data' => new ImageResource($image),\n ];\n })->toArray();\n return [\n 'links' => [\n 'self' => route(\"api.pages.show\", [\"page\" => $this]),\n ],\n 'relationships' => [\n 'body' => [\n 'links' => [\n 'self' => route(\"api.pages.body.show\", [\"page\" => $this]),\n ],\n 'data' => new BodyResource($this->whenLoaded('body')),\n ],\n 'images' => $images,\n ],\n ];\n }", "title": "" }, { "docid": "67886601d83c11e3b29b0dfdcb09dab7", "score": "0.39688414", "text": "public function countryByInfoRequest(Request $request)\n {\n \n $this->validate($request, [\n 'search' => 'required'\n ]);\n $page = $request->page;\n $search = $request->input('search');\n return $this->countriesByInfoAndPage($page,$search);\n \n\n }", "title": "" }, { "docid": "8c5c951d21fe6d19d9019d97aaa689f1", "score": "0.39657512", "text": "public function getNotices()\n {\n return new Page\\Marks\\AllForPage(array(\n 'scanned_page_id' => $this->id,\n 'mark_type' => 'notice',\n ));\n }", "title": "" }, { "docid": "fe77d3ebf4a4217cb693d8a7b797798a", "score": "0.39642152", "text": "public function getIcon(Request $request)\n {\n $icon = flat();\n $newIcon=[];\n $newIcon1=[];$ambilIndex=0;\n\n foreach ($icon as $k => $v)\n {\n $newIcon[]=$v;\n\n $ambilIndex++;\n if ($ambilIndex == 4)\n {\n $newIcon1[] = $newIcon;\n $newIcon = []; $ambilIndex = 0;\n }\n }\n return response()->json(['status'=> $this->status, 'message' => $this->message, 'data' => $newIcon1],200);\n }", "title": "" }, { "docid": "3ae8472488bcb4d23df9cdd2fe1f86c0", "score": "0.3955377", "text": "public function getpkfAction(Request $request) {\n $entities2 = null;\n if ($request->getMethod() == 'POST') {\n $id = $request->get('id');\n if ($id) {\n $em2 = $this->getDoctrine()->getManager();\n $request = $em2->getRepository('InfogoldAccountBundle:Produkt');\n $qb = $request->createQueryBuilder('p');\n $query2 = $qb\n ->select('c.nazwaklienta,c.nipklienta,d.cenaProduktu,d.ilosc,d.created,c.id')\n ->leftJoin('p.produkt', 'd')\n ->leftJoin('d.ProduktyKlienta', 'c')\n ->where('p.id=' . $id)\n ->andWhere('c.nipklienta is not null')\n ->setMaxResults(100)\n ->getQuery();\n $entities2 = $query2->getResult();\n\n $indexedOnly = array();\n\n foreach ($entities2 as $row) {\n\n if ($row[\"created\"]) {\n $myDate = $row['created'];\n $row[\"created\"] = $myDate->format('Y-m-d H:i');\n }\n if ($row[\"id\"]) {\n $row[\"id\"] = \"<a class='btn btn-default btn-sm' href='/symfony2_8_new/web/app_dev.php/user/baza/\" . $row[\"id\"] . \"/show'><span class='glyphicon glyphicon-eye-open'></span>\";\n }\n $indexedOnly[] = array_values($row);\n }\n\n // var_export($indexedOnly);\n // exit();\n\n $response = new Response();\n $response->headers->set('Content-Type', 'application/json');\n }\n }\n return $response->setContent(json_encode(array(\n 'data' => $indexedOnly\n )));\n }", "title": "" }, { "docid": "4e6e29435a5797af9aca6822f62447d3", "score": "0.39547598", "text": "public function allReviewsOfProperty(Request $request){\n $input = $request->all();\n $propertyId = $input['propertyId'];\n $offset = isset($input['offset']) ? $input['offset'] : 0;\n $propertyReviews = (new PropertyReviews())->ajaxGetReviewOfBuyer( $propertyId, $offset );\n return response()->json($propertyReviews);\n }", "title": "" }, { "docid": "6ed357b1d036a136c202fe1d258317ad", "score": "0.39531684", "text": "protected function getDocumentUnderlineAnnotationsRequest($name, $storage = null, $folder = null)\n {\n // verify the required parameter 'name' is set\n if ($name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $name when calling getDocumentUnderlineAnnotations'\n );\n }\n\n $resourcePath = '/pdf/{name}/annotations/underline';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($storage);\n }\n // query params\n if ($folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($folder);\n }\n\n // path params\n if ($name !== null) {\n $resourcePath = str_replace(\n '{' . 'name' . '}',\n ObjectSerializer::toPathValue($name),\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 // array of objects\n } elseif (is_array($httpBody)) {\n $httpBody = \"[\" . ObjectSerializer::serializeCollection($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 $httpBody = $formParams[''];\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 //ASPOSE_PDF_CLOUD\n if (!$this->config->getAccessToken()) \n {\n $this->_requestToken();\n }\n if ($this->config->getAccessToken() !== null) \n {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // add custom heades\n $headers['x-aspose-client'] = 'php sdk';\n $headers['x-aspose-client-version'] = '23.8.0';\n \n //ASPOSE_PDF_CLOUD\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 }", "title": "" }, { "docid": "20087d2bf6a377cd9bc0cffffb891c74", "score": "0.39495373", "text": "function getAttributes();", "title": "" } ]
2b40522f8d8566c9a511f560013b0ec3
/ Member group /forum mask permission form thingy doodle do yes. Viewing Perm users /
[ { "docid": "c8049a77a2b78cbf06103ba24748d2a4", "score": "0.0", "text": "function delete_mask()\n\t{\n\t\t//-----------------------------------------\n\t\t// Check for a valid ID\n\t\t//-----------------------------------------\n\n\t\tif ($this->ipsclass->input['id'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя произвести изменения в масках доступа этому ID, пожалуйста, попытайтесь еще раз\");\n\t\t}\n\n\t\t$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'forum_perms', 'where' => \"perm_id=\".intval($this->ipsclass->input['id']) ) );\n\n\t\t$old_id = intval($this->ipsclass->input['id']);\n\n\t\t//-----------------------------------------\n\t\t// Remove from forums...\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'id, permission_array', 'from' => 'forums' ) );\n\t\t$get = $this->ipsclass->DB->simple_exec();\n\n\t\twhile( $f = $this->ipsclass->DB->fetch_row($get) )\n\t\t{\n\t\t\t$d_str = \"\";\n\t\t\t$d_arr = unserialize(stripslashes( $f['permission_array'] ) );\n\n\t\t\t$perms = unserialize(stripslashes( $f['permission_array'] ) );\n\n\t\t\tforeach( array( 'read_perms', 'reply_perms', 'start_perms', 'upload_perms', 'show_perms' ) as $perm_bit )\n\t\t\t{\n\t\t\t\tif ($perms[ $perm_bit ] != '*')\n\t\t\t\t{\n\t\t\t\t\tif ( preg_match( \"/(^|,)\".$old_id.\"(,|$)/\", $perms[ $perm_bit ]) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$perms[ $perm_bit ] = preg_replace( \"/(^|,)\".$old_id.\"(,|$)/\", \"\\\\1\\\\2\", $perms[ $perm_bit ] );\n\n\t\t\t\t\t\t$d_arr[ $perm_bit ] = $this->clean_perms( $perms[ $perm_bit ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// Do we have anything to save?\n\t\t\t//-----------------------------------------\n\n\t\t\tif ( count($d_arr) > 0 )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Sure?..\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\t$string = addslashes(serialize( $d_arr ) );\n\n\t\t\t\tif ( strlen($string) > 5)\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->DB->do_update( 'forums', array( 'permission_array' => $string ), 'id='.$f['id'] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Recache forums\n\t\t//-----------------------------------------\n\n\t\trequire_once( ROOT_PATH.'sources/action_admin/forums.php' );\n\t\t$ad_forums = new ad_forums();\n\t\t$ad_forums->ipsclass =& $this->ipsclass;\n\t\t$ad_forums->recache_forums();\n\n\t\t$this->permsplash();\n\t}", "title": "" } ]
[ { "docid": "83e8fc8d5038d3551fb277dfb16c8c46", "score": "0.71589375", "text": "function view_perm_users()\n\t{\n\t\t//-----------------------------------------\n\t\t// Check for a valid ID\n\t\t//-----------------------------------------\n\n\t\tif ($this->ipsclass->input['id'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя произвести изменения в масках доступа этому ID, пожалуйста, попытайтесь еще раз\");\n\t\t}\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => \"perm_id=\".intval($this->ipsclass->input['id']) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\tif ( ! $perms = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя произвести изменения в масках доступа этому ID, пожалуйста, попытайтесь еще раз\");\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get all members using that ID then!\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Сведения о пользователе\" , \"50%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Действие\" , \"50%\" );\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= \"<script language='javascript' type='text/javascript'>\n\t\t\t\t\t\t <!--\n\t\t\t\t\t\t function pop_close_and_stop( id )\n\t\t\t\t\t\t {\n\t\t\t\t\t\t \topener.location = \\\"{$this->ipsclass->base_url}&section=content&act=mem&code=doform&mid=\\\" + id;\n\t\t\t\t\t\t \tself.close();\n\t\t\t\t\t\t }\n\t\t\t\t\t\t //-->\n\t\t\t\t\t\t </script>\";\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Используется пользователями: \" . $perms['perm_name'] );\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, email, posts, org_perm_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'members',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"(org_perm_id IS NOT NULL AND org_perm_id != '')\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'order' => 'name' ) );\n\t\t$outer = $this->ipsclass->DB->simple_exec();\n\n\t\twhile( $r = $this->ipsclass->DB->fetch_row($outer) )\n\t\t{\n\t\t\t$exp_pid = explode( \",\", $r['org_perm_id'] );\n\n\t\t\tforeach( explode( \",\", $r['org_perm_id'] ) as $pid )\n\t\t\t{\n\t\t\t\tif ( $pid == $this->ipsclass->input['id'] )\n\t\t\t\t{\n\t\t\t\t\tif ( count($exp_pid) > 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$extra = \"<li>Также используются: <em style='color:red'>\";\n\n\t\t\t\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => \"perm_id IN (\".$this->ipsclass->clean_perm_string($r['org_perm_id']).\") AND perm_id <> {$this->ipsclass->input['id']}\" ) );\n\t\t\t\t\t\t$this->ipsclass->DB->simple_exec();\n\n\t\t\t\t\t\twhile ( $mr = $this->ipsclass->DB->fetch_row() )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$extra .= $mr['perm_name'].\",\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$extra = preg_replace( \"/,$/\", \"\", $extra );\n\n\t\t\t\t\t\t$extra .= \"</em>\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$extra = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<div style='font-weight:bold;font-size:11px;padding-bottom:6px;margin-bottom:3px;border-bottom:1px solid #000'>{$r['name']}</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <li>Сообщений: {$r['posts']}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <li>Email: {$r['email']}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $extra\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"&#149;&nbsp;<a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=remove_mask&amp;id={$r['id']}&amp;pid=$pid' title='Удалить эту маску доступа у пользователя (без удаления других масок доступа)'>Удалить эту маску</a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <br />&#149;&nbsp;<a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=remove_mask&amp;id={$r['id']}&amp;pid=all' title='Удалить все дополнительные маски'>Удалить все дополнительные маски</a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <br /><br />&#149;&nbsp;<a href='javascript:pop_close_and_stop(\\\"{$r['id']}\\\");'>Изменить пользователя</a>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n\t\t$this->ipsclass->admin->print_popup();\n\t}", "title": "" }, { "docid": "3174b67a702954d728b390715416c343", "score": "0.698825", "text": "function forum_group_permissions( $perms ){\n\t$perms[ 'forum' ] = 'Can Post to Forum';\n\t$perms[ 'forum_moderate' ] = 'Can Moderate Forum';\n\treturn $perms;\n}", "title": "" }, { "docid": "a4f710678fd12a80494807d832053a76", "score": "0.67259437", "text": "function forum_perms()\n\t{\n\t\tif ($this->ipsclass->input['id'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя изменить ID группы, попытайтесь снова\");\n\t\t}\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->admin->page_title = \"Управление масками доступа\";\n\t\t$this->ipsclass->admin->page_detail = \"В этой секции вы можете изменить выбранную маску доступа.\";\n\t\t$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=permsplash', 'Управление масками доступа' );\n\t\t$this->ipsclass->admin->nav[] = array( '', 'Добавление/изменение масок доступа' )\t\t;\n\n\t\t$this->ipsclass->admin->page_detail .= \"<br />Для разрешения выполнения действия поставьте галочку, для запрета выполнения действия просто не ставьте или уберите галочку.\n\t\t\t\t\t\t\t <br />Атрибут &laquo;<b>Глобальный</b>&raquo; означает, что все маски доступа имеют права на выполнение этого действия, поэтому изменить этот параметр здесь нельзя.\n\t\t\t\t\t\t\t <br />Категории имеют настройки доступа только на просмотр, потому что остальные действия просто не применимы для категорий.\";\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => \"perm_id=\".intval($this->ipsclass->input['id']) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\t$group = $this->ipsclass->DB->fetch_row();\n\n\t\t$gid = $group['perm_id'];\n\t\t$gname = $group['perm_name'];\n\n\t\t//-----------------------------------------\n\t\t//| EDIT NAME\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'donameedit' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'act' , 'group' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 3 => array( 'id' , $gid ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 4 => array( 'section', $this->ipsclass->section_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t), \"nameForm\" );\n\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"40%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"60%\" );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Изменение названия: \".$group['perm_name'] );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Название маски</b>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"perm_name\", $gname )\n\t\t\t\t\t\t\t\t\t ) );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_form(\"Изменить\");\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n\n\t\t//-----------------------------------------\n\t\t//| MAIN FORM\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dofedit' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'act' , 'group' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 3 => array( 'id' , $gid ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 4 => array( 'section', $this->ipsclass->section_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) \t);\n\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Форум\" , \"25%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Просмотр форума<br /><input id='show' type='checkbox' onclick='checkcol(\\\"show\\\", this.checked );' />\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Чтение тем<br /><input id='read' type='checkbox' onclick='checkcol(\\\"read\\\", this.checked );' />\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Ответ в темы<br /><input id='reply' type='checkbox' onclick='checkcol(\\\"reply\\\", this.checked );' />\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Создание тем<br /><input id='start' type='checkbox' onclick='checkcol(\\\"start\\\", this.checked );' />\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Загрузка файлов<br /><input id='upload' type='checkbox' onclick='checkcol(\\\"upload\\\", this.checked );' />\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Скачивание файлов<br /><input id='download' type='checkbox' onclick='checkcol(\\\"download\\\", this.checked );' />\" , \"10%\" );\n\n\t\t$forum_data = $this->forumfunc->ad_forums_forum_data();\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Параметры доступа: \".$group['perm_name'] );\n\n\t\tforeach( $forum_data as $r )\n\t\t{\n\t\t\t$show = \"\";\n\t\t\t$read = \"\";\n\t\t\t$start = \"\";\n\t\t\t$reply = \"\";\n\t\t\t$upload = \"\";\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['show_perms'] == '*')\n\t\t\t{\n\t\t\t\t$show = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['show_perms'] ) )\n\t\t\t{\n\t\t\t\t$show = \"<center><input type='checkbox' name='show_\".$r['id'].\"' id='show_\".$r['id'].\"' onclick=\\\"obj_checked('show', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$show = \"<center><input type='checkbox' name='show_\".$r['id'].\"' id='show_\".$r['id'].\"' onclick=\\\"obj_checked('show', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['read_perms'] == '*')\n\t\t\t{\n\t\t\t\t$read = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['read_perms'] ) )\n\t\t\t{\n\t\t\t\t$read = \"<center><input type='checkbox' name='read_\".$r['id'].\"' id='read_\".$r['id'].\"' onclick=\\\"obj_checked('read', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$read = \"<center><input type='checkbox' name='read_\".$r['id'].\"' id='read_\".$r['id'].\"' onclick=\\\"obj_checked('read', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['start_perms'] == '*')\n\t\t\t{\n\t\t\t\t$start = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['start_perms'] ) )\n\t\t\t{\n\t\t\t\t$start = \"<center><input type='checkbox' name='start_\".$r['id'].\"' id='start_\".$r['id'].\"' onclick=\\\"obj_checked('start', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$start = \"<center><input type='checkbox' name='start_\".$r['id'].\"' id='start_\".$r['id'].\"' onclick=\\\"obj_checked('start', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['reply_perms'] == '*')\n\t\t\t{\n\t\t\t\t$reply = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['reply_perms'] ) )\n\t\t\t{\n\t\t\t\t$reply = \"<center><input type='checkbox' name='reply_\".$r['id'].\"' id='reply_\".$r['id'].\"' onclick=\\\"obj_checked('reply', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$reply = \"<center><input type='checkbox' name='reply_\".$r['id'].\"' id='reply_\".$r['id'].\"' onclick=\\\"obj_checked('reply', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['upload_perms'] == '*')\n\t\t\t{\n\t\t\t\t$upload = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['upload_perms'] ) )\n\t\t\t{\n\t\t\t\t$upload = \"<center><input type='checkbox' name='upload_\".$r['id'].\"' id='upload_\".$r['id'].\"' onclick=\\\"obj_checked('upload', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$upload = \"<center><input type='checkbox' name='upload_\".$r['id'].\"' id='upload_\".$r['id'].\"' onclick=\\\"obj_checked('upload', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\t$global = '<center>Глобальный</center>';\n\n\t\t\tif ($r['download_perms'] == '*')\n\t\t\t{\n\t\t\t\t$download = $global;\n\t\t\t}\n\t\t\telse if ( preg_match( \"/(^|,)\".$gid.\"(,|$)/\", $r['download_perms'] ) )\n\t\t\t{\n\t\t\t\t$download = \"<center><input type='checkbox' name='download_\".$r['id'].\"' id='download_\".$r['id'].\"' onclick=\\\"obj_checked('download', {$r['id']} );\\\" value='1' checked></center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$download = \"<center><input type='checkbox' name='download_\".$r['id'].\"' id='download_\".$r['id'].\"' onclick=\\\"obj_checked('download', {$r['id']} );\\\" value='1'></center>\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\n\t\t\tif ( $r['root_forum'] )\n\t\t\t{\n\t\t\t\t$css = 'tablerow4';\n\t\t\t\t$download = $upload = $reply = $start = $read = \"<center>Не&nbsp;используется</center>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$css = '';\n\t\t\t}\n\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='float:right;width:auto;'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t<input type='button' id='button' value='+' onclick='checkrow({$r['id']},true)' />&nbsp;<input type='button' id='button' value='-' onclick='checkrow({$r['id']},false)' />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <b>\".$r['depthed_name'].\"</b>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#ecd5d8; padding:4px;'>\".$show.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#dbe2de; padding:4px;'>\".$read.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#dbe6ea; padding:4px;'>\".$reply.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#d2d5f2; padding:4px;'>\".$start.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#ece6d8; padding:4px;'>\".$upload.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<div style='background-color:#dfdee9; padding:4px;'>\".$download.\"</div>\",\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t) ,$css );\n\n\t\t}\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_form(\"Обновить настройки доступа\");\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n\t\t$this->ipsclass->html .= $this->html->permissions_js();\n\n\t\t$this->ipsclass->admin->output();\n\t}", "title": "" }, { "docid": "3caaac5ee4d7e2712b2a5ddb2204738d", "score": "0.6671657", "text": "function do_forum_perms()\n\t{\n\t\t//-----------------------------------------\n\t\t// Check for legal ID\n\t\t//-----------------------------------------\n\n\t\tif ($this->ipsclass->input['id'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя изменить ID группы\");\n\t\t}\n\n\t\t$gid = intval($this->ipsclass->input['id']);\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => \"perm_id=\".$gid ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\tif ( ! $gr = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Недействительный ID группы\");\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Pull the forum data..\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forums', 'order' => \"position ASC\" ) );\n\t\t$forum_q = $this->ipsclass->DB->simple_exec();\n\n\t\twhile ( $row = $this->ipsclass->DB->fetch_row( $forum_q ) )\n\t\t{\n\t\t\t$perms = unserialize(stripslashes( $row['permission_array'] ) );\n\n\t\t\t$read = \"\";\n\t\t\t$reply = \"\";\n\t\t\t$start = \"\";\n\t\t\t$upload = \"\";\n\t\t\t$download = \"\";\n\t\t\t$show = \"\";\n\n\t\t\t//-----------------------------------------\n\t\t\t// Is this global?\n\t\t\t//-----------------------------------------\n\n\t\t\tif ($perms['read_perms'] == '*')\n\t\t\t{\n\t\t\t\t$read = '*';\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Split the set IDs\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\t$read_ids = explode( \",\", $perms['read_perms'] );\n\n\t\t\t\tif ( is_array($read_ids) )\n\t\t\t\t{\n\t\t\t\t foreach ($read_ids as $i)\n\t\t\t\t {\n\t\t\t\t\t //-----------------------------------------\n\t\t\t\t\t // If it's the current ID, skip\n\t\t\t\t\t //-----------------------------------------\n\n\t\t\t\t\t if ($gid == $i)\n\t\t\t\t\t {\n\t\t\t\t\t\t continue;\n\t\t\t\t\t }\n\t\t\t\t\t else\n\t\t\t\t\t {\n\t\t\t\t\t\t $read .= $i.\",\";\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Was the box checked?\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\tif ($this->ipsclass->input[ 'read_'.$row['id'] ] == 1)\n\t\t\t\t{\n\t\t\t\t\t// Add our group ID...\n\n\t\t\t\t\t$read .= $gid.\",\";\n\t\t\t\t}\n\n\t\t\t\t// Tidy..\n\n\t\t\t\t$read = preg_replace( \"/,$/\", \"\", $read );\n\t\t\t\t$read = preg_replace( \"/^,/\", \"\", $read );\n\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// Reply topics..\n\t\t\t//-----------------------------------------\n\n\t\t\tif ($perms['reply_perms'] == '*')\n\t\t\t{\n\t\t\t\t$reply = '*';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$reply_ids = explode( \",\", $perms['reply_perms'] );\n\n\t\t\t\tif ( is_array($reply_ids) )\n\t\t\t\t{\n\t\t\t\t\tforeach ($reply_ids as $i)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($gid == $i)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$reply .= $i.\",\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ($this->ipsclass->input[ 'reply_'.$row['id'] ] == 1)\n\t\t\t\t{\n\t\t\t\t\t$reply .= $gid.\",\";\n\t\t\t\t}\n\n\t\t\t\t$reply = preg_replace( \"/,$/\", \"\", $reply );\n\t\t\t\t$reply = preg_replace( \"/^,/\", \"\", $reply );\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// Start topics..\n\t\t\t//-----------------------------------------\n\n\t\t\tif ($perms['start_perms'] == '*')\n\t\t\t{\n\t\t\t\t$start = '*';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$start_ids = explode( \",\", $perms['start_perms'] );\n\n\t\t\t\tif ( is_array($start_ids) )\n\t\t\t\t{\n\n\t\t\t\t\tforeach ($start_ids as $i)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($gid == $i)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$start .= $i.\",\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ($this->ipsclass->input[ 'start_'.$row['id'] ] == 1)\n\t\t\t\t{\n\t\t\t\t\t$start .= $gid.\",\";\n\t\t\t\t}\n\n\t\t\t\t$start = preg_replace( \"/,$/\", \"\", $start );\n\t\t\t\t$start = preg_replace( \"/^,/\", \"\", $start );\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// Upload topics..\n\t\t\t//-----------------------------------------\n\n\t\t\tif ($perms['upload_perms'] == '*')\n\t\t\t{\n\t\t\t\t$upload = '*';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$upload_ids = explode( \",\", $perms['upload_perms'] );\n\n\t\t\t\tif ( is_array($upload_ids) )\n\t\t\t\t{\n\n\t\t\t\t\tforeach ($upload_ids as $i)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($gid == $i)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$upload .= $i.\",\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ($this->ipsclass->input[ 'upload_'.$row['id'] ] == 1)\n\t\t\t\t{\n\t\t\t\t\t$upload .= $gid.\",\";\n\t\t\t\t}\n\n\t\t\t\t$upload = preg_replace( \"/,$/\", \"\", $upload );\n\t\t\t\t$upload = preg_replace( \"/^,/\", \"\", $upload );\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// Download attach..\n\t\t\t//-----------------------------------------\n\n\t\t\tif ($perms['download_perms'] == '*')\n\t\t\t{\n\t\t\t\t$download = '*';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$download_ids = explode( \",\", $perms['download_perms'] );\n\n\t\t\t\tif ( is_array($download_ids) )\n\t\t\t\t{\n\t\t\t\t\tforeach ($download_ids as $i)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($gid == $i)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$download .= $i.\",\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ($this->ipsclass->input[ 'download_'.$row['id'] ] == 1)\n\t\t\t\t{\n\t\t\t\t\t$download .= $gid.\",\";\n\t\t\t\t}\n\n\t\t\t\t$download = preg_replace( \"/,$/\", \"\", $download );\n\t\t\t\t$download = preg_replace( \"/^,/\", \"\", $download );\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// Show topics..\n\t\t\t//-----------------------------------------\n\n\t\t\tif ($perms['show_perms'] == '*')\n\t\t\t{\n\t\t\t\t$show = '*';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$show_ids = explode( \",\", $perms['show_perms'] );\n\n\t\t\t\tif ( is_array($show_ids) )\n\t\t\t\t{\n\t\t\t\t\tforeach ($show_ids as $i)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($gid == $i)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$show .= $i.\",\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ($this->ipsclass->input[ 'show_'.$row['id'] ] == 1)\n\t\t\t\t{\n\t\t\t\t\t$show .= $gid.\",\";\n\t\t\t\t}\n\n\t\t\t\t$show = preg_replace( \"/,$/\", \"\", $show );\n\t\t\t\t$show = preg_replace( \"/^,/\", \"\", $show );\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// Update the DB...\n\t\t\t//-----------------------------------------\n\n\t\t\t$this->ipsclass->DB->do_update( 'forums', array( 'permission_array' => addslashes(serialize(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'start_perms' => $start,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'reply_perms' => $reply,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'read_perms' => $read,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'upload_perms' => $upload,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'show_perms' => $show,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'download_perms' => $download,\n\t\t\t\t\t\t\t \t\t)\t\t \t\t\t\t\t\t ) ) ), 'id='.$row['id']);\n\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Recache forums\n\t\t//-----------------------------------------\n\n\t\trequire_once( ROOT_PATH.'sources/action_admin/forums.php' );\n\t\t$adforums = new ad_forums();\n\t\t$adforums->ipsclass =& $this->ipsclass;\n\n\t\t$adforums->recache_forums();\n\n\t\t$this->ipsclass->admin->save_log(\"Права доступа на форум отредактированы для маски: '{$gr['perm_name']}'\");\n\n\t\t$this->ipsclass->main_msg = \"Forum Access Permissions Updated\";\n\t\t$this->permsplash( );\n\n\t}", "title": "" }, { "docid": "39cd0c25f478ac39e5a9ae23e9183b3d", "score": "0.6634056", "text": "function VisibleToAdminUser()\n {\n\tinclude (\"dom.php\");\n return $this->CheckPermission($pavad.' Use');\n }", "title": "" }, { "docid": "125b0dc118ef8aecbdd3969310397fb4", "score": "0.66085285", "text": "function check_module_access($m) {\r\n /*\r\n @level: int\r\n -2 available even when not authenticated,\r\n -1 always available when authenticated,\r\n 1 highest level of permission,\r\n 2+ lower and lower permission\r\n */\r\n global $user_access; # setted at useraccess.inc.php, then index.php\r\n\r\n if ($_SESSION['login_ok'] != 1 and $level != -2) return;\r\n if ($_SESSION['login_ok'] == 1 and $level != -1 and $_SESSION['login_level'] > $level) return; # level permission, allow if login_level is smaller\r\n if ($_SESSION['login_level'] != 0 and $_SESSION['login_level'] == $level and $group != '') { # check group permission if not '' or empty array\r\n if (is_array($group)) {\r\n $pass = False;\r\n foreach ($group as $grp) {\r\n if ($grp == $_SESSION['login_group']) {\r\n $pass = True;\r\n break;\r\n }\r\n }\r\n if (!$pass) return;\r\n }\r\n elseif ($group != $_SESSION['login_group']) return;\r\n }\r\n\r\n}", "title": "" }, { "docid": "e5c6bd9a6982b6545ea7194f687afa94", "score": "0.6521741", "text": "function cc_check_perm($data) {\n global $xoopsUser, $xoopsModule;\n $uid = is_object($xoopsUser)?$xoopsUser->getVar('uid'):0;\n\n $pass = isset($_GET['p'])?$_GET['p']:\"\";\n if ($pass) {\n\t$_SESSION['onepass'] = $pass;\n } else {\n\t$pass = (empty($_SESSION['onepass'])?\"\":$_SESSION['onepass']);\n }\n if (!empty($data['onepass']) && $data['onepass']==$pass) return true;\n\n $mid = is_object($xoopsModule)?$xoopsModule->getVar('mid'):0;\n if ($uid && $xoopsUser->isAdmin($mid)) return true;\n $cgrp = $data['cgroup'];\n if ($cgrp && $uid && in_array($cgrp, $xoopsUser->getGroups())) return true;\n if ($uid && ($data['uid']==$uid || $data['touid'] == $uid)) return true;\n return false;\n}", "title": "" }, { "docid": "8095f27210502d85cd5bede05bc578d4", "score": "0.64430064", "text": "private function setSpecialBits() {\n if (Request::has(\"include-setuid\") && Request::input(\"include-setuid\") === \"true\") { $permissionSetuid = 4; } else { $permissionSetuid = 0; }\n if (Request::has(\"include-setgid\") && Request::input(\"include-setgid\") === \"true\") { $permissionSetgid = 2; } else { $permissionSetgid = 0; }\n if (Request::has(\"include-sticky\") && Request::input(\"include-sticky\") === \"true\") { $permissionSticky = 1; } else { $permissionSticky = 0; }\n return $permissionSetuid + $permissionSetgid + $permissionSticky;\n }", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.64040524", "text": "public function permissions();", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.64040524", "text": "public function permissions();", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.64040524", "text": "public function permissions();", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.64040524", "text": "public function permissions();", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.64040524", "text": "public function permissions();", "title": "" }, { "docid": "60e94effe3170beec448a7b7231c8857", "score": "0.63660336", "text": "public function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "c5112ba7d3b0a0c8fc45f4f38bd010fc", "score": "0.6327793", "text": "function check_permissions($required_permission,$redirect_url)\n\t{\n\t\tglobal $userdata, $template, $db, $SID, $lang, $phpEx, $phpbb_root_path, $garage_config, $board_config;\n\t\n\t\t$required_permission = strtolower($required_permission);\n\t\n\t\t//Right Lets Start And Work Out Your User Level\n\t\tif ( $userdata['user_id'] == ANONYMOUS )\n\t\t{\n\t\t\t$your_level = 'GUEST';\n\t\t}\n\t\telse if ( $userdata['user_level'] == ADMIN )\n\t\t{\n\t\t\t$your_level = 'ADMIN';\n\t\t}\n\t\telse if ( $userdata['user_level'] == MOD )\n\t\t{\n\t\t\t$your_level = 'MOD';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$your_level = 'USER';\n\t\t}\t\t\n\t\n\t\tif ($garage_config[$required_permission.\"_perms\"] == '*')\n\t\t{\n\t\t\t//Looks Like Everyone Is Allowed Do This...So On Your Way\n\t\t\treturn (TRUE);\n\t\t}\t\n\t\t//Since Not Globally Allowed Lets See If Your Level Is Allowed For The Permission You Are Requesting\n\t\telse if (preg_match( \"/$your_level/\", $garage_config[$required_permission.\"_perms\"]))\n\t\t{\n\t\t\t//Good News Your User Level Is Allowed\n\t\t\treturn (TRUE);\n\t\t}\n\t\t//Right We Need To Resort And See If Private Is Set For This Required Permission And See If You Qualify\n\t\telse if (preg_match( \"/PRIVATE/\", $garage_config[$required_permission.\"_perms\"]))\n\t\t{\n\t\t\t//Right We Need To See If You Are In Any User Group Granted This Permission\n\t\t\t$sql = \"SELECT ug.group_id, g.group_name\n\t \t\tFROM \" . USER_GROUP_TABLE . \" AS ug, \" . GROUPS_TABLE .\" g\n\t WHERE ug.user_id = \" . $userdata['user_id'] . \"\n\t\t\t\t\tand ug.group_id = g.group_id and g.group_single_user <> \" . TRUE .\"\n\t\t\t\tORDER BY g.group_name ASC\";\n\t \tif( !($result = $db->sql_query($sql)) )\n\t \t\t{\n\t \t\tmessage_die(GENERAL_ERROR, 'Could Not Select Groups', '', __LINE__, __FILE__, $sql);\n\t \t\t}\n\t\n\t\t\t//Lets Populate An Array With All The Groups You Are Part Of\n\t\t\twhile( $grouprow = $db->sql_fetchrow($result) )\n\t\t\t{\n\t\t\t\t$groupdata[] = $grouprow;\n\t\t\t}\n\t\n\t\t\t//Lets Get All Private Groups Granted This Permission\n\t\t\t$sql = \"SELECT config_value as private_groups\n\t\t\t\tFROM \". GARAGE_CONFIG_TABLE .\"\n\t\t\t\tWHERE config_name = 'private_\".$required_permission.\"_perms'\";\n\t\t\tif( !$result = $db->sql_query($sql) )\n\t\t\t{\n\t\t\t\tmessage_die(GENERAL_ERROR, 'Could not get permissions', '', __LINE__, __FILE__, $sql);\n\t\t\t}\n\t\t\t$private_perms = $db->sql_fetchrow($result);\n\t\t\t$private_groups = @explode(',', $private_perms['private_groups']);\n\t\n\t\t\tfor ($i = 0; $i < count($groupdata); $i++)\n\t\t\t{\n\t\t\t\tif (in_array($groupdata[$i]['group_id'], $private_groups))\n\t\t\t\t{\n\t\t\t\t\treturn (TRUE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Looks Like You Are Out Of Look...You Are Not Allowed Perform The Action You Requested...\n\t\tif (!empty($redirect_url))\n\t\t{\n\t\t\tredirect(append_sid(\"$redirect_url\", true));\n\t\t}\n\t\t//No URL To Redirect So We Will Just Return FALSE\n\t\telse\n\t\t{\n\t\t\treturn (FALSE);\n\t\t}\n\t}", "title": "" }, { "docid": "78552a32cfce84268fddb0705fcf5887", "score": "0.6248149", "text": "function custom_permissions() {\n\t\tif ($this->dx_auth->is_logged_in()) {\n\t\t\techo 'My role: '.$this->dx_auth->get_role_name().'<br/>';\n\t\t\techo 'My permission: <br/>';\n\t\t\t\n\t\t\tif ($this->dx_auth->get_permission_value('edit') != NULL AND $this->dx_auth->get_permission_value('edit')) {\n\t\t\t\techo 'Edit is allowed';\n\t\t\t} else {\n\t\t\t\techo 'Edit is not allowed';\n\t\t\t}\n\t\t\t\n\t\t\techo '<br/>';\n\t\t\t\n\t\t\tif ($this->dx_auth->get_permission_value('delete') != NULL AND $this->dx_auth->get_permission_value('delete')) {\n\t\t\t\techo 'Delete is allowed';\n\t\t\t} else {\n\t\t\t\techo 'Delete is not allowed';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2d80adad5230ed0d927fcd8b112d7ea8", "score": "0.624308", "text": "function user_can_access_admin_page()\n {\n }", "title": "" }, { "docid": "de1e44be7f07fc9ba326652a5ba72339", "score": "0.6226686", "text": "function checkUserPermissions( $cid, $actionName, $allowActionToMyself = false ) {\r\n\tglobal $database, $my;\r\n\t$msg = null;\r\n\t$iuser = ggo($cid[0], \"#__users\");\r\n\tif ( $my->gid < $iuser->gid ) {\r\n\t\t$msg .= 'Вы не можете '. $actionName .' '.$iuser->name.' Это могут делать только пользователи с более высоким уровнем доступа. ';\r\n\t}\r\n\treturn $msg;\r\n}", "title": "" }, { "docid": "2aabdc343348f83fbd939b1a397b5ac0", "score": "0.6188963", "text": "public static function CHECK_ACCESS_PERMISSION(){\n\t $SQL_String = \"SELECT uid,gid FROM permission_matrix WHERE uid=:uid AND master=1;\";\n\t return $SQL_String;\n\t}", "title": "" }, { "docid": "060326ea4d62a767d8ee2ef7d38b9fa6", "score": "0.61845803", "text": "private function userHasAccess()\n {\n $required_perm = $this->route['perm'];\n $user_group = $_SESSION['user_group'];\n if ($required_perm == 'all') {\n return true;\n } elseif ($user_group == $required_perm) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "487f332773fa99ca2a4427d8fe19a78e", "score": "0.61721474", "text": "function userAdmin(){\r\n if(userConnect() && $_SESSION['user']['privilege']==1) return TRUE; else return FALSE;\r\n }", "title": "" }, { "docid": "1fa0f3d4ae1d1b423949627e989746f8", "score": "0.6166588", "text": "function auth_can_edit_user($user, $target)\n{\n global $min_user_editing_level;\n \n // Always allowed to modify your own stuff\n if(strcasecmp($user, $target) == 0)\n {\n return 1;\n }\n\n if(authGetUserLevel($user) >= $min_user_editing_level)\n {\n return 1;\n }\n\n // Unathorised access\n return 0;\n}", "title": "" }, { "docid": "28a21973fced5b09413eb85e6ae54e9f", "score": "0.6143958", "text": "private function setGroup() {\n if (Request::has(\"include-group-read\") && Request::input(\"include-group-read\") === \"true\") { $permissionRead = 4; } else { $permissionRead = 0; }\n if (Request::has(\"include-group-write\") && Request::input(\"include-group-write\") === \"true\") { $permissionWrite = 2; } else { $permissionWrite = 0; }\n if (Request::has(\"include-group-execute\") && Request::input(\"include-group-execute\") === \"true\") { $permissionExecute = 1; } else { $permissionExecute = 0; }\n return $permissionRead + $permissionWrite + $permissionExecute;\n }", "title": "" }, { "docid": "dd7fc962e4e13fbbde8945ffa5b57670", "score": "0.6142128", "text": "function permissions_grant_user ($user, $dir, $file, $action)\n{\n\t$permissions = user_get_permissions($user);\n\n\t// determine the permission definitions\n\t$permdefs = permissions_get();\n\n\t// the user with the name \"admin\" always has admin rights\n\tif ($action == \"admin\" && $user == \"admin\")\n\t\treturn true;\n\n\t// check if the action is allowed\n\treturn ($permdefs[$action] & $permissions) != 0;\n}", "title": "" }, { "docid": "8af6f4c7ea49a315a63769f7ae3af539", "score": "0.6129321", "text": "function visible_to_admin_user()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6835aa73a971d79ac69e815bc506bdc2", "score": "0.61228883", "text": "public function adminPermisionListing()\n\t\t\t{\n\t\t\t\t$cls\t\t\t=\tnew adminUser();\n\t\t\t\t$cls->unsetSelectionRetention(array($this->getPageName()));\n\t\t\t\t $_SESSION['pid']\t=\t$_GET['id'];\n\t\t\t\t \n\t\t\t}", "title": "" }, { "docid": "dc5deb9e7455f944d496f1bd178ac891", "score": "0.61190975", "text": "private function setUser() {\n if (Request::has(\"include-user-read\") && Request::input(\"include-user-read\") === \"true\") { $permissionRead = 4; } else { $permissionRead = 0; }\n if (Request::has(\"include-user-write\") && Request::input(\"include-user-write\") === \"true\") { $permissionWrite = 2; } else { $permissionWrite = 0; }\n if (Request::has(\"include-user-execute\") && Request::input(\"include-user-execute\") === \"true\") { $permissionExecute = 1; } else { $permissionExecute = 0; }\n return $permissionRead + $permissionWrite + $permissionExecute;\n }", "title": "" }, { "docid": "a436531d8fb6e828ccb2009934e0c886", "score": "0.6092382", "text": "function virustotalscan_admin_permissions(&$admin_permissions)\r\n{\r\n \tglobal $lang;\r\n // se incarca fisierul de limba\r\n \t$lang->load(\"virustotalscan\", false, true);\r\n // se seteaza textul permisiunii\r\n\t$admin_permissions['virustotalscan'] = $lang->virustotalscan_canmanage;\r\n}", "title": "" }, { "docid": "690efea69b4186feb5e07d58174024b6", "score": "0.60880667", "text": "function _hippel_discussions_user_default_permissions() {\n $permissions = array();\n\n // Exported permission: create discuss content\n $permissions[] = array(\n 'name' => 'create discuss content',\n 'roles' => array(\n '0' => 'authenticated user',\n ),\n );\n\n // Exported permission: create reply content\n $permissions[] = array(\n 'name' => 'create reply content',\n 'roles' => array(\n '0' => 'authenticated user',\n ),\n );\n\n // Exported permission: edit own discuss content\n $permissions[] = array(\n 'name' => 'edit own discuss content',\n 'roles' => array(\n '0' => 'authenticated user',\n ),\n );\n\n // Exported permission: edit own reply content\n $permissions[] = array(\n 'name' => 'edit own reply content',\n 'roles' => array(\n '0' => 'authenticated user',\n ),\n );\n\n // Exported permission: use PHP for title patterns\n $permissions[] = array(\n 'name' => 'use PHP for title patterns',\n 'roles' => array(),\n );\n\n // Exported permission: use vote up/down\n $permissions[] = array(\n 'name' => 'use vote up/down',\n 'roles' => array(\n '0' => 'authenticated user',\n ),\n );\n\n // Exported permission: use vote up/down on nodes\n $permissions[] = array(\n 'name' => 'use vote up/down on nodes',\n 'roles' => array(\n '0' => 'authenticated user',\n ),\n );\n\n // Exported permission: view vote up/down count on nodes\n $permissions[] = array(\n 'name' => 'view vote up/down count on nodes',\n 'roles' => array(\n '0' => 'authenticated user',\n ),\n );\n\n return $permissions;\n}", "title": "" }, { "docid": "9a4347a6fa56ad497ca2a209df4c97b5", "score": "0.6086307", "text": "function check_user_permissions(&$tpl, $dmn_sqld_limit, $dmn_sqlu_limit, $dmn_php, $dmn_cgi, $dmn_subd_limit, $als_cnt, $dmn_mailacc_limit)\r\n{\r\n if ($dmn_mailacc_limit == -1) {\r\n $_SESSION['email_support'] = \"no\";\r\n\t\t$tpl -> assign('T_MAILS_SUPPORT', '');\r\n } else {\r\n $tpl -> parse('T_MAILS_SUPPORT', '.t_mails_support');\r\n\t}\r\n\r\n\t// check if alaias are available for this user\r\n\tif ($als_cnt == -1)\t{\r\n\t\t$_SESSION['alias_support'] = \"no\";\r\n\t\t$tpl -> assign('T_ALIAS_SUPPORT', '');\r\n\t} else \t{\r\n\t\t$tpl -> parse('T_ALIAS_SUPPORT', '.t_alias_support');\r\n\t}\r\n\r\n\t// check if subdomains are available for this user\r\n\tif ($dmn_subd_limit == -1)\r\n\t{\r\n\t\t$_SESSION['subdomain_support'] = \"no\";\r\n\t\t$tpl -> assign('T_SDM_SUPPORT', '');\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$tpl -> parse('T_SDM_SUPPORT', '.t_sdm_support');\r\n\t}\r\n\r\n\t// check if SQL Support is available for this user\r\n\tif ($dmn_sqld_limit == -1 || $dmn_sqlu_limit == -1)\r\n\t{\r\n\t\t$_SESSION['sql_support'] = \"no\";\r\n\t\t$tpl -> assign('SQL_SUPPORT', '');\r\n\t\t$tpl -> assign('T_SQL1_SUPPORT', '');\r\n\t\t$tpl -> assign('T_SQL2_SUPPORT', '');\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$tpl -> parse('T_SQL1_SUPPORT', '.t_sql1_support');\r\n\t\t$tpl -> parse('T_SQL2_SUPPORT', '.t_sql2_support');\r\n\t}\r\n\r\n\t// check if PHP Support is available for this user\r\n\tif ($dmn_php == 'no')\r\n\t{\r\n\t\t$tpl -> assign('T_PHP_SUPPORT', '');\r\n\t}\r\n\telse {\r\n\t\t$tpl -> assign(\r\n array(\r\n\t 'PHP_SUPPORT' => tr('yes')\r\n\t\t\t\t\t )\r\n );\r\n\t\t$tpl -> parse('T_PHP_SUPPORT', '.t_php_support');\r\n\r\n\t}\r\n\r\n\t// check if CGI Support is available for this user\r\n\tif ($dmn_cgi == 'no')\r\n\t{\r\n\t\t$tpl -> assign('T_CGI_SUPPORT', '');\r\n\t}\r\n\telse {\r\n\t\t$tpl -> assign(\r\n array(\r\n 'CGI_SUPPORT' => tr('yes')\r\n\t\t\t\t\t )\r\n );\r\n\t\t$tpl -> parse('T_CGI_SUPPORT', '.t_cgi_support');\r\n\r\n\t}\r\n\r\n\r\n}", "title": "" }, { "docid": "a11f72e2cb26a2f2045d063f8be287a4", "score": "0.6070292", "text": "function user_login_edit()\n{\n\t$Feul = new Feul;\n\t$member_checkbox = '';\n\tif($Feul->showMembersPermBox() == true)\n\t{\n\t\t$member_checkbox = \"checked\";\t\n\t}\n\t?>\n\t\t<div style=\"margin-top:20px;\">\n\t\t\t<p>\n\t\t\t\t<label style=\"display:inline!important; margin-right:10px;\" for=\"member-only\">Только для зарегистрированных:</label>\n\t\t\t\t<input style=\"width:auto;\" type=\"checkbox\" value=\"yes\" name=\"member-only\" <?php echo $member_checkbox; ?> />\n\t\t\t</p>\n\t\t</div> \n\t<?php\n}", "title": "" }, { "docid": "5cbfcb628bcc9865458c6d91b1bf11b8", "score": "0.60562605", "text": "function acf_current_user_can_admin()\n{\n}", "title": "" }, { "docid": "034160d9e0455b6df2350044be1490c9", "score": "0.6041733", "text": "public function performPermission()\n {\n // User Role flags\n // Admin = 20\n // Editor = 40\n // Author = 60 (deprecated)\n // Webuser = 100 (deprecated)\n //\n // Webuser dont have access to edit node data\n //\n if($this->controllerVar['loggedUserRole'] > 40)\n {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "e26981660d8959a553805674d35a1cf5", "score": "0.6026648", "text": "function check_permission()\n {\n // Make sure the user is logged-in\n require_course_login($this->course, true, $this->cm);\n\n add_to_log($this->course->id, 'sloodle', 'view sloodle module', \"view.php?id={$this->cm->id}\", \"{$this->sloodle->id}\", $this->cm->id);\n \n // Check for permissions\n $this->module_context = get_context_instance(CONTEXT_MODULE, $this->cm->id);\n $this->course_context = get_context_instance(CONTEXT_COURSE, $this->course->id);\n if (has_capability('moodle/course:manageactivities', $this->module_context)) $this->canedit = true;\n\n // If the module is hidden, then can the user still view it?\n if (empty($this->cm->visible) && !has_capability('moodle/course:viewhiddenactivities', $this->module_context)) notice(get_string('activityiscurrentlyhidden'));\n }", "title": "" }, { "docid": "b16ebe3f8bd55c4ebe4297e6514865f8", "score": "0.6023541", "text": "function virustotalscan_check_permissions($groups_comma)\r\n{\r\n global $mybb;\r\n // daca nu a fost trimis niciun grup ca si parametru\r\n if ($groups_comma == '') return false;\r\n // se verifica posibilitatea ca nu cumva sa fie mai multe grupuri trimise ca parametru\r\n $groups = explode(\",\", $groups_comma);\r\n // se creaza vectori cu acestee grupuri\r\n $add_groups = explode(\",\", $mybb->user['additionalgroups']);\r\n // se fac teste de apartenenta\r\n if (!in_array($mybb->user['usergroup'], $groups)) { \r\n // in grupul primar nu este\r\n // verificam mai departe daca este in cel aditional, secundar\r\n if ($add_groups) {\r\n if (count(array_intersect($add_groups, $groups)) == 0)\r\n return false;\r\n else\r\n return true;\r\n }\r\n else \r\n return false;\r\n }\r\n else\r\n return true;\r\n}", "title": "" }, { "docid": "c3ed80c7de853099abd720582af02d1b", "score": "0.6019679", "text": "function permissions() {\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "0d589a281d48afd717ba8b05901c6e2a", "score": "0.60186493", "text": "function admin_member() {\n\n\t\t}", "title": "" }, { "docid": "3321bc8b199a6f8c506af4c2e267e3a3", "score": "0.601815", "text": "static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }", "title": "" }, { "docid": "b1e06ce0367e93a9a74147476752936d", "score": "0.5991906", "text": "function showPermissions($multiUserID, $permissionID)\n{\n\tglobal $con;\n\t\n\t$query_ConsultaFuncion = sprintf(\"SELECT * FROM multi_user_access WHERE id_user = %s AND permissions = %s\",\n\t\t\t\t\t\t\t\t\tGetSQLValueString($multiUserID, \"int\"),\n\t\t\t\t\t\t\t\t\tGetSQLValueString($permissionID, \"text\"));\n\t//echo $query_ConsultaFuncion;\n\t$ConsultaFuncion = mysqli_query($con, $query_ConsultaFuncion) or die(mysqli_error($con));\n\t$row_ConsultaFuncion = mysqli_fetch_assoc($ConsultaFuncion);\n\t$totalRows_ConsultaFuncion = mysqli_num_rows($ConsultaFuncion);\n\t\n\tif ($totalRows_ConsultaFuncion > 0) \n\t\treturn true;\n\telse return false;\n\t\n\tmysqli_free_result($ConsultaFuncion);\n}", "title": "" }, { "docid": "5e36f94ee29e88141fd5a459954f7296", "score": "0.59905016", "text": "function perm_check($content)\n{\n\t$Feul = new Feul;\n\tif($Feul->checkPerm() == true)\n\t{\n\t\treturn $content;\n\t}\n\telse\n\t{\n\t\treturn $Feul->getData('protectedmessage');\n\t}\n}", "title": "" }, { "docid": "9082eae40356c75cb257a87382007038", "score": "0.5985089", "text": "function control_access($sKey, $id){ \r\n\t$permiso=false;\r\n\t$permisosAdmin=$_SESSION[\"R0l3sp3rM1s0s\"];\r\n\tif($permisosAdmin[$sKey][$id]==\"SI\"){\r\n\t\t$permiso=true;\r\n\t}\r\n\treturn $permiso;\r\n}", "title": "" }, { "docid": "d052aee0598ec7bf3184fb8c8036465e", "score": "0.5978569", "text": "function grantPermissions($userid, $pageid) {\n\t//serving change permission requests\n\tif(isset($_GET['doaction']) && $_GET['doaction'] == \"changePerm\") {\n\t\t$permtype = escape($_GET['permtype']);\n\t\t$pageid = escape($_GET['pageid']);\n\t\t$usergroupid = escape($_GET['usergroupid']);\n\t\t$permid = escape($_GET['permid']);\n\t\t$perm = escape($_GET['perm']);\n\t\t$flag = true;\n\t\tif($perm == 'Y' || $perm == 'N') {\n\t\t\tif($permission = mysql_fetch_array(mysql_query(\"SELECT `perm_permission` FROM `\" . MYSQL_DATABASE_PREFIX . \"userpageperm` WHERE `perm_type` = '{$permtype}' AND `page_id` = '{$pageid}' AND `usergroup_id` = '{$usergroupid}' AND `perm_id` = '{$permid}'\"))) {\n\t\t\t\tif($permission['perm_permission'] != $perm) {\n\t\t\t\t\tmysql_query(\"UPDATE `\" . MYSQL_DATABASE_PREFIX . \"userpageperm` SET `perm_permission` = '{$perm}' WHERE `perm_type` = '{$permtype}' AND `page_id` = '{$pageid}' AND `usergroup_id` = '{$usergroupid}' AND `perm_id` = '{$permid}'\");\n\t\t\t\t\tif(mysql_affected_rows() == 0)\n\t\t\t\t\t\t$flag = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmysql_query(\"INSERT `\" . MYSQL_DATABASE_PREFIX . \"userpageperm`(`perm_type`, `page_id`, `usergroup_id`, `perm_id`, `perm_permission`) VALUES('$permtype','$pageid','$usergroupid','$permid','$perm')\");\n\t\t\t\tif(mysql_affected_rows() == 0)\n\t\t\t\t\t$flag = false;\n\t\t\t}\n\t\t} else {\n\t\t\tif($permission = mysql_fetch_array(mysql_query(\"SELECT `perm_permission` FROM `\" . MYSQL_DATABASE_PREFIX . \"userpageperm` WHERE `perm_type` = '{$permtype}' AND `page_id` = '{$pageid}' AND `usergroup_id` = '{$usergroupid}' AND `perm_id` = '{$permid}'\"))) {\n\t\t\t\tmysql_query(\"DELETE FROM `\" . MYSQL_DATABASE_PREFIX . \"userpageperm` WHERE `perm_type` = '{$permtype}' AND `page_id` = '{$pageid}' AND `usergroup_id` = '{$usergroupid}' AND `perm_id` = '{$permid}'\");\n\t\t\t\tif(mysql_affected_rows() == 0)\n\t\t\t\t\t$flag = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($flag)\n\t\t\techo \"1\";\n\t\telse\n\t\t\techo \"0\";\n\t\tdisconnect();\n\t\texit();\n\t}\n\t//serving refresh permissions request\n\tif(isset($_GET['doaction']) && $_GET['doaction'] == 'getpermvars' && isset($_GET['pageid'])) {\n\t\tglobal $cmsFolder,$urlRequestRoot, $templateFolder;\n\t\t$pageid = escape($_GET['pageid']);\n\t\tif(mysql_fetch_array(mysql_query(\"SELECT `page_name` FROM `\" . MYSQL_DATABASE_PREFIX . \"pages` WHERE `page_id` = '{$pageid}'\"))) {\n\t\t$pagepath = array();\n\t\tparseUrlDereferenced($pageid, $pagepath);\n\t\t$pageid = $pagepath[count($pagepath) - 1];\n\n\t\t$groups = array_reverse(getGroupIds($userid));\n\t\t$virtue = '';\n\t\t$maxPriorityGroup = getMaxPriorityGroup($pagepath, $userid, $groups, $virtue);\n\t\tif($maxPriorityGroup == -1) {\n\t\t\treturn 'You do not have the required permissions to view this page.';\n\t\t}\n\n\t\tif($virtue == 'user') {\n\t\t\t$grantableActions = getGroupPermissions($groups, $pagepath, $userid);\n\t\t}\n\t\telse {\n\t\t\t$grantableActions = getGroupPermissions($groups, $pagepath);\n\t\t}\n\n\t\t$actionCount = count($_POST['permission']);\n\t\t$checkedActions = array();\n\t\tfor($i = 0; $i < $actionCount; $i++) {\n\t\t\tlist($modTemp, $actTemp) = explode('_', escape($_POST['permission'][$i]), 2);\n\n\t\t\tif(isset($_POST[$modTemp.$actTemp])) {\n\t\t\t\tif(isset($grantableActions[$modTemp])) {\n\t\t\t\t\tfor($j = 0; $j < count($grantableActions[$modTemp]); $j++) {\n\t\t\t\t\t\tif($grantableActions[$modTemp][$j][1] == $actTemp) {\n\t\t\t\t\t\t\t$checkedActions[$modTemp][] = $grantableActions[$modTemp][$j];\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(count($checkedActions) > 0) {\n\t\t\t$grantableActions = $checkedActions;\n\t\t}\n\n\t\t$modifiableGroups = getModifiableGroups($userid, $maxPriorityGroup);\n\t\t$modifiableGroupIds = array(0, 1);\n\t\tfor($i = 0; $i < count($modifiableGroups); $i++) {\n\t\t\t$modifiableGroupIds[] = $modifiableGroups[$i]['group_id'];\n\t\t}\n\t\t$permissions = formattedPermissions($pagepath, $modifiableGroupIds, $grantableActions);\n\t\t\t$ret =<<<RET\npageid = {$pageid};\n{$permissions}\nRET;\n\t\t\techo $ret;\n\t\t} else {\n\t\t\techo \"Error: Invalid Pageid passed\";\n\t\t}\n\t\tdisconnect();\n\t\texit();\n\t}\n\t\n\tglobal $cmsFolder,$urlRequestRoot;\n\t$pagepath = array();\n\tparseUrlDereferenced($pageid, $pagepath);\n\t$pageid = $pagepath[count($pagepath) - 1];\n\n\t$groups = array_reverse(getGroupIds($userid));\n\t$virtue = '';\n\t$maxPriorityGroup = getMaxPriorityGroup($pagepath, $userid, $groups, $virtue);\n\tif($maxPriorityGroup == -1) {\n\t\treturn 'You do not have the required permissions to view this page.';\n\t}\n\n\tif($virtue == 'user') {\n\t\t$grantableActions = getGroupPermissions($groups, $pagepath, $userid);\n\t}\n\telse {\n\t\t$grantableActions = getGroupPermissions($groups, $pagepath);\n\t}\n\tif(isset($_POST['permission']))\n\t$actionCount = count($_POST['permission']);\n\telse $actionCount=\"\";\n\t$checkedActions = array();\n\tfor($i = 0; $i < $actionCount; $i++) {\n\t\tlist($modTemp, $actTemp) = explode('_', escape($_POST['permission'][$i]), 2);\n\n\t\tif(isset($_POST[$modTemp.$actTemp])) {\n\t\t\tif(isset($grantableActions[$modTemp])) {\n\t\t\t\tfor($j = 0; $j < count($grantableActions[$modTemp]); $j++) {\n\t\t\t\t\tif($grantableActions[$modTemp][$j][1] == $actTemp) {\n\t\t\t\t\t\t$checkedActions[$modTemp][] = $grantableActions[$modTemp][$j];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(count($checkedActions) > 0) {\n\t\t$grantableActions = $checkedActions;\n\t}\n\n\t$modifiableGroups = getModifiableGroups($userid, $maxPriorityGroup);\n\t$modifiableGroupIds = array(0, 1);\n\tfor($i = 0; $i < count($modifiableGroups); $i++) {\n\t\t$modifiableGroupIds[] = $modifiableGroups[$i]['group_id'];\n\t}\n\t$perms = json_encode(formatPermissions($grantableActions));\n\t$permissions = formattedPermissions($pagepath, $modifiableGroupIds, $grantableActions);\n\t$groups = customGetGroups($maxPriorityGroup);\n\t$users = customGetAllUsers();\n\tglobal $templateFolder;\n\t$smarttableconfig = array (\n\t\t\t'permtable' => array(\n\t\t\t\t'sPaginationType' => 'two_button',\n\t\t\t\t'bAutoWidth' => 'false',\n\t\t\t\t'aoColumns' => '{ \"sWidth\": \"100px\" }'\n\t\t\t),\n\t\t\t'permtable2' => array(\n\t\t\t\t'sPaginationType' => 'two_button',\n\t\t\t\t'bAutoWidth' => 'false',\n\t\t\t\t'aoColumns' => '{ \"sWidth\": \"100px\" }'\n\t\t\t)\n\t);\n\t$ret = smarttable::render(array('permtable','permtable2'),$smarttableconfig);\n\t$globals = getGlobalSettings();\n\t$baseURL = \"./+grant&doaction=changePerm\";\n\tif($globals['url_rewrite']=='false')\n\t\t$baseURL = prettyurl($baseURL);\n\t$selected = \"var selected = {'permissions' : [], 'users' : [], 'groups' : []};\";\n\tif(isset($_GET['doaction']) && $_GET['doaction'] == 'getUserPerm') {\n\t\t$get_selectedPerms = array();\n\t\t$get_selectedGroups = array();\n\t\t$get_selectedUsers = array();\n\t\tforeach($_POST as $key => $var)\n\t\t\tif(substr($key,0,12)==\"permissions_\")\n\t\t\t\t$get_selectedPerms[] = (int)substr($key,12);\n\t\tlist($get_sortedGroupPerms,$get_sortedUserPerms) = getAllPermissionsOnPage($pagepath, $modifiableGroupIds, $grantableActions);\n\t\t$save = 0;\n\t\tforeach($get_sortedGroupPerms['Y'] as $get_groupId => $get_data) {\n\t\t\t$found = false;\n\t\t\tforeach($get_sortedGroupPerms['Y'][$get_groupId] as $get_permId) {\n\t\t\t\tforeach($get_selectedPerms as $selected_perm)\n\t\t\t\t\tif($selected_perm == $get_permId) {\n\t\t\t\t\t\t$get_selectedGroups[] = (int)$get_groupId;\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t}\n\t\t\t\tif($found)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif($get_groupId==0&&$found)\n\t\t\t\t$save += 1;\n\t\t\tif($get_groupId==1&&$found)\n\t\t\t\t$save += 2;\n\t\t}\n\t\tforeach($get_sortedUserPerms['Y'] as $get_userId => $get_data) {\n\t\t\t$found = false;\n\t\t\tforeach($get_sortedUserPerms['Y'][$get_userId] as $get_permId) {\n\t\t\t\tforeach($get_selectedPerms as $selected_perm)\n\t\t\t\t\tif($selected_perm == $get_permId) {\n\t\t\t\t\t\t$get_selectedUsers[] = (int)$get_userId;\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t}\n\t\t\t\tif($found)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$get_selectedGroups = filterByPriority($maxPriorityGroup,$get_selectedGroups);\n\t\tif($save%2==1)\n\t\t\t$get_selectedGroups[] = 0;\n\t\tif($save/2==1)\n\t\t\t$get_selectedGroups[] = 1;\n\t\t$selected = \"var selected = {'permissions' : \" . json_encode($get_selectedPerms) . \", 'users' : \" . json_encode($get_selectedUsers) . \", 'groups' : \" . json_encode($get_selectedGroups) . \"};\";\n\t}\n\tif(isset($_GET['doaction']) && $_GET['doaction'] == 'getPermUser') {\n\t\t\n\t\t$get_selectedPerms = array();\n\t\t$get_selectedGroups = array();\n\t\t$get_selectedUsers = array();\n\t\tforeach($_POST as $key => $var)\n\t\t\tif(substr($key,0,6)==\"users_\")\n\t\t\t\t$get_selectedUsers[] = (int)substr($key,6);\n\t\t\telse if(substr($key,0,7)==\"groups_\")\n\t\t\t\t$get_selectedGroups[] = (int)substr($key,7);\n\t\tlist($get_sortedGroupPerms,$get_sortedUserPerms) = getAllPermissionsOnPage($pagepath, $modifiableGroupIds, $grantableActions);\n\t\t$save = 0;\n\t\tforeach($get_sortedGroupPerms['Y'] as $get_groupId => $get_data) {\n\t\t\tif(isPresent($get_groupId,$get_selectedGroups)) {\n\t\t\t\tforeach($get_sortedGroupPerms['Y'][$get_groupId] as $get_permId) {\n\t\t\t\t\tif(!isPresent($get_permId,$get_selectedPerms))\n\t\t\t\t\t\t$get_selectedPerms[] = $get_permId;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tforeach($get_sortedUserPerms['Y'] as $get_userId => $get_data) {\n\t\t\tif(isPresent($get_userId,$get_selectedUsers)) {\n\t\t\t\tforeach($get_sortedUserPerms['Y'][$get_userId] as $get_permId) {\n\t\t\t\t\tif(!isPresent($get_permId,$get_selectedPerms))\n\t\t\t\t\t\t$get_selectedPerms[] = $get_permId;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$selected = \"var selected = {'permissions' : \" . json_encode($get_selectedPerms) . \", 'users' : \" . json_encode($get_selectedUsers) . \", 'groups' : \" . json_encode($get_selectedGroups) . \"};\";\n\t}\n\t$ret .= <<<RET\n<style type=\"text/css\" title=\"currentStyle\">\n\tdiv#permtable_filter input { width: 90px; }\n\tdiv#permtable2_filter input { width: 90px; }\n</style>\n<script type=\"text/javascript\" language=\"javascript\" src=\"$urlRequestRoot/$cmsFolder/$templateFolder/common/scripts/permissionsTable.js\"></script>\n<script type=\"text/javascript\">\nvar baseURL = \"$baseURL\";\nvar pageid = {$pageid};\nvar permissions = {$perms};\nvar permGroups;\nvar permUsers;\nvar groups = {{$groups}};\nvar users = {{$users}};\n{$permissions}\n{$selected}\n</script>\n<div id='info'></div>\n<INPUT type=checkbox id='skipAlerts'> Skip Alerts <br>\n<div id='permTable'>\n\n</div>\n<table width=100%>\n<tr>\n<td width=50%>\n<a href='javascript:selectAll1()'>Select All</a> <a href='javascript:clearAll1()'>Clear All</a> <a href='javascript:toggle1()'>Toggle</a> <a href='javascript:getuserperm()'>Check Users having selected Permission</a><br>\n<form action='./+grant&doaction=getUserPerm' method=\"POST\" id='getuserperm'>\n<table class=\"userlisttable display\" id='permtable' name='permtable'><thead><tr><th>Permissions</th></thead><tbody id='actionsList'>\n\n</tbody></table>\n</form>\n</td>\n<td width=50%>\n<a href='javascript:selectAll2()'>Select All</a> <a href='javascript:clearAll2()'>Clear All</a> <a href='javascript:toggle2()'>Toggle</a> <a href='javascript:getpermuser()'>Check Permissions selected User is having</a><br>\n<form action='./+grant&doaction=getPermUser' method=\"POST\" id='getpermuser'>\n<table class=\"userlisttable display\" id='permtable2' name='permtable2'><thead><tr><th>Users</th></thead><tbody id='usersList'>\n\n</tbody></table>\n</form>\n</td>\n</tr>\n</table>\n\n<a href='javascript:populateList()'>Click here if the lists are empty</a>\nRET;\n\tglobal $STARTSCRIPTS;\n\t$STARTSCRIPTS .= \" populateList();\";\n\treturn $ret;\n}", "title": "" }, { "docid": "ce018e8d50293a79414f364bd389c448", "score": "0.5978187", "text": "function checkAccess() ;", "title": "" }, { "docid": "51f0107dce5caabdce775e40a2e1741d", "score": "0.59559155", "text": "protected function fixPermission() {}", "title": "" }, { "docid": "d9acd37a755a3a74bada2ac7e6920c75", "score": "0.59554094", "text": "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "title": "" }, { "docid": "99643713c16b14caba6060f5eb8e7525", "score": "0.5953705", "text": "function preview_forums()\n\t{\n\t\t//-----------------------------------------\n\t\t// Check for a valid ID\n\t\t//-----------------------------------------\n\n\t\tif ($this->ipsclass->input['id'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя произвести изменения в масках доступа этому ID, пожалуйста, попытайтесь еще раз\");\n\t\t}\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => \"perm_id=\".intval($this->ipsclass->input['id']) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\tif ( ! $perms = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя произвести изменения в масках доступа этому ID, пожалуйста, попытайтесь еще раз\");\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// What we doin'?\n\t\t//-----------------------------------------\n\n\t\tswitch( $this->ipsclass->input['t'] )\n\t\t{\n\t\t\tcase 'start':\n\t\t\t\t$human_type = '<b>Создание тем</b> в этом форуме';\n\t\t\t\t$code_word = 'start_perms';\n\t\t\t\tbreak;\n\n\t\t\tcase 'reply':\n\t\t\t\t$human_type = '<b>Публикация ответов</b> в этом форуме';\n\t\t\t\t$code_word = 'reply_perms';\n\t\t\t\tbreak;\n\n\t\t\tcase 'show':\n\t\t\t\t$human_type = '<b>Просмотр форума</b> в этом форуме';\n\t\t\t\t$code_word = 'show_perms';\n\t\t\t\tbreak;\n\n\t\t\tcase 'upload':\n\t\t\t\t$human_type = '<b>Загрузка файлов</b> в этом форуме';\n\t\t\t\t$code_word = 'upload_perms';\n\t\t\t\tbreak;\n\n\t\t\tcase 'download':\n\t\t\t\t$human_type = '<b>Скачивание файлов</b> в этом форуме';\n\t\t\t\t$code_word = 'download_perms';\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$human_type = '<b>Просмотр</b> этого форума';\n\t\t\t\t$code_word = 'read_perms';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get all members using that ID then!\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->adskin->td_header[] = array( \"$human_type\" , \"100%\" );\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Просмотр: \" . $perms['perm_name'] );\n\n\t\t$the_html = \"\";\n\n\t\t$perm_id = intval($this->ipsclass->input['id']);\n\n\t\t$theforums = $this->forumfunc->ad_forums_forum_list(1);\n\n\t\tforeach( $theforums as $v )\n\t\t{\n\t\t\t$id = $v[0];\n\t\t\t$name = $v[1];\n\n\t\t\t$this->ipsclass->forums->forum_by_id[$id][ $code_word ] = isset($this->ipsclass->forums->forum_by_id[$id][ $code_word ]) ? $this->ipsclass->forums->forum_by_id[$id][ $code_word ] : '';\n\n\t\t\tif ($this->ipsclass->forums->forum_by_id[$id][ $code_word ] == '*')\n\t\t\t{\n\t\t\t\t$the_html[] = \"<span style='color:green;font-weight:bold''>\".$name.\"</span>\";\n\t\t\t}\n\t\t\telse if (preg_match( \"/(^|,)\".$perm_id.\"(,|$)/\", $this->ipsclass->forums->forum_by_id[$id][ $code_word ]) )\n\t\t\t{\n\t\t\t\t$the_html[] = \"<span style='color:green;font-weight:bold''>\".$name.\"</span>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif( $code_word != 'show_perms' AND $this->ipsclass->forums->forum_by_id[$id]['parent_id'] == 'root' )\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// CATEGORY\n\t\t\t\t\t//-----------------------------------------\n\n\t\t\t\t\t$the_html[] = \"<span style='color:grey;'>\".$name.\"</span>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// CAN'T ACCESS\n\t\t\t\t\t//-----------------------------------------\n\n\t\t\t\t\t$the_html[] = \"<span style='color:red;font-weight:bold''>\".$name.\"</span>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$html = implode( \"<br />\", $the_html );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $html ) );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'preview_forums' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'act' , 'group' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 3 => array( 'id' , $this->ipsclass->input['id'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 4 => array( 'section', $this->ipsclass->section_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"60%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"40%\" );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Информация\" );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"$human_type: возможно\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"<input type='text' readonly='readonly' style='border:1px solid black;background-color:green;size=30px' name='blah'>\"\n\t\t\t\t\t\t\t\t\t\t ) );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"$human_type: невозможно\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"<input type='text' readonly='readonly' style='border:1px solid gray;background-color:red;size=30px' name='blah'>\"\n\t\t\t\t\t\t\t\t\t\t ) );\n\n\t\tif( $code_word != \"show_perms\" )\n\t\t{\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Категория (эта маска не используется)\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<input type='text' readonly='readonly' style='border:1px solid gray;background-color:grey;size=30px' name='blah'>\"\n\t\t\t\t\t\t\t\t\t\t\t ) );\n\t\t}\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Проверить на...\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->ipsclass->adskin->form_dropdown( 't',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray( 0 => array( 'start', 'Создание тем' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 1 => array( 'reply', 'Публикацию ответов' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'read' , 'Чтение тем' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 3 => array( 'show' , 'Просмотр форума' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 4 => array( 'upload', 'Загрузку файлов' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 5 => array( 'download', 'Скачивание файлов' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ), $this->ipsclass->input['t'] )\n\t\t\t\t\t\t\t\t\t\t ) );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_form( \"Просмотреть\" );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n\t\t$this->ipsclass->admin->print_popup();\n\n\t}", "title": "" }, { "docid": "32f0dbe485296a79b99c3e84a73cc54f", "score": "0.5948695", "text": "function check_permission()\r\n {\r\n // Ensure the user logs in\r\n require_login($this->course->id);\r\n if (isguestuser()) error(get_string('noguestaccess', 'sloodle'));\r\n add_to_log($this->course->id, 'course', 'view sloodle data', '', \"{$this->course->id}\");\r\n\r\n // Ensure the user is allowed to update information on this course\r\n $this->course_context = get_context_instance(CONTEXT_COURSE, $this->course->id);\r\n require_capability('moodle/course:update', $this->course_context);\r\n }", "title": "" }, { "docid": "f12b18a966f97bbc8379649c2d1a5520", "score": "0.59452605", "text": "public function checkPermission()\n\t{\n\t\tif ($this->User->isAdmin) {\n\t\t\treturn;\n\t\t}\n\n\t\t// TODO\n\t}", "title": "" }, { "docid": "a672290163699ecfe5eb66bb19f106c2", "score": "0.5943435", "text": "function forum_mod_status ($forum_id)\n{\n\tglobal $db;\n\t// Gather list of moderators for this forums and store them in an array\n\t// that then can be searched for while displaying posts. This will only need\n\t// to be called once per viewtopic ;-)\n\t//\n\n\t$sql = \"SELECT u.user_id, u.username \n\t FROM \" . AUTH_ACCESS_TABLE . \" aa, \" . USER_GROUP_TABLE . \" ug, \" . GROUPS_TABLE . \" g, \" . USERS_TABLE . \" u\n\t\tWHERE aa.forum_id = $forum_id \n\t\t AND aa.auth_mod = \" . TRUE . \" \n\t\t \tAND g.group_single_user = 1\n\t\t \tAND ug.group_id = aa.group_id \n\t\t\tAND g.group_id = aa.group_id \n\t\t\tAND u.user_id = ug.user_id \n\t GROUP BY u.user_id, u.username \n\t\tORDER BY u.user_id\";\n\tif ( !($result = $db->sql_query($sql)) )\n\t{\n\t message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);\n\t}\n\n\t$moderators = array();\n\twhile( $row = $db->sql_fetchrow($result) )\n\t{\n\t $moderators[] = $row['user_id'];\n\t}\n\treturn $moderators;\n}", "title": "" }, { "docid": "d62d9d19aef19bef356b9baf2993f9c8", "score": "0.59307176", "text": "function _user_is_admin_user($key){ //GENHD-129 added flag in user form to allow access to acm and study inizialization to the user\n\t$retval = array();\n\t$bind = array();\n\t$bind['KEY'] = $key;\n\t$rs = db_query_bind(\"select ugu.userid, ugu.id_gruppou, ugu.abilitato from utenti_gruppiu ugu, gruppiu gu, ana_gruppiu agu, utenti_visteammin uva where gu.id_gruppou=agu.id_gruppou and ugu.id_gruppou=gu.id_gruppou and gu.abilitato=1 and upper(agu.nome_gruppo) in ('PROFILO AMMINISTRATORE','ACM_ADMIN') and uva.userid=ugu.userid and ugu.userid=:KEY\",$bind);\n\t//echo \"<b>select ugu.userid, ugu.id_gruppou, ugu.abilitato from utenti_gruppiu ugu, gruppiu gu, ana_gruppiu agu, utenti_visteammin uva where gu.id_gruppou=agu.id_gruppou and ugu.id_gruppou=gu.id_gruppou and gu.abilitato=1 and agu.nome_gruppo='Profilo amministratore' and uva.userid=ugu.userid and ugu.userid=\".$bind['KEY'].\"</b>\";\n\tif ($row = db_nextrow($rs)){\n\t\t$retval = $row;\n\t}\n\t// echo \"<pre>\";\n\t// print_r($retval);\n\t// echo \"</pre>\";\n\treturn $retval;\n}", "title": "" }, { "docid": "2c80808a74bd8bec59adbd0035fe3725", "score": "0.5929171", "text": "function sh_can_user_post_in_forum($id) {\n\treturn true;\n}", "title": "" }, { "docid": "1ca531b69a7ccc1afe923f6f41a85933", "score": "0.59201586", "text": "function verificarPermisos($permiso)\n{\n try\n {\n if (logged_user()->tipo != \"A\")\n {\n if (logged_user()->$permiso != 1)\n {\n echo \"No tiene permisos para esta accion\";\n die();\n } else\n {\n return true;\n }\n } else\n {\n return true;\n }\n } catch (Exception $ex)\n {\n Session::instance()->setFlash('ERROR: ' . $ex->getMessage());\n }\n}", "title": "" }, { "docid": "ab62a4fbb25a370784cab540bc747156", "score": "0.5919998", "text": "public function allowed_group()\n\t{\n\t\t$which = func_get_args();\n\n\t\tif ( ! count($which))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Super Admins always have access\n\t\tif (ee()->session->userdata('group_id') == 1)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tforeach ($which as $w)\n\t\t{\n\t\t\t$k = ee()->session->userdata($w);\n\n\t\t\tif ( ! $k OR $k !== 'y')\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "ad02d277c725522cc1ec0e6558cef6e7", "score": "0.59114206", "text": "function getUserAccessRight($user_id, $module)\n{\n\treturn 1;\n\t\n\t$mycon = databaseConnect();\n require_once(\"inc_dbfunctions.php\");\n $dataRead = New DataRead();\n\n $groupdetails = $dataRead->admins_groups_getbyuserid($mycon,$user_id);\n\n if($groupdetails == false) return false;\n \n if($groupdetails['username'] == \"administrator\") return 1;\n \n\t$rights = $groupdetails['rights'];\n \n\t\n\t//check if the right exists for the specified module\n\tif(strpos($rights,$module) === false) return 0;\n\t\n\t//at this point everuthing is fine\n\treturn 1;\n}", "title": "" }, { "docid": "ea5a528468e616ac56a27256345e78c5", "score": "0.5910249", "text": "function isAuthorized_menu_fmks($strUsers, $strGroups, $UserName, $UserGroup) { \n // For security, start by assuming the visitor is NOT authorized. \n $isValid = False; \n\n // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. \n // Therefore, we know that a user is NOT logged in if that Session variable is blank. \n if (!empty($UserName)) { \n // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. \n // Parse the strings into arrays. \n $arrUsers = Explode(\",\", $strUsers); \n $arrGroups = Explode(\",\", $strGroups); \n if (in_array($UserName, $arrUsers)) { \n $isValid = true; \n } \n // Or, you may restrict access to only certain users based on their username. \n if (in_array($UserGroup, $arrGroups)) { \n $isValid = true; \n } \n if (($strUsers == \"\") && true) { \n $isValid = true; \n } \n } \n return $isValid; \n}", "title": "" }, { "docid": "ea5a528468e616ac56a27256345e78c5", "score": "0.5910249", "text": "function isAuthorized_menu_fmks($strUsers, $strGroups, $UserName, $UserGroup) { \n // For security, start by assuming the visitor is NOT authorized. \n $isValid = False; \n\n // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. \n // Therefore, we know that a user is NOT logged in if that Session variable is blank. \n if (!empty($UserName)) { \n // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. \n // Parse the strings into arrays. \n $arrUsers = Explode(\",\", $strUsers); \n $arrGroups = Explode(\",\", $strGroups); \n if (in_array($UserName, $arrUsers)) { \n $isValid = true; \n } \n // Or, you may restrict access to only certain users based on their username. \n if (in_array($UserGroup, $arrGroups)) { \n $isValid = true; \n } \n if (($strUsers == \"\") && true) { \n $isValid = true; \n } \n } \n return $isValid; \n}", "title": "" }, { "docid": "538d7801013ba5098c795c8a1bd24b20", "score": "0.59085184", "text": "public function privileges()\n {\n $this->privileges = $this->Acces->list($_SESSION['guild_id'],'privilege');\n }", "title": "" }, { "docid": "cfc0e8c5cd4d3907fd09f0e42da42abe", "score": "0.5908083", "text": "function _isModerator($a_ref_id, $a_usr_id)\n\t{\n\t\treturn in_array($a_usr_id, ilForum::_getModerators($a_ref_id));\n\t}", "title": "" }, { "docid": "f9c7e8b8de212285938f571309f5b8c3", "score": "0.59075737", "text": "public function setPrivilages()\n {\n // $this->acl->allow('guest',null, array('view', 'index'));\n // $this->acl->allow('editor',array('view','edit'));\n // $this->acl->allow('admin');\n \n // Setting privilages for actions as per particular controller\n // $this->acl->allow('<role>','<controller>', <array of controller actions>);\n // You can also fetch it from DB.\n \n// // $this->acl->deny('guest','news', 'index');\n// $this->acl->allow('guest','news', array( 'demo1', 'view', 'index'));\n// $this->acl->allow('guest','job-board', array('index'));\n//\n// $this->acl->allow('editor','news', array( 'edit', 'view', 'index')); \n// $this->acl->allow('editor','job-board', array('edit', 'index'));\n//\n// $this->acl->allow('admin');\n //$this->acl->allow('guest');\n //Guest ACL\n $this->acl->deny('guest',array('user','shop','admin'));\n $this->acl->allow('guest','index');\n \n //User ACL\n $this->acl->deny('user',array('shop','admin'));\n $this->acl->allow('user','user');\n $this->acl->allow('user','index',array('logout','notfound'));\n \n \n // Shop ACL\n $this->acl->deny('shop',array('user','admin'));\n $this->acl->allow('shop',array('index','shop'));\n \n //Admin ACL\n //$this->acl->deny('admin',array('user','shop'));\n //$this->acl->allow('admin',array('index','admin'));\n $this->acl->allow('admin');\n // Note that the actions which are not mentioned above i.e. inside array of\n // controller-action - becomes access-denied automatically\n // as in above example, news controller also have one more action demo2,\n // but demo2 is not mentioned in above allow actions, so \n // when guest tries to access the action - demo2, it would not show the \n // content of demo2, rather It would show content of error/index.phtml\n }", "title": "" }, { "docid": "8ef462791435d21c950e9fdab0033317", "score": "0.5898576", "text": "function egsr_group_admin_cap(){\n return Array ( \n 'add_users' => true,\n 'create_users' => true,\n 'delete_users' => true,\n 'delete_others_pages' => true,\n 'delete_others_posts' => true,\n 'delete_pages' => true,\n 'delete_posts' => true,\n 'delete_private_pages' => true,\n 'delete_private_posts' => true,\n 'delete_published_pages' => true,\n 'delete_published_posts' => true,\n 'edit_others_pages' => true,\n 'edit_others_posts' => true,\n 'edit_pages' => true,\n 'edit_posts' => true,\n 'edit_private_pages' => true,\n 'edit_private_posts' => true,\n 'edit_published_pages' => true,\n 'edit_published_posts' => true,\n 'edit_users' => true,\n 'list_users' => true,\n 'manage_categories' => true,\n 'manage_links' => true,\n 'moderate_comments' => true,\n 'publish_pages' => true,\n 'publish_posts' => true,\n 'read' => true,\n 'read_private_pages' => true,\n 'read_private_posts' => true,\n 'unfiltered_html' => true,\n 'upload_files' => true,\n );\n}", "title": "" }, { "docid": "23002a98c666ea336b2f684a98b100dd", "score": "0.5894287", "text": "function check_has_permissions() {\n $details = $this->get_user_details('1');\n\t\treturn 0 != strcmp(strtoupper($details['StatusInfo']), '\"ACCESS DENIED\"');\n\t}", "title": "" }, { "docid": "d09c11c61d2c8f4ecb44dfa222385e48", "score": "0.5885", "text": "public function canModifyVisibilityOfUsers();", "title": "" }, { "docid": "b13686a1af6c75caa832c3403cf47d7c", "score": "0.5884815", "text": "public function isAllowedForUser(){\n\t\treturn true;\n\t}", "title": "" }, { "docid": "0159016dee051c174c54c8000282da89", "score": "0.5881734", "text": "function formPermissions($branch) {\n\t\tglobal $perm_defaults;\n\n\t\t// Set output text\n\n\t\t// Create a object of the class dynamicControls\n\t\t$dynamic_controls = new we_dynamicControls();\n\t\t// Now we create the overview of the user rights\n\t\t$content = $dynamic_controls->fold_checkbox_groups(\t$this->permissions_slots,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->permissions_main_titles,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->permissions_titles,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->Name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$branch,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\"administrator\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"we_form\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"perm_branch\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttrue);\n\n\n\n\t\t$javascript ='\n\t\t\t<script language=\"JavaScript\" type=\"text/javascript\"><!--\n\n\t\t\t\tfunction rebuildCheckboxClicked() {\n\t\t\t\t\ttoggleRebuildPerm(false);\n\t\t\t\t}\n\n\t\t\t\tfunction toggleRebuildPerm(disabledOnly) {\n\n\t\t\t\t';\n\t\tif(isset($this->permissions_slots['rebuildpermissions']) && is_array($this->permissions_slots['rebuildpermissions'])) {\n\n\n\n\t\t\tforeach($this->permissions_slots['rebuildpermissions'] as $pname=>$pvalue) {\n\t\t\t\tif($pname!='REBUILD') {\n\t\t\t\t\t$javascript .= '\n\t\t\t\t\tif (document.we_form.' . $this->Name . '_Permission_REBUILD && document.we_form.' . $this->Name . '_Permission_' . $pname . ') {\n\t\t\t\t\t\tif(document.we_form.' . $this->Name . '_Permission_REBUILD.checked) {\n\t\t\t\t\t\t\tdocument.we_form.' . $this->Name . '_Permission_' . $pname . '.disabled = false;\n\t\t\t\t\t\t\tif (!disabledOnly) {\n\t\t\t\t\t\t\t\tdocument.we_form.' . $this->Name . '_Permission_' . $pname . '.checked = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdocument.we_form.' . $this->Name . '_Permission_' . $pname . '.disabled = true;\n\t\t\t\t\t\t\tif (!disabledOnly) {\n\t\t\t\t\t\t\t\tdocument.we_form.' . $this->Name . '_Permission_' . $pname . '.checked = false;\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\t';\n\t\t\t\t} else {\n\t\t\t\t\t$handler = \"\n\t\t\t\t\tif (document.we_form.\" . $this->Name . \"_Permission_\" . $pname . \") {\n\t\t\t\t\t\tdocument.we_form.\" . $this->Name . \"_Permission_\" . $pname . \".onclick = rebuildCheckboxClicked;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdocument.we_form.\" . $this->Name . \"_Permission_\" . $pname . \".onclick = top.content.setHot();\n\t\t\t\t\t}\n\t\t\t\t\ttoggleRebuildPerm(true);\n\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$javascript .= '\n\t\t\t\t}\n\t\t\t\t\t\t';\n\t\tif(isset($handler)) {\n\t\t\t$javascript .= $handler;\n\t\t}\n\t\t$javascript .= '\n\t\t\t//--></script>';\n\n\t\t$parts = array();\n\n\t\tarray_push($parts,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"headline\"=>\"\",\n\t\t\t\t\t\t\t\t\"html\"=>$content,\n\t\t\t\t\t\t\t\t\"space\"=>0,\n\t\t\t\t\t\t\t\t\"noline\"=>1\n\t\t\t\t\t\t\t\t)\n\t\t);\n\n\t\t// js to uncheck all permissions\n\t\t$uncheckjs = '';\n\t\t$checkjs = '';\n\t\tforeach($this->permissions_slots as $group) {\n\t\t\tforeach($group as $pname=>$pvalue) {\n\t\t\t\tif($pname!='ADMINISTRATOR') {\n\t\t\t\t\t$uncheckjs .= 'document.we_form.' . $this->Name . '_Permission_' . $pname . '.checked = false;';\n\t\t\t\t\t$checkjs .= 'document.we_form.' . $this->Name . '_Permission_' . $pname . '.checked = true;';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$we_button = new we_button();\n\t\t$button_uncheckall = $we_button->create_button('uncheckall', 'javascript:' . $uncheckjs);\n\t\t$button_checkall = $we_button->create_button('checkall', 'javascript:' . $checkjs);\n\t\tarray_push($parts,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'headline'=>'',\n\t\t\t\t\t\t\t\t'html'=>$we_button->create_button_table(array($button_uncheckall,$button_checkall)),\n\t\t\t\t\t\t\t\t'space'=>0\n\t\t\t\t\t\t\t\t)\n\t\t);\n\n\n\n\t\t// Check if user has right to decide to give administrative rights\n\t\tif(is_array($this->permissions_slots[\"administrator\"]) && we_hasPerm(\"ADMINISTRATOR\") && $this->Type==0) {\n\t\t\tforeach($this->permissions_slots[\"administrator\"] as $k=>$v) {\n\t\t\t\t$content='\n\t\t\t\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"500\">\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t' . getPixel(1, 5) . '</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t' . we_forms::checkbox(($v ? $v : \"0\"), ($v ? true : false), $this->Name . \"_Permission_\" . $k , $this->permissions_titles[\"administrator\"][$k], false, \"defaultfont\", ($k==\"REBUILD\"?\"setRebuidPerms();\":\"\")) . '</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>';\n\t\t\t}\n\t\t\tarray_push($parts,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"headline\"=>\"\",\n\t\t\t\t\t\t\t\t\"html\"=>$content,\n\t\t\t\t\t\t\t\t\"space\"=>0\n\t\t\t\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\n\n\t\tarray_push($parts,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"headline\"=>\"\",\n\t\t\t\t\t\t\t\t\"html\"=>$this->formInherits(\"_ParentPerms\",$this->ParentPerms,$GLOBALS['l_users'][\"inherit\"]),\n\t\t\t\t\t\t\t\t\"space\"=>0\n\t\t\t\t\t\t\t\t)\n\t\t);\n\n\n\n\t\treturn we_multiIconBox::getHTML(\"\",\"100%\",$parts,30).$javascript;\n\t}", "title": "" }, { "docid": "4837700839ff0b05472e1cfddbd30333", "score": "0.5879337", "text": "function group_membership_group_admin_permissions($hook, $type, $return, $params) {\n\n\t$entity = elgg_extract('entity', $params);\n\t$user = elgg_extract('user', $params);\n\n\tif (!$entity instanceof ElggGroup || !$user instanceof ElggUser || !$entity->isMember($user)) {\n\t\treturn;\n\t}\n\n\tif (check_entity_relationship($user->guid, 'group_admin', $entity->guid)) {\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "bb3186b02bdd00893acd29a38a877d7a", "score": "0.5878136", "text": "function add_new_perm()\n\t{\n\t\t$this->ipsclass->input['new_perm_name'] = trim($this->ipsclass->input['new_perm_name']);\n\n\t\tif ($this->ipsclass->input['new_perm_name'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Необходимо ввести имя\");\n\t\t}\n\n\t\t$copy_id = $this->ipsclass->input['new_perm_copy'];\n\n\t\t//-----------------------------------------\n\t\t// UPDATE DB\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->do_insert( 'forum_perms', array( 'perm_name' => $this->ipsclass->input['new_perm_name'] ) );\n\n\t\t$new_id = $this->ipsclass->DB->get_insert_id();\n\n\t\tif ( $copy_id != 'none' )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Add new mask to forum accesses\n\t\t\t//-----------------------------------------\n\n\t\t\t$old_id = intval($copy_id);\n\n\t\t\tif ( ($new_id > 0) and ($old_id > 0) )\n\t\t\t{\n\t\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'id, permission_array', 'from' => 'forums' ) );\n\t\t\t\t$get = $this->ipsclass->DB->simple_exec();\n\n\t\t\t\twhile( $f = $this->ipsclass->DB->fetch_row($get) )\n\t\t\t\t{\n\t\t\t\t\t$d_str = \"\";\n\t\t\t\t\t$d_arr = unserialize(stripslashes( $f['permission_array'] ) );\n\n\t\t\t\t\t$perms = unserialize(stripslashes( $f['permission_array'] ) );\n\n\t\t\t\t\tforeach( array( 'read_perms', 'reply_perms', 'start_perms', 'upload_perms', 'show_perms', 'download_perms' ) as $perm_bit )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( $perms[ $perm_bit ] != '*')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( preg_match( \"/(^|,)\".$old_id.\"(,|$)/\", $perms[ $perm_bit ]) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$d_arr[ $perm_bit ] = $this->clean_perms( $perms[ $perm_bit ] ) . \",\".$new_id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Do we have anything to save?\n\t\t\t\t\t//-----------------------------------------\n\n\t\t\t\t\tif ( count($d_arr) > 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$string = addslashes(serialize( $d_arr ) );\n\n\t\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\t// Sure?..\n\t\t\t\t\t\t//-----------------------------------------\n\n\t\t\t\t\t\tif ( strlen($string) > 5)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->ipsclass->DB->do_update( 'forums', array( 'permission_array' => $string ), 'id='.$f['id'] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Recache forums\n\t\t//-----------------------------------------\n\n\t\trequire_once( ROOT_PATH.'sources/action_admin/forums.php' );\n\t\t$ad_forums = new ad_forums();\n\t\t$ad_forums->ipsclass =& $this->ipsclass;\n\t\t$ad_forums->recache_forums();\n\n\t\t$this->ipsclass->main_msg = \"Маска доступа «{$this->ipsclass->input['new_perm_name']}» добавлена.\";\n\t\t$this->permsplash();\n\t}", "title": "" }, { "docid": "69ea109328dc7728cfd9248f246d069c", "score": "0.58727443", "text": "protected function restrictForum(){\n\t\t$this->validateForumId();\n \t\t\n \t\t$close = $this->getOption('close');\n \t\t\n \t\tif ($this->isError()) return;\n \t\t\n \t\t$id = $this->getId();\n \t\t\n \t\t$this->setRestricted($id,$close,$this->isDebug());\n\t}", "title": "" }, { "docid": "dcf3ea53283e92f458cd639bb1c8d279", "score": "0.58681107", "text": "public function admin_permissions_form($params)\n\t{\n\t\t// Parameters required!\n\t\tif ($this->_registry->verify_hook_params($params))\n\t\t{\n\t\t\t@extract($params);\n\t\t\tprint_yes_no_row($this->_registry->_vbphrase['can_administer_phpkd_vblvb'], \"phpkd_vblvb[1]\", ($user['phpkd_vblvb'] & 1 ? 1 : 0));\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "ab0eab530290825a6d2a050302a50237", "score": "0.5859381", "text": "function menu_permissions($controller,$action,$userID) {\n\t\t App::import('Model','Permission');\n\t\t $this->Permission= new Permission;\n\t\t $cond = \"WHERE controller='$controller' AND action='$action'\";\n\t\t $permissionsResult = $this->Permission->find('first',array(\n\t\t 'fields' => array('user_id'),\n\t\t 'conditions' => $cond,\n\t\t ));\n\t\t if(!empty($permissionsResult)){\n\t\t $users = explode(\",\",$permissionsResult['Permission']['user_id']);\n\t\t\tif (in_array($userID,$users)) {\n\t\t\treturn true;\n\t\t }\n\t\t else{\n\t\t\treturn false;\n\t\t }\n\t\t }\n\t\t return true;\n\t\t \n\t}", "title": "" }, { "docid": "4087b0e7ce4125404f132ba0edfd9213", "score": "0.5854387", "text": "function btwp_restrict_admin_access() {\n\t\n\tglobal $current_user;\n\tget_currentuserinfo();\n\t\n\tif( !array_key_exists( 'administrator', $current_user->caps ) ) {\n\t\twp_redirect( get_bloginfo( 'url' ) );\n\t\texit;\n\t}\n\n}", "title": "" }, { "docid": "0ad878d544acbd7e9b2acf0ca4a9e518", "score": "0.58521056", "text": "public function check_permflag($flag) {\n // TO DO!!!!!!\n }", "title": "" }, { "docid": "af2574aec9719b02adb7072a5df2980c", "score": "0.5851621", "text": "protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }", "title": "" }, { "docid": "f4bab653290dab8541d16086f4cb3a1c", "score": "0.58376545", "text": "public static function uses_permissions(): bool;", "title": "" }, { "docid": "89f555ca8acce350e9e5f86de02a2203", "score": "0.5832792", "text": "function memberlist_list() {\r\n\tglobal $wpdb;\r\n\tif (!current_user_can('manage_options')) {\r\n\t\twp_die('You do not have sufficient permissions!');\r\n\t}\r\n\t\r\n\tmemberlist_post_action();\r\n}", "title": "" }, { "docid": "09a1a48045b5c01cfd74de26921f8288", "score": "0.5828744", "text": "function is_user_allowed($user, $permission){\n\n \tif($permission == PERMISSION_LOGIN){\n \t\tif($user->is_surveyor == TRUE\n \t\t\t\t&& $user->is_supervisor == FALSE\n \t\t\t\t&& $user->is_manager == FALSE\n \t\t\t\t&& $user->is_general_manager == FALSE\n \t\t\t\t&& $user->is_admin == FALSE){\n \t\t\treturn FALSE;\n \t\t}\n \t}else if($permission == PERMISSION_ADD_SURVEYOR\n \t\t\t|| $permission == PERMISSION_EDIT_SURVEYOR\n \t\t\t|| $permission == PERMISSION_DELETE_SURVEYOR\n \t\t\t|| $permission == PERMISSION_DETAIL_SURVEYOR){\n \t\treturn $user->is_admin;\n \t}\n\n \treturn TRUE;\n }", "title": "" }, { "docid": "4edcc4171977099f6e4af86536895916", "score": "0.58255804", "text": "function CheckShowAccess($item=array())\n {\n if (empty($item)) { return TRUE; }\n\n $res=$this->HasModuleAccess();\n \n if (preg_match('/^(Friend)$/',$this->Profile()))\n {\n if ($item[ \"Friend\" ]=$this->LoginData(\"ID\"))\n {\n $res=TRUE;\n }\n }\n\n return $res;\n }", "title": "" }, { "docid": "a816ba29e790c160fe8be3d0adb1c5d9", "score": "0.5814159", "text": "function _s_is_member() {\n\treturn current_user_can( 'read' ) ? true : false;\n}", "title": "" }, { "docid": "df84d2604cbe19b8db91f2ae5138a4ef", "score": "0.5808309", "text": "public function isModerator()\n {\n }", "title": "" }, { "docid": "f6b61179e7ccc912eba9078e52058177", "score": "0.5804506", "text": "function can($permission, $form){\n\n $this->CI->load->model('permission');\n $this->CI->load->model('form');\n if(!is_object($form)){\n $res = $this->CI->form->getByName($form);\n $formname = $res[0]->name;\n if($res[0]->creator == $this->username()) return true;\n }else{\n $formname = $form->name;\n if($form->creator == $this->username()) return true; \n }\n\n //first check granular permissions on a form\n $res = $this->CI->permission->hasPermissionOnUserAndForm($permission, $this->username(), $formname);\n if($res) return $res;\n \n //see if we have a role with the perm\n $this->CI->load->model('role');\n $roles = $this->CI->role->getOnFormAndUser($formname, $this->username());\n foreach($roles as $r){\n if($this->CI->permission->hasPermissionOnRole($permission, $r->id)) return true;\n }\n\n //see if person has one of the global roles\n $supereditor = $this->is('supereditor');\n if($supereditor && $this->CI->permission->hasPermissionOnRole($permission, $supereditor->id)) return true;\n else if($this->is('superadmin')){ //superadmin can do ALL\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "19636bc7ee827d7c543765f955943768", "score": "0.58043844", "text": "function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Add a new Match Server Attribute?\n $p['add'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing Match Server Attribute?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing Match Server Attribute?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n\n // View all existing Match Server Attributes?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing Match Server Attribute?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n\n $this->set('permissions', $p);\n return $p[$this->action];\n }", "title": "" }, { "docid": "39769c54e5ad91f96d59b3b829029984", "score": "0.58023876", "text": "function permission_check($redirect = \"index.php\")\n\t{\n\t\t// make sure they are logged in\n\t\trequire_login($redirect);\n\t\t\n\t\t// makes sure they have permissions\n\t\t$sql = sprintf(\"SELECT permission FROM users WHERE uid=%d\", \n\t\t$_SESSION[\"uid\"]);\n\t\t\n\t\t// apologize if they are not.\n\t\t$perm = mysql_fetch_row(mysql_query($sql));\n\t\tif ($perm[0] == 0)\n\t\t\tapologize(\"You must be logged in and have bidding priveleges in order to do this\");\n\t}", "title": "" }, { "docid": "c01eb2c8faf9549493d9b88f027196da", "score": "0.5799898", "text": "static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }", "title": "" }, { "docid": "163a26d9616c2752ac501c71884afb43", "score": "0.5799126", "text": "public function relatorio4(){\n $this->isAdmin();\n }", "title": "" }, { "docid": "6c00bfadd239a1a40943fba497ce0c4e", "score": "0.5798229", "text": "function AdminSecurityCheck(){\n\t\t$User = new User();\n\t\t$user = $this->session->userdata('Group');\n\t\tif ($user){\n\t\t\tif($user == 1){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "dd1abe8a4be00ccaeb70f98d9c2205e3", "score": "0.57955134", "text": "public function accessRules() {\t\n\t\t$contentmn_name = (!empty(Yii::app()->user->content_man_un) ? Yii::app()->user->content_man_un : \"\" );\n\t\tif (Yii::app()->user->isGuest) {\n\t\t\treturn array(\n\t\t\t\tarray('deny', // deny all users\n\t\t\t\t\t'users'=>array('*'),\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\treturn array(\n\t\t\t\tarray('allow', // allow all users to perform 'changepassword' action\n\t\t\t\t\t'actions'=>array('changepassword'),\n\t\t\t\t\t'users'=>array('*'),\n\t\t\t\t),\n\t\t\t\tarray('deny', // deny\n\t\t\t\t\t'users'=>array($contentmn_name),\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "c164f9f01b9842e1a27ebbd3585a1244", "score": "0.5790117", "text": "static function checkPermission(&$smarty, $permission)\r\n\t{\r\n\t\tif(!in_array($_SESSION['sess_permission'], $permission))\r\n\t\t{\r\n\t\t\t$text = funcs::getText($_SESSION['lang'], '$allow');\r\n\r\n\t\t\t/*for($n=0; $permission[$n]; $n++)\r\n\t\t\t{\r\n\t\t\t\tif($permission[$n] != 8){\r\n\r\n\t\t\t\t\tif($n == 0 || $n == 1)\r\n\t\t\t\t\t\t$text .= ' ';\r\n\t\t\t\t\telseif(!$permission[$n+1] && $permission[$n] > 1)\r\n\t\t\t\t\t\t$text .= ' '.funcs::getText($_SESSION['lang'], '$and').' ';\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$text .= ', ';\r\n\t\t\t\t\tswitch($permission[$n])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\t$text .= funcs::getText($_SESSION['lang'], '$Membership_Gold');\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 3:\r\n\t\t\t\t\t\t\t$text .= funcs::getText($_SESSION['lang'], '$Membership_Silver');\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 4:\r\n\t\t\t\t\t\t\t$text .= funcs::getText($_SESSION['lang'], '$Membership_Bronze');\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 5:\r\n\t\t\t\t\t\t\t$text .= funcs::getText($_SESSION['lang'], '$Test_Membership');\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 8:\r\n\t\t\t\t\t\t\t$text .= \"Administratoren\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 9:\r\n\t\t\t\t\t\t\t$text .= \"Studiadmin\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}*/\r\n\t\t\t$text .= '.';\r\n\r\n\t\t\t//$smarty->assign('text', $text);\r\n\t\t\t//$smarty->assign('section', 'blank_membership');\r\n\t\t\t//$smarty->assign('payment_history',funcs::getPaymentHistory($_SESSION['sess_id']));\r\n\t\t\t//funcs::prepareMembershipPage($smarty);\r\n\r\n\t\t\t//$smarty->display('index.tpl');\r\n\t\t\theader(\"location: ?action=register&type=membership\");\r\n\t\t\texit();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f227fc896abdad5e55c4eef665012c11", "score": "0.57859504", "text": "public function testAccessModulePermission() {\n $this->drupalLogin($this->adminUser);\n\n // When Node is not installed, the node-permissions page is not available.\n $this->drupalGet('admin/people/permissions/module/node');\n $this->assertSession()->statusCodeEquals(403);\n\n // Modules that do not create permissions have no permissions pages.\n \\Drupal::service('module_installer')->install(['automated_cron']);\n $this->drupalGet('admin/people/permissions/module/automated_cron');\n $this->assertSession()->statusCodeEquals(403);\n $this->drupalGet('admin/people/permissions/module/node,automated_cron');\n $this->assertSession()->statusCodeEquals(403);\n\n // When Node is installed, the node-permissions page is available.\n \\Drupal::service('module_installer')->install(['node']);\n $this->drupalGet('admin/people/permissions/module/node');\n $this->assertSession()->statusCodeEquals(200);\n $this->drupalGet('admin/people/permissions/module/node,automated_cron');\n $this->assertSession()->statusCodeEquals(200);\n\n // Anonymous users cannot access any of these pages.\n $this->drupalLogout();\n $this->drupalGet('admin/people/permissions/module/node');\n $this->assertSession()->statusCodeEquals(403);\n $this->drupalGet('admin/people/permissions/module/automated_cron');\n $this->assertSession()->statusCodeEquals(403);\n $this->drupalGet('admin/people/permissions/module/node,automated_cron');\n $this->assertSession()->statusCodeEquals(403);\n }", "title": "" }, { "docid": "00e83608a4caf46630453d08913c1375", "score": "0.57775927", "text": "function set_permissions($permessi_abilitati)\n {\n $permissions_data=$this->config->item(\"permissions\");\n $permissions_data=array_reverse($permissions_data['mask'],true);\n\n foreach($permissions_data as $value)\n {\n if(in_array($value,array_keys($permessi_abilitati)))\n $this->_permissions[$value]=$permessi_abilitati[$value];\n else\n $this->_permissions[$value]=false;\n }\n\n $bitmask=$this->to_bitmask($this->_permissions);\n return($bitmask);\n }", "title": "" }, { "docid": "8ef4bc42fbac636ccc5de3d8baf0ddbc", "score": "0.57737786", "text": "private function metodo_privado() {\n }", "title": "" }, { "docid": "4eea07a7380181919268d124a92292a1", "score": "0.5770798", "text": "function grant_super_admin($user_id)\n {\n }", "title": "" }, { "docid": "373b2dcb97a9d4289cbba5a53c7a4124", "score": "0.57683766", "text": "static function checkPermission2(&$smarty, $permission)\r\n\t{\r\n\t\tif($_SESSION[$permission]!=1)\r\n\t\t{\r\n\t\t\t$text = funcs::getText($_SESSION['lang'], '$allow');\r\n\t\t\t$text .= '.';\r\n\t\t\theader(\"location: ?action=register&type=membership\");\r\n\t\t\texit();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0cb2637011dd206ec390aac1e90725a0", "score": "0.57652557", "text": "function update_access_allowed() {\n global $update_free_access, $user;\n\n // Allow the global variable in settings.php to override the access check.\n if (!empty($update_free_access)) {\n return TRUE;\n }\n // Calls to user_access() might fail during the Drupal 6 to 7 update process,\n // so we fall back on requiring that the user be logged in as user #1.\n try {\n require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.module';\n return user_access('administer software updates');\n }\n catch (Exception $e) {\n return ($user->uid == 1);\n }\n}", "title": "" }, { "docid": "0cb2637011dd206ec390aac1e90725a0", "score": "0.57652557", "text": "function update_access_allowed() {\n global $update_free_access, $user;\n\n // Allow the global variable in settings.php to override the access check.\n if (!empty($update_free_access)) {\n return TRUE;\n }\n // Calls to user_access() might fail during the Drupal 6 to 7 update process,\n // so we fall back on requiring that the user be logged in as user #1.\n try {\n require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.module';\n return user_access('administer software updates');\n }\n catch (Exception $e) {\n return ($user->uid == 1);\n }\n}", "title": "" }, { "docid": "ade5337c8ec3e4e374195e86aa77addd", "score": "0.57651806", "text": "function ajax_user_can() {\n\t}", "title": "" }, { "docid": "4b9032068f7479335e497075c0b99423", "score": "0.57633996", "text": "abstract public function permission(): string;", "title": "" }, { "docid": "d6f80a70d63a8226d8c5c38dce397eba", "score": "0.57624483", "text": "function getPermissions($userid, $pageid, $action, $module=\"\") {\n\tif($action!=\"admin\" && getPermissions($userid,0,\"admin\"))\n\t\treturn true;\n\tif($module==\"\") {\n\t\t$query = \"SELECT 1 FROM `\".MYSQL_DATABASE_PREFIX.\"permissionlist` WHERE page_module=\\\"page\\\" AND perm_action=\\\"$action\\\"\";\n\t\t$result = mysql_query($query);\n\t\tif(mysql_num_rows($result)>=1)\n\t\t\t$module = 'page';\n\t\telse\n\t\t\t$module = getEffectivePageModule($pageid);\n\t}\n\t$permission = false;\n\n\tif($module==\"menu\" || $module==\"external\")\treturn getPermissions($userid,getParentPage($pageid),$action);\n\t/// Find all groups the user belongs to, ordered by priority\n\t/// For each group, starting with lowest priority, get permission for the page\n\n\t$pagePath=array();\n\tparseUrlDereferenced($pageid, $pagePath);\n\tforeach(getGroupIds($userid) as $groupid) {\n\t\tif($permission === true)\tbreak;\n\t\t$permission = getPagePermission($pagePath, $groupid, $action, $module);\n\t}\n\n\tif($permission === false) {\n\t\t$permission = getPagePermission($pagePath, $userid, $action, $module, 'user');\n\t}\n\treturn $permission;\n}", "title": "" }, { "docid": "0347e49c0820669ebde782b317e06ff0", "score": "0.576114", "text": "function um_user_can( $permission ) {\r\n\t\t\tif ( ! is_user_logged_in() )\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t$user_id = get_current_user_id();\r\n\t\t\t$role = UM()->roles()->get_priority_user_role( $user_id );\r\n\t\t\t$permissions = $this->role_data( $role );\r\n\r\n\t\t\t/**\r\n\t\t\t * UM hook\r\n\t\t\t *\r\n\t\t\t * @type filter\r\n\t\t\t * @title um_user_permissions_filter\r\n\t\t\t * @description Change User Permissions\r\n\t\t\t * @input_vars\r\n\t\t\t * [{\"var\":\"$permissions\",\"type\":\"array\",\"desc\":\"User Permissions\"},\r\n\t\t\t * {\"var\":\"$user_id\",\"type\":\"int\",\"desc\":\"User ID\"}]\r\n\t\t\t * @change_log\r\n\t\t\t * [\"Since: 2.0\"]\r\n\t\t\t * @usage\r\n\t\t\t * <?php add_filter( 'um_user_permissions_filter', 'function_name', 10, 2 ); ?>\r\n\t\t\t * @example\r\n\t\t\t * <?php\r\n\t\t\t * add_filter( 'um_user_permissions_filter', 'my_user_permissions', 10, 2 );\r\n\t\t\t * function my_user_permissions( $permissions, $user_id ) {\r\n\t\t\t * // your code here\r\n\t\t\t * return $permissions;\r\n\t\t\t * }\r\n\t\t\t * ?>\r\n\t\t\t */\r\n\t\t\t$permissions = apply_filters( 'um_user_permissions_filter', $permissions, $user_id );\r\n\r\n\t\t\tif ( isset( $permissions[ $permission ] ) && is_serialized( $permissions[ $permission ] ) )\r\n\t\t\t\treturn unserialize( $permissions[ $permission ] );\r\n\r\n\t\t\tif ( isset( $permissions[ $permission ] ) && $permissions[ $permission ] == 1 )\r\n\t\t\t\treturn true;\r\n\r\n\t\t\treturn false;\r\n\t\t}", "title": "" }, { "docid": "e3c3ad8329f3cb97a457d758fcd799e2", "score": "0.5761032", "text": "function postasevent_limit_rest_view_to_logged_in_users( $is_allowed, $cmb_controller ) {\n\tif ( ! is_user_logged_in() ) {\n\t\t$is_allowed = false;\n\t}\n\n\treturn $is_allowed;\n}", "title": "" }, { "docid": "f283139cf52843b15511775dabf8b6dc", "score": "0.5760407", "text": "function is_user_admin()\n {\n }", "title": "" }, { "docid": "dde396e43bf555133a122e14578d54ff", "score": "0.57594013", "text": "public function setDefaultPermissions()\n {\n $this->allow('guest', 'default_error');\n $this->allow('guest', 'default_uploader');\n $this->allow('guest', 'default_lang');\n $this->allow('guest', 'people_auth');\n $this->allow('guest', 'api_auth');\n $this->allow('guest', 'api_search');\n $this->allow('guest', 'api_company');\n $this->allow('guest', 'api_entidad');\n $this->allow('guest', 'frontend_index');\n $this->allow('guest', 'frontend_auth');\n $this->allow('guest', 'frontend_account');\n $this->allow('guest', 'frontend_auction');\n $this->allow('guest', 'frontend_search');\n $this->allow('guest', 'frontend_product');\n $this->allow('guest', 'frontend_page');\n /**\n * User Access Level Permissions\n */\n $this->allow('user', 'default_index');\n $this->allow('user', 'default_error');\n $this->allow('user', 'default_uploader');\n $this->allow('user', 'default_lang');\n $this->allow('user', 'people_auth');\n $this->allow('user', 'search_index');\n $this->allow('user', 'frontend_search');\n $this->allow('user', 'frontend_product');\n $this->allow('user', 'frontend_page');\n $this->allow('user', 'people_user', array(\n 'my', // View My Details Page\n 'view', // View User Details Page\n 'changepassword', // Change Password Page\n 'updateavatar', // Update Avatar Lightbox\n 'getavatar', // Get Avatar JSON Call\n 'get-addr-avatar','setavatar', // Set Avatar JSON Call\n 'removeavatar' // Remove Avatar JSON Call\n ));\n\n /* $this->allow('user', 'company_manage', array(\n 'index', // Company List Page\n 'view' // Company View Page\n ));*/\n }", "title": "" }, { "docid": "9d1fc434ab72cb2738e2266b2309b5a4", "score": "0.5758955", "text": "function access($table, $usergroup, $forums, $acl_label_data, $acl_field)\r\n{\r\n\tglobal $db;\r\n\t\r\n\t$sql = \"SELECT * FROM $table WHERE $usergroup[0] IN (\" . (is_array($usergroup[1]) ? implode(', ', $usergroup[1]) : $usergroup[1]) . \") AND forum_id IN (\" . (is_array($forums) ? implode(', ', $forums) : $forums) . \")\";\r\n\tif ( !($result = $db->sql_query($sql)) )\r\n\t{\r\n\t\tmessage(GENERAL_ERROR, 'SQL Error', '', __LINE__, __FILE__, $sql);\r\n\t}\r\n\t\r\n\t$access = $_forum_id = $_usergrps = '';\r\n\t\r\n\twhile ( $rows = $db->sql_fetchrow($result) )\r\n\t{\r\n\t\t$main\t= ( sizeof($forums) > 1 && sizeof($usergroup[1]) < 2 ) ? $rows[$usergroup[0]] : $rows['forum_id'];\r\n\t\t$parent\t= ( sizeof($forums) > 1 && sizeof($usergroup[1]) < 2 ) ? $rows['forum_id'] : $rows[$usergroup[0]];\r\n\t\t\r\n\t\t$_forum_id[] = $rows['forum_id'];\r\n\t\t$_usergrps[] = $rows[$usergroup[0]];\r\n\t\r\n\t\tif ( $rows['label_id'] != 0 )\r\n\t\t{\r\n\t\t\tif ( isset($acl_label_data[$rows['label_id']]) )\r\n\t\t\t{\r\n\t\t\t\t$access[$main][$parent] = $acl_label_data[$rows['label_id']];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ( $rows['auth_option_id'] != 0 && isset($acl_field[$rows['auth_option_id']]) )\r\n\t\t{\r\n\t\t\t$access[$main][$parent][$acl_field[$rows['auth_option_id']]] = $rows['auth_value'];\r\n\t\t}\r\n\t}\r\n\t\r\n#\tdebug($usergroup, '$usergroup');\r\n#\tdebug($forums, '$forums');\r\n\t\r\n#\tdebug(count(array_unique($_forum_id)), 'access _forum_id 1');\r\n#\tdebug(count(array_unique($_usergrps)), 'access _usergrps 1');\r\n\t\r\n\tif ( $_forum_id || $_usergrps )\r\n\t{\r\n\t\t$cnt_forum_id = count(array_unique($_forum_id));\r\n\t\t$cnt_usergrps = count(array_unique($_usergrps));\r\n\t\t\r\n\t\t$main\t= ( sizeof($forums) > 1 && sizeof($usergroup[1]) < 2 ) ? $usergroup[1] : $forums;\r\n\t\t$parent\t= ( sizeof($forums) > 1 && sizeof($usergroup[1]) < 2 ) ? $forums : $usergroup[1];\r\n\t\t\r\n\t#\tdebug($access, 'access function 1');\r\n\t#\tdebug($main, 'access main 1');\r\n\t#\tdebug($parent, 'access parent 1');\r\n\t\t\r\n\t\tif ( $access )\r\n\t\t{\r\n\t\t\tif ( is_array($main) )\r\n\t\t\t{\r\n\t\t\t\tforeach ( $main as $m_id )\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach ( $parent as $p_id )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ( !isset($access[$m_id][$p_id]) )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tforeach ( $acl_field as $f_name )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$access[$m_id][$p_id][$f_name] = 0;\r\n\t\t\t\t\t\t\t#\t$access[$forum_id][$usergroup_id][$f_name] = 0;\r\n\t\t\t\t\t\t\t#\tdebug($f_name, 'test 1234');\r\n\t\t\t\t\t\t\t#\tdebug($access[$m_id][$p_id][$f_name], 'test 1234');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t/*\r\n\t\r\n\tif ( is_array($forums) )\r\n\t{\r\n\t\tforeach ( $forums as $forum_id )\r\n\t\t{\r\n\t\t\tif ( !isset($access[$forum_id]) )\r\n\t\t\t{\r\n\t\t\t\tforeach ( $usergroup[1] as $usergroup_id )\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach ( $acl_field as $f_name )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$access[$forum_id][$usergroup_id][$f_name] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t*/\r\n\t\r\n\t\r\n\t\r\n#\tdebug($access, 'access function 2');\r\n\t\r\n\treturn $access;\r\n}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "4ed5b85e8f0361ef5aedbfd66528487b", "score": "0.0", "text": "public function index()\n {\n return response(MessageField::index());\n }", "title": "" } ]
[ { "docid": "a1420ad0fb284c611971591393b45aef", "score": "0.7509679", "text": "public function index()\n\t{\n\t\t$resources = Resources::all();\n\t\t$collection = array();\n\t\t\n\t\tforeach ($resources as $name => $options)\n\t\t{\n\t\t\tif (false === value($options->visible)) continue;\n\t\t\t\n\t\t\t$collection[$name] = $options;\n\t\t}\n\n\t\t$table = $this->presenter->table($collection);\n\n\t\tSite::set('title', trans('orchestra/foundation::title.resources.list'));\n\t\tSite::set('description', trans('orchestra/foundation::title.resources.list-detail'));\n\n\t\treturn View::make('orchestra/foundation::resources.index', array(\n\t\t\t'eloquent' => $collection,\n\t\t\t'table' => $table,\n\t\t));\n\t}", "title": "" }, { "docid": "03c28056ac36b9758780b52bcb56ea11", "score": "0.7453479", "text": "public function actionList() {\n $this->getList();\n }", "title": "" }, { "docid": "79ad7ebbde0cad2af3c2becbd440dc9d", "score": "0.736227", "text": "public function listing();", "title": "" }, { "docid": "0aa4853e6e1c011310051c464837c9be", "score": "0.7341522", "text": "public function index()\n {\n $resources = $this->resource->paginate(10);\n\n return view('manager.resources.index', compact('resources'));\n }", "title": "" }, { "docid": "f6249e52b27cd61546f9ac9938889b8c", "score": "0.72989535", "text": "public function index()\n {\n $resources = Resource::all();\n return view('admin.resource.list')->with('resources',$resources);\n }", "title": "" }, { "docid": "dd0281461ff38e01dc7daaf263a98684", "score": "0.72688746", "text": "function index() {\n $this->getList();\n }", "title": "" }, { "docid": "223999e9a02d01dc0cad36705dec31b1", "score": "0.72478926", "text": "public function actionList() {\n $this->_getList();\n }", "title": "" }, { "docid": "eacf64f52d5b73d527cae880dfe65bc1", "score": "0.72152483", "text": "public function index()\n {\n return RecipeListResource::collection(Recipe::paginate(10));\n }", "title": "" }, { "docid": "5e485f5256447384c89b0040914b850e", "score": "0.7209843", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(10);\n\n return view('admin.resource.index', [\n 'resources' => $resources\n ]);\n }", "title": "" }, { "docid": "2e3564beb136b7de619ee51f1088fb53", "score": "0.719667", "text": "public function index()\n {\n\n return \\View::make('resources.index')\n ->with(['displayName' => 'resources']\n );\n }", "title": "" }, { "docid": "6ba01bde2894545b26719d51e92cebf6", "score": "0.71551645", "text": "public function indexAction()\n {\n\n $em = $this->getDoctrine()->getManager();\n\n $resources = $em->getRepository('AppBundle:Resource')->findAllDesc();\n\n return $this->render('admin/resource/index.html.twig', array(\n 'resources' => $resources,\n ));\n }", "title": "" }, { "docid": "42bee349ff83930cb164b3a793f6d5b2", "score": "0.71432024", "text": "public function listAction()\n {\n //Setup search properties form\n $searchForm = $this->service->getForm('Search');\n $action = $this->view->url(['action'=>'search'], 'controllers');\n $searchForm->setAction($action);\n $this->view->searchForm = $searchForm;\n //Setup properties list\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $collection = $this->service->retrievePropertyCollection($page);\n $this->view->collection = $collection;\n $this->view->paginator = $this->service->getPaginator($page);\n }", "title": "" }, { "docid": "d7820004a578ddc16d57dff08d715ef0", "score": "0.713195", "text": "public function showResource()\n\t{\n\t\treturn view('resources.list')->with('resources', Resources::all());\n\t}", "title": "" }, { "docid": "1ac60064d05eb6556018c88c4294567a", "score": "0.7113176", "text": "public function index()\n\t{\n\t\t$this->lists();\n\t}", "title": "" }, { "docid": "21284f1b8a31a69a0252300fcccbc357", "score": "0.71072334", "text": "public function listingAction()\r\n {\r\n\r\n $oZendDbSelect = new Zend_Db_Select(Zend_Db_Table::getDefaultAdapter());\r\n $oZendDbSelect->from('View_Rclient_Types_Listing')->order('cl_type_id asc');\r\n\r\n // Query search engine\r\n $oMySearchEngine = new My_Search_Engine($oZendDbSelect);\r\n $oMySearchEngine->findWordOn(array('cl_type_libelle' => array('operator' => 'like')));\r\n\r\n $oMySearchEngine->findByFields(\r\n array(\r\n 'cl_type_id' => array('operator' => 'eql'),\r\n 'cl_type_libelle' => array('operator' => 'like')\r\n )\r\n );\r\n\r\n $oMySearchEngine->makeOrderBy();\r\n\r\n // Downloading the filtered list in CSV\r\n if ($this->_helper->ContextSwitch()->getCurrentContext() == 'csv') {\r\n $oExport = new My_Data_Export_CSV(new My_Data_Export_Source_Adapter_Select($oMySearchEngine->getSelect()));\r\n $this->view->csv = $oExport->make();\r\n $this->view->filename = Phoenix_Data_Export_Csv::buildFileName();\r\n } // Viewing the filtered list in HTML\r\n else {\r\n // Initialize paginator adapter\r\n $oAdapter = new Zend_Paginator_Adapter_DbSelect($oMySearchEngine->getSelect());\r\n\r\n // Pagination management\r\n $oPaginator = new My_Paginator($oAdapter);\r\n $oPaginator->setCurrentPageNumber($this->_getParam('page'));\r\n $oPaginator->setItemCountPerPage(15);\r\n $this->view->paginator = $oPaginator;\r\n }\r\n }", "title": "" }, { "docid": "68a189cc0bf8bc79e0e116676dbdb66b", "score": "0.70221174", "text": "public function actionList()\n {\n $this->assign(\"name\", \"leiyi\");\n\n $this->display('home/page/list.tpl');\n }", "title": "" }, { "docid": "eeebaafb341e5dcfe7cd3e2d7c48f741", "score": "0.7020841", "text": "public function listAction()\n {\n \t$currentPage = 1;\n \t//Check if the user is not on page 1\n \t$i = $this->_request->getQuery('i');\n \tif(!empty($i))\n \t{\n \t\t$currentPage = $this->_request->getQuery('i');\n \t}\n \t\n \t//Create a db object\n \trequire_once \"../application/models/Db/Db_Db.php\";\n \t$db = Db_Db::conn();\n \t\n \t//Create a Zend_db_select object\n \t$sql = new Zend_Db_Select($db);\n \t\n \t//Define the columns to retrieve as well as table.\n \t$columns = array(\"id\",\"artist_name\");\n \t$table = array(\"artists\");\n \t\n \t//SELECT `artists`.`id`, `artists`.`artist_name` FROM `artists`\n\t\t$statement = $sql->from($table, $columns);\n \t\n \t//Initialize the Zend_Paginator\n \t$paginator = Zend_Paginator::factory($statement);\n \t\n \t//Set the properties for the pagination\n \t$paginator->setItemCountPerPage(10);\n \t$paginator->setPageRange(10);\n \t$paginator->setCurrentPageNumber($currentPage);\n \t\n \t$this->view->paginator = $paginator;\n \t\n }", "title": "" }, { "docid": "7c87396141031b5bdb4d7fce1a123f8f", "score": "0.7008967", "text": "public function index()\n {\n $this->listing('0', '', '0');\n }", "title": "" }, { "docid": "20d766db80674b0e4072b2719471b257", "score": "0.69712967", "text": "public function index()\n {\n\n $ourresource = OurResource::all();\n return view('Admin.ourresource.all', compact('ourresource'));\n }", "title": "" }, { "docid": "217e339de79424bf236318e41ddb0695", "score": "0.6958182", "text": "public function index()\n {\n $resources = Resource::getResourceDetails();\n return view('admin.resources.index')->with('resources', $resources);\n }", "title": "" }, { "docid": "84dde6f109c23a0b3b845c0d6e864169", "score": "0.69026124", "text": "public function index()\n\t{\n $config['list'] = VrResources::get()->toArray();\n $config['title'] = trans('app.adminMenuResources');\n $config['no_data'] = trans('app.adminNoData');\n $config['new'] = route('app.resources.create');\n $config['edit'] = 'app.resources.edit';\n $config['delete'] = 'app.resources.destroy';\n return view('admin.adminList', $config);\n\t}", "title": "" }, { "docid": "6e166e624d00d2c763463d2f398dd1ef", "score": "0.68946916", "text": "public function indexAction() {\n $this->pageTitle = $this->_(\"AclResource management\");\n $grid = new AclResourceGrid(\"AclResource\");\n $grid->run();\n $this->view->setVars(array(\n 'grid' => $grid\n ));\n }", "title": "" }, { "docid": "bebf123d6dd48762f8190b1776616d05", "score": "0.68929", "text": "public function index()\n {\n if (is_null($this->resource)) {\n return response()->json($this->service->paginate());\n } else {\n return $this->resource::collection($this->service->paginate());\n }\n }", "title": "" }, { "docid": "97968d8873a94786d3e40145696ee2bd", "score": "0.68919075", "text": "public function index()\n {\n return Resources::collection(Model::orderBy('id', 'desc')->paginate());\n }", "title": "" }, { "docid": "5dc08bdec3bdf1e8261a81891fdb5f4e", "score": "0.6873949", "text": "public function index()\n {\n $arrObjResource = Resource::latest()->paginate(5);\n return view('resource.index', compact('arrObjResource'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "0e8ad7256c7bbd8504ebf3d782bb3209", "score": "0.68704486", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $resources = $em->getRepository('AppBundle:Resource')->findBy(array('channel' => $this->getUser()->getActiveChannel()));\n\n return $this->render('AppBundle:Resource:index.html.twig', array(\n 'resources' => $resources,\n 'channel' => $this->getUser()->getActiveChannel(),\n ));\n }", "title": "" }, { "docid": "e76df9bb5e40cc75acb3fb5e4b084b82", "score": "0.6848992", "text": "public function listing() {\n $title = \"Admin - Listing\";\n $this->set(compact('title'));\n\n $conditions = array('delete_status' => NotDeleted);\n if ($this->request->is('post') && !empty($this->request->data['search'])) {\n $conditions['OR']['first_name LIKE'] = '%' . $this->request->data['search'] . '%';\n $conditions['OR']['last_name LIKE'] = '%' . $this->request->data['search'] . '%';\n $conditions['OR']['email LIKE'] = '%' . $this->request->data['search'] . '%';\n }\n\n $this->paginate = [\n 'limit' => PAGING_SIZE,\n 'conditions' => $conditions,\n ];\n $Results = $this->paginate('Admins');\n $this->set(compact('Results'));\n\n if ($this->request->is('ajax')) {\n $this->viewBuilder()->layout('ajax');\n $this->viewBuilder()->templatePath('Element' . DS . 'admin' . DS . 'admin');\n $this->render('index');\n }\n }", "title": "" }, { "docid": "6b9f4551cb0d7103440e15f4ff2bc102", "score": "0.6844889", "text": "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_actividadModel->getActividad();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "title": "" }, { "docid": "95b579529f8b40d1b2b6ae580a9b3250", "score": "0.6835474", "text": "public function index()\n {\n $this->params['page'] = empty($this->params['page']) ? 1 : $this->params['page'];\n $collection = $this->model->paginate($this->params);\n $this->set('objects', $collection['objects']);\n $this->set_pagination($collection);\n }", "title": "" }, { "docid": "358b82626374a39ca1c5cb87e1d94243", "score": "0.68288803", "text": "public function crane_list() {\n\t\t\t$this->setAction('index');\t\n\t\t\t$this->render('crane_list');\n\t}", "title": "" }, { "docid": "4b8e52b6fdf81afdda958487f24d56b3", "score": "0.68279797", "text": "public function listAction()\n {\n $catalog = $this->container->get('catalog');\n\n $book_list = $catalog->listBooks();\n\n return [\n 'list' => $book_list,\n ];\n }", "title": "" }, { "docid": "3824dabd41509647ac9d2bc02a329701", "score": "0.68272334", "text": "public function indexAction()\n {\n $config = $this->getConfiguration();\n\n $listRenderer = $this->getListRenderer();\n $sort = $this->getSort();\n $listRenderer->setSort($sort);\n $criteria = $this->getFilterCriteria();\n\n $pager = $this->getPager();\n $pager->setMaxRows($config->getListOption('max_page_rows'));\n $pager->setPage($this->getCurrentPage());\n $pager->setQueryBuilder(\n $this->getModelManager()->buildQuery(\n $criteria,\n $sort\n )\n );\n\n $criteria = $this->getModelManager()->mergeFilterCriteriaObjects($criteria);\n $filterForm = $this->getFilterRenderer()->getForm($criteria);\n\n return $this->container->get('templating')\n ->renderResponse($listRenderer->getTemplate(), array(\n 'renderer' => $listRenderer,\n 'filter' => $this->getFilterRenderer(),\n 'pager' => $pager,\n 'csrf' => $this->container->get('form.csrf_provider')->generateCsrfToken('list'),\n 'filtered' => count($criteria),\n 'form' => $filterForm->createView()\n ));\n }", "title": "" }, { "docid": "cf4f6462e1cc3025d88860aa2c4ba62f", "score": "0.6825393", "text": "function index()\n\t{\n\t\t$args = func_get_args();\n\t\tcall_user_func_array(array($this, 'listing'), $args);\n\t}", "title": "" }, { "docid": "01d58c7ca6fc90f9a714a9eb1332496e", "score": "0.6821498", "text": "public function index()\n\t{\n\t\t$resourceLikes = $this->resourceLikeRepository->paginate(10);\n\n\t\treturn view('resourceLikes.index')\n\t\t\t->with('resourceLikes', $resourceLikes);\n\t}", "title": "" }, { "docid": "550d19f420a94197568709e17d512612", "score": "0.68181574", "text": "public function listTask()\n\t{\n\t\t// Incoming directory (this should be a path built from a resource ID and its creation year/month)\n\t\t$listdir = Request::getString('listdir', '');\n\t\tif (!$listdir)\n\t\t{\n\t\t\techo '<p class=\"error\">' . Lang::txt('COM_RESOURCES_ERROR_NO_LISTDIR') . '</p>';\n\t\t\treturn;\n\t\t}\n\n\t\t// Incoming sub-directory\n\t\t$subdir = Request::getString('subdir', '');\n\n\t\t// Build the path\n\t\t$path = Utilities::buildUploadPath($listdir, $subdir);\n\n\t\t$folders = array();\n\t\t$docs = array();\n\n\t\tif (is_dir($path))\n\t\t{\n\t\t\t// Loop through all files and separate them into arrays of images, folders, and other\n\t\t\t$dirIterator = new \\DirectoryIterator($path);\n\n\t\t\tforeach ($dirIterator as $file)\n\t\t\t{\n\t\t\t\tif ($file->isDot())\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$name = $file->getFilename();\n\n\t\t\t\tif ($file->isDir())\n\t\t\t\t{\n\t\t\t\t\t$folders[$path . DS . $name] = $name;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($file->isFile())\n\t\t\t\t{\n\t\t\t\t\tif (in_array(strtolower($name), array('cvs', '.svn', '.git', '.ds_store')))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$docs[$path . DS . $name] = $name;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tksort($folders);\n\t\t\tksort($docs);\n\t\t}\n\n\t\t$this->view\n\t\t\t->set('listdir', $listdir)\n\t\t\t->set('subdir', $subdir)\n\t\t\t->set('docs', $docs)\n\t\t\t->set('folders', $folders)\n\t\t\t->set('config', $this->config)\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->setLayout('list')\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "78f3ca79946467b9bfd80223ec5ba614", "score": "0.6808544", "text": "public function index()\n {\n return PlayResource::collection(Play::paginate());\n }", "title": "" }, { "docid": "f1c7ec0399bbc0a26f289a612459ed88", "score": "0.67977417", "text": "function index()\r\n\t{\r\n $this->showlist();\r\n\t}", "title": "" }, { "docid": "31a61aadfd15cf04075c88c5088f8860", "score": "0.67884994", "text": "public function listing(Request $request)\n {\n //validations and access control\n $this->validationAndAccess(__FUNCTION__, $request);\n\n //Start query builder. You can start limiting your results here, for example:\n $scope = $this->nested_parameters;\n if(empty($scope)){\n $query = '';\n }else{\n $query = $this->model->select($this->model->availableTableFields());\n foreach($scope as $field => $value){\n $query = (!empty($value)) ? $query->where($field,'=',$value) : $query;\n }\n }\n\n //Get resources list using our query builder function, just to pass the tablable model, the json request from the table view and optionally, a initial query object.\n $query_results = VibrantTools::getListFromModel($this->model, $request, $this->force_id_request, $query);\n\n return response()->json($query_results);\n }", "title": "" }, { "docid": "118caca12a46f44cf44d066cf46e4baf", "score": "0.6768095", "text": "public function index()\n {\n return ItemResource::collection(Items::orderBy('id', 'desc')->paginate(30));\n }", "title": "" }, { "docid": "50b94f1d44a80883647d7fc440645f79", "score": "0.67589504", "text": "public function listAction()\n {\n $contents = $this->entityManager->getRepository('Studit\\H5PBundle\\Entity\\Content')->findAll();\n return $this->render('@StuditH5P/list.html.twig', ['contents' => $contents]);\n }", "title": "" }, { "docid": "6cb967692b4f77fb138723c118707e5a", "score": "0.6756384", "text": "public function listAction()\n\t{\n\t\t$pages = Model_Query_Page::getTree(Model_Query_Page::TREE_TYPE_FLAT);\n\t\t\n\t\t$this->view->pages = $pages;\n\t}", "title": "" }, { "docid": "a62c8fb3c6a39b17143e4f99a44215eb", "score": "0.674278", "text": "public function index()\n {\n // Get Products\n $products = Product::paginate(15);\n\n // Return collection of products as a resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "17f3cd4988f20f8325c593af544287ff", "score": "0.67272323", "text": "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "title": "" }, { "docid": "24af10ce4b6b3777185b0f14f381d2ed", "score": "0.6723023", "text": "public function index() {\n $resources = $this->resourceMapper->findAll();\n\n // put the array containing Resource object to the view\n $this->view->setVariable(\"resources\", $resources);\n if (isset($this->currentUser) && $this->currentUser->getUser_type() == usertype::Administrator){\n $this->view->render(\"resources\", \"index\");\n }\n }", "title": "" }, { "docid": "1d448703f5190066628ad9862a2d03f8", "score": "0.67209285", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\t\t$viewer_id = $viewer->getIdentity();\n\n //GET LISTING SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n \n\t\t//GET LEVEL SETTING\n $this->view->allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($list, $viewer, 'photo');\n \n //GET PAGINATOR\n $this->view->album = $album = $list->getSingletonAlbum();\n $this->view->paginator = $paginator = $album->getCollectiblesPaginator();\n $this->view->total_images = $paginator->getTotalItemCount();\n $paginator->setCurrentPageNumber($this->_getParam('page'));\n $paginator->setItemCountPerPage(20);\n\n if (empty($this->view->allowed_upload_photo) && empty($this->view->total_images)) {\n return $this->setNoRender();\n }\n \n //ADD COUNT TO TITLE\n if ($this->_getParam('titleCount', false) && $paginator->getTotalItemCount() > 0) {\n $this->_childCount = $paginator->getTotalItemCount();\n }\n }", "title": "" }, { "docid": "871969a5830c5824710f35f92b284e14", "score": "0.6717003", "text": "public function list_action()\n {\n $productRp = new ProductRepository;\n\n $pageTitle = 'crud';\n $crudLinkStyle = 'current_page';\n\n $cssStyleRule = $this->buildStyleRule();\n $backgroundColor = $this->getBackgroundColor();\n\n $isLoggedInAsAdmin = $this->isAdminUser();\n\n // 2. get all products\n $products = $productRp->get_all_products();\n\n $isLoggedIn = $this->is_logged_in_from_session();\n $user_name = $this->username_from_session();\n\n\n require_once __DIR__ . '/../template/admin_crud.php';\n }", "title": "" }, { "docid": "114a63c0832877abfdcd8697254fa24d", "score": "0.67128056", "text": "public function list()\n {\n // On va vérifier les authorisations : Admin only\n $this->checkAuthorisation(['admin']);\n\n // On appelle la méthode show() de l'objet courant\n // En argument, on fournit le fichier de Vue\n // Par convention, chaque fichier de vue sera dans un sous-dossier du nom du Controller\n\n $products = Product::findAll();\n\n $dataToDisplay = [\n 'products' => $products\n ];\n\n // On va appeler (require) le fichier views/category/list.tpl.php\n $this->show('product/list', $dataToDisplay);\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "86eb524e99a31621e46aa2e8718e61f6", "score": "0.67027086", "text": "public function index()\n {\n $items = Item::orderBy('id', 'DESC')->paginate(10);\n\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "d79dbba2d57614ef830362a19c63a970", "score": "0.66864055", "text": "public function index()\n {\n return $this->view('list', [\n 'elements' => $this->service->index()\n ]);\n }", "title": "" }, { "docid": "db8a0696586c7515873c89a6a0d1cb86", "score": "0.6681138", "text": "public function actionIndex()\n {\n $array = MyList::getAll();\n\n return $this->render('index', ['model' => $array]);\n }", "title": "" }, { "docid": "f87e4c930a716211a968b3d9cc7f28cb", "score": "0.6679537", "text": "public function listAction()\n {\n $data = array(\n 'red',\n 'green',\n 'blue',\n 'yellow'\n );\n\n $request = $this->getRequest();\n $acceptHeader = $request->getHeader('Accept');\n\n $this->view->assign(\n array(\n 'data' => $data\n )\n );\n }", "title": "" }, { "docid": "0fd2e15257bfa9204ec9573726987c66", "score": "0.66752803", "text": "public function index()\n {\n $menu = Menu::paginate(10);\n\n return MenuResource::collection($menu);\n }", "title": "" }, { "docid": "daba699beaeef91359ed7b10313414c0", "score": "0.6675206", "text": "public function index()\n {\n $this->checkPermission(\"admin_permission_management\");\n $items = $this->service->getAll();\n\n $items = ApiResource::collection($items);\n\n return $this->respondWithSuccess($items);\n }", "title": "" }, { "docid": "93802b97c6f44ae5e366b70deec744b9", "score": "0.66626006", "text": "public function show()\n {\n $results = $this->run('show');\n }", "title": "" }, { "docid": "5278e85997fa12c693ce5b7a9a5f2e24", "score": "0.6659221", "text": "public function index() {\n\t\treturn ClientResource::collection(Client::paginate(15));\n\t}", "title": "" }, { "docid": "601280f6c7a8fe1284080c1c22a3e447", "score": "0.6654493", "text": "public function index()\n {\n // Get Accounts\n $accounts = Account::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of Accounts as a resource\n return AccountResource::collection($accounts);\n }", "title": "" }, { "docid": "5d3102f6a725b79d77b0e3bc731ae984", "score": "0.66521215", "text": "public function index()\n {\n $polls = Poll::latest()->paginate(16);\n return PollResource::collection($polls);\n }", "title": "" }, { "docid": "4c33127363526600cc1da25d18f917b1", "score": "0.66481763", "text": "public function index()\n {\n $entries = Entry::all();\n return view('list', compact('entries'));\n }", "title": "" }, { "docid": "e2eacd814cad9b8205ce83c08f3b5e18", "score": "0.6644318", "text": "public function showAllAction()\n {\n $title = \"Product overview\";\n $page = $this->app->page;\n $db = $this->app->db;\n\n $this->connection();\n $sql = \"SELECT * FROM product;\";\n $res = $db->executeFetchAll($sql);\n\n $data = [\n \"res\" => $res,\n \"check\" => \"check\"\n ];\n\n // $page->add(\"flash\", [], \"hej\");\n $page->add(\"products/header\");\n $page->add(\"products/show-all\", $data);\n\n return $page->render([\n \"title\" => $title,\n ]);\n }", "title": "" }, { "docid": "7ba8d3b39da88e11faeb12313b1810c2", "score": "0.6642726", "text": "public function index()\n {\n return view('pages.listing-list', [ 'listings' => Listing::all() ]);\n }", "title": "" }, { "docid": "2e266895b57f5ca532a4517799527c81", "score": "0.6637523", "text": "public function index()\n {\n $this->authorize('viewAny', Article::class);\n return ArticleResource::collection(Article::paginate(10));\n }", "title": "" }, { "docid": "e3549202853588a65782bc96028199ed", "score": "0.6635664", "text": "public function indexAction()\n {\n $page = isset($_GET['page']) ? (int)$_GET['page'] : 1;\n $perpage = 9;\n $count = R::count('product');\n $pagination = new Pagination($page, $perpage, $count);\n $start = $pagination->getStart();\n $products = R::getAll(\"SELECT product.*, category.title AS cat FROM product JOIN category ON category.id = product.category_id ORDER BY product.title LIMIT $start, $perpage\");\n $this->setMeta('Product Liste');\n $this->set(compact('products', 'pagination', 'count'));\n }", "title": "" }, { "docid": "c7312e7e8966df50b49658cf582ce6ec", "score": "0.66348624", "text": "public function index()\n {\n return ScreenResource::collection(Screen::orderby('created_at','desc')->paginate(10));\n }", "title": "" }, { "docid": "a7737316f2150c9517aa85bb9cd5c182", "score": "0.6620835", "text": "public function actionList()\n {\n $this->render(\n 'list',\n array(\n 'modules' => ($modules = $this->getInstalledModules()) ? $modules : array(),\n )\n );\n }", "title": "" }, { "docid": "fe5cbdcbc1d4a099ac316f47b6bde600", "score": "0.66093606", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n }", "title": "" }, { "docid": "48b9c834ddf22a0e1e54ba121573b35d", "score": "0.65925086", "text": "public function index()\n {\n $items= Item::all();\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "ca2a7c14d5251722cbb44ad0cf858243", "score": "0.65886205", "text": "public function overviewAction()\n {\n return $this->getProxy(self::PROXY_CLASS)->findAll();\n }", "title": "" }, { "docid": "904c604bfcee5f1df6ea56185ca68d5b", "score": "0.6587205", "text": "public function index()\n {\n //GET all the ARTICLES\n $articles = Article::paginate(15);//display 15 records per page\n\n //return colletion of articles\n return ArticleResource::collection($articles);\n\n }", "title": "" }, { "docid": "1cb3c7ae8b44dd6649599a0c6b21c3c7", "score": "0.65857047", "text": "public function index()\n\t{\n\t\t$data = [\n\t\t\t'pageTitle' => $this->getResourcePluralName(),\n\t\t\t'allItems' => $this->repo->search($this->getIndexFilter()),\n\t\t\t'isDestroyingEntityAllowed' => $this->isDestroyAllowed(),\n\t\t\t'canCreateEntities' => $this->canCreateEntities(),\n\t\t\t'canEditEntities' => $this->canEditEntities(),\n\t\t];\n\n\t\t$viewName = $this->getIndexViewName();\n\n\t\treturn view($viewName, $data);\n\t}", "title": "" }, { "docid": "918a60c91683ae2630d02bdb5af36fd8", "score": "0.6585502", "text": "public function index()\n\t{\n\t\t// if view_table_permission is false, abort\n\t\tif (isset($this->crud['view_table_permission']) && !$this->crud['view_table_permission']) {\n\t\t\tabort(403, 'Not allowed.');\n\t\t}\n\n\t\t// get all results for that entity\n\t\t$model = $this->crud['model'];\n\t\t$this->data['entries'] = $model::all();\n\n\t\t$this->_prepare_columns(); // checks that the columns are defined and makes sure the response is proper\n\n\t\t$this->data['crud'] = $this->crud;\n\n\t\t// load the view from /resources/views/vendor/dick/crud/ if it exists, otherwise load the one in the package\n\t\tif (view()->exists('vendor.dick.crud.list'))\n\t\t{\n\t\t\treturn view('vendor.dick.crud.list', $this->data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn view('crud::list', $this->data);\n\t\t}\n\t}", "title": "" }, { "docid": "4e0e77be39529387e26200c96e69287c", "score": "0.65843135", "text": "public function index()\n {\n return $this->respondResource($this->courseTransformer->transformCollection($this->model->all()));\n }", "title": "" }, { "docid": "679aeb0a886968964597db4d52db9f05", "score": "0.65769154", "text": "public function action_list() {\n\t\tKohana::$log->add(Kohana::DEBUG,'Executing Controller_Admin_Photo::action_list');\n\n\t\t// Build request\n\t\t$query = DB::select();\n\n\t\tif(isset($_POST['terms']))\n\t\t{\n\t\t\t$query->where('title','like',\"%\".$_POST['terms'].\"%\");\n\t\t\t$query->or_where('subtitle','like',\"%\".$_POST['terms'].\"%\");\n\t\t}\n\n\t\t$photos = Sprig::factory('photo')->load($query, FALSE);\n\n\n\t\tif(Request::$is_ajax)\n\t\t{\n\t\t\t// return a json encoded HTML table\n $this->request->response = json_encode(\n\t\t\t\tView::factory('admin/photo/list_tbody')\n\t\t\t\t\t->bind('photos', $photos)\n ->render()\n );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// return the full page\n\t\t\t$this->template->content = View::factory('admin/photo/list')\n\t\t\t\t->set('tbody', View::factory('admin/photo/list_tbody')\n\t\t\t\t\t->bind('photos', $photos)\n\t\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "e99878c1a0eff5bcf7bf12ed5c8ef9d5", "score": "0.65716714", "text": "public function show()\n {\n return view('listing::show');\n }", "title": "" }, { "docid": "2a58e9f56c195880d92e6beb689abbba", "score": "0.6570577", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t\n\t\t$perpage = $this->perpage;\n\t\t$search = array();\n\t\t\n\t\tlist($total, $data) = Cut_Service_Type::getList($page, $perpage, $search);\n\t\t$count = Cut_Service_Store::getCountByType();\n\t\t$this->assign('data', $data);\n\t\t$this->assign('count', $count);\n\t\t$url = $this->actions['listUrl'] .'/?'. http_build_query($search) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t\t$this->assign('search', $search);\n\t\t$this->cookieParams();\n\t}", "title": "" }, { "docid": "ec4c68627da9cf6d0e66bd08ee79a1dc", "score": "0.65669394", "text": "public function index()\n {\n // Get articles\n $phonebook = Phonebook::all();\n // $phonebook = Phonebook::orderBy('created_at', 'desc')->paginate(10);\n\n // Return collection of articles as a resource\n return PhonebookResource::collection($phonebook);\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "91bd64ec31d39c68673ba29f7d9f8854", "score": "0.6563426", "text": "public function index()\n {\n $books = Book::all();\n\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "fbe5edfb0d98ba0fd6a7b19c41578f77", "score": "0.6557768", "text": "public function index()\n {\n try{\n $records = $this->recordRepository->all();\n return RecordResource::collection($records);\n }catch(Exception $ex){\n return (new RecordResource(null))->additional([\"success\" => false, 'message' => $ex->getMessage()]);\n }\n }", "title": "" }, { "docid": "d6b8267e53f8fa9ab6b806d4fbc412ee", "score": "0.655762", "text": "public function indexAction()\n {\n $total = 0;\n $records = $this->selectRecords($total);\n\n $this->apiOutRecords($records, array('_total' => $total));\n }", "title": "" }, { "docid": "3880843e6dad72ba6c5735793fc1ed0b", "score": "0.6556616", "text": "public function index()\n {\n $query = Person::getList(request('filter', ''))\n ->orderBy(request('order_by','s_FullLegalName'),request('order','ASC'));\n \n return PersonResource::collection($query->paginate(request('per_page', 100)));\n }", "title": "" }, { "docid": "04cfd6b456f88347b94d80eedaf2f138", "score": "0.65456504", "text": "public function index()\n {\n return new FormatResourceCollection(Format::paginate(12));\n }", "title": "" }, { "docid": "9c04a592d034f52c23e6d6ecf983a3ae", "score": "0.6544668", "text": "public function index()\n {\n return EmployeeResource::collection(Employee::query()->paginate());\n }", "title": "" }, { "docid": "ab27904c6696fc1d0abf6bfaac7bde7e", "score": "0.65404403", "text": "public function listAction()\n {\t\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepEmp = $em->getRepository('BoAdminBundle:SupEmployee');\n\t\t$nb_tc = $oRepEmp->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$supemployees = $em->getRepository('BoAdminBundle:SupEmployee')->findBy(array(),array('firstname' => 'asc'),$nb_cpp,$offset);\n return $this->render('supemployee/index.html.twig', array(\n 'supemployees' => $supemployees,\n\t\t\t'types'=>$em->getRepository('BoAdminBundle:Contracts')->getContractType(),\n\t\t\t'languages'=>$em->getRepository('BoAdminBundle:Language')->getAll(),\n\t\t\t'statuss'=>$em->getRepository('BoAdminBundle:Employee')->getStatusEmployee(),\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'message'=> $this->getSessionMessage(),\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"archives\",\n\t\t\t'sm'=>\"supemployee\",\n ));\n }", "title": "" }, { "docid": "4b7799b0d4a4b471dbc995e613462306", "score": "0.6540187", "text": "public function listAction()\n {\n return new Response(\n json_encode([\n [\n 'id' => 1,\n 'title' => 'First Post on Vox',\n 'author' => 'Mario Rossi',\n 'author_id' => 1,\n 'excerpt' => \"Here we are! Finally this is my first post on Vox and I am so happy that...\",\n 'content' => \"Here we are! Finally this is my first post on Vox and I am so happy that this is my lorem ipsum bla bla bla bla!\",\n 'date' => \"08/01/2015\"\n ],\n [\n 'id' => 2,\n 'title' => 'And yes, this is my second post!',\n 'author' => 'Lukas Schneider',\n 'author_id' => 2,\n 'excerpt' => \"Well this is already my second post and so you already know that...\",\n 'content' => \"Well this is already my second post and so you already know that, in terms of being my second post,\n this is exactly what is says it is: my second, incredibly well written and fantastimagically published post!\",\n 'date' => \"09/02/2015\"\n ]\n ]),\n 200,\n 'application/json'\n );\n }", "title": "" }, { "docid": "7bf076a0c3e59596e2f2d0bcbed69f85", "score": "0.65379655", "text": "public function index()\n {\n $artigos = Artigo::paginate(15);\n return ArtigoResource::collection($artigos);\n }", "title": "" }, { "docid": "f02310ea34b1d707bc2f4d714e4c27f4", "score": "0.65372354", "text": "public function index()\n {\n return view($this->template.'.list.index');\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.65288365", "text": "public function list()\n {\n }", "title": "" }, { "docid": "151cb6ff960217da12cef7baa33178ed", "score": "0.652593", "text": "public function listAction()\n {\n if ((!$this->auth->hasIdentity()) || ($this->session->type != '1'))\n $this->_helper->redirector('index', 'index');\n\n $this->view->headTitle(\"Noticias\");\n $this->view->headLink()->appendStylesheet($this->view->baseUrl().'/css/list.css');\n\n $tbNews = new TbNews();\n $this->view->news = $tbNews->select()->query()->fetchAll();\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "b1dec5f0dac45e2b14cc0f57d1289acb", "score": "0.65199256", "text": "public function index()\n {\n //\n\t\t\t\t// $resources = Resource::all();\n\t\t\t\t// $resources = $resources->sortByDesc('creation_date');\n\t\t\t\t// return response()->json($resources->values()->all());\n\n\t\t\t\treturn response()->json(Resource::orderBy('creation_date', 'desc')->get());\n }", "title": "" }, { "docid": "e88169ebd124db7bccec6b3cfb0167be", "score": "0.65179664", "text": "public function index()\n {\n $albums = Album::orderBy('date', 'desc')->paginate(20);\n\n\n return AlbumResource::collection($albums);\n }", "title": "" }, { "docid": "fbf72fd4f1e2e3a08a1398a646fce575", "score": "0.651124", "text": "public function index()\n\t{\n\t\t$shows = $this->shows->all();\n\t\n\t\treturn $this->apiResponse('success', $shows->toArray());\n\t}", "title": "" }, { "docid": "1860cb7aec35aa79a7186d6bd7c6a7d4", "score": "0.65010643", "text": "public function index()\n {\n //\n return view('backend.admin.catalogs.index')\n ->with(['catalogs' => Catalog::paginate(10)]);\n }", "title": "" }, { "docid": "66db74bb7d42b9897dbcbf88ebabf0ca", "score": "0.64994514", "text": "public function index()\n {\n $request = request();\n if($request->query->has('page_size')){\n $this->setPageSize(request()->query->getInt('page_size', $this->page_size));\n }\n\n $items = $this->indexService->getItems($this->pageSize());\n\n return view($this->templateIndex, [\n 'items' => $items,\n 'title' => $this->getTitle(),\n 'controller' => $this->getController(),\n 'fields' => $this->listFields(),\n 'sortable' => $this->isSortable\n ]);\n }", "title": "" }, { "docid": "3bcd0d0bc609b30833a686c0ca043c6e", "score": "0.6498308", "text": "public function index()\n {\n $links = Link::all();\n\n return LinkResource::collection($links);\n }", "title": "" }, { "docid": "bc53be210c897827bfafe166eceeb35a", "score": "0.6491012", "text": "public function index()\n {\n $employees = $this->paginate($this->Employees);\n\n $this->set(compact('employees'));\n $this->set('_serialize', ['employees']);\n }", "title": "" }, { "docid": "43a505c360befd38cd453143a05a36e2", "score": "0.6481906", "text": "public function index()\n {\n $statuses = $this->statuses->paginate(10);\n\n return view('backend.statuses.index',compact('statuses'));\n }", "title": "" }, { "docid": "65d1d46b6cab2b6d3d5320b59de21946", "score": "0.64814454", "text": "public function index()\n {\n //get some articles\n $posts = Post::paginate(15);\n //return the collection as resource\n return PostResource :: collection($posts);\n }", "title": "" } ]
2fdfd075668ac2a2d8a7d8e8a39030ef
Test case for setClientRoles Set roles for a client.
[ { "docid": "2ae2e506042b0d1914e55ee75990384f", "score": "0.79858667", "text": "public function testSetClientRoles()\n {\n }", "title": "" } ]
[ { "docid": "0da654f8c46606e8174ea9a6187a2cdf", "score": "0.8014604", "text": "public function setClientRoles(array $roles): void\n {\n $this->clientRoles = $roles;\n }", "title": "" }, { "docid": "b24e20cab4c6ff2c3d6cc18dab948010", "score": "0.6664788", "text": "public function testGetClientRoles()\n {\n }", "title": "" }, { "docid": "f72c71d5603c9130f0bb3240ba48c57b", "score": "0.6559683", "text": "public function testSetUserRoles()\n {\n }", "title": "" }, { "docid": "5526345aa79be0ba9dc3770aeb9a0520", "score": "0.65513337", "text": "public function setRoles(array $roles);", "title": "" }, { "docid": "96478eb128438c56ee3cdc9f8cbc285b", "score": "0.64132327", "text": "public function testGetRoles(): void\n {\n $value = ['ROLE_ADMIN'];\n $response = $this->user->setRoles($value);\n \n self::assertInstanceOf(expected: User::class, $response);\n self::assertContains(needle: 'ROLE_USER', $this->user->getRoles());\n self::assertContains(needle: 'ROLE_ADMIN', $this->user->getRoles());\n }", "title": "" }, { "docid": "6fd4384ba78a8a88edea1d26894596af", "score": "0.6218288", "text": "public function setRoles($roles)\n {\n $this->roles = $roles;\n }", "title": "" }, { "docid": "93890e7f649f23dbe235a55f76dd8d3e", "score": "0.60766786", "text": "public function setRoles(array $roles): void\n {\n $this->roles = $roles;\n }", "title": "" }, { "docid": "f320483cd2c553486a6a0622e80536c9", "score": "0.6037082", "text": "function set_roles( $roles ) \n\t{\n\t\tif( !empty( $roles ) ) {\n\t\t\t$roles = is_array( $roles ) ? $roles : (array)$roles;\n\t\t\t$this->roles = $roles;\t\n\t\t}\n\t\telse {\n\t\t\t$this->roles = false;\n\t\t}\n\t}", "title": "" }, { "docid": "1d572a0767f44dae1d5c262d7cca4b3c", "score": "0.5787144", "text": "public function testSetRole()\n {\n }", "title": "" }, { "docid": "cf2918b95b0d416679cadf002b6284e2", "score": "0.5725436", "text": "public function testModifyPeersRoles()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "6004e7daaac6366504ea39a08b0678c2", "score": "0.5698955", "text": "public function getRoles()\n {\n return ['ROLE_CLIENTS'];\n }", "title": "" }, { "docid": "48fc13e8a2c852295d67f06a03d2eb9a", "score": "0.56226873", "text": "public function setClient($client) {\n\n\t}", "title": "" }, { "docid": "8dd8e17301097fd36dccaf5ddd5ed0ba", "score": "0.5600077", "text": "public function setClient($client);", "title": "" }, { "docid": "800070ef6c22a44f4c4754a4e9f65eb3", "score": "0.5597251", "text": "public function setRoles(array $roles): self\n {\n $this->roles = str_replace('\"', '', implode(', ', $roles));\n \n return $this;\n }", "title": "" }, { "docid": "eba119f4fbeaa9d91d5e9fcdc244b924", "score": "0.5565873", "text": "private function setRoles(): void\n {\n $roles = $this->userModel->getUserRolesByUserId($this->getId());\n foreach ($roles as $role) {\n $this->roles[$role['role']] = $role['roleName'];\n }\n }", "title": "" }, { "docid": "4615a964a4c49ead17bd374fcd9d234a", "score": "0.55176604", "text": "public function testAddUserRoles()\n {\n }", "title": "" }, { "docid": "b5f994d694cec0b07c15d9f6c1243a43", "score": "0.5495284", "text": "public function testGetRoles()\n {\n $this->assertNotEmpty($this->user->getRoles());\n }", "title": "" }, { "docid": "a7ba9fc799316135344ede8ce8cedd5e", "score": "0.5471645", "text": "private function setRoles($roles)\n {\n if (is_array($roles)) {\n $this->roles = $roles;\n }\n return $this;\n }", "title": "" }, { "docid": "146172042d80f39e0aade038e1d3b953", "score": "0.5466355", "text": "public function setRoles(array $roles)\n {\n $this->roles = array();\n\n foreach ($roles as $role) {\n $this->addRole($role);\n }\n }", "title": "" }, { "docid": "39f179477ed8d87a4240e901e606f04b", "score": "0.54470426", "text": "public function testGetSetRole()\n {\n $fixture = 'admin';\n\n $this->assertSame($this->instance, $this->instance->setRole($fixture));\n $this->assertSame($fixture, $this->instance->getRole());\n }", "title": "" }, { "docid": "11a1ee652cc9d3cae3b3a974dc9f8020", "score": "0.5412152", "text": "public function testSetCodeClient() {\n\n $obj = new BonsTravauxInterventions();\n\n $obj->setCodeClient(\"codeClient\");\n $this->assertEquals(\"codeClient\", $obj->getCodeClient());\n }", "title": "" }, { "docid": "2c4b9360b8d5e1bf039c1b231a2f1d65", "score": "0.53889817", "text": "public function SetRoles ($roles) {\n\t\tif (is_string($roles)) {\n\t\t\t$this->roles = explode(',', $roles);\n\t\t} else if (is_array($roles)) {\n\t\t\t$this->roles = $roles;\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d463fc319a37b658ee85d805abb346fb", "score": "0.53790796", "text": "public function testSetCodeClient() {\n\n $obj = new SuiviClient();\n\n $obj->setCodeClient(\"codeClient\");\n $this->assertEquals(\"codeClient\", $obj->getCodeClient());\n }", "title": "" }, { "docid": "a6ed42f08a7f4eee42e3e2b1d65505e0", "score": "0.53565496", "text": "public function setVRoles( $value ){\n\n $this->vRoles = $value;\n\n }", "title": "" }, { "docid": "e3dffea4be82e4173de3a35649a5c965", "score": "0.53438985", "text": "public function testRemoveUserRoles()\n {\n }", "title": "" }, { "docid": "a22f27c281e64dd419b482a91ee0a4da", "score": "0.53416884", "text": "public function setClient(MSRedis $client)\n {\n $this->_client = $client;\n }", "title": "" }, { "docid": "0983fc763794a18c7a327b3fd4d46d73", "score": "0.53404313", "text": "public function testGetRoles()\n {\n $roles = $this->_json->getRoles(NULL, NULL, 'ASC', 0, 10);\n \n $this->assertGreaterThan(0, $roles['totalcount']);\n }", "title": "" }, { "docid": "15d6efc337ad698245743d4e3484b8fc", "score": "0.5334483", "text": "public function setClientUuids($value) {\n $this->clientUuids = $value;\n }", "title": "" }, { "docid": "44fb88542fe8f79972bf900644ed1615", "score": "0.53184146", "text": "public function setClient($client)\n {\n $this->client = $client;\n }", "title": "" }, { "docid": "bb2043aacc9ded4bf4c25bf05144a9e1", "score": "0.53151745", "text": "public function setClient($client)\n {\n $this->client = $client;\n }", "title": "" }, { "docid": "32956907f0cf084e577f4990e192b369", "score": "0.5306158", "text": "public function testSetCodeClient() {\n\n $obj = new PlansEnTete();\n\n $obj->setCodeClient(\"codeClient\");\n $this->assertEquals(\"codeClient\", $obj->getCodeClient());\n }", "title": "" }, { "docid": "4cf3ab91426949eda9ca708bf87ae3f3", "score": "0.52886736", "text": "public function testGetUserRoles()\n {\n }", "title": "" }, { "docid": "4cf3ab91426949eda9ca708bf87ae3f3", "score": "0.52886736", "text": "public function testGetUserRoles()\n {\n }", "title": "" }, { "docid": "73248dc8b366e964f6f3b2d7e49a3769", "score": "0.52816355", "text": "public function testGetRoles()\n {\n }", "title": "" }, { "docid": "2967435e2041b2431397b492e71f671f", "score": "0.526103", "text": "public function setClient($client)\n {\n $this->_client = $client;\n }", "title": "" }, { "docid": "222467dda9610ce77ec8b8670b3cc6d3", "score": "0.52581865", "text": "public function attachRoles($roles);", "title": "" }, { "docid": "222467dda9610ce77ec8b8670b3cc6d3", "score": "0.52581865", "text": "public function attachRoles($roles);", "title": "" }, { "docid": "2833d174005ad04f127638cbe986ab55", "score": "0.52095705", "text": "public function set_roles( array $roles ) {\n\t\t$this->roles = [];\n\t\tarray_walk( $roles, [ $this, 'add_role' ] );\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "06aa6a50d374a089ad6e85cfff27b3c1", "score": "0.51794565", "text": "public function hasRoles(array $roles, int $user = 0): bool;", "title": "" }, { "docid": "5732bc557c9a893faf5f66d35b40c315", "score": "0.51747984", "text": "private function setUpRoles()\n {\n $tempPerms = array($this->perms[\"Permissions_Res1_Crud1\"], $this->perms[\"Permissions_Res1_Crud4\"], $this->perms[\"Permissions_Res1_String1\"]);\n $this->roles[\"Role1\"] = $this->createMockRole($tempPerms, 0, null);\n \n /**\n * Role2: IsGranted permission on Resource2.\n */\n $tempPerms = array($this->perms[\"Permissions_Res2_String1\"], $this->perms[\"Permissions_Res2_String4\"], $this->perms[\"Permissions_Res1_String3\"]);\n $this->roles[\"Role2\"] = $this->createMockRole($tempPerms, 1, null);\n \n /**\n * Role3: Parent role for role 4. Contains Resource2 CRUD permissions.\n */\n $tempPerms = array($this->perms[\"Permissions_Res3_Crud1\"], $this->perms[\"Permissions_Res3_String1\"]);\n $this->roles[\"Role3\"] = $this->createMockRole($tempPerms, 2, null);\n \n /**\n * Role4: Has Role3 as its parent role.\n */\n $tempPerms = array($this->perms[\"Permissions_Res3_Crud4\"], $this->perms[\"Permissions_Res3_String4\"]);\n $this->roles[\"Role4\"] = $this->createMockRole($tempPerms, 3, $this->roles[\"Role3\"]);\n \n /**\n * \n * Role5: Has a keyed permission and unkeyed permission with same actions,\n * different values.\n */\n $tempPerms = array($this->perms[\"Permissions_Res1_Crud1\"], $this->perms[\"Permissions_Res1_Crud4\"]);\n $this->roles[\"Role5\"] = $this->createMockRole($tempPerms, 4, null);\n }", "title": "" }, { "docid": "3e439a488f1a98302a03cf08357815ef", "score": "0.5173384", "text": "public function testListAllRoles()\n {\n }", "title": "" }, { "docid": "f506275b599698c7da40d473ad19feb6", "score": "0.51645064", "text": "public function action_setup_roles() {\n\t\t$this->remove_deprecated_roles();\n\t\t$this->setup_core_roles();\n\t\t$this->setup_custom_roles();\n\t}", "title": "" }, { "docid": "ca4a48edfd5fa265ba8ec9801cfcb33e", "score": "0.5108232", "text": "public function setClient(AbstractClient $client);", "title": "" }, { "docid": "224a8bcf9717f0c438998cf27d068b5e", "score": "0.5107578", "text": "public function setClient(Client $client)\n {\n $this->client = $client;\n }", "title": "" }, { "docid": "22f200d9c6d289abc6574d29d52b2823", "score": "0.51010454", "text": "public function saveRoles($inputRoles);", "title": "" }, { "docid": "22f200d9c6d289abc6574d29d52b2823", "score": "0.51010454", "text": "public function saveRoles($inputRoles);", "title": "" }, { "docid": "5643f538d0c4e350dc4de6bdcd3d5c97", "score": "0.5090266", "text": "public function testDeleteRoles()\n {\n $role = Tinebase_Acl_Roles::getInstance()->getRoleByName($this->objects['role']->name);\n \n $result = $this->_json->deleteRoles(array($role->getId()));\n \n $this->assertTrue($result['success']);\n \n // try to get it, shouldn't be found\n $this->setExpectedException('Exception');\n $role = Tinebase_Acl_Roles::getInstance()->getRoleByName($this->objects['role']->name);\n \n }", "title": "" }, { "docid": "603a965819c4d5b085dac433c2f1490c", "score": "0.50871646", "text": "public function setClient($client)\n\t{\n\t\t$this->client = (string) $client;\n\t}", "title": "" }, { "docid": "13dd70d6c9e5315ee47b80a175cdad93", "score": "0.5079515", "text": "public function setRoles (array $roles) : self\n\t{\n\t\t$this->roles = [];\n\n\t\tforeach ($roles as $role)\n\t\t\t$this->addRole($role);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d96b7ea67c71a0aa2b1af2b6c6961b92", "score": "0.5079419", "text": "public function edit(ClientUsers $clientUsers)\n {\n //\n }", "title": "" }, { "docid": "534ae60fa1a34602ac4dd3cc7a3c8a1c", "score": "0.50736415", "text": "public function setRoles($roles_arr) : string {\n $roles = \"\";\n\n if ((is_array($roles_arr)) ) {\n foreach ($roles_arr as $role_id) {\n $role = Role::find($role_id);\n if ($roles == \"\") {\n $roles = \"\" . $role->name;\n } else {\n $roles = $roles . \",\" . $role->name;\n }\n }\n\n $roles = $roles . \"\";\n }\n\n return $roles;\n }", "title": "" }, { "docid": "e27e1ba9937db586c05c3892add2175e", "score": "0.5072547", "text": "public function setAccessRoles(array $accessRoles) {\n\t\tforeach ($accessRoles as $role) {\n\t\t\tif (!is_string($role)) {\n\t\t\t\tthrow new \\InvalidArgumentException('The role names passed to setAccessRoles() must all be of type string.', 1302172892);\n\t\t\t}\n\t\t}\n\t\tif ($this->accessRoles !== $accessRoles) {\n\t\t\t$this->accessRoles = $accessRoles;\n\t\t\t$this->nodeRepository->update($this);\n\t\t}\n\t}", "title": "" }, { "docid": "5171221dedc32c0533cc5ca8228fac2e", "score": "0.50701296", "text": "public function setAllowedRoles(array $allowedRoles)\n {\n $this->allowedRoles = $allowedRoles;\n }", "title": "" }, { "docid": "1c1dcd7f61411623d2f88c9273cb7ca2", "score": "0.5068733", "text": "public function setClient(ClientInterface $client);", "title": "" }, { "docid": "9a3c3d0a486ad9533ce945b8585180f2", "score": "0.5062243", "text": "public function setClient($EtClient) {\n\t\t\t$this->client = $EtClient;\n\t}", "title": "" }, { "docid": "75671d0891a4e206f82fb2d9f43de484", "score": "0.5044599", "text": "public function testSetAndGetRoleCode()\r\n {\r\n $testObj = $this->_createMockModel();\r\n $baseObj = $this->_createMockModel();\r\n\r\n // Set the Role Code\r\n $testObj->setRoleCode('myRoleCode');\r\n\r\n // Assert that a change occurred in the test object\r\n $this->assertNotEquals($testObj, $baseObj);\r\n\r\n // Assert that Role Code field was updated\r\n $this->assertEquals('myRoleCode', $testObj->getRoleCode());\r\n\r\n // Assert that no other return values were affected\r\n $this->_assertModelsSameExcept($testObj, $baseObj, 'RoleCode');\r\n }", "title": "" }, { "docid": "aac9229f2505ab59840b4748a2cdf2ef", "score": "0.50443774", "text": "public function setClient(?Client $client): void\n {\n $this->client = $client;\n }", "title": "" }, { "docid": "43a9ce2f93f287969caba57b907a9f79", "score": "0.50415134", "text": "public function rolesPath($roles_path = '')\n {\n $this->option('--roles-path=' . $roles_path);\n\n return $this;\n }", "title": "" }, { "docid": "d6bdec86d9d02039c67808b25a64fd7c", "score": "0.5039597", "text": "public function testRequestWithRoleRemovedFromClient() {\n $access_token = $this->getAccessToken(['oof']);\n\n // Get detailed information about the authenticated user.\n $response = $this->get(\n $this->tokenTestUrl,\n [\n 'query' => ['_format' => 'json'],\n 'headers' => [\n 'Authorization' => 'Bearer ' . $access_token,\n ],\n ]\n );\n $parsed_response = Json::decode((string) $response->getBody());\n $this->assertEquals($this->user->id(), $parsed_response['id']);\n $this->assertEquals(['authenticated', 'oof'], $parsed_response['roles']);\n $this->assertTrue($parsed_response['permissions']['delete own simple_oauth entities']['access']);\n\n $this->client->set('roles', []);\n // After saving the client entity, the token should be deleted.\n $this->client->save();\n\n // User should NOT have access to view own simple_oauth entities,\n // because the scope is indicated in the token request, but\n // missing from the client content entity.\n $response = $this->get(\n $this->tokenTestUrl,\n [\n 'query' => ['_format' => 'json'],\n 'headers' => [\n 'Authorization' => 'Bearer ' . $access_token,\n ],\n ]\n );\n // The token was successfully removed and we were denied access.\n $this->assertEquals(401, $response->getStatusCode());\n\n $access_token = $this->getAccessToken(['oof']);\n // Get detailed information about the authenticated user.\n $response = $this->get(\n $this->tokenTestUrl,\n [\n 'query' => ['_format' => 'json'],\n 'headers' => [\n 'Authorization' => 'Bearer ' . $access_token,\n ],\n ]\n );\n $parsed_response = Json::decode((string) $response->getBody());\n $this->assertEquals($this->user->id(), $parsed_response['id']);\n $this->assertEquals(['authenticated'], $parsed_response['roles']);\n $this->assertFalse($parsed_response['permissions']['delete own simple_oauth entities']['access']);\n }", "title": "" }, { "docid": "b6fc6ddd9fc3557d473797e064f23ad5", "score": "0.50345373", "text": "private function updateRoles($user, $roles)\n {\n $oldRoles = Yii::$app->authManager->getRolesByUser($user->id);\n\n $toDelete = array_diff_key($oldRoles, $roles);\n $toAdd = array_diff_key($roles, $oldRoles);\n\n foreach ($toDelete as $roleName => $rObj) {\n Yii::$app->authManager->revoke($rObj, $user->id);\n }\n\n foreach ($toAdd as $roleName => $value) {\n $r = Yii::$app->authManager->getRole($roleName);\n Yii::$app->authManager->assign($r, $user->id);\n }\n }", "title": "" }, { "docid": "f6d6c1d2effd0fac2841eacd73888b3b", "score": "0.50256926", "text": "public function setRoles($roles)\n {\n $this->roles = $roles;\n\n return $this;\n }", "title": "" }, { "docid": "4989592427a90fe6dff56af49c09fe45", "score": "0.5009999", "text": "public function setClient(Client $client): void\n {\n $this->client = $client;\n }", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5000402", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5000402", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5000402", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5000402", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5000402", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5000402", "text": "public function roles();", "title": "" }, { "docid": "6963ac98fbef9ee158c2a9b21bcf3eac", "score": "0.49844632", "text": "public function setClient(ClientInterface $client)\n {\n $this->client = $client;\n }", "title": "" }, { "docid": "fdaa722e6b90e2f3185db0a4ee2d894f", "score": "0.4978355", "text": "public function testSetClientCall(string $className, bool $shouldCallSetClient, string $method)\n {\n $entityMock = $this->getEntityMock($className, $shouldCallSetClient);\n $tokenStorageMock = $this->getTokenStorageMock();\n $eventMock = $this->getEventMock($method, $entityMock);\n\n (new UserEntitySubscriber($tokenStorageMock))->setCurrentClient(\n $eventMock)\n ;\n }", "title": "" }, { "docid": "9551c7313dfe523c32e4d95107772e07", "score": "0.49640226", "text": "function checkUserRoles($userRoles) {\n if( empty($userRoles) ){\n echo \"Roles cannot be empty\" . PHP_EOL;\n return;\n }\n\n switch ($userRoles){\n case \"Admin\":\n echo \"Hello Admin\" . PHP_EOL;\n break;\n case \"Editor\":\n echo \"Hello Editor\" . PHP_EOL;\n break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "50897d6b2240d6a55136fbbf1f01d6d8", "score": "0.4945294", "text": "public function setclient($client)\n {\n $this->client = $client;\n \n return $this;\n }", "title": "" }, { "docid": "fbcd160470c9180c3506225128cbe5cd", "score": "0.4943498", "text": "public function retrieveRolesValidRequest()\n {\n extract(mockAuthHeaders($this->admin)); //headers, token\n\n $retrieve_roles_response = $this->withHeaders($headers)\n ->json('GET', '/api/roles');\n $retrieve_roles_response->assertStatus(201)\n ->assertJsonStructure(['success', 'roles']);\n\n $response_data = $retrieve_roles_response->getData();\n\n $this->assertTrue($response_data->success);\n\n foreach ($response_data->roles as $role) {\n $this->assertNotEquals($role->name, 'superadmin');\n }\n }", "title": "" }, { "docid": "2251c82fc5e62db8478c8901062afd6f", "score": "0.49331987", "text": "public function roles(array $roles)\n {\n $this->roles = $roles;\n\n return $this;\n }", "title": "" }, { "docid": "1849335c3a479736b5050b93f605d747", "score": "0.49286583", "text": "public function testRoles()\n {\n\n $permission = Mockery::mock('Bbatsche\\Entrust\\EntrustPermission')->makePartial();\n\n $belongsToMany = new stdClass();\n\n $app = Mockery::mock('app')->shouldReceive('instance')->getMock();\n $config = Mockery::mock('config');\n\n Config::setFacadeApplication($app);\n Config::swap($config);\n\n /*\n |------------------------------------------------------------\n | Expectation\n |------------------------------------------------------------\n */\n\n $permission->shouldReceive('belongsToMany')->with('RoleModelName', 'permission_role_table_name')\n ->andReturn($belongsToMany)->once();\n\n Config::shouldReceive('get')->with('entrust::role')\n ->andReturn('RoleModelName')->once();\n Config::shouldReceive('get')->with('entrust::permission_role_table')\n ->andReturn('permission_role_table_name')->once();\n\n /*\n |------------------------------------------------------------\n | Assertion\n |------------------------------------------------------------\n */\n\n $this->assertSame($belongsToMany, $permission->roles());\n }", "title": "" }, { "docid": "14696a96eab79a262dac1f9b3f936d82", "score": "0.492257", "text": "public function setGrantedClientScopes($grantedClientScopes): self\n {\n $this->grantedClientScopes = [];\n\n foreach ($grantedClientScopes as $grantedClientScope) {\n $this->addGrantedClientScope($grantedClientScope);\n }\n\n return $this;\n }", "title": "" }, { "docid": "e07cced557fe614d1963730f13a39a96", "score": "0.49150965", "text": "public function testGetActiveRoles()\n {\n }", "title": "" }, { "docid": "8a2f661ef7126705c94b355660e300cc", "score": "0.49144912", "text": "public static function set(\\Scrivo\\Context $context, $objectId, $roles) {\n\t\t\\Scrivo\\ArgumentCheck::assertArgs(func_get_args(), array(\n\t\t\tnull,\n\t\t\tarray(\\Scrivo\\ArgumentCheck::TYPE_INTEGER),\n\t\t\tnull\n\t\t));\n\t\ttry {\n\n\t\t\t$sth = $context->connection->prepare(\n\t\t\t\t\"DELETE FROM object_role WHERE\n\t\t\t\tinstance_id = :instId AND page_id = :objectId\");\n\n\t\t\t$context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":objectId\", $objectId, \\PDO::PARAM_INT);\n\n\t\t\t$sth->execute();\n\n\t\t\tif ($roles) {\n\t\t\t\t$sth = $context->connection->prepare(\n\t\t\t\t\t\"INSERT INTO object_role\n\t\t\t\t\t (instance_id, role_id, page_id)\n\t\t\t\t\tVALUES (:instId, :roleId, :objectId)\");\n\n\t\t\t\t$context->connection->bindInstance($sth);\n\t\t\t\t$sth->bindValue(\":objectId\", $objectId, \\PDO::PARAM_INT);\n\n\t\t\t\tforeach ($roles as $role) {\n\t\t\t\t\t$sth->bindValue(\":roleId\", $role->id, \\PDO::PARAM_INT);\n\n\t\t\t\t\t$sth->execute();\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}", "title": "" }, { "docid": "962299da4994e57b99e20ee6b9cb43bd", "score": "0.49134004", "text": "public function testSetPermissionsForRole()\n {\n }", "title": "" }, { "docid": "cab5852bb580f69981721437bdea8031", "score": "0.4901841", "text": "public function loadAccessControlList(Client $client, $tree = false)\n\t{\n\t\t//Prepare client roles\n\t\t$roles = $client->getRoles();\n\n\t\t$accessControlList = array(\n\t\t\t'read' => array(),\n\t\t\t'write' => array(),\n\t\t);\n\n\t\t/** @var OfficeRepository $officeRepository */\n\t\t$officeRepository = $this->getEntityManager()->getRepository(Office::class);\n\n\t\tif ($tree) {\n\t\t\t$readAccessOfficesTree = $officeRepository->findReadAccessOfficesTreeByEmployee($client->getEmployee()->getId());\n\t\t} else {\n\t\t\t$readAccessOfficesTree = $officeRepository->findFlattenReadAccessDepartmentsByEmployee($client->getEmployee()->getId());\n\t\t}\n\n\t\t$accessControlList['read'] = $readAccessOfficesTree;\n\n\t\t//For each role that has an associated access control list, find and attach the allowed departments\n\t\tforeach ($roles as $role) {\n\t\t\tif ($tree) {\n\t\t\t\t$writeAccessOfficesTree = $officeRepository->findWriteAccessOfficesTreeByClientAndRole($client, $role);\n\t\t\t} else {\n\t\t\t\t$writeAccessOfficesTree = $officeRepository->findFlattenWriteAccessDepartmentsByClientAndRole($client, $role);\n\t\t\t}\n\n\t\t\t$accessControlList['write'][$role] = $writeAccessOfficesTree;\n\t\t}\n\n\t\treturn $accessControlList;\n\t}", "title": "" }, { "docid": "311942446c33fc563c58f34472d7a04c", "score": "0.4898753", "text": "public function setClientId($client_id);", "title": "" }, { "docid": "2566851dedff7f4340a5ea2f4053b428", "score": "0.4895982", "text": "public function edit(Roles $roles)\n {\n //\n }", "title": "" }, { "docid": "b20fd4fb4ccd1ecd725bdeaad4cbb4b0", "score": "0.48776254", "text": "public function testClientStores()\n {\n $this->seed('RolesSeeder');\n\n factory(Shop::class, 5)->create(['status' => 1, 'file_id' => null])->each(function ($translatable) {\n foreach (['ru'] as $locale) {\n $translatable->translateOrNew($locale)->name = $locale . ' ' . $this->faker->company;\n $translatable->translateOrNew($locale)->description = $locale . ' ' . $this->faker->paragraph;\n $translatable->save();\n }\n });\n\n Passport::actingAs(\n factory(User::class)->create(['role_id' => Constants::ROLES['Client']]),\n [Constants::ROLES_PASSPORT_SCOPE['Client']]\n );\n\n $server = $this->transformHeadersToServerVars(['Accept' => 'application/json']);\n $response = $this->call('GET', '/api/c/stores', ['lang' => 'en'], [], [], $server);\n\n $response\n ->assertStatus(200)\n ->assertHeader('content-type', 'application/json')\n ->assertJsonStructure([\n '*' => [\n 'name',\n 'details',\n 'thumbnail',\n 'coordinate'\n ]\n ]);\n }", "title": "" }, { "docid": "59ddc80f83f64492d572f6cbd25a16e8", "score": "0.48771563", "text": "public function setClient(ClientEntityInterface $client)\n {\n $this->client = $client;\n }", "title": "" }, { "docid": "5612eff479601e602504d4e201c3fc31", "score": "0.4873129", "text": "public function assignRoles(int $userId, array $roleIds): Model;", "title": "" }, { "docid": "520138bf29e67b940ce104c68482ba5b", "score": "0.4867798", "text": "public function edit(Clients $client)\n {\n //\n }", "title": "" }, { "docid": "56dadb2e092354c17afa3b565534c0cf", "score": "0.48506212", "text": "public function setClient($client)\n {\n $this->container()->set('client', new ClientProxy($client));\n }", "title": "" }, { "docid": "8a023b12e5c0c2069325fd769a5aead3", "score": "0.48442057", "text": "public function actionRoles()\r\n\t{\r\n\t\tYii::app()->user->rightsReturnUrl = array('authItem/roles');\r\n\t\t\r\n\t\t$dataProvider = new RAuthItemDataProvider('roles', array(\r\n\t\t\t'type'=>CAuthItem::TYPE_ROLE,\r\n\t\t\t'sortable'=>array(\r\n\t\t\t\t'id'=>'RightsRoleTableSort',\r\n\t\t\t\t'element'=>'.role-table',\r\n\t\t\t\t'url'=>$this->createUrl('authItem/sortable'),\r\n\t\t\t),\r\n\t\t));\r\n\r\n\t\t// Render the view\r\n\t\t$this->render('roles', array(\r\n\t\t\t'dataProvider'=>$dataProvider,\r\n\t\t\t'isBizRuleEnabled'=>$this->module->enableBizRule,\r\n\t\t\t'isBizRuleDataEnabled'=>$this->module->enableBizRuleData,\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "a282cfec53718e6569daf666f7d46573", "score": "0.48376906", "text": "public function test_assignuserforusersetctx() {\n global $DB;\n\n // Get role to assign (we'll just take the first one returned).\n $rolesctx = $DB->get_records('role_context_levels', array('contextlevel' => CONTEXT_ELIS_USERSET));\n foreach ($rolesctx as $rolectx) {\n $roleid = $rolectx->roleid;\n break;\n }\n\n // Get user to assign role.\n $user = new user(103);\n $muser = $user->get_moodleuser();\n\n // Get specific context.\n $usrset = new userset(1);\n $context = \\local_elisprogram\\context\\userset::instance($usrset->id);\n\n // Assign role.\n $this->assertGreaterThan(0, role_assign($roleid, $muser->id, $context->id));\n }", "title": "" }, { "docid": "ea104ce2c34ac833dd01b39e8052850f", "score": "0.48270583", "text": "public function testListClusterRole()\n {\n\n }", "title": "" }, { "docid": "d83059a73dce04e15b64459bdfb4521e", "score": "0.4809444", "text": "protected function set_new_roles($user, $post, $roles)\n\t{\n\t\t/**\n\t\t * Remove all user roles followed in variable roles \n\t\t */\n\t\tforeach ($roles as $role)\n\t\t{\n\t\t\t$user->remove('roles', $role);\n\t\t}\n\t\n\t\t/**\n\t\t * Check if post have given user\n\t\t */\n\t\tif (key_exists($user->username, $post))\n\t\t{\n\t\t\t/**\n\t\t\t * Sets new roles in post table to user\n\t\t\t */\n\t\t\tforeach ($post[$user->username] as $id_role)\n\t\t\t{\t\n\t\t\t\t$role = ORM::factory('Role', $id_role);\n\t\t\t\t$user->add('roles', $role);\n\t\t\t}\n\t\t}\t\n\t}", "title": "" }, { "docid": "28f0c88b37b4e2280f976f5dd6d5ff34", "score": "0.4802945", "text": "protected function configureFixtures(ContainerInterface $client)\n {\n }", "title": "" }, { "docid": "72c00bc54865baaa71c58925913ee106", "score": "0.48028725", "text": "public function testConstructSetClient()\n {\n $node = new Node($this->client);\n\n // reflect `node`\n $reflectionClass = new \\ReflectionClass($node);\n\n // set `client` property from `node` parent (`abstract node`) accessible\n $reflectionProperty = $reflectionClass->getParentClass()->getProperty('client');\n $reflectionProperty->setAccessible(true);\n\n // asserts\n $this->assertSame($this->client, $reflectionProperty->getValue($node));\n }", "title": "" }, { "docid": "7a643d57503397f36ae99b2b24dcdc0b", "score": "0.47886345", "text": "public function setClientId($clientId) {\n \t$this->clientId = $clientId;\n }", "title": "" }, { "docid": "fa6d3cf816501f9fd9335f7cb5762321", "score": "0.47833297", "text": "public function countRoles(mixed $user, array $roles): int\n {\n $user = ! filter_var($user, FILTER_VALIDATE_INT) ? $user : $this->find($user);\n return $user->roles()->whereIn('name', $roles)->count();\n }", "title": "" }, { "docid": "8982bb75fd112db0eb398ce2b9efc5bf", "score": "0.47764075", "text": "function strl_user_roles() {\n\tadd_role(\n\t\t'strl-client',\n\t\t__( 'Website Owner', 'strl' ),\n\t\tarray(\n\t\t\t'switch_themes' => false,\n\t\t\t'edit_themes' => false,\n\t\t\t'edit_theme_options' => true,\n\t\t\t'install_themes' => false,\n\t\t\t'activate_plugins' => false,\n\t\t\t'edit_plugins' => false,\n\t\t\t'install_plugins' => false,\n\t\t\t'edit_users' => true,\n\t\t\t'manage_options' => false,\n\t\t\t'moderate_comments' => false,\n\t\t\t'manage_categories' => true,\n\t\t\t'manage_links' => false,\n\t\t\t'upload_files' => true,\n\t\t\t'import' => false,\n\t\t\t'unfiltered_html' => false,\n\t\t\t'edit_posts' => true,\n\t\t\t'edit_others_posts' => true,\n\t\t\t'edit_published_posts' => true,\n\t\t\t'publish_posts' => true,\n\t\t\t'edit_pages' => true,\n\t\t\t'read' => true,\n\t\t\t'publish_pages' => true,\n\t\t\t'edit_others_pages' => true,\n\t\t\t'edit_published_pages' => true,\n\t\t\t'delete_pages' => true,\n\t\t\t'delete_others_pages' => true,\n\t\t\t'delete_published_pages' => true,\n\t\t\t'delete_posts' => true,\n\t\t\t'delete_others_posts' => true,\n\t\t\t'delete_published_posts' => true,\n\t\t\t'delete_private_posts' => true,\n\t\t\t'edit_private_posts' => true,\n\t\t\t'read_private_posts' => true,\n\t\t\t'delete_private_pages' => true,\n\t\t\t'edit_private_pages' => true,\n\t\t\t'read_private_pages' => true,\n\t\t\t'delete_users' => true,\n\t\t\t'create_users' => true,\n\t\t\t'unfiltered_upload' => false,\n\t\t\t'edit_dashboard' => false,\n\t\t\t'customize' => false,\n\t\t\t'delete_site' => false,\n\t\t\t'update_plugins' => false,\n\t\t\t'delete_plugins' => false,\n\t\t\t'update_themes' => false,\n\t\t\t'update_core' => false,\n\t\t\t'list_users' => true,\n\t\t\t'remove_users' => false,\n\t\t\t'add_users' => false,\n\t\t\t'promote_users' => false,\n\t\t\t'delete_themes' => false,\n\t\t\t'export' => false,\n\t\t\t'edit_comment' => false,\n\t\t\t'create_sites' => false,\n\t\t\t'delete_sites' => false,\n\t\t\t'manage_network' => false,\n\t\t\t'manage_sites' => true,\n\t\t\t'manage_network_users' => false,\n\t\t\t'manage_network_themes' => false,\n\t\t\t'manage_network_options' => false,\n\t\t\t'manage_network_plugins' => false,\n\t\t\t'upload_plugins' => false,\n\t\t\t'upload_themes' => false,\n\t\t\t'upgrade_network' => false,\n\t\t\t'setup_network' => false,\n\t\t)\n\t);\n}", "title": "" }, { "docid": "2567590694c787631943cf964413f82a", "score": "0.4774613", "text": "public function set_role_data() {}", "title": "" }, { "docid": "c43796586105cbd939d1d1ab0a43cc03", "score": "0.47737685", "text": "private function setup_custom_roles() {\n\t\tif ( is_array( $this->custom_roles ) ) {\n\t\t\tforeach ( $this->custom_roles as $role => $detail ) {\n\t\t\t\t$capabilities = $this->generate_role_capabilities( $detail['capabilities'] );\n\n\t\t\t\twpcom_vip_add_role( $role, $detail['name'], $capabilities );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "27bd70dd2d1d3821aa8535c74b784c31", "score": "0.47725257", "text": "public function assignRole(...$roles)\n {\n $roles = Roles::find()->where(['in', 'name', $roles])->all();\n if ($roles) {\n $modelId = $this->id;\n foreach ($roles as $role) {\n $modelHasRoles = (ModelHasRoles::find()->where(['model_id' => $modelId])->one() ?? new ModelHasRoles);\n $modelHasRoles->role_id = $role->id;\n $modelHasRoles->model_type = get_class($this);\n $modelHasRoles->model_id = $modelId;\n if (!$modelHasRoles->save()) {\n throw new \\app\\exceptions\\HttpSaveException($modelHasRoles);\n }\n }\n } else {\n throw new \\yii\\web\\HttpException(400, \"Los roles a asignar no existen! \");\n }\n \n return $this;\n }", "title": "" }, { "docid": "9421fce0ba9073921b5a6656c1cf8e06", "score": "0.47698933", "text": "public function assign_client_properties(Request_Client $client)\n\t{\n\t\t$client->cache($this->cache());\n\t\t$client->follow($this->follow());\n\t\t$client->follow_headers($this->follow_headers());\n\t\t$client->header_callbacks($this->header_callbacks());\n\t\t$client->max_callback_depth($this->max_callback_depth());\n\t\t$client->callback_params($this->callback_params());\n\t}", "title": "" } ]
fddf4bae7ae411483e2bc6e4debce07d
Transform the resource into an array.
[ { "docid": "db4cff6a4dbf4a3fe85c5a9bd02853c2", "score": "0.0", "text": "public function toArray($request)\n {\n return [\n\n 'title' => Str::limit($this->data['title'], 40),\n 'message' => Str::limit($this->data['message'], 100),\n 'created_at' => $this->created_at->format('d/m/Y'),\n 'read_at' => $this->read_at ? 1 : 0,\n 'sourceable_type' => $this->data['sourceable_type'],\n ];\n }", "title": "" } ]
[ { "docid": "abb04d3f80256573238151dabae942d1", "score": "0.76768947", "text": "public function toArray() {\n $a = array();\n if( $this->resource ) {\n $a[\"resource\"] = $this->resource;\n }\n return $a;\n }", "title": "" }, { "docid": "01478872ff551cd261d1f2ab0261b55e", "score": "0.7628821", "text": "public function resourceToArray()\n {\n if (!empty($this->data)) {\n return $this->getWriterDriver()->resourceToArray();\n }\n }", "title": "" }, { "docid": "59931585c009e85b0ccd0a70ae01975e", "score": "0.74888384", "text": "public function toArray() {\n $a = parent::toArray();\n if( $this->resource ) {\n $a[\"resource\"] = $this->resource;\n }\n return $a;\n }", "title": "" }, { "docid": "45fe1c0e6a5c43bc5f44575ca798986b", "score": "0.7394696", "text": "public function toArray() {\n $a = array();\n if( $this->resourceId ) {\n $a[\"resourceId\"] = $this->resourceId;\n }\n if( $this->resource ) {\n $a[\"resource\"] = $this->resource;\n }\n return $a;\n }", "title": "" }, { "docid": "73859107f3d793e942f6d451dfad781f", "score": "0.73854", "text": "public function toArray()\n {\n return $this->resource->toArray();\n }", "title": "" }, { "docid": "d33cbd95f9a8db51c7549e83e71b7a16", "score": "0.7158139", "text": "public function transform($resource)\n {\n return [\n 'id' => (int) $resource['id'],\n 'category_id' => (int) $resource['category_id'],\n 'name' => $resource['name'],\n 'description' => $resource['description'],\n 'price' => (double) $resource['price'],\n 'display_price' => format_currency($resource['price']),\n 'image' => $resource['image'],\n 'status' => (int) $resource['status']\n ];\n }", "title": "" }, { "docid": "6625a942bc6da2ce601d8491be6a010e", "score": "0.70733047", "text": "public function toArray(): ?array\n {\n if (!isset($this->array)) {\n return null;\n }\n\n return $this->map(\n /**\n * @param ResourceObjectFactory|ResourceIdentifierFactory $resource\n *\n * @return array|null\n */\n function ($resource) {\n return $resource->toArray();\n }\n );\n }", "title": "" }, { "docid": "1bec63b61e26555d32d80a87ec54c55b", "score": "0.70493937", "text": "public function __toArray()\r\n {\r\n return array(\r\n 'resource' => $this->resource,\r\n 'permissions' => $this->permissions\r\n );\r\n }", "title": "" }, { "docid": "b5a568dfc5244b98a94395e5df0511d6", "score": "0.7045872", "text": "public function to_array() {\n\t\t$resource = get_object_vars( $this );\n\n\t\tforeach ( array( 'id', 'title', 'description', 'shortcode', 'img_url', 'cta', 'date' ) as $key ) {\n\t\t\t$resource[ $key ] = $this->__get( $key );\n\t\t}\n\n\t\treturn $resource;\n\t}", "title": "" }, { "docid": "6a49635eadcc89df81bde3cc75fdc035", "score": "0.7023718", "text": "public function toArray() {\n $a = array();\n if( $this->survivorResource ) {\n $a[\"survivorResource\"] = $this->survivorResource->toArray();\n }\n if( $this->duplicateResource ) {\n $a[\"duplicateResource\"] = $this->duplicateResource->toArray();\n }\n return $a;\n }", "title": "" }, { "docid": "08dac2256517d89f2beb8242a0ddee4c", "score": "0.69516", "text": "public function toArray($request)\n {\n return $this->resource->toArray(); \n }", "title": "" }, { "docid": "f3c27a7ea6a25b21e1640c88d5adede3", "score": "0.6950997", "text": "public function toArray() { }", "title": "" }, { "docid": "7ef21e4b8c79b57bf427089e4284c9b3", "score": "0.690282", "text": "protected function resourceArray($resource, $model)\n {\n return (new $resource($model))->toArray(request());\n }", "title": "" }, { "docid": "b0b3958da4592784a0b7f35f730b2f63", "score": "0.6891905", "text": "public function toArray() {\n $a = parent::toArray();\n if( $this->resourceId ) {\n $a[\"resourceId\"] = $this->resourceId;\n }\n if( $this->resource ) {\n $a[\"resource\"] = $this->resource;\n }\n if( $this->attribution ) {\n $a[\"attribution\"] = $this->attribution->toArray();\n }\n return $a;\n }", "title": "" }, { "docid": "f7cd1e81b86fc1eb38e46afcb06e4bed", "score": "0.68831193", "text": "abstract public function getAsArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.6852651", "text": "public function toArray();", "title": "" }, { "docid": "11e12ed7f2605e6fa500c29c031d19e0", "score": "0.683587", "text": "public abstract function toArray();", "title": "" }, { "docid": "007009a256b8811ae7e6e77201ba8f06", "score": "0.6826952", "text": "public function transform($resource)\n {\n return [\n\n 'id' => $resource->id,\n 'name' => $resource->name,\n 'description' => $resource->description,\n 'sort' => $resource->sort,\n 'status' => $resource->status,\n 'created_at' => (string)$resource->created_at,\n 'updated_at' => (string)$resource->updated_at,\n 'categories' => $resource->categories,\n\n ];\n }", "title": "" }, { "docid": "db1aafbeb74f0afeb9de35e1b5db45ed", "score": "0.6813926", "text": "public abstract function as_array();", "title": "" }, { "docid": "fa6f287eae47dc462b04b845ecf893ed", "score": "0.6799368", "text": "public function toArrayApi(): array;", "title": "" }, { "docid": "7efad91c2502fd48ffca26587565fdd6", "score": "0.6782203", "text": "public function convert(): array;", "title": "" }, { "docid": "ff2dfbd680415cd97f04fffd9a94e02b", "score": "0.6731324", "text": "public function toArray()\n {\n $a = array();\n if ($this->resourcesToDelete) {\n $ab = array();\n foreach ($this->resourcesToDelete as $i => $x) {\n $ab[$i] = $x->toArray();\n }\n $a['resourcesToDelete'] = $ab;\n }\n if ($this->resourcesToCopy) {\n $ab = array();\n foreach ($this->resourcesToCopy as $i => $x) {\n $ab[$i] = $x->toArray();\n }\n $a['resourcesToCopy'] = $ab;\n }\n return $a;\n }", "title": "" }, { "docid": "f2a9ea38b2041450bfe04b738c90c037", "score": "0.67253405", "text": "public function toArray()\n {\n }", "title": "" }, { "docid": "f2a9ea38b2041450bfe04b738c90c037", "score": "0.67253405", "text": "public function toArray()\n {\n }", "title": "" }, { "docid": "f2a9ea38b2041450bfe04b738c90c037", "score": "0.67253405", "text": "public function toArray()\n {\n }", "title": "" }, { "docid": "afeddd7275f3369e2b5a48d1fb3cbf95", "score": "0.6665385", "text": "public function toArray() {\n $a = array();\n if( $this->resourcesToDelete ) {\n $ab = array();\n foreach( $this->resourcesToDelete as $i => $x ) {\n $ab[$i] = $x->toArray();\n }\n $a['resourcesToDelete'] = $ab;\n }\n if( $this->resourcesToCopy ) {\n $ab = array();\n foreach( $this->resourcesToCopy as $i => $x ) {\n $ab[$i] = $x->toArray();\n }\n $a['resourcesToCopy'] = $ab;\n }\n return $a;\n }", "title": "" }, { "docid": "edd78c252e6527cebbbc55e6ecdabc41", "score": "0.665781", "text": "abstract protected function _toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6648871", "text": "abstract public function toArray();", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6629", "text": "public function toArray(): array;", "title": "" } ]
734fed4cae7f70348188fad7dc0a5f50
Sets up this unit test.
[ { "docid": "113897499fe7025ff2bb368ac47b64d8", "score": "0.0", "text": "protected function useOfOperators()\n {\n if (self::$phpcs === null) { // operateurs de comparaison doivent etre \n\t\t\t//... entoures d'un espace de chaque cote\n self::$phpcs = new PHP_CodeSniffer();\n }\n\t\t\n\t\t$a = array();\n\t\tif (count($a) ) { // )] doubles doivent etre separes par au moins un espace\n\t\t\t\n\t\t}\n\t\t\n\n }", "title": "" } ]
[ { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253266", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253266", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253266", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253266", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253266", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253266", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253266", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253266", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253266", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253266", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253266", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253266", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253266", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253266", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253266", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8253217", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.82531434", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.82531434", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.82531434", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.82531434", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.82531434", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.82531434", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8252891", "text": "protected function setUp() {}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "2999c620de9ab0bc8ede411ed5cac9b6", "score": "0.0", "text": "public function destroy($id)\n {\n\t\tDB::beginTransaction();\n\t\ttry {\n\t\t\t$estimate = Estimate::find($id);\n\t\t\tforeach ($estimate->estimate_details as $detail) {\n\t\t\t\t$detail->delete();\n\t\t\t}\n\t\t\t$estimate->delete();\n\t\t} catch (Exception $e) {\n\t\t\tDB::rollback();\n\t\t\treturn back()->withInput();\n\t\t}\n\t\tDB::commit();\n\n\t\treturn redirect()\n\t\t\t\t->route('estimates.index')\n\t\t\t\t->with('message', '削除しました');\n }", "title": "" } ]
[ { "docid": "4b8255c05a264d5d61f546d7bcd507ce", "score": "0.6672584", "text": "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "4c5eebff0d9ed2cb7fdb134bb4660b64", "score": "0.6635911", "text": "public function removeResource($resourceID)\n\t\t{\n\t\t}", "title": "" }, { "docid": "9128270ecb10fe081d7b27ed99999426", "score": "0.6632799", "text": "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "title": "" }, { "docid": "ca4c6cd0f72c6610d38f362f323ea885", "score": "0.6626075", "text": "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "title": "" }, { "docid": "22e99170ed44ab8bba05c4fea1103beb", "score": "0.65424126", "text": "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "title": "" }, { "docid": "08c524d5ed1004452df540e76fe51936", "score": "0.65416265", "text": "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "title": "" }, { "docid": "e615a714c70c0f1f81aa89e434fd9645", "score": "0.64648265", "text": "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "title": "" }, { "docid": "9699357cc7043ddf9be8cb5c6e2c5e9c", "score": "0.62882507", "text": "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "title": "" }, { "docid": "c14943151fb5ef8810fedb80b835112e", "score": "0.6175931", "text": "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "title": "" }, { "docid": "507601379884bfdf95ac02c4b7d340a0", "score": "0.6129922", "text": "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "title": "" }, { "docid": "60da5cdaab3c2b4a3de543383ff7326a", "score": "0.60893893", "text": "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "title": "" }, { "docid": "ccaddaf8c48305cf51ff4f4e87f7f513", "score": "0.6054415", "text": "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "title": "" }, { "docid": "b96521ac0a45d4af2abd98a169f470e6", "score": "0.60428125", "text": "public function delete(): void\n {\n unlink($this->getPath());\n }", "title": "" }, { "docid": "5bb36f163668a235aa80821b0746c2bc", "score": "0.60064924", "text": "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "b549ee1a3239f6720bb4eae802ea1753", "score": "0.5930772", "text": "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "title": "" }, { "docid": "02436278b72d788803fbd1efa4067eef", "score": "0.59199584", "text": "public function delete(): void\n {\n unlink($this->path);\n }", "title": "" }, { "docid": "67c2e1a96c6af4251ec2fe2211864e9b", "score": "0.5919811", "text": "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "title": "" }, { "docid": "e37d38c43b6eab9f0b20965c7e9b2769", "score": "0.5904504", "text": "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.5897263", "text": "public function remove() {}", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.58962846", "text": "public function remove() {}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "140b6c44eef77c79cbd9edc171fe8e75", "score": "0.5880124", "text": "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "title": "" }, { "docid": "72dc5bfa6ca53ddd2451fc0e14e6fcfe", "score": "0.58690923", "text": "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "b0b6f080ff9e00a37e1e141de8af472d", "score": "0.5863659", "text": "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "title": "" }, { "docid": "c6821270bce7c29555a3d0ca63e8ff36", "score": "0.5809161", "text": "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "title": "" }, { "docid": "3053bc6cd29bad167b4fd69fe4e79d55", "score": "0.57735413", "text": "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "title": "" }, { "docid": "81bac0e5ac8e3c967ba616afac4bfb1c", "score": "0.5760811", "text": "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "title": "" }, { "docid": "385e69d603b938952baeb3edc255a4ea", "score": "0.5753559", "text": "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "title": "" }, { "docid": "750ee1857a66f841616cd130d5793980", "score": "0.57492644", "text": "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "title": "" }, { "docid": "7e6820819c67c0462053b11f5a065b9f", "score": "0.5741712", "text": "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "title": "" }, { "docid": "aa404011d4a23ac3716d0c9c1360bd20", "score": "0.57334286", "text": "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "title": "" }, { "docid": "9a5dfeb522e8b8883397ebfbc0e9d95b", "score": "0.5726379", "text": "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "title": "" }, { "docid": "883f70738d6a177cbdf3fcaec9e9c05f", "score": "0.57144034", "text": "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "title": "" }, { "docid": "2d462647e81e7beec7f81e7f8d6c6d44", "score": "0.57096", "text": "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "title": "" }, { "docid": "a165b9f8668bef9b0f1825244b82905e", "score": "0.5707689", "text": "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "title": "" }, { "docid": "4a66b1c57cede253966e4300db4bab11", "score": "0.5705895", "text": "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "title": "" }, { "docid": "2709149ed9daaf760627fbe4d2405e47", "score": "0.5705634", "text": "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "title": "" }, { "docid": "67396329aa493149cb669199ea7c214f", "score": "0.5703902", "text": "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "title": "" }, { "docid": "e41dcd69306378f20a25f414352d6e6b", "score": "0.5696585", "text": "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "b2dc8d50c7715951df467e962657a927", "score": "0.56780374", "text": "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "title": "" }, { "docid": "88290b89858a6178671f929ae0a7ccba", "score": "0.5677111", "text": "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "title": "" }, { "docid": "2a4e3a8a8005ff16e99e418fc0fb7070", "score": "0.5657287", "text": "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "title": "" }, { "docid": "8b94ff007c35fa2c7485cebe32b8de85", "score": "0.5648262", "text": "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "title": "" }, { "docid": "2752e2223b3497665cc8082d9af5a967", "score": "0.5648085", "text": "public function delete($path, $data = null);", "title": "" }, { "docid": "8cf7657c92ed341a5a4e1ac7b314cf43", "score": "0.5648012", "text": "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "title": "" }, { "docid": "6d5e88f00765b5e87a96f6b729e85e80", "score": "0.5640759", "text": "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "title": "" }, { "docid": "8d2b25e8c52af6b6f9ca5eaf78a8f1f3", "score": "0.5637738", "text": "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "title": "" }, { "docid": "f51aa1f231aecb530fa194d38c843872", "score": "0.5629985", "text": "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "title": "" }, { "docid": "55778fabf13f94f1768b4b22168b7424", "score": "0.5619264", "text": "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "title": "" }, { "docid": "9ab5356a10775bffcb2687c49ca9608f", "score": "0.56167465", "text": "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "title": "" }, { "docid": "899b20990ab10c8aa392aa33a563602b", "score": "0.5606877", "text": "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "title": "" }, { "docid": "29d3e4879d0ed5074f12cb963276b7cc", "score": "0.56021434", "text": "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "title": "" }, { "docid": "4a4701a0636ba48a45c66b76683ed3b3", "score": "0.5601949", "text": "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "title": "" }, { "docid": "342b5fc16c6f42ac6826e9c554c81f4d", "score": "0.55992156", "text": "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "title": "" }, { "docid": "97e50e61326801fa4efc3704e9dd77c1", "score": "0.5598557", "text": "public function revoke($resource, $permission = null);", "title": "" }, { "docid": "735f27199050122f4622faba767b3c80", "score": "0.55897516", "text": "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "title": "" }, { "docid": "0bf714a7cb850337696ea9631fca5494", "score": "0.5581397", "text": "function delete($path);", "title": "" }, { "docid": "975326d3c6d5786788886f6742b11b44", "score": "0.5566926", "text": "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "title": "" }, { "docid": "ea73af051ca124bba926c5047e1f799b", "score": "0.5566796", "text": "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "title": "" }, { "docid": "a85f6f9231c5a5b648efc0e34b009554", "score": "0.55642897", "text": "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "title": "" }, { "docid": "9ef8b8850e1424f439f75a07b411de21", "score": "0.55641", "text": "public function remove($filePath){\n return Storage::delete($filePath);\n }", "title": "" }, { "docid": "a108cd06e3f66bf982b8aa3cd146a4e9", "score": "0.5556583", "text": "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "title": "" }, { "docid": "7fbd1a887ad4dca00687bb4abce1ae49", "score": "0.5556536", "text": "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "fa18511086fe5d1183bd074bfc10c6a2", "score": "0.5550097", "text": "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "title": "" }, { "docid": "69bff5e9e4c411daf3e7807a7dd11559", "score": "0.5543172", "text": "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "title": "" }, { "docid": "94cb51fff63ea161e1d8f04215cfe7bf", "score": "0.55422723", "text": "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "0005f2e6964d036d888b5343fa80a1b1", "score": "0.55371785", "text": "public function deleted(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "986e2f38969cc302a2f6f8374b767ca1", "score": "0.55365825", "text": "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "title": "" }, { "docid": "56658901e8b708769aa07c96dfbe3f61", "score": "0.55300397", "text": "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "title": "" }, { "docid": "2d63e538f10f999d0646bf28c44a70bf", "score": "0.552969", "text": "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "title": "" }, { "docid": "b36cf6614522a902b216519e3592c3ba", "score": "0.55275744", "text": "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "title": "" }, { "docid": "49dd28666d254d67648df959a9c54f52", "score": "0.55272335", "text": "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "16f630321e1871473166276f54219ee3", "score": "0.5525997", "text": "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "title": "" }, { "docid": "f79bb84fccbc8510950d481223fa2893", "score": "0.5525624", "text": "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "title": "" }, { "docid": "dc750acc8639c8e37ae9a3994fa36c91", "score": "0.5523911", "text": "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "title": "" }, { "docid": "a298a1d973f91be0033ae123818041d0", "score": "0.5521122", "text": "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "title": "" }, { "docid": "909ecc5c540b861c88233aaecf4bde3b", "score": "0.5517412", "text": "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }", "title": "" } ]
1c0f9227f717f98db4a3dd0d478a9ab1
Adds head javascript code to document before script file includes.
[ { "docid": "4bd384616f7eb3fb2adb7060f55a347b", "score": "0.0", "text": "public function addScriptDeclarationBeforeIncludes( $script, $type = \"text/javascript\", $priority = null )\n {\n $type = trim(mb_strtolower($type));\n\n $scriptHash = crc32($script);\n\n if ( in_array($scriptHash, $this->javaScriptDeclarations) )\n {\n return $this;\n }\n\n $priority = ($priority === null) ? 1000 : (int) $priority;\n\n $this->preIncludeJavaScriptDeclarations[$priority][$type][] = $script;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "748bff47d39c18ed4c8542935f0d38fc", "score": "0.7716077", "text": "function head_script() {\n\t\t\tif (isset($this->content['script'])) {\n\t\t\t\tforeach ($this->content['script'] as $scriptline) {\n\t\t\t\t\tif( strpos($scriptline, 'jquery') === false ) {\n\t\t\t\t\t\t$this->output_raw($scriptline);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$scriptline = str_replace('</', '<\\/', $scriptline);\n\t\t\t\t\t\t$this->output_raw('<script src=\"https://code.jquery.com/jquery-latest.min.js\" type=\"text/javascript\"></script> <script type=\"text/javascript\">window.jQuery || document.write(\\''.$scriptline.'\\')</script>'); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7939c74bf57b25c41b69fe0f26e956f0", "score": "0.735844", "text": "function page_scripts_add_head() {\r\n\t\t\t $post_id = get_the_id();\r\n\t\t\t $page_scripts = get_post_meta( $post_id, 'page_scripts', true );\r\n\t\t\t if ( ! $page_scripts ) { return; }\r\n\t\t\t if ( isset( $page_scripts['page_head'] ) && '' !== $page_scripts['page_head'] ) {\r\n\t\t\t echo wp_unslash( $page_scripts['page_head'] );\r\n\t\t\t }\r\n\t\t\t if ( isset( $page_scripts['js'] ) && '' !== $page_scripts['js'] ) {\r\n\t\t\t echo '<script>' . wp_unslash( $page_scripts['js'] ) . '</script>';\r\n\t\t\t }\r\n\t\t\t if ( isset( $page_scripts['css'] ) && '' !== $page_scripts['css'] ) {\r\n\t\t\t echo '<style>' . wp_unslash( $page_scripts['css'] ) . '</style>';\r\n\t\t\t }\r\n\t\t\t}", "title": "" }, { "docid": "87e6cd54ccb4513f59afdc574556f240", "score": "0.73323506", "text": "public function headScripts()\n {\n if (!empty($this->stylesheets)) {\n foreach ($this->stylesheets as $style) {\n $this->view->headLink()->appendStylesheet($this->view->basePath() . $style);\n }\n }\n if (!empty($this->stylesheets)) {\n foreach ($this->scripts as $scripts) {\n $this->view->headScript()->appendFile($this->view->basePath() . $scripts);\n }\n }\n }", "title": "" }, { "docid": "de478d8a96ba80c3625d905baf20eb64", "score": "0.728024", "text": "private function appendJavascriptFiles( AbstractXhtml &$head ) {\n foreach ( $this->javascriptFiles as $javascriptFile ) {\n // Create Script element\r\n $script = Xhtml::script();\n \n $script->src( $javascriptFile );\n \n $script->type( ScriptXhtml::$TYPE_JAVASCRIPT );\n \n // Add Script to Head\r\n $head->addContent( $script );\n }\n }", "title": "" }, { "docid": "9dc2453b22c568560208b824e6ac5c15", "score": "0.7162437", "text": "public function head() {\n\t\t$this->headScript();\n\t\t$this->headCSS();\n\t}", "title": "" }, { "docid": "757b05a9d6689419ff3c5fab86ad02f9", "score": "0.7145191", "text": "private function appendJavascriptCodes( AbstractXhtml &$head ) {\n \n // Create Script element\r\n $script = Xhtml::script();\n $script->type( ScriptXhtml::$TYPE_JAVASCRIPT );\n \n foreach ( $this->javascriptCodes as $javascriptCode ) {\n $script->addContent( sprintf( \"%s\\n\", $javascriptCode ) );\n }\n \n // Add Script to Head\r\n $head->addContent( $script );\n \n }", "title": "" }, { "docid": "93cb9d38b9ec18597522f39800ccc4ab", "score": "0.706109", "text": "public static function head() {\n\t\techo '<script type=\"text/javascript\">document.documentElement.className += \" js\";</script>' . \"\\r\\n\";\n\t}", "title": "" }, { "docid": "8a9c8ade7a38a3fd810e0aade13ccda9", "score": "0.7012777", "text": "public function appendHeadScript( $script ) {\r\n if( is_array( $script ) ) {\r\n foreach( $script as $value ) {\r\n $this->headScript[$value] = \"'\".$value.\"'\";\r\n }\r\n } else {\r\n $this->headScript[$script] = \"'\".$script.\"'\";\r\n }\r\n $this->view->autoHeadScripts = $this->headScript;\r\n }", "title": "" }, { "docid": "1b6786cda4b0e8f235ed9777d104ac29", "score": "0.69821095", "text": "public static function head_output() {\n\t\t// custom JS from the customizer\n\t\t$script = get_theme_mod( 'custom_js_head', '' );\n\n\t\tif ( ! empty( $script ) ) {\n\t\t\techo PHP_EOL . $script . PHP_EOL;\n\t\t}\n\n\t}", "title": "" }, { "docid": "10633abe5c93884b204b5b4e1be6f8a7", "score": "0.68382347", "text": "public function renderHeadScript()\n\t{\n\t\treturn $this->renderScript($this->getOption('head_script', array()));\n\t}", "title": "" }, { "docid": "fcac7f8aed67eb1295b351551b694677", "score": "0.68109185", "text": "public function head() {\r\n\t\t\t$head = $this->tag->head;\r\n\r\n\t\t\t# Page title.\r\n\t\t\t$head->append(\r\n\t\t\t\t$this->tag->title(\r\n\t\t\t\t\t(\r\n\t\t\t\t\t$this->show['title']\r\n\t\t\t\t\t\t?\\PHY\\Registry::get('config/site/name').\r\n\t\t\t\t\t\t(\r\n\t\t\t\t\t\t$this->title\r\n\t\t\t\t\t\t\t?' - '\r\n\t\t\t\t\t\t\t:NULL\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t\t:NULL\r\n\t\t\t\t\t).\r\n\t\t\t\t\t$this->title\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\t# Shebang handler. Urls that might have been index via Google as #!/page\r\n\t\t\tif(isset($_GET['_escaped_fragment_'])) $head->append(\r\n\t\t\t\t\t$this->tag->noscript(\r\n\t\t\t\t\t\t$this->tag->meta(\r\n\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t'http-equiv' => 'refresh',\r\n\t\t\t\t\t\t\t\t'content' => '0; URL='.$_GET['_escaped_fragment_']\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\r\n\t\t\t# Add meta tags.\r\n\t\t\t$meta = $this->_meta();\r\n\t\t\t$this->meta['name_keywords']['content'] = join(', ',Registry::get('config/site/keywords')).($meta\r\n\t\t\t\t\t?', '.$meta\r\n\t\t\t\t\t:NULL).', '.join(', ',$this->meta['name_keywords']['content']);\r\n\t\t\tforeach($this->meta as $meta):\r\n\t\t\t\t$tag = $this->tag->meta;\r\n\t\t\t\t$tag->attributes($meta);\r\n\t\t\t\t$head->append($tag);\r\n\t\t\tendforeach;\r\n\t\t\t$head->append($this->_files());\r\n\t\t\t$this->script(\r\n\t\t\t\t'if(window.location.hash.toString().match(\\'!\\')){var url=window.location.hash.toString().split(\\'!\\');window.location=url[1];}'.\r\n\t\t\t\t'if(typeof $===\\'undefined\\')var $={};$.user={xsrf:\\''.Cookie::get('xsrf_id').'\\'};'\r\n\t\t\t);\r\n\t\t\tforeach($this->scripts as $script) $head->append($script);\r\n\r\n\t\t\treturn $head;\r\n\t\t}", "title": "" }, { "docid": "f7ca0a47668062eeaf1c8ef120b16264", "score": "0.67933494", "text": "public function onBeforeCompileHead()\n\t{\n\t\tif ( $this->params->get('disablejs') || $this->params->get('disablecss') )\n\t\t{\n\t\t\t$app = JFactory::getApplication();\n\t\t\tif ($app->isSite())\n\t\t\t{\n\t\t\t\t$doc=JFactory::getDocument();\n\t\t\t\t$headdata = $doc->getHeadData();\n\t\t\t\tif ( $this->params->get('disablejs') )\n\t\t\t\t{\n\t\t\t\t\t$fnjs=$this->params->get('fnjs');\n\t\t\t\t\tif (trim($fnjs) != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$filesjs=explode(',', $fnjs);\n\t\t\t\t\t\t$head = (array) $headdata['scripts'];\n\t\t\t\t\t\t$newhead = array();\t\t\t\t\t\n\t\t\t\t\t\tforeach($head as $key => $elm)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$add = true;\n\t\t\t\t\t\t\tforeach ($filesjs as $dis)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (strpos($key,$dis) !== false)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$add=false;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($add) $newhead[$key] = $elm;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$headdata['scripts'] = $newhead;\n\t\t\t\t\t}\t\n\t\t\t\t} \n\n\t\t\t\tif ( $this->params->get('disablecss') )\n\t\t\t\t{\n\t\t\t\t\t$fncss=$this->params->get('fncss');\n\t\t\t\t\tif (trim($fncss) != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$filescss=explode(',', $fncss);\n\t\t\t\t\t\t$head = (array) $headdata['styleSheets'];\n\t\t\t\t\t\t$newhead = array();\t\t\t\t\t\n\t\t\t\t\t\tforeach($head as $key => $elm)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$add = true;\n\t\t\t\t\t\t\tforeach ($filescss as $dis)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (strpos($key,$dis) !== false)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$add=false;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($add) $newhead[$key] = $elm;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$headdata['styleSheets'] = $newhead;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t$doc->setHeadData($headdata); \n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6c44cad34490017d5240a1936bead12a", "score": "0.67726636", "text": "public function head_scripts() {\n\t?>\n\n\t\t<script type=\"text/javascript\">\n\t\t\t/* <![CDATA[ */\n\t\t\tvar ajaxurl = '<?php echo bp_core_ajax_url(); ?>';\n\t\t\t/* ]]> */\n\t\t</script>\n\n\t<?php\n\t}", "title": "" }, { "docid": "1e971690b2ef5de86805af3aa4a9c43a", "score": "0.67712516", "text": "function html_head_begin() {\n\techo '<head>', \"\\n\";\n}", "title": "" }, { "docid": "ff00b0b13e769fe0ba210e716e7c1048", "score": "0.67512923", "text": "function portfolino_html_head_alter(&$head_elements)\n\t{\n\t\t$head_elements['system_meta_content_type']['#attributes'] = array(\n\t\t 'http-equiv' => \"Content-Type\",\n\t\t 'content' => 'text/html; charset=utf-8'\n\t\t);\n\t\tdrupal_add_css('http://fonts.googleapis.com/css?family=Lato:300,400,700|Cookie',\n\t\t\t['type'=>'external']\n\t\t);\n\t\tdrupal_add_js(drupal_get_path('theme', 'portfolino') .\n\t\t '/scripts/jquery.carouFredSel-5.5.2.js',\n\t\t ['group'=>JS_LIBRARY]);\n\t\tdrupal_add_js(drupal_get_path('theme', 'portfolino') .\n\t\t '/scripts/jquery.easing.1.3.js',\n\t\t ['group'=>JS_LIBRARY]);\n\t\tdrupal_add_js(drupal_get_path('theme', 'portfolino') .\n\t\t '/scripts/scripts.js',\n\t\t ['group'=>JS_LIBRARY]);\n\t}", "title": "" }, { "docid": "dad89e549f495dc2676e205acb694ea5", "score": "0.6702798", "text": "function head_script() // add a Javascript file from plugin directory\r\n\t\t{\r\n\t\t\t$this->content['script'][]='<SCRIPT SRC=\"'.\r\n\t\t\t\tqa_html('./qa-content/mp-google-analytics.js').\r\n\t\t\t\t'\" TYPE=\"text/javascript\"></SCRIPT>';\r\n\t\t\t\t\r\n\t\t\tqa_html_theme_base::head_script();\r\n\t\t}", "title": "" }, { "docid": "da322de25a0591406de54706ca393648", "score": "0.66977644", "text": "private function _headScripts()\r\n\t{\r\n\t\t$scripts = '';\r\n\r\n\t\tforeach ($this->_scripts as $src) {\r\n\t\t\t$scripts .= '<script type=\"text/javascript\" src=\"'.$src.'\"></script>';\r\n\t\t}\r\n\r\n\t\treturn $scripts;\r\n\t}", "title": "" }, { "docid": "cbd2a4ec7054156dd3525baac835dee9", "score": "0.6604448", "text": "public function head(): void\n {\n $snippet = <<<HTML\n<!-- Google Tag Manager -->\n<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\nnew Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\nj=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n})(window,document,'script','%s','%s');</script>\n<!-- End Google Tag Manager -->\nHTML;\n\n $dataLayerVariable = data_layer_variable();\n $containerId = container_id();\n\n echo sprintf(\n $snippet,\n esc_js($dataLayerVariable),\n esc_js($containerId)\n ), \"\\n\";\n }", "title": "" }, { "docid": "c00a5947a7ad0d1aa9ae5bf8900c46dc", "score": "0.658446", "text": "function head() {\n include $this->dir.'/head.php';\n }", "title": "" }, { "docid": "f114b7f571b79b528acb66d1ec301bb9", "score": "0.6580677", "text": "function addScriptDeclaration($script)\n\t{\n\t\t$document =& JFactory::getDocument();\n\t\tif (FabrikHelperHTML::inAjaxLoadedPage()) {\n\t\t\t$script = \"(function() {\".$script.\"}).delay(2000);\";\n\t\t}\n\t\tif (FabrikHelperHTML::inAjaxLoadedPage()) {\n\t\t\techo \"<script type='text/javascript'>$script</script>\\n\";\n\n\t\t} else {\n\t\t\t$script = \"/* <![CDATA[ */ \\n\" . $script . \"\\n /* ]]> */\";\n\t\t\t$document->addScriptDeclaration($script);\n\t\t}\n\t}", "title": "" }, { "docid": "ff457fd8aab6030c2c28c489ae13ccf4", "score": "0.6580568", "text": "public function onBeforeCompileHead()\n\t{\n\t\t// Only if debugging or language debug is enabled.\n\t\tif ((JDEBUG || $this->debugLang) && $this->isAuthorisedDisplayDebug() && $this->app->getDocument() instanceof HtmlDocument)\n\t\t{\n\t\t\t// Use our own jQuery and fontawesome instead of the debug bar shipped version\n\t\t\t$assetManager = $this->app->getDocument()->getWebAssetManager();\n\t\t\t$assetManager->registerAndUseStyle(\n\t\t\t\t'plg.system.debug',\n\t\t\t\t'plg_system_debug/debug.css',\n\t\t\t\t[],\n\t\t\t\t[],\n\t\t\t\t['fontawesome']\n\t\t\t);\n\t\t\t$assetManager->registerAndUseScript(\n\t\t\t\t'plg.system.debug',\n\t\t\t\t'plg_system_debug/debug.min.js',\n\t\t\t\t[],\n\t\t\t\t['defer' => true],\n\t\t\t\t['jquery']\n\t\t\t);\n\t\t}\n\n\t\t// Disable asset media version if needed.\n\t\tif (JDEBUG && (int) $this->params->get('refresh_assets', 1) === 0)\n\t\t{\n\t\t\t$this->app->getDocument()->setMediaVersion(null);\n\t\t}\n\t}", "title": "" }, { "docid": "ece171daafc0678252b74086a92ceb03", "score": "0.6562444", "text": "public function doPageHead() {\n if (isset($_GET['page']) && $_GET['page'] == $this->hook) {\n wp_enqueue_script('jquery');\n }\n }", "title": "" }, { "docid": "e20e1b43cd6ae0dbbc315c9048a167ee", "score": "0.65534467", "text": "public function init()\n {\n $this->view->headScript()->appendFile('http://tjs.sjs.sinajs.cn/open/api/js/wb.js');\n// $this->view->headScript()->appendFile('http://tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=2869497588');\n }", "title": "" }, { "docid": "e84951f65803c5501e589fefff391f8c", "score": "0.6535407", "text": "function chartjs_insert_head($flux){\n\n $flux .= \n \"<!--[if lte IE 8]><script src='\".find_in_path('js/excanvas.compiled.js').\"'></script><![endif]-->\\n\"\n . \"<script type='text/javascript' src='\".find_in_path('js/Chart.js').\"'></script>\"\n . \"<script type='text/javascript' src='\".find_in_path('js/chart_extra.js').\"'></script>\";\n \n return $flux;\n}", "title": "" }, { "docid": "a9a53f007b2f1af1477d53765c8ac32a", "score": "0.65310335", "text": "public function renderHead()\n {\n $html = '';\n\n foreach (self::$requiredAssets as $asset) {\n switch ($asset['type']) {\n case 'js':\n if (!empty($asset['src'])) {\n $html .= sprintf('<script type=\"text/javascript\" src=\"%s\"></script>', asset($asset['src']));\n }\n break;\n }\n }\n\n return $html;\n }", "title": "" }, { "docid": "9c804c0708f7539672858a86b50af82d", "score": "0.6517109", "text": "function print_head(){\r\n\r\n $this->_print( $this->head_css, 'style', 'BetterFramework Head Inline CSS' );\r\n $this->head_css = array();\r\n\r\n $this->_print( $this->head_js, 'script', 'BetterFramework Head Inline JS' );\r\n $this->head_js = array();\r\n\r\n $this->_print( $this->head_jquery_js, 'script', 'BetterFramework Head Inline jQuery Code', 'jQuery(function($){', '});' );\r\n $this->head_jquery_js = array();\r\n\r\n }", "title": "" }, { "docid": "f8951c276d9f4420a0b6690d3e5285db", "score": "0.6486223", "text": "private function addCustomJS(){\n $headBlock = $this -> getLayout() -> getBlock('head') ;\n $headBlock -> addJs('zination/zinebuilder/jquery-1.11.3.min.js');\n $headBlock -> addJs('zination/zinebuilder/jquery-ui.min.js') ;\n $headBlock -> addJs('zination/zinebuilder/zinebuilder.js') ;\n \n }", "title": "" }, { "docid": "277cd458578f7cd25ed5b072d8b15070", "score": "0.6479154", "text": "function print_head() {\n\n\t\t$this->_print( $this->head_css, 'style', __( 'BetterFramework Head Inline CSS', 'publisher' ) );\n\t\t$this->head_css = array();\n\n\t\t$this->_print( $this->head_js, 'script', __( 'BetterFramework Head Inline JS', 'publisher' ) );\n\t\t$this->head_js = array();\n\n\t\t$this->_print( $this->head_jquery_js, 'script', __( 'BetterFramework Head Inline jQuery Code', 'publisher' ), 'jQuery(function($){', '});' );\n\t\t$this->head_jquery_js = array();\n\n\t}", "title": "" }, { "docid": "ebca51ce7f3a7ab89eace774be7acd59", "score": "0.6417721", "text": "function add_js( $code = '', $to_top = false, $force = false ) {\r\n\r\n if ( $force ) {\r\n $this->force_print($code, 'script');\r\n return;\r\n }\r\n\r\n if ( $to_top ) {\r\n $this->head_js[] = $code;\r\n } else {\r\n $this->footer_js[] = $code;\r\n }\r\n }", "title": "" }, { "docid": "e76f49a7e8c85c21642da9fd922345ef", "score": "0.6409441", "text": "public function includeJS($script)\n {\n $this->getView()->headScript()->appendFile(\n $this->getView()->url(\n array(\n 'revision' => FaZend_Revision::get(),\n 'script' => $script\n ), \n 'fz__js', // route name, see routes.ini \n true,\n false\n )\n );\n }", "title": "" }, { "docid": "601322e7f8daaffc72d7b179a8081395", "score": "0.6403143", "text": "function addJavascriptCode($code)\n {\n $this->head_content[] = (object) array('type' => 'javascript', 'body' => $code);\n }", "title": "" }, { "docid": "8e0e4e919d4ecede13226cc2cd772f78", "score": "0.6389467", "text": "function makeHead() { ?>\n\t<head>\n\t\t<title>NerdLuv</title>\n\t\t\n\t\t<meta charset=\"utf-8\" />\n\t\t\n\t\t<link href=\"https://webster.cs.washington.edu/images/nerdluv/heart.gif\" type=\"image/gif\" rel=\"shortcut icon\" />\n\t\t<link href=\"https://webster.cs.washington.edu/css/nerdluv.css\" type=\"text/css\" rel=\"stylesheet\" />\n\t\t\n\t\t<script src=\"http://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js\" type=\"text/javascript\"></script>\n\t\t<script src=\"https://webster.cs.washington.edu/js/nerdluv/provided.js\" type=\"text/javascript\"></script>\n\t</head>\n<?php }", "title": "" }, { "docid": "ed2617a1206b39cede3ea2f024e89581", "score": "0.63839304", "text": "function _addHeadTag() {\r\r\n\t\tglobal $_CB_framework;\r\r\n\r\r\n\t\tstatic $added\t\t\t\t=\tarray( 1 => false, 2 => false );\r\r\n\r\r\n\t\tif ( ! $added[$this->calendarType] ) {\r\r\n\t\t\t$UElanguagePath\t\t\t=\t$_CB_framework->getCfg( 'absolute_path' ).'/components/com_comprofiler/plugin/language';\r\r\n\t\t\tif ( file_exists( $UElanguagePath.'/'.$_CB_framework->getCfg( 'lang' ).'/calendar-locals.js' ) ) {\r\r\n\t\t\t\t$calendarLangFile\t=\t'/components/com_comprofiler/plugin/language/'.$_CB_framework->getCfg( 'lang' ).'/calendar-locals.js';\r\r\n\t\t\t} else {\r\r\n\t\t\t\t$calendarLangFile\t=\t'/components/com_comprofiler/plugin/language/default_language/calendar-locals.js';\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\tif ( $this->calendarType == 1 ) {\r\r\n\t\t\t\t$_CB_framework->document->addHeadStyleSheet( selectTemplate( $this->ui ).'calendar.css', false, null, array( 'title' => 'win2k-cold-1' ) );\r\r\n\t\t\t\t$_CB_framework->document->addHeadScriptUrl( '/components/com_comprofiler/js/calendar.js', true );\r\r\n\t\t\t\t$_CB_framework->document->addHeadScriptUrl( $calendarLangFile, false, null, null, null, null, array( 'type' => 'text/javascript', 'charset' => 'utf-8' ) );\r\r\n\t\t\t\t$_CB_framework->document->addHeadScriptUrl( '/components/com_comprofiler/js/calendar-setup.js', true );\r\r\n\t\t\t} else {\r\r\n\t\t\t\t$_CB_framework->document->addHeadScriptUrl( $calendarLangFile, false, 'var cbTemplateDir=\"' . selectTemplate( $this->ui ) . '\"; Calendar = function () { };', null, null, null, array( 'type' => 'text/javascript', 'charset' => 'utf-8' ) );\r\r\n\t\t\t\t$_CB_framework->addJQueryPlugin( 'cb_calendarinput', '/components/com_comprofiler/js/calendardateinput.js' );\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t$added[$this->calendarType]\t\t=\ttrue;\r\r\n\t\t}\r\r\n\t}", "title": "" }, { "docid": "72d33260b6bef78f38944276b3a0bef0", "score": "0.63731956", "text": "function agrandirtexte_insert_head($flux) {\n $flux .= '\n <script src=\"'.produire_fond_statique('js/lancer_agrandir.js').'\" type=\"text/javascript\"></script>';\n\n return $flux;\n}", "title": "" }, { "docid": "f067ac99a0ad9189805bd85f63fb1776", "score": "0.6373153", "text": "function add_js( $code = '', $to_top = false, $force = false ) {\n\n\t\tif ( $force ) {\n\t\t\t$this->force_print( $code, 'script' );\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $to_top ) {\n\t\t\t$this->head_js[] = $code;\n\t\t} else {\n\t\t\t$this->footer_js[] = $code;\n\t\t}\n\t}", "title": "" }, { "docid": "6b889e8a68b6ff9600298ebfd7af0f01", "score": "0.6359751", "text": "function smfMergeHeadScripts( $scripts ) {\r\n\t// split head scripts with pattern '</script>', which will always be a script end mark\r\n\t$sc = preg_split( '/\\<\\s*\\/script\\s*\\>/i', $scripts );\r\n\t$newscript = ''; // new head script string\r\n\t$ls = array( ); // a keyword list to store js file strings\r\n\t// registered js frameworks, jquery, jqueryui, prototype, extjs, yui, ...\r\n\t$js_frameworks = array(\r\n\t\t'jquery' => false,\r\n\t\t'jqueryui' => false,\r\n\t\t'jqueryfancybox' => false,\r\n\t\t'prototype' => false,\r\n\t\t'yui' => false,\r\n\t\t'extjs' => false\r\n\t);\r\n\t\r\n\tglobal $scmgStyleVersion;\r\n\t$scmgStyleVersionQuoted = preg_quote($scmgStyleVersion);\r\n\tforeach ( $sc as $s ) {\r\n\t\t// test if current script piece is in common script src pattern, <script ... src=\"JS_FILE\" ... >\r\n\t\tif ( preg_match( '/\\<\\s*script\\b[^\\>]+\\bsrc\\s*=\\s*[\\'\"]([^\\'\"]*)[\\'\"][^\\>]*\\>/i', $s, $script, PREG_OFFSET_CAPTURE ) )\r\n\t\t{\r\n\t\t\t// append head string outside script patterns\r\n\t\t\t$newscript .= substr( $s, 0, $script[0][1] );\r\n\t\t\t// get file keyword (file name only)\r\n\t\t\t// e.g. 'extensions/EA/scripts/jquery.js', the keyword is 'jquery.js'\r\n\t\t\t$start = strrpos( $script[1][0], '/' );\r\n\t\t\t$key = substr( $script[1][0], ($start === false ? -1 : $start) + 1 );\r\n\t\t\t// judge common js frameworks with filename patterns\r\n\t\t\tif ( preg_match( '/^jquery(-[\\d]+(\\.[\\d]+)*)?(\\.min)?\\.js'.$scmgStyleVersionQuoted.'\\b/i', $key ) ) {\r\n\t\t\t\t// jquery, jquery.js / jquery-1.3.2.js / jquery-1.3.2.min.js / jquery.min.js\r\n\t\t\t\t$js_frameworks['jquery'] = true;\r\n\t\t\t} else if ( preg_match( '/\\bjquery-ui(-[\\d]+(\\.[\\d]+)*)?(\\.min)?\\.js'.$scmgStyleVersionQuoted.'\\b/i', $key ) ) {\r\n\t\t\t\t// jquery-ui.js / jquery-ui-1.7.2.js / jquery-ui-1.7.2.min.js\r\n\t\t\t\t$js_frameworks['jqueryui'] = true;\r\n\t\t\t} else if ( preg_match( '/\\bjquery.fancybox(-[\\d]+(\\.[\\d]+)*)?(\\.min)?\\.js'.$scmgStyleVersionQuoted.'\\b/i', $key ) ) {\r\n\t\t\t\t// jquery's fancybox plugin\r\n\t\t\t\tif( $js_frameworks['jquery'] ) {\r\n\t\t\t\t\t// jquery has to be included before\r\n\t\t\t\t\t$js_frameworks['jqueryfancybox'] = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// otherwise, just append js piece\r\n\t\t\t\t\t$newscript .= $s . '</script>';\r\n\t\t\t\t}\r\n\t\t\t} else if ( preg_match( '/\\bprototype(-[\\d]+(\\.[\\d]+)*)?(\\.min)?\\.js'.$scmgStyleVersionQuoted.'\\b/i', $key ) ) {\r\n\t\t\t\t// prototype, prototype.js / prototype-1.6.0.js / prototype-1.6.0.min.js\r\n\t\t\t\t$js_frameworks['prototype'] = true;\r\n\t\t\t} else if ( preg_match( '/\\bext-[^\\.]+\\.js'.$scmgStyleVersionQuoted.'\\b/i', $key ) ) {\r\n\t\t\t\t// extjs, ext-all.js / ext-base.js / ext-jquery-adapter.js / ...\r\n\t\t\t\t$js_frameworks['extjs'] = true;\r\n\t\t\t} else {\r\n\t\t\t\t// if the js keyword is first used, append to head script, otherwise, omit it\r\n\t\t\t\tif ( !isset( $ls[$key] ) ) {\r\n\t\t\t\t\t$newscript .= substr( $s, $script[0][1] ) . '</script>';\r\n\t\t\t\t\t$ls[$key] = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// just append js piece\r\n\t\t\t$newscript .= $s . '</script>';\r\n\t\t}\r\n\t}\r\n\t$newscript = substr( $newscript, 0, strlen( $newscript ) - strlen( '</script>' ) );\r\n\r\n\t// generate framework scripts\r\n\tglobal $wgJsMimeType, $smgSMPath;\r\n\t$frameworks = '';\r\n\tif ( $js_frameworks['jquery'] ) {\r\n\t\t// jquery with noConflict flag\r\n\t\t$frameworks .= \"<script type=\\\"{$wgJsMimeType}\\\" src=\\\"{$smgSMPath}/scripts/jquery-1.3.2.min.js$scmgStyleVersion\\\"></script>\\n\";\r\n\t\t$frameworks .= \"<script type=\\\"{$wgJsMimeType}\\\">jQuery.noConflict();jQuery.noConflict=function( deep ) {return jQuery;};</script>\\n\";\r\n\t}\r\n\tif ( $js_frameworks['jqueryui'] ) {\r\n\t\t// jquery ui\r\n\t\t$frameworks .= \"<script type=\\\"{$wgJsMimeType}\\\" src=\\\"{$smgSMPath}/scripts/jquery-ui-1.7.2.custom.min.js$scmgStyleVersion\\\"></script>\\n\";\r\n\t}\r\n\tif ( $js_frameworks['jqueryfancybox'] ) {\r\n\t\t// jQuery's fancybox plugin\r\n\t\t$frameworks .= \"<script type=\\\"{$wgJsMimeType}\\\" src=\\\"{$smgSMPath}/scripts/fancybox/jquery.fancybox-1.3.4.js$scmgStyleVersion\\\"></script>\\n\";\r\n\t}\r\n\tif ( $js_frameworks['prototype'] ) {\r\n\t\t// prototype\r\n\t\t$frameworks .= \"<script type=\\\"{$wgJsMimeType}\\\" src=\\\"{$smgSMPath}/scripts/prototype.js$scmgStyleVersion\\\"></script>\\n\";\r\n\t}\r\n\tif ( $js_frameworks['extjs'] ) {\r\n\t\t// extjs with multiple adapter\r\n\t\tif ( $js_frameworks['prototype'] ) {\r\n\t\t\t$frameworks .= \"<script type=\\\"{$wgJsMimeType}\\\" src=\\\"{$smgSMPath}/scripts/extjs/adapter/prototype/ext-prototype-adapter.js$scmgStyleVersion\\\"></script>\\n\";\r\n\t\t} else if ( $js_frameworks['yui'] ) {\r\n\t\t\t$frameworks .= \"<script type=\\\"{$wgJsMimeType}\\\" src=\\\"{$smgSMPath}/scripts/extjs/adapter/yui/ext-yui-adapter.js$scmgStyleVersion\\\"></script>\\n\";\r\n\t\t} else if ( $js_frameworks['jquery'] ) {\r\n\t\t\t$frameworks .= \"<script type=\\\"{$wgJsMimeType}\\\" src=\\\"{$smgSMPath}/scripts/extjs/adapter/jquery/ext-jquery-adapter.js$scmgStyleVersion\\\"></script>\\n\";\r\n\t\t} else {\r\n\t\t\t$frameworks .= \"<script type=\\\"{$wgJsMimeType}\\\" src=\\\"{$smgSMPath}/scripts/extjs/adapter/ext/ext-base.js$scmgStyleVersion\\\"></script>\\n\";\r\n\t\t}\r\n\t\t$frameworks .= \"<script type=\\\"{$wgJsMimeType}\\\" src=\\\"{$smgSMPath}/scripts/extjs/ext-all.js$scmgStyleVersion\\\"></script>\\n\";\r\n\t}\r\n\t// add js framework to top\r\n\treturn $frameworks . $newscript;\r\n}", "title": "" }, { "docid": "0172fd50c46f173cf012fc9a05ca9593", "score": "0.6353847", "text": "public function addHeader()\n {\n $html = new htmlWriter();\n \n $html->openTag('html');\n $html->openTag('head');\n $html->addString('<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />');\n $html->addJsFile('text/javascript','../assets/apiWrapper12.js');\n $html->addJsFile('text/javascript','../assets/scoFunctions.js'); \n $html->addJsFile('text/javascript','../assets/testFunctions.js');\n $html->closeTag('head');\n \n $this->htmlString .= $html->getHtmlString();\n \n \n }", "title": "" }, { "docid": "1248ff9430fd249265e32478a3339397", "score": "0.63536257", "text": "function addJS($addition, $key='all', $head=true) {\n if ($head)\n $this->headJS[$key] = $this->mergeIncludes($this->headJS, $addition, $key);\n else\n $this->footJS[$key] = $this->mergeIncludes($this->footJS, $addition, $key);\n }", "title": "" }, { "docid": "6722fc3b9ad0053f99fdf06be9d39b01", "score": "0.6351603", "text": "public function wprig_inline_admin_header_scripts() {\n\t\t?>\n\t\t<script>\n\t\t\tfunction loadScriptAsync(src) {\n\t\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t\tconst tag = document.createElement('script');\n\t\t\t\t\ttag.src = src;\n\t\t\t\t\ttag.async = true;\n\t\t\t\t\ttag.onload = () => {\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t};\n\t\t\t\t\tconst firstScriptTag = document.getElementsByTagName('script')[0];\n\t\t\t\t\tfirstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\n\t\t\t\t});\n\t\t\t}\n\t\t</script>\n\t\t<?php\n\t}", "title": "" }, { "docid": "eeca4bdbf3f1fd1ea70ab8fe1f1770cc", "score": "0.6344044", "text": "public function loadHeadStart()\n {\n $file = SITE_TEMPLATE_PATH . 'head_start.php';\n if (file_exists($file)){\n extract($this->app->container);\n require_once $file;\n }\n }", "title": "" }, { "docid": "299e1235586c7455ec5dab9c105e29cc", "score": "0.6340913", "text": "function addHeaderScript($file_name) {\n\treturn \"<script type=\\\"text/javascript\\\" src=\\\"\" . $file_name . \"\\\"></script>\";\n}", "title": "" }, { "docid": "d90ce297eab08f291d6ac47cc9be34e4", "score": "0.6319145", "text": "function addJavascriptInclude($url)\n {\n $this->head_content[] = (object) array('type' => 'javascript', 'url' => $url);\n }", "title": "" }, { "docid": "1f14348dfe2ab02c2b3b9a58b14d851b", "score": "0.6313385", "text": "function head() {\r\n\t\t$this->generate_tag(\"head\");\r\n\t}", "title": "" }, { "docid": "d923baf6a686e7c9261bbb2c8c14bd30", "score": "0.63096404", "text": "function theme_head_inline_scripts() {\n\t\tob_start();\n\t\t// Replace the no-js class with js on the html element.\n?>\n<script type=\"text/javascript\">\n\tdocument.documentElement.className=document.documentElement.className.replace(/\\bno-js\\b/,'js');\n</script>\n<?php\n\t\techo ob_get_clean(); // WPCS: XSS ok.\n\t}", "title": "" }, { "docid": "909ee5928839fc91e2edceeddd3914f9", "score": "0.62928426", "text": "function register_head() {\n\techo '<script type=\"text/javascript\" src=\"https://apis.google.com/js/plusone.js\"></script>';\n}", "title": "" }, { "docid": "76748b5cbe74532ad097dae15d295fd7", "score": "0.62632746", "text": "public function insert_inline_scripts() {\n }", "title": "" }, { "docid": "76748b5cbe74532ad097dae15d295fd7", "score": "0.62632746", "text": "public function insert_inline_scripts() {\n }", "title": "" }, { "docid": "27a7dfcf1574dcbdbf6cb39460041313", "score": "0.62358105", "text": "function add_head()\n{ ?>\n <script type=\"text/javascript\">\n jQuery.bigfoot();\n </script>\n <link rel=\"me\" href=\"https://mastodon.social/@BryanLammon\">\n<?php }", "title": "" }, { "docid": "77dcbc97dabf576fa7c3513789f94ad0", "score": "0.6228861", "text": "public function addJSHeadFile($jsHeadFile) {\r\n if (($jsHeadFile !== '' || !is_null($jsHeadFile)) && is_array($jsHeadFile) ) {\r\n array_push($this->jsHeadFiles, $jsHeadFile);\r\n }\r\n }", "title": "" }, { "docid": "ee4f8af029b1d6aed9a98e3c67c21f78", "score": "0.62272745", "text": "function head() {\n $out = '<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n <html lang=\"hu\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n <script type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js\"></script>\n <script type=\"text/javascript\" src=\"application.js\"></script>\n <link type=\"text/css\" rel=\"stylesheet\" href=\"application.css\"> \n <title>Demo</title>\n </head><body><div id=\"main\">';\n return $out;\n}", "title": "" }, { "docid": "454a88acbdcc3d86b1e5eb6fb5dfe38c", "score": "0.622625", "text": "static public function head_script_tags($indent=0) {\n return self::script_tags('head', 4);\n }", "title": "" }, { "docid": "b0daf11aa0a7e8e3dc787bb8a793f1d8", "score": "0.62037736", "text": "public function GetCMSHtmlHeadIncludes()\n {\n $aIncludes = parent::GetCMSHtmlHeadIncludes();\n if (!is_array($aIncludes)) {\n $aIncludes = array();\n }\n $aIncludes[] = '<script src=\"'.URL_CMS.'/components/ckEditor/ckeditor/ckeditor.js\" type=\"text/javascript\"></script>';\n $aIncludes[] = '<script type=\"text/javascript\" src=\"'.TGlobal::GetStaticURL(\n '/chameleon/blackbox/javascript/CKEditor/chameleon.ckeditor.js'\n ).'\"></script>';\n\n return $aIncludes;\n }", "title": "" }, { "docid": "4e81dcd84df5579b37c6d5137bea9450", "score": "0.61905414", "text": "function thematic_head_scripts() {\n $scriptdir_start = \"\\t\";\n\t\t$scriptdir_start .= '<script type=\"text/javascript\" src=\"';\n $scriptdir_start .= get_bloginfo('template_directory');\n $scriptdir_start .= '/scripts/';\n \n $scriptdir_end = '\"></script>';\n \n $scripts = \"\\n\";\n $scripts .= $scriptdir_start . 'hoverIntent.js' . $scriptdir_end . \"\\n\";\n $scripts .= $scriptdir_start . 'superfish.js' . $scriptdir_end . \"\\n\";\n $scripts .= $scriptdir_start . 'supersubs.js' . $scriptdir_end . \"\\n\";\n $dropdown_options = $scriptdir_start . 'thematic-dropdowns.js' . $scriptdir_end . \"\\n\";\n \n $scripts = $scripts . apply_filters('thematic_dropdown_options', $dropdown_options);\n\n\t\t$scripts .= \"\\n\";\n\t\t$scripts .= \"\\t\";\n\t\t$scripts .= '<script type=\"text/javascript\">' . \"\\n\";\n\t\t$scripts .= \"\\t\\t\";\n\t\t$scripts .= 'jQuery.noConflict();' . \"\\n\";\n\t\t$scripts .= \"\\t\";\n\t\t$scripts .= '</script>' . \"\\n\";\n\n // Print filtered scripts\n print apply_filters('thematic_head_scripts', $scripts);\n\n}", "title": "" }, { "docid": "60e3ee610e4a99bc58cd55b20856b3e6", "score": "0.61851704", "text": "function init_head_element(){\n $viewuri = $_SERVER['REQUEST_URI'];\n if(!(strpos($viewuri, '/admin/omni_sales/pos') === false)){\n echo '<script src=\"'.site_url().'assets/plugins/jquery/jquery.min.js\"></script>';\n }\n}", "title": "" }, { "docid": "08be035b45fff4c52e7201fe673bafd1", "score": "0.61678106", "text": "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addJS($this->_path.'/mercury-cash-react/build/static/js/main.1fb61edb.js');\n $this->context->controller->addCSS($this->_path.'/mercury-cash-react/build/static/css/main.0671e770.css');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "title": "" }, { "docid": "79274e5146170c991563f874312eddc9", "score": "0.6166961", "text": "static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\n\t}", "title": "" }, { "docid": "572255620067891ec15b441c598ebc3a", "score": "0.6166526", "text": "function getHeadScriptTags($currentPath){\n echo <<<SCRIPT\n <!-- jQuery 1.11.3 -->\n <script type=\"text/javascript\" src =\"$currentPath/include/libs/jquery-1.11.3.min.js\"></script>\n <!-- Bootstrap 3.3.5 -->\n <!-- Latest compiled and minified CSS -->\n <link rel=\"stylesheet\" href=\"$currentPath/include/libs/bootstrap/bootstrap-3.3.5/css/bootstrap.min.css\">\n <!-- Latest compiled Bootstrap JavaScript -->\n <script type=\"text/javascript\" src=\"$currentPath/include/libs/bootstrap/bootstrap-3.3.5/js/bootstrap.min.js\"></script>\n <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\n <!-- WARNING: Respond.js doesnt work if you view the page via file:// -->\n <!--[if lt IE 9]>\n <script src=\"$currentPath/include/libs/bootstrap/bootstrapForIE9/html5shiv/3.7.2/html5shiv.min.js\"></script>\n <script src=\"$currentPath/include/libs/bootstrap/bootstrapForIE9/respond/1.4.2/respond.min.js\"></script>\n <![endif]-->\n <!-- Parsley 2.2.0 -->\n <script src=\"$currentPath/include/libs/parsley-2.2.0/parsley.min.js\"></script>\n <!-- font-Awesome 4.4.0 -->\n <link rel=\"stylesheet\" href=\"$currentPath/include/libs/font-awesome-4.4.0/css/font-awesome.min.css\">\n <link href=\"http://fonts.googleapis.com/css?family=Open+Sans\" rel=\"stylesheet\" type=\"text/css\">\n\nSCRIPT;\n}", "title": "" }, { "docid": "5ef0e9c27ef3b9a0a5c68d90b4b870ac", "score": "0.61649275", "text": "public function loadHead(){\r\n\t\t/** require our plugins class **/\r\n\t\trequire_once(ISVIPI_CLASSES_BASE .'plugins/class.plugins.php');\r\n\t\t$plugins = new plugins();\r\n\t\t\r\n\t\tglobal $p,$s_m,$isv_siteSettings,$converter,$PAGE;\r\n\t\trequire_once(ISVIPI_ACT_THEME . 'ovr/head.php');\r\n\t}", "title": "" }, { "docid": "8fe864313187b0a480cc38740ebfb0ee", "score": "0.616068", "text": "function get_head() { // *giggle*\n\t include 'head.php';\n\t }", "title": "" }, { "docid": "de5a8670d3bdeaa180476572ece7bbdf", "score": "0.6160186", "text": "public function headScript() {\n\t\tif( get_option('ec_stars_rating_use_jquery') ) {\n\t\t\twp_enqueue_script( 'ec-stars-script', plugins_url( '/js/ec-stars-rating.js', __FILE__ ), array('jquery'));\n\t\t} else {\n\t\t\twp_enqueue_script( 'ec-stars-script', plugins_url('/js/ec-stars-rating-nojq.js', __FILE__));\n\t\t}\n\t\t// The script with our messages, url, and status codes\n\t\twp_localize_script( 'ec-stars-script', 'ec_ajax_data', array(\n\t\t\t'ajax_url' => admin_url( 'admin-ajax.php' ),\n\t\t\t'codes' => array(\n\t\t\t\t'SUCCESS' => $this->STATUS_SUCCESS,\n\t\t\t\t'PREVIOUSLY_VOTED' => $this->STATUS_PREVIOUSLY_VOTED,\n\t\t\t\t'REQUEST_ERROR' => $this->STATUS_REQUEST_ERROR,\n\t\t\t\t'UNKNOWN' => $this->STATUS_UNKNOWN\n\t\t\t),\n\t\t\t'messages' => array(\n\t\t\t\t'success' => __('You\\'ve voted correctly', self::$textdomain),\n\t\t\t\t'previously_voted' => __('You had previously voted', self::$textdomain),\n\t\t\t\t'request_error' => __('The request was malformed, try again', self::$textdomain),\n\t\t\t\t'unknown' => __('An unknown error has occurred, try to vote again', self::$textdomain)\n\t\t\t)\n\t\t));\n\t}", "title": "" }, { "docid": "e69c99aaa7105fe5e812aa2c101b9bfb", "score": "0.6139864", "text": "function load_scripts_top() { ?>\n\t\n<?php }", "title": "" }, { "docid": "dd834f681ebd9caed46a29d62f86cca3", "score": "0.6133549", "text": "public static function head()\n\t{\n\t\t//self::base();\n\t\tself::styles();\n\t\tself::scripts();\n\t}", "title": "" }, { "docid": "0c54eb2e0520616dc448bc4d5d5ae7b1", "score": "0.61276466", "text": "function ScriptsInHeader(){\n\n\t\t}", "title": "" }, { "docid": "00f3b447e9ed7d2ce5e2507d3bf4ae8b", "score": "0.61231023", "text": "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "title": "" }, { "docid": "00f3b447e9ed7d2ce5e2507d3bf4ae8b", "score": "0.61231023", "text": "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "title": "" }, { "docid": "a3125eeb9248ab27854c737242b55ca1", "score": "0.61216134", "text": "public function _initHeadScriptAndStyle() {\n \tif ($this->view === null) {\n \t\treturn;\n \t}\n\n \t// jquery core\n \t$this->view->headScript()->appendFile($this->view->baseUrl().'/js/lib/jquery/jquery.min.js','text/javascript');\n\n \t// Jquery ui\n \t$this->view->headScript()->appendFile($this->view->baseUrl().'/js/lib/jquery-ui/1.9.2/jquery-ui.min.js','text/javascript');\n \t$this->view->headLink()->appendStylesheet($this->view->baseUrl() . \"/js/lib/jquery-ui/jquery-ui-themes/themes/ui/jquery-ui.css\");\n\n \t// Jgrowl plugin jquery\n \t$this->view->headLink()->appendStylesheet($this->view->baseUrl() . \"/js/lib/jgrowl/jquery.jgrowl.css\");\n \t$this->view->headScript()->appendFile($this->view->baseUrl().'/js/lib/jgrowl/jquery.jgrowl.js','text/javascript');\n \t$this->view->headScript()->appendFile($this->view->baseUrl().'/js/lib/jgrowl/Alert.js','text/javascript');\n \t$this->view->headScript()->appendFile($this->view->baseUrl().'/js/lib/jgrowl/FlashMessage.js','text/javascript');\n\n \t// Datatables plugin jquery\n \t$this->view->headLink()->appendStylesheet($this->view->baseUrl() . \"/js/lib/jquery-datatables/css/demo_table.css\");\n \t$this->view->headScript()->appendFile($this->view->baseUrl() . \"/js/lib/jquery-datatables/jquery.dataTables.min.js\",\"text/javascript\");\n \t$this->view->headScript()->appendFile($this->view->baseUrl() . \"/js/lib/jquery-validate/jquery.validate.min.js\",\"text/javascript\");\n\n \t// Alert Dialogs plugin jquery\n \t$this->view->headScript()->appendFile($this->view->baseUrl() . \"/js/lib/jquery.alerts-1.1/jquery.alerts.js\",\"text/javascript\");\n \t$this->view->headLink()->appendStylesheet($this->view->baseUrl() . \"/js/lib/jquery.alerts-1.1/jquery.alerts.css\");\n\n \t$this->view->headScript()->appendFile($this->view->baseUrl() . \"/js/lib/jquery.alerts-1.1/jquery.alerts.js\",\"text/javascript\");\n\n \t$this->view->doctype(\"HTML5\");\n }", "title": "" }, { "docid": "4b4451548586d9a8965a1847f80b68c2", "score": "0.6089043", "text": "function global_header(){\n\t\tglobal $_G;\n\t\tif($_GET['id'] == 'xj_event:event_center'){;\n\t\t\t$_G['setting']['seohead'] = $_G['setting']['seohead'].' <script src=\"http://sns.huizhou.cn/source/plugin/xj_event/module/center6/js/jquery1.42.min.js\" type=\"text/javascript\"></script>\n\t\t\t <script type=\"text/javascript\">\n\t\t\t\t var jq=jQuery.noConflict();\n\t\t\t </script><script type=\"text/javascript\" src=\"http://sns.huizhou.cn/source/plugin/xj_event/module/center6/js/jquery.more.js\"></script> ';\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "b425bd4dbf3ec44e013ae6f7f13f7420", "score": "0.6086638", "text": "public function hookHeader()\r\r\n {\r\r\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\r\r\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\r\r\n }", "title": "" }, { "docid": "66fed335f23d32d5801db92f90800d20", "score": "0.6070225", "text": "public function GetHtmlHeadIncludes()\n {\n return array();\n }", "title": "" }, { "docid": "c6fcd50dbf30c30a0dd7581bd712a6e2", "score": "0.6066776", "text": "public function hookHeader(){\r\n $this->context->controller->addCSS($this->_path.'css/style.css');\r\n $this->context->controller->addJS($this->_path.'js/script.js');\r\n }", "title": "" }, { "docid": "06875c6b44674f76525eb91af5ec9866", "score": "0.60654557", "text": "function add_admin_js( $code = '', $to_top = false, $force = false ) {\r\n\r\n if ( $force ) {\r\n $this->force_print($code, 'script');\r\n return;\r\n }\r\n\r\n if ( $to_top ) {\r\n $this->admin_head_js[] = $code;\r\n } else {\r\n $this->admin_footer_js[] = $code;\r\n }\r\n\r\n }", "title": "" }, { "docid": "045118e2a9bc0085b1e696873094d98c", "score": "0.6051458", "text": "final function jsStart(){\n\t\tob_start();\n\t}", "title": "" }, { "docid": "40f4f2d9855a64d95c7fb5263494a43e", "score": "0.60511374", "text": "public function HeadModule_BeforeToString_Handler($Head) {\n // Set BasePath for the plugin\n $this->BasePath = Gdn::Request()->WebRoot();\n \n // Get current tags\n $Tags = $Head->Tags();\n\n // Grab all of the CSS\n $CssToCache = array();\n $JsToCache = array(); // Add the global js files\n $GlobalJS = array(\n 'jquery.js',\n 'jquery.livequery.js',\n 'jquery.form.js',\n 'jquery.popup.js',\n 'jquery.gardenhandleajaxform.js',\n 'global.js'\n );\n \n // Process all tags, finding JS & CSS files\n foreach ($Tags as $Index => $Tag) {\n $IsJs = GetValue(HeadModule::TAG_KEY, $Tag) == 'script';\n $IsCss = (GetValue(HeadModule::TAG_KEY, $Tag) == 'link' && GetValue('rel', $Tag) == 'stylesheet');\n if (!$IsJs && !$IsCss)\n continue;\n\n if ($IsCss)\n $Href = GetValue('href', $Tag, '!');\n else\n $Href = GetValue('src', $Tag, '!');\n \n // Skip the rest if path doesn't start with a slash\n if ($Href[0] != '/')\n continue;\n\n // Strip any querystring off the href.\n $HrefWithVersion = $Href;\n $Href = preg_replace('`\\?.*`', '', $Href);\n \n // Strip BasePath & extra slash from Href (Minify adds an extra slash when substituting basepath)\n if($this->BasePath != '')\n $Href = preg_replace(\"`^/{$this->BasePath}/`U\", '', $Href);\n \n // Skip the rest if the file doesn't exist\n $FixPath = ($Href[0] != '/') ? '/' : ''; // Put that slash back to test for it in file structure\n $Path = PATH_ROOT . $FixPath . $Href;\n if (!file_exists($Path))\n continue;\n\n // Remove the css from the tag because minifier is taking care of it.\n unset($Tags[$Index]);\n\n // Add the reference to the appropriate cache collection.\n if ($IsCss) {\n $CssToCache[] = $Href;\n } elseif ($IsJs) {\n // Don't include the file if it's in the global js.\n $Filename = basename($Path);\n if (in_array($Filename, $GlobalJS)) {\n continue;\n }\n $JsToCache[] = $Href;\n }\n }\n \n // Add minified css & js directly to the head module.\n $Url = 'plugins/Minify/min/?' . ($this->BasePath != '' ? \"b={$this->BasePath}&\" : '');\n \n // Update HeadModule's $Tags\n $Head->Tags($Tags);\n \n // Add minified CSS to HeadModule.\n $Token = $this->_PrepareToken($CssToCache, \".css\");\n if (file_exists(PATH_CACHE.\"/Minify/minify_$Token\")) {\n $Head->AddCss(\"/cache/Minify/minify_$Token\", 'screen', FALSE);\n } else {\n $Head->AddCss($Url.'token='.urlencode($Token), 'screen', FALSE);\n }\n \n // Add global minified JS separately (and first)\n $Head->AddScript($Url . 'g=globaljs', 'text/javascript', -100);\n \n // Add other minified JS to HeadModule.\n $Token = $this->_PrepareToken($JsToCache, '.js');\n if (file_exists(PATH_CACHE.\"/Minify/minify_$Token\")) {\n $Head->AddScript(\"/cache/Minify/minify_$Token\", 'text/javascript', NULL, FALSE);\n } else {\n $Head->AddScript($Url . 'token=' . $Token, 'text/javascript', NULL, FALSE);\n }\n }", "title": "" }, { "docid": "d3446cf62fa4acad48391cae17fca9ba", "score": "0.6043982", "text": "function getJavascriptHeader()\r\n {\r\n $document = JFactory::getDocument();\r\n\r\n if( $this->mobile == true)\r\n {\r\n $document->setMetaData('viewport','initial-scale=1.0, user-scalable=no');\r\n }\r\n\r\n if(!empty($this->_elevation_polylines)||(!empty($this->_directions)&&$this->elevation_directions))\r\n {\r\n $document->addScript('http://www.google.com/jsapi');\r\n $document->addScriptDeclaration(\"// Load the Visualization API and the piechart package.\r\n google.load('visualization', '1', {packages: ['columnchart']});\");\r\n }\r\n\r\n $document->addScript('http://maps.google.com/maps/api/js?sensor='.(($this->mobile==true)?\"true\":\"false\"));\r\n\r\n if($this->marker_clusterer)\r\n {\r\n $document->addScript($this->marker_clusterer_location);\r\n }\r\n }", "title": "" }, { "docid": "74eef64c6138ad88a1cacb01382a96fc", "score": "0.60420924", "text": "public function hookHeader() {\n\t\t/*$this->context->controller->addJS($this->_path.'/views/js/front.js');\n\t\t$this->context->controller->addCSS($this->_path.'/views/css/front.css');*/\n\t}", "title": "" }, { "docid": "ab5cd37b1bdcfa144265a5708705ce79", "score": "0.6029706", "text": "function html_head_end() {\n\t//event_signal( 'EVENT_LAYOUT_RESOURCES' );\n\n\techo '</head>', \"\\n\";\n}", "title": "" }, { "docid": "2fc9842858b5b0659a46b45e56aced57", "score": "0.60270816", "text": "public function GetHtmlHeadIncludes()\n {\n $aIncludes = parent::GetHtmlHeadIncludes();\n\n if (is_null($this->sTreeNodeTableID)) {\n $this->sTreeNodeTableID = TTools::GetCMSTableId('cms_tree_node');\n }\n\n $sURL = PATH_CMS_CONTROLLER.'?'.TTools::GetArrayAsURLForJavascript(array('tableid' => $this->sTreeNodeTableID, 'pagedef' => 'tableeditorPopup'));\n $aIncludes[] = \"\n <script type=\\\"text/javascript\\\">\n function openTreeNodeConnectionEditor(id) {\n var url = '\".$sURL.\"&id=' + id;\n document.location.href = url;\n }\n </script>\n \";\n\n return $aIncludes;\n }", "title": "" }, { "docid": "0699e7dffca3a15bdb2703f5ee8c1531", "score": "0.6023225", "text": "public function registerHeadScript($key,$script)\n\t{\n\t\t$this->checkIfNotInRender();\n\t\t$this->_headScripts[$key]=$script;\n\n\t\t$params=func_get_args();\n\t\t$this->_page->registerCachingAction('Page.ClientScript','registerHeadScript',$params);\n\t}", "title": "" }, { "docid": "f4d3a2b859dd2c19bc5b2e7533652675", "score": "0.6020202", "text": "function displayHead() {\n echo '<jdoc:include type=\"head\" />';\n }", "title": "" }, { "docid": "9c3469cb67452fc6227c26a0810143c6", "score": "0.60135", "text": "public function js_includes() {\n\t\t$step = $this->step();\n\n\t\tif ( ( 1 == $step || 3 == $step ) ) {\n\t\t\twp_enqueue_media();\n\t\t\twp_enqueue_script( 'custom-header' );\n\t\t\tif ( current_theme_supports( 'custom-header', 'header-text' ) ) {\n\t\t\t\twp_enqueue_script( 'wp-color-picker' );\n\t\t\t}\n\t\t} elseif ( 2 == $step ) {\n\t\t\twp_enqueue_script( 'imgareaselect' );\n\t\t}\n\t}", "title": "" }, { "docid": "98872ba1a6197853d5682b11049284bf", "score": "0.6008128", "text": "public function prependJavascript($src=null, $defer=false, $async=false)\n\t{\n\t\treturn $this->addScript($src, 'text/javascript', $defer, $async, true);\n\t}", "title": "" }, { "docid": "23ec1e8fce3aa697f9542d0a868d10e5", "score": "0.59989476", "text": "public function set_head_js($js, $domain = TRUE)\n\t{\n\t\t$this->head_js .= $this->script_tag($js, $domain);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a05f3925b7936e14c3209e9fadb317ff", "score": "0.5997249", "text": "public function hookHeader()\n\t{\n\t\t$this->context->controller->addJS($this->_path . '/views/js/front.js');\n\t\t$this->context->controller->addCSS($this->_path . '/views/css/front.css');\n\t}", "title": "" }, { "docid": "95469d96f8df46ea96b6c61bf4bf9da8", "score": "0.5993936", "text": "function add_admin_js( $code = '', $to_top = false, $force = false ) {\n\n\t\tif ( $force ) {\n\t\t\t$this->force_print( $code, 'script' );\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $to_top ) {\n\t\t\t$this->admin_head_js[] = $code;\n\t\t} else {\n\t\t\t$this->admin_footer_js[] = $code;\n\t\t}\n\n\t}", "title": "" }, { "docid": "dbd66f73841358dce712a7e4ea75b846", "score": "0.5968486", "text": "protected function head(){\n $head=\"\";\n if (isset($this->config[\"assetPath\"])&&isset($this->config[\"css\"])){\n for ($i = 0; $i < count($this->config[\"css\"]); $i++){\n $head.=$this->getAssetTag($this->config[\"assetPath\"].\"css/\".$this->config[\"css\"][$i],\"css\");\n }\n\n }\n if (isset($this->config[\"cdnCss\"])) {\n for ($i = 0; $i < count($this->config[\"cdnCss\"]); $i++) {\n $head .=$this->getAssetTag( $this->config[\"cdnCss\"][$i], \"css\");\n }\n }\n global $assetTags,$smarty;\n $smarty->assign(\"HAEDASSETTAGS\",$head);\n $this->title(); \n $smarty->display(\"app/view/template/Header.tpl\"); \n }", "title": "" }, { "docid": "206be30931b6889e306651de038920c5", "score": "0.59658223", "text": "public function onFrontendRenderHead($head)\r\n {\r\n $options = $this->getPluginOptions();\r\n\r\n if( $options['message'] )\r\n {\r\n $head .= '<script>window.onload=function(){alert(\"'.$options['message'].'\")}</script>';\r\n }\r\n \r\n return $head;\r\n }", "title": "" }, { "docid": "5e3eefde853fe6dad84eace016ebdcff", "score": "0.59623784", "text": "public function hookBackOfficeHeader() {\n $this->context->controller->addJquery();\n $this->context->controller->addJS($this->_path . '/views/js/back.js');\n }", "title": "" }, { "docid": "edbdb63242bd57fbcd4b6f1fd30aa7a6", "score": "0.5960157", "text": "protected function addScriptDeclaration($js)\n\t{\n\t\t$document = JFactory::getDocument();\n\t\t$document->addScriptDeclaration($js);\n\t}", "title": "" }, { "docid": "1aedc3cb36e91ff640a1a50d01184cb9", "score": "0.5953339", "text": "function addIncludeJS($uri,$comment=null,$priority=9999){$this->includeJS[] = array('file'=>$uri,'comment'=>$comment,'priority'=>$priority);}", "title": "" }, { "docid": "d521c27a6c7c9269912f13e9695abfa0", "score": "0.5947712", "text": "function head_elements() {\n return <<<EOT\n\t<link href=\"css/bates.css\" rel=\"stylesheet\"></link>\n <!-- jQuery (necessary for Bootstrap JavaScript plugins) -->\n <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js\"></script>\n <script src=\"js/bates.js\"></script>\nEOT;\n}", "title": "" }, { "docid": "f27b6b29aa1500055d52d43751e13985", "score": "0.59440225", "text": "public function wp_print_header_scripts() {\n if ( $this->cookies_accepted() ) {\n $scripts = apply_filters( 'ultimate_notice_refuse_code_scripts_html', html_entity_decode( trim( wp_kses( $this->options['general']['refuse_code_head'], $this->get_allowed_html() ) ) ) );\n\n if ( ! empty( $scripts ) )\n echo $scripts;\n }\n }", "title": "" }, { "docid": "820058d9fc9b3082ce0c05b264944422", "score": "0.5943923", "text": "public function initialiser() {\r\n if ((strlen($this->script_controle) > 0) && ($this->page))\r\n $this->page->javascripts[] = $this->script_controle;\r\n }", "title": "" }, { "docid": "3659460969a964874beb2afeaf55f389", "score": "0.59370536", "text": "function googleanalytics_insert_head_css($flux) {\r\n\treturn $flux . googleanalytics_snippet();\r\n}", "title": "" }, { "docid": "09ed52aa7a8eb227244ddf4d8683cb52", "score": "0.5921606", "text": "private function rating_add_js() {\r\n global $head_content, $urlServer;\r\n static $loaded;\r\n \r\n if (isset($loaded[$this->widget])) {\r\n return;\r\n } else {\r\n $loaded[$this->widget] = true;\r\n }\r\n \r\n $head_content .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$urlServer.'modules/rating/style.css\">';\r\n \r\n if ($this->widget == 'up_down') {\r\n $head_content .= '<script src=\"'.$urlServer.'modules/rating/js/up_down/rating.js\" type=\"text/javascript\"></script>';\r\n } elseif ($this->widget == 'fivestar') {\r\n load_js('jquery.rateit.min.js');\r\n } elseif ($this->widget == 'thumbs_up') {\r\n $head_content .= '<script src=\"'.$urlServer.'modules/rating/js/thumbs_up/rating.js\" type=\"text/javascript\"></script>';\r\n }\r\n }", "title": "" }, { "docid": "1a1047d4e95fbb66f6adc1bb1e6e2ea7", "score": "0.5920045", "text": "private function initJavascripts() {\n\t\t$scriptData = '';\n\t\t$scriptBase = '<script type=\"text/javascript\" src=\"includes/js/%s\"></script>%s%s';\n\t\t$scriptBaseStrings = '<script type=\"text/javascript\" src=\"%s\" charset=\"utf-8\"></script>%s%s';\n\t\t// Display the script array in reverse order, so main.js in always on top\n\t\tfor ($i=(sizeof($this->scripts)-1);$i>=0;$i--) {\n\t\t\tif ($this->scripts[$i] === self::$JS_LANG) {\n\t\t\t\t$scriptData .= sprintf($scriptBaseStrings, $this->scripts[$i], chr(13),chr(9));\n\t\t\t} else {\n\t\t\t\t$scriptData .= sprintf($scriptBase, $this->scripts[$i], chr(13),chr(9));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// Next handle scriptblocks\n\t\tif (sizeof($this->scriptblocks) > 0) {\n\t\t\t$scriptData .= '<script type=\"text/javascript\">';\n\t\t\tfor ($i=0;$i<sizeof($this->scriptblocks);$i++) {\n\t\t\t\tif ($i != (sizeof($this->scriptblocks)-1)) {\n\t\t\t\t\t$scriptData .= $this->scriptblocks[$i].chr(13);\n\t\t\t\t} else {\n\t\t\t\t\t$scriptData .= $this->scriptblocks[$i];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$scriptData .= '</script>';\n\t\t}\n\t\t\t\t\n\t\t$this->assign('pageScripts',$scriptData);\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "a0e32811cea03eab269d687922b924f6", "score": "0.5914379", "text": "function header_scripts() {\n\twp_enqueue_script(\"jquery\");\n\twp_enqueue_script(\"jquery-innerlabel\", get_template_directory_uri() . \"/js/jquery.innerlabel.js\", array(\"jquery\"), \"0.1\");\n\twp_enqueue_script(\"jquery-scrollTo\", get_template_directory_uri() . \"/js/jquery.scrollTo.js\", array(\"jquery\"), \"1.4.2\");\n\twp_enqueue_script(\"bootstrap\", get_template_directory_uri() . \"/js/bootstrap.js\", array(\"jquery\"), \"3.3.1\");\n\twp_enqueue_script(\"google-code-prettify\", get_template_directory_uri() . \"/js/prettify/prettify.js\", array(), \"1\");\n}", "title": "" }, { "docid": "dd7edf38e8ca3179db95c7cd03a3305e", "score": "0.5914179", "text": "public function prependJavascriptBlock($content)\n\t{\n\t\treturn $this->addScriptBlock($content, 'text/javascript', true);\n\t}", "title": "" }, { "docid": "e74e358d4118f273454e707da7a1b011", "score": "0.5906419", "text": "function addSWFObjectToHead(){\n\t\t$callSWF = '<script type=\"text/javascript\" src=\"http://www.google.com/jsapi\"></script><script type=\"text/javascript\">google.load(\"swfobject\", '.$this->swfObjectVersion.');</script>';\n\n\t\treturn $callSWF;\n\t}", "title": "" }, { "docid": "e4474205feca220b6ba277ab9119a246", "score": "0.58856136", "text": "protected function _renderHeadScript()\n {\n if (self::$_quicksearchInitialized === FALSE) {\n $this->view->jQuery()->addJavascriptFile(self::$_pluginPath . 'quicksearch/jquery.quicksearch.js');\n self::$_quicksearchInitialized = TRUE;\n }\n return $this;\n }", "title": "" }, { "docid": "d90600eef0aef9292221f270b1ed5fc3", "score": "0.5881875", "text": "public function add_header_scripts() {\n \n if ( ! is_admin() ) {\n \n if( function_exists( 'wp_register_script' ) ) {\n wp_register_script( 'parsley_js', CWS_SIGNUP_PLUGIN_URL . 'lib/js/parsley.js', array('jquery'), 1 );\n \n if( function_exists( 'wp_enqueue_script' ) ) {\n //wp_enqueue_script( 'base_js' );\n wp_enqueue_script( 'parsley_js' );\n }\n }\n }\n }", "title": "" }, { "docid": "16ff75bd1c6f13ff386ea1ee17fd1c2d", "score": "0.5875915", "text": "function html5blank_header_scripts()\n{\n if ($GLOBALS[\"pagenow\"] != \"wp-login.php\" && !is_admin()) {\n\n \twp_register_script(\"conditionizr\", get_template_directory_uri() . \"/js/lib/conditionizr-4.3.0.min.js\", array(), \"4.3.0\"); // Conditionizr\n wp_enqueue_script(\"conditionizr\"); // Enqueue it!\n\n wp_register_script(\"modernizr\", get_template_directory_uri() . \"/js/lib/modernizr-2.7.1.min.js\", array(), \"2.7.1\"); // Modernizr\n wp_enqueue_script(\"modernizr\"); // Enqueue it!\n\n wp_register_script(\"html5blankscripts\", get_template_directory_uri() . \"/js/scripts.js\", array(\"jquery\"), \"1.0.0\"); // Custom scripts\n wp_enqueue_script(\"html5blankscripts\"); // Enqueue it!\n }\n}", "title": "" } ]
3a90a7005ca63b357f310c7de04fb14d
Removes old entries from the db
[ { "docid": "fc30b574edf5cedde672b219e3728aef", "score": "0.660662", "text": "function simple_history_purge_db() {\n\n\t$do_purge_history = TRUE;\n\t$do_purge_history = apply_filters(\"simple_history_allow_db_purge\", $do_purge_history);\n\n\tglobal $wpdb;\n\t$tableprefix = $wpdb->prefix;\n\n\t$days = 60;\n\t$days = (int) apply_filters(\"simple_history_db_purge_days_interval\", $days);\n\n\t$sql = \"DELETE FROM {$tableprefix}simple_history WHERE DATE_ADD(date, INTERVAL $days DAY) < now()\";\n\n\tif ($do_purge_history) {\n\t\t$wpdb->query($sql);\n\t}\n\n}", "title": "" } ]
[ { "docid": "4c3357fa99913a947a2ff97b16b823e4", "score": "0.6992776", "text": "public function remove_old_record()\n\t{\n\t\t$one_day_ago = get_date_ago('1');\n\t\t$one_week_ago = get_date_ago('7');\n\t\t$one_month_ago = get_date_ago('30');\n\t\t$two_month_ago = get_date_ago('60'); // unused\n\t\t$three_month_ago = get_date_ago('90');\n\n\t\t$this->remove_old_news_url($one_day_ago);\n\t\t$this->remove_old_pantip_url($one_week_ago);\n\t\t$this->remove_old_edu_url($one_week_ago);\n\t\t$this->remove_old_jojoee_url($three_month_ago);\n\t\t$this->remove_old_youv_url($three_month_ago);\n\t\t$this->remove_old_yumm_url($two_month_ago);\n\n\t\t$this->remove_old_scraped_log($one_month_ago);\n\t\t$this->remove_old_published_log($one_month_ago);\n\t\t$this->remove_old_error_log($one_month_ago);\n\t\t$this->remove_old_log($one_month_ago);\n\t}", "title": "" }, { "docid": "f3478e0f8de0955ba0f84479cd375a2a", "score": "0.69255495", "text": "public static function cleanDatabase()\n\t{\n\t\t$expire = time() - 86400*30;\n\t\tDB::get()->prepare(\"\n\t\t\tDELETE FROM forms\n\t\t\tWHERE forms_created_time < ?\")\n\t\t\t->execute(array($expire));\n\t}", "title": "" }, { "docid": "a57f3ab80b32ea69a1b4dbd6ab96411c", "score": "0.6872436", "text": "public function cleanRecords(){\n\t\tOpendocs::model()->deleteAll(\" createTime<=(NOW()-1)\");//oracle\n\t}", "title": "" }, { "docid": "cf0b3a1acf51f9e86edd972c8a252dae", "score": "0.6871454", "text": "public function cleanupDatabase() {\n\t\t\tif ( !$this->getTableExists() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$sQuery = \"\n\t\t\t\tDELETE from `%s`\n\t\t\t\tWHERE\n\t\t\t\t\t`day_id`\t\t\t!= '0'\n\t\t\t\t\tAND `created_at`\t< '%s'\n\t\t\t\";\n\t\t\t$sQuery = sprintf( $sQuery,\n\t\t\t\t$this->getTableName(),\n\t\t\t\t( $this->loadDP()->time() - 31*DAY_IN_SECONDS )\n\t\t\t);\n\t\t\t$this->loadDbProcessor()->doSql( $sQuery );\n\t\t}", "title": "" }, { "docid": "074a02daa49d17286ac055a44abe4e0d", "score": "0.6733896", "text": "function erase() {\n //delete * from database\n }", "title": "" }, { "docid": "4772ab6635261d79cfabd6e9475776c5", "score": "0.6693658", "text": "private function cleanup()\n\t{\n\t\tee()->sync_db = ee()->load->database('sync_db', true);\n\n\t\t// delete 14 day old processed product records, always leaving at least 5\n\t\tee()->sync_db->query(\"DELETE FROM products WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 14 DAY) AND id NOT IN (SELECT id FROM ( SELECT id FROM `products` WHERE processed = 1 ORDER BY id DESC LIMIT 5 ) keepers)\");\n\t\t\n\t\t// delete old inventory records\t\n\t\tee()->sync_db->query(\"DELETE FROM products_inventory WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 2 DAY)\");\n\n\t\t// delete old shipping records\n\t\tee()->sync_db->query(\"DELETE FROM orders_shipping WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 14 DAY)\");\n\n\t\t// delete old processed records\n\t\tee()->sync_db->query(\"DELETE FROM orders_processed WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 14 DAY)\");\n\t\t\n\t}", "title": "" }, { "docid": "ee0613fb5eb81aaec2698fb3fbb7798c", "score": "0.6486969", "text": "public function cleanUpOldLog() {\n\t\t$timestamp = Utils::instance()->localToUtc( apply_filters( 'ip_lockout_logs_store_backward', '-' . Settings::instance()->storage_days . ' days' ) );\n\t\tLog_Model::deleteAll( array(\n\t\t\t'date' => array(\n\t\t\t\t'compare' => '<=',\n\t\t\t\t'value' => $timestamp\n\t\t\t),\n\t\t), '0,1000' );\n\t}", "title": "" }, { "docid": "cd250a2c1f6d6a0097835ae45ce3f03c", "score": "0.6375397", "text": "protected function delete() {\n $this->db->deleteRows($this->table_name, $this->filter);\n storeDbMsg($this->db);\n }", "title": "" }, { "docid": "883e51710b69f82c67e6be5a002301ca", "score": "0.6369472", "text": "function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n // need to delete from tag maps too\n // tbd\n }", "title": "" }, { "docid": "e1af9cdd41843148d6bd2b713d28d825", "score": "0.6357123", "text": "public function remove_expired()\n\t{\n\t\t$this->db->where('expiration <', date('Y-m-d H:i:s'));\n\t\t$this->db->delte($this->Table);\n\t}", "title": "" }, { "docid": "b41026f26eba98913bc71239be43970b", "score": "0.63470614", "text": "public function del_old()\n {\n $ttl_expiry = time() - $this->_cacheTTL;\n\n $result = $this->_db->deleteAll(array('created <' => $ttl_expiry));\n\n if ($result) {\n $message = \"Finished deleting old cache entries. Deleted (\" . $this->_db->getAffectedRows() . \") entries.\";\n CakeLog::write('info', $message, 'opia-proxy');\n\n return $message;\n } else {\n $message = \"Something went wrong.\";\n CakeLog::write('warning', $message, 'opia-proxy');\n\n return $message;\n }\n }", "title": "" }, { "docid": "8891039f1028d0830f58d0d607681ab9", "score": "0.63340855", "text": "public static function cleanOldRegistries(){\n global $wpdb;\n $table_name = $wpdb->prefix . REG_TABLE;\n $timer = CLEAN_OLD_REG_TIMES;\n $sql = \"DELETE FROM $table_name WHERE dated < date_sub(now(), INTERVAL $timer MINUTE)\";\n $wpdb->query( $sql );\n }", "title": "" }, { "docid": "3f751061b68f14cf1b8932cf88c11b57", "score": "0.6326361", "text": "function cleanCache(){\n\t\t$res = mysql_query(\"delete from `\".addslashes($this->tableName).\"` where `Expires` < NOW()\", $this->app->db());\n\t}", "title": "" }, { "docid": "1d3c7e24ff35e88dbdaef3443679d318", "score": "0.6300922", "text": "protected function delete_old_sessions () {\n\t\t$this->db_prime()->q(\n\t\t\t\"DELETE FROM `[prefix]sessions`\n\t\t\tWHERE `expire` < \".time()\n\t\t);\n\t}", "title": "" }, { "docid": "8d3993b67dcebf241fa272ad223b41dd", "score": "0.6284239", "text": "private function clearLatestData() {\n\t\t$this->debug( 'Clearing latest stats: '.$this->getLatestDay() );\n\t\t$sql = 'DELETE FROM '.Statistics::$dbTable.' WHERE day = \"'.$this->getLatestDay().'\"';\n\t\t$this->db->query( $sql );\n\t}", "title": "" }, { "docid": "d706af527064aaf905c6c46d7a56b125", "score": "0.6283829", "text": "public function clear()\n {\n $this->conn->flushDb();\n }", "title": "" }, { "docid": "d2c18b9ce871dc34377e42a2be45d4c2", "score": "0.6281222", "text": "public function remove()\n {\n database()->run('DELETE FROM ' . $this->table . ' WHERE ' . $this->primaryKey . ' = ?', [ $this->{$this->primaryKey} ]);\n $this->__destruct();\n }", "title": "" }, { "docid": "afc0e42dcd1ef9586ec23145534cc7a7", "score": "0.6268982", "text": "public function cleanHistory()\n\t\t{\n\t\t\t$result = pg_query(\n\t\t\t\t\t$this->connection,\n\t\t\t\t\t'delete from history where date_from < (CURRENT_TIMESTAMP - interval \\'1 month\\')');\n\t\t}", "title": "" }, { "docid": "6bfb8eae2c784d03ed93b126ad40854d", "score": "0.6267094", "text": "protected function cleanHistory()\n\t{\n\t\t$this->taskHistoryRepository->deleteOlderThanDays($this->maxHistoryDays);\n\t\t$this->taskHistoryRepository->deleteOverCount($this->maxHistoryRecords);\n\t}", "title": "" }, { "docid": "038f3892e22b79cd475411fa25a22842", "score": "0.6258026", "text": "private function deleteOldProducts(): void\n {\n DB::table('products')\n ->whereIn('id', array_keys($this->databaseProducts))\n ->delete();\n }", "title": "" }, { "docid": "8c24b679723c897120df0ace6e251f3c", "score": "0.62198246", "text": "public function clear()\r\n\t{\r\n\t\t$this->db->runQuery(\"TRUNCATE TABLE `\" . $this->name . \"`\");\r\n\t}", "title": "" }, { "docid": "ee40180ac4dff1dfa69672df7defbd5a", "score": "0.620034", "text": "private function purgeExisting() {\n $paths = array('tax/calculation', 'tax/calculation_rate', 'tax/calculation_rule');\n\n foreach( $paths as $path ) {\n $existingRecords = Mage::getModel($path)->getCollection();\n\n foreach( $existingRecords as $record ) {\n\n try {\n $record->delete();\n }\n catch (Exception $e) {\n Mage::getSingleton('core/session')->addError(\"There was an error deleting from Magento model \" . $path);\n }\n\n }\n\n }\n\n }", "title": "" }, { "docid": "a02abb49d88aa5eb29f7e09b8f79cc30", "score": "0.6192923", "text": "public function remove_old_log_events() {\n global $wpdb;\n\n $older_than = (time() - H5PEventBase::$log_time);\n\n $wpdb->query($wpdb->prepare(\"\n DELETE FROM {$wpdb->prefix}h5p_events\n\t\t WHERE created_at < %d\n \", $older_than));\n }", "title": "" }, { "docid": "2ec14e0702ec6e92680e9a1dca5c25bb", "score": "0.6189249", "text": "private function cleanUpDatabase(){\n\t\t$this->cleanUpSessions();\n\t\t// reports older 90 days\n\t\t$this->cleanUpReports();\n\t\t// delete unregistered users without actions older 30 days\n\t\t$this->cleanUpUsers();\n\t}", "title": "" }, { "docid": "62b41d261d9d654647dcc80836a7fe7f", "score": "0.6163404", "text": "public function delete() {\n\t\t$this->getConnection()->delete( $this );\n\t\t$this->clear();\n\t}", "title": "" }, { "docid": "c73c61626b95d54c0ed9983896a1182f", "score": "0.61360437", "text": "public function cleanRecordVersions()\n\t{\n \t\t$this -> db -> query(\"DELETE FROM `\".$this -> table.\"` \n \t\t\t\t\t\t\t WHERE `model`='\".$this -> model.\"' \n \t\t\t\t\t\t\t AND `row_id`='\".$this -> row_id.\"'\");\n \t\treturn $this;\n \t}", "title": "" }, { "docid": "4db23a1229d05efc5503f8e882553e63", "score": "0.6131462", "text": "function cleanup()\n {\n $db = eZDB::instance();\n $db->begin();\n $db->query( \"DELETE FROM ezsphinx\" );\n $db->query( \"DELETE FROM ezsphinx_pathnodes\" );\n $db->commit();\n }", "title": "" }, { "docid": "f7ad1a3cd0fac00d789d79025c9607b9", "score": "0.61228746", "text": "private function clearCache()\n {\n if(((int)rand()) %3)\n {\n $sql = \" delete from \".$this->getCacheTable().\" where to_days(created) != to_days(now()) \";\n $this->log($sql);\n $this->getWriteResource()->query($sql);\n }\n }", "title": "" }, { "docid": "7dee3b013ea1fb263f9226f41be1eea5", "score": "0.6115602", "text": "public function removeStaleTokens(): void\n {\n $table = 'tx_pushnotification_tokens';\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)\n ->getQueryBuilderForTable($table);\n\n $queryBuilder\n ->delete($table)\n ->where(\n $queryBuilder->expr()->lt('tstamp', strtotime('-3 months'))\n )\n ->execute();\n }", "title": "" }, { "docid": "4688fb11292ab36582ebe1ebd5f02117", "score": "0.61140794", "text": "public function deleteMatch(){\n\t\t$this->getDbTable()->delete(\"\");\n\t}", "title": "" }, { "docid": "e87e153276e9a0e5e21344a2dd8b32ad", "score": "0.610057", "text": "public function clean() {\n\t\tDBSimple::delete(\n\t\t\t\t\\UsersLogin::LoginAttemptsTable,\n\t\t\t\tarray(\n\t\t\t\t\t'`date` < NOW() - interval 1 month '\n\t\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "ddf3f78c55c68f41538b9151af45c52c", "score": "0.60896105", "text": "function purge(){\r\n\t\t$this->db->execute($this->stm['purge'],time());\r\n\t\tif($this->count() === 0){\r\n\t\t\t$this->drop();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b020fcfb986a747fbd0645212523c48a", "score": "0.60797185", "text": "function HistoryExpunge()\n\t{\n\t\t$ret = FALSE;\n\t\t$query = \"DELETE FROM `\".BIT_DB_PREFIX.\"task_ticket`\";\n\t\t$result = $this->mDb->query( $query );\n\t\t$query = \"DELETE FROM `\".BIT_DB_PREFIX.\"task_transaction`\";\n\t\t$result = $this->mDb->query( $query );\n\t\t$query = \"DELETE FROM `\".BIT_DB_PREFIX.\"task_reason`\";\n\t\t$result = $this->mDb->query( $query );\n\t\t$query = \"DELETE FROM `\".BIT_DB_PREFIX.\"task_roomstat`\";\n\t\t$result = $this->mDb->query( $query );\n\t\t$query = \"DELETE FROM `\".BIT_DB_PREFIX.\"task_caller`\";\n\t\t$result = $this->mDb->query( $query );\n\t\t$query = \"DELETE FROM `\".BIT_DB_PREFIX.\"task_staff`\";\n\t\t$result = $this->mDb->query( $query );\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "ed620bb42658cfe87af711e9d10e85c5", "score": "0.6076873", "text": "protected function cleanHistory()\n {\n $createdAt = new \\DateTime();\n $logs = $this->instance->getLogs();\n foreach($logs as $log) {\n if(($createdAt->getTimestamp() - $log->getCreatedAt()->getTimestamp()) > $this->expiredTimestamp) {\n $this->instance->removeLog($log);\n }\n }\n }", "title": "" }, { "docid": "7f4be3c37bc052ab5e1e6eb471d52178", "score": "0.60415536", "text": "private function cleanHashs() {\n\t\t//$sql = \"DELETE FROM `*PREFIX*ocDashboard_usedHashs` WHERE `timestamp` < '\".(time()-60*60*24).\"'\";\n\t\t$sql = \"DELETE FROM `*PREFIX*ocDashboard_usedHashs` WHERE `timestamp` < ?\";\n\t\t$query = \\OCP\\DB::prepare($sql);\n\t\t$params = Array(time()-60*60*24);\n\t\tif(!$query->execute($params)) {\n\t\t\tOCP\\Util::writeLog('ocDashboard',\"Can't delete usedHashs\", \\OCP\\Util::WARN);\n\t\t}\n\t}", "title": "" }, { "docid": "68416e520808cfe831bc3aa9643ffd45", "score": "0.60400885", "text": "private function cleanDatabase()\n {\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n foreach($this->tables as $table)\n {\n\n DB::table($table)->truncate();\n\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n\n\n }", "title": "" }, { "docid": "7f16037795f73635d78198f7c4f9b449", "score": "0.6039593", "text": "function remove_existing(){\n $db = DB::connect(DB_CONNECTION_STRING);\n \n $sql = \"delete from user \n where postcode = \" . $db->quote($this->postcode) . \"\n and email = \" . $db->quote($this->email) .\"\n and user_id <> \" . $db->quote($this->user_id);\n $db->query($sql); \n }", "title": "" }, { "docid": "c0b460cde17c1c3c6bc75a650974f83f", "score": "0.6028261", "text": "public function clearDb ()\n {\n // Empty tables and reset auto-increment values\n $this->_dbh->query('SET FOREIGN_KEY_CHECKS = 0');\n foreach (self::$dbTables as $table) {\n $stmt = $this->_dbh->prepare('TRUNCATE `' . $table . '`');\n $stmt->execute();\n $stmt = $this->_dbh->prepare('ALTER TABLE `' . $table . '` AUTO_INCREMENT = 1');\n $stmt->execute();\n }\n // Re-enable checks only if set as such in config\n $config = parse_ini_file('config/AcToBs.ini', true);\n if (isset($config['checks']['fk_constraints']) && $config['checks']['fk_constraints'] == 1) {\n $this->_dbh->query('SET FOREIGN_KEY_CHECKS = 1');\n }\n // Delete denormalized tables\n foreach (self::$dbDenormalizedTables as $table) {\n $stmt = $this->_dbh->prepare('DROP TABLE IF EXISTS `' . $table . '`');\n $stmt->execute();\n }\n // Delete non-standard taxonomic ranks\n $stmt = $this->_dbh->prepare(\n 'DELETE FROM `taxonomic_rank` WHERE `standard` = ?');\n $stmt->execute(array(\n 0\n ));\n unset($stmt);\n }", "title": "" }, { "docid": "5ab63890a770bb50419377fef6ab1053", "score": "0.60230076", "text": "public function purge_data() {\n\n global $wpdb;\n\n $wpdb->query( \"DELETE FROM {$wpdb->prefix}popularpostssummary WHERE view_date < DATE_SUB('\" . WPP_Helper::curdate() . \"', INTERVAL {$this->options['tools']['log']['expires_after']} DAY);\" );\n\n }", "title": "" }, { "docid": "51b14a9cd8de5653e2bc3d01c0c725d0", "score": "0.6016906", "text": "public function clean() {\n\t\t$sess = ORM::for_table($this->session_type)\n\t\t\t->where_lt('expired', date('Y-m-d H:i:s'))\n\t\t\t->find_many();\n\t\tif($sess != false) {\n\t\t\tforeach($sess as $s) {\n\t\t\t\t$s->delete();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e737d6e85ff412c06fdd29e73ed8b0f7", "score": "0.6000573", "text": "public function removeDeletedRecords() \n {\n // this algorythm should be a fair bit\n // faster than calling DataSet::removeRecord()\n $new_recs = array();\n foreach($this->records as $rec) {\n if (!$rec->isAZombie()) {\n $new_recs[] = $rec;\n }\n }\n $this->records = $new_recs;\n }", "title": "" }, { "docid": "c1b0b39f7d39bfd8e86b7569b2629865", "score": "0.5997551", "text": "private function collectGarbage() {\n\t\t$query = 'DELETE FROM ' .//'DELETE LOW_PRIORITY FROM ' .\n\t\t\tShelveIt::$query_cache[ 'table' ] .\n\t\t\t' WHERE time < NOW() - ' . ShelveIt::$query_cache[ 'expire' ];\n \n\t\tif( !mysql_unbuffered_query( $query, $this->mysql ) ) {\n die( \"Garbage collect query: $query<br />\" .\n 'Invalid query: ' . mysql_error( $this->mysql ) );\n };\n\t}", "title": "" }, { "docid": "df34785944e2a5c4e280ac805eb36d43", "score": "0.5996781", "text": "public function resetDbSessions()\n {\n $ttl = (int)Phpr::$config->get('STORED_SESSION_TTL', 3);\n Db_DbHelper::query(\n 'delete from db_session_data where created_at < DATE_SUB(now(), INTERVAL :seconds SECOND)',\n array('seconds' => $ttl)\n );\n }", "title": "" }, { "docid": "0195bc97d39b1d750b7e32d5dc78c091", "score": "0.5994403", "text": "public function deleteData()\n {\n DB::table($this->dbTable)\n ->where($this->where)\n ->delete();\n }", "title": "" }, { "docid": "e8b1d9760dcddb4af01294e3581c9104", "score": "0.5989022", "text": "function db_backend_prune($db)\n\t{\n\t\t$sql = '\n\t\t\tDELETE FROM\n\t\t\t\tpastes\n\t\t\tWHERE\n\t\t\t\tttl != -1 AND\n\t\t\t\tttl != -100 AND\n\t\t\t\t(EXTRACT(EPOCH FROM now()) - added ) > ttl\n\t\t\t';\n\n\t\t$res = pg_query($db, $sql) or die(\"Failed to execute query '$sql'\");\n\n\t\treturn pg_affected_rows($res);\n\t}", "title": "" }, { "docid": "b84c3998638d03425b2a8e3fa3dbb887", "score": "0.59887916", "text": "private function delete_existing_lines(){\n\n\t\tLine::where('event_id', '=', $this->event->id)->delete();\n\n\t}", "title": "" }, { "docid": "d27f948e5489e5efbcac9fca51d49735", "score": "0.59685034", "text": "public static function RemoveStaleSessions()\n {\n global $SESSDB;\n\n $time = time();\n\n // First delete everything in sdat that is data for an expired session\n $q = $SESSDB->prepare(\"DELETE FROM `sdat` WHERE sdat.id IN(SELECT smap.id FROM `smap` WHERE deleteafter < :time)\");\n $q->bindParam(':time', $time);\n $q->execute();\n\n // Now delete the entries in smap\n $q = $SESSDB->prepare(\"DELETE FROM `smap` WHERE deleteafter < :time\");\n $q->bindParam(':time', $time);\n $q->execute();\n }", "title": "" }, { "docid": "00a25e0cabe13d0071e7294046054390", "score": "0.59613776", "text": "public function deleteEntries(){\r\n\t\t global $xname;\r\n\t\t \r\n\t\t \r\n\t\t // First we get an array of the XML property xml_id's\r\n\t\t $xmlIdXmlArray = array();\r\n\t\t foreach ($this->xml->property as $vivienda){\r\n\t\t\t $xmlIdXmlArray[] = (string) $vivienda->id;\r\n\t\t }\r\n\t\t \r\n\t\t $databaseIdXmlQuery = \"SELECT id_xml FROM {$xname}_viviendas WHERE agente = '{$this->agent}'\";\r\n\t\t $databaseIdSql\t = $this->query($databaseIdXmlQuery);\r\n\t\t $databaseIdXmlArray = array();\r\n\t\t while ($databaseIdXml = $databaseIdSql->fetch_row()) {\r\n\t\t\t $databaseIdXmlArray[]\t= $databaseIdXml[0];\r\n\t\t\t \r\n\t\t }\r\n\t\t\t\r\n\t\t // And we check to see if the database entry is in the XML file, if not, we delete it\r\n\t\t foreach ($databaseIdXmlArray as $databaseIdXml){\r\n\t\t\t if (!in_array($databaseIdXml,$xmlIdXmlArray)) {\r\n\t\t\t\t $this->log->write(Logger::WARNING,'Deleting: '.$databaseIdXml);\r\n\t\t\t\t // Delete entry\r\n\t\t\t\t $deleteQuery = \"DELETE FROM {$xname}_viviendas WHERE id_xml = '{$databaseIdXml}'\";\r\n\t\t\t\t $this->query($deleteQuery);\r\n\t\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t }", "title": "" }, { "docid": "3ca861446dc15204068b422824455377", "score": "0.5959338", "text": "function clearSQL() {}", "title": "" }, { "docid": "f66af0135d422d815a7e66cf62c18b6b", "score": "0.59469455", "text": "function remove_from_db()\n\t{\n\n\t\t// delete Signup\n\t\t$sql = sprintf(\"delete from Signup where SignupId = '%s'\", \n\t\t\tmysql_real_escape_string($this->SignupId));\n\t\t$result = mysql_query($sql);\n\t\tif (!$result)\n\t\t\treturn display_mysql_error ('Cannot execute query', $sql); \t\t\n\t\t\n\t}", "title": "" }, { "docid": "31b53f570f7f72a16bd3d7fa42444530", "score": "0.59458524", "text": "public function flush()\n {\n $this->table()->delete();\n }", "title": "" }, { "docid": "2a6e95468f997847f772c384a2263f62", "score": "0.5944264", "text": "function delete() {\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n\t\t\t// Delete het huidige record.\n\n\t\t\t$deleteQuery = \"DELETE FROM \".$this->table.\" WHERE \".$kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\t\t\t$this->lastQuery = $deleteQuery;\n\n $deleteTable = $this->mysqlConnection->prepare($this->lastQuery);\n $deleteTable->execute();\n\n\t\t}", "title": "" }, { "docid": "cdb648f9f740c63022a6161aed6ed59a", "score": "0.593549", "text": "public function clearRecordsData()\n {\n $defaultMaxAge = 60*60*24; // 24 hours\n $maxAge = craft()->config->get('registrationStorageDuration') ?? $defaultMaxAge; // in seconds\n\n $affectedRows = TobiasAx_RegistrationRecord::model()\n ->updateAll(['data' => null], '(UNIX_TIMESTAMP() - UNIX_TIMESTAMP(dateCreated)) > :age', [':age' => $maxAge]);\n\n return $affectedRows;\n }", "title": "" }, { "docid": "f87376f6d621e2c7d45652ac2a35bf1c", "score": "0.59347224", "text": "function edithistory_delete()\n{\n\tglobal $db, $mybb, $user;\n\t$db->update_query(\"edithistory\", array('uid' => 0), \"uid='{$user['uid']}'\");\n}", "title": "" }, { "docid": "b61aa106ae5e18427a1126a73284d5a8", "score": "0.5929782", "text": "public function gc()\n {\n $this->delete(array(\n 'creation_date < ?' => date('Y-m-d H:i:s', time() - (3600 * 24)),\n ));\n }", "title": "" }, { "docid": "03dedf0c1979d9c369f39833da998c18", "score": "0.5917222", "text": "function erase() {\n\t\tif (method_exists($this,'beforeErase') && !$this->beforeErase())\n\t\t\treturn;\n\t\t$this->exec(array('method'=>'remove','criteria'=>$this->criteria));\n\t\t$this->reset();\n\t\tif (method_exists($this,'afterErase'))\n\t\t\t$this->afterErase();\n\t}", "title": "" }, { "docid": "9aabd9e0bacef4702c543bb939ea7068", "score": "0.5902476", "text": "public function refreshRows(){\n if (count($this->rows) > 0){\n foreach ($this->rows as $row){\n $this->removeRow($row);\n }\n }\n }", "title": "" }, { "docid": "0fbf022c547e33b2d0c1f86624ee40c4", "score": "0.5900168", "text": "public function clean(){\n\t\t$sql = 'DELETE FROM ano_letivo';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "title": "" }, { "docid": "1218fd6732439ad989d284c0e7275520", "score": "0.5899035", "text": "function spamhurdles_db_remove_expired()\n{\n global $PHORUM;\n\n phorum_db_interact(\n DB_RETURN_RES, \n \"DELETE FROM {$PHORUM['spamhurdles_table']}\n WHERE expire_time < \" . time(),\n NULL, DB_MASTERQUERY\n );\n}", "title": "" }, { "docid": "5c0b10a8db4df8268d79e006e18e98ee", "score": "0.58953065", "text": "protected function doPurgeDatabase()\n {\n }", "title": "" }, { "docid": "23c460a5200dab3a98ab91ddd4410eb2", "score": "0.5894036", "text": "public function purgeUndoTable()\n\t{\n\t\t$objDatabase = \\Database::getInstance();\n\n\t\t// Truncate the table\n\t\t$objDatabase->execute(\"TRUNCATE TABLE tl_undo\");\n\n\t\t// Add a log entry\n\t\t$this->log('Purged the undo table', __METHOD__, TL_CRON);\n\t}", "title": "" }, { "docid": "542f555f6a9e7c9e203e0e932f66d3e9", "score": "0.58925503", "text": "public function delete() {\n global $DB;\n $DB->delete_records($this->get_table_name(), array('id' => $this->id));\n }", "title": "" }, { "docid": "3ab36f36bcff18fbcfe21a7fd98e11f1", "score": "0.58886105", "text": "function expireall() {\n\t\t$now = $this->_fromunixtime( time() );\n\t\t$this->_query( \"DELETE FROM $0 WHERE exptime<'$now'\" );\n\t}", "title": "" }, { "docid": "84f62d61ad888f610f0ae197e60f7821", "score": "0.58811593", "text": "public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }", "title": "" }, { "docid": "f652bb3d7dfe5a155b02f434404f3248", "score": "0.58771765", "text": "function removeSites(){\n $this->db->query('TRUNCATE TABLE `sites`;');\n }", "title": "" }, { "docid": "670baeace51963f7ffdb753a3095b2c3", "score": "0.5869236", "text": "public function purge(): void\n {\n $this->owner()->where('current_team_id', $this->id)\n ->update(['current_team_id' => null]);\n\n $this->users()->where('current_team_id', $this->id)\n ->update(['current_team_id' => null]);\n\n $this->users()->detach();\n\n $this->delete();\n }", "title": "" }, { "docid": "8d5bb64bee3a6a8d44637a64af13d125", "score": "0.5861565", "text": "public function clear(): void\n {\n $app = App::get();\n $list = $app->data->getList()\n ->filterBy('key', '.temp/cache/', 'startWith');\n foreach ($list as $item) {\n $app->data->delete($item->key);\n };\n }", "title": "" }, { "docid": "79fd1d5bbae3e6ff5c1f3da52be8a797", "score": "0.585403", "text": "public function reset_rezultati()\n {\n $query = $this->query(\"SELECT * FROM rezultati;\");\n foreach ($query->getResultArray() as $row)\n {\n $this->delete($row['idrezultati']);\n }\n }", "title": "" }, { "docid": "f2c40c39836a0c907a24ec9bc558ac98", "score": "0.5841898", "text": "public function reset_db_sessions()\n\t{\n\t\t$ttl = (int)Phpr::$config->get('STORED_SESSION_TTL', 3);\n\t\tDb_Helper::query('delete from db_session_data where created_at < DATE_SUB(now(), INTERVAL :seconds SECOND)', array('seconds'=>$ttl));\n\t}", "title": "" }, { "docid": "0e164b1d009d68176145bf353fe7c504", "score": "0.58382666", "text": "public function afterDelete()\n {\n \\PProject::model()->updateAll([\n 'artist_id' => new \\CDbExpression('NULL')\n ], 'artist_id = :artist_id', [\n ':artist_id' => $this->id\n ]);\n }", "title": "" }, { "docid": "134d49e26e89f529b9531a6178cf7847", "score": "0.58276075", "text": "public function purgeVersionTable()\n\t{\n\t\t$objDatabase = \\Database::getInstance();\n\n\t\t// Truncate the table\n\t\t$objDatabase->execute(\"TRUNCATE TABLE tl_version\");\n\n\t\t// Add a log entry\n\t\t$this->log('Purged the version table', __METHOD__, TL_CRON);\n\t}", "title": "" }, { "docid": "f9907f18b236ec09e5d7ebb315fea388", "score": "0.58274287", "text": "public function clean(){\n\t\t$sql = 'DELETE FROM aluno';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "title": "" }, { "docid": "8f87e6a849930e551aaf4663be3c8a2b", "score": "0.58102906", "text": "private function purgeTables()\n\t{\t\n\t\t$this->db->query(\"DELETE FROM categories\");\n\t\t$this->db->query(\"DELETE FROM album_art\");\n\t\t$this->db->query(\"TRUNCATE TABLE albums\");\n\t\t\n\t}", "title": "" }, { "docid": "a19600ef9b00ea1170ee109101c7072f", "score": "0.58067876", "text": "function deleteall() {\n\t\t$this->_query( \"DELETE FROM $0\" );\n\t}", "title": "" }, { "docid": "414ed2b060b77bc8e77468ed248b9c95", "score": "0.58047116", "text": "protected function clearAllPersistentData()\r\n {\r\n }", "title": "" }, { "docid": "42a431e920195ccbc1a45103d62ab23e", "score": "0.5801266", "text": "public function actionClean()\n {\n $old_time = date('Y-m-d H:m:s', strtotime('-1 hour'));\n $users = User::find()\n ->where(['confirm' => 0])\n ->andWhere(['<','create_date', $old_time])\n ->each();\n\n\n foreach($users as $user) {\n\n\n $user->delete();\n\n }\n\n return ExitCode::OK;\n }", "title": "" }, { "docid": "bbe835f2a6b01ac0abb3811d67e7720e", "score": "0.5800661", "text": "protected function delete_old() {\n // this will delete anything odler than 30 days\n $search = 'BEFORE \"' . date(\"j F Y\", strtotime(\"-30 days\")) . '\"';\n $emails = imap_search($this->mbox, $search, SE_UID);\n if(!empty($emails)){\n foreach($emails as $email){\n try {\n imap_delete($this->mbox, $email, FT_UID);\n }\n catch (\\Exception $e) {\n print \"Error processing email (UID $email): \" . $e->getMessage() . \"\\n\";\n }\n }\n }\n\n imap_expunge($this->mbox);\n }", "title": "" }, { "docid": "41ed8dd937b0c96ee7aac95103895fcb", "score": "0.57983065", "text": "protected function cleanApplication() {\n @unlink('sql.db');\n }", "title": "" }, { "docid": "288e0078d0cb64dba7d8938340d515c6", "score": "0.579036", "text": "public function destroy() {\n\t\t$sql = 'DELETE FROM ' . static::$table . ' WHERE id = ' . $this->get('id') . ';';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute();\n\t}", "title": "" }, { "docid": "0088ee332f1c49864a50d20022f5ba96", "score": "0.57897544", "text": "public function clearDatabase()\n {\n $purger = new ORMPurger($this->getEntityManager());\n $purger->purge();\n }", "title": "" }, { "docid": "8f60b2ad6f19aa3b4d8f870c3ebb769f", "score": "0.57882285", "text": "function clean(){\n global $wpdb;\n global $DOPBSP;\n \n $wpdb->query('DELETE FROM '.$DOPBSP->tables->reservations. ' WHERE token <> \"\" AND ((check_out < \"'.date('Y-m-d').'\" AND check_out <> \"\") OR (check_in < \"'.date('Y-m-d').'\" AND check_out = \"\"))');\n $wpdb->query('UPDATE '.$DOPBSP->tables->reservations.' SET status=\"expired\" WHERE status <> \"expired\" AND ((check_out < \"'.date('Y-m-d').'\" AND check_out <> \"\") OR (check_in < \"'.date('Y-m-d').'\" AND check_out = \"\"))');\n }", "title": "" }, { "docid": "46b6db77c8b788d66538b4b93dcfb5d6", "score": "0.57853264", "text": "function _clean($max) {\n $old = time() - $max;\n \n return ee()->db->where('access <', $old)\n ->delete($this->table_name);\n }", "title": "" }, { "docid": "1461486b884fa85668c509789ffd1be5", "score": "0.5782489", "text": "public function deleteAll(){\n try {\n $this->getTable()->delete();\n } catch (\\Exception $e) {\n $this->handleException($e);\n }\n return;\n }", "title": "" }, { "docid": "056b0d33f6bd979372561240379edd22", "score": "0.57798815", "text": "function undelete() {\n\t\t$query = \"UPDATE \".$this->table.\" SET \".$this->deleted_field.\" = '0'\".$this->where_this();\n\n\t\t$this->db->query($query);\n\n\t}", "title": "" }, { "docid": "a3233a391324f0188610adf82ecedde6", "score": "0.5761396", "text": "public function delete_all() {\n\t\t$this->_cache = array();\n\t\t$this->_collections = array();\n\t}", "title": "" }, { "docid": "778a3bad60c7a3f975a2998e5b4d4a82", "score": "0.57593536", "text": "public function resetDatabase(): void\n {\n $this->exec('DELETE FROM fo_forms');\n $this->exec('ALTER TABLE fo_forms AUTO_INCREMENT=1000');\n }", "title": "" }, { "docid": "5c5c7a0ce21ebe9dbaf140c02192fc00", "score": "0.57541823", "text": "public function removeAll() {\n $sql = 'SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE course';\n \n $connection_manager = new connection_manager();\n $conn = $connection_manager->connect();\n \n $stmt = $conn->prepare($sql);\n \n $stmt->execute();\n $count = $stmt->rowCount();\n }", "title": "" }, { "docid": "5bedc296c4cb3167cb303eabcf027f49", "score": "0.5747714", "text": "public function delete()\n {\n $this->db->delete($this->table, $this->data['id'], $this->key);\n }", "title": "" }, { "docid": "f168dfa10b2c99170ac4c23904cdd777", "score": "0.5745645", "text": "private function removeExpiredCarpools()\n {\n $this->db->query(CaronaDAO::QUERY_SET_EXPIRED_CARPOOLS);\n\n $this->db->execute();\n error_log(\"Erro: \" . $this->db->getError());\n\n }", "title": "" }, { "docid": "fc7950512262b06193fe57d07078cdd4", "score": "0.5745345", "text": "private function _cacheCleanup()\n\t {\n\t\t$this->_db->exec(\n\t\t \"DELETE FROM `HTTPcache` WHERE \" .\n\t\t \"`datetime` < DATE_SUB(NOW(), INTERVAL \" . $this->_expiry . \" SECOND) OR `expiry` < NOW()\"\n\t\t);\n\t }", "title": "" }, { "docid": "a117dceffbfa0f0bbe164f4e01455465", "score": "0.57450503", "text": "public function Upkeep() {\n \n $this->_Upkeep_Entry_Notes_Table();\n }", "title": "" }, { "docid": "dcb047e34df9990408343a81cffadb31", "score": "0.573863", "text": "function clear_old_temp_keys($limit = 10){\n\t\t$date = new DateTime(date(\"Y-m-d H:i:s\"));\n\t\terror_log(\"new date \" . $date->format(\"Y-m-d H:i:s\"));\n\t\t$date->sub(new DateInterval('PT1H'));\n\t\t$datef = $date->format('Y-m-d H:i:s');\n\t\terror_log(\"1 Hour ago: $datef\");\n\t\t$query = \"DELETE FROM api_temp_keys WHERE created < '$datef' LIMIT $limit\";\n\t\terror_log($query);\n\t\t$stmt = $this->conn->prepare($query);\n\t\t$success = $stmt->execute();\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "26356695570afa6efa6ee7e183605283", "score": "0.5736082", "text": "public function unload()\n {\n\n $this->synchronized = true;\n $this->id = null;\n $this->newId = null;\n $this->data = [];\n $this->savedData = [];\n $this->orm = null;\n\n $this->multiRef = [];\n $this->i18n = null;\n\n }", "title": "" }, { "docid": "89bfd2daa0b918ebcb31cb3fa180dd0f", "score": "0.5734755", "text": "public function clear() {\n\t\t$this->_where\t\t= array();\n\t\t$this->_order\t\t= array();\n\t\t$this->_isAddingNew\t= false;\n\t\t$this->_currentRow\t= 0;\n\t\t$this->_relationship\t= array();\n\t\t$this->_recordset\t= array();\n\t\t$this->_updateBuffer\t= array();\n\t\t$this->_limit\t\t= NULL;\n\t\t$this->_offset\t\t= NULL;\n\t\t$this->isDirty( false );\n\t}", "title": "" }, { "docid": "727fcb8f90a9b701f97358dcb84b375b", "score": "0.5733632", "text": "public function run()\n {\n Model::unguard();\n\n DB::table('documents__objects')->delete();\n DB::table('documents__pool')->delete();\n }", "title": "" }, { "docid": "c0237137c02c833e4eb0e0b2cfcfb1ae", "score": "0.5732618", "text": "public function updated(): void\n {\n Cache::forget('users');\n }", "title": "" }, { "docid": "4acaa2e7dfec108407a67ea2256521bf", "score": "0.5732257", "text": "public function reset()\n {\n $db = PDOController::getInstance();\n \n $req = $db->prepare(\"TRUNCATE TABLE `executedtask` \");\n $req->execute([]);\n }", "title": "" }, { "docid": "9073801dfc5feea4c8659cf8c4efb48b", "score": "0.57312316", "text": "public function destroy(): void\n {\n foreach ($this->getAll() as $k => $v) {\n if (strlen(strval($k)) > 0) {\n $this->remove($k);\n }\n }\n return;\n }", "title": "" }, { "docid": "241b244dfac3bca399068994c88751b2", "score": "0.57261753", "text": "private function removeOldResults($key){\n\t\tSearch::where('key', '=', $key)->delete();\n\t}", "title": "" }, { "docid": "490e4d63ea2ba51d6f588f2b82d0d762", "score": "0.5724795", "text": "public function erase() {\n\t\tif ($this->empty) {\n\t\t\ttrigger_error(self::TEXT_AxonEmpty);\n\t\t\treturn;\n\t\t}\n\t\tif (method_exists($this,'beforeErase'))\n\t\t\t// Execute beforeErase event\n\t\t\t$this->beforeErase();\n\t\t$_cond=$this->criteria;\n\t\tF3::sql(\n\t\t\t'DELETE FROM '.$this->table.\n\t\t\t\t(is_null($_cond)?'':(' WHERE '.$_cond)).';',\n\t\t\t$this->db\n\t\t);\n\t\t$this->reset();\n\t\tif (method_exists($this,'afterErase'))\n\t\t\t// Execute afterErase event\n\t\t\t$this->afterErase();\n\t}", "title": "" } ]
ed3b613e0c699d7febf486e37c68595f
Determine whether the user can create portfolios.
[ { "docid": "2b946a92312ad4f096d29c2a72517f5b", "score": "0.0", "text": "public function index(User $actor)\n {\n return $actor->enabled == 1;\n }", "title": "" } ]
[ { "docid": "4f7c6b321b8d5603f75ecddcf8ad8540", "score": "0.69094145", "text": "public function can_create() {\n\t\t$cap = get_post_type_object( Tribe__Events__Main::ORGANIZER_POST_TYPE )->cap->edit_posts;\n\n\t\treturn current_user_can( $cap );\n\t}", "title": "" }, { "docid": "b94914caa5c74c3bcfa38cddf9200130", "score": "0.6699933", "text": "private function canCreateCategory()\r\n {\r\n return JFactory::getUser()->authorise('core.create', 'com_jvoter');\r\n }", "title": "" }, { "docid": "25aa2847db42e7488247811998216137", "score": "0.6684955", "text": "public function authorize()\n {\n return $this->user()->can('create', Pasien::class);\n }", "title": "" }, { "docid": "47970eb83b3aa3c8885442e22d0ba9b2", "score": "0.66286576", "text": "public function create(User $user)\n {\n return $user->hasPermissionTo('create office');\n }", "title": "" }, { "docid": "c77a5cf2e1545080184c106091aa48d0", "score": "0.66191214", "text": "public function isUserCreatable();", "title": "" }, { "docid": "cea179efe89e123f9eb6236f2e079dba", "score": "0.65800214", "text": "public function canCreateExperiences()\n {\n $viewer = Engine_Api::_()->user()->getViewer();\n if( !$viewer || !$viewer->getIdentity() ) {\n return false;\n }\n\n // Must be able to create experiences\n if( !Engine_Api::_()->authorization()->isAllowed('experience', $viewer, 'create') ) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "219f9c70be72705897c3ae8985848e0e", "score": "0.6567842", "text": "public function canCreate() {\n\t\treturn in_array(Session::getRole(),$this->_Authors);\n\t}", "title": "" }, { "docid": "8ce470f2e4da91e94943926909563c01", "score": "0.65392053", "text": "function canAddViaPortal($portal, $add_permission_name = null) {\n \treturn $portal->getProjectPermissionValue($add_permission_name) >= PROJECT_PERMISSION_CREATE;\n }", "title": "" }, { "docid": "bdafa7b19a5e6d294ce1000e608b804a", "score": "0.6535044", "text": "public function allowsCreate() : bool;", "title": "" }, { "docid": "74501d5181b7d3157b8ca41e1af056db", "score": "0.64825284", "text": "public function create(User $user)\n {\n return $user->hasPermissionTo('Crear Propietario');\n }", "title": "" }, { "docid": "2b5425575e4324e447a61726b128d5ba", "score": "0.6447139", "text": "public function create(User $user)\n {\n return $user->can('create-report');\n }", "title": "" }, { "docid": "573299cfd26f1d25d793037a764e6059", "score": "0.6425503", "text": "public function canCreate();", "title": "" }, { "docid": "573299cfd26f1d25d793037a764e6059", "score": "0.6425503", "text": "public function canCreate();", "title": "" }, { "docid": "573299cfd26f1d25d793037a764e6059", "score": "0.6425503", "text": "public function canCreate();", "title": "" }, { "docid": "79f5183e68e7cc777250924178b9d8fc", "score": "0.6411225", "text": "public function create()\n {\n return auth()->user()->can('post_create');\n }", "title": "" }, { "docid": "200ac0a6ce4da7db075667a7a1d12c04", "score": "0.6379086", "text": "public function create(User $user)\n {\n return $user->hasRole('Admin') || $user->hasPermissionTo('create_pisos');\n }", "title": "" }, { "docid": "d909ba59192579da152417fe7aa1ad47", "score": "0.6373042", "text": "public function authorize()\n {\n return $this->user()->can('create');\n }", "title": "" }, { "docid": "e3c854497882733e0d97464c74d816cb", "score": "0.63658273", "text": "public function create(User $user)\n {\n return $user->can('create sports');\n }", "title": "" }, { "docid": "6d4ef195ab7ef8b1d62b555b92fdb3b3", "score": "0.6345615", "text": "public function create(User $user)\n {\n return $user->canDo('product.product.create');\n }", "title": "" }, { "docid": "4cd3aa997d50221710d1054be12d871a", "score": "0.63352853", "text": "function canPortalSubtask($portal) {\n \tif(!$this->can_have_tasks) {\n \t\treturn false;\n \t} // if\n \t\n \tif($this->permission_name && ($portal->getProjectPermissionValue($this->permission_name) >= PROJECT_PERMISSION_CREATE)) {\n return true;\n } // if\n \n return false;\n }", "title": "" }, { "docid": "0af4be87c9a0db820e126b5c32301571", "score": "0.6323949", "text": "public function authorize()\n {\n return auth()->user()->can('lead-create');\n }", "title": "" }, { "docid": "e021877939c16ce4bfbfe9ff079b0c2c", "score": "0.63025343", "text": "public function create(Request $request)\n {\n return current_user_can('manage_options');\n }", "title": "" }, { "docid": "fa22534fb01e924f0fc4d8b78abb2777", "score": "0.630044", "text": "public function canCreate(User $user, Project $project): bool\n {\n if ($this->authorizationChecker->isGranted(User::ROLES[User::ROLE_ADMIN])) {\n return true;\n }\n\n // if we are not a PM get out\n if (!$this->authorizationChecker->isGranted(User::ROLES[User::ROLE_PROJECT_MANAGER])) {\n return false;\n }\n\n return !!$this->assignedUserManager->getAssignedUserFor($project, $user);\n }", "title": "" }, { "docid": "c29a8024af91946f59922e0d1f0fba44", "score": "0.6296963", "text": "public function canCreate()\n {\n return $this->securityContext->isGranted($this->createRole);\n }", "title": "" }, { "docid": "a2ada3fc0478533b1cb6a4ce2404dd90", "score": "0.62956643", "text": "public function create(User $user)\n {\n\t\treturn in_array('create', $user->permissibles('post'));\n }", "title": "" }, { "docid": "30eb4a1e0ca2de97724d176a94dc2fbd", "score": "0.6273497", "text": "public function create(User $user)\n {\n return $user->hasPermissionTo('accommodations/create');\n }", "title": "" }, { "docid": "65daac979f56b2b2cea7ac0456ea9f19", "score": "0.6258895", "text": "public function create(User $user)\n {\n return $user->can('create sport_courts');\n }", "title": "" }, { "docid": "a8a2e82a86bee1dba6298225761ee8ad", "score": "0.6253405", "text": "public function create(User $user) {\n return $user->can('create-permission');\n }", "title": "" }, { "docid": "71ffdfabc99b359bf4829c9220590e9e", "score": "0.62446773", "text": "public function create(User $user)\n {\n //\n return $user->hasPermissionTo('do_action');\n }", "title": "" }, { "docid": "3f79edb3599c1ece6c4157ccdcc74a1e", "score": "0.6222065", "text": "function canAdd($user) {\n \treturn $user->isAdministrator() || ($user->getSystemPermission('use_time_reports') && $user->getSystemPermission('manage_time_reports'));\n }", "title": "" }, { "docid": "c165b9cc69caccd617d87e44a9dcc449", "score": "0.6203303", "text": "public function authorize()\n {\n return $this->user()->can('user_create');\n }", "title": "" }, { "docid": "cdde12ff1451d74479384adc5e08d093", "score": "0.61853826", "text": "public function create(User $user)\n {\n return $user->can('create-meeting');\n }", "title": "" }, { "docid": "6eb975b6c1950688b90c4f912959727e", "score": "0.61845374", "text": "public function authorize()\n {\n return hasPermission('menu_create');\n }", "title": "" }, { "docid": "8efd2c9b7e6e3920c30c102f8c6208c6", "score": "0.6154212", "text": "public function authorize()\n {\n if (request()->user()->can('blog_create')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "52cc1e521cc7b84f76f3c71d05c9288f", "score": "0.614661", "text": "public function create(User $user) {\n return $user->hasPermissions(['filials_create']);\n }", "title": "" }, { "docid": "fdd2dc922268c9c846025ad71d0005c3", "score": "0.6140678", "text": "public function authorize()\n {\n return $this->user()->can('Crear Tickets');\n }", "title": "" }, { "docid": "8efcd7dbefc0c710bcb4dc41259a7086", "score": "0.6136265", "text": "public function authorize()\n {\n return $this->user()->can('create-promotion');\n }", "title": "" }, { "docid": "053ddae9d9aaa964ae4ffb114dfc3e71", "score": "0.61317325", "text": "public function create(User $user)\n {\n return $user->hasPermissionTo('create resproducts');\n }", "title": "" }, { "docid": "c99700b8b0c224077c9c31edcf83c547", "score": "0.61202306", "text": "public function create(User $user)\n {\n return $user->canDo('store.store.create');\n }", "title": "" }, { "docid": "29e90ece9a8f7af771622ac2bfbd9711", "score": "0.6119573", "text": "public function authorize()\n {\n return Gate::check('create', new Project);\n }", "title": "" }, { "docid": "ad871876c889945bfdc92a834b0d094f", "score": "0.61172956", "text": "function bp_docs_current_user_can_create_in_context() {\n\tif ( function_exists( 'bp_is_group' ) && bp_is_group() ) {\n\t\t$can_create = current_user_can( 'bp_docs_associate_with_group', bp_get_current_group_id() );\n\t} else {\n\t\t$can_create = current_user_can( 'bp_docs_create' );\n\t}\n\n\treturn apply_filters( 'bp_docs_current_user_can_create_in_context', $can_create );\n}", "title": "" }, { "docid": "ff185e2d5d34b965990dcdc13fa7fbe1", "score": "0.6115081", "text": "public function create(User $user)\n {\n return $user->hasPermission('guide-create');\n }", "title": "" }, { "docid": "16cd860214cc8d766279c5b37c21491f", "score": "0.6114297", "text": "public function create(User $user): bool\n {\n return $user->can('write-roles-and-permissions');\n }", "title": "" }, { "docid": "f91bc7f1ae7168733fc5906463d1eea4", "score": "0.6112866", "text": "public function create(User $user)\n {\n return $user->can('create players');\n }", "title": "" }, { "docid": "8252dda4f274d5a1ce457034f1745fac", "score": "0.61036706", "text": "public function authorize() {\n return $this->user()->can('create', Invoice::class);\n }", "title": "" }, { "docid": "bfbcc433720e08b9be44f8d11f2870c9", "score": "0.60942477", "text": "public function create()\n {\n return \\Auth::user()->hasRight('create-contact');\n }", "title": "" }, { "docid": "01964c70ce2f6b4963969e7398711f05", "score": "0.6089054", "text": "public function authorize()\n {\n return $this->user()->can('create-link');\n }", "title": "" }, { "docid": "bcf68a46abc45bfb22e558f95182e58d", "score": "0.6088527", "text": "public function create(User $user)\n {\n return $user->hasPermissionTo('create shipments');\n }", "title": "" }, { "docid": "83ec433e19de16c4f53a96e17ace5a4d", "score": "0.60674804", "text": "public function allowsUserCreation() : bool\r\n {\r\n return false;\r\n }", "title": "" }, { "docid": "4b1ffa2ce21501c261c5cc913096b3c5", "score": "0.60665303", "text": "public function create(User $user)\n {\n $can_create = null;\n $roles = $user->roles()->get();\n\n foreach ($roles as $role) {\n if ($role->permissions()->get()->contains('slug', '=', 'create_assignment')) {\n $can_create = true;\n }\n }\n\n return $can_create;\n }", "title": "" }, { "docid": "c1f25cdfee2f396d337cdf94d14a3b4b", "score": "0.6063118", "text": "public function create(User $user)\n {\n return $user->canDo('career.resume.create');\n }", "title": "" }, { "docid": "7945cc9db4920239b75ce47bb2a3c4f2", "score": "0.6054476", "text": "public function publicCreate($user)\n {\n return User::findOrFail($user->id)->hasPermission('laralum::tickets.create-public');\n }", "title": "" }, { "docid": "dafd26e7828ef6ad2f549c313db092d6", "score": "0.6048051", "text": "public function authorize()\n {\n // who can add new task?\n // 1- admin\n if (auth()->user()->isAdmin() || auth()->user()->can('task-create')) {\n return true;\n }\n\n if($this->route('project_id')){\n $project_id =$this->route('project_id');\n $project = Project::find($project_id);\n\n if (!$project) {\n throw new ItemNotFoundException($project_id);\n }\n\n //2- people who is assign to this projects\n foreach ($project->assigns as $assign) {\n if ($assign->id == auth()->user()->id) {\n return true;\n }\n }\n }\n\n\n\n\n return false;\n }", "title": "" }, { "docid": "9a7b790f5c8beb6087a2a16d9d717f66", "score": "0.6037643", "text": "public function create(User $user)\n {\n //\n return $user->can('Create User');\n }", "title": "" }, { "docid": "031be6774cfcdc33138fafdf2801735e", "score": "0.6036204", "text": "public function create(User $user)\n {\n return $user->is_permitted_to('create', Permission::table());\n }", "title": "" }, { "docid": "ced82f554b4d5b744c93ff76d2efa494", "score": "0.6035583", "text": "public function create(User $user)\n {\n return $user->hasPermissionTo('product_category.create', 'admin');\n }", "title": "" }, { "docid": "11b26b625ba92fc5db78380f6b8d2201", "score": "0.6031149", "text": "function canAdd($user, $project, $add_permission_name = null) {\n return $user->getProjectPermission($add_permission_name, $project) >= PROJECT_PERMISSION_CREATE;\n }", "title": "" }, { "docid": "76025fabff44f70d5b31d695f2742e3e", "score": "0.60223526", "text": "public function create(User $user)\n {\n return $user->hasRole('Admin') || $user->hasPermissionTo('Create Roles');\n }", "title": "" }, { "docid": "2a2dc462cfb6e324b59fcac377384b48", "score": "0.60202473", "text": "public function create(Models\\User $user): bool\n {\n return $user->allow(Enums\\PermissionEnum::CreateMenus);\n }", "title": "" }, { "docid": "bed9287d2640468a82efb721456ebd54", "score": "0.60171145", "text": "public function create(User $user): bool\n {\n return $user->can('Create Station');\n }", "title": "" }, { "docid": "4c579393ecc58c86a5069a73c67f149a", "score": "0.60114497", "text": "public function authorize()\n {\n $project_id = $this->get('project_id');\n return auth()->user()->hasProject($project_id);\n }", "title": "" }, { "docid": "e34a2b50c5eb36127fadd5453865b6b1", "score": "0.5998512", "text": "public function create(User $user)\n {\n return $user->has_permission('create-tiposervicio');\n }", "title": "" }, { "docid": "d336df31cdaac77c0ab8f75de5c3333c", "score": "0.5994759", "text": "public function authorize()\n {\n return $this->user()->can('create', new Category);\n }", "title": "" }, { "docid": "3336604a67084ba9e27eae48df57ace7", "score": "0.5994612", "text": "public static function canCreateCalendar() {\n return SecurityUtil::checkPermission('TimeIt::', \"::\", ACCESS_ADMIN);\n }", "title": "" }, { "docid": "b0d259d70e338aa2c5457225d700a222", "score": "0.59863025", "text": "public function authorize()\n {\n return $this->user()->can('time-clock-logs.create');\n }", "title": "" }, { "docid": "5d0175057f00963aad5b1d0a55d2e478", "score": "0.59836394", "text": "public function create(User $user)\n {\n return $user->account_user()->is_admin || $user->account_user()->is_owner || $user->hasPermissionTo(\n 'recurringquotecontroller.store'\n );\n }", "title": "" }, { "docid": "f2ed0de3ac8e9329a34b8f39e4eff118", "score": "0.59790075", "text": "public function canCreateQuestions() {\n $viewer = Engine_Api::_()->user()->getViewer();\n if (!$viewer || !$viewer->getIdentity()) {\n return false;\n }\n\n // Must be able to create questions\n if (!Engine_Api::_()->authorization()->isAllowed('question', $viewer, 'create')) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "c0deaeb1a74dce3e704dbffd7248a0c1", "score": "0.59774", "text": "private function canList():bool\n {\n if ($this->decisionManager->decide($this->token, ['ROLE_ADMIN'])) {\n return true;\n }\n\n $userHasProjects = $this->user->getUserHasProjects();\n if (\\count($userHasProjects) > 0) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "918f20f8e83e99930ce728b6b3f4e016", "score": "0.5966238", "text": "public function create(User $user)\n {\n return $user->hasPermissionTo('create settings');\n }", "title": "" }, { "docid": "ec65dcbba8e8974d2e41455106c582b3", "score": "0.5965017", "text": "public function canCreateAccount()\r\n {\r\n if (strstr($this->_returnAllowed(), self::CUSTOMER_ACCOUNT_CREATE))\r\n {\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "78cac981cf3d397502a5f35e257470b8", "score": "0.5958135", "text": "public function authorize()\n {\n return Gate::allows('user_own_project', Position::findOrFail(request()->route()->position)->Project);\n }", "title": "" }, { "docid": "ca2b601f044ff1a22c13d26213fe1136", "score": "0.5956008", "text": "public function create(User $user)\n {\n return $user->role->name == 'admin' || $user->role->name == 'project_manager';\n }", "title": "" }, { "docid": "72e402e04790c4cbdb4ead99eac9c009", "score": "0.59451246", "text": "protected function allowAdd($data = array())\n {\n return JFactory::getUser()->authorise('core.create', 'com_pfprojects');\n }", "title": "" }, { "docid": "9a80ed50b86d428d074c6b8f614c271e", "score": "0.5942656", "text": "public function create(User $user)\n {\n return $user->isAdmin() || $user->isSupervisor();\n }", "title": "" }, { "docid": "13e49d5dbd137a7b09d8840b88b7a6f2", "score": "0.5933733", "text": "public function create(User $user)\n {\n return $user->isCommittee();\n }", "title": "" }, { "docid": "d9de2e5baf7bdd21c91b83ecff509db8", "score": "0.5933652", "text": "public function create(User $user): bool\n {\n return $user->can('create-membership-agreement-templates');\n }", "title": "" }, { "docid": "c3dc1b975c5fa17f8c094bc6827b5d70", "score": "0.59331965", "text": "public function canCreate($name);", "title": "" }, { "docid": "d2ca2166d6a8ab84d4cb0c17e8cad838", "score": "0.5930074", "text": "public function authorize()\n {\n return \\Entrust::can('create_tour');\n }", "title": "" }, { "docid": "ed76594ff36558a2b82327074783d623", "score": "0.5923383", "text": "public function create(User $user)\n {\n if ($user->can('create_role') || $user->can('manage_roles')) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "8f3cc42f6b0290b3562a6022a6fdcfdc", "score": "0.59228843", "text": "private function canCreate(?AssignedUser $assignedUser): bool\n {\n if ($this->authorizationChecker->isGranted(User::ROLES[User::ROLE_ADMIN])) {\n return true;\n }\n\n if ($assignedUser === null) {\n return false;\n }\n\n return $assignedUser->hasPermissions(AssignedUser::PERMISSION_CREATE_TASK);\n }", "title": "" }, { "docid": "d6c0c3b94e2408440e9b968490b9aedc", "score": "0.59211636", "text": "public function authorize()\n {\n return $this->user()->can(\\App\\TypeDepartement::canedit());\n }", "title": "" }, { "docid": "772c31f3702a1e66d2640518ecb82d3e", "score": "0.5914275", "text": "public function create(User $user)\n {\n return $user->can('create courses');\n }", "title": "" }, { "docid": "af81535a276a2bbf8c02bfd868ddad93", "score": "0.5912823", "text": "public function staffCreate(User $user){\n\t\tif($user->hasPermission('user') && $user->hasPermission('department')){\n\t\t\treturn true;\n\t\t}\n \t// The user with Owner or Admin permission can view staffs\n return ($user->owner() || $user->admin() || $user->leader());\n\t }", "title": "" }, { "docid": "35490d2abbb08cfeada68beb80866f7e", "score": "0.5904284", "text": "public function create(User $user)\n {\n if ($user->can('create users')) {\n return true;\n }\n }", "title": "" }, { "docid": "4cc94e88ee32082b88d3c7769954ef76", "score": "0.58992493", "text": "public function create(UserPolicy $user)\n {\n return $user->canDo('career.job.create');\n }", "title": "" }, { "docid": "da75b3c38ad000a0c018887c6fb91dc3", "score": "0.58967996", "text": "public function create(User $user)\n {\n return $user->hasPermissionTo('create job_schedule');\n }", "title": "" }, { "docid": "911ea5dec2d3573e24f3ddbb16576b77", "score": "0.58853173", "text": "public function pre_can_user( $verdict, $args ) {\n\t\t// Logged out users have no permissions.\n\t\tif ( ! is_user_logged_in() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// No user is allowed to delete something.\n\t\tif ( 'delete' === $args['action'] ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Administrators on global.wordpress.org are considered global admins in GlotPress.\n\t\tif ( $this->is_global_administrator( $args['user_id'] ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Grant permissions to Cross-Locale PTEs.\n\t\t$cross_locale_pte_verdict = Cross_Locale_PTE::gp_pre_can_user( $verdict, $args );\n\t\tif ( is_bool( $cross_locale_pte_verdict ) ) {\n\t\t\treturn $cross_locale_pte_verdict;\n\t\t}\n\n\t\t// No permissions for unknown object types.\n\t\tif ( ! in_array( $args['object_type'], array( 'project|locale|set-slug', 'translation-set', 'translation' ), true ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get locale and current project ID.\n\t\t$locale_and_project_id = (object) $this->get_locale_and_project_id( $args['object_type'], $args['object_id'], $args );\n\t\tif ( ! $locale_and_project_id ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$set_path = $locale_and_project_id->locale . '/' . $locale_and_project_id->set_slug;\n\t\tif ( \\in_array( $set_path, self::READ_ONLY_TRANSLATION_SETS, true ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Allow logged in users to submit translations.\n\t\tif ( 'edit' == $args['action'] && 'translation-set' === $args['object_type'] ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Grant permissions to import plugin/theme translations with status 'waiting'.\n\t\tif ( 'import-waiting' === $args['action'] ) {\n\t\t\treturn $this->is_plugin_or_theme_project( $locale_and_project_id->project_id );\n\t\t}\n\n\t\t// The next checks are only for the 'approve' action, no permissions for other actions.\n\t\tif ( 'approve' !== $args['action'] ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Simple check to see if they're an approver or not.\n\t\t$role = $this->is_approver_for_locale( $args['user_id'], $locale_and_project_id->locale );\n\t\tif ( ! $role ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Locale managers are allowed to approve all projects.\n\t\tif ( self::LOCALE_MANAGER_ROLE === $role ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Grab the list of Projects (or 'all') that the user can approve.\n\t\t$project_access_list = $this->get_project_id_access_list( $args['user_id'], $locale_and_project_id->locale );\n\t\tif ( ! $project_access_list ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Short circuit the check if user can approve all projects.\n\t\tif ( in_array( 'all', $project_access_list ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If current project is a parent ID.\n\t\tif ( in_array( (string) $locale_and_project_id->project_id, $project_access_list, true ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// A user is allowed to approve sub projects as well.\n\t\t$parent_project_ids = $this->get_parent_project_ids( $locale_and_project_id->project_id );\n\t\tif ( array_intersect( $project_access_list, $parent_project_ids ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f359428333babaaaa2cecf84f082b1fc", "score": "0.5885032", "text": "public function create(User $user)\n {\n return $user->access_level > 0;\n }", "title": "" }, { "docid": "d7e155220edadf20a68f7ad3bc044b4f", "score": "0.58796227", "text": "public function create(User $user)\n {\n if ( $user->can('create style option') ) {\n return true;\n }\n }", "title": "" }, { "docid": "3e9710c8b3d64d52e674a34bff6c95f9", "score": "0.5878035", "text": "protected function __canCreate() : bool|ReturnHelper {\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "a2e8ea7f8fed508c6a8b708b3d532be6", "score": "0.58752614", "text": "public function authorizePost()\n {\n return $this->user()->can('scripts.create');\n }", "title": "" }, { "docid": "d4e664d5a2100328e8044d4752c2db40", "score": "0.5871216", "text": "public function create()\n {\n return can_not_access('create');\n }", "title": "" }, { "docid": "0e0472c9bbd5dec6ebaab7ee8ffafb23", "score": "0.5869499", "text": "public function create(User $user)\n {\n return $user->hasPermissionTo('Create articles');\n }", "title": "" }, { "docid": "d3a311ed7ad9fd3f906fda491878367e", "score": "0.5865637", "text": "public function authorize()\n {\n // $post = Post::find($this->route('post.create'));\n\n // return $post && $this->user()->can('create', $post);\n return true;\n }", "title": "" }, { "docid": "cdbdb0a35e8ad28583748a31d82a671a", "score": "0.5864343", "text": "public function authorize()\n {\n\t\treturn $this->user()->can('create', Volume::class);\n }", "title": "" }, { "docid": "d9d666b2ac5a99f12eefe476589985d9", "score": "0.5859532", "text": "public function create(User $user)\n {\n return $user->hasPermissionTo('hotels.write');\n }", "title": "" }, { "docid": "122b8640dfec569f14598741f36466f0", "score": "0.58524173", "text": "public function create(User $user)\n {\n return $user->hasPermissionTo('create usermeetingrooms');\n }", "title": "" }, { "docid": "1caf694f5d207ef5c05e2f1789319e8b", "score": "0.5842265", "text": "public function authorize()\n {\n if (auth()->user()->Project->count() >= config('settings.max_project_upload')) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "b4dada2e4a32de33500367faf258ac3f", "score": "0.58417404", "text": "public function canPostJob(){\n $role = $this->role;\n if ($role === 'employer') return true;\n else return false;\n }", "title": "" }, { "docid": "35cf742a88adc3866153a164a83ade0e", "score": "0.58297443", "text": "public function create(User $user)\n {\n\t\tif($user->hasPermission('user')){\n\t\t\treturn true;\n\t\t}\n return ($user->owner() || $user->admin());\n }", "title": "" }, { "docid": "c1f6fbbf6fe0bd61326dbab36bd9237d", "score": "0.58295614", "text": "public function create(User $user)\n {\n return $user->hasPermission('create-myhistory-couple');\n }", "title": "" } ]
245b07baced037fb97946f7aca3be7be
para traer lo que esta en subtema a recomendacion
[ { "docid": "218dcd86f32718d49957425d81f54c67", "score": "0.0", "text": "public function subtemasV2(){\n return $this->hasOne('App\\Subtema', 'id', 'subtema_id');\n }", "title": "" } ]
[ { "docid": "6b2784919bbd9ca4c87e063c87aa3220", "score": "0.60806984", "text": "function recuperarComite(){\n\n\t\t$this->procedimiento='adq.f_solicitud_sel';\n\t\t$this->transaccion='ADQ_RMEMOCOMDCR_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n\t\t//Definicion de la lista del resultado del query\n\n\n\t\t$this->captura('funcionario','text');\n\t\t$this->captura('proveedor','varchar');\n\t\t$this->captura('tramite','varchar');\n\t\t$this->captura('nombres','varchar');\n\t\t$this->captura('fecha_po','varchar');\n\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t//var_dump($this->consulta);exit;\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "938180f37c3bdb6cde8a254259b07ce9", "score": "0.5871578", "text": "public function competicionReciente(){\n\t\t$comp = Competicion::find($this->competiciones->max('id'));\n\n\t\treturn $comp;\n\t\t/*\n\t\tif($comp->comenzada())\n\t\t\treturn $comp;\n\t\telse{\n\t\t\t/*$comp=Competicion::where('id', '<', $comp->id)\n\t\t\t->Where('tcompeticion_id', '=', $comp->tcompeticion_id)\n\t\t\t->max('id');x\n\t\t\t$c = DB::table('competiciones')\n\t\t\t->where('tcompeticion_id', $comp->tcompeticion_id)\n\t\t\t->whereBetween('id', array(1, $comp->id))\n\t\t\t->first();\n\t\t\t\n\t\t\treturn $c;\n\t\t}*/\n\t}", "title": "" }, { "docid": "cb131e04bb553622c2862c6d9c1d5eb6", "score": "0.585472", "text": "public function docentesPreescolar(){\r\n try {\r\n if($this->verificarSession()){\r\n $this->vista->set('titulo', 'estudiantes Preescolar');\r\n $salon = new Salon();\r\n $preescolar = $salon->leerSalonesPreescolar();\r\n $this->vista->set('preescolar', $preescolar);\r\n return $this->vista->imprimir();\r\n }\r\n } catch (Exception $exc) {\r\n echo 'Error de aplicacion: ' . $exc->getMessage();\r\n }\r\n }", "title": "" }, { "docid": "563645a06b8246a293587c30f2415ccd", "score": "0.5790142", "text": "function retour_vente($idArt)\n{\n\tglobal $db, $user;\n \n if (empty($_POST['TXT_O_comment'])) {\n return array('ok'=>false, 'msg'=>'Le motif de l\\'annualtion de la vente doit être renseigné');\n }\n $motif = $db->quote(substr($_POST['TXT_O_comment'],0,250));\n \n \n // 1 - retrouve le prix de vente de l'article\n $sql = 'SELECT prix_vente FROM article WHERE idarticle='.$idArt; \n $rec = $db->select_one($sql);\n if (empty($rec)) { \n logInfo(\"Erreur SQL : article non trouvé ! sql=$sql\",__FILE__,__LINE__);\n return array('ok'=>false, 'msg'=>'Erreur 1');\n }\n $prix_vente = $rec['prix_vente']; \n // 2 - retrouve la vente\n $sql = \"SELECT vente.idvente, vente.no_caisse, vente.mnt_esp FROM vente INNER JOIN article ON (article.vente_idvente = vente.idvente) WHERE article.idarticle=$idArt\";\n $rec= $db->select_one($sql);\n if (empty($rec)) { \n logInfo(\"Erreur SQL : article non trouvé ! sql=$sql\",__FILE__,__LINE__);\n return array('ok'=>false, 'msg'=>'Erreur 2');\n }\n $new_mnt_esp = $rec['mnt_esp'] - $prix_vente; // MaJ caisse : décaisse le montant de la vente\n $no_caisse = $rec['no_caisse']; \n // 3 - Debiter la caisse : vente négative \n $sql = \"UPDATE vente SET mnt_esp = $new_mnt_esp WHERE idvente={$rec['idvente']}\"; \t\t\n $n = $db->query($sql);\n if($n != 1) {\n logInfo(\"Erreur SQL : n=$n, sql=$sql\",__FILE__,__LINE__);\n return array('ok'=>false, 'msg'=>'Erreur 3');\n }\n // 4 -Conserver la trace du retour \n $sql = \"INSERT INTO retour (participant_idparticipant, date, no_caisse, prix_vente, comment) VALUES ({$user->uid}, Now(), $no_caisse, $prix_vente, $motif)\";\n $id = $db->query($sql);\n if(!$id) {\n logInfo(\"Erreur SQL : sql=$sql\",__FILE__,__LINE__);\n return array('ok'=>false, 'msg'=>'Erreur 4');\n }\n // 5 - MaJ de l'article \n \t$sql = \"UPDATE article SET retour_idretour=$id WHERE idarticle=$idArt\";\n $n = $db->query($sql);\n if($n != 1) {\n logInfo(\"Erreur SQL : n=$n, sql=$sql\",__FILE__,__LINE__);\n return array('ok'=>false, 'msg'=>'Erreur 5');\n } \n\t$msg = \"Vente annulée, retirez \".sprintf('%.02f €', $prix_vente).\" en espèces de la caisse n° {$no_caisse}\";\n\treturn array('ok'=>true, 'msg'=>$msg);\t \n}", "title": "" }, { "docid": "901fb496009460135b9f0ff0c3f85dd8", "score": "0.5788869", "text": "function SeekDocumentacion() {\n $this->query = \"\n SELECT * FROM documentacion\n WHERE (id_actividades = '$this->id_actividades') ;\n \";\n $this->get_one_result_from_query();\n if ($this->feedback['ok']){ // Éxito en la obtención\n if ($this->feedback['code'] == '00002') { // Vuelve vacío\n $this->feedback['code'] = '80010';\n } else { // Vuelve con datos\n $this->feedback['code'] = '80011';\n }\n } else {\n if ($this->feedback['code'] != '00101') // Si no fallo de gestor de BD\n $this->feedback['code'] = '80012'; // Error de obtención\n }\n return $this->feedback;\n \n }", "title": "" }, { "docid": "6706d37ec1de3761dba5e7a224ded7e7", "score": "0.57778513", "text": "public function docentesPrimaria(){\r\n try {\r\n if($this->verificarSession()){\r\n $this->vista->set('titulo', 'docentes Primaria');\r\n $limI='1';\r\n $limS='5';\r\n $salones = new Salon();\r\n $primaria = $salones->leerSalonesJornada($limI,$limS);\r\n $this->vista->set('primaria', $primaria);\r\n return $this->vista->imprimir();\r\n }\r\n } catch (Exception $exc) {\r\n echo 'Error de aplicacion: ' . $exc->getMessage();\r\n }\r\n }", "title": "" }, { "docid": "84d7f68644fc52b702dab8f88d524040", "score": "0.57637656", "text": "function recorer_arbol_factura_resta_ejecutado($conexion, $id_partida, $monto_anterior){\n\n\n $resta = $monto_anterior;\n\n $sql_datos_partida = $conexion -> query(\"select * from maestro_partidas where id = '\".$id_partida.\"'\");\n while($ld = $sql_datos_partida -> fetch_array()){\n $id=$ld['id'];\n $id_categoria=$ld['id_categoria'];\n $ejecutado=$ld['p_ejecutado'];\n $monto_con = $ld['p_monto'];\n $reservado = $ld['p_reservado'];\n }\n\n\n $total_ejecutado = $ejecutado - $resta;\n $total_reservado = $reservado + $resta;\n\n $sql_ejecutado = $conexion ->query(\"UPDATE maestro_partidas SET p_ejecutado = '\".$total_ejecutado.\"' WHERE id = '\".$id.\"'\");\n $sql_reservado = $conexion ->query(\"UPDATE maestro_partidas SET p_reservado = '\".$total_reservado.\"' WHERE id = '\".$id.\"'\");\n\n /* comprovar si llego a su totalidad de monto */\n /*if($sql_insert){\n $sql_up = $conexion ->query(\"UPDATE maestro_partidas SET tiene_pagos = 0 WHERE id = '\".$id.\"'\");\n }*/\n\n if($id_categoria == ''){\n\n }else{\n recorer_arbol_factura_resta_ejecutado($conexion, $id_categoria, $monto_anterior);\n }\n\n }", "title": "" }, { "docid": "3668af2de43b8e4ba24a8ee2b6e72390", "score": "0.575171", "text": "public function estudiantesPreescolar(){\r\n try {\r\n if($this->verificarSession()){\r\n $this->vista->set('titulo', 'estudiantes Preescolar');\r\n $salon = new Salon();\r\n $preescolar = $salon->leerSalonesPreescolar();\r\n $this->vista->set('preescolar', $preescolar);\r\n return $this->vista->imprimir();\r\n }\r\n } catch (Exception $exc) {\r\n echo 'Error de aplicacion: ' . $exc->getMessage();\r\n }\r\n }", "title": "" }, { "docid": "be44e507f2a9f1f8439b6a0e8bd46381", "score": "0.5692905", "text": "public function NuevoEquipoRequerido() {\r\n\t$nuevo = \"SELECT co_equipo_requerido FROM tr033_equipo_requerido\r\n\t\tORDER BY co_equipo_requerido DESC \r\n\t\tLIMIT 1;\";\r\n\t$c = $this->pdo->_query($nuevo);\r\n\t\r\n\t//if(is_object($this->pdo->monitor) && $this->pdo->monitor->notify_select)\r\n\t\t//$this->popNotify(); // Libera posicion reg_padre\r\n\t\t\t\r\n\treturn $c;\r\n }", "title": "" }, { "docid": "e4a8a4e91326d4030d5cbb7413a30350", "score": "0.5681749", "text": "public function recuperarOferta(Solicitud $psolicitud)\n {\n $respuesta = new Respuesta();\n $objLogica = $this->get('logica_service');\n $usuario = new LbUsuarios();\n $sesion = new LbSesiones();\n try {\n //Valida que la sesión corresponda y se encuentre activa\n $respSesionVali= ManejoDataRepository::validaSesionUsuario($psolicitud);\n //echo \"<script>alert(' buscarEjemplares :: Validez de sesion \".$respSesionVali.\" ')</script>\";\n if ($respSesionVali==AccesoController::inULogged) \n { \n //echo \"<script>alert(' recuperarFeedEjemplares :: FindAll ')</script>\";\n //Busca el usuario \n $usuario = ManejoDataRepository::getUsuarioByEmail($psolicitud->getEmail());\n \n //$membresia= ManejoDataRepository::getMembresiasUsuario($usuario);\n \n //echo \"<script>alert('MEM \".count($membresia).\" regs ')</script>\";\n\n $oferta = ManejoDataRepository::getOfertaById($psolicitud->getIdOferta());\n //echo \"<script>alert('Oferta \".$psolicitud->getIdOferta().\" ')</script>\";\n \n if ($oferta != NULL){\n if ($oferta->getInofeactiva() == AccesoController::inExitoso){\n $respuesta->setRespuesta(AccesoController::inExitoso);\n } else {\n $respuesta->setRespuesta(AccesoController::inMenNoAc);\n } \n } else {\n $respuesta->setRespuesta(AccesoController::inMenNoEx);\n }\n \n\n //SE INACTIVA PORQUE PUEDE GENERAR UNA GRAN CANTIDAD DE REGISTROS EN UNA SOLA SESION\n //Busca y recupera el objeto de la sesion:: \n //$sesion = ManejoDataRepository::recuperaSesionUsuario($usuario,$psolicitud);\n //echo \"<script>alert('La sesion es \".$sesion->getTxsesnumero().\" ')</script>\";\n //Guarda la actividad de la sesion:: \n //ManejoDataRepository::generaActSesion($sesion,AccesoController::inDatoUno,\"Recupera Feed de Ejemplares\".$psolicitud->getEmail().\" recuperados con éxito \",$psolicitud->getAccion(),$fecha,$fecha);\n //echo \"<script>alert('Generó actividad de sesion ')</script>\";\n \n return $objLogica::generaRespuesta($respuesta, $psolicitud, $oferta);\n } else {\n $respuesta->setRespuesta($respSesionVali);\n $oferta = array();\n return $objLogica::generaRespuesta($respuesta, $psolicitud, $oferta);\n }\n } catch (Exception $ex) {\n $respuesta->setRespuesta(AccesoController::inPlatCai);\n $oferta = array();\n return $objLogica::generaRespuesta($respuesta, $psolicitud, $oferta);\n }\n \n }", "title": "" }, { "docid": "20ca6088d17eb3d3ac9d24524db07bd2", "score": "0.56813663", "text": "function anticiposlistauser($user){\n\t\t$sql = $this->query(\"select p.id,m.Cuenta from cont_polizas p,cont_movimientos m,cont_accounts c where \n\t\tp.Anticipo=1 and p.activo=1 and p.eliminado=0 and p.id=m.idPoliza and m.Activo=1 and m.Cuenta=c.account_id and m.TipoMovto like 'Cargo%' and p.idUser=\".$user.\"\n\t\tgroup by p.id\");\n\t\t$ids = \"0\";\n\t\twhile($r = $sql->fetch_assoc()){\n\t\t\t$deudor = $this->deudorNombre($r['id']);\n\t\t\t$cargodeudor = $this->cargosDeudor($r['id'], $r['Cuenta']);\n\t\t\t$abonodeudor = $this->abonosDeudor($r['id'], $r['Cuenta']);\n\t\t\t$totalabono = $abonodeudor['abono'] + $deudor['cargo'];\n\t\t\tif( number_format($cargodeudor['cargo'],2,'.','') < number_format($totalabono,2,'.','') ){\n\t\t\t\t$total = $totalabono-$cargodeudor['cargo'];\n\t\t\t}else {$total =0; }\n\t\t\tif($total!=0 || ($abonodeudor['abono']==0 and $cargodeudor['cargo']==0)){\n\t\t\t\t$ids.=\",\".$r['id'];\n\t\t\t}\n\t\t}\n\t\t$sql2 = $this->query(\"select p.*,IFNULL((SELECT SUM(Importe) FROM cont_movimientos WHERE TipoMovto ='Cargo' AND IdPoliza = p.id AND Activo=1),0) AS cargos,c.description,m.Cuenta,\n\t\t(select (case p.beneficiario when 0 then 0 else prv.razon_social end) from mrp_proveedor prv where prv.idPrv=p.beneficiario) as prove\n\t\tfrom cont_polizas p,cont_movimientos m,cont_accounts c where \n\t\tp.Anticipo=1 and p.activo=1 and p.eliminado=0 and p.id=m.idPoliza and m.Activo=1 and m.Cuenta=c.account_id and m.TipoMovto like 'Cargo%' and p.idUser=\".$user.\"\n\t\tand p.id in ($ids)\");\n\t\tif($sql2->num_rows>0){\n\t\t\treturn $sql2;\n\t\t}else{\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "42ec3ca6a2f833e27085899c4add8849", "score": "0.5674368", "text": "function calculaMontoDePago()\r\n {\r\n $montoGenerar = $montoACancelar = $montoCancelado = 0;\r\n\r\n //de primero se debe de buscar posibles pagos generados o ya pagados anteriormente\r\n //del mismo periodo y del mismo proceso\r\n //Si es la primera vez que el estudiante se asigna, el monto Cancelado sera de 0, si no es asi, se\r\n //obntendra el monto correspondiente.\r\n\r\n $montoCancelado = $this->buscaMotosBDD();\r\n\r\n //Siguienre paso es calcular el monto que debe que cancelar el estudiante por lo que se desea asignar\r\n //tomando los cursos de 2 hrs., 4hrs., inscripcion, laboratorio, etc.\r\n $montoACancelar = $this->CalculaMontoA_Cancelar();\r\n\r\n //Lo siguiente es realizar el proceso de calcular el monto que se utilizara para generar la\r\n //Orden de Pago\r\n //La cual se realiza residuo del\r\n //montoACancelar - montoCancelado = montoGenerar\r\n $montoGenerar = $montoACancelar - $montoCancelado;\r\n $_SESSION['monto_Generar'] = $_SESSION['montoGeneral'] = $montoGenerar; // se toma el monto con que se generara el recibo de pago\r\n\r\n if ($_SESSION['NUMERO_ORDENES_NO_CANCELADAS'] != NULL) {\r\n //printf(\"nonc = %d\", $_SESSION['NUMERO_ORDENES_NO_CANCELADAS']);\r\n }\r\n }", "title": "" }, { "docid": "0c32274b59dd4ca16c9ff41f509eea81", "score": "0.5672891", "text": "protected function corrigeReservas() {\n\n $oContrato = new Acordo($this->getAcordo());\n $iOrigemContrato = $oContrato->getOrigem();\n $oUltimaPosicao = $oContrato->getUltimaPosicao();\n $iAnousu = db_getsession(\"DB_anousu\");\n foreach ($oUltimaPosicao->getItens() as $oItem) {\n\n $oItem->removerReservas();\n if ($iOrigemContrato == 1 || $iOrigemContrato == 2) {\n\n $oOrigemItem = $oItem->getOrigem();\n if ($oOrigemItem->tipo == 1) {\n\n /**\n * Verificamos no processo de compras qual o codigo do item da solicitacao.\n */\n $oDaoPcProcitem = db_utils::getDao(\"pcprocitem\");\n $sSqlDadosDotacao = $oDaoPcProcitem->sql_query_dotac($oOrigemItem->codigo, \"pcdotac.*\");\n $rsDotacoes = $oDaoPcProcitem->sql_record($sSqlDadosDotacao);\n\n $oDaoReservalSolicitacao = db_utils::getDao(\"orcreservasol\");\n $oDaoReserva = db_utils::getDao(\"orcreserva\");\n if ($oDaoPcProcitem->numrows > 0) {\n\n for ($iDot = 0; $iDot < $oDaoPcProcitem->numrows; $iDot++) {\n\n $oDotacao = db_utils::fieldsMemory($rsDotacoes, $iDot);\n $oDotacaoSaldo = new Dotacao($oDotacao->pc13_coddot, $oDotacao->pc13_anousu);\n $nSaldoReservar = $oDotacao->pc13_valor;\n if (round($oDotacaoSaldo->getSaldoFinal() <= $oDotacao->pc13_valor, 2)) {\n $nSaldoReservar = $oDotacaoSaldo->getSaldoFinal();\n }\n if ($nSaldoReservar > 0 && $oDotacao->pc13_anousu >= $iAnousu) {\n\n $oDaoReserva->o80_anousu = $oDotacao->pc13_anousu;\n $oDaoReserva->o80_coddot = $oDotacao->pc13_coddot;\n $oDaoReserva->o80_dtini = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoReserva->o80_dtfim = \"{$oDotacao->pc13_anousu}-12-31\";\n $oDaoReserva->o80_dtlanc = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoReserva->o80_valor = $nSaldoReservar;\n $oDaoReserva->o80_descr = \"reserva de saldo\";\n $oDaoReserva->incluir(null);\n\n if ($oDaoReserva->erro_status == 0) {\n\n $sMessage = \"Erro ao reservar saldo!\\n{$oDaoReserva->erro_msg}\";\n throw new Exception($sMessage);\n }\n\n $oDaoReservalSolicitacao->o82_codres = $oDaoReserva->o80_codres;\n $oDaoReservalSolicitacao->o82_solicitem = $oDotacao->pc13_codigo;\n $oDaoReservalSolicitacao->o82_pcdotac = $oDotacao->pc13_sequencial;\n $oDaoReservalSolicitacao->incluir(null);\n if ($oDaoReservalSolicitacao->erro_status == 0) {\n\n $sMessage = \"Erro ao reservar saldo!\\n{$oDaoReservalSolicitacao->erro_msg}\";\n throw new Exception($sMessage);\n }\n }\n }\n }\n } else if ($oOrigemItem->tipo == 2) {\n\n /**\n * Verificamos na licitacao qual o codigo do item da solicitacao.\n */\n $oDaoLicLicitem = db_utils::getDao(\"liclicitem\");\n $sSqlDadosDotacao = $oDaoLicLicitem->sql_query_orc($oOrigemItem->codigo, \"pcdotac.*\");\n $rsDotacoes = $oDaoLicLicitem->sql_record($sSqlDadosDotacao);\n $oDaoReservalSolicitacao = db_utils::getDao(\"orcreservasol\");\n $oDaoReserva = db_utils::getDao(\"orcreserva\");\n if ($oDaoLicLicitem->numrows > 0) {\n\n for ($iDot = 0; $iDot < $oDaoLicLicitem->numrows; $iDot++) {\n\n $oDotacao = db_utils::fieldsMemory($rsDotacoes, $iDot);\n $oDotacaoSaldo = new Dotacao($oDotacao->pc13_coddot, $oDotacao->pc13_anousu);\n $nSaldoReservar = $oDotacao->pc13_valor;\n if (round($oDotacaoSaldo->getSaldoFinal() <= $oDotacao->pc13_valor, 2)) {\n $nSaldoReservar = $oDotacaoSaldo->getSaldoFinal();\n }\n if ($nSaldoReservar > 0 && $oDotacao->pc13_anousu >= $iAnousu) {\n\n $oDaoReserva->o80_anousu = $oDotacao->pc13_anousu;\n $oDaoReserva->o80_coddot = $oDotacao->pc13_coddot;\n $oDaoReserva->o80_dtini = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoReserva->o80_dtfim = \"{$oDotacao->pc13_anousu}-12-31\";\n $oDaoReserva->o80_dtlanc = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoReserva->o80_valor = $nSaldoReservar;\n $oDaoReserva->o80_descr = \"reserva de saldo\";\n $oDaoReserva->incluir(null);\n\n if ($oDaoReserva->erro_status == 0) {\n\n $sMessage = \"Erro ao reservar saldo!\\n{$oDaoReserva->erro_msg}\";\n throw new Exception($sMessage);\n }\n\n $oDaoReservalSolicitacao->o82_codres = $oDaoReserva->o80_codres;\n $oDaoReservalSolicitacao->o82_solicitem = $oDotacao->pc13_codigo;\n $oDaoReservalSolicitacao->o82_pcdotac = $oDotacao->pc13_sequencial;\n $oDaoReservalSolicitacao->incluir(null);\n if ($oDaoReservalSolicitacao->erro_status == 0) {\n\n $sMessage = \"Erro ao reservar saldo!\\n{$oDaoReservalSolicitacao->erro_msg}\";\n throw new Exception($sMessage);\n }\n }\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "c9df8fdea5e7c4390fe1fe8e2c7b6542", "score": "0.5659825", "text": "public function VerComentariosEjemplar(Solicitud $psolicitud)\n {\n $respuesta = new Respuesta(); \n $objLogica = $this->get('logica_service');\n try {\n //Valida que la sesión corresponda y se encuentre activa\n $respSesionVali= ManejoDataRepository::validaSesionUsuario($psolicitud);\n //echo \"<script>alert(' buscarEjemplares :: Validez de sesion \".$respSesionVali.\" ')</script>\";\n if ($respSesionVali==AccesoController::inULogged) \n { \n\n //SE INACTIVA PORQUE PUEDE GENERAR UNA GRAN CANTIDAD DE REGISTROS EN UNA SOLA SESION\n //Busca y recupera el objeto de la sesion:: \n //$sesion = ManejoDataRepository::recuperaSesionUsuario($usuario,$psolicitud);\n //echo \"<script>alert('La sesion es \".$sesion->getTxsesnumero().\" ')</script>\";\n //Guarda la actividad de la sesion:: \n //ManejoDataRepository::generaActSesion($sesion,AccesoController::inDatoUno,\"Recupera Feed de Ejemplares\".$psolicitud->getEmail().\" recuperados con éxito \",$psolicitud->getAccion(),$fecha,$fecha);\n //echo \"<script>alert('Generó actividad de sesion ')</script>\";\n \n $ComenEjemplar = ManejoDataRepository::getComentariosEjemplar($psolicitud);\n $respuesta->setRespuesta(AccesoController::inExitoso);\n \n //echo \"esto es lo que hay en respuesta\";\n //print_r($respuesta);\n //echo $contador.\" - lugares hallados\";\n //$arIdiomas = array(\"Español\",\"Inglés\",\"Frances\",\"Alemán\",\"Ruso\",\"Portugues\",\n // \"Catalán\",\"Árabe\",\"Bosnio\",\"Croata\",\"Serbio\",\"Italiano\",\"Griego\",\"Turco\",\"Húngaro\",\"Hindi\");\n \n return $objLogica::generaRespuesta($respuesta, $psolicitud, $ComenEjemplar);\n } else {\n $respuesta->setRespuesta($respSesionVali);\n return $objLogica::generaRespuesta($respuesta, $psolicitud, $ComenEjemplar);\n }\n } catch (Exception $ex) {\n $respuesta->setRespuesta(AccesoController::inPlatCai);\n return $objLogica::generaRespuesta($respuesta, $psolicitud, $ComenEjemplar);\n }\n \n }", "title": "" }, { "docid": "09f58c089c3f8346a421c675ecdff72b", "score": "0.5649502", "text": "public function aggiungi() {\n $view = USingleton::getInstance('VOrdine');\n $id_libro=$view->getIdLibro();\n $aggiorna=false;\n $FLibro=new FLibro();\n $libro=$FLibro->load($id_libro);\n $ordineItem=new EOrdineItem();\n $ordineItem->setLibro($libro);\n if ($this->_carrello==false)\n $this->_carrello=new EOrdine();\n $this->_carrello->addItem($ordineItem);\n $session=USingleton::getInstance('USession');\n $session->imposta_valore('carrello',serialize($this->_carrello));\n return $this->contenuto();\n }", "title": "" }, { "docid": "a63bbadb3638ed82baae506ec94e3825", "score": "0.5637728", "text": "function anticiposlista(){\n\t\t$sql = $this->query(\"select p.id,m.Cuenta from cont_polizas p,cont_movimientos m,cont_accounts c where \n\t\tp.Anticipo=1 and p.activo=1 and p.eliminado=0 and p.id=m.idPoliza and m.Activo=1 and m.Cuenta=c.account_id and m.TipoMovto like 'Cargo%'\n\t\tgroup by p.id\");\n\t\t$ids = \"0\";\n\t\twhile($r = $sql->fetch_assoc()){\n\t\t\t$deudor = $this->deudorNombre($r['id']);\n\t\t\t$cargodeudor = $this->cargosDeudor($r['id'], $r['Cuenta']);\n\t\t\t$abonodeudor = $this->abonosDeudor($r['id'], $r['Cuenta']);\n\t\t\t$totalabono = $abonodeudor['abono'] + $deudor['cargo'];\n\t\t\tif(number_format($cargodeudor['cargo'],2) < number_format($totalabono,2) ){\n\t\t\t\t$total = $totalabono-$cargodeudor['cargo'];\n\t\t\t}else {$total =0; }\n\t\t\tif($total!=0 || ($abonodeudor['abono']==0 and $cargodeudor['cargo']==0)){\n\t\t\t\t$ids.=\",\".$r['id'];\n\t\t\t}\n\t\t}\n\t\t$sql2 = $this->query(\"select p.*,c.description from cont_polizas p,cont_movimientos m,cont_accounts c where \n\t\tp.Anticipo=1 and p.activo=1 and p.eliminado=0 and p.id=m.idPoliza and m.Activo=1 and m.Cuenta=c.account_id and m.TipoMovto like 'Cargo%'\n\t\tand p.id in ($ids)\");\n\t\treturn $sql2;\n\t}", "title": "" }, { "docid": "cc0523ff2017d2adb557d2f65d68cbee", "score": "0.56285757", "text": "function subirCorrespondencia()\n {\n $this->objFunSeguridad = $this->create('MODCorrespondencia');\n $this->res = $this->objFunSeguridad->subirCorrespondencia($this->objParam);\n //imprime respuesta en formato JSON\n $this->res->imprimirRespuesta($this->res->generarJson());\n\n }", "title": "" }, { "docid": "e2a606e5cfa9bd9843fbeb699621ab69", "score": "0.56261855", "text": "function carregarLimiteAutorizadoSubUnidade(stdClass $parametros) {\n global $db;\n\n $sql = \"\n SELECT\n lmuvlr\n FROM planacomorc.unidadegestora_limite ul\n WHERE\n ul.lmustatus = 'A'\n AND ul.prsano = '{$_SESSION['exercicio']}'\n AND ul.ungcod = '\". $parametros->ungcod. \"'\";\n//ver($sql, d);\n $autorizado = $db->pegaUm($sql);\n return $autorizado;\n}", "title": "" }, { "docid": "e7c1012ad2121c8ad5ae184490c88e49", "score": "0.5620682", "text": "function muestraComentario($com, $v) {\r\n\r\n\t/* Indica si el comentario esta aprobado o no */\r\n\t$comOk = ($com['comentario_estado'] == 1 || $com['comentario_estado'] == 5) ? true : false;\r\n\r\n\t/* Indica si tiene repuestas */\r\n\t$respuestas = !empty($com['comentario_respuestas']) ? true : false;\r\n\r\n\t/* Información sobre los votos del comentario */\r\n\t$votoPositivo = $com['comentario_votos_positivo'];\r\n\t$votoNegativo = $com['comentario_votos_negativo'];\r\n\t$votoTotal = $com['comentario_votos_positivo'] + $com['comentario_votos_negativo'];\r\n\t$votoPuntaje = $com['comentario_votos_positivo'] - $com['comentario_votos_negativo'];\r\n\t$votoPuntajeClase = ($votoPuntaje) ? '' : 'posi';\r\n\t$votoVotar = empty($_COOKIE['voto_com_'.$com['comentario_id']]) ? '' : 'disable';\r\n\r\n\t$tipo_fecha = \"%d%/%m%/%y%\";\r\n\t$fechaCom = formatDate($tipo_fecha, $com['comentario_fecha_hora']);\r\n\t\r\n\t// Avatar del usuario\r\n\t$com['lector_avatar'] = getGravatar($com['lector_email'],40);\r\n\t?>\r\n\r\n\t<div class=\"com-wrapper\">\r\n\t\t\r\n\t\t<div class=\"com-main\">\r\n\r\n\t\t\t<div class=\"com-user\">\r\n\t\t\t \r\n\t\t\t\t<span class=\"nro\"><?php echo $com['comentario_numero'];?></span>\r\n\t\t\t\t\r\n\t\t\t\t<div class=\"avatar\">\r\n\t\t\t\t\t\r\n\t\t\t\t\t<img src=\"<?php echo $com['lector_avatar'];?>\" />\r\n\t\t\t\t\t\r\n\t\t\t\t</div><!--fin avatar-->\r\n\t\r\n\t\t\t\t<span class=\"name\"><?php echo $com['lector_nombre'];?></span>\r\n\t\r\n\t\t\t\t<span class=\"cfecha\"><?php echo $fechaCom;?></span>\r\n\t\r\n\t\t\t</div><!--fin com-user-->\r\n\r\n\t\t\t<div class=\"com-right\">\r\n\t\t\t\r\n\t\t\t\t<span class=\"ico arrow\"></span>\r\n\t\t\t\t\r\n\t\t\t\t<div class=\"comentarios-txt <?php echo !$comOk ? 'rechazado' : '';?>\">\r\n\t\r\n\t\t\t\t\t<article><?php echo $com[\"comentario_texto\"];?></article>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<?php if (!$comOk) { ?>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"disclaimerc\">CONOCE LOS <span>MOTIVOS DE RECHAZO</span> \r\n\t\t\t\t\t\tDE UN COMENTARIO <a href=\"/institucional/normas.php\" title=\"Normas de Participación\" target=\"_blank\">AQUI</a>\r\n\t\t\t\t\t\t</div>\r\n\t\r\n\t\t\t\t\t<?php } ?>\r\n\t\r\n\t\t\t\t</div><!--fin txt-->\r\n\t\r\n\t\t\t\t<?php \r\n\t\t\t\t/* Comentario Aprobado */\r\n\t\t\t\tif ($comOk) { ?>\r\n\t\t\t\t\r\n\t\t\t\t\t<div class=\"comentarios-bottom\">\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"total\">\r\n\t\r\n\t\t\t\t\t\t\t<span class=\"txt2 <?php echo $votoPuntajeClase;?>\">(<i><?php echo $votoPuntaje;?></i>)</span>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<span class=\"txt\"><b>Total:</b></span>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<span class=\"ico linet\"></span>\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\r\n\t\t\t\t\t\t\t<span class=\"voto-negativo <?php echo $votoVotar;?>\" rel=\"<?php echo $com['comentario_id'];?>\" title=\"No me gusta\">\r\n\t\t\t\t\t\t\t\t<span class=\"ico\"></span>(<i><?php echo $votoNegativo;?></i>)\r\n\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<span class=\"voto-positivo <?php echo $votoVotar;?>\" rel=\"<?php echo $com['comentario_id'];?>\" title=\"Me gusta\">\r\n\t\t\t\t\t\t\t\t<span class=\"ico\"></span>(<i><?php echo $votoPositivo;?></i>)\r\n\t\t\t\t\t\t\t</span>\r\n\r\n\t\t\t\t\t\t\t<b class=\"txt\">Valorar</b>\r\n\r\n\t\t\t\t\t\t</div><!--fin total-->\r\n\r\n\t\t\t\t\t\t<a href=\"/extras/notas/comentario-pop.php?id=<?php echo $v['noticia_id']?>&comid=<?php echo $com['comentario_id'];?>&KeepThis=true&TB_iframe=true&height=310&width=635\" class=\"thickbox\" title=\"Responder\">\r\n\t\t\t\t\t\t<span class=\"ico\"></span>Responder</a>\r\n\r\n\t\t\t\t\t</div><!--fin bottom-->\r\n\r\n\t\t\t\t<?php } ?>\r\n\r\n\t\t\t\t<?php \r\n\t\t\t\t/* Si el comentario tiene respuestas */\r\n\t\t\t\tif ($respuestas) { ?>\r\n\t\t\t\t\r\n\t\t\t\t\t<div class=\"cmostrar\">\r\n\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<span class=\"ico\"></span>\r\n\t\t\t\t\t\t<a href=\"#\" rel=\"com_res_id<?php echo $com['comentario_id'];?>\" title=\"Ver Respuestas\" class=\"mostrar\" style=\"display:none;\">VER RESPUESTAS</a>\r\n\t\t\t\t\t\t<a href=\"#\" rel=\"com_res_id<?php echo $com['comentario_id'];?>\" title=\"Ocultar\" class=\"ocultar\">OCULTAR</a>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div><!--fin cmostrar-->\r\n\t\r\n\t\t\t\t<?php } ?>\r\n\t\t\t\t\r\n\t\t\t</div><!--fin comentarios right-->\r\n\t\r\n\t\t\t<div class=\"clear\"></div>\r\n\r\n\t\t</div><!--/.com-main-->\r\n\t\t\r\n\t\t<?php\r\n\t\t/**\r\n\t\t * Bloque de respuestas al comentario\r\n\t\t */\r\n\t\tif ($respuestas) { ?>\r\n\t\t\t\r\n\t\t\t<div id=\"com_res_id<?php echo $com['comentario_id'];?>\" class=\"contenedor-resp\">\r\n\t\t\t\t\t\r\n\t\t\t\t<?php foreach ($com['comentario_respuestas'] as $respNro => $respArr) {\r\n\t\t\t\t\r\n\t\t\t\t\tmuestraComentario($respArr, $v);\r\n\r\n\t\t\t\t} ?>\r\n\t\r\n\t\t\t</div>\r\n\t\r\n\t\t<?php } ?>\r\n\t\t\r\n\t</div><!--/.com-wrapper-->\r\n\t\r\n<?php }", "title": "" }, { "docid": "7615ff5e1051d48aedc5ca8e558ca8d1", "score": "0.5616231", "text": "function siguienteEstadoRecibo(){\r\n\t\t\t$this->procedimiento='vef.ft_venta_facturacion_ime';\r\n\t\t\t$this->transaccion='VEF_ENVIARCAJA_IME';\r\n\t\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t\t//Define los parametros para la funcion\r\n\t\t\t$this->setParametro('id_estado_wf_act','id_estado_wf_act','int4');\r\n\t\t\t$this->setParametro('id_proceso_wf_act','id_proceso_wf_act','int4');\r\n\t\t\t$this->setParametro('tipo','tipo','varchar');\r\n\r\n\r\n\t\t\t//Ejecuta la instruccion\r\n\t\t\t$this->armarConsulta();\r\n\t\t\t$this->ejecutarConsulta();\r\n\r\n\t\t\t//Devuelve la respuesta\r\n\t\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "84d77f6a0b8982ec69221dc7c5786393", "score": "0.5590751", "text": "function subirCorrespondencia(){\n\t\t$this->objFunSeguridad=$this->create('MODCorrespondencia');\n\t\t$this->res=$this->objFunSeguridad->subirCorrespondencia($this->objParam);\n\t\t//imprime respuesta en formato JSON\n\t\t$this->res->imprimirRespuesta($this->res->generarJson());\n\n\t}", "title": "" }, { "docid": "3dda60c5d467219eebbc7a43d94090cb", "score": "0.5585504", "text": "public function remplireListe()\n {\n \n }", "title": "" }, { "docid": "688f0810c9e26e54a6e60dcf30eb71ab", "score": "0.55770516", "text": "public function AplicarDescuento() {\n\t\t$db = new dbConn();\n\t\t\t\t \n\t\t $a = $db->query(\"SELECT * FROM ticket WHERE orden = \".$_SESSION[\"orden\"].\" and tx = \".$_SESSION[\"tx\"].\" and td = \".$_SESSION[\"td\"].\"\");\n\n\t\t if($a->num_rows > 0){\n\t\t \tforeach ($a as $b) {\n\t\t \t\t$datos[\"cantidad\"] = $b[\"cant\"];\n\t\t \t\t$datos[\"cod\"] = $b[\"cod\"];\n\t\t \t\t$this->Actualiza($datos, 1);\n\t\t \t}\n\t\t } $a->close();\n\n\t\t if($_SESSION['descuento'] != NULL){\n\t\t $lateral = new Laterales(); \n \t\t $precio = $lateral->ObtenerTotal($_SESSION[\"orden\"]);\n\t\t $texto = 'El total en esta venta es de: ' . $precio;\n\t\t Alerts::Mensajex($texto,\"success\",$boton,$boton2);\n\n\n\n\t\t $texto = 'Esta venta posee un descuento de : ' . $_SESSION['descuento']. \" %\";\n\t\t Alerts::Mensajex($texto,\"danger\",'<a id=\"quitar-descuento\" op=\"96\" class=\"btn btn-danger btn-rounded\">Quitar Descuento</a>',$boton2);\n\t\t} else {\n\t\t\t$lateral = new Laterales();\n\t\t\t $precio = $lateral->ObtenerTotal($_SESSION[\"orden\"]);\n\t\t\t $texto = 'El total en esta venta sin descuento es de: ' . $precio;\n\t\t\t Alerts::Mensajex($texto,\"success\",$boton,$boton2);\n\t\t\t} \n\n\t}", "title": "" }, { "docid": "7368ba3e42b8d037ab95be5eef5d2325", "score": "0.55719125", "text": "function cl_solicitemregistropreco() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"solicitemregistropreco\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "4a6985c6370e785cb6cd23a840e0783f", "score": "0.5568429", "text": "public function getRestarUno($id){\n \n $oldCurso=Session::has('curso') ? Session::get('curso') : null;\n \n $curso=new Multiples($oldCurso);\n \n $curso->restarUno($id);//restarUno($id), metodo de la clase Multiple\n\n if (count($curso->cursos)>0){ //si quedan cursos en el carrito\n Session::put('curso',$curso); //lo pngo en la session\n }else{\n Session::forget('curso'); //sino limpio la session\n }\n return redirect()->route('admin.inscripcions.create'); \n }", "title": "" }, { "docid": "871bce840114c1543a16ed494fc7b9b3", "score": "0.55635005", "text": "public function VerUsrgustaEjemplar(Solicitud $psolicitud)\n {\n $respuesta = new Respuesta(); \n $objLogica = $this->get('logica_service');\n try {\n //Valida que la sesión corresponda y se encuentre activa\n $respSesionVali= ManejoDataRepository::validaSesionUsuario($psolicitud);\n //echo \"<script>alert(' buscarEjemplares :: Validez de sesion \".$respSesionVali.\" ')</script>\";\n if ($respSesionVali==AccesoController::inULogged) \n { \n\n //SE INACTIVA PORQUE PUEDE GENERAR UNA GRAN CANTIDAD DE REGISTROS EN UNA SOLA SESION\n //Busca y recupera el objeto de la sesion:: \n //$sesion = ManejoDataRepository::recuperaSesionUsuario($usuario,$psolicitud);\n //echo \"<script>alert('La sesion es \".$sesion->getTxsesnumero().\" ')</script>\";\n //Guarda la actividad de la sesion:: \n //ManejoDataRepository::generaActSesion($sesion,AccesoController::inDatoUno,\"Recupera Feed de Ejemplares\".$psolicitud->getEmail().\" recuperados con éxito \",$psolicitud->getAccion(),$fecha,$fecha);\n //echo \"<script>alert('Generó actividad de sesion ')</script>\";\n \n $UsrMegusta = ManejoDataRepository::getUsrMegustaEjemplar($psolicitud);\n $respuesta->setRespuesta(AccesoController::inExitoso);\n \n //echo \"esto es lo que hay en respuesta\";\n //print_r($respuesta);\n //echo $contador.\" - lugares hallados\";\n //$arIdiomas = array(\"Español\",\"Inglés\",\"Frances\",\"Alemán\",\"Ruso\",\"Portugues\",\n // \"Catalán\",\"Árabe\",\"Bosnio\",\"Croata\",\"Serbio\",\"Italiano\",\"Griego\",\"Turco\",\"Húngaro\",\"Hindi\");\n \n return $objLogica::generaRespuesta($respuesta, $psolicitud, $UsrMegusta);\n } else {\n $respuesta->setRespuesta($respSesionVali);\n return $objLogica::generaRespuesta($respuesta, $psolicitud, $UsrMegusta);\n }\n } catch (Exception $ex) {\n $respuesta->setRespuesta(AccesoController::inPlatCai);\n return $objLogica::generaRespuesta($respuesta, $psolicitud, $UsrMegusta);\n }\n \n }", "title": "" }, { "docid": "09454ffe703dec975ee870c446f91422", "score": "0.55467826", "text": "function ListadoDetalladoOcupacion() {\n \n /*\n * Llenado de Salas Despachos Media y Completa\n */\n \n foreach($this->_serviciosOcupacion as $servicio){\n if($servicio['Tipo'] == 'Sala'){\n if($servicio['Tiempo'] == 'Media'){\n $serviciosOcupacionSalaMedia[$servicio['Nombre']] = \n $this->cuentaServiciosPorMes($servicio['Nombre'], TRUE);\n }\n if($servicio['Tiempo'] == 'Completa'){\n $serviciosOcupacionSalaCompleta[$servicio['Nombre']] = \n $this->cuentaServiciosPorMes($servicio['Nombre'], TRUE); \n }\n }\n if($servicio['Tipo'] == 'Despacho'){\n if($servicio['Tiempo'] == 'Media'){\n $serviciosOcupacionDespachoMedia[$servicio['Nombre']] = \n $this->cuentaServiciosPorMes($servicio['Nombre'], TRUE); \n }\n if($servicio['Tiempo'] == 'Completa'){\n $serviciosOcupacionDespachoCompleta[$servicio['Nombre']] = \n $this->cuentaServiciosPorMes($servicio['Nombre'], TRUE);\n }\n }\n }\n $datosOcupacionSalaMedia = array_fill(0, $this->diferencia(), 0);\n foreach($serviciosOcupacionSalaMedia as $servicio)\n foreach($servicio as $key => $dato)\n $datosOcupacionSalaMedia[$key] += $dato;\n \n $datosOcupacionSalaCompleta = array_fill(0, $this->diferencia(), 0);\n foreach($serviciosOcupacionSalaCompleta as $servicio)\n foreach($servicio as $key => $dato)\n $datosOcupacionSalaCompleta[$key] += $dato;\n \n $datosOcupacionDespachoMedia = array_fill(0, $this->diferencia(), 0);\n foreach($serviciosOcupacionDespachoMedia as $servicio)\n foreach($servicio as $key => $dato)\n $datosOcupacionDespachoMedia[$key] += $dato;\n \n $datosOcupacionDespachoCompleta = array_fill(0, $this->diferencia(), 0);\n foreach($serviciosOcupacionDespachoCompleta as $servicio)\n foreach($servicio as $key => $dato)\n $datosOcupacionDespachoCompleta[$key] += $dato;\n /*\n * Llenado datos despachos Hora\n */\n foreach($this->_horasDespacho as $servicio)\n $horasDespacho[$servicio] = $this->cuentaServiciosPorMes($servicio);\n \n $datosHorasDespacho = array_fill(0, $this->diferencia(), 0);\n foreach($horasDespacho as $servicio)\n foreach($servicio as $key => $dato)\n $datosHorasDespacho[$key] += $dato;\n \n \n \n /*\n * Ocupacion Puntual Salas\n */\n $totalSalaCompleta = array_sum($datosOcupacionSalaCompleta);\n $totalSalaMedia = array_sum($datosOcupacionSalaMedia);\n $totalDespachoCompleta = array_sum($datosOcupacionDespachoCompleta);\n $totalDespachoMedia = array_sum($datosOcupacionDespachoMedia);\n $totalSalas = $totalSalaCompleta + $totalSalaMedia;\n $totalDespachos = $totalDespachoCompleta + $totalDespachoMedia;\n \n $html = \"<h4><a name='puntualSalas'>Ocupación Puntual Salas</a></h4>\"; \n $html .= \"<table class='listadetallada'>\n <tr><th>&nbsp;</th>\";\n foreach($this->mesesRango() as $mes){\n $html .= \"<th class='datosdetalladosservicios'>{$mes}</th>\"; \n }\n $html .= \"<th class='datosdetalladosservicios'>Total</th>\";\n $html .= \"</tr>\";\n $html .= \"<tr class='ui-widget-content celda'><td>Jornada Completa</td>\";\n foreach($datosOcupacionSalaCompleta as $key => $dato){\n $html .= \"<td class='ocupacion' id='Sala#Completa#{$key}'>{$dato}</td>\";\n }\n $html .= \"<td>{$totalSalaCompleta}</td>\";\n $html .= \"<tr class='ui-widget-content celda'><td>Media Jornada</td>\";\n foreach($datosOcupacionSalaMedia as $key => $dato){\n $html .= \"<td class='ocupacion' id='Sala#Media#{$key}'>{$dato}</td>\";\n }\n $html .= \"<td>{$totalSalaMedia}</td>\";\n $html .= \"</tr>\";\n $html .= \"<tr class='ui-widget-content celda'><td>Total</td>\";\n foreach($this->mesesRango() as $key => $mes){\n $totalMes = $datosOcupacionSalaCompleta[$key] + $datosOcupacionSalaMedia[$key];\n $html .= \"<td>{$totalMes}</td>\";\n }\n $html .= \"<td>{$totalSalas}</td>\";\n $html .= \"</tr>\";\n $html .= \"</table>\";\n $html .= \"<a class='enlacedetallada' href='#arriba'>Ir arriba</a>\";\n $html .= \"<br/><br/>\";\n /*\n * Ocupacion Puntual Despachos\n */\n $html .= \"<h4><a name='puntualDespachos'>Ocupación Puntual Despachos</a></h4>\"; \n $html .= \"<table class='listadetallada'>\n <tr><th>&nbsp;</th>\";\n foreach($this->mesesRango() as $mes){\n $html .= \"<th class='datosdetalladosservicios'>{$mes}</th>\"; \n }\n $html .= \"<th class='datosdetalladosservicios'>Total</th>\";\n $html .= \"</tr>\";\n $html .= \"<tr class='ui-widget-content celda'><td>Jornada Completa</td>\";\n foreach($datosOcupacionDespachoCompleta as $key => $dato){\n $html .= \"<td class='ocupacion' id='Despacho#Completa#{$key}'>{$dato}</td>\";\n }\n $html .= \"<td>{$totalDespachoCompleta}</td>\";\n $html .= \"<tr class='ui-widget-content celda'><td>Media Jornada</td>\";\n foreach($datosOcupacionDespachoMedia as $key => $dato){\n $html .= \"<td class='ocupacion' id='Despacho#Media#{$key}'>{$dato}</td>\";\n }\n $html .= \"<td>{$totalDespachoMedia}</td>\";\n $html .= \"</tr>\";\n $html .= \"<tr class='ui-widget-content celda'><td>Total</td>\";\n foreach($this->mesesRango() as $key => $mes){\n $totalMes = \n $datosOcupacionDespachoCompleta[$key] + $datosOcupacionDespachoMedia[$key];\n $html .= \"<td>{$totalMes}</td>\";\n }\n $html .= \"<td>{$totalDespachos}</td>\";\n $html .= \"</tr>\";\n $html .= \"</table>\";\n $html .= \"<a class='enlacedetallada' href='#arriba'>Ir arriba</a>\";\n $html .= \"<br/><br/>\";\n \n /*\n * Despachos/Sala Horas\n */\n $totalHorasDespacho = array_sum($datosHorasDespacho);\n $html .= \"<h4><a name='despachosSalaHoras'>Despacho/Sala Horas</a></h4>\"; \n $html .= \"<table class='listadetallada'>\n <tr><th>&nbsp;</th>\";\n foreach($this->mesesRango() as $mes){\n $html .= \"<th class='datosdetalladosservicios'>{$mes}</th>\"; \n }\n $html .= \"<th class='datosdetalladosservicios'>Total</th>\";\n $html .= \"</tr>\";\n $html .= \"<tr class='ui-widget-content celda'><td>Horas</td>\";\n foreach($datosHorasDespacho as $key => $dato){\n $html .= \"<td class='ocupacion' id='Horas#Completa#{$key}'>{$dato}</td>\";\n }\n $html .= \"<td>{$totalHorasDespacho}</td>\";\n $html .= \"</tr>\";\n $html .= \"</table>\";\n $html .= \"<a class='enlacedetallada' href='#arriba'>Ir arriba</a>\";\n $html .= \"<br/><br/>\";\n $html .= <<<EOD\n\t <script type=\"text/javascript\">\n\t \n \t$('.ocupacion').click(function(){\n \n \t\t$('.ocupacion').removeClass('ui-widget-header');\n \t\t$('.consumo').removeClass('ui-widget-header');\n \t\t$(this).addClass('ui-widget-header'); \n \t\t\n\t\t\t\t$('#dialog').html('');\n\t\t\t\t$('#dialog').dialog({ autoOpen: false, width: 600}); \t\t\t \n\t\t\t\t$.post('procesa.php',{ocupacion:this.id,inicial:$('#inicio').val(),fin:$('#fin').val()},function(data){ \n\t\t\t\t\t$('#dialog').html(data);\n \t\t\t}); \n\t\t \t\t$('.ocupacion').ajaxStop(function(){ $('#dialog').dialog('open');});\n\t\t\t});\n\t \n\t </script>\n \nEOD;\n \n return $html;\n }", "title": "" }, { "docid": "7bde3ac81e3ee075df7ba7a6fe338a3b", "score": "0.5541577", "text": "function corregirReciboOficial(){\r\n\t\t\t$this->procedimiento='vef.ft_venta_facturacion_ime';\r\n\t\t\t$this->transaccion='VF_ROS_CORRE';\r\n\t\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t\t//Define los parametros para la funcion\r\n\t\t\t$this->setParametro('id_venta','id_venta','int4');\r\n\t\t\t$this->setParametro('id_moneda','id_moneda','int4');\r\n\t\t\t$this->setParametro('id_moneda_2','id_moneda_2','int4');\r\n\t\t\t$this->setParametro('id_venta_forma_pago_1','id_venta_forma_pago_1','int4');\r\n\t\t\t$this->setParametro('id_venta_forma_pago_2','id_venta_forma_pago_2','int4');\r\n\t\t\t$this->setParametro('id_medio_pago','id_medio_pago','int4');\r\n\t\t\t$this->setParametro('id_medio_pago_2','id_medio_pago_2','int4');\r\n\t\t\t$this->setParametro('codigo_tarjeta','codigo_tarjeta','varchar');\r\n\t\t\t$this->setParametro('codigo_tarjeta_2','codigo_tarjeta_2','varchar');\r\n\t\t\t$this->setParametro('numero_tarjeta','numero_tarjeta','varchar');\r\n\t\t\t$this->setParametro('numero_tarjeta_2','numero_tarjeta_2','varchar');\r\n\t\t\t$this->setParametro('id_auxiliar','id_auxiliar','numeric');\r\n\t\t\t$this->setParametro('id_auxiliar_2','id_auxiliar_2','numeric');\r\n\t\t\t$this->setParametro('monto_forma_pago','monto_forma_pago','numeric');\r\n\t\t\t$this->setParametro('monto_forma_pago_2','monto_forma_pago_2','numeric');\r\n\t\t\t$this->setParametro('mco','mco','varchar');\r\n\t\t\t$this->setParametro('mco_2','mco_2','varchar');\r\n\t\t\t$this->setParametro('tipo_tarjeta','tipo_tarjeta','varchar');\r\n\t\t\t$this->setParametro('tipo_tarjeta_2','tipo_tarjeta_2','varchar');\r\n\r\n\t\t\t/*Los Nuevos campos*/\r\n\t\t\t$this->setParametro('nro_deposito', 'nro_deposito', 'varchar');\r\n\t\t\t$this->setParametro('monto_deposito', 'monto_deposito', 'numeric');\r\n\t\t\t$this->setParametro('fecha_deposito', 'fecha_deposito', 'varchar');\r\n\t\t\t$this->setParametro('id_moneda_venta_recibo', 'id_moneda_venta_recibo', 'integer');\r\n\t\t\t$this->setParametro('id_auxiliar_anticipo', 'id_auxiliar_anticipo', 'integer');\r\n\t\t\t$this->setParametro('id_venta_recibo','id_venta_recibo','int4');\r\n\t\t\t$this->setParametro('id_venta_recibo_2','id_venta_recibo_2','int4');\r\n\t\t\t$this->setParametro('saldo_recibo','saldo_recibo','numeric');\r\n\t\t\t$this->setParametro('saldo_recibo_2','saldo_recibo_2','numeric');\r\n\t\t\t/***********************************************************************************/\r\n\r\n\r\n\r\n\r\n\t\t\t//Ejecuta la instruccion\r\n\t\t\t$this->armarConsulta();\r\n\t\t\t$this->ejecutarConsulta();\r\n\r\n\t\t\t//Devuelve la respuesta\r\n\t\t\treturn $this->respuesta;\r\n\t\t}", "title": "" }, { "docid": "040850f808b3596d08e1b014470a656c", "score": "0.5540371", "text": "public function estudiantesPrimaria(){\r\n try {\r\n if($this->verificarSession()){\r\n $this->vista->set('titulo', 'estudiantes Primaria');\r\n $limI='1';\r\n $limS='5';\r\n $salones = new Salon();\r\n $primaria = $salones->leerSalonesJornada($limI,$limS);\r\n $this->vista->set('primaria', $primaria);\r\n return $this->vista->imprimir();\r\n }\r\n } catch (Exception $exc) {\r\n echo 'Error de aplicacion: ' . $exc->getMessage();\r\n }\r\n }", "title": "" }, { "docid": "ffbf4f9e2ab15653a0c31023a68ce2b2", "score": "0.5535239", "text": "public function NuevoRolResponsabilidad() {\r\n\t$nuevo = \"SELECT co_rol_resp FROM tr002_rol_responsabilidad\r\n\t\tORDER BY co_rol_resp DESC \r\n\t\tLIMIT 1;\";\r\n\t$c = $this->pdo->_query($nuevo);\r\n\t\r\n\t//if(is_object($this->pdo->monitor) && $this->pdo->monitor->notify_select)\r\n\t\t//$this->popNotify(); // Libera posicion reg_padre\r\n\t\t\t\r\n\treturn $c;\r\n }", "title": "" }, { "docid": "361e377dc3f3c5f3662015027b42e36d", "score": "0.5530398", "text": "function aplicarMotivoPromedio(){\n\t\t$motivo=0;\n\t\tswitch($this->acuerdoEstudiante){\n\t\t\tcase '2011004':\n\t\t\t\tif($this->promedioEstudiante<320){//cambiar por la consulta de nota aprobatoria\n\t\t\t\t\t$motivo=100;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t//acuerdos 1993027 y 2009007\n\t\t\t\tif($this->promedioEstudiante<300){//cambiar por la consulta de nota aprobatoria\n\t\t\t\t\t$motivo=100;\n\t\t\t\t}\t\t\t\n\t\t\tbreak;\n\t\t}\n\t\treturn $motivo;\n\n\t}", "title": "" }, { "docid": "dd61f3df226a32492ce95ba3073fce80", "score": "0.5518527", "text": "function listarDeptoFiltradoDeptoUsuarioConta(){\n $this->procedimiento='conta.ft_doc_compra_venta_sel';// nombre procedimiento almacenado\n $this->transaccion='CONTA_DEPFUNCON_SEL';//nombre de la transaccion\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n\n //Definicion de la lista del resultado del query\n $this->setParametro('codigo_subsistema','codigo_subsistema','varchar');\n\n //defino varialbes que se captran como retornod e la funcion\n $this->captura('id_depto','integer');\n $this->captura('codigo','varchar');\n $this->captura('nombre','varchar');\n $this->captura('nombre_corto','varchar');\n $this->captura('id_subsistema','integer');\n\n $this->captura('estado_reg','varchar');\n $this->captura('fecha_reg','timestamp');\n $this->captura('id_usuario_reg','integer');\n $this->captura('fecha_mod','timestamp');\n $this->captura('id_usuario_mod','integer');\n $this->captura('usureg','text');\n $this->captura('usumod','text');\n $this->captura('desc_subsistema','text');\n\n //Ejecuta la funcion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n return $this->respuesta;\n }", "title": "" }, { "docid": "7db4913bf586e09d6964696381e080c6", "score": "0.55178297", "text": "function subCarro(){\n if($this->isLogged()){\n $id_product = Request::read('id');\n $this->getSession()->set('idTicket', Request::read('idTicket'));\n \n $product = $this->getModel()->getProduct($id_product);\n \n //echo Util::varDump($product);\n //exit;\n $carro = $this->getSession()->getCarro();\n $carro->sub($product->getId() , $product->getAttributesValues(), $cantidad = 1);\n $this->getModel()->setDato('data' , $carro->getCarrito());\n }else{\n $this->getModel()->setDato('data' , '');\n }\n }", "title": "" }, { "docid": "1790206539cecb678c366ee410bf3b80", "score": "0.55123144", "text": "function ArqSetorial() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n global $p_unid_posse;\r\n \r\n if (is_array($_REQUEST['w_chave'])) {\r\n $itens = $_REQUEST['w_chave'];\r\n } else {\r\n $itens = explode(',', $_REQUEST['w_chave']);\r\n }\r\n\r\n if ($w_troca > '') {\r\n // Se for recarga da página\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_retorno_limite = $_REQUEST['w_retorno_limite'];\r\n $w_interno = $_REQUEST['w_interno'];\r\n $w_sq_unidade = $_REQUEST['w_sq_unidade'];\r\n $w_pessoa_destino = $_REQUEST['w_pessoa_destino'];\r\n $w_unidade_externa = $_REQUEST['w_unidade_externa'];\r\n $w_despacho = $_REQUEST['w_despacho'];\r\n $w_aviso = $_REQUEST['w_aviso'];\r\n $w_dias = $_REQUEST['w_dias'];\r\n $w_protocolo = $_REQUEST['w_protocolo'];\r\n $w_observacao = $_REQUEST['w_observacao'];\r\n }\r\n\r\n // Verifica se a unidade de lotação do usuário está cadastrada na relação de unidades do módulo\r\n $sql = new db_getUorgList;\r\n $RS_Prot = $sql->getInstanceOf($dbms, $w_cliente, null, 'MOD_PA_PROT', null, null, $w_ano);\r\n foreach ($RS_Prot as $row) {\r\n $RS_Prot = $row;\r\n break;\r\n }\r\n\r\n if ($O == 'L') {\r\n // Recupera todos os registros para a listagem\r\n $sql = new db_getProtocolo;\r\n $RS = $sql->getInstanceOf($dbms, f($RS_Menu, 'sq_menu'), $w_usuario, $SG, $p_chave, $p_chave_aux,$p_prefixo, $p_numero, $p_ano, \r\n $p_unid_autua, $p_unid_posse, $p_nu_guia, $p_ano_guia, $p_ini, $p_fim, 2, $p_tipo_despacho, $p_empenho, \r\n $p_solicitante, $p_unidade, $p_proponente, $p_sq_acao_ppa, $p_assunto, $p_processo);\r\n if (Nvl($p_ordena, '') > '') {\r\n $lista = explode(',', str_replace(' ', ',', $p_ordena));\r\n $RS = SortArray($RS, $lista[0], $lista[1], 'prefixo', 'asc', 'ano', 'desc', 'numero_documento', 'asc');\r\n } else {\r\n $RS = SortArray($RS, 'prefixo', 'asc', 'ano', 'desc', 'numero_documento', 'asc');\r\n }\r\n $w_existe = count($RS);\r\n\r\n if (count($w_chave) > 0) {\r\n $i = 0;\r\n foreach ($w_chave as $k => $v) {\r\n foreach ($RS as $row) {\r\n if ($w_chave[$i] == f($row, 'sq_siw_solicitacao')) {\r\n $w_marcado[f($row, 'sq_siw_solicitacao')] = 'ok';\r\n break;\r\n }\r\n }\r\n $i++;\r\n }\r\n reset($RS);\r\n }\r\n }\r\n Cabecalho();\r\n head();\r\n if ($O == 'P') {\r\n ScriptOpen('JavaScript');\r\n FormataProtocolo();\r\n FormataData();\r\n SaltaCampo();\r\n CheckBranco();\r\n ValidateOpen('Validacao');\r\n\r\n Validate('p_prefixo', 'Prefixo', '1', '', '5', '5', '', '0123456789');\r\n Validate('p_numero', 'Número', '1', '', '1', '6', '', '0123456789');\r\n Validate('p_ano', 'Ano', '1', '', '4', '4', '', '0123456789');\r\n Validate('p_proponente', 'Origem externa', '', '', '2', '90', '1', '');\r\n Validate('p_unid_posse', 'Unidade de posse', 'SELECT', '1', '1', '18', '', '1');\r\n //Validate('p_sq_acao_ppa', 'Código do assunto', 'HIDDEN', '', '1', '10', '1', '1');\r\n Validate('p_assunto', 'Detalhamento do assunto', '', '', '4', '90', '1', '1');\r\n Validate('p_processo', 'Interessado', '', '', '2', '90', '1', '1');\r\n Validate('p_ini', 'Início', 'DATA', '', '10', '10', '', '0123456789/');\r\n Validate('p_fim', 'Término', 'DATA', '', '10', '10', '', '0123456789/');\r\n ShowHTML(' if ((theForm.p_ini.value != \\'\\' && theForm.p_fim.value == \\'\\') || (theForm.p_ini.value == \\'\\' && theForm.p_fim.value != \\'\\')) {');\r\n ShowHTML(' alert (\\'Informe ambas as datas ou nenhuma delas!\\');');\r\n ShowHTML(' theForm.p_ini.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n CompData('p_ini', 'Início', '<=', 'p_fim', 'Término');\r\n ShowHTML(' theForm.Botao.disabled=true;');\r\n ValidateClose();\r\n ScriptClose();\r\n } elseif ($w_existe) {\r\n ScriptOpen('JavaScript');\r\n FormataProtocolo();\r\n CheckBranco();\r\n FormataData();\r\n SaltaCampo();\r\n ValidateOpen('Validacao');\r\n if ($w_existe) {\r\n ShowHTML(' var i; ');\r\n ShowHTML(' var w_erro=true; ');\r\n ShowHTML(' for (i=1; i < theForm[\"w_chave[]\"].length; i++) {');\r\n ShowHTML(' if (theForm[\"w_chave[]\"][i].checked) w_erro=false; ');\r\n ShowHTML(' }');\r\n ShowHTML(' if (w_erro) {');\r\n ShowHTML(' alert(\"Você deve informar pelo menos um protocolo!\"); ');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n //Validate('w_chave', 'nº. de protocolo', 'CHECKBOX', '1', '1', '5', '', '1');\r\n Validate('w_observacao', 'Observações sobre o acondicionamento do protocolo', '1', '1', 1, 2000, '1', '1');\r\n Validate('w_assinatura', $_SESSION['LABEL_ALERTA'], '1', '1', '3', '30', '1', '1');\r\n ShowHTML(' if (!confirm(\\'Confirma a geração de guia de tramitação APENAS para ' . (($p_tipo_despacho == f($RS_Parametro, 'despacho_arqcentral')) ? 'as caixas selecionadas' : 'os documentos selecionados') . '?\\')) return false;');\r\n // Se não for encaminhamento\r\n ShowHTML(' theForm.Botao.disabled=true;');\r\n }\r\n ValidateClose();\r\n ScriptClose();\r\n }\r\n ShowHTML('<BASE HREF=\"' . $conRootSIW . '\">');\r\n ShowHTML('</head>');\r\n if ($w_troca > '') {\r\n BodyOpen('onLoad=\\'document.Form.' . $w_troca . '.focus()\\';');\r\n } else {\r\n BodyOpen('onLoad=\\'document.Form.focus()\\';');\r\n }\r\n ShowHTML('<B><FONT COLOR=\"#000000\">' . $w_TP . '</FONT></B>');\r\n ShowHTML('<HR>');\r\n ShowHTML('<div align=center><center>');\r\n ShowHTML('<table border=\"0\" width=\"100%\">');\r\n\r\n if ($O == 'L') {\r\n if (upper($par) != 'ARQSETORIAL') {\r\n ShowHTML('<tr><td colspan=3 bgcolor=\"#D0D0D0\" style=\"border: 2px solid rgb(0,0,0);\"><b><font color=\"#BC3131\">');\r\n ShowHTML(' ATENÇÃO:<ul>');\r\n ShowHTML(' <li>PROTOCOLOS JUNTADOS NÃO PODEM SER ENVIADOS.');\r\n ShowHTML(' <li>Se o trâmite for para pessoa jurídica, não se esqueça de informar para qual unidade dessa entidade você está enviando.');\r\n ShowHTML(' <li>Informe sua assinatura eletrônica e clique sobre o botão <i>Gerar Guia de Tramitação</i>.');\r\n ShowHTML(' </ul></b></font></td>');\r\n }\r\n //// Exibe a quantidade de registros apresentados na listagem e o cabeçalho da tabela de listagem\r\n ShowHTML('<tr><td colspan=2>');\r\n if (strpos(str_replace('p_ordena','w_ordena',MontaFiltro('GET')),'p_')) {\r\n ShowHTML(' <a accesskey=\"F\" class=\"SS\" href=\"' . $w_dir . $w_pagina . $par . '&R=' . $w_pagina . $par . '&O=P&P1=' . $P1 . '&P2=' . $P2 . '&P3=1&P4=' . $P4 . '&TP=' . $TP . '&SG=' . $SG . MontaFiltro('GET') . '\"><u><font color=\"#BC5100\">F</u>iltrar (Ativo)</font></a>');\r\n } else {\r\n ShowHTML(' <a accesskey=\"F\" class=\"SS\" href=\"' . $w_dir . $w_pagina . $par . '&R=' . $w_pagina . $par . '&O=P&P1=' . $P1 . '&P2=' . $P2 . '&P3=1&P4=' . $P4 . '&TP=' . $TP . '&SG=' . $SG . MontaFiltro('GET') . '\"><u>F</u>iltrar (Inativo)</a>');\r\n }\r\n ShowHTML(' <td width=\"1%\" nowrap><b>Registros: ' . count($RS));\r\n ShowHTML('<tr><td align=\"center\" colspan=3>');\r\n ShowHTML(' <TABLE WIDTH=\"100%\" bgcolor=\"' . $conTableBgColor . '\" BORDER=\"' . $conTableBorder . '\" CELLSPACING=\"' . $conTableCellSpacing . '\" CELLPADDING=\"' . $conTableCellPadding . '\" BorderColorDark=\"' . $conTableBorderColorDark . '\" BorderColorLight=\"' . $conTableBorderColorLight . '\">');\r\n ShowHTML(' <tr bgcolor=\"' . $conTrBgColor . '\" align=\"center\">');\r\n ShowHTML(' <td rowspan=2><b>&nbsp;</td>');\r\n ShowHTML(' <td rowspan=2 width=\"1%\" nowrap><b>' . linkOrdena('Protocolo', 'protocolo', 'Form') . '</td>');\r\n ShowHTML(' <td rowspan=2 width=\"1%\" nowrap><b>' . linkOrdena('Tipo', 'nm_tipo', 'Form') . '</td>');\r\n ShowHTML(' <td colspan=4><b>Documento original</td>');\r\n ShowHTML(' <td rowspan=2><b>' . linkOrdena('Resumo', '', 'Form') . '</td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' <tr bgcolor=\"' . $conTrBgColor . '\" align=\"center\">');\r\n ShowHTML(' <td><b>' . linkOrdena('Espécie', 'nm_especie', 'Form') . '</td>');\r\n ShowHTML(' <td><b>' . linkOrdena('Nº', 'numero_original', 'Form') . '</td>');\r\n ShowHTML(' <td><b>' . linkOrdena('Data', 'inicio', 'Form') . '</td>');\r\n ShowHTML(' <td><b>' . linkOrdena('Procedência', 'nm_origem_doc', 'Form') . '</td>');\r\n ShowHTML(' </tr>');\r\n AbreForm('Form', $w_dir . $w_pagina . 'Grava', 'POST', 'return(Validacao(this));', null, $P1, $P2, $P3, $P4, $TP, $SG, $w_pagina . $par, $O);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<input type=\"hidden\" name=\"w_chave[]\" value=\"\"></td>');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_menu\" value=\"' . $w_menu . '\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_unidade_posse\" value=\"' . f($RS_Solic, 'unidade_int_posse') . '\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_pessoa_posse\" value=\"' . f($RS_Solic, 'pessoa_ext_posse') . '\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_tipo_despacho\" value=\"' . $p_tipo_despacho . '\">');\r\n if (nvl($_REQUEST['p_ordena'], '') == '') ShowHTML('<INPUT type=\"hidden\" name=\"p_ordena\" value=\"\">');\r\n ShowHTML(MontaFiltro('POST'));\r\n\r\n if (count($RS) <= 0) {\r\n // Se não foram selecionados registros, exibe mensagem\r\n ShowHTML(' <tr bgcolor=\"' . $conTrBgColor . '\"><td colspan=8 align=\"center\"><b>Não foram encontrados registros.</b></td></tr>');\r\n } else {\r\n // Lista os registros selecionados para listagem\r\n $w_atual = '';\r\n $i = 0;\r\n foreach ($RS as $row) {\r\n $w_cor = ($w_cor == $conTrBgColor || $w_cor == '') ? $w_cor = $conTrAlternateBgColor : $w_cor = $conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"' . $w_cor . '\" valign=\"top\">');\r\n if ($SG == 'PADTRANSF') {\r\n ShowHTML(' <td align=\"center\" width=\"1%\" nowrap>');\r\n ShowHTML(' <INPUT type=\"hidden\" name=\"w_tramite[' . f($row, 'sq_siw_solicitacao') . ']\" value=\"' . f($row, 'sq_siw_tramite') . '\">');\r\n ShowHTML(' <INPUT type=\"hidden\" name=\"w_unid_origem[' . f($row, 'sq_siw_solicitacao') . ']\" value=\"' . f($row, 'unidade_int_posse') . '\">');\r\n ShowHTML(' <input type=\"CHECKBOX\" ' . ((nvl($w_marcado[f($row, 'sq_siw_solicitacao')], '') != '') ? 'CHECKED' : '') . ' class=\"w_chave_cb\" name=\"w_chave[]\" value=\"' . f($row, 'sq_siw_solicitacao') . '\"></td>');\r\n ShowHTML(' <INPUT type=\"hidden\" name=\"w_unid_autua[' . f($row, 'sq_siw_solicitacao') . ']\" value=\"' . f($row, 'unidade_autuacao') . '\">');\r\n /* if (nvl($w_marcado[f($row,'sq_siw_solicitacao')],'')!='') {\r\n ShowHTML(' <input type=\"CHECKBOX\" CHECKED name=\"w_chave[]\" value=\"'.f($row,'sq_solic_pai').'\" ></td>');\r\n } else {\r\n if(in_array(f($row,'sq_siw_solicitacao'),$itens)){\r\n ShowHTML(' <input type=\"CHECKBOX\" CHECKED name=\"w_chave[]\" value=\"'.f($row,'sq_siw_solicitacao').'\"></td>');\r\n }else{\r\n ShowHTML(' <input type=\"CHECKBOX\" name=\"w_chave[]\" value=\"'.f($row,'sq_siw_solicitacao').'\"></td>');\r\n }\r\n } */\r\n ShowHTML(' </td>');\r\n ShowHTML(' <td align=\"center\" width=\"1%\" nowrap><A class=\"HL\" HREF=\"' . $w_dir . 'documento.php?par=Visual&R=' . $w_pagina . $par . '&O=L&w_chave=' . f($row, 'sq_siw_solicitacao') . '&P1=2&P2=' . $P2 . '&P3=' . $P3 . '&P4=' . $P4 . '&TP=' . $TP . '&SG=' . $SG . MontaFiltro('GET') . '\" target=\"visualdoc\" title=\"Exibe as informações deste registro.\">' . f($row, 'protocolo') . '&nbsp;</a>');\r\n ShowHTML(' <td width=\"10\">&nbsp;' . f($row, 'nm_tipo') . '</td>');\r\n ShowHTML(' <td>&nbsp;' . f($row, 'nm_especie') . '</td>');\r\n ShowHTML(' <td width=\"1%\" nowrap>&nbsp;' . f($row, 'numero_original') . '</td>');\r\n ShowHTML(' <td width=\"1%\" nowrap>&nbsp;' . formataDataEdicao(f($row, 'inicio'), 5) . '&nbsp;</td>');\r\n ShowHTML(' <td width=\"1%\" nowrap>&nbsp;' . f($row, 'nm_origem_doc') . '</td>');\r\n if (strlen(Nvl(f($row, 'descricao'), '-')) > 50)\r\n $w_titulo = substr(Nvl(f($row, 'descricao'), '-'), 0, 50) . '...'; else\r\n $w_titulo=Nvl(f($row, 'descricao'), '-');\r\n if (f($row, 'sg_tramite') == 'CA')\r\n ShowHTML(' <td width=\"50%\" title=\"' . htmlspecialchars(f($row, 'descricao')) . '\"><strike>' . $w_titulo . '</strike></td>');\r\n else\r\n ShowHTML(' <td width=\"50%\" title=\"' . htmlspecialchars(f($row, 'descricao')) . '\">' . $w_titulo . '</td>');\r\n }\r\n ShowHTML(' </tr>');\r\n $i += 1;\r\n }\r\n }\r\n ShowHTML(' </center>');\r\n ShowHTML(' </table>');\r\n if ($w_existe) {\r\n ShowHTML(' <tr><td colspan=\"3\">&nbsp;</td></tr>');\r\n ShowHTML(' <tr><td colspan=3><b>DADOS DO ARQUIVAMENTO</b></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td width=\"30%\">Data do arquivamento:<td colspan=2><b>' . formataDataEdicao(time()) . '</b></td></tr>');\r\n $sql = new db_getUorgData;\r\n $RS_Unid = $sql->getInstanceOf($dbms, $_SESSION['LOTACAO']);\r\n ShowHTML(' <tr><td width=\"30%\">Unidade arquivadora:<td colspan=2><b>' . f($RS_Unid, 'nome') . '</b></td></tr>');\r\n ShowHTML(' <tr><td width=\"30%\">Usuário arquivador:<td colspan=2><b>' . $_SESSION['NOME'] . '</b></td></tr>');\r\n ShowHTML(' <tr valign=\"top\"><td width=\"30%\">Acondicionamento:<td title=\"Descreva de forma objetiva onde o documento encontra-se no arquivo setorial.\"><textarea ' . $w_Disabled . ' accesskey=\"O\" name=\"w_observacao\" class=\"STI\" ROWS=5 cols=75>' . $w_observacao . '</TEXTAREA></td>');\r\n ShowHTML(' <tr><td colspan=3>&nbsp;</td></tr>');\r\n ShowHTML(' <tr><td colspan=3><b>'.$_SESSION['LABEL_CAMPO'].':<BR> <INPUT ACCESSKEY=\"A\" class=\"STI\" type=\"PASSWORD\" name=\"w_assinatura\" size=\"30\" maxlength=\"30\" value=\"\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\"><hr>');\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Arquivar\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n }\r\n ShowHTML('</FORM>');\r\n ShowHTML(' </td>');\r\n ShowHTML('</tr>');\r\n } elseif ($O == 'P') {\r\n ShowHTML('<tr><td colspan=3 bgcolor=\"' . $conTrBgColorLightBlue2 . '\"\" style=\"border: 2px solid rgb(0,0,0);\">');\r\n ShowHTML(' Orientação:<ul>');\r\n ShowHTML(' <li>Informe quaisquer critérios de busca e clique sobre o botão <i>Aplicar filtro</i>.');\r\n ShowHTML(' <li>Para pesquisa por período é obrigatório informar as datas de início e término.');\r\n ShowHTML(' <li>Clicando sobre o botao <i>Aplicar filtro</i> sem informar nenhum critério de busca, serão exibidas todas as guias que você tem acesso.');\r\n ShowHTML(' </b></font></td>');\r\n AbreForm('Form', $w_dir . $w_pagina . $par, 'POST', 'return(Validacao(this));', null, $P1, $P2, $P3, $P4, $TP, $SG, $R, 'L');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<tr bgcolor=\"' . $conTrBgColor . '\"><td align=\"center\">');\r\n ShowHTML(' <table width=\"97%\" border=\"0\">');\r\n ShowHTML(' <tr><td><b>Protocolo:<br><INPUT class=\"STI\" type=\"text\" name=\"p_prefixo\" size=\"6\" maxlength=\"5\" value=\"' . $p_prefixo . '\">.<INPUT class=\"STI\" type=\"text\" name=\"p_numero\" style=\"text-align:right;\" size=\"7\" maxlength=\"6\" value=\"' . $p_numero . '\">/<INPUT class=\"STI\" type=\"text\" name=\"p_ano\" size=\"4\" maxlength=\"4\" value=\"' . $p_ano . '\"></td>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n SelecaoUnidade('<U>U</U>nidade que detém a posse do protocolo:', 'U', 'Selecione a unidade de posse.', $p_unid_posse, $w_usuario, 'p_unid_posse', 'CADPA', null);\r\n ShowHTML(' <tr valign=\"top\"><td colspan=\"2\"><b>Documento original:</b><table width=\"100%\" cellpadding=0 cellspacing=3 style=\"border: 1px solid rgb(0,0,0);\"><tr><td width=\"50%\"><td></tr><tr valign=\"top\">');\r\n ShowHTML(' <td><b>Número:<br><INPUT class=\"STI\" type=\"text\" name=\"p_empenho\" size=\"10\" maxlength=\"30\" value=\"' . $p_empenho . '\">');\r\n selecaoEspecieDocumento('<u>E</u>spécie documental:', 'E', 'Selecione a espécie do documento.', $p_solicitante, null, 'p_solicitante', null, null);\r\n ShowHTML(' <tr>');\r\n ShowHTML(' <td><b><u>C</u>riado/Recebido entre:</b><br><input ' . $w_Disabled . ' accesskey=\"C\" type=\"text\" name=\"p_ini\" class=\"STI\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"' . $p_ini . '\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\">' . ExibeCalendario('Form', 'p_ini') . ' e <input ' . $w_Disabled . ' accesskey=\"C\" type=\"text\" name=\"p_fim\" class=\"STI\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"' . $p_fim . '\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\">' . ExibeCalendario('Form', 'p_fim') . '</td>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n SelecaoUnidade('<U>O</U>rigem interna:', 'O', null, $p_unidade, null, 'p_unidade', null, null);\r\n ShowHTML(' <td><b>Orig<U>e</U>m externa:<br><INPUT ACCESSKEY=\"E\" ' . $w_Disabled . ' class=\"STI\" type=\"text\" name=\"p_proponente\" size=\"25\" maxlength=\"90\" value=\"' . $p_proponente . '\"></td>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n// ShowHTML(' <td><b>Código do <U>a</U>ssunto:<br><INPUT ACCESSKEY=\"A\" '.$w_Disabled.' class=\"STI\" type=\"text\" name=\"p_sq_acao_ppa\" size=\"10\" maxlength=\"10\" value=\"'.$p_sq_acao_ppa.'\"></td>');\r\n ShowHTML(' <td><b>Detalhamento do <U>a</U>ssunto/Despacho:<br><INPUT ACCESSKEY=\"A\" ' . $w_Disabled . ' class=\"STI\" type=\"text\" name=\"p_assunto\" size=\"40\" maxlength=\"30\" value=\"' . $p_assunto . '\"></td>');\r\n// ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td><b><U>I</U>nteressado:<br><INPUT ACCESSKEY=\"I\" ' . $w_Disabled . ' class=\"STI\" type=\"text\" name=\"p_processo\" size=\"30\" maxlength=\"30\" value=\"' . $p_processo . '\"></td>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n SelecaoAssuntoRadio('C<u>l</u>assificação:', 'L', 'Clique na lupa para selecionar a classificação do documento.', $p_classif, null, 'p_classif', 'FOLHA', null, '2');\r\n ShowHTML(' </tr></table>');\r\n ShowHTML(' <tr><td align=\"center\"><hr>');\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Aplicar filtro\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n ScriptClose();\r\n }\r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Rodape();\r\n}", "title": "" }, { "docid": "36622930e4a5c8b3832cb522f7cf696e", "score": "0.55093104", "text": "public function estadoDelRepartidorDeLaCuenta(){\n\t\t$resultado = false;\n\t\tif(isset($_SESSION['admin'])){\n\t\t\t$repartidor = $_SESSION['admin'];\n\t\t\t$this->query = \"SELECT estado \n\t\t\t\t\t\t\tFROM pedido \n\t\t\t\t\t\t\tWHERE repartidor = '$repartidor' and DATE(fecha_alta)= CURDATE()\";\n\t\t\t$tabla = $this->get_query();\n\t\t\twhile($fila = $tabla->fetch_assoc()){\n\t\t\t\tif($fila['estado'] == 2) $resultado = true;\n\t\t\t}\n\t\t}\n\t\t//echo ($resultado == true)? 'true':'false';\n\t\treturn $resultado;\n\t}", "title": "" }, { "docid": "352c5cfa569c42f7ee6389c28a61e288", "score": "0.5509081", "text": "public function ubicCaractMov($desde,$hasta,$tipo,$producto,$tipoProIA,$unid,$unidades,$provedor,$consigna=2){\n \n $filtro = 'and m.estatus = 1';\n $filtro .= ' and p.status = 1';\n\n $producto1 = implode('\",\"', $producto);\n $tipoProIA1 = implode('\",\"', $tipoProIA);\n $unidades1 = implode('\",\"', $unidades);\n $provedor1 = implode('\",\"', $provedor);\n\n\n if($tipo == 'movs')\n {\n if($desde!='' && $hasta!=''){\n $filtro .=' and m.fecha <= \"'.$hasta.' 23:59:59\" ';\n } \n }\n if($tipo == 'exis')\n {\n if($desde!=''){ \n $filtro .=' and m.fecha <= \"'.$desde.' 00:00:01\" ';\n }\n }\n\n if($tipoProIA1!=\"\"){\n if($tipoProIA1=='0'){\n $filtro .='';\n }else{\n $filtro .=' and (p.tipo_producto IN (\"'.$tipoProIA1.'\"))';\n }\n }\n\n if($producto1!=\"\"){\n if($producto1=='0'){\n $filtro .='';\n }else{\n $filtro .=' and (p.id IN (\"'.$producto1.'\"))';\n }\n }\n\n if($unidades1!=\"\"){\n if($unidades1=='0'){\n $filtro .='';\n }else{\n if($unid == 1){// compra\n $filtro .=' and (p.id_unidad_compra IN (\"'.$unidades1.'\"))';\n }else{// venta\n $filtro .=' and (p.id_unidad_venta IN (\"'.$unidades1.'\"))';\n }\n \n }\n }\n\n $leftPro = '';\n if($provedor1!=\"\"){\n if($provedor1=='0'){\n $filtro .='';\n }else{\n $filtro .=' and (pprv.id_proveedor IN (\"'.$provedor1.'\"))';\n $leftPro = ' left join app_producto_proveedor pprv on m.id_producto=pprv.id_producto ';\n }\n }\n\n if($consigna!=2){\n $filtro.=' and p.consigna='.$consigna;\n }\n \n\n $query1 = \"(SELECT m.id, p.nombre, p.codigo, m.cantidad, m.costo*m.cantidad importe, m.fecha, u.usuario, m.tipo_traspaso, m.costo, m.referencia, m.id_producto, oo.id idorigen, oo.nombre origen, dd.id iddestino, dd.nombre destino, p.id_tipo_costeo costeo, m.id_almacen_destino as aux, 0 as traspasoaux, rr.codigo_sistema, unv.clave unidad, unc.clave unidadC, unc.factor converC, m.id_producto_caracteristica caract, alr.nombre almacenUbicacion, alr.id idubicacion, p.id_tipo_costeo costeo, cc.codigo moneda, (select nombre from app_almacenes where codigo_sistema = (SUBSTRING_INDEX(rr.codigo_sistema,'.',1))) nombreAlmacen, (select id from app_almacenes where codigo_sistema = (SUBSTRING_INDEX(rr.codigo_sistema,'.',1))) almacenRR, alr.id_sucursal, substring(alr.codigo_sistema,1,5) almP\n from app_inventario_movimientos m\n left join app_almacenes oo on oo.id = m.id_almacen_origen\n left join app_almacenes dd on dd.id = m.id_almacen_destino\n left join app_almacenes rr on rr.id = oo.id\n left join app_productos p on p.id = m.id_producto\n left join accelog_usuarios u on u.idempleado = m.id_empleado\n left join app_unidades_medida unv on unv.id = p.id_unidad_venta\n left join app_unidades_medida unc on unc.id = p.id_unidad_compra\n left join cont_coin cc on cc.coin_id = p.id_moneda\n left join app_almacenes x on x.id = left(rr.codigo_sistema,1)\n left join app_almacenes alr on alr.codigo_sistema = rr.codigo_sistema\n \".$leftPro.\"\n\n where m.tipo_traspaso = 0 \".$filtro.\")\n union all\n (SELECT m.id, p.nombre, p.codigo, m.cantidad, m.costo*m.cantidad importe , m.fecha, u.usuario, m.tipo_traspaso, m.costo, m.referencia, m.id_producto, oo.id idorigen, oo.nombre origen, dd.id iddestino, dd.nombre destino, p.id_tipo_costeo costeo, m.id_almacen_origen as aux, 1 as traspasoaux, rr.codigo_sistema, unv.clave unidad, unc.clave unidadC, unc.factor converC, m.id_producto_caracteristica caract, alr.nombre almacenUbicacion, alr.id idubicacion, p.id_tipo_costeo costeo, cc.codigo moneda, (select nombre from app_almacenes where codigo_sistema = (SUBSTRING_INDEX(rr.codigo_sistema,'.',1))) nombreAlmacen, (select id from app_almacenes where codigo_sistema = (SUBSTRING_INDEX(rr.codigo_sistema,'.',1))) almacenRR, alr.id_sucursal, substring(alr.codigo_sistema,1,5) almP\n from app_inventario_movimientos m\n left join app_almacenes oo on oo.id = m.id_almacen_origen\n left join app_almacenes dd on dd.id = m.id_almacen_destino\n left join app_almacenes rr on rr.id = dd.id\n left join app_productos p on p.id = m.id_producto\n left join accelog_usuarios u on u.idempleado = m.id_empleado\n left join app_unidades_medida unv on unv.id = p.id_unidad_venta\n left join app_unidades_medida unc on unc.id = p.id_unidad_compra\n left join cont_coin cc on cc.coin_id = p.id_moneda\n left join app_almacenes x on x.id = left(rr.codigo_sistema,1)\n left join app_almacenes alr on alr.codigo_sistema = rr.codigo_sistema\n \".$leftPro.\"\n\n where m.tipo_traspaso = 1 \".$filtro.\")\n union all\n (SELECT m.id, p.nombre, p.codigo, m.cantidad, m.costo*m.cantidad importe , m.fecha, u.usuario, m.tipo_traspaso, m.costo, m.referencia, m.id_producto, oo.id idorigen, oo.nombre origen, dd.id iddestino, dd.nombre destino, p.id_tipo_costeo costeo, m.id_almacen_origen as aux, 0 as traspasoaux, rr.codigo_sistema, unv.clave unidad, unc.clave unidadC, unc.factor converC, m.id_producto_caracteristica caract, alr.nombre almacenUbicacion, alr.id idubicacion, p.id_tipo_costeo costeo, cc.codigo moneda, (select nombre from app_almacenes where codigo_sistema = (SUBSTRING_INDEX(rr.codigo_sistema,'.',1))) nombreAlmacen, (select id from app_almacenes where codigo_sistema = (SUBSTRING_INDEX(rr.codigo_sistema,'.',1))) almacenRR, alr.id_sucursal, substring(alr.codigo_sistema,1,5) almP\n from app_inventario_movimientos m \n left join app_almacenes rr on rr.id = m.id_almacen_origen\n left join app_almacenes oo on oo.id = m.id_almacen_origen\n left join app_almacenes dd on dd.id = m.id_almacen_destino\n left join app_productos p on p.id = m.id_producto\n left join accelog_usuarios u on u.idempleado = m.id_empleado\n left join app_unidades_medida unv on unv.id = p.id_unidad_venta\n left join app_unidades_medida unc on unc.id = p.id_unidad_compra\n left join cont_coin cc on cc.coin_id = p.id_moneda\n left join app_almacenes x on x.id = left(rr.codigo_sistema,1)\n left join app_almacenes alr on alr.codigo_sistema = rr.codigo_sistema\n \".$leftPro.\"\n\n where m.tipo_traspaso = 2 \".$filtro.\")\n union all\n (SELECT m.id, p.nombre, p.codigo, m.cantidad, m.costo*m.cantidad importe , m.fecha, u.usuario, m.tipo_traspaso, m.costo, m.referencia, m.id_producto, oo.id idorigen, oo.nombre origen, dd.id iddestino, dd.nombre destino, p.id_tipo_costeo costeo, m.id_almacen_destino as aux, 1 as traspasoaux, rr.codigo_sistema, unv.clave unidad, unc.clave unidadC, unc.factor converC, m.id_producto_caracteristica caract, alr.nombre almacenUbicacion, alr.id idubicacion, p.id_tipo_costeo costeo, cc.codigo moneda, (select nombre from app_almacenes where codigo_sistema = (SUBSTRING_INDEX(rr.codigo_sistema,'.',1))) nombreAlmacen, (select id from app_almacenes where codigo_sistema = (SUBSTRING_INDEX(rr.codigo_sistema,'.',1))) almacenRR, alr.id_sucursal, substring(alr.codigo_sistema,1,5) almP\n from app_inventario_movimientos m\n left join app_almacenes rr on rr.id = m.id_almacen_destino\n left join app_almacenes oo on oo.id = m.id_almacen_origen\n left join app_almacenes dd on dd.id = m.id_almacen_destino\n left join app_productos p on p.id = m.id_producto\n left join accelog_usuarios u on u.idempleado = m.id_empleado\n left join app_unidades_medida unv on unv.id = p.id_unidad_venta\n left join app_unidades_medida unc on unc.id = p.id_unidad_compra\n left join cont_coin cc on cc.coin_id = p.id_moneda\n left join app_almacenes x on x.id = left(rr.codigo_sistema,1)\n left join app_almacenes alr on alr.codigo_sistema = rr.codigo_sistema\n \".$leftPro.\"\n \n where m.tipo_traspaso = 2 \".$filtro.\")\n ORDER BY codigo, fecha, almacenRR ASC;\";\n //echo $query1.'<br><br>';\n //exit();\n //print_r($query1);\n\n $invActUni = $this->queryArray($query1);\n return $invActUni[\"rows\"];\n }", "title": "" }, { "docid": "fbabccfeda7ccac60a70e21b419e2ed2", "score": "0.5504969", "text": "function teto_prev_inativo($r07_valor, $tbprev){\n\n global $pessoal,$Ipessoal,$inssirf_;\n LogCalculoFolha::write(\"Valor Base passado...: \".$r07_valor);\n LogCalculoFolha::write(\"Tabela de Previdencia: \".$tbprev);\n\n if( strtolower($pessoal[$Ipessoal][\"r01_tpvinc\"]) == \"a\" ){\n LogCalculoFolha::write(\"Vinculo do Servidor é Ativo, logo retorna o valor passado\");\n return $r07_valor;\n }\n\n $condicaoaux = \" and r33_codtab = \".db_sqlformat( $tbprev );\n LogCalculoFolha::write(\"select * from inssirf \".bb_condicaosubpes( \"r33_\" ).$condicaoaux);\n\n if( db_selectmax( \"inssirf_\", \"select * from inssirf \".bb_condicaosubpes( \"r33_\" ).$condicaoaux )){\n\n AjustePrevidencia::$aValorTeto[$pessoal[$Ipessoal]['r01_numcgm']] = $inssirf_[0][\"r33_tinati\"];\n /**\n * Valida se o valor passado por parametro eh maior que o teto de inativos\n */\n LogCalculoFolha::write(\"Valor Base passado...: \".$r07_valor);\n LogCalculoFolha::write(\"Valor Inativos.......: \".$inssirf_[0][\"r33_tinati\"]);\n if ( $r07_valor > $inssirf_[0][\"r33_tinati\"] ){\n $r07_valor = $r07_valor - $inssirf_[0][\"r33_tinati\"];\n }else{\n $r07_valor = 0;\n }\n }\n\n return $r07_valor;\n}", "title": "" }, { "docid": "d3ab9f3e0b9bce4ac5f58e618496130a", "score": "0.54977083", "text": "public function executeSubirCantidadArticuloVenta()\n\t{\n\t\t// Obtenemos el menu segun sus permisos\n\t\t$menu = new GenerarMenus();\t\t\n\t\t$this->menu_botones =$menu->generarMenuBotones();\n\t\t\n\t\t// Obtenemos un objeto de la clase AccionesUrl\n\t\t$this->acc_url = new AccionesUrl();\n\t\t\n\t\t// Obtenemos un objeto de la clase AccionesFechas\n\t\t$this->acc_fechas = new AccionesFechas();\n\t\t\n\t\t// Obtenemos un objeto de la clase Utilidades\n\t\t$this->acc_utilidades = new Utilidades();\n\t\t\n\t\t// Obtenemos un objeto de la clase Clientes\n\t\t$this->acc_clientes = new AccionesClientes();\n\t\t\n\t\t// Obtenemos un objeto de la clase AccionesVentas\n\t\t$this->acc_ventas = new AccionesVentas();\n\t\t\n\t\t// Obtenemos un select con todos los Clientes\n\t\t$this->ar_clientes = $this->acc_clientes->obtenerSelectClientes();\t\n\t\t\t\t\n\t\t// Obtenemos un objeto de la clase Articulos\n\t\t$this->acc_articulos = new AccionesArticulos();\t\n\n\t\t// Obtenemos el id de la venta para mantener la trazabilidad\t\t\n\t\t$this->id_venta_temporal = $this->getRequestParameter('id_venta_temporal');\n\t\t\t\n\t\t// Obtenemos el id del articulo que vamos a a agregar\n\t\t$this->id_articulo = $this->getRequestParameter('id_articulo');\n\t\t\n\t\t// La cantidad esta vacia\n\t\t$cantidad = $this->getRequestParameter('cantidad');\n\t\t\t\t\t\n\t\t// Obtenemos el id de la linea de venta a actualizar\t\t\n\t\t$this->id_linea_venta = $this->getRequestParameter('id_linea_venta');\t\n\t\t\n\t\t$obj_articulo_x_venta = $this->acc_ventas->obtenerObjArticulosXVenta($this->id_linea_venta);\n\t\t\n\t\t$id_venta = $obj_articulo_x_venta->getIdVenta();\n\t\t\n\t\tif($this->id_linea_venta)\n\t\t{\n\t\t\t$cantidad_old = $obj_articulo_x_venta->getCantidad();\n\t\t\t\n\t\t\t// Obtenemos el objeto Articulo\n\t\t\t$obj_articulo = $this->acc_articulos->obtenerObjArticulo($obj_articulo_x_venta->getIdArticulo());\n\t\t\t\t\t\t\n\t\t\t$cantidad_stock = $obj_articulo->getStock();\n\t\t\tif($cantidad_old < $cantidad_stock)\n\t\t\t{\n\t\t\t\t$cantidad = $cantidad_old + 1;\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$cantidad = $cantidad_old;\n\t\t\t}\t\t\t\n\t\t\t$linea_venta_update = $this->acc_ventas->actualizarLineaVenta($this->id_linea_venta,$cantidad);\n\t\t}\n\t\t\n\t\t// Obtenemos el listado de las lineas de venta según el id de venta\n\t\t$this->ar_lineas_venta = $this->acc_ventas->obtenerLineasVentaXIdVenta($id_venta);\t\t\n\t}", "title": "" }, { "docid": "16692511849a86e048c2c8f956ad5ee9", "score": "0.54975843", "text": "function listarDetalleBoletosWeb(){\r\n $this->procedimiento='obingresos.ft_detalle_boletos_web_sel';\r\n $this->transaccion='OBING_DETBOL_SEL';\r\n $this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n $this->capturaCount('importe','numeric');\r\n $this->capturaCount('neto','numeric');\r\n $this->capturaCount('comision','numeric');\r\n\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_detalle_boletos_web','int4');\r\n $this->captura('billete','varchar');\r\n $this->captura('id_agencia','int4');\r\n $this->captura('id_periodo_venta','int4');\r\n $this->captura('id_moneda','int4');\r\n $this->captura('procesado','varchar');\r\n $this->captura('estado_reg','varchar');\r\n $this->captura('void','varchar');\r\n $this->captura('importe','numeric');\r\n $this->captura('nit','varchar');\r\n $this->captura('fecha_pago','date');\r\n $this->captura('razon_social','varchar');\r\n $this->captura('numero_tarjeta','varchar');\r\n $this->captura('comision','numeric');\r\n $this->captura('neto','numeric');\r\n $this->captura('entidad_pago','varchar');\r\n $this->captura('fecha','date');\r\n $this->captura('medio_pago','varchar');\r\n $this->captura('moneda','varchar');\r\n $this->captura('razon_ingresos','varchar');\r\n $this->captura('origen','varchar');\r\n $this->captura('nit_ingresos','varchar');\r\n $this->captura('endoso','varchar');\r\n $this->captura('conjuncion','varchar');\r\n $this->captura('numero_autorizacion','varchar');\r\n $this->captura('id_usuario_reg','int4');\r\n $this->captura('fecha_reg','timestamp');\r\n $this->captura('usuario_ai','varchar');\r\n $this->captura('id_usuario_ai','int4');\r\n $this->captura('id_usuario_mod','int4');\r\n $this->captura('fecha_mod','timestamp');\r\n $this->captura('usr_reg','varchar');\r\n $this->captura('usr_mod','varchar');\r\n $this->captura('pnr','varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "ec5f8d7a81a8d36b9eef14ad8fd457f9", "score": "0.5481247", "text": "public function shownonsubcribe()\n {\n try { \n\n $obj1 = new mod_show_unsub();\n $result = $obj1->shownonsubcribe();\n \n $obj = new mod_show_unsub();\n $rows = $obj->paging();\n $page_rows = 10;\n $last = ceil($rows/$page_rows);\n if ($last<1) {\n $last = 1;\n }\n $pagenum = 1;\n if (isset($_GET['pn'])) {\n $pagenum = preg_replace('#[^0-9]#', '', $_GET['pn']);\n }\n if ($pagenum <1) {\n $pagenum = 1;\n }elseif ($pagenum > $last) {\n $pagenum = $last;\n }\n $limit = 'Limit'.($pagenum -1)*$page_rows.','.$page_rows;\n $text_line1 = \"unsubcribe (<b>$rows</b>)\";\n $text_line2 = \"page <b>$pagenum</b> of <b>$last</b>\";\n $paginationctrs = '';\n if ($last !=1) {\n \n if ($pagenum >1) {\n $previous = $pagenum -1;\n $paginationctrs .='<a href=\"'.$_SERVER['PHP_SELF'].'?pn='.$previous.'\">previous</a> &nbsp; &nbsp;';\n for ($i=$pagenum-4; $i = $pagenum; $i++){\n if ($i > 0) {\n $paginationctrs .='<a href=\"'.$_SERVER['PHP_SELF'].'?pn='.$i.'\">\".$i.\"</a> &nbsp;';\n \n }\n \n \n }\n $paginationctrs .= ''.$pagenum.'&nbsp';\n for ($i = $pagenum+1; $i<=$last; $i++){\n $paginationctrs .= $paginationctrs .='<a href=\"'.$_SERVER['PHP_SELF'].'?pn='.$i.'\">'.$i.'/a> &nbsp;';;\n if ($i >= $pagenum+4) {\n break;\n }\n }\n if ($pagenum != $last) {\n $next = $pagenum + 1;\n $paginationctrs = '&nbsp; &nbsp; <a href=\"'.$_SERVER[\"PHP_SELF\"].'?pn=\"'.$next.'\">Next</a>';\n }\n }\n }\n \n \n $message = '';\n if ($result->num_rows > 0)\n { \n \n \n $message .= '<div class=\"widget-content nopadding\">\n \n<table class=\"table table-bordered data-table\">\n <thead>\n <tr>\n <th>S/N</th>\n <th>First_name</th>\n <th>Last_name</th>\n <th>Email</th>\n <th>Phone</th>\n <th>Date Joined</th>\n </tr>\n </thead>\n <tbody>';\n $count = 1;\n \n while ($row = $result->fetch_assoc())\n {\n \n \n $message.=\"\"; \n \n \n $message .= '<tr class=\"\"><td> '.$count.' </td><td>'.$row[\"first_name\"].' </td><td>'.$row[\"last_name\"].' </td><td>'.$row[\"email\"].'</td><td>'.$row[\"phone\"].'</td><td >'.$row[\"date\"].'</td></tr>';\n \n \n \n $count ++;\n \n \n }\n $message .= \"</tbody>\n </table>\n </div>\"; \n return $message;\n \n \n\n\n\n \n } else {\n $message = \"no record for now\";\n return $message;\n }\n }\n catch(Exception $e) {\n \n $message = $e->getMessage();\n return $message;\n}\n}", "title": "" }, { "docid": "f9c69f13fcdce005c3310d002d20ee43", "score": "0.5480965", "text": "public function svuota() {\n $session=USingleton::getInstance('USession');\n $session->cancella_valore('carrello');\n $this->_carrello=false;\n return $this->contenuto();\n }", "title": "" }, { "docid": "02de855d47b2407f792d74c693b4cde2", "score": "0.54781777", "text": "public function riepilogo() {\n $view = USingleton::getInstance('VOrdine');\n $session = USingleton::getInstance('USession');\n $username=$session->leggi_valore('username');\n $FUtente=new FUtente();\n $utente=$FUtente->load($username);\n $this->_carrello->setUtente($utente);\n $dati_utente=get_object_vars($utente);\n $view->impostaDati('dati_utente', $dati_utente);\n $items=$this->_carrello->getItems();\n $carrello['oggetti']=array();\n $carrello['totale']=$this->_carrello->getPrezzoTotale();\n foreach ($items as $item) {\n $carrello['oggetti'][]=array_merge(get_object_vars($item->getLibro()), array('quantita' => $item->quantita));\n }\n $view->impostaDati('carrello', $carrello);\n $view->setLayout('riepilogo');\n $session->imposta_valore('carrello',serialize($this->_carrello));\n return $view->processaTemplate();\n }", "title": "" }, { "docid": "9bd8df8d9c682db887ba61f82fc2f944", "score": "0.5477754", "text": "public function getRegle();", "title": "" }, { "docid": "ea6316c916e48518c1740a817980739e", "score": "0.54756457", "text": "function actualizarEstadoMoraDeComercio(){\n $com = R::findAll(\"comercios\");\n foreach($com as $c){\n $ci = R::findOne(\"credito_instancia\",\"id_comercio LIKE ? ORDER BY fecha_liquidacion DESC\",[$c[\"id\"]]);\n if($ci[\"fecha_liquidacion\"] != NULL && $ci[\"fecha_liquidacion\"] != 0){\n \n $t = strtotime($ci[\"fecha_liquidacion\"]); // ultima liquidacion\n $n = time(); // hoy\n $dif = round(($n - $t) / (60*60*24)); // dias diferencia\n // echo $dif;\n \n if($dif >= 180) $c[\"estado\"] = 0; // no activa\n elseif($dif >= 90) $c[\"estado\"] = 3; // no activ hoy\n elseif($dif >= 30) $c[\"estado\"] = 2; // semiactiva\n else $c[\"estado\"] = 1; // activa\n \n R::store($c);\n }\n }\n}", "title": "" }, { "docid": "7c35e5b7ef4409d83b144a5b227e3ffc", "score": "0.54718006", "text": "public function copiarIntencionReinscribirse()\n {\n try {\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n\n $ciclosiguiente = $dbm->getRepositorioById('Ciclo', 'siguiente', 1);\n if (!$ciclosiguiente) {\n return new View(\"No se ha configurado el ciclo siguiente\", Response::HTTP_PARTIAL_CONTENT);\n }\n $cicloactual = $dbm->getRepositorioById('Ciclo', 'actual', 1);\n if (!$cicloactual) {\n return new View(\"No se ha configurado el ciclo actual\", Response::HTTP_PARTIAL_CONTENT);\n }\n $alumnoporcicloactual = $dbm->GetAlumnoporCiclo(array('cicloid' => $cicloactual->getCicloid(), \"alumnoreinscripcion\" => true));\n if (sizeof($alumnoporcicloactual) == 0) {\n return new View(\"Todos los alumnos del ciclo actual ya han sido agregados al ciclo siguiente\", Response::HTTP_PARTIAL_CONTENT);\n }\n\n $dbm->getConnection()->beginTransaction();\n foreach ($alumnoporcicloactual as $ac) {\n $alumnoporciclosiguiente = $dbm->getOneByParametersRepositorio('CeAlumnoporciclo', array(\"cicloid\" => $ciclosiguiente, \"alumnoid\" => $ac[\"alumnoid\"]));\n if (!$alumnoporciclosiguiente) {\n $gradoactual = $ac[\"gradoid\"];\n if ($gradoactual != 17 && $gradoactual != 18) {\n switch ($gradoactual) {\n case 12:\n case 14:\n case 16:\n $numeroregistro = 2;\n $gradosiguiente = $gradoactual + 1;\n break;\n case 13:\n case 15:\n $numeroregistro = 2;\n $gradosiguiente = $gradoactual + 2;\n break;\n case 19:\n $numeroregistro = 1;\n $gradosiguiente = 1;\n break;\n default:\n $numeroregistro = 1;\n $gradosiguiente = $gradoactual + 1;\n break;\n }\n for ($i = 0; $i < $numeroregistro; $i++) {\n $alumnoporciclo = new CeAlumnoporciclo();\n $alumnoporciclo->setAlumnoid($dbm->getRepositorioById(\"CeAlumno\", \"alumnoid\", $ac[\"alumnoid\"]));\n $alumnoporciclo->setCicloid($ciclosiguiente);\n $alumnoporciclo->setGradoid($dbm->getRepositorioById('Grado', 'gradoid', $gradosiguiente + $i));\n $alumnoporciclo->setEstatusalumnocicloid(null);\n $alumnoporciclo->setIntencionreinscribirseid($dbm->getRepositorioById('CeIntencionreinscribirse', 'intencionreinscribirseid', 1));\n $dbm->saveRepositorio($alumnoporciclo);\n }\n }\n }\n }\n $dbm->getConnection()->commit();\n return new View(\"Se han guardado los registros.\", Response::HTTP_OK);\n } catch (\\Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }", "title": "" }, { "docid": "29eff74d086a505c0078647a2379dde7", "score": "0.54677886", "text": "function cl_solicitem() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"solicitem\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "f7b366ebed861f0786784e5b8c891c88", "score": "0.5466696", "text": "function listarObligacionPagoSol(){\r\n \r\n //Definicion de variables para ejecucion del procedimientp\r\n $this->procedimiento='tes.ft_obligacion_pago_sel';\r\n $this->transaccion='TES_OBPGSOL_SEL';\r\n $this->tipo_procedimiento='SEL';//tipo de transaccion\r\n \r\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\r\n $this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\r\n \r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_obligacion_pago','int4');\r\n $this->captura('id_proveedor','int4');\r\n $this->captura('desc_proveedor','varchar');\r\n $this->captura('estado','varchar');\r\n $this->captura('tipo_obligacion','varchar');\r\n $this->captura('id_moneda','int4');\r\n $this->captura('moneda','varchar');\r\n $this->captura('obs','varchar');\r\n $this->captura('porc_retgar','numeric');\r\n $this->captura('id_subsistema','int4');\r\n $this->captura('nombre_subsistema','varchar');\r\n $this->captura('id_funcionario','int4');\r\n $this->captura('desc_funcionario1','text');\r\n $this->captura('estado_reg','varchar');\r\n $this->captura('porc_anticipo','numeric');\r\n $this->captura('id_estado_wf','int4');\r\n $this->captura('id_depto','int4');\r\n $this->captura('nombre_depto','varchar');\r\n $this->captura('num_tramite','varchar');\r\n $this->captura('id_proceso_wf','int4');\r\n $this->captura('fecha_reg','timestamp');\r\n $this->captura('id_usuario_reg','int4');\r\n $this->captura('fecha_mod','timestamp');\r\n $this->captura('id_usuario_mod','int4');\r\n $this->captura('usr_reg','varchar');\r\n $this->captura('usr_mod','varchar');\r\n $this->captura('fecha','date');\r\n $this->captura('numero','varchar');\r\n $this->captura('tipo_cambio_conv','numeric');\r\n $this->captura('id_gestion','integer');\r\n $this->captura('comprometido','varchar');\r\n $this->captura('nro_cuota_vigente','numeric');\r\n $this->captura('tipo_moneda','varchar');\r\n $this->captura('total_pago','numeric');\r\n $this->captura('pago_variable','varchar');\r\n $this->captura('id_depto_conta','integer');\r\n $this->captura('total_nro_cuota','integer');\r\n $this->captura('fecha_pp_ini','date');\r\n $this->captura('rotacion','integer');\r\n $this->captura('id_plantilla','integer');\r\n $this->captura('desc_plantilla','varchar');\r\n $this->captura('desc_funcionario','text');\r\n $this->captura('ultima_cuota_pp','numeric');\r\n $this->captura('ultimo_estado_pp','varchar');\r\n $this->captura('tipo_anticipo','varchar');\r\n\t\t$this->captura('ajuste_anticipo','numeric');\r\n\t\t$this->captura('ajuste_aplicado','numeric');\r\n\t\t$this->captura('monto_estimado_sg','numeric');\r\n\t\t$this->captura('id_obligacion_pago_extendida','integer');\r\n\t\t$this->captura('desc_contrato','text');\r\n\t\t$this->captura('id_contrato','integer');\r\n\t\t$this->captura('obs_presupuestos','varchar');\r\n\t\t$this->captura('uo_ex','varchar');\r\n\t\t\r\n\t\t\r\n\t\t/////////////EGS 13/08/2018/////////\r\n\t\t$this->captura('monto_total_adjudicado','numeric');\r\n\t\t$this->captura('total_anticipo','numeric');\r\n\t\t$this->captura('monto_ajuste_ret_anticipo_par_ga','numeric');\r\n\t\t$this->captura('monto_ajuste_ret_garantia_ga','numeric');\r\n\t\t$this->captura('pedido_sap','varchar');\r\n //////////////// EGS 13/08/2018 //////////////\r\n $this->captura('fin_forzado','varchar'); //#7890\r\n\t\t$this->captura('monto_sg_mo','numeric'); //#7890\r\n $this->captura('comprometer_iva','varchar'); //#16\r\n\r\n\t\t$this->captura('cod_tipo_relacion','varchar'); //#48\r\n\t\t$this->captura('id_obligacion_pago_extendida_relacion','int4'); //#48\r\n\t\t$this->captura('desc_obligacion_pago','varchar'); //#48\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n \r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "d8591981d2891ef967e8b1b48f521cbe", "score": "0.5458574", "text": "public function consSegAdolPosEgreso(){\n\t\t$conect=Yii::app()->db;\n\t\t$sqlConsSegAdol=\"select * from seguimiento_adol where num_doc=:num_doc and seg_posegreso='true'\";\n\t\t$consSegAdol=$conect->createCommand($sqlConsSegAdol);\n\t\t$consSegAdol->bindParam(\"num_doc\",$this->num_doc,PDO::PARAM_STR);\n\t\t$readSegAdol=$consSegAdol->query();\n\t\t$resSegAdol=$readSegAdol->readAll();\n\t\t$readSegAdol->close();\n\t\treturn $resSegAdol;\t\t\n\t}", "title": "" }, { "docid": "e249c0232caa83af5c5513ab827bb463", "score": "0.5457866", "text": "function relatorioDeCelulaPart1Controle(){\r\n require_once (\"control/dao.php\");\r\n \r\n $objDao = dao::getInstance();\r\n \r\n return $objDao->relatorioDeCelulaPart1Dao();\r\n \r\n }", "title": "" }, { "docid": "a08af407b64d5a8c2fd8a48296e817bd", "score": "0.5451312", "text": "function buscaControleRejPres($solicRej){\n\t require \"conectsqlserverci.php\";\n $sqlBuscaControlesRejP=\"select ctrl_prz_rejeitado,\n rej.sit_solicitacao,\n rej.situac_item_sol\nfrom TESOLJUST jus (nolock)\ninner join TECTRLORGM seto (nolock) on seto.organograma = jus.setor_gestor\nleft join COCSO rej (nolock) on rej.controle = ctrl_prz_rejeitado\nwhere jus.solicitacao = \".$solicRej.\"\nand jus.tipo = 'G'\";\n $resBuscaControlesRejP = odbc_exec($conCab, $sqlBuscaControlesRejP) or die(odbc_error());\n $arrayBuscaControlesRejP=odbc_fetch_array($resBuscaControlesRejP);\n return $arrayBuscaControlesRejP;\n\t }", "title": "" }, { "docid": "6ad7ff6a61bc4b079b3308134c533523", "score": "0.5450624", "text": "function verCurAprobados()\r\n {\r\n for ($j = 1; $j <= $this->mNumCursos; $j++) {\r\n $query_retrasada = $this->gsql->verCurAprobados_select1(trim($this->mCarnet), trim($_SESSION[\"cursosAsig\"][$j]['curso']), trim($_SESSION[\"cursosAsig\"][$j]['mCarreraCurso']));\r\n\r\n if (($_SESSION[\"sConRet\"]->query($query_retrasada)) AND ($_SESSION[\"sConRet\"]->num_rows() >= 1)) {\r\n $_SESSION[\"cursosAsig\"][$j]['mEstadoAsignar'] = 3;\r\n } // curso aprobado, se puede asignar en restrasada\r\n // fin de compacion de ejecucion del query\r\n } // fin del for de numero de cursos\r\n }", "title": "" }, { "docid": "af291c6a120da0d77896cf7ac584b256", "score": "0.54464304", "text": "function observaciones() {\n ?>\n <tr class=\"cuadro_plano centrar\">\n <th colspan=\"2\">\n <hr>Observaciones\n </th>\n </tr>\n <tr class=\"cuadro_plano\">\n <td colspan=\"2\">\n * Si el fondo del enlace est&aacute; en <font color=\"#F90101\">rojo</font>, significa que el grupo presenta cruce o sobrecupo.\n </td>\n </tr>\n <?\n }", "title": "" }, { "docid": "48bd7099836d0f9a76741361f7405d84", "score": "0.5436353", "text": "function aplicarMotivoNumeroEspaciosPerdidos(){\n\t\t$motivo=0;\n\t\tif(isset($this->registroNotasPerdidasPorEstudiante[$this->codigoEstudiante])){\n\t\t\tforeach($this->registroNotasPerdidasPorEstudiante[$this->codigoEstudiante] as $asignatura=>$valor){\n\t\t\t\tforeach($valor as $anioperiodo=>$nota){\n\t\t\t\t\t$anioper=$this->anio.$this->periodo;\n $anioperant=$this->anio.$this->periodo-1;\n\t\t\t\t\t$this->EspaciosPerdidosTotales[]=$asignatura.\"-\".$anioperiodo;\n\t\t\t\t\tif(($anioper==$anioperiodo||$anioperant==$anioperiodo)){\n\t\t\t\t\t\t$this->EspaciosPerdidosActuales[]=$asignatura;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\treturn $motivo;\n\t\t}\n $aprobadas=$this->consultarAprobadasVacacionales($this->anio,$this->periodo,$this->codigoEstudiante);\n $this->EspaciosPerdidosActuales=array_unique($this->EspaciosPerdidosActuales);\n if(is_array($aprobadas))\n {\n foreach ($aprobadas as $key => $value)\n {\n $this->EspaciosPerdidosActuales=array_diff($this->EspaciosPerdidosActuales,$value);\n }\n }\n if(count($this->EspaciosPerdidosActuales)>2){\n\t\t\t$motivo=20;\n\t\t}\n\t\treturn $motivo;\n\t}", "title": "" }, { "docid": "7126873011f71b816330e36ff9d299ca", "score": "0.54311997", "text": "public function rechazarDenunciaComentario()\n\t{\n\t\ttry \n\t\t{\n\t\t\t\\DB::beginTransaction();\n\n\t\t\t// Si la denuncia es falsa se reactiva el comentario y se abre un historial al denunciante\n\t\t\t// Se abre el historial al denunciante para incrementar sus denuncias falsas\n\n\t\t\t# historial para el denunciante, sus denuncias falsas incrementan\n\t\t\t$historialDenunciante = $this->historialRepo->nuevoHistorial(\\Input::get('denunciante_id'));\n\t\t\t$historialDenunciante->denunciasfalsas++;\n\t\t\t$this->historialRepo->save($historialDenunciante);\n\n\t\t\t$comentario_id = \\Input::get('comentario_id');\n\n\t\t\tif($this->comentarioRepo->reactivarComentarioId($comentario_id))\n\t\t\t{\n\t\t\t\t# se elimina la denuncia una vez se ha revisado y gestionado\n\t\t\t\t$this->denunciaRepo->eliminarDenunciaTipoComentario($comentario_id);\n\n\t\t\t\t# se requiere la configuracion del sistema para conocer el contadorDeDenuncias del sistema permitido\n\t\t\t\t$configuracion = $this->configuracionRepo->cargarConfiguracionActual();\n\t\t\t\t$contadorDeDenuncias = $configuracion->contadordedenuncias;\n\n\t\t\t\t# contadordedenuncias del denunciante\n\t\t\t\t$contadordenuncias = $historialDenunciante->denunciasfalsas - $historialDenunciante->denunciasverdaderas;\n\n\t\t\t\t// el contadordedenuncias almacena la diferencia entre las denuncias falsas y verdaderas\n\t\t\t\t// denuncias falsas - denuncias verdaderas\n\t\t\t\t// Si el contadordedenuncias del denunciante supera el número máximo permitido por el sistema, \n\t\t\t\t// se bloquea al usuario por abusar del sistema de denuncias \n\n\t\t\t\t# si contadordedenuncias del denunciante es >= al contadorDeDenuncias del sistema se bloquea denunciante\n\n\t\t\t\tif ($contadordenuncias >= $contadorDeDenuncias)\n\t\t\t\t{\n\t\t\t\t\t$this->cuentaRepo->bloquearCuenta($historialDenunciante->usuario_id);\n\t\t\t\t}\n\n\t\t\t\t\\DB::commit();\n\n\t\t\t\treturn \\Redirect::route('admin.revisar.comentarios.denunciados')->with('status_ok', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Comentario revisado y \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t reactivado correctamente');\n\t\t\t}\n\t\t\treturn \\Redirect::route('admin.revisar.comentarios.denunciados')->with('status_error', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'El comentario no pudo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ser reactivado');\n\t\t}\n\t\tcatch (\\Exception $ex)\n\t\t{\n\t\t\t\\DB::rollback();\n\t\t\t\\Session::flash('error_de_servidor',1);\n\t\t\treturn \\Redirect::back();\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "f82d818f76284a299d0a38ee8e55c7d1", "score": "0.5431083", "text": "function Seek() { \n $this->query = \"\n SELECT * FROM actividad\n WHERE id_actividad = '$this->id_actividad';\n \";\n $this->get_one_result_from_query();\n if ($this->feedback['ok']){ // Éxito en la obtención\n if ($this->feedback['code'] == '00002') { // Vuelve vacío\n $this->feedback['code'] = '60010';\n } else { // Vuelve con datos\n $this->feedback['code'] = '60011';\n }\n } else {\n if ($this->feedback['code'] != '00101') // Si no fallo de gestor de BD\n $this->feedback['code'] = '60012'; // Error de obtención\n }\n return $this->feedback;\n \n }", "title": "" }, { "docid": "281227f1d12d9f479f75271259440a61", "score": "0.5422709", "text": "public function sveRecenzijeOglasavaca() {\n $this->prikaz('spisak_recenzija', ['idOglasavaca' => $this->session->get('oglasavac')->id]);\n }", "title": "" }, { "docid": "081556b8f1a47c7f49a2c96afbfcae30", "score": "0.5417208", "text": "function cl_transferenciafinanceirarecebimento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"transferenciafinanceirarecebimento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "382caeed905d2bc1301837b884a1e472", "score": "0.54141134", "text": "function recuperaIdSuperior(conexao $conn, $sigla) {\n $query = \"SELECT id FROM unidade WHERE sigla = '$sigla'\";\n //SELECT id FROM subunidade WHERE descricao = \"3ª CIPM - Currais Novos\"\n \n $result = mysqli_query($conn->conecta(), $query);\n\n if (mysqli_num_rows($result) > 0) {\n while($row = mysqli_fetch_assoc($result)) {\n $id = $row['id'];\n return $id; \n }\n } else {\n echo \"0 results\";\n } \n }", "title": "" }, { "docid": "6609245f5ff18f9781e58af0a095837e", "score": "0.5414055", "text": "function Lancamento() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n $w_chave = $_REQUEST['w_chave'];\r\n Cabecalho();\r\n head();\r\n ShowHTML('<TITLE>'.$conSgSistema.' - Listagem de tipos de lançamento</TITLE>');\r\n if ($P1==2) ShowHTML('<meta http-equiv=\"Refresh\" content=\"'.$conRefreshSec.'; URL='.str_replace($w_dir,'',MontaURL('MESA')).'\">');\r\n Estrutura_CSS($w_cliente);\r\n \r\n if ($w_troca>'' && $O!='E') {\r\n // Se for recarga da página\r\n $w_pai = $_REQUEST['w_pai'];\r\n $w_nome = $_REQUEST['w_nome'];\r\n $w_descricao = $_REQUEST['w_descricao'];\r\n $w_codigo_externo = $_REQUEST['w_codigo_externo'];\r\n $w_receita = $_REQUEST['w_receita'];\r\n $w_despesa = $_REQUEST['w_despesa'];\r\n $w_reembolso = $_REQUEST['w_reembolso'];\r\n $w_ativo = $_REQUEST['w_ativo'];\r\n } elseif ($O=='L') {\r\n $sql = new db_getTipoLancamento; $RS = $sql->getInstanceOf($dbms,null,null,$w_cliente,'ARVORE');\r\n } elseif (strpos('AEV',$O)!==false) {\r\n $sql = new db_getTipoLancamento; $RS = $sql->getInstanceOf($dbms,$w_chave,null,$w_cliente,null);\r\n foreach ($RS as $row) {$RS=$row; break;}\r\n $w_chave = f($RS,'chave');\r\n $w_pai = f($RS,'sq_tipo_lancamento_pai');\r\n $w_nome = f($RS,'nome');\r\n $w_descricao = f($RS,'descricao');\r\n $w_codigo_externo = f($RS,'codigo_externo');\r\n $w_receita = f($RS,'receita');\r\n $w_despesa = f($RS,'despesa');\r\n $w_reembolso = f($RS,'reembolso');\r\n $w_ativo = f($RS,'ativo');\r\n $w_qt_filhos = f($RS,'qt_filhos');\r\n } \r\n if (strpos('IAE',$O)!==false) {\r\n ScriptOpen('JavaScript');\r\n modulo();\r\n ValidateOpen('Validacao');\r\n if (strpos('IA',$O)!==false) {\r\n Validate('w_nome','Nome','1','1','5','200','1','1');\r\n Validate('w_descricao','descrição','1','1','5','200','1','1');\r\n Validate('w_codigo_externo','Código externo','1','','1','30','1','1');\r\n ShowHTML(' if (theForm.w_receita[1].checked && theForm.w_despesa[1].checked) {');\r\n ShowHTML(' alert (\"Não pode existir tipo de lançamento com valores negativos para os campos recebimento e pagamento ao mesmo tempo!\");');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n /* Validate('w_assinatura',$_SESSION['LABEL_ALERTA'],'1','1','3','30','1','1');\r\n } elseif ($O=='E') {\r\n Validate('w_assinatura',$_SESSION['LABEL_ALERTA'],'1','1','3','30','1','1');\r\n ShowHTML(' if (confirm(\"Confirma a exclusão deste registro?\")) ');\r\n ShowHTML(' { return (true); }; ');\r\n ShowHTML(' { return (false); }; '); */\r\n } \r\n ShowHTML(' theForm.Botao[0].disabled=true;');\r\n ShowHTML(' theForm.Botao[1].disabled=true;');\r\n ValidateClose();\r\n ScriptClose();\r\n } \r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n ShowHTML('</HEAD>');\r\n if ($w_troca>'') {\r\n BodyOpen('onLoad=\"document.Form.'.$w_troca.'.focus()\";');\r\n } elseif ($O=='I' || $O=='A') {\r\n BodyOpen('onLoad=\"document.Form.w_nome.focus()\";');\r\n } elseif ($O=='L') {\r\n BodyOpen('onLoad=\"this.focus()\";');\r\n } else {\r\n\tBodyOpen('onLoad=\"this.focus()\";');\r\n //BodyOpen('onLoad=\"document.Form.w_assinatura.focus()\";');\r\n } \r\n Estrutura_Topo_Limpo();\r\n Estrutura_Menu();\r\n Estrutura_Corpo_Abre();\r\n Estrutura_Texto_Abre();\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n if ($O=='L') {\r\n ShowHTML('<tr>');\r\n if ($w_libera_edicao=='S') {\r\n ShowHTML(' <td><a accesskey=\"I\" class=\"ss\" href=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=I&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\"><u>I</u>ncluir</a>&nbsp;');\r\n }\r\n ShowHTML(' <td align=\"right\">'.exportaOffice().'<b>Registros: '.count($RS));\r\n ShowHTML('<tr><td align=\"center\" colspan=3>');\r\n ShowHTML(' <TABLE class=\"tudo\" WIDTH=\"100%\" bgcolor=\"'.$conTableBgColor.'\" BORDER=\"'.$conTableBorder.'\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\">');\r\n ShowHTML(' <td><b>'.LinkOrdena('Nome','nome').'</font></td>');\r\n ShowHTML(' <td><b>'.LinkOrdena('Descrição','descricao').'</font></td>');\r\n ShowHTML(' <td><b>'.LinkOrdena('Recebimento','nm_receita').'</font></td>');\r\n ShowHTML(' <td><b>'.LinkOrdena('Pagamento','nm_despesa').'</font></td>');\r\n ShowHTML(' <td><b>'.LinkOrdena('Reembolso','nm_reembolso').'</font></td>');\r\n ShowHTML(' <td><b>'.LinkOrdena('Lançamentos','qt_lancamentos').'</font></td>');\r\n ShowHTML(' <td><b>'.LinkOrdena('Código externo','codigo_externo').'</font></td>');\r\n ShowHTML(' <td><b>'.LinkOrdena('Ativo','nm_ativo').'</font></td>');\r\n if ($w_libera_edicao=='S') {\r\n ShowHTML(' <td class=\"remover\"><b> Operações </font></td>');\r\n }\r\n ShowHTML(' </tr>');\r\n if (count($RS)<=0) {\r\n // Se não foram selecionados registros, exibe mensagem\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=9 align=\"center\"><b>Não foram encontrados registros.</b></td></tr>');\r\n } else {\r\n // Lista os registros selecionados para listagem\r\n foreach ($RS as $row) {\r\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor; ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\r\n $l_destaque = ((f($row,'qt_filhos')>0) ? '<b>' : '');\r\n if (nvl(f($row,'level'),0)==1) {\r\n ShowHTML(' <td><table border=0 width=\"100%\" cellpadding=0 cellspacing=0><tr valign=\"top\">'.$imagem.'<td>'.$l_destaque.f($row,'nome').'</b></td></tr></table>');\r\n } else {\r\n ShowHTML(' <td><table border=0 width=\"100%\" cellpadding=0 cellspacing=0><tr valign=\"top\">'.str_repeat('<td width=\"3%\"></td>',(f($row,'level')-1)).$imagem.'<td>'.$l_destaque.f($row,'nome').' '.'</b></td></tr></table>');\r\n }\r\n ShowHTML(' <td align=\"left\">'.f($row,'descricao').'</td>');\r\n ShowHTML(' <td align=\"center\">'.f($row,'nm_receita').'</td>');\r\n ShowHTML(' <td align=\"center\">'.f($row,'nm_despesa').'</td>');\r\n ShowHTML(' <td align=\"center\">'.f($row,'nm_reembolso').'</td>');\r\n ShowHTML(' <td align=\"center\">'.f($row,'qt_lancamentos').'</td>');\r\n ShowHTML(' <td align=\"center\">'.nvl(f($row,'codigo_externo'),'&nbsp;').'</td>');\r\n ShowHTML(' <td align=\"center\">'.f($row,'nm_ativo').'</td>');\r\n if ($w_libera_edicao=='S') {\r\n ShowHTML(' <td class=\"remover\" align=\"left\" valign=\"top\" nowrap>');\r\n ShowHTML(' <A class=\"hl\" HREF=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=A&w_chave='.f($row,'chave').' &P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.' &SG='.$SG.MontaFiltro('GET').'\" Title=\"Nome\">AL </A>&nbsp');\r\n ShowHTML(' <A class=\"hl\" HREF=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=E&w_chave='.f($row,'chave').' &P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.' &SG='.$SG.'\">EX </A>&nbsp');\r\n ShowHTML(' </td>');\r\n }\r\n ShowHTML(' </tr>');\r\n } \r\n } \r\n ShowHTML(' </center>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </td>');\r\n //Aqui começa a manipulação de registros\r\n } elseif (strpos('IAEV',$O)!==false) {\r\n if (strpos('EV',$O)!==false) $w_Disabled = ' DISABLED ';\r\n AbreForm('Form', $w_dir . $w_pagina . 'Grava', 'POST', 'return(Validacao(this));', null, $P1, $P2, $P3, $P4, $TP, $SG, $w_pagina . $par, $O);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"' . $w_chave . '\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_cliente\" value=\"' . $w_cliente . '\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<tr bgcolor=\"' . $conTrBgColor . '\"><td>');\r\n ShowHTML(' <table width=\"97%\" border=\"0\"><tr>');\r\n ShowHTML(' <tr><td colspan=3><b><u>N</u>ome:</b><br><input ' . $w_Disabled . ' accesskey=\"N\" type=\"text\" name=\"w_nome\" class=\"sti\" SIZE=\"75\" MAXLENGTH=\"200\" VALUE=\"' . $w_nome . '\"></td>');\r\n ShowHTML(' <tr>');\r\n SelecaoTipoLancamento('<u>S</u>ubordinação:', 'S', null, $w_pai, $w_chave, $w_cliente, 'w_pai', (($O == 'A') ? 'SUBPARTE' : 'SUBTODOS'), null, 3);\r\n ShowHTML(' <tr><td colspan=\"3\"><b><U>D</U>escricao:<br><TEXTAREA ACCESSKEY=\"D\" ' . $w_Disabled . ' class=\"sti\" name=\"w_descricao\" rows=\"5\" cols=75>' . $w_descricao . '</textarea></td>');\r\n ShowHTML(' <tr>');\r\n ShowHTML(' <td colspan=\"3\"><b>Códi<u>g</u>o externo:</b><br><input ' . $w_Disabled . ' accesskey=\"G\" type=\"text\" name=\"w_codigo_externo\" class=\"sti\" SIZE=\"30\" MAXLENGTH=\"50\" VALUE=\"' . $w_codigo_externo . '\"></td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' <tr>');\r\n MontaRadioNS('<b>Recebimento?</b>', $w_receita, 'w_receita');\r\n MontaRadioNS('<b>Pagamento?</b>', $w_despesa, 'w_despesa');\r\n MontaRadioNS('<b>Reembolso?</b>', $w_reembolso, 'w_reembolso');\r\n ShowHTML(' <tr>');\r\n MontaRadioSN('<b>Ativo?</b>', $w_ativo, 'w_ativo');\r\n\r\n $sql = new DB_GetMenuLancamento; $RS = $sql->getInstanceOf($dbms, $w_chave, null);\r\n $i = 0;\r\n foreach ($RS as $row) {\r\n if ($i == 0)\r\n $w_vinculo = f($row, 'sq_menu');\r\n else\r\n $w_vinculo .= ',' . f($row, 'sq_menu');\r\n $i = 1;\r\n }\r\n \r\n // Permite vinculações somente no nível folha\r\n if ($w_qt_filhos==0) {\r\n ShowHTML(' <tr><td><b>Vinculações:</b><br>');\r\n $sql = new db_getMenuList; $RS1 = $sql->getInstanceOf($dbms, $w_cliente, 'X', $chaveAux, null);\r\n $RS1 = SortArray($RS1, 'nm_modulo', 'asc', 'nome', 'asc');\r\n ShowHTML(' <tr>');\r\n if (count($RS1) > 0) {\r\n $i = 2;\r\n foreach ($RS1 as $row) {\r\n if (strpos('FN,CO,AC,PD',f($row,'sg_modulo'))!==false) {\r\n if (!($i % 2)) ShowHTML(' <tr>');\r\n $l_marcado = 'N';\r\n $l_chave = $w_vinculo . ',';\r\n while (!(strpos($l_chave, ',') === false)) {\r\n $l_item = trim(substr($l_chave, 0, strpos($l_chave, ',')));\r\n $l_chave = trim(substr($l_chave, (strpos($l_chave, ',') + 1), 100));\r\n if ($l_item > '') {\r\n if (f($row, 'sq_menu') == $l_item) $l_marcado = 'S';\r\n }\r\n }\r\n ShowHTML(' <td><input '.$w_Disabled.' type=\"checkbox\" name=\"w_vinculo[]\" value=\"' . f($row, 'sq_menu') . '\"'.(($l_marcado == 'S') ? ' checked' : '').'>' . f($row, 'nome') . '<br>');\r\n $i += 1;\r\n }\r\n }\r\n }\r\n }\r\n \r\n //ShowHTML(' <tr><td align=\"LEFT\" colspan=3><b>'.$_SESSION['LABEL_CAMPO'].':<BR> <INPUT ACCESSKEY=\"A\" class=\"sti\" type=\"PASSWORD\" name=\"w_assinatura\" size=\"30\" maxlength=\"30\" value=\"\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=3><hr>');\r\n if ($O == 'E') {\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Excluir\">');\r\n } else {\r\n if ($O == 'I') {\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Incluir\">');\r\n } else {\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Atualizar\">');\r\n }\r\n }\r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"location.href=\\'' . montaURL_JS($w_dir, $R . '&O=L&w_cliente=' . $w_cliente . '&P1=' . $P1 . '&P2=' . $P2 . '&P3=' . $P3 . '&P4=' . $P4 . '&TP=' . $TP . '&SG=' . $SG . montaFiltro('GET')) . '\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n ShowHTML(' history.back(1);');\r\n ScriptClose();\r\n } \r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Estrutura_Texto_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Rodape();\r\n}", "title": "" }, { "docid": "0f3d99e66258bb7a347975f5c6f3f5d1", "score": "0.5405027", "text": "function listarMemoriaCalculoXPartida(){\n\t\t$this->procedimiento='pre.ft_presupuesto_sel';\n\t\t$this->transaccion='PRE_LIST_PART_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\n\t\t//$this->setParametro('autorizacion','autorizacion','varchar');\n\t\t//$this->setParametro('autorizacion_nulos','autorizacion_nulos','varchar');\n\t\t$this->setCount(false);\n\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_concepto_ingas','int4');\n\t\t$this->captura('desc_ingas','varchar');\n\t\t$this->captura('tipo','varchar');\n\t\t$this->captura('movimiento','varchar');\n\t\t$this->captura('sw_tes','varchar');\n\t\t$this->captura('id_oec','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('activo_fijo','varchar');\n\t\t$this->captura('almacenable','varchar');\n\t\t$this->captura('desc_partida','text');\n\t\t$this->captura('id_grupo_ots','varchar');\n\t\t$this->captura('filtro_ot','varchar');\n\t\t$this->captura('requiere_ot','varchar');\n\t\t$this->captura('sw_autorizacion','varchar');\n\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "32fa939ca8b2cdc9d251d71b031c0fa4", "score": "0.5404813", "text": "public function megustaEjemplar(Solicitud $psolicitud)\n {\n $respuesta = new Respuesta(); \n $objLogica = $this->get('logica_service');\n try {\n //Valida que la sesión corresponda y se encuentre activa\n $respSesionVali= ManejoDataRepository::validaSesionUsuario($psolicitud);\n //echo \"<script>alert(' buscarEjemplares :: Validez de sesion \".$respSesionVali.\" ')</script>\";\n if ($respSesionVali==AccesoController::inULogged) \n { \n\n //SE INACTIVA PORQUE PUEDE GENERAR UNA GRAN CANTIDAD DE REGISTROS EN UNA SOLA SESION\n //Busca y recupera el objeto de la sesion:: \n //$sesion = ManejoDataRepository::recuperaSesionUsuario($usuario,$psolicitud);\n //echo \"<script>alert('La sesion es \".$sesion->getTxsesnumero().\" ')</script>\";\n //Guarda la actividad de la sesion:: \n //ManejoDataRepository::generaActSesion($sesion,AccesoController::inDatoUno,\"Recupera Feed de Ejemplares\".$psolicitud->getEmail().\" recuperados con éxito \",$psolicitud->getAccion(),$fecha,$fecha);\n //echo \"<script>alert('Generó actividad de sesion ')</script>\";\n \n $resp = ManejoDataRepository::setMegustaEjemplar($psolicitud->getIdEjemplar(), $psolicitud->getMegusta(), $psolicitud->getEmail());\n \n $respuesta->setRespuesta($resp);\n $respuesta->setCantComenta(ManejoDataRepository::getCantComment($psolicitud->getIdEjemplar()));\n $respuesta->setCantMegusta(ManejoDataRepository::getCantMegusta($psolicitud->getIdEjemplar()));\n \n //echo \"esto es lo que hay en respuesta\";\n //print_r($respuesta);\n //echo $contador.\" - lugares hallados\";\n //$arIdiomas = array(\"Español\",\"Inglés\",\"Frances\",\"Alemán\",\"Ruso\",\"Portugues\",\n // \"Catalán\",\"Árabe\",\"Bosnio\",\"Croata\",\"Serbio\",\"Italiano\",\"Griego\",\"Turco\",\"Húngaro\",\"Hindi\");\n \n return $objLogica::generaRespuesta($respuesta, $psolicitud, NULL);\n } else {\n //echo 'sesion invalida';\n $respuesta->setRespuesta($respSesionVali);\n return $objLogica::generaRespuesta($respuesta, $psolicitud, NULL);\n }\n } catch (Exception $ex) {\n $respuesta->setRespuesta(AccesoController::inPlatCai);\n return $objLogica::generaRespuesta($respuesta, $psolicitud, NULL);\n }\n }", "title": "" }, { "docid": "71c826812b69483ed4b1e6bc4d55af43", "score": "0.53945", "text": "function aplicarMotivoNumeroVecesEspacioPerdido($acuerdo){\n\t\t$motivo=0;\n $ano=$this->anio;\n $periodoAnt=$this->periodo-1;\n\t\tforeach($this->EspaciosPerdidosActuales as $valor){\n $numeroVeces=0;\n\t\t\t//busca el total de veces q tiene espacio perdido en todos los periodos incluido el actual\n foreach ($this->EspaciosPerdidosTotales as $key => $value) {\n $reprobado=explode(\"-\", $value);\n if($reprobado[0]==$valor)\n {\n if($acuerdo==2011004)\n {\n if ($reprobado[1]>20111)\n {\n $numeroVeces++;\n }\n }else\n {\n $numeroVeces++;\n }\n }\n }\n\t\t\t//$numeroVeces=count(array_keys($this->EspaciosPerdidosTotales,$valor));\n\t\t\tif($numeroVeces>=2){\n\t\t\t\t$this->EspacioPerdidoMotivoPrueba[$this->codigoEstudiante][$valor]=$numeroVeces;\n\t\t\t\t$motivo=3;\n\t\t\t}\n\t\t}\n\t\treturn $motivo;\n\t}", "title": "" }, { "docid": "b83466dae8189d736e9d1cabc438faa8", "score": "0.53941745", "text": "function relatorioDeCelulaPart2Controle(){\r\n require_once (\"control/dao.php\");\r\n \r\n $objDao = dao::getInstance();\r\n \r\n return $objDao->relatorioDeCelulaPart2Dao();\r\n \r\n }", "title": "" }, { "docid": "90f926a4acd83ecd900c8700835ad3e5", "score": "0.5386485", "text": "function listarSolicitud(){\n\t\t$this->procedimiento='adq.f_solicitud_sel';\n\t\t$this->transaccion='ADQ_SOL_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t\t\n\t\t$this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n\t\t$this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\t\t\n\t\t$this->setParametro('historico','historico','varchar');\n\t\t\t\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_solicitud','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_solicitud_ext','int4');\n\t\t$this->captura('presu_revertido','varchar');\n\t\t$this->captura('fecha_apro','date');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('id_funcionario_aprobador','int4');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('id_gestion','int4');\n\t\t$this->captura('tipo','varchar');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('justificacion','text');\n\t\t$this->captura('id_depto','int4');\n\t\t$this->captura('lugar_entrega','varchar');\n\t\t$this->captura('extendida','varchar');\n\t\t\n\t\t$this->captura('posibles_proveedores','text');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('comite_calificacion','text');\n\t\t$this->captura('id_categoria_compra','int4');\n\t\t$this->captura('id_funcionario','int4');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('fecha_soli','date');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t$this->captura('id_uo','integer');\n\t\t\n\t\t$this->captura('desc_funcionario','text');\n\t\t$this->captura('desc_funcionario_apro','text');\n\t\t$this->captura('desc_uo','text');\n\t\t$this->captura('desc_gestion','integer');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t$this->captura('desc_depto','varchar');\n\t\t$this->captura('desc_proceso_macro','varchar');\n\t\t$this->captura('desc_categoria_compra','varchar');\n\t\t$this->captura('id_proceso_macro','integer');\n\t\t$this->captura('numero','varchar');\n\t\t$this->captura('desc_funcionario_rpc','text');\n\t\t$this->captura('obs','text');\n\t\t$this->captura('instruc_rpc','varchar');\n\t\t$this->captura('desc_proveedor','varchar');\n\t\t$this->captura('id_proveedor','integer');\n\t\t$this->captura('id_funcionario_supervisor','integer');\n\t\t$this->captura('desc_funcionario_supervisor','text');\n\t\t$this->captura('ai_habilitado','varchar');\n\t\t$this->captura('id_cargo_rpc','integer');\n\t\t$this->captura('id_cargo_rpc_ai','integer');\n\t\t$this->captura('tipo_concepto','varchar');\n\t\t$this->captura('revisado_asistente','varchar');\t\t\n\t\t$this->captura('fecha_inicio','date');\n\t\t$this->captura('dias_plazo_entrega','integer');\n\t\t$this->captura('obs_presupuestos','varchar');\n\t\t$this->captura('precontrato','varchar');\n\t\t$this->captura('update_enable','varchar');\n\t\t$this->captura('codigo_poa','varchar');\t\t\n\t\t$this->captura('obs_poa','varchar');\n\t\t$this->captura('contador_estados','bigint');\n\n\t\t$this->captura('nro_po','varchar');\n\t\t$this->captura('fecha_po','date');\n\t\t$this->captura('nro_cuotas','int4');\n\t\t$this->captura('fecha_ini_cot','date');\n\t\t$this->captura('fecha_ven_cot','date');\n\t\t$this->captura('proveedor_unico','boolean');\n $this->captura('fecha_fin','date');\n $this->captura('correo_proveedor','varchar');\n\n\t\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "ffebe6e4e5b254cdbcb02550f9eec9c8", "score": "0.53863674", "text": "function ultimate(){\t\t\t\t\t\t\n\t\tinclude(\"conexao/conexao.php\");\n\t\t$usuario_id_pl_sg= $_SESSION['usuarioId'];\n\t\t$result_usuario_pl_sg = \"SELECT * FROM usuarios_planos WHERE usuario_id='$usuario_id_pl_sg' LIMIT 1\";\n\t\t$resultado_usuario_pl_sg = mysqli_query($conn, $result_usuario_pl_sg);\n\t\t$row_usuario_pl_sg = mysqli_fetch_assoc($resultado_usuario_pl_sg);\n\t\t$data_vencimento_pl_sg = $row_usuario_pl_sg['data_vencimento'];\n\t\t$data_vencimento_pl_sg_time = strtotime($data_vencimento_pl_sg);\n\t\t$data_atual_pl_sg = date(\"Y-m-d H:i:s\");\n\t\t$data_atual_time_pl_sg = strtotime($data_atual_pl_sg);\n\t\t\n\t\tif($data_atual_time_pl_sg < $data_vencimento_pl_sg_time){\n\t\t\tif($row_usuario_pl_sg['plano_id'] == 3){\n\t\t\t\t\n\t\t\t}else{\t\t\t\n\t\t\t\t$url = pg.'/adm/cliente.php?link=57';\n\t\t\t\techo \"\n\t\t\t\t\t<META HTTP-EQUIV=REFRESH CONTENT = '0;URL=$url'>\n\t\t\t\t\";\t\n\t\t\t}\n\t\t}else{\t\t\t\n\t\t\t$url = pg.'/adm/cliente.php?link=56';\n\t\t\techo \"\n\t\t\t\t<META HTTP-EQUIV=REFRESH CONTENT = '0;URL=$url'>\n\t\t\t\";\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "16424b2af249a3ca1cb40a4bf0f6b35c", "score": "0.53818876", "text": "public function cierre_convocatoria() {\n// exit();\n $subjet_mail = 'Dictamen de evaluación';\n// $result = ['tp_msg'=> En_tpmsg::DANGER, 'html'=>'La información se guardo correctamente'];\n $result = ['tp_msg' => En_tpmsg::SUCCESS, 'html' => 'La información se guardo correctamente'];\n $output['solicitantes'] = $this->solicitantes();\n $info_extra['total_solicitudes'] = $this->gestion_revision->total_solicitudes();\n $info_extra['total_aceptados'] = $this->gestion_revision->total_aceptados()['total_aceptados'];\n $info_extra['subject'] = $subjet_mail;\n// pr($output['solicitantes']);\n// pr($$info_extra);\n// $output['revisados'] = $this->revisados();\n $output['dictamen'] = $this->get_dictamen();\n $output['candidatos'] = $this->candidatos(null);//con null obtiene todos los candidatos de todos los estados de solicitud\n// pr($output['dictamen']);\n// pr($output['solicitantes']['result']);\n// exit();\n $indicador_error = FALSE;\n if (!empty($output['solicitantes']['result'])) {//Valida que existan candidatos\n $solicitantes = $output['solicitantes']['result'];\n if (!empty($output['candidatos']['result'])) {//Valida que existan candidatos\n $numero = 0;\n foreach ($output['candidatos']['result'] as $key => $val_candidatos) {\n $solicitante_data = array_merge($solicitantes[$val_candidatos['id_solicitud']], $info_extra);\n if (isset($output['dictamen'][$key])) {//Valida que este dictaminado\n// pr($key);\n// pr($val_candidatos);\n// pr($output['dictamen'][$key]);\n $dictamen_reg = $output['dictamen'][$key];\n if ($dictamen_reg['aceptado'] == 1) {//aceptados\n// continue;\n ++$numero;\n $secuencial = sprintf(\"%04d\", $numero);\n $folio_dictamen = $val_candidatos['id_solicitud'] . strtoupper($dictamen_reg['id_nivel']) . $secuencial;\n $result = $this->actualiza_dictamen($dictamen_reg['id_dictamen'], ['folio_dictamen' => $folio_dictamen]);\n if ($result['tp_msg'] == En_tpmsg::SUCCESS) {\n $solicitante_data['folio'] = $folio_dictamen;\n $solicitante_data['promedio'] = $dictamen_reg['promedio'];\n $solicitante_data['cve_estado_solicitud'] = En_estado_solicitud::ACEPTADOS;\n $config = ['folio', 'total_solicitudes', 'total_aceptados', 'subject', 'promedio'];\n $this->gestion_revision->guardar_historico_estado($val_candidatos['id_solicitud'], En_estado_solicitud::ACEPTADOS);\n $this->gurda_registros_correo_dictamen($solicitante_data, $config);\n// $this->enviar_correo_electronico('correo_excelencia/aceptado.php', $solicitante_data['email'], $solicitante_data, $subjet_mail);\n unset($solicitantes[$val_candidatos['id_solicitud']]); //Retira informacion del solicitante ya trabajado\n } else {\n if (!$indicador_error) {\n $indicador_error = true;\n }\n }\n } else {//Rechazados\n $config = ['total_solicitudes', 'total_aceptados', 'subject'];\n $solicitante_data['cve_estado_solicitud'] = En_estado_solicitud::RECHAZADOS;\n $this->gestion_revision->guardar_historico_estado($val_candidatos['id_solicitud'], En_estado_solicitud::RECHAZADOS);\n $this->gurda_registros_correo_dictamen($solicitante_data, $config);\n// $this->enviar_correo_electronico('correo_excelencia/rechazado.php', $solicitante_data['email'], $solicitante_data, $subjet_mail);\n unset($solicitantes[$val_candidatos['id_solicitud']]); //Retira informacion del solicitante ya trabajado\n }\n } else {\n// continue;\n $config = ['total_solicitudes', 'total_aceptados', 'subject'];\n $solicitante_data['cve_estado_solicitud'] = En_estado_solicitud::RECHAZADOS;\n $this->gestion_revision->guardar_historico_estado($val_candidatos['id_solicitud'], En_estado_solicitud::RECHAZADOS);\n $this->gurda_registros_correo_dictamen($solicitante_data, $config);\n// $this->enviar_correo_electronico('correo_excelencia/rechazado.php', $solicitante_data['email'], $solicitante_data, $subjet_mail);\n unset($solicitantes[$val_candidatos['id_solicitud']]); //Retira informacion del solicitante ya trabajado\n }\n }\n// exit();\n $this->notifica_cierre_rechazados($solicitantes, $output['candidatos']['result'], $info_extra, $subjet_mail);\n $this->cerrar_convocatoria(); //Cierra la convocatoria\n $this->enviar_correo_control_envios_dictamen(); //Envio de correoes\n //Envia correos a todos los solicitantes que no partisipan\n if ($result['tp_msg'] == En_tpmsg::SUCCESS) {\n// $result = ['tp_msg' => En_tpmsg::DANGER, 'html' => 'Ocurrio un error. Por favor intentelo nuevamente'];\n $result['html'] = 'La información se guardo correctamente';\n }\n header('Content-Type: application/json;charset=utf-8');\n echo json_encode($result);\n } else {\n $result = ['tp_msg' => En_tpmsg::DANGER, 'html' => 'Ocurrio un error. Por favor intentelo nuevamente'];\n header('Content-Type: application/json;charset=utf-8');\n echo json_encode($result);\n }\n } else {\n\n $result = ['tp_msg' => En_tpmsg::DANGER, 'html' => 'Ocurrio un error. Por favor intentelo nuevamente'];\n header('Content-Type: application/json;charset=utf-8');\n echo json_encode($result);\n }\n }", "title": "" }, { "docid": "533b87eded34c8e7c2c353af80ff88c0", "score": "0.5378496", "text": "function vinculos($organizacion,$oportunidad,$etapa,$origen,$nivel,$responsable)\n{\n\t\n\tglobal $db;\n\t$date=date(\"Y-m-d\");\n\t\n\t//Definir rutas de imágenes y vínculos\n\tif($nivel==1){$rutaimg=\"\"; $rutavin=\"modulos/\";}else{$rutaimg=\"../../\"; $rutavin=\"../\";}\n\t\n\t//Datos de la oportunidad\n\t$sqloportunidad=\"SELECT * FROM oportunidades WHERE id_oportunidad='\".$oportunidad.\"'\";\n\t$resultopt= mysql_query($sqloportunidad,$db);\n $myrowopt=mysql_fetch_array($resultopt);\n\t\n\tlist ($barra, $campos) = barra($organizacion,$myrowopt[clave_oportunidad],$nivel);\n\t\n\t//Datos del proceso\n\t$sqlproceso=\"SELECT * FROM `etapasoportunidades` WHERE `clave_oportunidad` = '\".$myrowopt[clave_oportunidad].\"' AND id_etapa='7'\";\n\t$rsproceso= mysql_query($sqlproceso,$db);\n\t$rwproceso=mysql_fetch_array($rsproceso);\n\t\n\t//Datos de organización\n\t$sqlorg=\"SELECT * FROM organizaciones WHERE clave_organizacion='\".$organizacion.\"'\";\n\t$rsorg= mysql_query($sqlorg,$db);\n\t$rworg=mysql_fetch_array($rsorg);\n\t\n\t//Consultar detalles de responsable y color para la etapa en la que se encuentra la oportunidad listada\n\t$sqletp=\"SELECT * FROM `etapas` WHERE `id_etapa` = '\".$etapa.\"'\";\n\t$resultetp= mysql_query($sqletp,$db);\n\t$myrowetp=mysql_fetch_array($resultetp);\n\n\t$sqlcolor=\"SELECT * FROM `responsables` WHERE id_responsable = $myrowetp[id_responsable]\";\n\t$resultcolor=mysql_query($sqlcolor,$db);\n\t$myrowcolor=mysql_fetch_array($resultcolor);\n\t\n\t//Color de celda y vínculos\n\tif($myrowetp[id_responsable]!=$responsable)\n\t{\n\t\t$celda=\"#F0F0F0\";\n\t\t$vinculo=0;\n\t}\n\telse\n\t{\n\t\t$celda=\"#FFFFFF\";\n\t\t$vinculo=1;\n\t}\n\t$autorizacion=0;\n\t//Verificar si se solicita algún expediente en la etapa de la oportunidad\n\t$sqlexp=\"SELECT * FROM expedientes WHERE id_etapa='\".$etapa.\"' OR id_etapa='\".$myrowetp[etapa_anterior].\"'\";\n\t$resultexp= mysql_query ($sqlexp,$db);\n\t$myrowexp=mysql_fetch_array($resultexp);\n\tif($myrowexp)//Si hay expediente asociado a la etapa de la oportunidad, obtener los datos necesarios.\n\t{\t\t\t\n\t\t//Verificar si el garante fue capturado y si éste es el mismo que el acreditado\n\t\t$sqlgarante=\"SELECT relaciones.clave_organizacion,relaciones.clave_contacto,relaciones.clave_relacion,relaciones.rol, relaciones.clave_oportunidad FROM relaciones LEFT JOIN (organizaciones) ON (relaciones.clave_relacion=organizaciones.clave_organizacion) WHERE relaciones.clave_oportunidad= '\".$myrowopt[clave_oportunidad].\"' AND relaciones.rol = 'Garante' ORDER BY relaciones.id_relacion ASC\";\n\t\t$rsgarante= mysql_query ($sqlgarante,$db);\n\t\t$rwgarante=mysql_fetch_array($rsgarante);\n\t\tif($rwgarante[clave_organizacion]!=$rwgarante[clave_relacion])\n\t\t{\n\t\t\t$sqltipos=\"SELECT * FROM tiposarchivos WHERE id_expediente='\".$myrowexp[id_expediente].\"' AND requerido='1' AND tipo_persona='\".$rworg[tipo_persona].\"'\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sqltipos=\"SELECT * FROM tiposarchivos WHERE id_expediente='\".$myrowexp[id_expediente].\"' AND requerido='1' AND tipo_persona='\".$rworg[tipo_persona].\"' AND rol_persona!='Garante'\";\n\n\t\t}\n\t\t\n\t\t//Obtener cuántos tipos de archivos REQUERIDOS tiene el expediente solicitado\n\t\t$resulttipos= mysql_query ($sqltipos,$db);\n\t\t$totarch=mysql_num_rows($resulttipos);//archivos totales del expediente\n\t\t$myrowtipos=mysql_fetch_array($resulttipos);\n\t\t\n\t\t//Numeros para expediente, obtener cuántos de los documentos requeridos fueron subidos al sistema\n\t\t$sqlrequeridos=\"SELECT count(archivos.id_archivo)as total FROM archivos JOIN tiposarchivos ON (archivos.id_tipoarchivo = tiposarchivos.id_tipoarchivo) WHERE archivos.id_oportunidad = '\".$oportunidad.\"' AND archivos.id_expediente = '\".$myrowexp[id_expediente].\"' AND tiposarchivos.requerido='1' AND tiposarchivos.tipo_persona='\".$rworg[tipo_persona].\"'\";\n $resultrequeridos= mysql_query ($sqlrequeridos,$db);\n\t\t$myrowrequeridos=mysql_fetch_array($resultrequeridos);\n\t\t$requeridos=$myrowrequeridos[total];\n \n //Obtener cuántos documentos son no revisados, aprobados o rechazados y cargados en total\n $sqlarchivo=\"SELECT count(`id_archivo`)as total, aprobado FROM `archivos` WHERE id_oportunidad = '\".$oportunidad.\"' AND `id_expediente` = '\".$myrowexp[id_expediente].\"' GROUP BY (`aprobado`)\";\n //echo $sqlarchivo;\n\t\t$resultarchivo= mysql_query ($sqlarchivo,$db);\n\t\t$aprobados=0;$nrevisado=0;$rechazados=0;$cargados=0;\n\t\twhile($myrowarchivo=mysql_fetch_array($resultarchivo))\n\t\t{\t\t\t\t\t\t\n\t\t\tif($myrowarchivo[aprobado]==0){$nrevisado=$myrowarchivo[total];}elseif($myrowarchivo[aprobado]==1){$aprobados=$myrowarchivo[total];}else{$rechazados=$myrowarchivo[total];}\n\t\t}\n \n\t\t$cargados=$aprobados+$rechazados+$nrevisado;\n //echo $aprobados.\"-\".$nrevisado.\"-\".$rechazados.\"-\".$cargados;\n \n //Lista de reprobados\n $recrequ=0;\n $sqlrechazado=\"SELECT archivos.aprobado,archivos.id_archivo,tiposarchivos.requerido FROM `archivos` JOIN tiposarchivos ON (archivos.id_tipoarchivo = tiposarchivos.id_tipoarchivo) WHERE archivos.id_oportunidad = '\".$oportunidad.\"' AND archivos.id_expediente = '\".$myrowexp[id_expediente].\"' AND archivos.aprobado=2 AND tiposarchivos.tipo_persona='\".$rworg[tipo_persona].\"' ORDER BY archivos.id_archivo\";\n //echo $sqlrechazado;\n $resultrechazado= mysql_query ($sqlrechazado,$db);\n while($myrowrechazado=mysql_fetch_array($resultrechazado))\n\t\t{\n if($myrowrechazado[aprobado]==2&&$myrowrechazado[requerido]==1)\n {\n $recrequ++;\n }\n }\n //echo $recrequ;\n\t}\n\t\n\t//Verificar si se capturo análisis\n\t$sqlanalisis=\"SELECT * FROM analisis WHERE id_oportunidad='\".$oportunidad.\"'\";\n $rsanalisis= mysql_query ($sqlanalisis,$db);\n\t$totanalisis=mysql_num_rows($rsanalisis);\n $rwanalisis=mysql_fetch_array($rsanalisis);\n\t\n\t//Color de celda y vínculos\n\tif($responsable==3)\n\t{\n\t\t$mensajes=\"<img src='\".$rutaimg.\"images/comment_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"oportunidades/editarregistro.php?id=\".$oportunidad.\"&o=I&a=\".$origen.\"&organizacion=\".$organizacion.\"' id='addButton' title='Agregar una nota a la oportunidad' class='clsVentanaIFrame clsBoton' rel='Agregar Nota' style='color:#4693D7;text-decoration:none; font-size:11px;'>Agregar nota</a>\";\n\t}\n\n\tswitch($etapa)//Definir vínculo según etapa de la opurtunidad\n\t{\n\t\tcase 1://ETAPA 1: PRIMER CONTACTO\n\t\t\t$archivo=\"\";\n\t\t\t$link=\"\";\n\t\t\tbreak;\n\t\tcase 2://ETAPA 2: CITA\n\t\t\t$archivo=\"\";\n\t\t\t$link=\"\";\n\t\t\tbreak;\n\t\tcase 3://ETAPA 3: CONFIRMACIÓN VERBAL\n\t\t\t$archivo=\"\";\n\t\t\t$link=\"\";\n\t\t\tbreak;\n\t\tcase 4://ETAPA 4: RECABACIÓN DE EXPEDIENTE PRELIMINAR\n\t\t\t$archivo=\"\";\n\t\t\tif($requeridos!=$totarch)//No se han subido todos los archivos del expediente\n\t\t\t{\n\t\t\t\t//Vínculo de expediente\n\t\t\t\t$documentos = \"<img src='\".$rutaimg.\"images/warning_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"expediente/forminsert.php?id=\".$oportunidad.\"&o=I&a=\".$origen.\"&e=\".$myrowexp[id_expediente].\"&organizacion=\".$organizacion.\"' id='addButton' class='rojo' title='Cargados(\".$requeridos.\") de (\".$totarch.\") documentos requeridos'>\".$myrowexp[expediente].\"</a>\";\n\t\t\t}\n\t\t\telse//Ya se han subido todos los archivos del expediente\n\t\t\t{\n\t\t\t\t$documentos = \"<img src='\".$rutaimg.\"images/warning_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"expediente/forminsert.php?id=\".$oportunidad.\"&o=I&a=\".$origen.\"&e=\".$myrowexp[id_expediente].\"&organizacion=\".$organizacion.\"' id='addButton' class='azul' title='Cargados(\".$requeridos.\") de (\".$totarch.\") documentos requeridos'>\".$myrowexp[expediente].\"</a>\";\n if($vinculo==1&&$campos==100)\n\t\t\t\t{\n\t\t\t\t\t$avanzar = '<img src=\"'.$rutaimg.'images/next_16.png\" width=\"16\" height=\"16\" class=\"linkImage\" /><a onclick=\"avanzar(\\''.$oportunidad.'\\', \\'U\\', \\''.$origen.'\\',\\''.$etapa.'\\',\\''.$organizacion.'\\')\" href=\"#\" id=\"addButton\" class=\"azul\" title=\"Solicitar validación de expediente\">Avanzar</a>';\n\t\t\t\t\t$autorizacion=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 5://ETAPA 5: ANÁLISIS DE EXPEDIENTE PRELIMINAR\t\t\n\t\t\t$archivo=\"\";\n //echo $requeridos.\"-\".rechazados.\"-\".$nrevisado.\"-\".$vinculo.\"-\".$campos.\"-\".$totanalisis.\"-\".$recrequ;\n\t\t\tif($nrevisado==0&&$recrequ!=0&&$vinculo==1)\n\t\t\t{\n\t\t\t\t$documentos=\"<img src='\".$rutaimg.\"images/warning_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"expediente/formupdate.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&e=\".$myrowexp[id_expediente].\"&organizacion=\".$organizacion.\"' id='addButton' class='azul' title='Aprobados(\".$aprobados.\") Rechazados(\".$rechazados.\") Sin revisar (\".$nrevisado.\") de \".$totarch.\" documentos requeridos'>\".$myrowexp[expediente].\"</a>\";\n\t\t\t\t$retroceder=\"<img src='\".$rutaimg.\"images/prev_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"oportunidades/update.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&re=\".$id_etapa.\"&organizacion=\".$organizacion.\"' id='addButton' class='azul'>Retroceder</a>\";\n\t\t\t\tif($totanalisis)\n\t\t\t\t{\n\t\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='azul'>Análisis de crédito</a>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=I&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='rojo'>Análisis de crédito</a>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($aprobados>=$requeridos&&$vinculo==1&&$campos==100)\n\t\t\t{\n if($totanalisis)\n\t\t\t\t{\n\t\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='azul'>Análisis de crédito</a>\";\n\t\t\t\t\t$avanzar=\"<img src='\".$rutaimg.\"images/next_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"oportunidades/update.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&av=\".$etapa.\"&organizacion=\".$organizacion.\"' id='addButton' class='azul'>Avanzar</a>\";\n\t\t\t\t\t$autorizacion=1;\n\t\t\t\t}\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=I&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='rojo'>Análisis de crédito</a>\";\n\t\t\t\t}\n\t\t\t\t$documentos=\"<img src='\".$rutaimg.\"images/warning_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"expediente/formupdate.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&e=\".$myrowexp[id_expediente].\"&organizacion=\".$organizacion.\"' id='addButton' class='azul' title='Aprobados(\".$aprobados.\") Rechazados(\".$rechazados.\") Sin revisar (\".$nrevisado.\") de \".$totarch.\" documentos requeridos'>\".$myrowexp[expediente].\"</a>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($totanalisis)\n\t\t\t\t{\n\t\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='azul'>Análisis de crédito</a>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=I&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='rojo'>Análisis de crédito</a>\";\n\t\t\t\t}\n\t\t\t\tif($nrevisado==0)\n\t\t\t\t{\n\t\t\t\t\t$documentos=\"<img src='\".$rutaimg.\"images/warning_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"expediente/formupdate.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&e=\".$myrowexp[id_expediente].\"&organizacion=\".$organizacion.\"' id='addButton' class='azul' title='Aprobados(\".$aprobados.\") Rechazados(\".$rechazados.\") Sin revisar (\".$nrevisado.\") de \".$totarch.\" documentos requeridos'>\".$myrowexp[expediente].\"</a>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$documentos=\"<img src='\".$rutaimg.\"images/warning_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"expediente/formupdate.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&e=\".$myrowexp[id_expediente].\"&organizacion=\".$organizacion.\"' id='addButton' class='rojo' title='Aprobados(\".$aprobados.\") Rechazados(\".$rechazados.\") Sin revisar (\".$nrevisado.\") de \".$totarch.\" documentos requeridos'>\".$myrowexp[expediente].\"</a>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 12://ETAPA 6: ESTUDIO DE CRÉDITO\n\t\t\t$archivo=\"\";\n\t\t\tif($totanalisis)\n\t\t\t{\n\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='azul'>Análisis de crédito</a>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=I&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='rojo'>Análisis de crédito</a>\";\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 13://ETAPA 7: PRE AUTORIZACIÓN\n\t\t\t$archivo=\"\";\n\t\t\tif($nrevisado==0&&$aprobados!=$totarch&&$vinculo==1)\n\t\t\t{\n\t\t\t\t$documentos=\"<img src='\".$rutaimg.\"images/warning_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"expediente/formupdate.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&e=\".$myrowexp[id_expediente].\"&organizacion=\".$organizacion.\"' id='addButton' class='azul' title='Aprobados(\".$aprobados.\") Rechazados(\".$rechazados.\") Sin revisar (\".$nrevisado.\") de \".$totarch.\" documentos requeridos'>\".$myrowexp[expediente].\"</a>\";\n\t\t\t\t$retroceder=\"<img src='\".$rutaimg.\"images/prev_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"oportunidades/update.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&re=\".$id_etapa.\"&organizacion=\".$organizacion.\"' id='addButton' class='azul'>Retroceder</a>\";\n\t\t\t\tif($totanalisis)\n\t\t\t\t{\n\t\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='azul'>Análisis de crédito</a>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=I&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='rojo'>Análisis de crédito</a>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($aprobados==$totarch&&$vinculo==1)\n\t\t\t{\n\t\t\t\tif($totanalisis!=0)\n\t\t\t\t{\n\t\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='azul'>Análisis de crédito</a>\";\n\t\t\t\t\t$avanzar=\"<img src='\".$rutaimg.\"images/next_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"oportunidades/update.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&av=\".$etapa.\"&organizacion=\".$organizacion.\"' id='addButton' class='azul'>Avanzar</a>\";\n\t\t\t\t\t$autorizacion=1;\n\t\t\t\t}\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=I&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='rojo'>Análisis de crédito</a>\";\n\t\t\t\t}\n\t\t\t\t$documentos=\"<img src='\".$rutaimg.\"images/warning_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"expediente/formupdate.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&e=\".$myrowexp[id_expediente].\"&organizacion=\".$organizacion.\"' id='addButton' class='azul' title='Aprobados(\".$aprobados.\") Rechazados(\".$rechazados.\") Sin revisar (\".$nrevisado.\") de \".$totarch.\" documentos requeridos'>\".$myrowexp[expediente].\"</a>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($totanalisis)\n\t\t\t\t{\n\t\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='azul'>Análisis de crédito</a>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=I&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='rojo'>Análisis de crédito</a>\";\n\t\t\t\t}\n\t\t\t\tif($nrevisado==0)\n\t\t\t\t{\n\t\t\t\t\t$documentos=\"<img src='\".$rutaimg.\"images/warning_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"expediente/formupdate.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&e=\".$myrowexp[id_expediente].\"&organizacion=\".$organizacion.\"' id='addButton' class='azul' title='Aprobados(\".$aprobados.\") Rechazados(\".$rechazados.\") Sin revisar (\".$nrevisado.\") de \".$totarch.\" documentos requeridos'>\".$myrowexp[expediente].\"</a>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$documentos=\"<img src='\".$rutaimg.\"images/warning_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"expediente/formupdate.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&e=\".$myrowexp[id_expediente].\"&organizacion=\".$organizacion.\"' id='addButton' class='rojo' title='Aprobados(\".$aprobados.\") Rechazados(\".$rechazados.\") Sin revisar (\".$nrevisado.\") de \".$totarch.\" documentos requeridos'>\".$myrowexp[expediente].\"</a>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '7': //ETAPA 8: ENTREGA DE PROPUESTA A PROSPECTO\n\t\t\t$sqlarchivos=\"SELECT * FROM archivos JOIN tiposarchivos ON (tiposarchivos.id_tipoarchivo = archivos.id_tipoarchivo) WHERE tiposarchivos.id_expediente='3' AND archivos.id_oportunidad='\".$oportunidad.\"'\";\n\t\t\t$resultarchivos= mysql_query ($sqlarchivos,$db);\n\t\t\t$rwarchivos=mysql_fetch_array($resultarchivos);\n\t\t\t//Vigencia de la propuesta\n\t\t\tlist($dias, $meses) = diferencia_dias($rwproceso[fecha],$date);\n\t\t\t$vigencia=30-$dias;\n\t\t\t\n\t\t\tif($dias<30)\n\t\t\t{\n\t\t\t\tif($vigencia<=5){$resaltadocontacto=\"#FF7F7F\";}\n\t\t\t\telseif($vigencia>=6&&$vigencia<=11){$resaltadocontacto=\"#FFCC00\";}\n\t\t\t\telse{$resaltadocontacto=\"#86CE79\";}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$vigencia=\"La propuesta ha expirado\";$resaltadocontacto=\"#FF7F7F\";\n\t\t\t}\n\t\t\t$archivo=\"<img src='\".$rutaimg.\"images/acrobat_16.png' class='linkImage' /> <a href='\".$rutaimg.\"expediente/\".$rwarchivos[nombre].\"' target='_blank'><span class='highlight' style='background-color:#\".$myrowcolor[color].\"; font-weight:normal;'> \".$rwarchivos[nombre_original].\"</span></a><span class='count important' style='background-color:\".$resaltadocontacto.\";' title='Vigencia de la propuesta'>\".$vigencia.\"</span>\";\n\t\t\t$avanzar=\"<img src='\".$rutaimg.\"images/next_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"oportunidades/update.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&av=\".$etapa.\"&organizacion=\".$organizacion.\"' id='addButton' class='azul'>Avanzar</a>\";\n\t\t\t\n\t\t\tif($totanalisis)\n\t\t\t{\n\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='azul'>Análisis de crédito</a>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=I&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='rojo'>Análisis de crédito</a>\";\n\t\t\t}\n\t\t\t$link=\"\";\n\t\t\tbreak;\n\t\tcase '9': //ETAPA 9: DEPÓSITO DE SERIEDAD\n\t\t\t$sqlarchivos=\"SELECT * FROM archivos JOIN tiposarchivos ON (tiposarchivos.id_tipoarchivo = archivos.id_tipoarchivo) WHERE tiposarchivos.id_expediente='3' AND archivos.id_oportunidad='\".$oportunidad.\"'\";\n\t\t\t$resultarchivos= mysql_query ($sqlarchivos,$db);\n\t\t\t$rwarchivos=mysql_fetch_array($resultarchivos);\n\t\t\t//Vigencia de la propuesta\n\t\t\tlist($dias, $meses) = diferencia_dias($rwproceso[fecha],$date);\n\t\t\t$vigencia=30-$dias;\n\t\t\t\n\t\t\tif($dias<30)\n\t\t\t{\n\t\t\t\tif($vigencia<=5){$resaltadocontacto=\"#FF7F7F\";}\n\t\t\t\telseif($vigencia>=6&&$vigencia<=11){$resaltadocontacto=\"#FFCC00\";}\n\t\t\t\telse{$resaltadocontacto=\"#86CE79\";}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$vigencia=\"La propuesta ha expirado\";$resaltadocontacto=\"#FF7F7F\";\n\t\t\t}\n\t\t\t$archivo=\"<img src='\".$rutaimg.\"images/acrobat_16.png' class='linkImage' /> <a href='\".$rutaimg.\"expediente/\".$rwarchivos[nombre].\"' target='_blank'><span class='highlight' style='background-color:#\".$myrowcolor[color].\"; font-weight:normal;'> \".$rwarchivos[nombre_original].\"</span></a><span class='count important' style='background-color:\".$resaltadocontacto.\";' title='Vigencia de la propuesta'>\".$vigencia.\"</span>\";\n\t\t\tif($totanalisis)\n\t\t\t{\n\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=U&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='azul'>Análisis de crédito</a>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$analisis=\"<img src='\".$rutaimg.\"images/analisis_16.png' width='16' height='16' class='linkImage' /><a href='\".$rutavin.\"analisis/forminsert.php?id=\".$oportunidad.\"&o=I&a=\".$origen.\"&an=\".$rwanalisis[id_analisis].\"&organizacion=\".$organizacion.\"' id='addButton' class='rojo'>Análisis de crédito</a>\";\n\t\t\t}\n\t\t\t$link=\"\";\n\t\t\tbreak;\n\t\tcase '14': //ETAPA 10: RECABACIÓN DE EXPEDIENTE DE FORMALIZACIÓN\n\t\t\t$archivo=\"\";\n\t\t\t$link=\"\";\n\t\t\tbreak;\n\t\tcase '10'://ETAPA 11: CIERRE(CRÉDITO OTORGADO)\n\t\t\t$archivo=\"\";\n\t\t\t$link=\"\";\n\t\t\tbreak;\n\t\tcase '11'://ETAPA 12: CIERRE(CRÉDITO RECHAZADO)\n\t\t\t$archivo=\"\";\n\t\t\t$link=\"\";\n\t\t\tbreak;\n\t}\n\t$link = \"<br />\".$documentos.\" \".$archivo.\" \".$analisis.\" \".$enviar.\" \".$avanzar.\" \".$retroceder.\" \".$mensajes;\n\t//return $autorizacion;\n\treturn array($link,$autorizacion);\n}", "title": "" }, { "docid": "a41fe2b7768efff297c08c8311285937", "score": "0.53699946", "text": "function grava_ajuste_previdencia (){\n return AjustePrevidencia::gravarModificacoes();\n}", "title": "" }, { "docid": "2240f446cf78d8ddf69ea2db9f787ace", "score": "0.5368314", "text": "public function getSedeCessionario();", "title": "" }, { "docid": "a4301c0f3f330e53d1db7f683a0a60c1", "score": "0.53619266", "text": "function anteriorEstadoSolicitud(){\n $this->procedimiento='adq.f_solicitud_ime';\n $this->transaccion='ADQ_ANTESOL_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_solicitud','id_solicitud','int4');\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('operacion','operacion','varchar');\n $this->setParametro('id_funcionario','id_funcionario','int4');\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\n $this->setParametro('id_estado_wf','id_estado_wf','int4');\n $this->setParametro('obs','obs','text');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "65424e092d25f8a5de858f0cd3cf1a08", "score": "0.5361239", "text": "function procesarEstudiante($registroEstudiante){\n\n\t\t$this->codigoEstudiante=$registroEstudiante['COD_ESTUDIANTE'];\n $this->validarSetentaPorciento($registroEstudiante['COD_ESTUDIANTE']);\n\t\t$this->acuerdoEstudiante=$registroEstudiante['ACUERDO'];\n// echo \"<br>\".$this->codigoEstudiante.\" -- \". $this->acuerdoEstudiante.\"<br>\";\n\t\t$this->promedioEstudiante=($registroEstudiante['PROMEDIO']);\n\t\t$this->estadoEstudiante=($registroEstudiante['ESTADO']);\n\t\t$this->proyectoEstudiante=($registroEstudiante['COD_PROYECTO']);\n $this->causal=0;\n $this->porcentaje=0;\n $this->matriculas=0;\n $this->numMatriculas=0;\n $this->renovaciones='';\n $this->espaciosPerdidos=0;\n $this->matriculas004=0;\n $this->renovaciones004=0; \n\t\t//almacenará solo los espacios que el estudiante perdio en el periodo actual\n\t\t$this->EspaciosPerdidosActuales=array();\n\t\t\n\t\t//almacenará todos los espacios que ha perdido el estudiante\n\t\t$this->EspaciosPerdidosTotales=array();\t\n\t\t$reglamento='N';\n\t\t\n\t\t//aplica verificacion de motivo 1 \n\t\t$motivo1=$this->aplicarMotivoPromedio();\n //aplica verificacion de motivo 2\n\t\t$motivo2=$this->aplicarMotivoNumeroEspaciosPerdidos();\n //aplica verificacion de motivo 3\n\t\t$motivo3=$this->aplicarMotivoNumeroVecesEspacioPerdido($this->acuerdoEstudiante);\n\t\t//suma los motivos de prueba\n\t\t$motivo=$motivo1+$motivo2+$motivo3;\n //si hay algun motivo de prueba reglamento se coloca en S\n\t\tif($motivo<>0)\n {\n $reglamento='S';\n\t\t}\n //verifica si hay espacios perdidos para el estudiante\n if(isset($this->EspacioPerdidoMotivoPrueba[$this->codigoEstudiante]))\n {\n if(is_array($this->EspaciosPerdidosActuales)&&count($this->EspaciosPerdidosActuales)>2)\n {\n $espacios=array_fill_keys($this->EspaciosPerdidosActuales, 1);\n foreach ($espacios as $key => $value) {\n foreach ($this->EspacioPerdidoMotivoPrueba[$this->codigoEstudiante] as $key2 => $value) {\n if ($key==$key2)\n {$espacios[$key]=$value;}else{}\n }\n }\n }else\n {\n $espacios=$this->EspacioPerdidoMotivoPrueba[$this->codigoEstudiante];\n }\n $this->espaciosPerdidos=json_encode($espacios);\n $veces=max($this->EspacioPerdidoMotivoPrueba[$this->codigoEstudiante]);\n }elseif($reglamento=='S')\n {\n if(is_array($this->EspaciosPerdidosActuales)&&count($this->EspaciosPerdidosActuales)>2)\n {\n $espacios=array_fill_keys($this->EspaciosPerdidosActuales, 1);\n $this->espaciosPerdidos=json_encode($espacios);\n }\n $veces=1;\n }else\n {\n $veces=0;\n }\n //calcula el porcentaje del plan de estudios aprobado por el estudiante\n $this->porcentaje=$this->calcularPorcentajeTotalPlanEstudiante($this->anio+1); \n //actualiza el registro del estudiante en la tabla de reglamento\n if($reglamento=='N')\n {\n switch ($this->estadoEstudiante)\n {\n case 'A':\n $this->estadoEstudiante='A';\n break;\n case 'B':\n $this->estadoEstudiante='A';\n break;\n case 'V':\n $this->estadoEstudiante='V';\n break;\n case 'J':\n $this->estadoEstudiante='V';\n break;\n case 'H':\n $this->estadoEstudiante='H';\n break;\n case 'T':\n $this->estadoEstudiante='T';\n break;\n default :\n $this->estadoEstudiante='V';\n break;\n }\n $this->actualizarEstadoEstudiante();\n }\n \n\t\t$this->actualizarReglamento($motivo,$reglamento,$veces);\n //si el estado de reglamento es S y el estado del estudiane es V, aplica reglamento\n\t\tif($reglamento=='S')\n {\n //aplica reglamento con base en el acuerdo del estudiante\n switch($this->acuerdoEstudiante)\n {\n case '2011004':\n $this->aplicarAcuerdo2011004();\n break;\n case '2009007':\n $this->aplicarAcuerdo2009007();\n break;\n case '1993027':\n $this->aplicarAcuerdo1993027();\n break;\n }\n $this->actualizarCausal();\n //actualiza el estado del estudiante despues de aplicar reglamento\n $this->actualizarEstadoEstudiante();\n\t\t}\n\t\t$this->contador++;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "16a38a86b6731fe474dbe2b3a0155edd", "score": "0.5361091", "text": "function revertirParcialmentePresupuesto(){\r\n\t\t$this->procedimiento='tes.ft_obligacion_pago_ime';\r\n\t\t$this->transaccion='TES_REVPARPRE_IME';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\t\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_ob_dets','id_ob_dets','varchar');\r\n\t\t$this->setParametro('revertir','revertir','varchar');\r\n\t\t$this->setParametro('id_obligacion_pago','id_obligacion_pago','integer');\r\n\t\t\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "c5cf7e5c2251c56ab314ea962573b3ad", "score": "0.5359713", "text": "public function persistirReduzido() {\n\n if (!db_utils::inTransaction()) {\n throw new Exception(\"Transação com o banco de dados não encontrada.\");\n }\n\n if (!$this->isContaAnalitica()) {\n throw new Exception(\"Não é possível incluir um reduzido para contas que possuem filhas.\");\n }\n\n $oDaoReduzido = db_utils::getDao(\"conplanoreduz\");\n $oDaoConPlanoExe = db_utils::getDao(\"conplanoexe\");\n if ($this->hasReduzidoAnoInstituicao() && $this->getReduzido() != \"\" &&\n $this->getRecurso() == $this->oDadosAnteriores->c61_codigo) {\n throw new Exception(\"Existe uma conta reduzida para o ano e instituição informados.\");\n }\n\n\n /**\n * Insere os dados de acordo com o último ano cadastrado na tabela conplano.\n * Percorre um FOR inserindo na conplanoreduz utilizando o mesmo código reduzido (c61_reduz) sempre.\n */\n $iUltimoAno = $this->getUltimoAnoPlano();\n $lAlteraReduz = false;\n for ($iAno = $this->getAno(); $iAno <= $iUltimoAno; $iAno++) {\n\n $oDaoReduzido->c61_anousu = $iAno;\n $oDaoReduzido->c61_instit = $this->getInstituicao();\n $oDaoReduzido->c61_codigo = $this->getRecurso();\n $oDaoReduzido->c61_codcon = $this->getCodigoConta();\n $oDaoReduzido->c61_reduz = $this->getReduzido();\n $oDaoReduzido->c61_contrapartida = $this->getContraPartida();\n\n /*\n * Dados que serão inseridos na tabela conplanoexe\n */\n $oDaoConPlanoExe->c62_anousu = $iAno;\n $oDaoConPlanoExe->c62_codrec = $this->getRecurso();\n $oDaoConPlanoExe->c62_reduz = $this->getReduzido();\n\n if ($this->getReduzido() != \"\") {\n\n $sWhereReduzido = \" c61_reduz = {$this->getReduzido()}\";\n $sWhereReduzido .= \"and c61_instit = {$this->getInstituicao()}\";\n $sWhereReduzido .= \"and c61_anousu = {$iAno}\";\n $oDaoValidaReduz = db_utils::getDao(\"conplanoreduz\");\n $sSqlValidaReduz = $oDaoValidaReduz->sql_query_file(null, null, \"*\", null, $sWhereReduzido);\n $rsValidaReduz = $oDaoValidaReduz->sql_record($sSqlValidaReduz);\n if ($oDaoValidaReduz->numrows > 0) {\n $lAlteraReduz = true;\n }\n\n $sWhereReduzido = \" c61_reduz = {$this->getReduzido()}\";\n $sSqlVerificaReduzidoInstituicao = $oDaoReduzido->sql_query_file (null, null, \"*\",\"1 limit 1\", $sWhereReduzido);\n $rsReduzidoInstituicao = $oDaoReduzido->sql_record($sSqlVerificaReduzidoInstituicao);\n if ($oDaoReduzido->numrows > 0) {\n\n $oDadoReduzidoInstituicao = db_utils::fieldsMemory($rsReduzidoInstituicao, 0);\n if ($oDadoReduzidoInstituicao->c61_instit != $this->getInstituicao()) {\n $oDaoReduzido->c61_reduz = null;\n }\n }\n }\n\n if ($this->getReduzido() == \"\" && !$lAlteraReduz) {\n\n\n $oDaoReduzido->incluir($oDaoReduzido->c61_reduz, $iAno);\n $this->setReduzido($oDaoReduzido->c61_reduz);\n\n $oDaoConPlanoExe->c62_vlrcre = \"0\";\n $oDaoConPlanoExe->c62_vlrdeb = \"0\";\n $oDaoConPlanoExe->incluir($iAno, $this->getReduzido());\n } else {\n\n if (!$lAlteraReduz) {\n\n\n $oDaoReduzido->incluir($oDaoReduzido->c61_reduz, $iAno);\n $this->setReduzido($oDaoReduzido->c61_reduz);\n $oDaoConPlanoExe->c62_vlrcre = \"0\";\n $oDaoConPlanoExe->c62_vlrdeb = \"0\";\n $oDaoConPlanoExe->incluir($iAno, $this->getReduzido());\n } else {\n\n $oDaoReduzido->alterar($oDaoReduzido->c61_reduz, $iAno);\n $oDaoConPlanoExe->alterar($iAno, $oDaoReduzido->c61_reduz);\n }\n }\n\n $lAlteraReduz = false;\n\n if ($oDaoReduzido->erro_status == 0) {\n\n $sMsgReduzido = \"Ocorreu um erro ao processar os reduzidos.\\n\\n\";\n $sMsgReduzido .= $oDaoReduzido->erro_msg;\n throw new Exception($sMsgReduzido);\n }\n\n if ($oDaoConPlanoExe->erro_status == 0) {\n\n $sMsgConPlanoExe = \"Ocorreu um erro ao processar os registros do exercício.\\n\\n\";\n $sMsgConPlanoExe .= $oDaoConPlanoExe->erro_msg;\n throw new Exception($sMsgConPlanoExe);\n }\n }\n $this->getSistemaConta()->integrarDados($this);\n return true;\n }", "title": "" }, { "docid": "826665221b6811c8266cef701462bb8c", "score": "0.53577065", "text": "function maisVendido ($conexao, $idUser){\r\n\t\t$procuraTodos = \"SELECT max(descricao) FROM produto INNER JOIN venda ON venda.idProduto = produto.idProduto where idRevendedor = $idUser;\";\r\n\t\t$conecta = mysqli_query($conexao, $procuraTodos) or die(mysqli_error($conexao));\r\n\t\t$row_rsProdutos = mysqli_fetch_assoc($conecta);\r\n\t\t$maisVendido = $row_rsProdutos['max(descricao)'];\r\n\t\treturn $maisVendido;\r\n\t}", "title": "" }, { "docid": "7cae1cb964e713532a9354ba7b464df9", "score": "0.53482693", "text": "function obtenLote($id_prodcuto, $fecha, $orden_compra){\n\t\treturn 1;\n\t\t}", "title": "" }, { "docid": "be3add697290b2d55279d61f0506c97f", "score": "0.53481954", "text": "protected function pagarPlus()\n {\n if ($this->plus == 2) { //Si debe 2 plus\n if ($this->saldo >= ($this->ValorBoleto * 2)) { //Y si le alcanza el saldo para pagarlos\n $this->saldo -= ($this->ValorBoleto * 2); //Se le resta el valor\n $this->plus = 0; //Se le devuelve los plus\n $this->pagoplus = 2; //Se almacena que se pagaron 2 plus\n } else if ($this->saldo >= $this->ValorBoleto) { // Si solo alcanza para 1 plus\n $this->saldo -= $this->ValorBoleto; //se le descuenta\n $this->plus = 1; // Se lo devuelve\n $this->pagoplus = 1; // Se indica que se pago un plus\n }\n } else {\n if ($this->plus == 1 && $this->saldo > $this->ValorBoleto) { //si debe 1 plus\n $this->saldo -= $this->ValorBoleto; //Se le descuenta\n $this->plus = 0; //Se le devuelve\n $this->pagoplus = 1; // Se indica que se pago un plus\n }\n }\n }", "title": "" }, { "docid": "da52b8af4276b463bde18f8855f71749", "score": "0.5346554", "text": "function listarObracivilTrans(){\n\t\t$this->procedimiento='snx.ft_obracivilmoe_sel';\n\t\t$this->transaccion='SNX_TRANS_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('strtransporte','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "855912ed2d978dc9b6680761bbc2b7a4", "score": "0.53412604", "text": "public function logVerComentarios($idSubasta,$idUsuario)\r\n {\r\n /*averiguar si es su subasta*/ \r\n $iguales=$this->model->propio($idSubasta,$idUsuario);\r\n \r\n \r\n if($iguales){//es el dueño de la subasta\r\n /*mostrar los comentarios con la opcion de respuesta*/\r\n require_once 'view/comentariosRespuesta.php';\r\n }else{\r\n /*mostrar los comentarios con la -------OPCION----- de pregunta*/\r\n require_once 'view/comentariosFormPreguntar.php'; \r\n require_once 'view/comentariosVisita.php';\r\n }\r\n \r\n }", "title": "" }, { "docid": "b9ce739daffd9268c3bf438849bb0ffa", "score": "0.5333809", "text": "function anteriorEstadoObligacion(){\r\n $this->procedimiento='tes.ft_obligacion_pago_ime';\r\n $this->transaccion='TES_ANTEOB_IME';\r\n $this->tipo_procedimiento='IME';\r\n \r\n //Define los parametros para la funcion\r\n $this->setParametro('id_obligacion_pago','id_obligacion_pago','int4');\r\n $this->setParametro('operacion','operacion','varchar');\r\n\t\t$this->setParametro('obs','obs','varchar');\r\n \r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "2c48bf9cb40465021231ccf27acc0081", "score": "0.53317666", "text": "public function getReconocimiento()\n {\n return $this->reconocimiento;\n }", "title": "" }, { "docid": "364ca7b635b809a9198d0295497dfe80", "score": "0.53276724", "text": "public function getActivos(){\n\t\t$culminado=0;\n\t\t$total=0;\n\t\t$listaPracticantes= $this->getPracticantes();\n\t\tforeach($listaPracticantes as $practicante){\n\t\t\tif ($practicante->getEstado() == 2) $culminado = $culminado+1;\n\t\t\t$total = $total + 1;\n\t\t}\n\t\t\n\t\t$this->activos=$listaPracticantes->count()-$culminado;\n\t\t\n\t\treturn $this->activos;\n\t}", "title": "" }, { "docid": "f6a143a818fc096de9c5e15ca8f862e1", "score": "0.53245175", "text": "public function leer_comenta()\n\t\t\t{\n\t\t\t\t$sql=\"SELECT * FROM comenta ORDER BY id_art DESC\";\n\t\t\t\t$res=mysql_query($sql,conectar::con());\n\t\t\t\twhile($reg=mysql_fetch_assoc($res))\n\t\t\t\t{\n\t\t\t\t\t$this->comenta[]=$reg;\n\t\t\t\t}\n\t\t\t\t\treturn $this->comenta;\t\n }", "title": "" }, { "docid": "21bbc5d00dcf063304776e90d72cbc28", "score": "0.53241414", "text": "public function contenuto() {\n $view = USingleton::getInstance('VOrdine');\n $session=USingleton::getInstance('USession');\n if ($session->leggi_valore('username')!=false)\n $view->setLayout('carrello_registrato');\n\n if ($this->_carrello!=false) {\n $items=$this->_carrello->getItems();\n $dati['oggetti']=array();\n $dati['totale']=$this->_carrello->getPrezzoTotale();\n foreach ($items as $item) {\n $dati['oggetti'][]=array_merge(get_object_vars($item->getLibro()), array('quantita' => $item->quantita));\n }\n debug($dati);\n $view->impostaDati('dati',$dati);\n }\n return $view->processaTemplate();\n }", "title": "" }, { "docid": "56a52a857c8b791e7c995f0020e6a630", "score": "0.5323738", "text": "function reportePreOrdenCompra(){\n\t\t\t\t\n\t\t$this->procedimiento='adq.f_solicitud_sel';\n\t\t$this->transaccion='ADQ_SOLOC_REP';\n\t\t$this->tipo_procedimiento='SEL';\n\t\t$this->setCount(false);\n\t\t\n\t\t$this->setParametro('id_solicitud','id_solicitud','int4');\n\t\t$this->setParametro('id_proveedor','id_proveedor','int4');\n\t\t$this->captura('desc_proveedor','varchar');\n\t\t$this->captura('id_persona','int4');\n\t\t$this->captura('dir_persona','varchar');\n\t\t$this->captura('telf1_persona','varchar');\n\t\t$this->captura('telf2_persona','varchar');\n\t\t$this->captura('cel_persona','varchar');\n\t\t$this->captura('correo_persona','varchar');\n\t\t$this->captura('id_institucion','int4');\n\t\t$this->captura('dir_institucion','varchar');\n\t\t$this->captura('telf1_institucion','varchar');\n\t\t$this->captura('telf2_institucion','varchar');\n\t\t$this->captura('cel_institucion','varchar');\n\t\t$this->captura('email_institucion','varchar');\n\t\t$this->captura('fax_institucion','varchar');\n\t\t$this->captura('lugar_entrega','varchar');\n\t\t$this->captura('tipo','varchar');\n\t\t$this->captura('moneda','varchar');\n\t\t$this->captura('codigo_moneda','varchar');\n\t\t$this->captura('num_tramite','varchar');\n\t\t\t\t\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//var_dump($this->respuesta); exit;\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "25c9d0dacb95a62aa87413533105e4a6", "score": "0.5320805", "text": "public function message()\n {\n return 'No es pot repetir la subreferencia.';\n }", "title": "" }, { "docid": "1f27003d211048eeca4e2740ee113caa", "score": "0.5319951", "text": "function IntroducirTransferencia($Cantidad,$IdMedicina,$IdEstablecimientoOrigen,$IdEstablecimientoDestino,$Justificacion,$FechaTransferencia,$IdPersonal,$Lote){\n$Bandera=0;\nwhile($Bandera==0){\n\t\t$Existencia=TransferenciaProceso::ObtenerExistencia($Lote,1,$IdEstablecimientoOrigen);\n\n\tif($Existencia < $Cantidad){\n\t\t//Si se necesita mas de un lote para suplir la transferencia\n\t\t$Cantidad2=$Cantidad-$Existencia;//restante a suplir\n\t\t$Cantidad1=$Existencia;\n\t\t\n\t\t//Primera transferencia del lote agotado...\n\t\t$queryInsert=\"insert into farm_transferenciashospitales(Cantidad,IdMedicina,IdLote,IdEstablecimientoOrigen,IdEstablecimientoDestino,Justificacion,FechaTransferencia,IdPersonal,IdEstado) values('$Cantidad1','$IdMedicina','$Lote','$IdEstablecimientoOrigen','$IdEstablecimientoDestino','$Justificacion','$FechaTransferencia','$IdPersonal','X')\";\n\t\t\tmysql_query($queryInsert);\n\n\n\t\t$SQL=\"update farm_entregamedicamento set Existencia = '0' where IdMedicina='$IdMedicina' and IdLote='$Lote' and IdEstablecimiento=\".$IdEstablecimientoOrigen;\n\t\t\tmysql_query($SQL);\n\n\t\t$respLote2=TransferenciaProceso::ObtenerSiguienteLote($IdMedicina,$Lote,$IdEstablecimientoOrigen);\n\t\t$Lote=$respLote2[0];\n\t\t$Cantidad=$Cantidad2;\n\t\t\tif($Lote==NULL or $Lote==''){$Bandera=1;$falta=$Cantidad;}\n\n\t}else{\n\t\t$Cantidad1=$Cantidad;\n\t\t$queryInsert=\"insert into farm_transferenciashospitales(Cantidad,IdMedicina,IdLote,IdEstablecimientoOrigen,IdEstablecimientoDestino,Justificacion,FechaTransferencia,IdPersonal,IdEstado) values('$Cantidad1','$IdMedicina','$Lote','$IdEstablecimientoOrigen','$IdEstablecimientoDestino','$Justificacion','$FechaTransferencia','$IdPersonal','X')\";\n\t\tmysql_query($queryInsert);\n\n\t\t$Existencia_new=$Existencia-$Cantidad;//Existencia remanente despues de transferencia\n\n\t\t$SQL=\"update farm_entregamedicamento set Existencia = '$Existencia_new' where IdMedicina='$IdMedicina' and IdLote='$Lote' and IdEstablecimiento=\".$IdEstablecimientoOrigen;\n\t\t\tmysql_query($SQL);\n\n\t \t$Bandera=1;\n\t\t$falta=0;\n\t}\n\n\treturn($falta);\n}\n\n\t/**********************************************/\n\n\t\t\n\t}", "title": "" }, { "docid": "75813f3819d920bc7b44b8cc7820a271", "score": "0.5319297", "text": "function listarConciliacionResumen(){\r\n $this->procedimiento='obingresos.ft_detalle_boletos_web_sel';\r\n $this->transaccion='OBING_CONBINRES_SEL';\r\n $this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n $this->setParametro('id_periodo','id_periodo','integer');\r\n $this->setParametro('id_gestion','id_gestion','integer');\r\n\r\n $this->setCount(false);\r\n $this->captura('tipo', 'varchar');\r\n $this->captura('banco', 'varchar');\r\n $this->captura('moneda', 'varchar');\r\n $this->captura('monto1', 'numeric');\r\n $this->captura('monto2', 'numeric');\r\n\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n\r\n $this->ejecutarConsulta();\r\n\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "9dce18978e62ca26bf2be910a9d6aa97", "score": "0.5315791", "text": "public function testRestarBoletos()\n {\n $tiempo = new TiempoFalso;\n $medio = new Medio(0, $tiempo);\n $this->assertTrue($medio->recargar(50));\n $this->assertTrue($medio->recargar(20));\n $this->assertEquals($medio->obtenerSaldo(), 70);\n $this->assertEquals($medio->restarSaldo(\"153\"), true);\n $this->assertEquals($medio->obtenerSaldo(), 53.75); //Resta un medio boleto\n /* Prueba que si pasaron menos de 5 minutos se cobra un boleto normal */\n $this->assertEquals($medio->restarSaldo(\"153\"), true);\n $this->assertEquals($medio->obtenerSaldo(), 21.25);\n /* Y si pasaron los 5 min, resta medio */\n $tiempo->avanzar(300);\n $this->assertEquals($medio->restarSaldo(\"153\"), true); // Resta medio, quedan 5 pesos\n $tiempo->avanzar(300); // Avanza 5 minutos\n /* Comprueba que los viajes plus andan */\n $this->assertEquals($medio->restarSaldo(\"153\"), true); //Viaje plus 1\n $this->assertEquals($medio->restarSaldo(\"153\"), true); //Viaje plus 2\n $tiempo->avanzar(300);\n $this->assertEquals($medio->restarSaldo(\"153\"), false); //Viaje invalido\n }", "title": "" }, { "docid": "3a5e55e483c4ea625e60a0e63b343b06", "score": "0.5315316", "text": "public function executeBorrarArticuloVenta()\n\t{\n\t\t// Obtenemos el menu segun sus permisos\n\t\t$menu = new GenerarMenus();\t\t\n\t\t$this->menu_botones =$menu->generarMenuBotones();\n\t\t\n\t\t// Obtenemos un objeto de la clase AccionesUrl\n\t\t$this->acc_url = new AccionesUrl();\n\t\t\n\t\t// Obtenemos un objeto de la clase AccionesFechas\n\t\t$this->acc_fechas = new AccionesFechas();\n\t\t\n\t\t// Obtenemos un objeto de la clase Utilidades\n\t\t$this->acc_utilidades = new Utilidades();\n\t\t\n\t\t// Obtenemos un objeto de la clase Clientes\n\t\t$this->acc_clientes = new AccionesClientes();\n\t\t\n\t\t// Obtenemos un objeto de la clase AccionesVentas\n\t\t$this->acc_ventas = new AccionesVentas();\n\t\t\n\t\t// Obtenemos un select con todos los Clientes\n\t\t$this->ar_clientes = $this->acc_clientes->obtenerSelectClientes();\t\n\t\t\t\t\n\t\t// Obtenemos un objeto de la clase Articulos\n\t\t$this->acc_articulos = new AccionesArticulos();\t\n\n\t\t// Obtenemos el id de la venta para mantener la trazabilidad\t\t\n\t\t$this->id_venta_temporal = $this->getRequestParameter('id_venta_temporal');\n\t\t\t\n\t\t// Obtenemos el id del articulo que vamos a a agregar\n\t\t$this->id_articulo = $this->getRequestParameter('id_articulo');\n\t\t\n\t\t// La cantidad esta vacia\n\t\t$cantidad = $this->getRequestParameter('cantidad');\n\t\t\t\t\t\n\t\t// Obtenemos el id de la linea de venta a actualizar\t\t\n\t\t$this->id_linea_venta = $this->getRequestParameter('id_linea_venta');\t\n\t\t\n\t\t$obj_articulo_x_venta = $this->acc_ventas->obtenerObjArticulosXVenta($this->id_linea_venta);\n\t\t\n\t\t$id_venta = $obj_articulo_x_venta->getIdVenta();\n\t\t\n\t\tif($this->id_linea_venta)\n\t\t{\n\t\t\t$linea_venta_delete = $this->acc_ventas->borrarLineaVenta($this->id_linea_venta);\t\n\t\t}\n\t\t\n\t\t// Obtenemos el listado de las lineas de venta según el id de venta\n\t\t$this->ar_lineas_venta = $this->acc_ventas->obtenerLineasVentaXIdVenta($id_venta);\t\t\n\t}", "title": "" }, { "docid": "db4f08f56b31de73b8f9640f84d264f2", "score": "0.5314051", "text": "private function chequeame(){\n\t\t// se devuelve a registro, cedula de 99999 <--- no existe\n\t\t// y si existe esta muerto o loco o fuera de la ley o \n\t\t// ALGUN AGENTE DEL CEBIN!!!\n\t\t// de hecho 6 digitos tambien porque no creo\n\t\t// que exista alguien vivo con cedula menor de 1 millon,\n\t\t// pero como no tengo acceso a la onidex, lo dejo en 5.\n\n\t\tif ( !is_numeric($this->cedula) ) {\n\t\t\tdie(header(\"Location: registro.php?cedulaNumeric=false\"));\n\t\t}\n\t\tif ( strlen($this->cedula)>8 or strlen($this->cedula)<=6 ) {\n\t\t\t\theader( \"Location: registro.php?cedulaError=1_largo_cedula___\".strlen($this->cedula) );\n\t\t}\n\n\t\tif ( preg_match( \"/^A-Za-z$^'$^áéíóú$^ÁÉÍÓÚ$/\", $this->p_nombre) ) {\n\t\t\tdie(header(\"Location: registro.php?p_nombreNumeric=true\"));\n\t\t}\n\n\t\tif ( preg_match( \"/^A-Za-z$^'$^áéíóú$^ÁÉÍÓÚ$/\", $this->s_nombre) ) {\n\t\t\tdie(header(\"Location: registro.php?s_nombreNumeric=true\"));\n\t\t}\n\n\t\tif ( preg_match( \"/^A-Za-z$^'$^áéíóú$^ÁÉÍÓÚ$/\", $this->p_apellido) ) {\n\t\t\tdie(header(\"Location: registro.php?p_apellidoNumeric=true\"));\n\t\t}\n\n\t\tif ( preg_match( \"/^A-Za-z$^'$^áéíóú$^ÁÉÍÓÚ$/\", $this->s_apellido) ) {\n\t\t\tdie(header(\"Location: registro.php?s_apellidoNumeric=true\"));\n\t\t}\n\n\t\tif ( $this->nacionalidad <> 'v' and $this->nacionalidad <> 'e' ) {\n\t\t\tdie(header(\"Location: registro.php?nacionalidad=notVorE\"));\n\t\t}\n\n\t\tif ($this->telefono <> 'null') {\n\t\t\tif ( !is_numeric($this->telefono) ) {\n\t\t\tdie(header(\"Location: registro.php?telefonoNumeric=false\"));\n\t\t\t}\n\t\t\tif ( !preg_match( '/^\\d{11}$/', $this->telefono) ) {\n\t\t\t\tdie(header(\"Location: registro.php?telefonoLength=false\"));\n\t\t\t}\n\t\t}\n\n\t\tif ($this->telefonoOtro <> 'null') {\n\t\t\tif ( !is_numeric($this->telefonoOtro) ) {\n\t\t\tdie(header(\"Location: registro.php?telefonoOtroNumeric=false\"));\n\t\t\t}\n\t\t\tif ( !preg_match( '/^\\d{11}$/', $this->telefonoOtro) ) {\n\t\t\t\tdie(header(\"Location: registro.php?telefonoOtroLength=false\"));\n\t\t\t}\n\t\t}\n\n\t\tif ($this->fecNac <> 'current_timestamp') {\n\t\t\tif ( preg_match( \"/[^0-9$^-]/\", $this->fecNac) ) {\n\t\t\tdie(header(\"Location: registro.php?fecNacNumeric=false\"));\n\t\t\t}\n\t\t}\n\n\t\tif ($this->sexo <> '0' and $this->sexo <> '1') {\n\t\t\tif ( !is_numeric($this->telefonoOtro) ) {\n\t\t\tdie(header(\"Location: registro.php?sexo=malDefinido\"));\n\t\t\t}\n\t\t}\n\n\t\tif ( !is_numeric($this->codigoDireccion) ) {\n\t\t\tdie(header(\"Location: registro.php?codigoDireccionNumeric=false\"));\n\t\t}\n\t}", "title": "" }, { "docid": "3402997355bf4c0b5e0472baa412168b", "score": "0.53114474", "text": "public function getPolizasVencimientoCuotas($fecha_desde,$fecha_hasta,$asegurado_id){\n\t\t//Buscar el estado Vigente\n\t\t$estado = Domain_EstadoPoliza::getIdByCodigo('VIGENTE');\n\t\t$estado_caucion = Domain_EstadoPoliza::getIdByCodigo('AFECTADA');\n\t\t$estado_refacturado = Domain_EstadoPoliza::getIdByCodigo('REFACTURADO');\n\t\t\n\t\t//Que muestre todas las polizas, despues veo el filtro\n\t\t$this->_model_poliza = new Model_Poliza();\n\t\t\n\t\tif(empty($asegurado_id)){\n\n\t\t$rows = Doctrine_Query::create()\n\t\t->from('Model_Poliza p, p.Model_DetallePago dp, dp.Model_DetallePagoCuota dpc')\n\t\t//->andWhere(\"dpc.pago_id = ? \", $estado_debe)\n\t\t//->andwhere('p.estado_id = ? OR p.estado_id =? OR p.estado_id =? OR p.estado_id =? OR p.estado_id =?' \n\t\t//,array($estado_vigente,$estado_afectada,$estado_refacturado,$estado_baja_devolucion,$estado_baja_liberacion))\n\t\t->Where('estado_id not in (0,1)' )\n\t\t->andWhere(\"fecha_vigencia_hasta between ? AND ?\", array($fecha_desde,$fecha_hasta))\n\t\t//->andWhere(\"p.asegurado_id = ? \", $asegurado_id)\n\t\t->execute()\n\t\t->toArray();\n\t\t\t\n\t\t/*\t\n\t\t$rows = $this->_model_poliza\n\t\t->getTable()\n\t\t->createQuery()\n\t\t//->Where('estado_id = ? OR estado_id = ? OR estado_id = ?',array($estado,$estado_caucion,$estado_refacturado))\n\t\t->Where('estado_id not in (0,1)' )\n\t\t->andWhere(\"fecha_vigencia_hasta between ? AND ?\", array($fecha_desde,$fecha_hasta))\n\t\t//->andWhere(\"fecha_vigencia_hasta => ? AND fecha_vigencia_hasta =< ?\", array($fecha_desde,$fecha_hasta))\n\t\t->orderBy('fecha_vigencia_hasta')\n\t\t->execute()\n\t\t->toArray();\n\t\t*/\n\t\t}else{\n\t\t/*\t\n\t\t$rows = $this->_model_poliza\n\t\t->getTable()\n\t\t->createQuery()\n\t\t//->Where('estado_id = ? OR estado_id = ? OR estado_id = ?',array($estado,$estado_caucion,$estado_refacturado))\n\t\t->Where('estado_id not in (0,1)' )\n\t\t->andWhere(\"fecha_vigencia_hasta between ? AND ?\", array($fecha_desde,$fecha_hasta))\n\t\t->andWhere(\"asegurado_id = ?\",$asegurado_id)\n\t\t//->andWhere(\"fecha_vigencia_hasta => ? AND fecha_vigencia_hasta =< ?\", array($fecha_desde,$fecha_hasta))\n\t\t->orderBy('fecha_vigencia_hasta')\n\t\t->execute()\n\t\t->toArray();*/\n\t\t//->getSqlQuery();\n\t\t\n\t\t$rows = Doctrine_Query::create()\n\t\t->from('Model_Poliza p, p.Model_DetallePago dp, dp.Model_DetallePagoCuota dpc')\n\t\t//->andWhere(\"dpc.pago_id = ? \", $estado_debe)\n\t\t//->andwhere('p.estado_id = ? OR p.estado_id =? OR p.estado_id =? OR p.estado_id =? OR p.estado_id =?' \n\t\t//,array($estado_vigente,$estado_afectada,$estado_refacturado,$estado_baja_devolucion,$estado_baja_liberacion))\n\t\t->Where('estado_id not in (0,1)' )\n\t\t->andWhere(\"fecha_vigencia_hasta between ? AND ?\", array($fecha_desde,$fecha_hasta))\n\t\t->andWhere(\"p.asegurado_id = ? \", $asegurado_id)\n\t\t->execute()\n\t\t->toArray();\n\t\t\n\t\t\n\t\t}\n\t\t//echo $fecha_desde.\"hasta\".$fecha_hasta;\n\t\t/*\n\t\t *\n\t\t// Buscar el estado Vigente\n\t\t$estado_vigente = Domain_EstadoPoliza::getIdByCodigo('VIGENTE');\n\t\t$estado_afectada = Domain_EstadoPoliza::getIdByCodigo('AFECTADA');\n\t\t$estado_refacturado = Domain_EstadoPoliza::getIdByCodigo('REFACTURADO');\n\t\t$estado_debe = Domain_Helper::getHelperIdByDominioAndName('estado_pago', 'DEBE');\n\t\t$estado_baja_devolucion = Domain_EstadoPoliza::getIdByCodigo('BAJA_POR_DEVOLUCION');\n\t\t$estado_baja_liberacion = Domain_EstadoPoliza::getIdByCodigo('BAJA_POR_LIBERACION');\n\n\t\t\t\t * \n\t\t */\n\t\treturn $rows;\n\n\t}", "title": "" }, { "docid": "e173700b1d0fedc06cd10040159c5d80", "score": "0.5311435", "text": "function Seek() {\n $this->query = \"\n SELECT * FROM actividades\n WHERE id_actividades = '$this->id_actividades';\n \";\n $this->get_one_result_from_query();\n if ($this->feedback['ok']){ // Éxito en la obtención\n if ($this->feedback['code'] == '00002') { // Vuelve vacío\n $this->feedback['code'] = '70010';\n } else { // Vuelve con datos\n $this->feedback['code'] = '70011';\n }\n } else {\n if ($this->feedback['code'] != '00101') // Si no fallo de gestor de BD\n $this->feedback['code'] = '70012'; // Error de obtención\n }\n return $this->feedback;\n \n }", "title": "" }, { "docid": "d4938b7a68f20ff6feb9e88667013e2c", "score": "0.53108746", "text": "function listarDocCompraVenta()\n {\n $this->procedimiento = 'conta.ft_doc_compra_venta_sel';\n $this->transaccion = 'CONTA_DCV_SEL';\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\n\n //$this->setParametro('nombreVista','nombreVista','varchar');\n\n //captura parametros adicionales para el count\n $this->capturaCount('total_importe_ice', 'numeric');\n $this->capturaCount('total_importe_excento', 'numeric');\n $this->capturaCount('total_importe_it', 'numeric');\n $this->capturaCount('total_importe_iva', 'numeric');\n $this->capturaCount('total_importe_descuento', 'numeric');\n $this->capturaCount('total_importe_doc', 'numeric');\n\n $this->capturaCount('total_importe_retgar', 'numeric');\n $this->capturaCount('total_importe_anticipo', 'numeric');\n $this->capturaCount('tota_importe_pendiente', 'numeric');\n $this->capturaCount('total_importe_neto', 'numeric');\n $this->capturaCount('total_importe_descuento_ley', 'numeric');\n $this->capturaCount('total_importe_pago_liquido', 'numeric');\n $this->capturaCount('total_importe_aux_neto', 'numeric');\n\n\n\n //Definicion de la lista del resultado del query\n $this->captura('id_doc_compra_venta', 'int8');\n $this->captura('revisado', 'varchar');\n $this->captura('movil', 'varchar');\n $this->captura('tipo', 'varchar');\n $this->captura('importe_excento', 'numeric');\n $this->captura('id_plantilla', 'int4');\n $this->captura('fecha', 'date');\n $this->captura('nro_documento', 'varchar');\n $this->captura('nit', 'varchar');\n $this->captura('importe_ice', 'numeric');\n $this->captura('nro_autorizacion', 'varchar');\n $this->captura('importe_iva', 'numeric');\n $this->captura('importe_descuento', 'numeric');\n $this->captura('importe_doc', 'numeric');\n $this->captura('sw_contabilizar', 'varchar');\n $this->captura('tabla_origen', 'varchar');\n $this->captura('estado', 'varchar');\n $this->captura('id_depto_conta', 'int4');\n $this->captura('id_origen', 'int4');\n $this->captura('obs', 'varchar');\n $this->captura('estado_reg', 'varchar');\n $this->captura('codigo_control', 'varchar');\n $this->captura('importe_it', 'numeric');\n $this->captura('razon_social', 'varchar');\n $this->captura('id_usuario_ai', 'int4');\n $this->captura('id_usuario_reg', 'int4');\n $this->captura('fecha_reg', 'timestamp');\n $this->captura('usuario_ai', 'varchar');\n $this->captura('id_usuario_mod', 'int4');\n $this->captura('fecha_mod', 'timestamp');\n $this->captura('usr_reg', 'varchar');\n $this->captura('usr_mod', 'varchar');\n\n $this->captura('desc_depto', 'varchar');\n $this->captura('desc_plantilla', 'varchar');\n $this->captura('importe_descuento_ley', 'numeric');\n $this->captura('importe_pago_liquido', 'numeric');\n $this->captura('nro_dui', 'varchar');\n $this->captura('id_moneda', 'int4');\n $this->captura('desc_moneda', 'varchar');\n $this->captura('id_int_comprobante', 'int4');\n $this->captura('nro_tramite', 'varchar');\n $this->captura('desc_comprobante', 'varchar');\n\n\n $this->captura('importe_pendiente', 'numeric');\n $this->captura('importe_anticipo', 'numeric');\n $this->captura('importe_retgar', 'numeric');\n $this->captura('importe_neto', 'numeric');\n $this->captura('id_auxiliar', 'integer');\n $this->captura('codigo_auxiliar', 'varchar');\n $this->captura('nombre_auxiliar', 'varchar');\n $this->captura('id_tipo_doc_compra_venta', 'integer');\n $this->captura('desc_tipo_doc_compra_venta', 'varchar');\n $this->captura('importe_aux_neto', 'numeric');\n\n $this->captura('id_plan_pago', 'int4');\n $this->captura('fecha_vencimiento', 'date');\n $this->captura('tipo_cambio', 'numeric');\n\n $this->captura('importe_iehd', 'numeric');\n $this->captura('importe_ipj', 'numeric');\n $this->captura('importe_tasas', 'numeric');\n $this->captura('importe_gift_card', 'numeric');\n $this->captura('otro_no_sujeto_credito_fiscal', 'numeric');\n $this->captura('importe_compras_gravadas_tasa_cero', 'numeric');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //var_dump($this->respuesta); exit;\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "aee163756b28c967490e83e5b8212618", "score": "0.531071", "text": "function listarConciliacionDetalle(){\r\n $this->procedimiento='obingresos.ft_detalle_boletos_web_sel';\r\n $this->transaccion='OBING_CONBINDET_SEL';\r\n $this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n $this->setParametro('fecha_ini','fecha_ini','date');\r\n $this->setParametro('fecha_fin','fecha_fin','date');\r\n $this->setParametro('moneda','moneda','varchar');\r\n $this->setParametro('id_moneda','id_moneda','integer');\r\n $this->setParametro('banco','banco','varchar');\r\n $this->setCount(false);\r\n\r\n $this->captura('fecha_hora', 'varchar');\r\n $this->captura('fecha', 'varchar');\r\n $this->captura('pnr', 'varchar');\r\n $this->captura('monto_ingresos', 'numeric');\r\n $this->captura('monto_archivos', 'numeric');\r\n $this->captura('fecha_pago', 'varchar');\r\n $this->captura('observaciones', 'varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n\r\n\r\n $this->ejecutarConsulta();\r\n\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "813c998f23c1606c227e8084f8a7459d", "score": "0.53102076", "text": "function traduz() {\n if (isset($_SESSION[\"lista_de_sujeito\"]) && isset($_SESSION[\"lista_de_objeto\"]) &&\n isset($_SESSION[\"lista_de_verbo\"]) && isset($_SESSION[\"lista_de_estado\"]) &&\n isset($_SESSION[\"lista_de_conceitos\"]) && isset($_SESSION[\"lista_de_relacoes\"]) &&\n isset($_SESSION[\"lista_de_axiomas\"])) {\n $sujeitos = $_SESSION[\"lista_de_sujeito\"];\n $objetos = $_SESSION[\"lista_de_objeto\"];\n $verbos = $_SESSION[\"lista_de_verbo\"];\n $estados = $_SESSION[\"lista_de_estado\"];\n } else {\n echo \"ERRO! <br>\";\n exit();\n }\n $lista_de_sujeito_e_objeto = array_merge($sujeitos, $objetos);\n sort($lista_de_sujeito_e_objeto);\n $_SESSION['lista_de_sujeito_e_objeto'] = $lista_de_sujeito_e_objeto;\n if ($_SESSION[\"funcao\"] == \"sujeito_objeto\") {\n traduz_sujeito_objeto($lista_de_sujeito_e_objeto, &$_SESSION[\"lista_de_conceitos\"], &$_SESSION[\"lista_de_relacoes\"], &$_SESSION[\"lista_de_axiomas\"]);\n $_SESSION[\"funcao\"] = \"verbo\";\n }\n \n else{\n \t//nothing to do\n }\n \n if ($_SESSION[\"funcao\"] == \"verbo\") {\n traduz_verbos($verbos, &$_SESSION[\"lista_de_relacoes\"]);\n $_SESSION[\"funcao\"] = \"estado\";\n }\n \n else{\n \t//nothing to do\n }\n \n if ($_SESSION[\"funcao\"] == \"estado\") {\n traduz_estados($estados, &$_SESSION[\"lista_de_conceitos\"], &$_SESSION[\"lista_de_relacoes\"], &$_SESSION[\"lista_de_axiomas\"]);\n $_SESSION[\"funcao\"] = \"organiza\";\n }\n \n else{\n \t//nothing to do\n }\n \n if ($_SESSION[\"funcao\"] == \"organiza\") {\n organizar_ontologia(&$_SESSION[\"lista_de_conceitos\"], &$_SESSION[\"lista_de_relacoes\"], &$_SESSION[\"lista_de_axiomas\"]);\n $_SESSION[\"funcao\"] = \"fim\";\n }\n \n else{\n \t//nothing to do\n }\n\n echo 'O processo de gera��o de Ontologias foi conclu�do com sucesso!<br>\n\tN�o esque�a de clicar em Salvar.';\n ?>\n <p>\n <form method=\"POST\" action=\"auxiliar_bd.php\">\n <input type=\"hidden\" value=\"TRUE\" name=\"save\" size=\"20\" >\n <input type=\"submit\" value=\"SALVAR\">\n </form>\n </p>\n <?php\n}", "title": "" }, { "docid": "6e37dddd8517f23fed783207926447ee", "score": "0.5300944", "text": "public function Ordenar($demograficos, $demos, $datosO1, $titulo)\n {\n\n //<<<<<<<<<<<<<<<<<<< orden de mayor a menor por % INICIO\n\n //ordenado de datos prueba 2 ordenar el objeto\n\n //objeto temporar para array\n \n //array de objetos con porcentajes\n\n //dd($demograficos);\n\n if ($titulo == 'Preguntas') {\n\n $porcentualOrdenado = array();\n\n foreach ($demograficos as $demografico) {\n\n foreach ($datosO1 as $dato){\n\n if ($dato->id == $demografico->id) {\n\n $datosOrdenados = new ObjetoOrden();\n\n //calculo el porcentaje de cada uno\n \n $porcentage = round(($dato->cantidad * 100) / $demos,1);\n\n $datosOrdenados->id = $dato->id;\n $datosOrdenados->descripcion = $dato->descripcion;\n $datosOrdenados->favorabilidad = $dato->favorabilidad;\n $datosOrdenados->cantidad = $dato->cantidad;\n $datosOrdenados->porcentage = $porcentage;\n\n //lo guardo en un objeto y le hago un push al array de objeto\n\n array_push($porcentualOrdenado,$datosOrdenados);\n\n }\n\n }\n \n }\n \n }else{\n\n $porcentualOrdenado = array();\n\n $item = 0;\n\n foreach ($demograficos as $demografico) {\n\n foreach ($datosO1 as $dato){\n\n if ($dato->id == $demografico->id) {\n\n $datosOrdenados = new ObjetoOrden();\n\n //calculo el porcentaje de cada uno\n \n $porcentage = round(($dato->cantidad * 100) / $demos[$item],1);\n\n $datosOrdenados->id = $dato->id;\n $datosOrdenados->descripcion = $dato->descripcion;\n $datosOrdenados->favorabilidad = $dato->favorabilidad;\n $datosOrdenados->cantidad = $dato->cantidad;\n $datosOrdenados->porcentage = $porcentage;\n\n //lo guardo en un objeto y le hago un push al array de objeto\n\n array_push($porcentualOrdenado,$datosOrdenados);\n\n }\n\n }\n $item++;\n }\n\n }\n //dd($porcentualOrdenado);\n\n //ahora debo extraer todos los datos favorables, y de no teneer, debo insertar un registro con el id y favorabilidad = 0\n\n //$variableDOrden = new ObjetoOrden();\n\n //array de objetos con porcentajes \n\n $IdOrdenados = array();\n\n //dd($demograficos);\n\n //recorro demografico y porcentajeOrdenado para armar un arreglo solo de favorables por cada demografico para poder ordenarlo a posterior\n foreach ($demograficos as $demografico) {\n $total = 0;\n foreach ($porcentualOrdenado as $orden) {\n \n if ($demografico->id == $orden->id) {\n\n if ($orden->favorabilidad == \"Favorable\") {\n\n $variableDemog = $orden;\n\n $total = $orden->porcentage;\n\n }\n }\n\n }\n\n if ($total == 0) {\n\n $variableDemog = new ObjetoOrden();\n $variableDemog->id = $demografico->id;\n $variableDemog->descripcion = $demografico->descripcion;\n $variableDemog->porcentage = 0;\n $variableDemog->favorabilidad = \"Favorable\";\n\n array_push($IdOrdenados,$variableDemog);\n\n }else{\n\n $variableDemog->porcentage = $total;\n $variableDemog->favorabilidad = \"Favorable\";\n\n array_push($IdOrdenados,$variableDemog);\n }\n }\n \n //dd($IdOrdenados);\n\n //$IdOrdenados->asort();\n \n //de los favorables con porcentaje ordeno por % de mayor a menor\n\n if ($titulo == 'Edad' || $titulo == 'Antiguedad' || $titulo == 'Estudio' ) {\n\n $ArrayOrdenID = collect($IdOrdenados)->sortBy('id')->all();\n \n }else{\n\n $ArrayOrdenID = collect($IdOrdenados)->sortByDesc('porcentage')->all();\n\n }\n //dd($ArrayOrdenID); \n\n//<<<<<<<<<<<<<<<<<<< orden de mayor a menor por % FIN\n\n return $ArrayOrdenID;\n\n }", "title": "" }, { "docid": "7885c0c11e31ed1d17aaf05e3709236b", "score": "0.530068", "text": "function listarRepMemoriaCalculo(){\n\t\t $this->procedimiento='pre.ft_memoria_calculo_sel';\n\t\t $this->transaccion='PRE_MEMCAL_REP';\n\t\t $this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t $this->setCount(false);\t\n\t\t\n\t\t //captura parametros adicionales para el count\n\t\t $this->setParametro('id_cp_programa','id_cp_programa','int4');\n\t\t $this->setParametro('id_categoria_programatica','id_categoria_programatica','int4');\n\t\t $this->setParametro('id_presupuesto','id_presupuesto','int4');\n\t\t $this->setParametro('id_gestion','id_gestion','int4');\n\t\t $this->setParametro('tipo_pres','tipo_pres','VARCHAR');\n\t\t $this->setParametro('tipo_reporte','tipo_reporte','VARCHAR');\n\t\t $this->setParametro('id_partida','id_partida','int4');\n\t\t $this->setParametro('id_tipo_cc','id_tipo_cc','int4');\n\t\t\n\t\t //Definicion de la lista del resultado del query\n\t\t $this->captura('id_concepto','int4');\n $this->captura('concepto','VARCHAR');\n\t\t \n\t\t $this->captura('id_concepto_ingas','int4');\n $this->captura('id_partida','int4');\n\t\t \n $this->captura('codigo_partida','varchar');\t\t \t \n $this->captura('nombre_partida','varchar');\t\t \n\t\t $this->captura('descripcion_pres','varchar');\n \n\t\t $this->captura('desc_ingas','varchar');\n $this->captura('justificacion','varchar');\n $this->captura('unidad_medida','varchar');\n $this->captura('importe_unitario','NUMERIC');\n $this->captura('cantidad_mem','NUMERIC');\n $this->captura('importe','NUMERIC');\n\t\t \n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "02cdba9e11d39ae973861801fdde2c53", "score": "0.53001416", "text": "public function comentarEjemplar(Solicitud $psolicitud)\n {\n $respuesta = new Respuesta(); \n $objLogica = $this->get('logica_service');\n try {\n //Valida que la sesión corresponda y se encuentre activa\n $respSesionVali= ManejoDataRepository::validaSesionUsuario($psolicitud);\n //echo \"<script>alert(' buscarEjemplares :: Validez de sesion \".$respSesionVali.\" ')</script>\";\n if ($respSesionVali==AccesoController::inULogged) \n { \n\n //SE INACTIVA PORQUE PUEDE GENERAR UNA GRAN CANTIDAD DE REGISTROS EN UNA SOLA SESION\n //Busca y recupera el objeto de la sesion:: \n //$sesion = ManejoDataRepository::recuperaSesionUsuario($usuario,$psolicitud);\n //echo \"<script>alert('La sesion es \".$sesion->getTxsesnumero().\" ')</script>\";\n //Guarda la actividad de la sesion:: \n //ManejoDataRepository::generaActSesion($sesion,AccesoController::inDatoUno,\"Recupera Feed de Ejemplares\".$psolicitud->getEmail().\" recuperados con éxito \",$psolicitud->getAccion(),$fecha,$fecha);\n //echo \"<script>alert('Generó actividad de sesion ')</script>\";\n \n $resp = ManejoDataRepository::setComentarioEjemplar($psolicitud);\n $respuesta->setRespuesta($resp);\n $respuesta->setCantComenta(ManejoDataRepository::getCantComment($psolicitud->getIdEjemplar()));\n $respuesta->setCantMegusta(ManejoDataRepository::getCantMegusta($psolicitud->getIdEjemplar()));\n \n //echo \"esto es lo que hay en respuesta\";\n //print_r($respuesta);\n \n return $objLogica::generaRespuesta($respuesta, $psolicitud, NULL);\n } else {\n $respuesta->setRespuesta($respSesionVali);\n return $objLogica::generaRespuesta($respuesta, $psolicitud, NULL);\n }\n } catch (Exception $ex) {\n $respuesta->setRespuesta(AccesoController::inPlatCai);\n return $objLogica::generaRespuesta($respuesta, $psolicitud, NULL);\n }\n }", "title": "" }, { "docid": "6431486f26a2b4c442e41a95dc01e153", "score": "0.52999043", "text": "function recuperarExcentoComision(){\r\n\t\t\t\t$this->procedimiento='vef.ft_corregir_n_formas_pago_ime';\r\n\t\t\t\t$this->transaccion='VF_RECU_COMI_EXCE';\r\n\t\t\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t\t\t// \tvar_dump(\"aqui los parametros de llegada\",$this);exit;\r\n\t\t\t\t//Define los parametros para la funcion\r\n\t\t\t\t$this->setParametro('id_venta','id_venta','int4');\r\n\r\n\t\t\t\t//Ejecuta la instruccion\r\n\t\t\t\t$this->armarConsulta();\r\n\t\t\t\t$this->ejecutarConsulta();\r\n\r\n\t\t\t\t//var_dump(\"aqui los parametros de llegada\",$this->respuesta);exit;\r\n\t\t\t\t//Devuelve la respuesta\r\n\t\t\t\treturn $this->respuesta;\r\n\t\t\t}", "title": "" }, { "docid": "678e8e163168f91e5a73e43e206e8085", "score": "0.5295598", "text": "function posts_proposes_attente_moderation() {\n\tglobal $spip_lang_left;\n\n\tspipbb_log(\"entree\",1,\"posts_proposes_attente_moderation\");\n\t/* c: 7/2/8 compatibilite pg_sql\n\t$result = sql_query (\"SELECT SQL_CALC_FOUND_ROWS id_forum, titre, id_thread\n\t\t\t\t\t\t\tFROM spip_forum WHERE statut='prop'\n\t\t\t\t\t\t\tORDER BY date_heure LIMIT 0,10\");\n\t*/\n\t$compte = sql_fetsel(\"COUNT(*) AS total\", \"spip_forum\", \"statut='prop'\", \"\", \"\", \"0,10\");\n\n\t// récup nombre total d'entrées de $result (mysql 4.0.0 mini)\n\t//$ttligne= sql_query(\"SELECT FOUND_ROWS()\");\n\t//list($nbrprop) = @spip_fetch_array($ttligne);\n\tif (isset($compte['total'])) $nbrprop=$compte['total'];\n\t\telse $nbrprop=0;\n\n\t$result = sql_select(array(\"id_forum\",\"titre\",\"id_thread\"), // rows\n\t\t\t\t\t\t\"spip_forum\", // from\n\t\t\t\t\t\t\"statut='prop'\", //where\n\t\t\t\t\t\t\"\", // groupby\n\t\t\t\t\t\tarray(\"date_heure\"), // orderby\n\t\t\t\t\t\t\"0,10\"); // limit\n\n\t$aff='';\n\tif($nbrprop) {\n\t\t$aff.= \"<br />\"\n\t\t\t. \"\\n<div class='bandeau_rubriques' style='z-index: 1;'>\"\n\t\t\t. bandeau_titre_boite2(_T('spipbb:poste_valide'),\"gaf_p_prop.gif\",'','',false)\n\t\t\t. \"<div class='plan-articles'>\";\n\n\t\twhile($row = sql_fetch($result))\n\t\t\t{\n\t\t\t$idprop=$row['id_forum'];\n\t\t\t$titreprop=$row['titre'];\n\t\t\t$idthread=$row['id_thread'];\n\t\t\t$urlprop = url_post_tranche($idprop, $idthread);\n\t\t\t$ico_prop = ($idprop==$idthread) ? \"gaf_sujet-12.gif\" : \"gaf_post-12.gif\" ;\n\t\t\t$aff.= \"<a href='\".$urlprop.\"'>\".couper($titreprop,30).\"</a>\\n\";\n\t\t\t}\n\n\t\tif($nbrprop>10) { $aff.= _T('spipbb:etplus'); }\n\t\t$aff.= \"</div></div>\\n\";\n\t}\n\treturn $aff;\n}", "title": "" }, { "docid": "4bd249e3ec874e15150234c3143fc349", "score": "0.52923965", "text": "function procesar($menu,$palabra_usuario){\n$objeto= new Conectar();\n\n$conexion=$objeto->conexion();\n\n\n$query=\"SELECT * FROM respuestas where menu='$menu'\";\n$query=mysqli_query($conexion,$query);\n$resultado=mysqli_fetch_all($query,MYSQLI_ASSOC);\n\n$total_registros_por_menu=count($resultado);\n//dato que ingresa el usuario , se limpia y hacemos que todas sean minusculas\n$palabra_usuario= str_replace([\" \",\",\",\".\"],\"\",$palabra_usuario);\n$palabra_usuario=strtolower($palabra_usuario);\n//cuando el usuario ingresa una tilde o ñ el sistema pone un trienagulito y con esta funcion convierte caracteres especiales en ? entonces bajamos en la comparacion del for y le decimos que las tildes y ñ me las cambie por ? para que coincidan las de tildes \n$palabra_usuario=utf8_decode($palabra_usuario);\n\n\n\n//si en el for coincide la palabra con la bd va haber una respuesta almacenada aca y con esa continuaremos el camino\n$opcion_encontrada=array();\n$fin=false;\n$fila_de_coincidecia=0;\n//pongo un while ya que no sabemos en que vuelta encontrara el resultado y al fin de etiqueta while verifico que la fila de coincidencia sea menor al total de registros para que no se quede en infinito y si no hay nada se cambia a true sale pero en $opcion encontrada que es un array no abra nada y saldra\nwhile($fin==false){\n\n\n\n// palabra en bd y separada por array\n $coincidencia_bot=$resultado[$fila_de_coincidecia]['respuestas'];\n $coincidencia_bot=explode(\",\",$coincidencia_bot);\n//contamos el total de palabras que se nos entrega por fila y las convertimos en array separadas por comas ya que en la bd las insertamos por ,\n $total_posibles_respuestas=count($coincidencia_bot);\n//hacemos otro for para ver si alguna de las coincidencias coincide con la palabra ingresada por el cliente\n for($i=0;$i<$total_posibles_respuestas;$i++){\n //a la plabra en la pocicion i le cambio la tilde y ñ por ? para que me coincida con el utf8 que le coloque a la palabra del usuario aca simplemente estamos diciendo esto if($coincidencia_bot[$i])==$palabra_usuario){} solo que ya pusimos el str_replace como el utf8 me cambio los caracteres por ? yo se la aplico para que me la reconozco\n if(str_replace([\"á\",\"é\",\"í\",\"ó\",\"ú\",\"ñ\"], \"?\", $coincidencia_bot[$i])==$palabra_usuario){\n //entonces aca cuando coincide una palabra entregaremos al bot la opcion del menu para que el bot muestre la respuesta coherente segun opcion seleccionada entonces en el \n array_push($opcion_encontrada,$fila_de_coincidecia);\n $fin=true;\n }\n}\n\n //creamos una fila de coincidencia para que el bot luego de hacer el ciclo de abajo y coincida nos almacene la fila de coincidencia ya que en este for principal recorremos la fila y en el otro forcito recorremos cada palabra de la fila y aumentamos 1 a 1 para que vaya subiendo el contador\n$fila_de_coincidecia=$fila_de_coincidecia+1;\n//aca decimos que si fila de coinidencia es igual a e total de registos ya que resta una pocicion para los datos que inician en cero, entonces si es igual a los registros salga por que ya no encontro nada\n$verificar_salida=count($resultado);\nif($fila_de_coincidecia==$verificar_salida){\n\n $fin=true;\n\n}\n\n\n\n}\n\nif(count($opcion_encontrada)>0){\n //aca entregamos la opcion que selecciono el cliente cogiendo los datos entregados en la consulta a bd y accediendo a la posicion de la fila en la que estaba la coincidencia resultado contiene todos los registros y opcioncion encontrada tiene la fila de coincidencia y ahi accedemos a la opcion de menu acorde a la palabra, y opcion menu es el campo que queremos obtener para saber a donde lo enviamos con la respuesta\n $opcion=$resultado[$opcion_encontrada[0]]['opcion_menu'];\n return $opcion;\n}else{\n //si no encontro nada dira no entendi, insertaremos la palabra que fallo y el menu para agregar futuras coincidencias\n $query=\"INSERT INTO palabras_entrenamiento (palabra,opcion_menu) values ('$palabra_usuario',$menu) \";\n $ejecucion_query=mysqli_query($conexion,$query);\n return \"No entendi estoy en entrenamiento por favor explicame mas claramente\";\n}\n\n}", "title": "" } ]
9b972b010d1f9ef96c5771cc2877878f
Initializes the criteria object with sortations based on the given parameter
[ { "docid": "4c8d9cb656f1bf110802b1cf2658c0d6", "score": "0.66717005", "text": "protected function initCriteriaSortations( \\Aimeos\\MW\\Criteria\\Iface $criteria, array $params )\n\t{\n\t\tif( !isset( $params['sort'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$sortation = [];\n\n\t\tforeach( explode( ',', $params['sort'] ) as $sort )\n\t\t{\n\t\t\tif( $sort[0] === '-' ) {\n\t\t\t\t$sortation[] = $criteria->sort( '-', substr( $sort, 1 ) );\n\t\t\t} else {\n\t\t\t\t$sortation[] = $criteria->sort( '+', $sort );\n\t\t\t}\n\t\t}\n\n\t\treturn $criteria->setSortations( $sortation );\n\t}", "title": "" } ]
[ { "docid": "1b928f20350757397fa2a2d48897ce5f", "score": "0.662812", "text": "public function init() {\n $oConfig = $this->getConfig();\n $this->_sDefSort = \"DATE\";\n $sSortCol = $oConfig->getRequestParameter('sort');\n\n if (!$sSortCol || $sSortCol == $this->_sDefSort) {\n $this->_blDesc = false;\n }\n\n parent::init();\n }", "title": "" }, { "docid": "d1c922c404c3a3fd37adcfb38664500a", "score": "0.6578172", "text": "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->Kode); // Kode\n\t\t\t$this->UpdateSort($this->NamaLapangan); // NamaLapangan\n\t\t\t$this->UpdateSort($this->TglSewa); // TglSewa\n\t\t\t$this->UpdateSort($this->JamSewa); // JamSewa\n\t\t\t$this->UpdateSort($this->HargaSewa); // HargaSewa\n\t\t\t$this->UpdateSort($this->Hitung); // Hitung\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "6f00278583dd1bdad861750a23e51a0c", "score": "0.65127414", "text": "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->Switch); // Switch\r\n\t\t\t$this->UpdateSort($this->Bocas_Switch); // Bocas_Switch\r\n\t\t\t$this->UpdateSort($this->Estado_Switch); // Estado_Switch\r\n\t\t\t$this->UpdateSort($this->Cantidad_Ap); // Cantidad_Ap\r\n\t\t\t$this->UpdateSort($this->Cantidad_Ap_Func); // Cantidad_Ap_Func\r\n\t\t\t$this->UpdateSort($this->Ups); // Ups\r\n\t\t\t$this->UpdateSort($this->Estado_Ups); // Estado_Ups\r\n\t\t\t$this->UpdateSort($this->Cableado); // Cableado\r\n\t\t\t$this->UpdateSort($this->Estado_Cableado); // Estado_Cableado\r\n\t\t\t$this->UpdateSort($this->Porcent_Estado_Cab); // Porcent_Estado_Cab\r\n\t\t\t$this->UpdateSort($this->Porcent_Func_Piso); // Porcent_Func_Piso\r\n\t\t\t$this->UpdateSort($this->Plano_Escuela); // Plano_Escuela\r\n\t\t\t$this->UpdateSort($this->Fecha_Actualizacion); // Fecha_Actualizacion\r\n\t\t\t$this->UpdateSort($this->Usuario); // Usuario\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e82f2f3a46f08e50c1ee9d411bdf98ad", "score": "0.6482549", "text": "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->origen_dem); // origen_dem\n\t\t\t$this->UpdateSort($this->tipo_cliente_dem); // tipo_cliente_dem\n\t\t\t$this->UpdateSort($this->fecha_llamada); // fecha_llamada\n\t\t\t$this->UpdateSort($this->cod_dem); // cod_dem\n\t\t\t$this->UpdateSort($this->poliza_dem); // poliza_dem\n\t\t\t$this->UpdateSort($this->usuario_captura); // usuario_captura\n\t\t\t$this->UpdateSort($this->campana_demanda); // campana_demanda\n\t\t\t$this->UpdateSort($this->chip_natural); // chip_natural\n\t\t\t$this->UpdateSort($this->estado_predio); // estado_predio\n\t\t\t$this->UpdateSort($this->tipo_predio); // tipo_predio\n\t\t\t$this->UpdateSort($this->uso); // uso\n\t\t\t$this->UpdateSort($this->mecado); // mecado\n\t\t\t$this->UpdateSort($this->nombre_cliente); // nombre_cliente\n\t\t\t$this->UpdateSort($this->num_doc); // num_doc\n\t\t\t$this->UpdateSort($this->direccion); // direccion\n\t\t\t$this->UpdateSort($this->municipio); // municipio\n\t\t\t$this->UpdateSort($this->telefono); // telefono\n\t\t\t$this->UpdateSort($this->cod_trabajo_original); // cod_trabajo_original\n\t\t\t$this->UpdateSort($this->fecha_trab_dem); // fecha_trab_dem\n\t\t\t$this->UpdateSort($this->cod_ult_visit); // cod_ult_visit\n\t\t\t$this->UpdateSort($this->res_ult_vis); // res_ult_vis\n\t\t\t$this->UpdateSort($this->fecha_ult_visita); // fecha_ult_visita\n\t\t\t$this->UpdateSort($this->usu_asig_primer_trab); // usu_asig_primer_trab\n\t\t\t$this->UpdateSort($this->fecha_prim_visit); // fecha_prim_visit\n\t\t\t$this->UpdateSort($this->respuesta_pv); // respuesta_pv\n\t\t\t$this->UpdateSort($this->fecha_cap_primera_visita); // fecha_cap_primera_visita\n\t\t\t$this->UpdateSort($this->cod_contratista); // cod_contratista\n\t\t\t$this->UpdateSort($this->nom_cont); // nom_cont\n\t\t\t$this->UpdateSort($this->distrito); // distrito\n\t\t\t$this->UpdateSort($this->malla); // malla\n\t\t\t$this->UpdateSort($this->sector); // sector\n\t\t\t$this->UpdateSort($this->descr_estado_dem); // descr_estado_dem\n\t\t\t$this->UpdateSort($this->estrato); // estrato\n\t\t\t$this->UpdateSort($this->clase_dem); // clase_dem\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "42226a348f190121e51799c63ca08a2f", "score": "0.6344971", "text": "function SetUpSortOrder() {\n\t\tglobal $z2padmin;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$z2padmin->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$z2padmin->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$z2padmin->UpdateSort($z2padmin->Nama); // Nama\n\t\t\t$z2padmin->UpdateSort($z2padmin->Username); // Username\n\t\t\t$z2padmin->UpdateSort($z2padmin->Password); // Password\n\t\t\t$z2padmin->UpdateSort($z2padmin->Level); // Level\n\t\t\t$z2padmin->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "ae10cbf41efd90fa87902f60198f9fb1", "score": "0.6294578", "text": "public function getPredefinedSortingClauses(array $requestParam);", "title": "" }, { "docid": "26f56d6cbca9143df612f812356de49b", "score": "0.6290687", "text": "public function __construct()\n {\n $self = $this;\n\n Builder::macro('sort', function (string $column, string $direction = 'asc') use ($self) {\n $self->setQuery($this);\n\n return $self->sort($column, $direction);\n });\n }", "title": "" }, { "docid": "c07e2cd2e589bc3847abbae3c7a94d3a", "score": "0.621067", "text": "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->tgl, $bCtrl); // tgl\n\t\t\t$this->UpdateSort($this->noper, $bCtrl); // noper\n\t\t\t$this->UpdateSort($this->nobuk, $bCtrl); // nobuk\n\t\t\t$this->UpdateSort($this->keg, $bCtrl); // keg\n\t\t\t$this->UpdateSort($this->bud, $bCtrl); // bud\n\t\t\t$this->UpdateSort($this->ket, $bCtrl); // ket\n\t\t\t$this->UpdateSort($this->jumlahd, $bCtrl); // jumlahd\n\t\t\t$this->UpdateSort($this->jumlahk, $bCtrl); // jumlahk\n\t\t\t$this->UpdateSort($this->chek, $bCtrl); // chek\n\t\t\t$this->UpdateSort($this->debkre, $bCtrl); // debkre\n\t\t\t$this->UpdateSort($this->post, $bCtrl); // post\n\t\t\t$this->UpdateSort($this->foll, $bCtrl); // foll\n\t\t\t$this->UpdateSort($this->jns, $bCtrl); // jns\n\t\t\t$this->UpdateSort($this->jp, $bCtrl); // jp\n\t\t\t$this->UpdateSort($this->spm, $bCtrl); // spm\n\t\t\t$this->UpdateSort($this->spm1, $bCtrl); // spm1\n\t\t\t$this->UpdateSort($this->ppn, $bCtrl); // ppn\n\t\t\t$this->UpdateSort($this->ps21, $bCtrl); // ps21\n\t\t\t$this->UpdateSort($this->ps22, $bCtrl); // ps22\n\t\t\t$this->UpdateSort($this->ps23, $bCtrl); // ps23\n\t\t\t$this->UpdateSort($this->ps24, $bCtrl); // ps24\n\t\t\t$this->UpdateSort($this->ps4, $bCtrl); // ps4\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "57fbaa3c346b5449de25e44ac1d64e53", "score": "0.6199111", "text": "public function makeCriterias()\n {\n $this->criterias = [\n 'search' => 'searchCriteria',\n 'limit' => 'limitCriteria',\n 'orderBy' => 'orderByCriteria',\n 'with' => 'withCriteria',\n 'fields' => 'fieldsCriteria'\n ];\n }", "title": "" }, { "docid": "c301d66575fe9b727ddebd104cc12828", "score": "0.6186603", "text": "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->llave, $bCtrl); // llave\n\t\t\t$this->UpdateSort($this->Cargo_gme, $bCtrl); // Cargo_gme\n\t\t\t$this->UpdateSort($this->NOM_PE, $bCtrl); // NOM_PE\n\t\t\t$this->UpdateSort($this->Otro_PE, $bCtrl); // Otro_PE\n\t\t\t$this->UpdateSort($this->Otro_NOM_PGE, $bCtrl); // Otro_NOM_PGE\n\t\t\t$this->UpdateSort($this->Otro_CC_PGE, $bCtrl); // Otro_CC_PGE\n\t\t\t$this->UpdateSort($this->FECHA_REPORT, $bCtrl); // FECHA_REPORT\n\t\t\t$this->UpdateSort($this->DIA, $bCtrl); // DIA\n\t\t\t$this->UpdateSort($this->MES, $bCtrl); // MES\n\t\t\t$this->UpdateSort($this->Departamento, $bCtrl); // Departamento\n\t\t\t$this->UpdateSort($this->NOM_VDA, $bCtrl); // NOM_VDA\n\t\t\t$this->UpdateSort($this->Ha_Coca, $bCtrl); // Ha_Coca\n\t\t\t$this->UpdateSort($this->Ha_Amapola, $bCtrl); // Ha_Amapola\n\t\t\t$this->UpdateSort($this->Ha_Marihuana, $bCtrl); // Ha_Marihuana\n\t\t\t$this->UpdateSort($this->T_erradi, $bCtrl); // T_erradi\n\t\t\t$this->UpdateSort($this->GRA_LAT_Sector, $bCtrl); // GRA_LAT_Sector\n\t\t\t$this->UpdateSort($this->MIN_LAT_Sector, $bCtrl); // MIN_LAT_Sector\n\t\t\t$this->UpdateSort($this->SEG_LAT_Sector, $bCtrl); // SEG_LAT_Sector\n\t\t\t$this->UpdateSort($this->GRA_LONG_Sector, $bCtrl); // GRA_LONG_Sector\n\t\t\t$this->UpdateSort($this->MIN_LONG_Sector, $bCtrl); // MIN_LONG_Sector\n\t\t\t$this->UpdateSort($this->SEG_LONG_Sector, $bCtrl); // SEG_LONG_Sector\n\t\t\t$this->UpdateSort($this->Ini_Jorna, $bCtrl); // Ini_Jorna\n\t\t\t$this->UpdateSort($this->Fin_Jorna, $bCtrl); // Fin_Jorna\n\t\t\t$this->UpdateSort($this->Situ_Especial, $bCtrl); // Situ_Especial\n\t\t\t$this->UpdateSort($this->Adm_GME, $bCtrl); // Adm_GME\n\t\t\t$this->UpdateSort($this->_1_Abastecimiento, $bCtrl); // 1_Abastecimiento\n\t\t\t$this->UpdateSort($this->_1_Acompanamiento_firma_GME, $bCtrl); // 1_Acompanamiento_firma_GME\n\t\t\t$this->UpdateSort($this->_1_Apoyo_zonal_sin_punto_asignado, $bCtrl); // 1_Apoyo_zonal_sin_punto_asignado\n\t\t\t$this->UpdateSort($this->_1_Descanso_en_dia_habil, $bCtrl); // 1_Descanso_en_dia_habil\n\t\t\t$this->UpdateSort($this->_1_Descanso_festivo_dominical, $bCtrl); // 1_Descanso_festivo_dominical\n\t\t\t$this->UpdateSort($this->_1_Dia_compensatorio, $bCtrl); // 1_Dia_compensatorio\n\t\t\t$this->UpdateSort($this->_1_Erradicacion_en_dia_festivo, $bCtrl); // 1_Erradicacion_en_dia_festivo\n\t\t\t$this->UpdateSort($this->_1_Espera_helicoptero_Helistar, $bCtrl); // 1_Espera_helicoptero_Helistar\n\t\t\t$this->UpdateSort($this->_1_Extraccion, $bCtrl); // 1_Extraccion\n\t\t\t$this->UpdateSort($this->_1_Firma_contrato_GME, $bCtrl); // 1_Firma_contrato_GME\n\t\t\t$this->UpdateSort($this->_1_Induccion_Apoyo_Zonal, $bCtrl); // 1_Induccion_Apoyo_Zonal\n\t\t\t$this->UpdateSort($this->_1_Insercion, $bCtrl); // 1_Insercion\n\t\t\t$this->UpdateSort($this->_1_Llegada_GME_a_su_lugar_de_Origen_fin_fase, $bCtrl); // 1_Llegada_GME_a_su_lugar_de_Origen_fin_fase\n\t\t\t$this->UpdateSort($this->_1_Novedad_apoyo_zonal, $bCtrl); // 1_Novedad_apoyo_zonal\n\t\t\t$this->UpdateSort($this->_1_Novedad_enfermero, $bCtrl); // 1_Novedad_enfermero\n\t\t\t$this->UpdateSort($this->_1_Punto_fuera_del_area_de_erradicacion, $bCtrl); // 1_Punto_fuera_del_area_de_erradicacion\n\t\t\t$this->UpdateSort($this->_1_Transporte_bus, $bCtrl); // 1_Transporte_bus\n\t\t\t$this->UpdateSort($this->_1_Traslado_apoyo_zonal, $bCtrl); // 1_Traslado_apoyo_zonal\n\t\t\t$this->UpdateSort($this->_1_Traslado_area_vivac, $bCtrl); // 1_Traslado_area_vivac\n\t\t\t$this->UpdateSort($this->Adm_Fuerza, $bCtrl); // Adm_Fuerza\n\t\t\t$this->UpdateSort($this->_2_A_la_espera_definicion_nuevo_punto_FP, $bCtrl); // 2_A_la_espera_definicion_nuevo_punto_FP\n\t\t\t$this->UpdateSort($this->_2_Espera_helicoptero_FP_de_seguridad, $bCtrl); // 2_Espera_helicoptero_FP_de_seguridad\n\t\t\t$this->UpdateSort($this->_2_Espera_helicoptero_FP_que_abastece, $bCtrl); // 2_Espera_helicoptero_FP_que_abastece\n\t\t\t$this->UpdateSort($this->_2_Induccion_FP, $bCtrl); // 2_Induccion_FP\n\t\t\t$this->UpdateSort($this->_2_Novedad_canino_o_del_grupo_de_deteccion, $bCtrl); // 2_Novedad_canino_o_del_grupo_de_deteccion\n\t\t\t$this->UpdateSort($this->_2_Problemas_fuerza_publica, $bCtrl); // 2_Problemas_fuerza_publica\n\t\t\t$this->UpdateSort($this->_2_Sin_seguridad, $bCtrl); // 2_Sin_seguridad\n\t\t\t$this->UpdateSort($this->Sit_Seguridad, $bCtrl); // Sit_Seguridad\n\t\t\t$this->UpdateSort($this->_3_AEI_controlado, $bCtrl); // 3_AEI_controlado\n\t\t\t$this->UpdateSort($this->_3_AEI_no_controlado, $bCtrl); // 3_AEI_no_controlado\n\t\t\t$this->UpdateSort($this->_3_Bloqueo_parcial_de_la_comunidad, $bCtrl); // 3_Bloqueo_parcial_de_la_comunidad\n\t\t\t$this->UpdateSort($this->_3_Bloqueo_total_de_la_comunidad, $bCtrl); // 3_Bloqueo_total_de_la_comunidad\n\t\t\t$this->UpdateSort($this->_3_Combate, $bCtrl); // 3_Combate\n\t\t\t$this->UpdateSort($this->_3_Hostigamiento, $bCtrl); // 3_Hostigamiento\n\t\t\t$this->UpdateSort($this->_3_MAP_Controlada, $bCtrl); // 3_MAP_Controlada\n\t\t\t$this->UpdateSort($this->_3_MAP_No_controlada, $bCtrl); // 3_MAP_No_controlada\n\t\t\t$this->UpdateSort($this->_3_Operaciones_de_seguridad, $bCtrl); // 3_Operaciones_de_seguridad\n\t\t\t$this->UpdateSort($this->GRA_LAT_segurid, $bCtrl); // GRA_LAT_segurid\n\t\t\t$this->UpdateSort($this->MIN_LAT_segurid, $bCtrl); // MIN_LAT_segurid\n\t\t\t$this->UpdateSort($this->SEG_LAT_segurid, $bCtrl); // SEG_LAT_segurid\n\t\t\t$this->UpdateSort($this->GRA_LONG_seguri, $bCtrl); // GRA_LONG_seguri\n\t\t\t$this->UpdateSort($this->MIN_LONG_seguri, $bCtrl); // MIN_LONG_seguri\n\t\t\t$this->UpdateSort($this->SEG_LONG_seguri, $bCtrl); // SEG_LONG_seguri\n\t\t\t$this->UpdateSort($this->Novedad, $bCtrl); // Novedad\n\t\t\t$this->UpdateSort($this->_4_Epidemia, $bCtrl); // 4_Epidemia\n\t\t\t$this->UpdateSort($this->_4_Novedad_climatologica, $bCtrl); // 4_Novedad_climatologica\n\t\t\t$this->UpdateSort($this->_4_Registro_de_cultivos, $bCtrl); // 4_Registro_de_cultivos\n\t\t\t$this->UpdateSort($this->_4_Zona_con_cultivos_muy_dispersos, $bCtrl); // 4_Zona_con_cultivos_muy_dispersos\n\t\t\t$this->UpdateSort($this->_4_Zona_de_cruce_de_rios_caudalosos, $bCtrl); // 4_Zona_de_cruce_de_rios_caudalosos\n\t\t\t$this->UpdateSort($this->_4_Zona_sin_cultivos, $bCtrl); // 4_Zona_sin_cultivos\n\t\t\t$this->UpdateSort($this->Num_Erra_Salen, $bCtrl); // Num_Erra_Salen\n\t\t\t$this->UpdateSort($this->Num_Erra_Quedan, $bCtrl); // Num_Erra_Quedan\n\t\t\t$this->UpdateSort($this->No_ENFERMERO, $bCtrl); // No_ENFERMERO\n\t\t\t$this->UpdateSort($this->NUM_FP, $bCtrl); // NUM_FP\n\t\t\t$this->UpdateSort($this->NUM_Perso_EVA, $bCtrl); // NUM_Perso_EVA\n\t\t\t$this->UpdateSort($this->NUM_Poli, $bCtrl); // NUM_Poli\n\t\t\t$this->UpdateSort($this->Otro_Tema, $bCtrl); // Otro_Tema\n\t\t\t$this->UpdateSort($this->OBSERVACION, $bCtrl); // OBSERVACION\n\t\t\t$this->UpdateSort($this->AD1O, $bCtrl); // AÑO\n\t\t\t$this->UpdateSort($this->FASE, $bCtrl); // FASE\n\t\t\t$this->UpdateSort($this->F_Sincron, $bCtrl); // F_Sincron\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "cbbebf4d2a0527c39fbc818572213d70", "score": "0.61731", "text": "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->pd_id, $bCtrl); // pd_id\n\t\t\t$this->UpdateSort($this->pegawai_id, $bCtrl); // pegawai_id\n\t\t\t$this->UpdateSort($this->dept_id, $bCtrl); // dept_id\n\t\t\t$this->UpdateSort($this->f0m1, $bCtrl); // f0m1\n\t\t\t$this->UpdateSort($this->f0k1, $bCtrl); // f0k1\n\t\t\t$this->UpdateSort($this->f1m1, $bCtrl); // f1m1\n\t\t\t$this->UpdateSort($this->f1k1, $bCtrl); // f1k1\n\t\t\t$this->UpdateSort($this->f2m1, $bCtrl); // f2m1\n\t\t\t$this->UpdateSort($this->f2k1, $bCtrl); // f2k1\n\t\t\t$this->UpdateSort($this->f3m1, $bCtrl); // f3m1\n\t\t\t$this->UpdateSort($this->f3k1, $bCtrl); // f3k1\n\t\t\t$this->UpdateSort($this->f4m1, $bCtrl); // f4m1\n\t\t\t$this->UpdateSort($this->f4k1, $bCtrl); // f4k1\n\t\t\t$this->UpdateSort($this->f5m1, $bCtrl); // f5m1\n\t\t\t$this->UpdateSort($this->f5k1, $bCtrl); // f5k1\n\t\t\t$this->UpdateSort($this->f6m1, $bCtrl); // f6m1\n\t\t\t$this->UpdateSort($this->f6k1, $bCtrl); // f6k1\n\t\t\t$this->UpdateSort($this->f0m2, $bCtrl); // f0m2\n\t\t\t$this->UpdateSort($this->f0k2, $bCtrl); // f0k2\n\t\t\t$this->UpdateSort($this->f1m2, $bCtrl); // f1m2\n\t\t\t$this->UpdateSort($this->f1k2, $bCtrl); // f1k2\n\t\t\t$this->UpdateSort($this->f2m2, $bCtrl); // f2m2\n\t\t\t$this->UpdateSort($this->f2k2, $bCtrl); // f2k2\n\t\t\t$this->UpdateSort($this->f3m2, $bCtrl); // f3m2\n\t\t\t$this->UpdateSort($this->f3k2, $bCtrl); // f3k2\n\t\t\t$this->UpdateSort($this->f4m2, $bCtrl); // f4m2\n\t\t\t$this->UpdateSort($this->f4k2, $bCtrl); // f4k2\n\t\t\t$this->UpdateSort($this->f5m2, $bCtrl); // f5m2\n\t\t\t$this->UpdateSort($this->f5k2, $bCtrl); // f5k2\n\t\t\t$this->UpdateSort($this->f6m2, $bCtrl); // f6m2\n\t\t\t$this->UpdateSort($this->f6k2, $bCtrl); // f6k2\n\t\t\t$this->UpdateSort($this->f0m3, $bCtrl); // f0m3\n\t\t\t$this->UpdateSort($this->f0k3, $bCtrl); // f0k3\n\t\t\t$this->UpdateSort($this->f1m3, $bCtrl); // f1m3\n\t\t\t$this->UpdateSort($this->f1k3, $bCtrl); // f1k3\n\t\t\t$this->UpdateSort($this->f2m3, $bCtrl); // f2m3\n\t\t\t$this->UpdateSort($this->f2k3, $bCtrl); // f2k3\n\t\t\t$this->UpdateSort($this->f3m3, $bCtrl); // f3m3\n\t\t\t$this->UpdateSort($this->f3k3, $bCtrl); // f3k3\n\t\t\t$this->UpdateSort($this->f4m3, $bCtrl); // f4m3\n\t\t\t$this->UpdateSort($this->f4k3, $bCtrl); // f4k3\n\t\t\t$this->UpdateSort($this->f5m3, $bCtrl); // f5m3\n\t\t\t$this->UpdateSort($this->f5k3, $bCtrl); // f5k3\n\t\t\t$this->UpdateSort($this->f6m3, $bCtrl); // f6m3\n\t\t\t$this->UpdateSort($this->f6k3, $bCtrl); // f6k3\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "0263f79e17a2b5be12741928ea980596", "score": "0.61293757", "text": "function SetUpSortOrder() {\n\t\tglobal $view_reps_2_2_forma_1;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$view_reps_2_2_forma_1->CurrentOrder = up_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$view_reps_2_2_forma_1->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Constituent_University); // Constituent University\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Unit); // Unit\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->MFO); // MFO\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->PI_1); // PI 1\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->PI_Sub); // PI Sub\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Target_28129); // Target (1)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Accomplishment_28129); // Accomplishment (1)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->z9025_and_Above_28129); // 90% and Above (1)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Below_9025_28129); // Below 90% (1)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->PI_2); // PI 2\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Target_28229); // Target (2)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Accomplishment_28229); // Accomplishment (2)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->z9025_and_Above_28229); // 90% and Above (2)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Below_9025_28229); // Below 90% (2)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->PI_3); // PI 3\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Target_28329); // Target (3)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Accomplishment_28329); // Accomplishment (3)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->z9025_and_Above_28329); // 90% and Above (3)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Below_9025_28329); // Below 90% (3)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->PI_4); // PI 4\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Target_28429); // Target (4)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Accomplishment_28429); // Accomplishment (4)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->z9025_and_Above_28429); // 90% and Above (4)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Below_9025_28429); // Below 90% (4)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->PI_5); // PI 5\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Target_28529); // Target (5)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Accomplishment_28529); // Accomplishment (5)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->z9025_and_Above_28529); // 90% and Above (5)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Below_9025_28529); // Below 90% (5)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->PI_6); // PI 6\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Target_28629); // Target (6)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Accomplishment_28629); // Accomplishment (6)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->z9025_and_Above_28629); // 90% and Above (6)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Below_9025_28629); // Below 90% (6)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->PI_7); // PI 7\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Target_28729); // Target (7)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Accomplishment_28729); // Accomplishment (7)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->z9025_and_Above_28729); // 90% and Above (7)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Below_9025_28729); // Below 90% (7)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->PI_8); // PI 8\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Target_28829); // Target (8)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Accomplishment_28829); // Accomplishment (8)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->z9025_and_Above_28829); // 90% and Above (8)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Below_9025_28829); // Below 90% (8)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->PI_9); // PI 9\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Target_28929); // Target (9)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Accomplishment_28929); // Accomplishment (9)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->z9025_and_Above_28929); // 90% and Above (9)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Below_9025_28929); // Below 90% (9)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->PI_10); // PI 10\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Target_281029); // Target (10)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Accomplishment_281029); // Accomplishment (10)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->z9025_and_Above_281029); // 90% and Above (10)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Below_9025_281029); // Below 90% (10)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->PI_11); // PI 11\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Target_281129); // Target (11)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Accomplishment_281129); // Accomplishment (11)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->z9025_and_Above_281129); // 90% and Above (11)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Below_9025_281129); // Below 90% (11)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->PI_12); // PI 12\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Target_281229); // Target (12)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Accomplishment_281229); // Accomplishment (12)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->z9025_and_Above_281229); // 90% and Above (12)\n\t\t\t$view_reps_2_2_forma_1->UpdateSort($view_reps_2_2_forma_1->Below_9025_281229); // Below 90% (12)\n\t\t\t$view_reps_2_2_forma_1->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "05f5f780075d6c26a392a9b4ed491b60", "score": "0.6120065", "text": "function SetUpSortOrder() {\n\t\tglobal $t_lylich;\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$t_lylich->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$t_lylich->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$t_lylich->UpdateSort($t_lylich->FK_CONGTY_ID, $bCtrl); // FK_CONGTY_ID\n\t\t\t$t_lylich->UpdateSort($t_lylich->C_PIC, $bCtrl); // C_PIC\n\t\t\t$t_lylich->UpdateSort($t_lylich->C_FULLNAME, $bCtrl); // C_FULLNAME\n\t\t\t$t_lylich->UpdateSort($t_lylich->C_POSITION, $bCtrl); // C_POSITION\n\t\t\t$t_lylich->UpdateSort($t_lylich->C_WORK_ADDRESS, $bCtrl); // C_WORK_ADDRESS\n\t\t\t$t_lylich->UpdateSort($t_lylich->C_EMAIL, $bCtrl); // C_EMAIL\n\t\t\t$t_lylich->UpdateSort($t_lylich->C_PHONE, $bCtrl); // C_PHONE\n\t\t\t$t_lylich->UpdateSort($t_lylich->C_BIRTHDAY, $bCtrl); // C_BIRTHDAY\n\t\t\t$t_lylich->UpdateSort($t_lylich->C_TEMPLATE, $bCtrl); // C_TEMPLATE\n\t\t\t$t_lylich->UpdateSort($t_lylich->C_STATUS, $bCtrl); // C_STATUS\n\t\t\t$t_lylich->UpdateSort($t_lylich->C_ORDER_LEVEL, $bCtrl); // C_ORDER_LEVEL\n\t\t\t$t_lylich->UpdateSort($t_lylich->C_ACTIVE, $bCtrl); // C_ACTIVE\n\t\t\t$t_lylich->UpdateSort($t_lylich->C_TIME_ACTIVE, $bCtrl); // C_TIME_ACTIVE\n\t\t\t$t_lylich->UpdateSort($t_lylich->C_ACTIVE_MAINSITE, $bCtrl); // C_ACTIVE_MAINSITE\n\t\t\t$t_lylich->UpdateSort($t_lylich->C_TIME_ACTIVEM, $bCtrl); // C_TIME_ACTIVEM\n\t\t\t$t_lylich->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "31e48a1cdf6188fa4ec613b4d3ad7da0", "score": "0.6117606", "text": "protected function _construct()\n {\n parent::_construct();\n $this->setDefaultSort('lookbook_id');\n\t\t$this->setDefaultDir('DESC');\n $this->setUseAjax(true);\n $this->setDefaultFilter(['chooser_is_active' => '1']);\n }", "title": "" }, { "docid": "863791ba810567fdd5262f41770b964a", "score": "0.6103402", "text": "public function __construct()\n\t{\n\t\t$this->conditions = $this->compare( '==', '1', '1' );\n\t}", "title": "" }, { "docid": "eb18a7497ae8c215d45cf844039cc11b", "score": "0.6097151", "text": "function SetUpSortOrder() {\n\t\tglobal $t_linkad;\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$t_linkad->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$t_linkad->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$t_linkad->UpdateSort($t_linkad->C_LINKAD_NAME, $bCtrl); // C_LINKAD_NAME\n\t\t\t$t_linkad->UpdateSort($t_linkad->C_LINKAD_TYPE, $bCtrl); // C_LINKAD_TYPE\n\t\t\t$t_linkad->UpdateSort($t_linkad->C_LINKAD_URL, $bCtrl); // C_LINKAD_URL\n\t\t\t$t_linkad->UpdateSort($t_linkad->C_LINKAD_POS, $bCtrl); // C_LINKAD_POS\n\t\t\t$t_linkad->UpdateSort($t_linkad->C_LINKAD_ACTIVE, $bCtrl); // C_LINKAD_ACTIVE\n\t\t\t$t_linkad->UpdateSort($t_linkad->C_ORDER, $bCtrl); // C_ORDER\n\t\t\t$t_linkad->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "2c94645765bdadaf9f4e2e6b0142ae6c", "score": "0.60486007", "text": "function SetupSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = @$_GET[\"order\"];\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->Departemen, $bCtrl); // Departemen\n\t\t\t$this->UpdateSort($this->HeadDetail, $bCtrl); // HeadDetail\n\t\t\t$this->UpdateSort($this->NomorHead, $bCtrl); // NomorHead\n\t\t\t$this->UpdateSort($this->SubTotalFlag, $bCtrl); // SubTotalFlag\n\t\t\t$this->UpdateSort($this->Urutan, $bCtrl); // Urutan\n\t\t\t$this->UpdateSort($this->Nomor, $bCtrl); // Nomor\n\t\t\t$this->UpdateSort($this->Pos, $bCtrl); // Pos\n\t\t\t$this->UpdateSort($this->Nominal, $bCtrl); // Nominal\n\t\t\t$this->UpdateSort($this->JumlahSiswa, $bCtrl); // JumlahSiswa\n\t\t\t$this->UpdateSort($this->Bulan, $bCtrl); // Bulan\n\t\t\t$this->UpdateSort($this->Jumlah, $bCtrl); // Jumlah\n\t\t\t$this->UpdateSort($this->Total, $bCtrl); // Total\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "6458fcb38e133d191ea066d63072bb49", "score": "0.60336536", "text": "public function sortParams(): void;", "title": "" }, { "docid": "fb1b68419d41cf6f5b697c90f9c0dded", "score": "0.60322505", "text": "public function _init() {\n\t // Normalizes the attributes property.\n \t $_attrs = [];\n \t foreach ($this->attributes as $a) {\n \t\tif (is_array($a)) {\n \t\t //SC: 2018-08-27: change each with foreach/break\n \t\t foreach($a as $key => $val) { break; }\n \t\t //list($key, $val) = each($a);\n \t\t $_attrs[$key] = $val;\n \t\t} else {\n \t\t $_attrs[$a] = null;\n \t\t}\n \t }\n \t $this->attributes = $_attrs;\n\n\n\t //get sort order from request\n $params = \\V::app()->request->query;\n \n if (isset($params[$this->sortParam])) {\n $_attrs = explode($this->separator, $params[$this->sortParam]);\n foreach ($_attrs as $a) {\n $desc = false;\n if (strncmp($a, '-', 1) === 0) {\n $desc = true;\n $a = substr($a, 1);\n }\n\n if (array_key_exists($a, $this->attributes)) {\n $this->sort[$a] = $desc ? self::SORT_DESC : self::SORT_ASC;\n }\n }\n }\n\n\t //add also non-null values from attributes\n\t foreach($this->attributes as $a => $s) {\n\t\tif ($s !== null && empty($this->sort[$a]))\n\t\t $this->sort[$a] = $s;\n\t }\n\t //$this->sort = \\util\\Set::merge($this->attributes, $this->sort);\n\t}", "title": "" }, { "docid": "6a0b111cabf91bbf946122c9ed30509e", "score": "0.6000099", "text": "public function populate_sort_order() {\n\n if ($_SESSION['pagination']['sortCol'] == $this->_sortCol) {\n $flipFlag = 1;\n // When the columns do match there are still 2 conditions that can alter the sort order\n// echo \"Sess pagenum= \".$_SESSION['pagination']['pageNum'].' data pagenum= '.$data['pageNum'];\n if ($_SESSION['pagination']['pageNum'] != $this->_pageNum) {\n // pages dont match\n // set the pagination session sortcol\n // keep the sort order the same \n $_SESSION['pagination']['pageNum'] = $this->_pageNum;\n $this->_sortOrd = $this->get_sort_order(); \n $flipFlag = 0; \n }\n if ($_SESSION['pagination']['srchTerm'] != $this->_srchTerm) {\n // search terms dont match\n // set the pagination session srchTerm\n // default the sort order \n $_SESSION['pagination']['srchTerm'] = $this->_srchTerm;\n $this->_sortOrd = $this->get_sort_order_default(); \n $flipFlag = 0; \n }\n } else {\n // columns dont match\n // set the pagination session sortcol\n // default the sort order\n $_SESSION['pagination']['sortCol'] = $this->_sortCol;\n $this->_sortOrd = $this->get_sort_order_default();\n $flipFlag = 0;\n }\n // If any of the sorting rules did not trigger then \n // we flip the order from ASC to DESC or vice-versa\n if ($flipFlag == 1) {\n $this->_sortOrd = $this->flip_sort_order();\n }\n \n return $this->_sortOrd;\n }", "title": "" }, { "docid": "a97dcdb2266b60b9536ef5d53b18f056", "score": "0.5981573", "text": "protected function sync_sorting() {\n if (isset($this->request->params['sort']) && isset($this->request->params['direction']) && $this->request->params['named']['sort'] == NULL) {\n $this->request->params['named']['sort'] = $this->request->params['sort'];\n $this->request->params['named']['direction'] = $this->request->params['direction'];\n }\n }", "title": "" }, { "docid": "bd31989ef22cce219f015e16c9545271", "score": "0.59780836", "text": "protected function setSortStatement()\r\n {\r\n $cols = $this->getColumns();\r\n\r\n if ($this->getRequest()->has(self::GRID_SORT_COL_PARAM)\r\n ) {\r\n /**\r\n * @var ColumnObject $col\r\n */\r\n $col = $cols[$this->getRequest()->get(self::GRID_SORT_COL_PARAM)];\r\n\r\n if (!is_null($col->getDbField())) {\r\n $sortableColumn = sprintf(\"%s.%s\", $col->getTableAlias(), $col->getDbField());\r\n } else {\r\n $sortableColumn = sprintf(\"%s.%s\", $col->getTableAlias(), $col->getColumnAlias());\r\n }\r\n\r\n $this->getQuerybuilder()->addOrderBy(\r\n $sortableColumn,\r\n $this->getRequest()->get(self::GRID_SORT_TYPE)\r\n );\r\n }\r\n }", "title": "" }, { "docid": "4333ac5448cce95418d4b103f0f93634", "score": "0.5937031", "text": "protected function addSort(&$sphinxCriteria)\n {\n if (isset($this->config['sort'])) {\n $sort = $this->config['sort'];\n if (isset($sort['attribute'])) {\n\n if (isset($sort['mode']) && strtolower($sort['mode']) === 'desc') {\n $sphinxCriteria->sortMode = SPH_SORT_ATTR_DESC;\n } else {\n $sphinxCriteria->sortMode = SPH_SORT_ATTR_ASC;\n }\n\n $sphinxCriteria->setSortBy($sort['attribute']);\n }\n }\n }", "title": "" }, { "docid": "b39b9d5447dba647b4fc7ca001605255", "score": "0.5928706", "text": "private function defaultCriteria()\n {\n $this->repository->pushCriteria(new WithDepartment());\n $this->repository->pushCriteria(new WithPosition());\n $this->repository->pushCriteria(new WithStatus());\n $this->repository->pushCriteria(new WithLocation());\n $this->repository->pushCriteria(new WithClientProject());\n $this->repository->pushCriteria(new WithEmployeeSkill());\n $this->repository->pushCriteria(new Select());\n }", "title": "" }, { "docid": "57456ce1b6a8d862caa9c4dc00a88e94", "score": "0.589587", "text": "public function getQuerySort();", "title": "" }, { "docid": "a96197cdb45a8288e0c503a3b79f5071", "score": "0.5892441", "text": "public function init ()\r\n\t{\r\n\t\t// or can use this to set default valuse\r\n\t\t$this->fields = kArray::makeAssociativeDefaultValue ( array (\r\n\t\t\t\"_eq_category_id\",\r\n\t\t\t\"_in_category_id\",\r\n\t\t\t\"_eq_entry_id\",\r\n\t\t\t\"_in_entry_id\",\r\n\t\t\t\"_gte_created_at\",\r\n\t\t\t\"_lte_created_at\",\r\n\t\t\t\"_likex_category_full_ids\",\r\n\t\t\t\"_eq_status\",\r\n\t\t\t\"_in_status\",\r\n\t\t\t) , NULL );\r\n\r\n\t\t$this->allowed_order_fields = array ( );\r\n\r\n\t\t$this->aliases = array ();\r\n\t}", "title": "" }, { "docid": "c623d0da96c324a5bb271920b0e7b362", "score": "0.5827887", "text": "protected function setDefaultComparator()\n {\n $func = function($a, $b)\n {\n $temp = 0;\n $cmpres = null;\n foreach($this->orders as $order)\n {\n $valuea = call_user_func($order['property'], $a);\n $valueb = call_user_func($order['property'], $b);\n\n if($valuea instanceof \\DateTime || $valueb instanceof \\DateTime ||\n is_numeric($valuea) || is_numeric($valueb))\n {\n if(is_numeric($valuea) || is_numeric($valueb))\n {\n $valuea = ((double)$valuea);\n $valueb = ((double)$valueb);\n }\n $cmpres = ($valuea < $valueb ? -1 : ($valuea > $valueb ? 1 : 0));\n }\n else\n {\n $cmpres = strcmp($valuea, $valueb);\n }\n\n $temp = (($order['direction'] == self::ORDER_DESC) ? -1 : 1) * $cmpres;\n if($temp!=0)\n {\n break;\n }\n }\n return $temp;\n };\n\n $this->setComparator($func);\n }", "title": "" }, { "docid": "8d1db29215e45cc40cc25a95033c9030", "score": "0.58199805", "text": "public function addSort() {\r\n\t\t\r\n\t\t// Get arguments\r\n\t\t@list($field, $direction) = func_get_args();\r\n\t\t$args = func_num_args();\r\n\t\t\r\n\t\t// Make sure they at least passed $field\r\n\t\tif (!$field) return $this;\r\n\t\t\r\n\t\t// If it's a string, then attempt to parse it\r\n\t\tif (is_string($field)) {\r\n\t\t\t$fields = $this->makeArray($field, \",\", \" \");\r\n\t\t\r\n\t\t// If it's not a string, it's probably an array\r\n\t\t} else {\r\n\t\t\tif (is_array($field)) {\r\n\t\t\t\tforeach ($field as $f)\r\n\t\t\t\t\t$this->addSort($f, $direction);\r\n\t\t\t\treturn $this;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Add the sorts to the query\r\n\t\tif (is_array($fields)) {\r\n\t\t\tforeach ($fields as $fieldName=>$fieldDirection) {\r\n\t\t\t\t$fieldName = $this->formatField($fieldName);\r\n\t\t\t\t($d = $fieldDirection) || ($d = $direction);\r\n\t\t\t\t$this->query[$this->query_id][\"sort\"][] = \"$fieldName $d\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "6f71c245c6f0330708bbb0c170b08754", "score": "0.5816282", "text": "function addSorting();", "title": "" }, { "docid": "ab8144cf20c969cddc7dfb4b4bca2a54", "score": "0.5804948", "text": "public function order_by() {\n\t\t$this->_params[__FUNCTION__] = func_get_args();\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "eadac4a3b3bf004281c8d53d0cc06328", "score": "0.57903075", "text": "private function getCriteria() {\n\t$criteria = new Criteria();\n\t\n\t$criteria->setIgnoreCase(true);\n\n\tif ($this->orderByDate)\n\t\t$criteria->addDescendingOrderByColumn(NewsArticlePeer::CREATIONDATE);\n\n\tif ($this->orderByCreationDate)\n\t\t$criteria->addDescendingOrderByColumn(NewsArticlePeer::CREATIONDATE);\n\n\tif ($this->orderByUpdateDate)\n\t\t$criteria->addDescendingOrderByColumn(NewsArticlePeer::LASTUPDATE);\t\n\t\n\tif ($this->archiveMode) {\n $criteria->add(NewsArticlePeer::STATUS,NewsArticlePeer::ARCHIVED);\t\t\n\t}\n\t\n\tif ($this->publishedMode)\n\t\t$criteria->add(NewsArticlePeer::STATUS,NewsArticlePeer::PUBLISHED);\n \n if (!empty($this->archiveAndpublishedMode)) {\n $criterion = $criteria->getNewCriterion(NewsArticlePeer::STATUS, NewsArticlePeer::ARCHIVED);\n $criterion->addOr($criteria->getNewCriterion(NewsArticlePeer::STATUS, NewsArticlePeer::PUBLISHED));\n $criteria->add($criterion);\n }\n\t\t\n\tif (!empty($this->fromDate) && ! empty($this->toDate)) {\n\t\t$criterion = $criteria->getNewCriterion(NewsArticlePeer::CREATIONDATE, $this->fromDate, Criteria::GREATER_EQUAL);\n\t\t$criterion->addAnd($criteria->getNewCriterion(NewsArticlePeer::CREATIONDATE, $this->toDate, Criteria::LESS_EQUAL));\n\t\t$criteria->add($criterion);\n\t}\n\telse {\n\t\t\n\t\tif (!empty($this->fromDate)) {\n\t\t\t$criteria->add(NewsArticlePeer::CREATIONDATE, $this->fromDate, Criteria::GREATER_EQUAL);\n\t\t}\n\t\t\n\t\tif (!empty($this->toDate)) {\n\t\t\t\n\t\t\t$criteria->add(NewsArticlePeer::CREATIONDATE,$this->toDate, Criteria::LESS_EQUAL);\n\t\t}\n\t}\n\t\n\tif (!empty($this->category)) {\n\t\t$category = $this->category;\n\t\t$criteria->add(NewsArticlePeer::CATEGORYID,$category->getId());\n\t}\n \n if (!empty($this->region)) {\n $region = $this->region;\n $criteria->add(NewsArticlePeer::REGIONID,$region->getId());\n }\n\t\n\tif (!empty($this->searchString)) {\n\t\t//separamos por palabras\n\t\t$words = explode(' ',$this->searchString);\n\t\t\n\t\tforeach ($words as $word) {\n\t\t\n $sql = \"( \".NewsArticlePeer::TITLE.\" like '%\".$word.\"%' )\";\n\t\t\tif (!isset($criterionTitle))\n\t\t\t\t$criterionTitle = $criteria->getNewCriterion(NewsArticlePeer::TITLE,$sql,Criteria::CUSTOM);\n\t\t\telse {\n\t\t\t\t$criterionTitle->addOr($criteria->getNewCriterion(NewsArticlePeer::TITLE,$sql,Criteria::CUSTOM));\n\t\t\t}\n\t\t\t\n $sql = \"( \".NewsArticlePeer::SUBTITLE.\" like '%\".$word.\"%' )\";\n\t\t\tif (!isset($criterionSubtitle))\n\t\t\t\t$criterionSubtitle = $criteria->getNewCriterion(NewsArticlePeer::SUBTITLE,$sql,Criteria::CUSTOM);\n\t\t\telse\t$criterionSubtitle->addOr($criteria->getNewCriterion(NewsArticlePeer::SUBTITLE,$sql,Criteria::CUSTOM));\n\t\t\t\n $sql = \"( \".NewsArticlePeer::BODY.\" like '%\".$word.\"%' )\";\n\t\t\tif (!isset($criterionBody))\n\t\t\t\t$criterionBody = $criteria->getNewCriterion(NewsArticlePeer::BODY,$sql,Criteria::CUSTOM);\n\t\t\telse {\n\t$criterionBody->addOr($criteria->getNewCriterion(NewsArticlePeer::BODY,$sql,Criteria::CUSTOM));\n\t\t\t}\n\t\t\t\n\t\t\t$sql = \"( \".NewsArticlePeer::SUMMARY.\" like '%\".$word.\"%' )\";\n if (!isset($criterionSummary))\n\t\t\t\t$criterionSummary = $criteria->getNewCriterion(NewsArticlePeer::SUMMARY,$sql,Criteria::CUSTOM);\n\t\t\telse {\n\t$criterionSummary->addOr($criteria->getNewCriterion(NewsArticlePeer::SUMMARY,$sql,Criteria::CUSTOM));\n\t\t\t}\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\t$criterionTitle->addOr($criterionSubtitle);\n\t\t$criterionTitle->addOr($criterionBody);\n\t\t$criterionTitle->addOr($criterionSummary);\t\t\n\t\t$criteria->add($criterionTitle);\n\n\t}\n\n\treturn $criteria;\n\t\n }", "title": "" }, { "docid": "755ab82b7881fe48cf943a7ba32e1263", "score": "0.57688177", "text": "public function __construct()\n {\n parent::__construct();\n $this->setId('restriction_rule_grid');\n $this->setDefaultSort('sort_order');\n $this->setDefaultDir('ASC');\n $this->setSaveParametersInSession(true);\n }", "title": "" }, { "docid": "2f1b4070ee42f0dfcfedc6baa1a9d0bf", "score": "0.5758428", "text": "public function getSorting() : Sorting;", "title": "" }, { "docid": "5c61a31f4c286ca0504c94d90bee8adb", "score": "0.5729341", "text": "public function buildSortQuery()\n\t\t\t{\n\t\t\t\t$this->sql_sort = $this->COMMENT_MODULE_TABLE_ALIAS.'.date_added DESC';\n\t\t\t}", "title": "" }, { "docid": "de0ffb2468ec63ce57e1b1fd5c52a9db", "score": "0.5722861", "text": "protected function initCriteria( \\Aimeos\\MW\\Criteria\\Iface $criteria, array $params )\n\t{\n\t\t$this->initCriteriaConditions( $criteria, $params );\n\t\t$this->initCriteriaSortations( $criteria, $params );\n\t\t$this->initCriteriaSlice( $criteria, $params );\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "030189f8b87978809ae251f65fb2527e", "score": "0.57184327", "text": "public function sortable()\n {\n $new = clone $this;\n $new->buildCallbacks[] = function(SearchCriteriaBuilder $builder) {\n $builder->addFilter(EavAttributeInterface::USED_FOR_SORT_BY, '1');\n };\n return $new;\n }", "title": "" }, { "docid": "8c124db6ebdcb1f9bc776734cc1f40ae", "score": "0.5705547", "text": "public function getSort();", "title": "" }, { "docid": "7b9b76f5d5cdd1ad9ea0ff8f1ae851fb", "score": "0.57051986", "text": "public function prep(){\n $sort_possible = array(\n 'trackid' => 1,\n 'lastchange' => 0,\n 'name' => 1,\n 'subject' => 1,\n 'status' => 1,\n 'lastreplier' => 1,\n 'priority' => 1,\n 'category' => 1,\n 'dt' => 0,\n 'id' => 1,\n );\n\n // These values should have collate appended in SQL\n $sort_collation = array(\n 'name',\n 'subject',\n );\n\n // DATE\n $sql = $this->sql;\n $sql .= \" AND DATE(`dt`) BETWEEN '\" . $this->helpbase->database->escape($this->date_from) . \"' AND '\" . $this->helpbase->database->escape($this->date_to) . \"' \";\n\n\n // Start the order by part of the SQL query\n $sql .= \" ORDER BY \";\n\n /* Sort by which field? */\n if (isset($_GET['sort']) && !is_array($_GET['sort']) && isset($sort_possible[$_GET['sort']])) {\n $sort = $this->helpbase->common->_input($_GET['sort']);\n\n $sql .= ' `' . $this->helpbase->database->escape($sort) . '` ';\n\n // Need to set MySQL collation?\n if (in_array($_GET['sort'], $sort_collation)) {\n $sql .= \" COLLATE '\" . $this->helpbase->database->escape($this->helpbase->collate) . \"' \";\n }\n } else {\n /* Default sorting by ticket status */\n $sql .= ' `id` ';\n $sort = 'id';\n }\n\n /* Ascending or Descending? */\n if (isset($_GET['asc']) && intval($_GET['asc']) == 0) {\n $sql .= ' DESC ';\n $asc = 0;\n $asc_rev = 1;\n\n $sort_possible[$sort] = 1;\n } else {\n $sql .= ' ASC ';\n $asc = 1;\n $asc_rev = 0;\n if (!isset($_GET['asc'])) {\n $is_default = 1;\n }\n\n $sort_possible[$sort] = 0;\n }\n\n $this->sql = $sql;\n\n $this->parent->sort = $sort;\n $this->parent->asc = $asc;\n \n # Uncomment for debugging purposes\n # echo \"SQL: $sql<br>\";\n \n }", "title": "" }, { "docid": "f4d326902f583c47538538210cbf365c", "score": "0.5685675", "text": "public function query() {\n $this->field_alias = $this->real_field;\n if (isset($this->definition['sort order'], $this->options['order'])) {\n $this->query->add_filter($this->definition['sort method'], $this->definition['sort order'] . $this->options['order']);\n }\n }", "title": "" }, { "docid": "2118951360fd060ff3d46563e19ad4d6", "score": "0.56765664", "text": "function set_ort ($new_ort){\n $this->ort = $new_ort;\n }", "title": "" }, { "docid": "a6d977fcccf3ea789f4b5936593d4c1e", "score": "0.5668799", "text": "protected function sortParam()\n {\n return 'sort';\n }", "title": "" }, { "docid": "1344e69435c7e041e65fa989f4dcd060", "score": "0.56634635", "text": "public function search()\n\t{\n\t\t\n\n\t\t$sort = new CSort();\n\t\t$sort->attributes = array(\n\t\t\t'defaultOrder'=>'p.PERS_IDENTIFICACION ASC',\n\t\t\t'PERS_IDENTIFICACION'=>array(\n\t\t\t\t'asc'=>'p.PERS_IDENTIFICACION',\n\t\t\t\t'desc'=>'p.PERS_IDENTIFICACION desc',\n\t\t\t),\n\t\t\t\n\t\t\t'PERS_NOMBRES'=>array(\n\t\t\t\t'asc'=>'p.PERS_NOMBRES',\n\t\t\t\t'desc'=>'p.PERS_NOMBRES desc',\n\t\t\t),\n\t\t\t\n\t\t\t'PERS_APELLIDOS'=>array(\n\t\t\t\t'asc'=>'p.PERS_APELLIDOS',\n\t\t\t\t'desc'=>'p.PERS_APELLIDOS desc',\n\t\t\t),\n\t\t\t\n\t\t\t'VEHI_NUMEROMOVIL'=>array(\n\t\t\t\t'asc'=>'VEHI_NUMEROMOVIL',\n\t\t\t\t'desc'=>'VEHI_NUMEROMOVIL desc',\n\t\t\t),\n\t\t\t\n\t\t\t'VEHI_MARCA'=>array(\n\t\t\t\t'asc'=>'VEHI_MARCA',\n\t\t\t\t'desc'=>'VEHI_MARCA desc',\n\t\t\t),\n\t\t\t\n\t\t\t'VEHI_MODELO'=>array(\n\t\t\t\t'asc'=>'VEHI_MODELO',\n\t\t\t\t'desc'=>'VEHI_MODELO desc',\n\t\t\t),\n\t\t\t\n\t\t\t'VEHI_PLACA'=>array(\n\t\t\t\t'asc'=>'VEHI_PLACA',\n\t\t\t\t'desc'=>'VEHI_PLACA desc',\n\t\t\t),\n\t\t\t\n\t\t\t'VEHI_CLASE'=>array(\n\t\t\t\t'asc'=>'VEHI_CLASE',\n\t\t\t\t'desc'=>'VEHI_CLASE desc',\n\t\t\t),\n\t\t\t\n\t\t\t'EMPR_ID'=>array(\n\t\t\t\t'asc'=>'EMPR_ID',\n\t\t\t\t'desc'=>'EMPR_ID desc',\n\t\t\t), \n\t\t);\n\t\t\n\t\t$criteria=new CDbCriteria;\n\t\t\n\t\t$criteria->select='t.*, p.*';\n\t\t$criteria->join ='\n\t\tINNER JOIN TBL_PERSONAS p ON p.PERS_ID = t.PERS_ID';\n\n\t\t$criteria->compare('VEHI_ID',$this->VEHI_ID);\n\t\t$criteria->compare('VEHI_NUMEROMOVIL',$this->VEHI_NUMEROMOVIL);\n\t\t$criteria->compare('VEHI_NUMLICENCIA',$this->VEHI_NUMLICENCIA);\n\t\t$criteria->compare('VEHI_FECHAEXPEDICION',$this->VEHI_FECHAEXPEDICION,true);\n\t\t$criteria->compare('VEHI_PLACA',$this->VEHI_PLACA,true);\n\t\t$criteria->compare('VEHI_MARCA',$this->VEHI_MARCA,true);\n\t\t$criteria->compare('VEHI_LINEACILINDRAJE',$this->VEHI_LINEACILINDRAJE,true);\n\t\t$criteria->compare('VEHI_MODELO',$this->VEHI_MODELO,true);\n\t\t$criteria->compare('VEHI_CLASE',$this->VEHI_CLASE,true);\n\t\t$criteria->compare('VEHI_COLOR',$this->VEHI_COLOR,true);\n\t\t$criteria->compare('VEHI_SERVICIO',$this->VEHI_SERVICIO,true);\n\t\t$criteria->compare('VEHI_CARROCERIATIPO',$this->VEHI_CARROCERIATIPO,true);\n\t\t$criteria->compare('VEHI_PUERTAS',$this->VEHI_PUERTAS,true);\n\t\t$criteria->compare('VEHI_NUMMOTOR',$this->VEHI_NUMMOTOR,true);\n\t\t$criteria->compare('VEHI_NUMSERIE',$this->VEHI_NUMSERIE,true);\n\t\t$criteria->compare('VEHI_NUMCHASIS',$this->VEHI_NUMCHASIS,true);\n\t\t$criteria->compare('PERS_ID',$this->PERS_ID);\n\t\t$criteria->compare('EMPR_ID',$this->EMPR_ID); \n\t\t\n\t\t$criteria->compare('p.PERS_IDENTIFICACION',$this->PERS_IDENTIFICACION, true);\n\t\t$criteria->compare('p.PERS_NOMBRES',$this->PERS_NOMBRES, true);\n\t\t$criteria->compare('p.PERS_APELLIDOS',$this->PERS_APELLIDOS, true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'sort'=>$sort,\n\t\t\t'pagination' => array('pageSize' => 30,),\n\t\t));\n\t}", "title": "" }, { "docid": "2820a6aa2a1b90695307a1454805763d", "score": "0.5661367", "text": "public function getSortStrategy();", "title": "" }, { "docid": "532d88408702eebeebc5a4dd1aeaff4b", "score": "0.56352115", "text": "protected function initCriteria( \\Aimeos\\MW\\Criteria\\Iface $criteria, array $msg ) : \\Aimeos\\MW\\Criteria\\Iface\n\t{\n\t\treturn $criteria->add( $criteria->parse( $msg['filter'] ?? [] ) )->order( $msg['sort'] ?? [] );\n\t}", "title": "" }, { "docid": "c3e86ba6e7303177e6e4bf825e24edfb", "score": "0.558158", "text": "public function orderBy(){\n $args = func_get_args();\n $field = 'id';\n $keyword = 'ASC';\n if (isset($args))\n {\n if (count($args) == 2) {\n $field = $args[0];\n $keyword = $args[1];\n }\n elseif(count($args) == 1) {\n $keyword = $args[0];\n }\n }\n $this->_options['orderBy'] = ['field' => $field, 'action' => $keyword];\n return $this;\n }", "title": "" }, { "docid": "7445495a73df3902ab10a9452ed64bae", "score": "0.5579586", "text": "public function init($module) {\n parent::init($module);\n $this->criteria->select = '*';\n // Add more criteria\n }", "title": "" }, { "docid": "772e472b25da5a213d553fead5f3657c", "score": "0.55722713", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\t\t$criteria->with = array(\"paciente\", \"estadoCita\", \"doctor\");\n\n\t\t$criteria->compare('t.fecha_cita',Funciones::invertirFecha($this->fecha_cita),true);\n\t\t$criteria->compare('t.doctor_id',$this->doctor_id, true);\n\t\t$criteria->compare('paciente.cedula_paciente',$this->cedulaPaciente,true);\n\t\t$criteria->compare('paciente.nombre_paciente',$this->nombrePaciente,true);\n\t\t$criteria->compare('paciente.apellido_paciente',$this->nombrePaciente,true, 'OR');\n\t\t$criteria->compare('CONCAT(paciente.nombre_paciente,\" \",paciente.apellido_paciente)',$this->nombrePaciente,true, 'OR');\n\t\t$criteria->compare('doctor.nombre_usuario',$this->nombreDoctor,true);\n\t\t$criteria->compare('doctor.apellido_usuario',$this->nombreDoctor,true, 'OR');\n\t\t$criteria->compare('estadoCita.descripcion_estado_cita',$this->descripcionEstadoCita,true);\n\t\t$criteria->compare('t.observacion_cita',$this->observacion_cita,true);\n\n\t\t$sort = new CSort();\n\t\t$sort->attributes = array(\n\n\t\t 'fecha_cita'=>array(\n\t\t 'asc'=>'t.fecha_cita',\n\t\t 'desc'=>'t.fecha_cita desc',\n\t\t ),\n\t\t 'doctor_id'=>array(\n\t\t 'asc'=>'t.doctor_id',\n\t\t 'desc'=>'t.doctor_id desc',\n\t\t ),\n\t\t 'cedulaPaciente'=>array(\n\t\t 'asc'=>'paciente.cedula_paciente',\n\t\t 'desc'=>'paciente.cedula_paciente desc',\n\t\t ),\n\t\t 'nombrePaciente'=>array(\n\t\t 'asc'=>'paciente.nombre_paciente',\n\t\t 'desc'=>'paciente.nombre_paciente desc',\n\t\t ),\n\t\t 'nombreDoctor'=>array(\n\t\t 'asc'=>'doctor.nombre_usuario',\n\t\t 'desc'=>'doctor.nombre_usuario desc',\n\t\t ),\n\t\t 'descripcionEstadoCita'=>array(\n\t\t 'asc'=>'estadoCita.descripcion_estado_cita',\n\t\t 'desc'=>'estadoCita.descripcion_estado_cita desc',\n\t\t ),\n\t\t 'observacion_cita'=>array(\n\t\t 'asc'=>'t.observacion_cita',\n\t\t 'desc'=>'t.observacion_cita desc',\n\t\t ),\n\t\t);\n\n\t\t$sort->defaultOrder = 't.fecha_cita DESC, t.doctor_id ASC, t.orden_cita ASC';\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'sort'=>$sort\n\t\t));\n\t}", "title": "" }, { "docid": "4ba9600db299a6c4f41ffea162b8f9ff", "score": "0.55704623", "text": "protected function defaultSort()\n {\n return collect($this->defaultSort)->map(function ($param) {\n $desc = ($param[0] === '-');\n $field = ltrim($param, '-');\n\n return new SortParameter($field, !$desc);\n })->all();\n }", "title": "" }, { "docid": "27b925587afe093e2c1121a9fa0d5cd8", "score": "0.5565647", "text": "public function __construct()\n {\n $this->_orderBy = FALSE;\n $this->_dir = FALSE;\n $this->_isDone = FALSE;\n }", "title": "" }, { "docid": "95109431cce045a24e048e1774412579", "score": "0.5556303", "text": "function set_query_order_by(){\n\t\t\t$order = FSInput::get('order');\n\t\t\t $query_ordering = '';\n\t\t\tif($order){\n\t\t\t\tswitch ($order){\n\t\t\t\t\tcase 'asc':\n\t\t\t\t\t\t$query_ordering='ORDER BY price '.$order;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'desc':\n\t\t\t\t\t\t$query_ordering='ORDER BY price '.$order;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'old':\n\t\t\t\t\t\t$query_ordering='ORDER BY status ASC';\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\tcase 'new':\n\t\t\t\t\t\t$query_ordering='ORDER BY status DESC';\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\tcase 'alpha':\n\t\t\t\t\t\t$query_ordering='ORDER BY name asc';\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\tcase 'promotion':\n\t\t\t\t\t\t$query_ordering='ORDER BY is_promotion asc';\n\t\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$query_ordering='ORDER BY title DESC, id DESC';\n\t\t\t}\n\t\t\t\n\t\t\treturn $query_ordering;\n\t\t}", "title": "" }, { "docid": "f772a96c5de6912ec7c5b0e1c07012d7", "score": "0.5544628", "text": "public function getSortParameter() : string\n {\n return \"order\";\n }", "title": "" }, { "docid": "afa039de57c86991becba0ef9711d758", "score": "0.55295026", "text": "function index__get_sort_name() {\n\t\t$sort_name = @$this->request->query['sort'];\n\t\t\n\t\t$sort_name_1 = @$this->request->query['sort_1'];\n\t\t$sort_name_2 = @$this->request->query['sort_2'];\n\n\t\t/*******************************\n\t\t\tbuild: sort conditions\n\t\t\tset: page variables\n\t\t*******************************/\n// \t\t$column_names = [\"id\", \"name\", \"genre_id\"];\n\t\t// \t\t$column_names = [\"id\", \"name\", \"genre\"];\n\t\t\n\t\t// validate\n\t\tif ($sort_name == NULL || $sort_name == \"\") {\n// \t\tif ($sort_name == NULL) {\n\t\t\n\t\t\tdebug(\"sort --> NULL or blank\");\n// \t\t\tdebug(\"sort --> NULL; set to default of 'id'\");\n\t\t\t\t\n\t\t\tif (isset($sort_name_1) && isset($sort_name_2)) {\n\n\t\t\t\t$order_ary = array(\n\t\t\n\t\t\t\t\t\t//ref global var http://stackoverflow.com/questions/12638962/global-variable-in-controller-cakephp-2\n\t\t\t\t\t\t\"Category.\".$this->column_names[$sort_name_1] => 'asc'\n\t\t\t\t\t\t, \"Category.\".$this->column_names[$sort_name_2] => 'asc'\n// \t\t\t\t\t\t\"Category.$sort_name_1\" => 'asc'\n// \t\t\t\t\t\t, \"Category.$sort_name_2\" => 'asc'\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t, \"Category.id\" => 'asc'\n\t\t\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t// set page variables\n\t\t\t\t$this->set(\"sort_name_1\", $sort_name_1);\n\t\t\t\t$this->set(\"sort_name_2\", $sort_name_2);\n\t\t\t\t\n// \t\t\t\tdebug(\"\\$this->column_names[\\$sort_name_1] => \".$this->column_names[$sort_name_1] );\n\t\t\t\t\n// \t\t\t\tdebug($order_ary);\n\t\t\t\t\n\t\t\t\n\t\t\t} else {\n\t\t\t\n\t\t\t\tdebug(\"sort --> not set; set to default of 'id'\");\n\t\t\t\t\n\t\t\t\t$order_ary = array(\n\t\t\t\t\n\t\t\t\t\t\t\"Category.id\" => 'asc'\n// \t\t\t\t\t\t, \"Category.$sort_2\" => 'asc'\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t, \"Category.id\" => 'asc'\n\t\t\t\t\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t// set page variables\n\t\t\t\t$this->set(\"sort\", \"id\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t}//if (isset($sort_name_1) && isset($sort_name_2))\n\t\t\t\n\t\t\t//ref in_array() http://php.net/manual/ja/function.in-array.php\n\t\t} else if (!in_array($sort_name, $this->column_names)) {\n// \t\t} else if (!in_array($sort_name, $column_names)) {\n\n\t\t\tdebug(\"sort --> unknown name: $sort_name; set to default of 'id'\");\n\t\t\t\t\n// \t\t\t$sort_name = \"id\";\n\t\t\t$order_ary = array(\n\t\t\t\n\t\t\t\t\t\"Category.id\" => 'asc'\n\t\t\t\t\t// \t\t\t\t\t\t, \"Category.$sort_2\" => 'asc'\n\t\t\t\t\t// \t\t\t\t\t\t\t\t, \"Category.id\" => 'asc'\n\t\t\t\n\t\t\t);\n\t\t\t\t\n\t\t\t// set page variables\n\t\t\t$this->set(\"sort\", \"id\");\n\t\t\t\t\n\t\t} else if (in_array($sort_name, $this->column_names)) {\n\t\t\t\n\t\t\tdebug(\"sort name given --> $sort_name\");\n\t\t\t\n\t\t\t$order_ary = array(\n\t\t\t\t\t\t\n\t\t\t\t\t\"Category.$sort_name\" => 'asc'\n\t\t\t\t\t// \t\t\t\t\t\t, \"Category.$sort_2\" => 'asc'\n\t\t\t\t\t// \t\t\t\t\t\t\t\t, \"Category.id\" => 'asc'\n\t\t\t\t\t\t\n\t\t\t);\n\t\t\t\n\t\t\t// set page variables\n\t\t\t$this->set(\"sort\", $sort_name);\n\t\t\t\t\n\t\t} else {//if ($sort_name == NULL)\n\t\t\t\n\t\t\tdebug(\"sort --> unknown value: $sort_name; set to default of 'id'\");\n\t\t\t\n// \t\t\t$sort_name = \"id\";\n\t\t\t$order_ary = array(\n\t\t\t\n\t\t\t\t\t\"Category.id\" => 'asc'\n\t\t\t\t\t// \t\t\t\t\t\t, \"Category.$sort_2\" => 'asc'\n\t\t\t\t\t// \t\t\t\t\t\t\t\t, \"Category.id\" => 'asc'\n\t\t\t\n\t\t\t);\n\n\t\t\t// set page variables\n\t\t\t$this->set(\"sort\", \"id\");\n\t\t\t\t\n\t\t}//if ($sort_name == NULL)\n\n\t\t/*******************************\n\t\t\tset: page var: list of sort names\n\t\t*******************************/\n\t\t$this->set(\"column_names\", $this->column_names);\n\t\t\n\t\t\n\t\t/*******************************\n\t\t\tbuild: condition\n\t\t*******************************/\n\t\t$condition = array(\n\t\t\t\t//REF http://book.cakephp.org/2.0/ja/models/retrieving-your-data.html \"$params はいろいろな種類のfindへのパラメータを渡すために使われます\"\n\t\t\t\t'order'\t=> $order_ary\n// \t\t\t\t'order'\t=> array(\n\t\t\n// \t\t\t\t\t\t\"Category.$sort_name\" => 'asc'\n// \t\t\t\t\t\t, \"Category.name\" => 'asc'\n// \t\t\t\t\t\t// \t\t\t\t\t\t\t\t, \"Category.id\" => 'asc'\n\t\t\n// \t\t\t\t)\n\t\t\t\t// \t\t\t\t'order'\t=> array('Category.id' => 'asc')\n\t\t\t\t\t\n\t\t);\n\t\t\n\t\t// return\n\t\treturn $condition;\n// \t\treturn $sort_name;\n\t\t\n\t}", "title": "" }, { "docid": "070a54523d43da9196b54c8d785395f6", "score": "0.5525418", "text": "function make_comparer() {\n\t// Normalize criteria up front so that the comparer finds everything tidy\n\t$criteria = func_get_args();\n\tforeach ($criteria as $index => $criterion) {\n\t$criteria[$index] = is_array($criterion)\n\t? array_pad($criterion, 3, null)\n\t: array($criterion, SORT_ASC, null);\n\t}\n\n\treturn function($first, $second) use ($criteria) {\n\tforeach ($criteria as $criterion) {\n\t// How will we compare this round?\n\tlist($column, $sortOrder, $projection) = $criterion;\n\t$sortOrder = $sortOrder === SORT_DESC ? -1 : 1;\n\n\t// If a projection was defined project the values now\n\tif ($projection) {\n\t$lhs = call_user_func($projection, $first[$column]);\n\t$rhs = call_user_func($projection, $second[$column]);\n\t}\n\telse {\n\t$lhs = $first[$column];\n\t$rhs = $second[$column];\n\t}\n\n\t// Do the actual comparison; do not return if equal\n\tif ($lhs < $rhs) {\n\treturn -1 * $sortOrder;\n\t}\n\telse if ($lhs > $rhs) {\n\treturn 1 * $sortOrder;\n\t}\n\t}\n\n\treturn 0; // tiebreakers exhausted, so $first == $second\n\t};\n}", "title": "" }, { "docid": "b47d83b82da8ca2026ee204211b255d0", "score": "0.5512502", "text": "protected function _where_init($param){\n\t\tif (!isset($this->wheres[$param])){\n\t\t\t$this->wheres[$param] = array();\n\t\t}\n\t}", "title": "" }, { "docid": "78674fe7fc6811271e373b35e4896f29", "score": "0.550268", "text": "public function initOrders()\n\t{\n\t\t$this->collOrders = array();\n\t}", "title": "" }, { "docid": "b6fe45ea2ac7282fc21a372738e4050f", "score": "0.5501392", "text": "function _calculate_sort_by()\n {\n if ($this->table_columns == '') return;\n\n $sort_options = array();\n $i = 0;\n foreach($this->table_columns as $column)\n {\n //set up the first column incase a default sort has not been specified\n if ($i == 0 && isset($column['database']))\n {\n $first_column = $column['database'];\n }\n\n //create an array of all columns that could possibly be sortable\n if (isset($column['sortable']) && $column['sortable'] == TRUE)\n {\n $sort_options[] = $column['database'];\n }\n \n //check if a default sort has been created\n if (isset($column['default_sort']))\n {\n $default_sort = $column['database'];\n }\n $i++;\n }\n $sort_by = $this->CI->uri->segment($this->sort_by_segment);\n\n //if the uri segement valid, then use it\n if (in_array($sort_by, $sort_options))\n {\n return $sort_by;\n }\n\n //if the default sort is valid, then use it\n else if (isset($default_sort) && in_array($default_sort, $sort_options))\n {\n return $default_sort;\n }\n\n //last resort, just use the first column\n else\n {\n return $first_column;\n }\n }", "title": "" }, { "docid": "fd36fa9a552e7f427749d0b80fc68972", "score": "0.5494439", "text": "public function search()\n\t{\n\n\t\t$sort = new CSort();\n\t\t$sort->defaultOrder = 'c.CONT_NUMORDEN DESC';\n\t\t$sort->attributes = array(\t\t\t\n\t\t\t'COAD_NUMADICIONAL'=>array(\n\t\t\t\t'asc'=>'t.COAD_NUMADICIONAL',\n\t\t\t\t'desc'=>'t.COAD_NUMADICIONAL desc',\n\t\t\t),\n\t\t\t\n\t\t\t'CONT_NUMORDEN'=>array(\n\t\t\t\t'asc'=>'c.CONT_NUMORDEN',\n\t\t\t\t'desc'=>'c.CONT_NUMORDEN desc',\n\t\t\t),\n\t\t\t'PERS_ID'=>array(\n\t\t\t\t'asc'=>'p.PERS_ID',\n\t\t\t\t'desc'=>'p.PERS_ID desc',\n\t\t\t),\n\t\t\t'COAD_MESES'=>array(\n\t\t\t\t'asc'=>'t.COAD_MESES',\n\t\t\t\t'desc'=>'t.COAD_MESES desc',\n\t\t\t),\n\t\t\t'COAD_DIAS'=>array(\n\t\t\t\t'asc'=>'t.COAD_DIAS',\n\t\t\t\t'desc'=>'t.COAD_DIAS desc',\n\t\t\t),\n\t\t\t'COAD_VALOR'=>array(\n\t\t\t\t'asc'=>'t.COAD_VALOR',\n\t\t\t\t'desc'=>'t.COAD_VALOR desc',\n\t\t\t),\n\t\t\t'COAD_FECHAELABORACION'=>array(\n\t\t\t\t'asc'=>'t.COAD_FECHAELABORACION',\n\t\t\t\t'desc'=>'t.COAD_FECHAELABORACION desc',\n\t\t\t),\n\t\t\t'DEPE_ID'=>array(\n\t\t\t\t'asc'=>'d.DEPE_ID',\n\t\t\t\t'desc'=>'d.DEPE_ID desc',\n\t\t\t),\n\t\t\t'CONT_ANIO'=>array(\n\t\t\t\t'asc'=>'c.CONT_ANIO',\n\t\t\t\t'desc'=>'c.CONT_ANIO desc',\n\t\t\t),\n\t\t);\n\t\t\n\t\t$criteria=new CDbCriteria;\n\t\t$criteria->select='t.*, c.*, oc.*, d.*, p.*';\n\t\t\n\t\t$criteria->join ='\n\t\tINNER JOIN TBL_CONTRATOS c ON c.CONT_ID = t.CONT_ID\n\t\tINNER JOIN TBL_PERSONAS p ON p.PERS_ID = c.PERS_ID\n\t\tINNER JOIN TBL_OPSCONTRATOS oc ON oc.CONT_ID = c.CONT_ID\t\t\n\t\tINNER JOIN TBL_DEPENDENCIAS d ON d.DEPE_ID = oc.DEPE_ID \n\t\tINNER JOIN TBL_ANIOSACADEMICOS aa ON aa.ANAC_ID = oc.ANAC_ID AND aa.ANAC_ESTADO = 0';\n\n\t\t$criteria->compare('COAD_ID',$this->COAD_ID);\n\t\t$criteria->compare('COAD_NUMADICIONAL',$this->COAD_NUMADICIONAL,true);\n\t\t$criteria->compare('COAD_MESES',$this->COAD_MESES);\n\t\t$criteria->compare('COAD_DIAS',$this->COAD_DIAS);\n\t\t$criteria->compare('COAD_VALOR',$this->COAD_VALOR);\n\t\t$criteria->compare('COAD_FECHAPROCESO',$this->COAD_FECHAPROCESO,true);\n\t\t$criteria->compare('COAD_FECHAELABORACION',$this->COAD_FECHAELABORACION,true);\n\t\t$criteria->compare('PECO_ID',$this->PECO_ID);\n\t\t$criteria->compare('TIAD_ID',$this->TIAD_ID);\n\t\t$criteria->compare('CONT_ID',$this->CONT_ID);\n\t\t$criteria->compare('ADPR_ID',$this->ADPR_ID);\n\t\t\n\t\t$criteria->compare('d.DEPE_ID',$this->DEPE_ID);\n\t\t$criteria->compare('p.PERS_ID',$this->PERS_ID);\n\t\t$criteria->compare('c.CONT_NUMORDEN',$this->CONT_NUMORDEN);\n\t\t$criteria->compare('c.CONT_ANIO',$this->CONT_ANIO);\n\t\t\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'sort'=>$sort,\n\t\t\t'pagination' => array('pageSize' => 30,),\n\t\t));\n\t}", "title": "" }, { "docid": "8b31be54d184f04510c3ff59547a81cc", "score": "0.54760224", "text": "public function testSort() {\n $fixtureSortCriteria = [\n 'id' => 'asc',\n 'date' => 'desc'\n ];\n $this->assertSame($this->instance, $this->instance->sort($fixtureSortCriteria));\n $this->assertSame($fixtureSortCriteria, $this->instance->getSort());\n }", "title": "" }, { "docid": "fdd62e6aa4f32b0acae81b0342f48908", "score": "0.5475938", "text": "private function orderResults()\n {\n if ($this->drivers->session->has('michaeljennings.carpenter.'.$this->key.'.sort')) {\n $this->sortBy = $this->drivers->session->get('michaeljennings.carpenter.'.$this->key.'.sort');\n if ($this->drivers->session->has('michaeljennings.carpenter.'.$this->key.'.dir')) {\n $this->sortDir = 'desc';\n }\n }\n\n if (isset($this->sortBy)) {\n // Remove any orders from the query and order by the selected\n // column\n $this->drivers->db->refreshOrderBy();\n if (isset($this->sortDir)) {\n $this->drivers->db->orderBy($this->sortBy, $this->sortDir);\n } else {\n $this->drivers->db->orderBy($this->sortBy, 'asc');\n }\n }\n }", "title": "" }, { "docid": "e6ec6068d5836c2f5836813c362a9719", "score": "0.5475388", "text": "public function setSortations( array $sortations )\n\t{\n\t\t\\Aimeos\\MW\\Common\\Base::checkClassList( '\\\\Aimeos\\\\MW\\\\Criteria\\\\Expression\\\\Sort\\\\Iface', $sortations );\n\n\t\t$this->sortations = $sortations;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "eaab4283722262b4c4c51cf435927e3c", "score": "0.5468466", "text": "public function beforeFindOneBy(array &$criteria, array &$orderBy): void\n {\n }", "title": "" }, { "docid": "8c177395475d5aa43aec6928d58c8c7e", "score": "0.5468131", "text": "function _buildQueryOrderBy()\n {\n global $mainframe, $option;\n // Array of allowable order fields\n $orders = array('nome', 'codice', 'category',\n 'published', 'ordering', 'id');\n\n // Get the order field and direction, default order field\n // is 'ordering', default direction is ascending\n $filter_order = $mainframe->getUserStateFromRequest(\n $option.'filter_order', 'filter_order', 'ordering');\n $filter_order_Dir = strtoupper(\n $mainframe->getUserStateFromRequest(\n $option.'filter_order_Dir', 'filter_order_Dir', 'ASC'));\n\n // Validate the order direction, must be ASC or DESC\n if ($filter_order_Dir != 'ASC' && $filter_order_Dir != 'DESC')\n {\n $filter_order_Dir = 'ASC';\n }\n\n // If order column is unknown use the default\n if (!in_array($filter_order, $orders))\n {\n $filter_order = 'ordering';\n }\n $orderby = ' ORDER BY '.$filter_order.' '.$filter_order_Dir;\n if ($filter_order != 'ordering')\n {\n $orderby .= ' , ordering ';\n }\n // Return the ORDER BY clause\n\n return $orderby;\n }", "title": "" }, { "docid": "07912283bb72f7a6cbe57668dc5be886", "score": "0.5450269", "text": "public function newSortQuery()\n {\n $query = $this->newQuery();\n foreach ($this->getSortScope() as $scopeAttribute) {\n if ($scopeValue = object_get($this, $scopeAttribute)) {\n $query->where($scopeAttribute, $scopeValue);\n continue;\n }\n $query->whereNull($scopeAttribute);\n }\n return $query;\n }", "title": "" }, { "docid": "334f4867f2a35c8929fda7cfd53e00a0", "score": "0.5435437", "text": "function make_comparer() {\n\t// Normalize criteria up front so that the comparer finds everything tidy\n\t$criteria = func_get_args();\n\tforeach ($criteria as $index => $criterion) {\n\t\t$criteria[$index] = is_array($criterion)\n\t\t\t? array_pad($criterion, 3, null)\n\t\t\t: array($criterion, SORT_ASC, null);\n\t}\n\treturn function($first, $second) use (&$criteria) {\n\tforeach ($criteria as $criterion) {\n\t\t// How will we compare this round?\n\t\tlist($column, $sortOrder, $projection) = $criterion;\n\t\t$sortOrder = $sortOrder === SORT_DESC ? -1 : 1;\n\t\t// If a projection was defined project the values now\n\t\tif ($projection) {\n\t\t\t$lhs = call_user_func($projection, $first[$column]);\n\t\t\t$rhs = call_user_func($projection, $second[$column]);\n\t\t}\n\t\telse {\n\t\t\t$lhs = $first[$column];\n\t\t\t$rhs = $second[$column];\n\t\t}\n\t\t// Do the actual comparison; do not return if equal\n\t\tif ($lhs < $rhs) {\n\t\t\treturn -1 * $sortOrder;\n\t\t}\n\t\telse if ($lhs > $rhs) {\n\t\t\treturn 1 * $sortOrder;\n\t\t}\n\t}\n\treturn 0; // tiebreakers exhausted, so $first == $second\n\t};\n}", "title": "" }, { "docid": "b6eade1f3815729cfaf5863bacbf040f", "score": "0.5433331", "text": "public static function sortParams() : array;", "title": "" }, { "docid": "de3dcf111ec2a4926b4a2cb32ebccc1b", "score": "0.5411667", "text": "function set_sorting($choice)\r\n{\r\n\tglobal $sorting;\r\n\t$sorting = $choice;\r\n}", "title": "" }, { "docid": "bba44b3bcbdff63f4ae26cbfee195800", "score": "0.54019755", "text": "public function sortedByPosition()\n {\n $new = clone $this;\n $new->buildCallbacks[] = function(SearchCriteriaBuilder $builder) {\n $builder->addSortOrder(new SortOrder([\n SortOrder::FIELD => EavAttributeInterface::POSITION,\n SortOrder::DIRECTION => SortOrder::SORT_ASC\n ]));\n };\n return $new;\n }", "title": "" }, { "docid": "bdd5e7efb128e1703c8be83839c0ab40", "score": "0.54013646", "text": "public function setSortingMode($value);", "title": "" }, { "docid": "aaee8ae701dca9ee3ef53a1733b17179", "score": "0.53981876", "text": "function createComparator($sortSpec) {\n\t//Function to construct the class that handles chained comparisons.\n\t$comparator = new CompoundComparator();\n\t$size = count($sortSpec);\n\tfor ($i = 0; $i < $size; $i++) {\n\t\t$sort = $sortSpec[$i];\n\t\t$desc = false;\n\t\tif (property_exists($sort, \"descending\")) {\n\t\t\t$desc = $sort->descending;\n\t\t}\n\t\t$fileComp = new FieldComparator($sort->attribute, $desc);\n\t\t$comparator->addComparator($fileComp);\n\t}\n\treturn $comparator;\n}", "title": "" }, { "docid": "aa81cc3e967cf98e5eb3779dcf9d1b70", "score": "0.5395724", "text": "public function getMultipleSorting();", "title": "" }, { "docid": "6224de2c168702ee55d3624ad3da050f", "score": "0.5390584", "text": "public function order_by()\n\t\t{\n\n\t\t\t// To use the modifiers, we have to create a fake resource\n\t\t\t// so that we can return it and use it to link methods.\n\t\t\tif ( !self::$resource )\n\t\t\t\tself::$resource = new Legato_Resource();\n\n\t\t\t// Carry over the sub resources info, or cancel it out.\n\t\t\tif ( $this && $this->_sub_resource_info )\n\t\t\t{\n\t\t\t\tself::$resource->name = $this->name;\n\t\t\t\tself::$resource->_sub_resource_info = $this->_sub_resource_info;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tself::$resource->name = 'Legato_Resource';\n\t\t\t\tself::$resource->_sub_resource_info = NULL;\n\t\t\t}\n\n\t\t\t$args = func_get_args();\n\n\t\t\tif ( is_array( $args[0] ) )\n\t\t\t{\n\n\t\t\t\t// Loop through each order by clause passed in.\n\t\t\t\tforeach ( $args as $order_options )\n\t\t\t\t{\n\n\t\t\t\t\t// Store.\n\t\t\t\t\tif ( !$order_options[1] ) $order_options[1] = 'asc';\n\t\t\t\t\tself::$modifiers['order_by'][] = $order_options;\n\n\t\t\t\t} // Next order by.\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t// Store.\n\t\t\t\tif ( !$args[1] ) $args[1] = 'asc';\n\t\t\t\tself::$modifiers['order_by'][] = $args;\n\n\t\t\t}\n\n\t\t\t// Return the fake resource.\n\t\t\treturn self::$resource;\n\n\t\t}", "title": "" }, { "docid": "195e8c066bfaa318bcba90d8b9b8667f", "score": "0.5374338", "text": "function LoadSortOrder() {\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($this->getSqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $this->getSqlOrderBy();\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->Urutan->setSort(\"ASC\");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b2babf8dcff160e498d4bdb4a52daef4", "score": "0.53649265", "text": "private function buildSortParams(array $params): self\n {\n if (isset($params['sort'])) {\n $this->params['sort'] = \\explode(',', $params['sort']);\n }\n\n return $this;\n }", "title": "" }, { "docid": "e508fc70453b7302375bfd5cb8ad4867", "score": "0.53535646", "text": "function init($conds = null,$ModelClass = '',$prefix = array(),$sort_filter = null,$model_recursive= 0)\r\n {\r\n $strpos=false;\r\n if(defined('CAKE_ADMIN')){\r\n $strpos = strpos($this->controller->action,CAKE_ADMIN.'_');\r\n }\r\n if($strpos === false)\r\n {\r\n $function = $this->controller->action;\r\n $paging['admin_route'] = false;\r\n }\r\n else\r\n {\r\n $function = substr($this->controller->action,strlen(CAKE_ADMIN.'_'));\r\n $paging['admin_route'] = true;\r\n //die(pr($function));\r\n\r\n }\r\n\r\n if(!empty($this->controller->params['pass']))\r\n {\r\n $function .= '/'.implode('/',$this->controller->params['pass']);\r\n }\r\n //die(pr(CAKE_ADMIN));\r\n // oth\r\n $str_prefix = '';\r\n if(is_array($prefix))\r\n {\r\n if(!empty($prefix))\r\n {\r\n for($i = 0, $c = count($prefix); $i < $c; $i++)\r\n {\r\n $str_prefix .= $prefix[$i].'='.$this->controller->params['url'][$prefix[$i]].'&';\r\n }\r\n }\r\n }\r\n\r\n $info = $this->controller->$ModelClass->loadInfo();\r\n //die(pr($info));\r\n if(is_array($sort_filter) && !empty($sort_filter))\r\n {\r\n foreach($info->value as $inf)\r\n {\r\n if(array_key_exists($inf['name'],$sort_filter))\r\n {\r\n $sort_fields[$inf['name']] = $sort_filter[$inf['name']];\r\n }\r\n elseif(in_array($inf['name'],$sort_filter))\r\n {\r\n $sort_fields[$inf['name']] = $inf['name'];\r\n }\r\n }\r\n }\r\n else\r\n {\r\n foreach($info->value as $inf)\r\n {\r\n $sort_fields[$inf['name']] = $inf['name'];\r\n }\r\n }\r\n\r\n $this->_restoreState();\r\n if (isset($_GET['show'])) {\r\n $this->show = (int) $_GET['show'];\r\n }\r\n if (isset($_GET['page'])) {\r\n $this->page = (int) $_GET['page'];\r\n }\r\n if (isset($_GET['sort']) && isset($sort_fields[$_GET['sort']])) {\r\n $this->sortBy = $_GET['sort'];\r\n }\r\n if (isset($_GET['direction']) && in_array($_GET['direction'], array('asc', 'desc'))) {\r\n $this->direction = $_GET['direction'];\r\n }\r\n\r\n if($ModelClass == '') $ModelClass = $this->controller->modelClass;\r\n $this->order = $ModelClass.\".\".$this->sortBy.' '.strtoupper($this->direction);\r\n\r\n $count = $this->controller->$ModelClass->findCount($conds,$model_recursive);\r\n $this->count = $count;\r\n $this->trimResultsPerPage($count);\r\n $this->checkPage($count);\r\n\r\n $paging['style'] = $this->style;\r\n if ($this->style==\"ajax\") {\r\n $paging['link'] = '/bare/'.$this->controller->name.\"/\";\r\n } else {\r\n $paging['link'] = \"\";\r\n }\r\n\r\n $paging['controller'] = Inflector::underscore($this->controller->name); // oth\r\n $paging['base'] = $function; // oth\r\n\r\n // oth\r\n if(!$paging['admin_route'])\r\n {\r\n\r\n $paging['link'] .=\r\n '/'.$paging['controller'].'/'.$function.\r\n '/?'.$str_prefix.'show='.$this->show.\r\n '&sort='.$this->sortBy.'&direction='.$this->direction.'&page=';\r\n\r\n }\r\n else\r\n {\r\n\r\n $paging['link'] .=\r\n '/'.CAKE_ADMIN.'/'.$paging['controller'].'/'.\r\n $function.'/?'.$str_prefix.'show='.$this->show.\r\n '&sort='.$this->sortBy.'&direction='.$this->direction.'&page=';\r\n\r\n }\r\n\r\n $paging['sort'] = $this->sortBy;\r\n $paging['sort_fields'] = $sort_fields;\r\n $paging['count'] = $count;\r\n $paging['page'] = $this->page;\r\n $paging['limit'] = $this->show;\r\n $paging['show'] = $this->resultsPerPage;\r\n\r\n $this->controller->set('paging',$paging);\r\n $this->_saveState();\r\n }", "title": "" }, { "docid": "9b050ea74977dbfbbe5f768f799335f6", "score": "0.53366613", "text": "public function prepareClauses()\n {\n $this->makeWhereArray();\n\n if ($this->params['limit']) {\n $this->limit = $this->params['limit'];\n }\n\n if ($this->params['order_by']) {\n $this->order_by = $this->params['order_by'];\n }\n\n if ($this->params['offset']) {\n $this->offset = $this->params['offset'];\n }\n\n return $this;\n }", "title": "" }, { "docid": "21762d9012b9e3fbbdb839baf59f2ead", "score": "0.53305995", "text": "public function order_by($criteria, $order = 'ASC')\n {\n if(is_array($criteria))\n {\n foreach ($criteria as $key=>$value)\n {\n $this->_database->order_by($key, $value);\n }\n }\n else\n {\n $this->_database->order_by($criteria, $order);\n }\n return $this;\n }", "title": "" }, { "docid": "053c1a8c3285435e389cbf12b967df8a", "score": "0.5329204", "text": "public function init()\n {\n\n // initialize the prepared statements\n $this->addFinder($this->finderFactory->createFinder($this, SqlStatementKeys::PRODUCT_DECIMALS));\n $this->addFinder($this->finderFactory->createFinder($this, SqlStatementKeys::PRODUCT_DECIMALS_BY_PK_AND_STORE_ID));\n }", "title": "" }, { "docid": "abd315c3eedc7f92b050fe8b2d839540", "score": "0.53275764", "text": "function __construct(){\n parent::__construct();\n $this->my_table='user';\n $this->my_column_order=array('userid', 'firstname', 'lastname', 'username', 'passwordhash', 'gender', 'email', 'role', 'phone', 'address', 'status');\n $this->my_column_search=array('firstname','lastname','username','gender','email','phone');\n $this->my_order=array('firstname'=>'asc');\n }", "title": "" }, { "docid": "dad53121701d19d7be95a3342c6431d8", "score": "0.53261375", "text": "public function setConditions( \\Aimeos\\MW\\Criteria\\Expression\\Iface $conditions )\n\t{\n\t\tif( $conditions instanceof \\Aimeos\\MW\\Criteria\\Expression\\Sort\\Iface ) {\n\t\t\tthrow new \\Aimeos\\MW\\Common\\Exception( 'Sortation objects are not allowed' );\n\t\t}\n\n\t\t$this->conditions = $conditions;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "f95d0263c46fbf6e7e0a70acc005c161", "score": "0.5300421", "text": "function __construct()\n\t{\n\t\t// No sorting is required for size one itemsets, denoted by second argument.\n\t\t$this->alphabet = [];\n\t\t$this->threshold = 2;\n\t\t$this->database = null;\n\t\t$this->results = [];\n\t\t$this->candidate = [];\n\t\t\n\t}", "title": "" }, { "docid": "7309b7816c9e7c41e1bc61d44026ad02", "score": "0.5298842", "text": "public function sorting()\n {\n return $this->criteria->sorting();\n }", "title": "" }, { "docid": "5cf9e9c9d06d702f5ab4f58fbeeb8fe2", "score": "0.5271161", "text": "public function __construct()\n {\n $this->conditionsList = [];\n $this->key = null;\n }", "title": "" }, { "docid": "f5d4e8fed034d0a3d969cb7a3c6ecdfd", "score": "0.5268638", "text": "protected function addSort() {\n // TODO.\n return $this;\n }", "title": "" }, { "docid": "2d52e133de55e85d62dba57b7fefc5b2", "score": "0.52674896", "text": "private function _whereInit($param)\n {\n if ( ! isset($this->wheres[$param]))\n {\n $this->wheres[ $param ] = array();\n }\n }", "title": "" }, { "docid": "9d77c71dfd778fb2aaa81643b49ba5e5", "score": "0.52633137", "text": "public function init ()\r\n\t{\r\n\t\t// or can use this to set default valuse\r\n\t\t$this->fields = kArray::makeAssociativeDefaultValue ( array (\r\n\t\t\t'_eq_id',\r\n\t\t\t'_in_id',\r\n\t\t\t'_eq_parent_id',\r\n\t\t\t'_in_parent_id',\r\n\t\t\t'_eq_full_name',\r\n\t\t\t'_likex_full_name',\r\n\t\t\t'_in_full_name',\r\n\t\t\t'_eq_depth',\r\n\t\t\t'_gte_created_at',\r\n\t\t\t'_lte_created_at',\r\n\t\t\t'_free_text',\r\n\t\t\t'_likex_name_or_reference_id',\r\n\t\t\t'_in_members',\r\n\t\t\t'_gte_updated_at',\r\n\t\t\t'_lte_updated_at',\r\n\t\t\t'_like_tags',\r\n\t\t\t'_mlikeor_tags',\r\n\t\t\t'_mlikeand_tags',\r\n\t\t\t'_eq_display_in_search',\r\n\t\t\t'_eq_privacy',\r\n\t\t\t'_in_privacy',\r\n\t\t\t'_eq_inheritance_type',\r\n\t\t\t'_in_inheritance_type',\r\n\t\t\t'_eq_status',\r\n\t\t\t'_in_status',\r\n\t\t\t'_gte_partner_sort_value',\r\n\t\t\t'_lte_partner_sort_value',\r\n\t\t\t'_eq_full_ids',\r\n\t\t\t'_likex_full_ids',\r\n\t\t\t'_eq_inherited_parent_id',\r\n\t\t\t'_eq_privacy_context',\r\n\t\t\t'_eq_manager',\r\n\t\t\t'_eq_member',\r\n\t\t\t'_gte_members_count',\r\n\t\t\t'_lte_members_count',\r\n\t\t\t'_gte_pending_members_count',\r\n\t\t\t'_lte_pending_members_count',\r\n\t\t '_eq_reference_id',\r\n\t\t\t'_eq_contribution_policy',\t\t\r\n\t\t\t'_matchor_full_name',\r\n\t\t\t'_matchor_likex_full_name',\r\n\t\t\t'_matchor_full_ids',\r\n\t\t\t'_like_full_name',\r\n\t\t\t'_matchor_privacy_context',\r\n\t\t\t'_in_ancestor_id',\r\n\t\t '_eq_name',\r\n\t\t\t) , NULL );\r\n\r\n\t\t$this->allowed_order_fields = array (\r\n\t\t\t'created_at', \r\n\t\t\t'updated_at', \r\n\t\t\t'depth', \r\n\t\t\t'partner_sort_value', \r\n\t\t\t'entries_count', \r\n\t\t\t'members_count', \r\n\t\t\t'direct_entries_count', \r\n\t\t\t'direct_sub_categories_count', \r\n\t\t\t'name',\r\n\t\t\t'full_name',\r\n\t\t);\r\n\r\n\t\t$this->aliases = array ( \r\n\t\t\t'owner' => 'kuser_id'\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "850286ca52cd62f907e9bdace9946eb4", "score": "0.524513", "text": "function SetSortMode ( $mode, $sortby=\"\" )\n\t{\n\t\tassert (\n\t\t\t$mode==SPH_SORT_RELEVANCE ||\n\t\t\t$mode==SPH_SORT_ATTR_DESC ||\n\t\t\t$mode==SPH_SORT_ATTR_ASC ||\n\t\t\t$mode==SPH_SORT_TIME_SEGMENTS ||\n\t\t\t$mode==SPH_SORT_EXTENDED );\n\t\tassert ( is_string($sortby) );\n\t\tassert ( $mode==SPH_SORT_RELEVANCE || strlen($sortby)>0 );\n\n\t\t$this->_sort = $mode;\n\t\t$this->_sortby = $sortby;\n\t}", "title": "" }, { "docid": "f7669dff86f55bd2f49ad07e3dd2f25b", "score": "0.5239335", "text": "public function makeDbCriteria() {\n\t\t$criteria = parent::makeDbCriteria();\n\t\t$criteria->compare('id',$this->id,true);\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "a2ee794a2d46ac23300fcdddb71aa22f", "score": "0.52353126", "text": "private function prepare_orderBy() {\n\t\t$parts = array();\t\n\t\tforeach ($this->parts_orderBy as $item_orderBy) {\n\t\t\t$parts[] = $item_orderBy['SQL_orderBy'];\n\t\t}\n\t\t$this->query['ORDERBY'] = implode(', ', $parts);\n\t}", "title": "" }, { "docid": "1469caa083471dbf3d5de7d257223599", "score": "0.5230174", "text": "public function getCriteria();", "title": "" }, { "docid": "d500400abf6331170191771e2b3b724b", "score": "0.52296156", "text": "protected static function init()\n\t{\n\t\t//Might be useful to make sure the list doesn't display anything if a filter isn't set\n\t\tsetFilterConditions(array(array('name'=>'id','op'=>'=','value'=>'na')));\n\t}", "title": "" }, { "docid": "da4903bec6fb5f4f5c5efd89212123c7", "score": "0.5225282", "text": "public function init()\n {\n\n // initialize the prepared statements\n $this->addFinder($this->finderFactory->createFinder($this, SqlStatementKeys::STORES));\n $this->addFinder($this->finderFactory->createFinder($this, SqlStatementKeys::URL_REWRITES));\n $this->addFinder($this->finderFactory->createFinder($this, SqlStatementKeys::URL_REWRITE_BY_REQUEST_PATH_AND_STORE_ID));\n $this->addFinder($this->finderFactory->createFinder($this, SqlStatementKeys::URL_REWRITES_BY_ENTITY_TYPE_AND_ENTITY_ID));\n $this->addFinder($this->finderFactory->createFinder($this, SqlStatementKeys::URL_REWRITES_BY_ENTITY_TYPE_AND_ENTITY_ID_AND_STORE_ID));\n }", "title": "" }, { "docid": "83e88046fd2fc286e6af9ab878bdf5d3", "score": "0.52206033", "text": "public function asort() { }", "title": "" }, { "docid": "53655e106dac247ba4d816b7b78a0f35", "score": "0.5213934", "text": "protected function generate_sort()\n {\n $sort = ['FY' => ['order' => 'asc', 'missing' => '_last', 'unmapped_type' => 'string']];\n return $sort;\n }", "title": "" }, { "docid": "373446fe0f56e9ff494830e574fdffc6", "score": "0.520426", "text": "private function setQueryOrder()\n {\n if ($this->hasInput('column_orders'))\n {\n // before we process the order, we need to check if\n // single order is set.\n // and remove other column_orders keys and method except for the single order\n // specified.\n if ($this->hasInput('single_order') && isset($this->columns[$this->getInput('single_order')]))\n {\n // single_order might empty\n $single_order = $this->getInput('single_order');\n\n if ( ! empty($single_order))\n {\n foreach ($this->requestParameters['column_orders'] as $key => $value)\n {\n if ($key != $single_order)\n {\n unset($this->requestParameters['column_orders'][$key]);\n }\n }\n }\n }\n\n // overide default column_orders keys and methods\n $column_orders_input = $this->getInput('column_orders');\n if (!empty($column_orders_input) && is_array($column_orders_input))\n {\n // $input_orders method\n foreach ($column_orders_input as $order_by => $order_method)\n {\n if (!array_key_exists($order_by, $this->columns))\n {\n unset($column_orders_input[$order_by]);\n }\n else\n {\n if (!is_string($order_method) || !in_array($order_method, array('asc', 'desc')))\n {\n $column_orders_input[$order_by] = 'asc';\n }\n }\n }\n\n // override default order\n $this->columnOrders = $column_orders_input;\n }\n }\n\n // load default column_orders\n // no need to perform validation since\n // tblist assumes that it is a system generated data\n // not user generated data.\n foreach ($this->columnOrders as $column_key => $order_method)\n {\n // just set the default order query string\n // just like: order by column_name desc\n $table_column = $this->getColumnOption($column_key, self::COLUMN_OPTION_TABLE_COLUMN, $column_key);\n $this->query->orderBy($table_column, $order_method);\n }\n }", "title": "" }, { "docid": "acbeb1f35c50192a862f5d43337ea5b7", "score": "0.5203154", "text": "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->with = array('recursos', 'usos', 'iD_PREDIO');\n\n $criteria->compare('ID_AMBIENTE', $this->ID_AMBIENTE);\n\n if ($this->ID_PREDIO != -1) {\n $criteria->compare('iD_PREDIO.TX_DESCRICAO', $this->getPredio());\n }\n\n $criteria->compare('TX_NOME', $this->TX_NOME, true);\n\n $criteria->compare('NU_CAPACIDADE', $this->NU_CAPACIDADE);\n\n\n $sort = new CSort();\n $sort->attributes = array(\n 'defaultOrder' => 'iD_PREDIO.TX_DESCRICAO ASC, t.TX_NOME ASC',\n 'ID_AMBIENTE' => array(\n 'asc' => 't.ID_AMBIENTE',\n 'desc' => 't.ID_AMBIENTE desc',\n ),\n 'ID_PREDIO' => array(\n 'asc' => 'iD_PREDIO.TX_DESCRICAO asc',\n 'desc' => 'iD_PREDIO.TX_DESCRICAO desc',\n ),\n 'TX_NOME' => array(\n 'asc' => 't.TX_NOME',\n 'desc' => 't.TX_NOME desc',\n ),\n 'NU_CAPACIDADE' => array(\n 'asc' => 't.NU_CAPACIDADE',\n 'desc' => 't.NU_CAPACIDADE desc',\n ),\n );\n\n return new CActiveDataProvider('Ambiente', array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "1b3d813168b7dd6d18fd0a1461ea255b", "score": "0.5199021", "text": "function _sortDataSource()\r\n {\r\n if (!empty($this->sortSpec)) {\r\n if ($this->_dataSource->hasFeature('multiSort')) {\r\n $this->_dataSource->sort($this->sortSpec);\r\n } else {\r\n reset ($this->sortSpec);\r\n list ($sortBy, $direction) = each ($this->sortSpec);\r\n $this->_dataSource->sort($sortBy, $direction);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "2f03f0397e478e0e31aed99526f56a95", "score": "0.5198514", "text": "protected function dbSort()\n {\n $sort = new \\CSort();\n if (isset($this->config['dbSort']) && count($this->config['dbSort'])) {\n foreach ($this->config['dbSort'] as $key => $val) {\n $sort->{$key} = $val;\n }\n }\n return $sort;\n }", "title": "" }, { "docid": "7978b11c4062ed8f2691472fa8517297", "score": "0.5194489", "text": "public function getOrderBy();", "title": "" }, { "docid": "ab262c33d7c85031f281b888aa709d83", "score": "0.51890194", "text": "function AddSortParam ($field, $sortOrder='', $performOrder=0) {\n if ($performOrder > 0) {\n $this->sortParams[$performOrder]['field'] = $field;\n $this->sortParams[$performOrder]['sortOrder'] = $sortOrder;\n } else {\n if (count($this->sortParams) == 0) {\n $this->sortParams[1]['field'] = $field;\n } else {\n $this->sortParams[]['field'] = $field;\n }\n end($this->sortParams);\n $this->sortParams[key($this->sortParams)]['sortOrder'] = $sortOrder;\n }\n }", "title": "" }, { "docid": "9125500f12aeb5c472945e866fb53664", "score": "0.51863444", "text": "private function _buildQueryOrderBy(){\n //Array of allowable order fields\n $mainframe = JFactory::getApplication();\n $orders = array('name', 'published', 'ordering');\n $columns = array();\n\n $filter_order = $this->getState('com_jresearch.researchareas.filter_order');\n $filter_order_Dir = $this->getState('com_jresearch.researchareas.filter_order_Dir');\n\n //Validate order direction\n if($filter_order_Dir != 'asc' && $filter_order_Dir != 'desc') {\n $filter_order_Dir = 'asc';\n }\n\n if(!in_array($filter_order, $orders))\n $filter_order = 'ordering'; \n\n $columns[] = $filter_order.' '.$filter_order_Dir;\n\n return $columns;\n }", "title": "" } ]
89347aca992bab72f0b939773c258508
Setup date archives rewrite rules for the custom post type.
[ { "docid": "48ab233dedd7ba99a1960bbfd98a501a", "score": "0.7162337", "text": "function cgit_wp_events_generate_archives($existing_rules)\n{\n global $wp_rewrite;\n\n $rules = array();\n\n // Get the post type for the archive slug\n $post_type = get_post_type_object(CGIT_EVENTS_POST_TYPE);\n $slug_archive = $post_type->has_archive;\n\n // The post type always has an archive, but include this check anyway\n if ($slug_archive === false) {\n return $rules;\n }\n\n // Define the archive slug if it's not already defined\n if ($slug_archive === true) {\n $slug_archive = $post_type->rewrite['slug'];\n if (!$post_type->rewrite['slug']) {\n $slug_archive = $post_type->name;\n }\n }\n\n // Build an array of regex rules and their query vars\n $dates = array(\n array(\n 'rule' => \"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})\",\n 'vars' => array('year', 'monthnum', 'day')\n ),\n array(\n 'rule' => \"([0-9]{4})/([0-9]{1,2})\",\n 'vars' => array('year', 'monthnum')\n ),\n array(\n 'rule' => \"([0-9]{4})\",\n 'vars' => array('year')\n )\n );\n\n // Process each rewrite rule\n foreach ($dates as $data) {\n $query = 'index.php?post_type=' . CGIT_EVENTS_POST_TYPE;\n $rule = $slug_archive . '/' . $data['rule'];\n\n $i = 1;\n foreach ($data['vars'] as $var) {\n $query.= '&' . $var . '=$matches[' . $i . ']';\n $i++;\n }\n\n // The completed rules\n $regex = $rule . '/?$';\n $rules[$regex] = $query;\n\n // Rules for feeds\n $regex = $rule . '/feed/(feed|rdf|rss|rss2|atom)/?$';\n $rules[$regex] = $query . '&feed=$matches[' . $i . ']';\n $regex = $rule . '/(feed|rdf|rss|rss2|atom)/?$';\n $rules[$regex] = $query . '&feed=$matches[' . $i . ']';\n\n // Rules for pages\n $regex = $rule . '/page/([0-9]{1,})/?$';\n $rules[$regex] = $query.'&paged=$matches[' . $i . ']';\n }\n\n // Return the rules\n return $rules + $existing_rules;\n}", "title": "" } ]
[ { "docid": "4636156a7f55bae56ae0802a229b841e", "score": "0.77446723", "text": "function fh_generate_date_archives($cpt, $wp_rewrite) {\n $rules = array();\n\n $post_type = get_post_type_object($cpt);\n $slug_archive = $post_type->has_archive;\n if ($slug_archive === false) return $rules;\n if ($slug_archive === true) {\n $slug_archive = $post_type->name;\n }\n\n $dates = array(\n array(\n 'rule' => \"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})\",\n 'vars' => array('year', 'monthnum', 'day')),\n array(\n 'rule' => \"([0-9]{4})/([0-9]{1,2})\",\n 'vars' => array('year', 'monthnum')),\n array(\n 'rule' => \"([0-9]{4})\",\n 'vars' => array('year'))\n );\n\n foreach ($dates as $data) {\n $query = 'index.php?post_type='.$cpt;\n $rule = $slug_archive.'/'.$data['rule'];\n\n $i = 1;\n foreach ($data['vars'] as $var) {\n $query.= '&'.$var.'='.$wp_rewrite->preg_index($i);\n $i++;\n }\n\n $rules[$rule.\"/?$\"] = $query;\n $rules[$rule.\"/feed/(feed|rdf|rss|rss2|atom)/?$\"] = $query.\"&feed=\".$wp_rewrite->preg_index($i);\n $rules[$rule.\"/(feed|rdf|rss|rss2|atom)/?$\"] = $query.\"&feed=\".$wp_rewrite->preg_index($i);\n $rules[$rule.\"/page/([0-9]{1,})/?$\"] = $query.\"&paged=\".$wp_rewrite->preg_index($i);\n }\n\n return $rules;\n}", "title": "" }, { "docid": "6ed9ca683938c8d1a2c0122950af3cca", "score": "0.68977", "text": "public static function generate_date_archives($cpt, $wp_rewrite)\n {\n $rules = [];\n\n $post_type = get_post_type_object($cpt);\n $slug_archive = $post_type->has_archive;\n if ($slug_archive === false) {\n return $rules;\n }\n if ($slug_archive === true) {\n $slug_archive = ($post_type->rewrite['slug']) ? $post_type->rewrite['slug'] : $post_type->name;\n }\n\n $dates = [\n [\n 'rule' => \"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})\",\n 'vars' => ['year', 'monthnum', 'day']\n ],\n [\n 'rule' => \"([0-9]{4})/([0-9]{1,2})\",\n 'vars' => ['year', 'monthnum']\n ],\n [\n 'rule' => \"([0-9]{4})\",\n 'vars' => ['year']\n ]\n ];\n\n foreach ($dates as $data) {\n $query = 'index.php?post_type=' . $cpt;\n $rule = $slug_archive . '/' . $data['rule'];\n\n $i = 1;\n foreach ($data['vars'] as $var) {\n $query .= '&' . $var . '=' . $wp_rewrite->preg_index($i);\n $i++;\n }\n\n $rules[$rule . \"/?$\"] = $query;\n $rules[$rule . \"/feed/(feed|rdf|rss|rss2|atom)/?$\"] = $query . \"&feed=\" . $wp_rewrite->preg_index($i);\n $rules[$rule . \"/(feed|rdf|rss|rss2|atom)/?$\"] = $query . \"&feed=\" . $wp_rewrite->preg_index($i);\n $rules[$rule . \"/page/([0-9]{1,})/?$\"] = $query . \"&paged=\" . $wp_rewrite->preg_index($i);\n }\n\n return $rules;\n }", "title": "" }, { "docid": "65c40656cd4f082ad5b6819df4a78e08", "score": "0.6801864", "text": "function cgit_wp_events_apply_rules()\n{\n global $wp_rewrite;\n\n // Get the post type for the archive slug and check it has an archive\n $post_type = get_post_type_object(CGIT_EVENTS_POST_TYPE);\n if (!$post_type->has_archive) {\n return;\n }\n\n // Check for the main rewrite rule and flush if it does not exist\n $check_rule = $post_type->rewrite['slug'] . '/?$';\n $rules = $wp_rewrite->wp_rewrite_rules();\n if ($rules && in_array($check_rule, array_keys($rules))) {\n cgit_wp_events_flush_rules();\n }\n}", "title": "" }, { "docid": "48aae4b12ab09d2316279e8e9056de9c", "score": "0.6772543", "text": "public static function add_post_type_rewrite_rules( $post_type, $args ) {\n\n\t\t\tglobal $wp_post_types, $wp_rewrite;\n\n\t\t\tif ( is_admin() || '' != get_option( 'permalink_structure' ) ) {\n\n\t\t\t\tif ( $args->has_archive ) {\n\n\t\t\t\t\t$archive_slug = $args->has_archive === true ? $args->rewrite['slug'] : $args->has_archive;\n\n\t\t\t\t\tif ( $args->rewrite['with_front'] ) {\n\t\t\t\t\t\t$archive_slug = substr( $wp_rewrite->front, 1 ) . $archive_slug;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$archive_slug = $wp_rewrite->root . $archive_slug;\n\t\t\t\t\t}\n\n\t\t\t\t\tadd_rewrite_rule( \"{$archive_slug}/?$\", \"index.php?post_type=$post_type\", 'top' );\n\n\t\t\t\t\tif ( $args->rewrite['feeds'] && $wp_rewrite->feeds ) {\n\t\t\t\t\t\t$feeds = '(' . trim( implode( '|', $wp_rewrite->feeds ) ) . ')';\n\t\t\t\t\t\tadd_rewrite_rule( \"{$archive_slug}/feed/$feeds/?$\", \"index.php?post_type=$post_type\" . '&feed=$matches[1]', 'top' );\n\t\t\t\t\t\tadd_rewrite_rule( \"{$archive_slug}/$feeds/?$\", \"index.php?post_type=$post_type\" . '&feed=$matches[1]', 'top' );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $args->rewrite['pages'] ) {\n\t\t\t\t\t\tadd_rewrite_rule( \"{$archive_slug}/{$wp_rewrite->pagination_base}/([0-9]{1,})/?$\", \"index.php?post_type=$post_type\" . '&paged=$matches[1]', 'top' );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$permastruct_args = $args->rewrite;\n\t\t\t\t$permastruct_args['feed'] = $permastruct_args['feeds'];\n\t\t\t\tadd_permastruct( $post_type, \"{$args->rewrite['slug']}/%$post_type%\", $permastruct_args );\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "c6b44dce93eafcc003734acc9f3cd859", "score": "0.5970533", "text": "function mastermind_add_new_rewrite_rules($post_type, $slug, $lang, $rules) {\n global $wp_rewrite;\n\n $rewrite_rules = $wp_rewrite->generate_rewrite_rules($slug);\n $rewrite_rules[$slug.'/?$'] = 'index.php?paged=1';\n\n foreach($rewrite_rules as $regex => $redirect) {\n if(strpos($redirect, 'attachment=') === false) {\n $redirect .= '&post_type='.$post_type;\n }\n\n if(0 < preg_match_all('@\\$([0-9])@', $redirect, $matches)) {\n for($i = 0; $i < count($matches[0]); $i++) {\n $redirect = str_replace($matches[0][$i], '$matches['.$matches[1][$i].']', $redirect);\n }\n }\n $rules[$regex] = $redirect;\n //$wp_rewrite->add_rule($regex, $redirect, 'top');\n }\n\n //echo '<hr />'; echo '<pre>'; print_r($wp_rewrite->rules); echo '</pre>';\n\n}", "title": "" }, { "docid": "07d023c95f06645140337a52756c7161", "score": "0.5943326", "text": "public function add_post_type_archive_items() {\n\n\t\t\t/* Get the post type object. */\n\t\t\t$post_type_object = get_post_type_object( get_query_var( 'post_type' ) );\n\n\t\t\tif ( ! empty( $post_type_object ) && false !== $post_type_object->rewrite ) {\n\n\t\t\t\t/* If 'with_front' is true, add $wp_rewrite->front to the trail. */\n\t\t\t\tif ( ! empty( $post_type_object->rewrite ) && $post_type_object->rewrite['with_front'] ) {\n\t\t\t\t\t$this->add_rewrite_front_items();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Add the post type [plural] name to the trail end. */\n\t\t\tif ( is_paged() ) {\n\n\t\t\t\t$url = esc_url( get_post_type_archive_link( $post_type_object->name ) );\n\t\t\t\t$label = post_type_archive_title( '', false );\n\n\t\t\t\t$this->_add_item( 'link_format', $label, $url );\n\n\t\t\t}\n\n\t\t\t$label = post_type_archive_title( '', false );\n\t\t\t$this->_add_item( 'target_format', $label );\n\n\t\t}", "title": "" }, { "docid": "40d095bba30147bc5f7e8173d4410e14", "score": "0.59122676", "text": "function my_rewrite_flush() {\n\n pergola_custom_postType_init();\n\n flush_rewrite_rules();\n}", "title": "" }, { "docid": "cd1f281c3e84152f47381b58d3410add", "score": "0.5887078", "text": "public function add_term_archive_items() {\n\n\t\t\tglobal $wp_rewrite;\n\n\t\t\t/* Get some taxonomy and term variables. */\n\t\t\t$term = get_queried_object();\n\t\t\t$taxonomy = get_taxonomy( $term->taxonomy );\n\n\t\t\t/* If there are rewrite rules for the taxonomy. */\n\t\t\tif ( false !== $taxonomy->rewrite ) {\n\n\t\t\t\t$post_type_catched = false;\n\n\t\t\t\t/* If 'with_front' is true, dd $wp_rewrite->front to the trail. */\n\t\t\t\tif ( $taxonomy->rewrite['with_front'] && $wp_rewrite->front ) {\n\t\t\t\t\t$this->add_rewrite_front_items();\n\t\t\t\t}\n\n\t\t\t\t/* Get parent pages by path if they exist. */\n\t\t\t\t$this->add_path_parents( $taxonomy->rewrite['slug'] );\n\n\t\t\t\t/* Add post type archive if its 'has_archive' matches the taxonomy rewrite 'slug'. */\n\t\t\t\tif ( $taxonomy->rewrite['slug'] ) {\n\n\t\t\t\t\t$slug = trim( $taxonomy->rewrite['slug'], '/' );\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Deals with the situation if the slug has a '/' between multiple strings. For\n\t\t\t\t\t * example, \"movies/genres\" where \"movies\" is the post type archive.\n\t\t\t\t\t */\n\t\t\t\t\t$matches = explode( '/', $slug );\n\n\t\t\t\t\t/* If matches are found for the path. */\n\t\t\t\t\tif ( isset( $matches ) ) {\n\n\t\t\t\t\t\t/* Reverse the array of matches to search for posts in the proper order. */\n\t\t\t\t\t\t$matches = array_reverse( $matches );\n\n\t\t\t\t\t\t/* Loop through each of the path matches. */\n\t\t\t\t\t\tforeach ( $matches as $match ) {\n\n\t\t\t\t\t\t\t/* If a match is found. */\n\t\t\t\t\t\t\t$slug = $match;\n\n\t\t\t\t\t\t\t/* Get public post types that match the rewrite slug. */\n\t\t\t\t\t\t\t$post_types = $this->get_post_types_by_slug( $match );\n\n\t\t\t\t\t\t\tif ( ! empty( $post_types ) ) {\n\n\t\t\t\t\t\t\t\t$post_type_object = $post_types[0];\n\n\t\t\t\t\t\t\t\t$url = get_post_type_archive_link( $post_type_object->name );\n\t\t\t\t\t\t\t\t/* Add support for a non-standard label of 'archive_title' (special use case). */\n\t\t\t\t\t\t\t\t$label = ! empty( $post_type_object->labels->archive_title )\n\t\t\t\t\t\t\t\t\t\t\t? $post_type_object->labels->archive_title\n\t\t\t\t\t\t\t\t\t\t\t: $post_type_object->labels->name;\n\n\t\t\t\t\t\t\t\t/* Add the post type archive link to the trail. */\n\t\t\t\t\t\t\t\t$this->_add_item( 'link_format', $label, $url );\n\n\t\t\t\t\t\t\t\t$post_type_catched = true;\n\t\t\t\t\t\t\t\t/* Break out of the loop. */\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Add the post type archive link to the trail for custom post types */\n\t\t\t\tif ( ! $post_type_catched ) {\n\t\t\t\t\t$post_type = isset( $taxonomy->object_type[0] ) ? $taxonomy->object_type[0] : false;\n\n\t\t\t\t\tif ( $post_type && 'post' != $post_type ) {\n\t\t\t\t\t\t$post_type_object = get_post_type_object( $post_type );\n\n\t\t\t\t\t\t$url = get_post_type_archive_link( $post_type_object->name );\n\t\t\t\t\t\t/* Add support for a non-standard label of 'archive_title' (special use case). */\n\t\t\t\t\t\t$label = ! empty( $post_type_object->labels->archive_title )\n\t\t\t\t\t\t\t\t\t? $post_type_object->labels->archive_title\n\t\t\t\t\t\t\t\t\t: $post_type_object->labels->name;\n\n\t\t\t\t\t\t$this->_add_item( 'link_format', $label, $url );\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* If the taxonomy is hierarchical, list its parent terms. */\n\t\t\tif ( is_taxonomy_hierarchical( $term->taxonomy ) && $term->parent ) {\n\t\t\t\t$this->add_term_parents( $term->parent, $term->taxonomy );\n\t\t\t}\n\n\t\t\t$label = single_term_title( '', false );\n\n\t\t\t/* Add the term name to the trail end. */\n\t\t\tif ( is_paged() ) {\n\n\t\t\t\t$url = esc_url( get_term_link( $term, $term->taxonomy ) );\n\t\t\t\t$this->_add_item( 'link_format', $label, $url );\n\n\t\t\t}\n\n\t\t\t$this->_add_item( 'target_format', $label );\n\n\t\t}", "title": "" }, { "docid": "7461ec017e9ce3e0897bb746e76706c4", "score": "0.5844315", "text": "function akavalanches_create_posttype_forecast_zone1() {\n $zone1_name = \"Turnagain Pass\";\n\t$zone1_slug = \"turnagain\";\n register_post_type( 'forecast_zone1',\n array(\n 'labels' => array(\n 'name' => __( $zone1_name ),\n 'singular_name' => __( $zone1_name )\n ),\n 'public' => true,\n 'has_archive' => 'forecast/'.$zone1_slug.'/archives',\n 'rewrite' => array('slug' => 'forecast/'.$zone1_slug.''),\n 'supports' => array('editor' ),\n 'show_in_menu' => 'akavalanches',\n 'feeds' => true,\n 'with_front' => false\n )\n );\n}", "title": "" }, { "docid": "f0773be86d0fcc394e30303f1b81a91a", "score": "0.5834827", "text": "function dda_add_rewrite_rules( $wp_rewrite ) {\r\n\t$pages = get_option('dda_portfolios');\r\n\tif( empty($pages) )\r\n\t\treturn;\r\n\t\r\n\t$pageRegex = '';\r\n\tforeach((array)$pages as $page){\r\n\t\tif( empty($pageRegex) )\r\n\t\t\t$pageRegex = $page['slug'];\r\n\t\telse\r\n\t\t\t$pageRegex .= '|' . $page['slug'];\r\n\t\t\t\r\n\t}\r\n\r\n\t$new_rules = array( \"($pageRegex)\" => 'index.php?ddeviantart=' . $wp_rewrite->preg_index(1) );\r\n\r\n\t$wp_rewrite->rules = $wp_rewrite->rules + $new_rules;\r\n}", "title": "" }, { "docid": "e199133d172123711a9ceeaff5bf5c51", "score": "0.5778823", "text": "function gmt_articles_flush_rewrites() {\n\tarticles_add_custom_post_type();\n\tflush_rewrite_rules();\n}", "title": "" }, { "docid": "d4ab106c25b0ab3c1d62b2a3dc53eb22", "score": "0.567778", "text": "public function add_day_archive_items() {\n\n\t\t\t/* Add $wp_rewrite->front to the trail. */\n\t\t\t$this->add_rewrite_front_items();\n\n\t\t\t/* Get year, month, and day. */\n\t\t\t$year = sprintf(\n\t\t\t\t$this->args['labels']['archive_year'],\n\t\t\t\tget_the_time( $this->args['date_labels']['archive_year'] )\n\t\t\t);\n\n\t\t\t$month = sprintf(\n\t\t\t\t$this->args['labels']['archive_month'],\n\t\t\t\tget_the_time( $this->args['date_labels']['archive_month'] )\n\t\t\t);\n\n\t\t\t$day = sprintf(\n\t\t\t\t$this->args['labels']['archive_day'],\n\t\t\t\tget_the_time( $this->args['date_labels']['archive_day'] )\n\t\t\t);\n\n\t\t\t/* Add the year and month items. */\n\t\t\t$this->_add_item(\n\t\t\t\t'link_format',\n\t\t\t\t$year,\n\t\t\t\tget_year_link( get_the_time( 'Y' ) )\n\t\t\t);\n\n\t\t\t$this->_add_item(\n\t\t\t\t'link_format',\n\t\t\t\t$month,\n\t\t\t\tget_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) )\n\t\t\t);\n\n\t\t\t/* Add the day item. */\n\t\t\tif ( is_paged() ) {\n\n\t\t\t\t$this->_add_item(\n\t\t\t\t\t'link_format',\n\t\t\t\t\t$day,\n\t\t\t\t\tget_day_link( get_the_time( 'Y' ), get_the_time( 'm' ), get_the_time( 'd' ) )\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t\t$this->_add_item( 'target_format', $day );\n\n\t\t}", "title": "" }, { "docid": "63f6dd3f90fe97ac745e07d919560320", "score": "0.5664604", "text": "function my_rewrite_flush() {\n // First, we \"add\" the custom post type via the above written function.\n // Note: \"add\" is written with quotes, as CPTs don't get added to the DB,\n // They are only referenced in the post_type column with a post entry, \n // when you add a post of this CPT.\n pstt_posttypes(); // this means you\n // ATTENTION: This is *only* done during plugin activation hook in this example!\n // You should *NEVER EVER* do this on every page load!!\n flush_rewrite_rules();\n}", "title": "" }, { "docid": "7f79d3844c78cb8bcbd00aff79cbd344", "score": "0.56587476", "text": "function mastermind_rewrites ($wp_rewrite_rules) {\n global $mm_config, $wp_rewrite;\n\n $my_rules = array();\n\n // mogelijke virtuele uris\n // ------------------------\n // blog/:topicname\n // topics/\n\n $exception_rules = array();\n $custom_post_types_localized_rules = array();\n $custom_post_types_fallback_rules = array();\n\n $blog_prefix = \"blog\\/\";\n $blog_prefix = \"\";\n\n foreach($mm_config['custom_post_types'] as $key => $post_type) {\n\n $pattern = \"/^\".$blog_prefix.$post_type['slugs']['en'].\"\\//\";\n foreach($wp_rewrite_rules as $rule=>$query) {\n if( preg_match($pattern, $rule) > 0 ) {\n// echo '<li> $rule: '.$rule;\n// $wp_rewrite_rules_mod[$rule] = $query;\n unset($wp_rewrite_rules[$rule]);\n\n// $rule = str_replace('blog/', '', $rule);\n $custom_post_types_localized_rules[$rule] = $query;\n\n foreach($post_type['slugs'] as $lang => $slug) {\n if($lang != 'en') {\n// $localized_rule = preg_replace($pattern, $lang.\"/\".$slug.'/', $rule);\n $localized_rule = preg_replace($pattern, $slug.'/', $rule);\n $custom_post_types_localized_rules[$localized_rule] = $query;\n }\n }\n }\n }\n\n\n // Custom slugs (NL/EN) voor onze custom post types\n foreach($post_type['slugs'] as $lang => $slug) {\n $custom_post_types_fallback_rules[$slug.'/?$'] = 'index.php?post_type='.$key;\n// mastermind_add_new_rewrite_rules($key, trim($slug), $lang, &$my_rules);\n }\n }\n\n// $wp_rewrite_rules = $wp_rewrite_rules_mod;\n\n\n\n // blog toevoegen aan de rules\n// [blog/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?&feed=$matches[1]\n// [blog/(feed|rdf|rss|rss2|atom)/?$] => index.php?&feed=$matches[1]\n// [blog/page/?([0-9]{1,})/?$] => index.php?&paged=$matches[1]\n $exception_rules['blog/(.+?)/page/?([0-9]{1,})/?$'] = 'index.php?pagename=blog&topicname=$matches[1]&paged=$matches[2]';\n $exception_rules['blog/page/?([0-9]{1,})/?$'] = 'index.php?pagename=blog&paged=$matches[1]';\n $exception_rules['blog/(.+?)/?$'] = 'index.php?pagename=blog&topicname=$matches[1]';\n\n // rules voor trainings_and_events\n $exception_rules['trainings-and-events/([^/]+)/([^/]+)/?$'] = 'index.php?post_type=programs_and_events&event_type=$matches[1]&event_date=$matches[2]';\n $exception_rules['trainingen-en-events/([^/]+)/([^/]+)/?$'] = 'index.php?post_type=programs_and_events&event_type=$matches[1]&event_date=$matches[2]';\n// $exception_rules['nl/trainingen-en-events/([^/]+)/([^/]+)/?$'] = 'index.php?post_type=programs_and_events&event_type=$matches[1]&event_date=$matches[2]';\n $exception_rules['trainings-and-events/([^/]+)/?$'] = 'index.php?post_type=programs_and_events&event_type=$matches[1]';\n $exception_rules['trainingen-en-events/([^/]+)/?$'] = 'index.php?post_type=programs_and_events&event_type=$matches[1]';\n// $exception_rules['nl/trainingen-en-events/([^/]+)/?$'] = 'index.php?post_type=programs_and_events&event_type=$matches[1]';\n\n // rules voor resources_and_tools\n $exception_rules['resources-and-tools/([^/]+)/?$'] = 'index.php?post_type=resources_and_tools&p1=$matches[1]';\n $exception_rules['kennisbank/([^/]+)/?$'] = 'index.php?post_type=resources_and_tools&p1=$matches[1]';\n// $exception_rules['nl/kennisbank/([^/]+)/?$'] = 'index.php?post_type=resources_and_tools&p1=$matches[1]';\n\n\n $pages_with_custom_query_vars = array($mm_config['page_ids']['our_people']);\n foreach($pages_with_custom_query_vars as $page_id) {\n foreach($mm_config['languages'] as $lang) {\n $pagename = mastermind_get_post_uri($page_id, $lang);\n $exception_rules[$pagename.'([^/]+)/?$'] = 'index.php?lang='.$lang.'&page_id='.$page_id.'&user_nicename=$matches[1]';\n }\n }\n\n\n $all_rewrite_rules = $exception_rules + $custom_post_types_localized_rules + $custom_post_types_fallback_rules + $wp_rewrite_rules;\n\n if(11==1 && stristr($_SERVER['REQUEST_URI'], 'options-permalink')) {\n\n $rrr = $wp_rewrite->generate_rewrite_rules('blog');\n\n// echo '<pre>'; print_r($exception_rules); echo '</pre>';\n// echo '<pre>'; print_r($custom_post_types_localized_rules); echo '</pre>';\n// echo '<pre>'; print_r($custom_post_types_fallback_rules); echo '</pre>';\n// echo '<pre>'; print_r($wp_rewrite_rules); echo '</pre>';\n// \techo '<pre>'; print_r($rrr); echo '</pre>';\n echo '<pre>'; print_r($all_rewrite_rules); echo '</pre>';\n }\n\n return $all_rewrite_rules;\n\n}", "title": "" }, { "docid": "16e1e6958acfb2337d468f4ff8f53ca6", "score": "0.56488323", "text": "function my_rewrite_flush() {\n // First, we \"add\" the custom post type via the above written function.\n // Note: \"add\" is written with quotes, as CPTs don't get added to the DB,\n // They are only referenced in the post_type column with a post entry,\n // when you add a post of this CPT.\n tc_custom_post_types();\n\n // ATTENTION: This is *only* done during plugin activation hook in this example, requires reactivation of plugin\n flush_rewrite_rules();\n}", "title": "" }, { "docid": "7d19eb71b4d5d9aa851b61c9e16f5471", "score": "0.56253463", "text": "function it_rewrite_flush(){\n\tit_create_post_type();\n\tflush_rewrite_rules();\n}", "title": "" }, { "docid": "ea278d582c1c0caec06ab6e92333dfb4", "score": "0.5623859", "text": "function aeris_wppl_project_sheets_flush_rewrites() {\n // call your CPT registration function here (it should also be hooked into 'init')\n aeris_wppl_project_sheets_cpt();\n // clear the permalinks after the post type has been registered\n flush_rewrite_rules();\n}", "title": "" }, { "docid": "6e36865d3325e47bd303612636490585", "score": "0.56133693", "text": "function _set_custom_date_order( string $post_type, string $type ): void {\n\t$key = '';\n\tif ( 'from' === $type ) {\n\t\t$key = PMK_DATE_FROM;\n\t}\n\tif ( 'to' === $type ) {\n\t\t$key = PMK_DATE_TO;\n\t}\n\tif ( $key ) {\n\t\t\\wpinc\\post\\make_custom_date_sortable( $post_type, 'date', $key );\n\t\t\\wpinc\\post\\enable_custom_date_adjacent_post_link( $post_type, $key );\n\t}\n}", "title": "" }, { "docid": "67fcf321a1da01de61f2175c51e78948", "score": "0.5599874", "text": "private static function fix_post_type_rewrite( WP_Post_Type $post_type ) {\n\t\tif ( false === $post_type->rewrite ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$rewrite = $post_type->rewrite;\n\n\t\t// This code is copied from `WP_Post_Type::set_props()`.\n\t\tif ( ! is_array( $rewrite ) ) {\n\t\t\t$rewrite = array();\n\t\t}\n\t\tif ( empty( $rewrite['slug'] ) ) {\n\t\t\t$rewrite['slug'] = $post_type->name;\n\t\t}\n\t\tif ( ! isset( $rewrite['with_front'] ) ) {\n\t\t\t$rewrite['with_front'] = true;\n\t\t}\n\t\tif ( ! isset( $rewrite['pages'] ) ) {\n\t\t\t$rewrite['pages'] = true;\n\t\t}\n\t\tif ( ! isset( $rewrite['feeds'] ) || ! $post_type->has_archive ) {\n\t\t\t$rewrite['feeds'] = (bool) $post_type->has_archive;\n\t\t}\n\t\tif ( ! isset( $rewrite['ep_mask'] ) ) {\n\t\t\tif ( isset( $post_type->permalink_epmask ) ) {\n\t\t\t\t$rewrite['ep_mask'] = $post_type->permalink_epmask;\n\t\t\t} else {\n\t\t\t\t$rewrite['ep_mask'] = EP_PERMALINK;\n\t\t\t}\n\t\t}\n\n\t\t$post_type->rewrite = $rewrite;\n\t}", "title": "" }, { "docid": "253e017765c85ffb99b636060e32c26f", "score": "0.5576976", "text": "function rad_rewrite_flush(){\n\trad_custom_post_type();\n\t//never put this function outside the activation hook\n\tflush_rewrite_rules();\t\n}", "title": "" }, { "docid": "a3b058db4ee56f725205fb8762365074", "score": "0.5541727", "text": "function cptm_plugin_activate_flush_rewrite()\n\t{\n\t\t$this->cptm_create_custom_post_types();\n\t\tflush_rewrite_rules();\n\t}", "title": "" }, { "docid": "3af5c9c5219362fe7b05b131ca871f4e", "score": "0.5521452", "text": "function register_post_type( array $args = array() ): void {\n\t$def_opts = array(\n\t\t'post_type' => 'event',\n\t\t'slug' => '',\n\t\t'do_autofill' => false,\n\t\t'order_by' => 'from',\n\t\t'replace_date_with' => 'from',\n\t);\n\n\t$args += $def_opts;\n\t$args += array(\n\t\t'public' => true,\n\t\t'show_in_rest' => true,\n\t\t'has_archive' => true,\n\t\t'rewrite' => false,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-calendar-alt',\n\t\t'supports' => array( 'title', 'editor', 'revisions', 'thumbnail', 'custom-fields' ),\n\t\t'labels' => array(),\n\t);\n\n\t$args['labels'] += array(\n\t\t'name' => _x( 'Events', 'post type event', 'wpinc_post' ),\n\t\t'date' => _x( 'Duration', 'post type event', 'wpinc_post' ),\n\t\t'date_from' => _x( 'From', 'post type event', 'wpinc_post' ),\n\t\t'date_to' => _x( 'To', 'post type event', 'wpinc_post' ),\n\t);\n\n\tif ( empty( $args['slug'] ) ) {\n\t\t$args['slug'] = $args['post_type'];\n\t}\n\t\\register_post_type( $args['post_type'], array_diff_key( $args, $def_opts ) );\n\t\\wpinc\\post\\add_rewrite_rules( $args['post_type'], $args['slug'], 'date', false );\n\n\t_set_custom_date_order( $args['post_type'], $args['order_by'] );\n\t_replace_date( $args['post_type'], $args['replace_date_with'] );\n\n\tforeach ( array( PMK_DATE_FROM, PMK_DATE_TO ) as $key ) {\n\t\tregister_post_meta(\n\t\t\t$args['post_type'],\n\t\t\t$key,\n\t\t\tarray(\n\t\t\t\t'type' => 'string',\n\t\t\t\t'single' => true,\n\t\t\t\t'show_in_rest' => true,\n\t\t\t\t'auth_callback' => function() {\n\t\t\t\t\treturn current_user_can( 'edit_posts' );\n\t\t\t\t},\n\t\t\t)\n\t\t);\n\t}\n\t_initialize_hooks( $args );\n}", "title": "" }, { "docid": "f3a90e9f4ea6fa608a667fcd71699029", "score": "0.5519269", "text": "function generate_rewrite_rules() {\n global $wp_rewrite;\n\n $rewrite_rules = array();\n $permalink_structure = $wp_rewrite->permalink_structure;\n\n //get everything up to the first rewrite tag\n\t\t$front = substr($permalink_structure, 0, strpos($permalink_structure, '%'));\n\t\t//build an array of the tags (note that said array ends up being in $tokens[0])\n\t\tpreg_match_all('/%.+?%/', $permalink_structure, $tokens);\n\n\t\t$num_tokens = count($tokens[0]);\n\n\t\t$this->index = $wp_rewrite->index; //probably 'index.php'\n\n\t\t//build a list from the rewritecode and queryreplace arrays, that will look something like\n\t\t//tagname=$matches[i] where i is the current $i\n\t\tfor ( $i = 0; $i < $num_tokens; ++$i ) {\n\t\t\tif ( 0 < $i )\n\t\t\t\t$queries[$i] = $queries[$i - 1] . '&';\n\t\t\telse\n\t\t\t\t$queries[$i] = '';\n\n\t\t\t$query_token = str_replace($wp_rewrite->rewritecode, $wp_rewrite->queryreplace, $tokens[0][$i]) . $wp_rewrite->preg_index($i+1);\n\t\t\t$queries[$i] .= $query_token;\n\t\t}\n\n\t\t//get the structure, minus any cruft (stuff that isn't tags) at the front\n\t\t$structure = $permalink_structure;\n\t\tif ( $front != '/' )\n\t\t\t$structure = str_replace($front, '', $structure);\n\n\t\t//create a list of dirs to walk over, making rewrite rules for each level\n\t\t//so for example, a $structure of /%year%/%month%/%postname% would create\n\t\t//rewrite rules for /%year%/, /%year%/%month%/ and /%year%/%month%/%postname%\n\t\t$structure = trim($structure, '/');\n\n\t\t//strip slashes from the front of $front\n\t\t$struct = preg_replace('|^/+|', '', $front);\n\n\t\t//get the struct for this dir, and trim slashes off the front\n\t\t$struct .= $structure . '/'; //accumulate. see comment near explode('/', $structure) above\n\t\t$struct = ltrim($struct, '/');\n\n\t\t//replace tags with regexes\n\t\t$match = str_replace($wp_rewrite->rewritecode, $wp_rewrite->rewritereplace, $struct);\n\n\t\t//make a list of tags, and store how many there are in $num_toks\n\t\t$num_toks = preg_match_all('/%.+?%/', $struct, $toks);\n\n\t\t//get the 'tagname=$matches[i]'\n\t\t$query = ( isset($queries) && is_array($queries) ) ? $queries[$num_toks - 1] : '';\n\n if ( $num_toks ) {\n // In the case we build for each and every page ( based on a simple %pagename% rule ) the rewrite rules,\n // we need to add them first, then the post rules\n if ( $wp_rewrite->use_verbose_page_rules )\n $rewrite_rules = array_merge ( $this->page_rewrite_rules(), $this->add_rewrite_rules( $match, $query, $num_toks ) );\n else\n $rewrite_rules = array_merge ( $this->add_rewrite_rules( $match, $query, $num_toks ), $this->page_rewrite_rules() );\n }\n\n return $rewrite_rules;\n\t}", "title": "" }, { "docid": "e6d5990333bafd459eb2a72ec15478b6", "score": "0.5482942", "text": "function my_rewrite_flush() {\n // First, we \"add\" the custom post type via the above written function.\n // Note: \"add\" is written with quotes, as CPTs don't get added to the DB,\n // They are only referenced in the post_type column with a post entry, \n // when you add a post of this CPT.\n nb_cbl_cpt();\n nb_cbl_tax();\n\n // ATTENTION: This is *only* done during plugin activation hook in this example!\n // You should *NEVER EVER* do this on every page load!!\n flush_rewrite_rules();\n}", "title": "" }, { "docid": "5f8358f8b27f71239d257f2d75fc367a", "score": "0.54675215", "text": "public function add_month_archive_items() {\n\n\t\t\t/* Add $wp_rewrite->front to the trail. */\n\t\t\t$this->add_rewrite_front_items();\n\n\t\t\t/* Get the year and month. */\n\t\t\t$year = sprintf(\n\t\t\t\t$this->args['labels']['archive_year'],\n\t\t\t\tget_the_time( $this->args['date_labels']['archive_year'] )\n\t\t\t);\n\t\t\t$month = sprintf(\n\t\t\t\t$this->args['labels']['archive_month'],\n\t\t\t\tget_the_time( $this->args['date_labels']['archive_month'] )\n\t\t\t);\n\n\t\t\t/* Add the year item. */\n\t\t\t$this->_add_item(\n\t\t\t\t'link_format',\n\t\t\t\t$year,\n\t\t\t\tget_year_link( get_the_time( 'Y' ) )\n\t\t\t);\n\n\t\t\t/* Add the month item. */\n\t\t\tif ( is_paged() ) {\n\t\t\t\t$this->_add_item(\n\t\t\t\t\t'link_format',\n\t\t\t\t\t$month,\n\t\t\t\t\tget_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) )\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t\t$this->_add_item( 'target_format', $month );\n\t\t}", "title": "" }, { "docid": "356c7180b5ccd5ea75f868506d9a098f", "score": "0.5437394", "text": "function employees_rewrite_flush() {\r\n // Note: \"add\" is written with quotes, as CPTs don't get added to the DB,\r\n // They are only referenced in the post_type column with a post entry,\r\n // when you add a post of this CPT.\r\n employees_custom_posttypes();\r\n\r\n // ATTENTION: This is *only* done during plugin activation hook in this example!\r\n // You should *NEVER EVER* do this on every page load!!\r\n flush_rewrite_rules();\r\n}", "title": "" }, { "docid": "decd7d97d78d7907dbac7ebb5abfc8c4", "score": "0.543133", "text": "function generate_staff_taxonomy_rewrite_rules( $wp_rewrite ) {\n $rules = array();\n $post_types = get_post_types( array( 'name' => 'staff', 'public' => true, '_builtin' => false ), 'objects' );\n $taxonomies = get_taxonomies( array( 'name' => 'department', 'public' => true, '_builtin' => false ), 'objects' );\n $taxonomies += get_taxonomies( array( 'name' => 'unit', 'public' => true, '_builtin' => false ), 'objects' );\n\n foreach ( $post_types as $post_type ) {\n $post_type_name = $post_type->name; // 'developer'\n $post_type_slug = $post_type->rewrite['slug']; // 'developers'\n\n foreach ( $taxonomies as $taxonomy ) {\n if ( $taxonomy->object_type[0] == $post_type_name ) {\n $terms = get_categories( array( 'type' => $post_type_name, 'taxonomy' => $taxonomy->name, 'hide_empty' => 0 ) );\n foreach ( $terms as $term ) {\n $rules[$post_type_slug . '/' . $term->slug . '/?$'] = 'index.php?' . $term->taxonomy . '=' . $term->slug;\n }\n }\n }\n }\n $wp_rewrite->rules = $rules + $wp_rewrite->rules;\n}", "title": "" }, { "docid": "8c175df719b60277a208fca008572f0e", "score": "0.5402961", "text": "function generate_anatomy_taxonomy_rewrite_rules( $wp_rewrite ) {\n $rules = array();\n $post_types = get_post_types( array( 'name' => 'anatomy', 'public' => true, '_builtin' => false ), 'objects' );\n $taxonomies = get_taxonomies( array( 'name' => 'anatomy_type', 'public' => true, '_builtin' => false ), 'objects' );\n $taxonomies += get_taxonomies( array( 'name' => 'a_library', 'public' => true, '_builtin' => false ), 'objects' );\n\n foreach ( $post_types as $post_type ) {\n $post_type_name = $post_type->name; // 'developer'\n $post_type_slug = $post_type->rewrite['slug']; // 'developers'\n\n foreach ( $taxonomies as $taxonomy ) {\n if ( $taxonomy->object_type[0] == $post_type_name ) {\n $terms = get_categories( array( 'type' => $post_type_name, 'taxonomy' => $taxonomy->name, 'hide_empty' => 0 ) );\n foreach ( $terms as $term ) {\n $rules[$post_type_slug . '/' . $term->slug . '/?$'] = 'index.php?' . $term->taxonomy . '=' . $term->slug;\n }\n }\n }\n }\n $wp_rewrite->rules = $rules + $wp_rewrite->rules;\n}", "title": "" }, { "docid": "6efb6ef1f3e8214068df7d4b1440d2b7", "score": "0.53737694", "text": "function akavalanches_create_posttype_forecast_accidents() {\n\t$slug = \"accidents\";\n register_post_type( 'forecast_acccidents',\n \n array(\n 'labels' => array(\n 'name' => __( 'Accidents' ),\n 'singular_name' => __( 'Accident' )\n ),\n 'public' => true,\n 'publicly_queryable' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => $slug),\n 'show_in_menu' => 'akavalanches',\n )\n );\n}", "title": "" }, { "docid": "238fe831902c11c6a3a42e5980dae2b9", "score": "0.5361573", "text": "function add_custom_feed() {\n global $wp_rewrite;\n add_action('do_feed_custom_feed', 'create_custom_feed', 10, 1);\n add_filter('rewrite_rules_array','customise_feed_rules');\n $wp_rewrite->flush_rules();\n}", "title": "" }, { "docid": "b2dcc61a9f314ae8f8c33031bb986f10", "score": "0.5354636", "text": "public static function activate() {\r\n // when a plugin registers a custom post type. This gets rid of the nasty 404 errors.\r\n ReferenceLinkOrganizer::setup_post_type();\r\n flush_rewrite_rules(); \r\n }", "title": "" }, { "docid": "f33e3cf092faba1e17baf224425deb35", "score": "0.53431207", "text": "function oncologiafilter_install() {\n \n // Clear the permalinks after the post type has been registered\n flush_rewrite_rules();\n \n}", "title": "" }, { "docid": "0dbcf7727fc1dca93e975d8b02a80274", "score": "0.5333133", "text": "function init(){\n\n\t\t\t// REGISTER POST TYPES\n\t\t\tforeach( $this->getPostTypes() as $post_type ){\n\t\t\t\tregister_post_type($post_type['slug'],\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'labels' \t\t\t\t=> $post_type['labels'],\n\t\t\t\t\t\t'public' \t\t\t\t=> isset( $post_type['public'] ) ? $post_type['public'] : true,\n\t\t\t\t\t\t'publicly_queryable' \t=> true,\n\t\t\t\t\t\t'show_ui'\t\t\t\t=> true,\n\t\t\t\t\t\t'query_var' \t\t\t=> true,\n\t\t\t\t\t\t//'rewrite' \t\t\t\t=> array('slug' => $post_type['slug'], 'with_front' => FALSE),\n\t\t\t\t\t\t'has_archive' \t\t\t=> true,\n\t\t\t\t\t\t'menu_icon'\t\t\t\t=> isset( $post_type['menu_icon'] ) ? $post_type['menu_icon'] : 'dashicons-images-alt',\n\t\t\t\t\t\t'supports'\t\t\t\t=>\t$post_type['supports']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// REWRITE PERMALINKS WITH CUSTOM SLUG\n\t\t\t$slug = $this->getSurveySlug();\n\t\t\tif( $slug ){\n\t\t\t\tadd_rewrite_rule( '^' . $slug . '/([^/]+)/?', 'index.php?space_survey=$matches[1]', 'top');\n\t\t\t\tadd_rewrite_rule( '^'.$slug, 'index.php?post_type=space_survey', 'top');\n\t\t\t}\n\n\n\t\t}", "title": "" }, { "docid": "5135c32319dccc9d19f03186faa13ae2", "score": "0.53182626", "text": "function nr_mod_rewrite( $rules ) {\r\n\t$options = get_option('nowReadingOptions');\r\n\tadd_rewrite_rule(preg_quote($options['permalinkBase']) . '([0-9]+)/?$', 'index.php?now_reading_id=$matches[1]', 'top');\r\n\tadd_rewrite_rule(preg_quote($options['permalinkBase']) . 'tag/([^/]+)/?$', 'index.php?now_reading_tag=$matches[1]', 'top');\r\n\tadd_rewrite_rule(preg_quote($options['permalinkBase']) . 'search/?$', 'index.php?now_reading_search=true', 'top');\r\n\tadd_rewrite_rule(preg_quote($options['permalinkBase']) . 'reader/([^/]+)/?$', 'index.php?now_reading_library=1&now_reading_reader=$matches[1]', 'top');\r\n\tadd_rewrite_rule(preg_quote($options['permalinkBase']) . '([^/]+)/([^/]+)/?$', 'index.php?now_reading_author=$matches[1]&now_reading_title=$matches[2]', 'top');\r\n\tadd_rewrite_rule(preg_quote($options['permalinkBase']) . '([^/]+)/?$', 'index.php?now_reading_author=$matches[1]', 'top');\r\n\tadd_rewrite_rule(preg_quote($options['permalinkBase']) . '?$', 'index.php?now_reading_library=1', 'top');\r\n}", "title": "" }, { "docid": "ed92a1cac2082306cf6808a32a89e0c4", "score": "0.53046745", "text": "function taxonomy_slug_rewrite($wp_rewrite) {\r\n $rules = array();\r\n // get all custom taxonomies\r\n $taxonomies = get_taxonomies(array('_builtin' => false), 'objects');\r\n // get all custom post types\r\n $post_types = get_post_types(array('public' => true, '_builtin' => false), 'objects');\r\n \r\n foreach ($post_types as $post_type) {\r\n foreach ($taxonomies as $taxonomy) {\r\n \r\n // go through all post types which this taxonomy is assigned to\r\n foreach ($taxonomy->object_type as $object_type) {\r\n \r\n // check if taxonomy is registered for this custom type\r\n if ($object_type == $post_type->rewrite['slug']) {\r\n \r\n // get category objects\r\n $terms = get_categories(array('type' => $object_type, 'taxonomy' => $taxonomy->name, 'hide_empty' => 0));\r\n \r\n // make rules\r\n foreach ($terms as $term) {\r\n $rules[$object_type . '/' . $term->slug . '/?$'] = 'index.php?' . $term->taxonomy . '=' . $term->slug;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // merge with global rules\r\n $wp_rewrite->rules = $rules + $wp_rewrite->rules;\r\n}", "title": "" }, { "docid": "171d46809e4c6097eae3c93756f9d249", "score": "0.52796686", "text": "function FGArchives_custom_post_type_archive($where, $args) {\n $post_type = isset($args[\"post_type\"]) ? $args[\"post_type\"] : \"post\";\n $where = \"WHERE post_type = '$post_type' AND post_status = 'publish'\";\n return $where; \n}", "title": "" }, { "docid": "d0c872fb6a3aeee9bdacb644c8e7b89e", "score": "0.5275636", "text": "public function add_default_archive_items() {\n\n\t\t\t/* If this is a date-/time-based archive, add $wp_rewrite->front to the trail. */\n\t\t\tif ( is_date() || is_time() ) {\n\t\t\t\t$this->add_rewrite_front_items();\n\t\t\t}\n\n\t\t\t$this->_add_item( 'target_format', $this->args['labels']['archives'] );\n\n\t\t}", "title": "" }, { "docid": "69bfd1266968d5f8984e9bb464e27b53", "score": "0.5272398", "text": "function create_posttype() {\n\n register_post_type( 'postjobs',\n // CPT Options\n array(\n 'labels' => array(\n 'name' => __('Post Jobs')\n ),\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'postjobs'),\n 'show_in_rest' => true,\n 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', ),\n 'menu_icon' => 'dashicons-welcome-write-blog',\n )\n );\n register_post_type( 'postteams',\n // CPT Options\n array(\n 'labels' => array(\n 'name' => __('Post Teams')\n ),\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'postteams'),\n 'show_in_rest' => true,\n 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', ),\n 'menu_icon' => 'dashicons-admin-users',\n )\n );\n}", "title": "" }, { "docid": "137af3f74d6bc42bedf25be3e242fcc8", "score": "0.52666914", "text": "function pyb_rewrite_flush() {\n // Note: \"add\" is written with quotes, as CPTs don't get added to the DB,\n // They are only referenced in the post_type column with a post entry, \n // when you add a post of this CPT.\n pyb_create_post_type();\n flush_rewrite_rules();\n}", "title": "" }, { "docid": "0d98efe763706d61f1c57639c4c0a2b9", "score": "0.5248913", "text": "function lqd_register_taxonomy_project_dates() {\n\t$labels = array(\n\t\t'name' => _x( 'Dates', 'taxonomy general name' ),\n\t\t'singular_name' => _x( 'Date', 'taxonomy singular name' ),\n\t\t'search_items' => __( 'Search Dates' ),\n\t\t'all_items' => __( 'All Dates' ),\n\t\t'parent_item' => null,\n\t\t'parent_item_colon' => null,\n\t\t'edit_item' => __( 'Edit Date' ),\n\t\t'update_item' => __( 'Update Date' ),\n\t\t'add_new_item' => __( 'Add New Date' ),\n\t\t'new_item_name' => __( 'New Date Name' ),\n\t\t'menu_name' => __( 'Dates' ),\n\t);\n\t// Define taxonomy\n $capabilities = array (\n 'manage_terms' => 'manage_project_dates',\n 'edit_terms' => 'edit_project_dates',\n 'delete_terms' => 'delete_project_dates',\n 'assign_terms' => 'assign_project_dates'\n );\n\t$args = array(\n\t\t'hierarchical' => false,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => 'date' ),\n 'capabilities' => $capabilities,\n 'map_meta_cap' => 'true'\n\t);\n\n\t// Register taxonomy.\n\tregister_taxonomy( 'date', array( 'lqdoutreach' ), $args );\n}", "title": "" }, { "docid": "08d3b2aed40d713732fc34ce64591fee", "score": "0.5238184", "text": "function _replace_date( string $post_type, string $type ): void {\n\t$key = '';\n\tif ( 'from' === $type ) {\n\t\t$key = PMK_DATE_FROM;\n\t}\n\tif ( 'to' === $type ) {\n\t\t$key = PMK_DATE_TO;\n\t}\n\tif ( $key ) {\n\t\tadd_filter(\n\t\t\t'get_the_date',\n\t\t\tfunction ( $the_date, $d, $post ) use ( $post_type, $key ) {\n\t\t\t\tif ( $post->post_type !== $post_type ) {\n\t\t\t\t\treturn $the_date;\n\t\t\t\t}\n\t\t\t\t$date = get_post_meta( $post->ID, $key, true );\n\t\t\t\treturn mysql2date( empty( $d ) ? get_option( 'date_format' ) : $d, $date );\n\t\t\t},\n\t\t\t10,\n\t\t\t3\n\t\t);\n\t}\n}", "title": "" }, { "docid": "72ec771ad6eb96e85f77b6f446db618b", "score": "0.5226518", "text": "function generate_tech_taxonomy_rewrite_rules( $wp_rewrite ) {\n $rules = array();\n $post_types = get_post_types( array( 'name' => 'tech', 'public' => true, '_builtin' => false ), 'objects' );\n $taxonomies = get_taxonomies( array( 'name' => 'tech_type', 'public' => true, '_builtin' => false ), 'objects' );\n $taxonomies += get_taxonomies( array( 'name' => 'loan_period', 'public' => true, '_builtin' => false ), 'objects' );\n $taxonomies += get_taxonomies( array( 'name' => 'eligible_user', 'public' => true, '_builtin' => false ), 'objects' );\n $taxonomies += get_taxonomies( array( 'name' => 'library', 'public' => true, '_builtin' => false ), 'objects' );\n\n foreach ( $post_types as $post_type ) {\n $post_type_name = $post_type->name; // 'developer'\n $post_type_slug = $post_type->rewrite['slug']; // 'developers'\n\n foreach ( $taxonomies as $taxonomy ) {\n if ( $taxonomy->object_type[0] == $post_type_name ) {\n $terms = get_categories( array( 'type' => $post_type_name, 'taxonomy' => $taxonomy->name, 'hide_empty' => 0 ) );\n foreach ( $terms as $term ) {\n $rules[$post_type_slug . '/' . $term->slug . '/?$'] = 'index.php?' . $term->taxonomy . '=' . $term->slug;\n }\n }\n }\n }\n $wp_rewrite->rules = $rules + $wp_rewrite->rules;\n}", "title": "" }, { "docid": "5b5be346d2707a5bbd0fbfc397c076dc", "score": "0.5224812", "text": "function sp_events_rewrite_flush() {\n // Note: \"add\" is written with quotes, as CPTs don't get added to the DB,\n // They are only referenced in the post_type column with a post entry, \n // when you add a post of this CPT.\n sp_create_posttype_event();\n\n // ATTENTION: This is *only* done during plugin activation hook in this example!\n // You should *NEVER EVER* do this on every page load!!\n flush_rewrite_rules();\n}", "title": "" }, { "docid": "3e7ab62b4035b7e7eb9734e7c0fd8990", "score": "0.5211609", "text": "public function init_alter_archive_query() {\n\t\tswitch ( $this->get_option( 'alter_archive_query_type' ) ) :\n\t\t\tcase 'post_query':\n\t\t\t\t\\add_filter( 'the_posts', [ $this, '_alter_archive_query_post' ], 10, 2 );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\tcase 'in_query':\n\t\t\t\t\\add_action( 'pre_get_posts', [ $this, '_alter_archive_query_in' ], 9999, 1 );\n\t\t\t\tbreak;\n\t\tendswitch;\n\t}", "title": "" }, { "docid": "66fb9e2d4f7f8b63e56e5c13f60f7762", "score": "0.52077293", "text": "public function add_week_archive_items() {\n\n\t\t\t/* Add $wp_rewrite->front to the trail. */\n\t\t\t$this->add_rewrite_front_items();\n\n\t\t\t/* Get the year and week. */\n\t\t\t$year = sprintf(\n\t\t\t\t$this->args['labels']['archive_year'],\n\t\t\t\tget_the_time( $this->args['date_labels']['archive_year'] )\n\t\t\t);\n\t\t\t$week = sprintf(\n\t\t\t\t$this->args['labels']['archive_week'],\n\t\t\t\tget_the_time( $this->args['date_labels']['archive_week'] )\n\t\t\t);\n\n\t\t\t/* Add the year item. */\n\t\t\t$this->_add_item(\n\t\t\t\t'link_format',\n\t\t\t\t$year,\n\t\t\t\tget_year_link( get_the_time( 'Y' ) )\n\t\t\t);\n\n\t\t\t/* Add the week item. */\n\t\t\tif ( is_paged() ) {\n\n\t\t\t\t$this->_add_item(\n\t\t\t\t\t'link_format',\n\t\t\t\t\t$week,\n\t\t\t\t\tadd_query_arg(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'm' => get_the_time( 'Y' ),\n\t\t\t\t\t\t\t'w' => get_the_time( 'W' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tesc_url( home_url( '/' ) )\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t\t$this->_add_item( 'target_format', $week );\n\n\t\t}", "title": "" }, { "docid": "c62359749987ba6524c50da0ac2db4fe", "score": "0.52041966", "text": "function createDailyCustomPostType(){\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Dailys', 'Post Type General Name', 'crg_text_domain' ),\n\t\t\t'singular_name' => _x( 'Daily', 'Post Type Singular Name', 'crg_text_domain' ),\n\t\t\t'menu_name' => __( 'Dailys', 'crg_text_domain' ),\n\t\t\t'parent_item_colon' => __( 'Parent Daily:', 'crg_text_domain' ),\n\t\t\t'all_items' => __( 'All Dailys', 'crg_text_domain' ),\n\t\t\t'view_item' => __( 'View Daily', 'crg_text_domain' ),\n\t\t\t'add_new_item' => __( 'Add New Daily', 'crg_text_domain' ),\n\t\t\t'add_new' => __( 'Add New', 'crg_text_domain' ),\n\t\t\t'edit_item' => __( 'Edit Daily', 'crg_text_domain' ),\n\t\t\t'update_item' => __( 'Update Daily', 'crg_text_domain' ),\n\t\t\t'search_items' => __( 'Search Daily', 'crg_text_domain' ),\n\t\t\t'not_found' => __( 'Not found', 'crg_text_domain' ),\n\t\t\t'not_found_in_trash' => __( 'Not found in Trash', 'crg_text_domain' ),\n\t\t);\n\t\t$args = array(\n\t\t\t'label' => __( 'Daily', 'crg_text_domain' ),\n\t\t\t'description' => __( 'Dailys', 'crg_text_domain' ),\n\t\t\t'labels' => $labels,\n\t\t\t'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields'),\n\t\t\t'taxonomies' => array( 'Daily-type' ),\n\t\t\t'hierarchical' => false,\n\t\t\t'public' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t\t'show_in_admin_bar' => true,\n\t\t\t'menu_position' => 5,\n\t\t\t//'menu_icon' => $menu_icon,\n\t\t\t'can_export' => true,\n\t\t\t'has_archive' => true,\n\t\t\t'exclude_from_search' => false,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'capability_type' => 'post',\n\t\t);\n\t\tregister_post_type('Daily', $args);\n\n\t\twp_insert_term( __('Wordpress'),'Daily-type', array( 'description' => __('A link to a Wordpress ad'),'slug' => 'feature'));\n\t}", "title": "" }, { "docid": "38dd4f8cb85a6d853fbe4e31ec930a29", "score": "0.51990175", "text": "function quick_event_custom_post_type()\n{\n register_post_type('quick_event',\n array(\n 'labels' => array(\n 'name' => __('Events', 'textdomain'),\n 'singular_name' => __('Event', 'textdomain'),\n ),\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array( 'slug' => 'events' ),\n )\n );\n}", "title": "" }, { "docid": "9adda9fde3b6a8523cb86cde88ba6a7a", "score": "0.51966727", "text": "private function setup_filters() {\n\n add_filter( 'post_type_link', [ $this, 'filter_post_type_link' ], 10, 2 );\n add_filter( 'wp_unique_post_slug', [ $this, 'filter_wp_unique_post_slug' ], 10, 6 );\n add_filter( 'rewrite_rules_array', [ $this, 'filter_rewrite_rules_array' ] );\n add_filter( 'query_vars', [ $this, 'filter_query_vars' ] );\n add_filter( 'template_include', [ $this, 'filter_template_include' ] );\n add_filter( 'pedestal_stream_item_context', [ $this, 'filter_pedestal_stream_item_context' ] );\n add_filter( 'pedestal_get_post_date', [ $this, 'filter_modify_date_time_string' ] );\n add_filter( 'pedestal_get_modified_date', [ $this, 'filter_modify_date_time_string' ] );\n add_filter( 'pedestal_event_get_when', [ $this, 'filter_modify_date_time_string' ] );\n\n foreach ( self::get_post_types() as $post_type ) {\n add_filter( \"manage_{$post_type}_posts_columns\", [ $this, 'filter_manage_posts_columns' ] );\n add_filter( \"manage_edit-{$post_type}_sortable_columns\", [ $this, 'filter_manage_posts_sortable_columns' ] );\n }\n\n }", "title": "" }, { "docid": "5ed271c143b6824758f20568e990b0e0", "score": "0.5177818", "text": "public static function register_post_type_args( $args, $post_type ) {\n\n\t\t\t// Get all public custom post types.\n\t\t\t$post_types = self::get_public_post_types();\n\n\t\t\tif ( isset( $args['public'] ) && $args['public'] && ( ! isset( $args['_builtin'] ) || ! $args['_builtin'] ) ) {\n\n\t\t\t\t$page_for_cpt = self::get_page_for_post_type( $post_type );\n\n\t\t\t\tif ( $page_for_cpt > 0 ) {\n\n\t\t\t\t\t$uri = get_page_uri( $page_for_cpt );\n\n\t\t\t\t\t// If a page is assigned, use that for the rewrite rules.\n\t\t\t\t\tif ( ! empty( $uri ) ) {\n\n\t\t\t\t\t\t$args['has_archive'] = $uri;\n\t\t\t\t\t\t$args['rewrite'] = wp_parse_args( array(\n\t\t\t\t\t\t\t'slug' => $uri,\n\t\t\t\t\t\t\t'with_front' => false\n\t\t\t\t\t\t), (array) $args['rewrite'] );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn $args;\n\n\t\t}", "title": "" }, { "docid": "870a6cc8d2a87c7dd00279395f77ec9f", "score": "0.51706624", "text": "function create_posttype()\n{\n \n register_post_type(\n 'movies',\n // CPT Options\n array(\n 'labels' => array(\n 'name' => __('Movies'),\n 'singular_name' => __('Movie')\n ),\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'movies'),\n 'show_in_rest' => true,\n \n )\n );\n}", "title": "" }, { "docid": "06707df3334d9304a9306176f33ad468", "score": "0.51436627", "text": "function theme_post_types() {\r\n // Portfolio post type\r\n register_post_type('portfolio', array(\r\n 'show_in_rest' => true,\r\n 'supports' => array('title', 'editor', 'excerpt'),\r\n 'public' => true,\r\n 'has_archive' => true,\r\n 'rewrite' => array(\r\n 'slug' => 'portfolio'\r\n ),\r\n 'labels' => array(\r\n 'name' => 'Portfolio',\r\n 'add_new_item' => 'Add New Item',\r\n 'edit_item' => 'Edit Item',\r\n 'all_items' => 'All Items',\r\n 'singular_name' => 'Portfolio'\r\n ),\r\n 'menu_icon' => 'dashicons-art'\r\n ));\r\n\r\n // Artist post type\r\n register_post_type('artist', array(\r\n 'show_in_rest' => true,\r\n 'supports' => array('title', 'editor', 'thumbnail', ),\r\n 'public' => true,\r\n 'labels' => array(\r\n 'name' => 'Artists',\r\n 'add_new_item' => 'Add New Artist',\r\n 'edit_item' => 'Edit Artist',\r\n 'all_items' => 'All Artists',\r\n 'singular_name' => 'Artist'\r\n ),\r\n 'menu_icon' => 'dashicons-admin-appearance'\r\n ));\r\n\r\n // Event post type\r\n register_post_type('event', array(\r\n 'capability_type' => 'event',\r\n 'map_meta_cap' => true,\r\n 'show_in_rest' => true,\r\n 'supports' => array('title', 'editor', 'excerpt'),\r\n 'public' => true,\r\n 'has_archive' => true,\r\n 'rewrite' => array(\r\n 'slug' => 'events'\r\n ),\r\n 'labels' => array(\r\n 'name' => 'Events',\r\n 'add_new_item' => 'Add New Event',\r\n 'edit_item' => 'Edit Event',\r\n 'all_items' => 'All Events',\r\n 'singular_name' => 'Event'\r\n ),\r\n 'menu_icon' => 'dashicons-format-audio'\r\n ));\r\n}", "title": "" }, { "docid": "ba62173ded57018f9f0706c9c80e4675", "score": "0.5135794", "text": "function my_insert_rewrite_rules( $rules ){\n\t $newrules = array();\n\t $newrules['examination/?$'] = 'index.php?post_type=lms_test';\n\t $newrules['examination/page/?([0-9]{1,})/?$'] = 'index.php?post_type=lms_test&paged=$matches[1]';\n\t $newrules['examination/(.+?)/page/?([0-9]{1,})/?$'] = 'index.php?post_type=lms_test&test_category=$matches[1]&paged=$matches[2]';\n\n\t \n\t // print_r($rules);\n\t return $newrules + $rules;\n\t}", "title": "" }, { "docid": "f5da965b64ba856fa5baa8fe58506634", "score": "0.5110224", "text": "protected function register_post_types(){ /* NOP - To be overridden by implementing plugin */ }", "title": "" }, { "docid": "1011168d6bd4e7f36abfc68ab427b308", "score": "0.5104341", "text": "function RewriteRules($wp_rewrite) {\n global $ngg;\n\n\t\t$rewrite_rules = array (\n // XML request\n $this->slug . '/slideshow/([0-9]+)/?$' => 'index.php?imagerotator=true&gid=$matches[1]'\n\t\t);\n\n $rewrite_rules = array_merge($rewrite_rules, $this->generate_rewrite_rules() );\n\t\t$wp_rewrite->rules = array_merge($rewrite_rules, $wp_rewrite->rules);\n\t}", "title": "" }, { "docid": "fdab9e9da0d200647946a31c3e727302", "score": "0.5101025", "text": "function modify_query( $query ) {\n\tif ( !is_admin() && is_tax( 'seasons') && $query->is_main_query() )\n\t{\n $query->set( 'orderby', 'meta_value' );\n\t\t$query->set( 'meta_key', 'fixture-date' );\n\t\t$query->set('nopaging', 1);\n\t}\n\t\n\t// Setup events archive\n if ( !is_admin() && $query->is_post_type_archive( 'events' ) && $query->is_main_query() ) \n {\n $query->set( 'orderby', 'meta_value' );\n\t\t$query->set( 'meta_key', 'date' );\n\t\t$query->set('nopaging', 1);\n\n\t\t$query->set( 'order', 'ASC' );\n\t\t$meta_query = array (\n\t\t\n\t array(\n\t 'key' => 'ical_only',\n\t 'compare' => 'NOT EXISTS'\n\t ) );\n\t\t\n\t\t$query->set( 'meta_query', $meta_query);\n\n }\n\t\n\t// Setup fixtures archive\n if ( !is_admin() && $query->is_post_type_archive( 'fixtures' ) && $query->is_main_query() ) \n {\n \t\n\t\t$query->set( 'meta_key', 'fixture-date' );\n $query->set( 'orderby', 'meta_value' );\n\t\t$query->set('nopaging', 1);\n\t\t$query->set( 'order', 'ASC' );\n\t\t$taxonomy = get_terms ( array ( 'seasons' ) );\n\t\tforeach ($taxonomy as $tax) $taxeslight[] = $tax->slug;\n\t\t$meta_query = array(\n\t\t\t\t\t array(\n\t\t\t\t\t 'taxonomy' => 'seasons',\n\t\t\t\t\t 'field' => 'slug',\n\t\t\t\t\t 'terms' => $taxeslight,\n\t\t\t\t\t 'operator' => 'NOT IN'\n\t\t\t\t\t ));\n\t\t\t\t\t\t\n\t\t$query->set('tax_query', $meta_query);\n\t\t\n\t}\n\n}", "title": "" }, { "docid": "a7e2779020403b885114ed0505d7c4de", "score": "0.50917286", "text": "function sm_slideshow_regiser_post_types(){\n\n\t// -- set arguments for the portfolio_page post type\n\t$sm_slideshow_args = array(\n\t\t'public' => true,\n\t\t'query_var' => 'sm_slideshow',\n\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'sm/qa',\n\t\t\t\t'with_front' => false\n\t\t),\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t),\n\t\t'labels' => array(\n\t\t\t'name' => 'Slideshow',\n\t\t\t'singular_name' => 'Slideshow',\n\t\t\t'add_new' => 'Add a Slideshow',\n\t\t\t'add_new_item' => 'Add a Slideshow',\n\t\t\t'edit_item' => 'Edit a Slideshow',\n\t\t\t'new_item' => 'New Slideshow',\n\t\t\t'view_item' => 'View Slideshow',\n\t\t\t'search_items' => 'Search Slideshows',\n\t\t\t'not_found' => 'No Slideshows Found',\n\t\t\t'not_found_in_trash' => 'No Slideshows Found in Trash'\n\t\t),\n\t\t'capability_type' => 'post',\n 'taxonomies' => array( 'category' ),\n 'has_archive' => true\n\t);\n\n\t// -- register the portfolio post type\n\tregister_post_type( 'sm_slideshow', $sm_slideshow_args );\n}", "title": "" }, { "docid": "cabf149f989a400f65ffbff25d436c74", "score": "0.50752366", "text": "private function hooks() {\n\t\t\tadd_action( 'init', array( $this, 'register_taxonomy' ), 2 );\n\t\t\tadd_action( 'created_term', array( $this, 'trigger_rewrite_rules' ), 10, 3 );\n\t\t\tadd_action( 'edited_term', array( $this, 'trigger_rewrite_rules' ), 10, 3 );\n\t\t\tadd_action( 'delete_term', array( $this, 'trigger_rewrite_rules' ), 10, 3 );\n\t\t\tadd_action( 'save_post', array( $this, 'save_taxonomy_page_type' ) , 10, 2 );\n\t\t\tadd_filter( 'available_permalink_structure_tags', array( $this, 'add_taxonomy_as_permalink_structure' ), 10, 1 );\n\t\t\tadd_filter( 'post_link', array( $this, 'filter_permalink' ), 10, 3 );\n\t\t\tadd_filter( 'post_rewrite_rules', array( $this, 'replace_taxonomy_terms_in_rewrite_rules' ), 10, 1 );\n\t\t}", "title": "" }, { "docid": "f1de3d19de228caee344769f8d0490bf", "score": "0.50711644", "text": "function portfolio_init(){\n $args = array(\n 'public' => true,\n 'has_archive' => true,\n 'show_ui' => true,\n 'capability_type' => 'post',\n 'hierarchical' => false,\n 'rewrite' => array('slug' => 'portfolio'),\n 'query_var' => true,\n 'menu_icon' => 'dashicons-portfolio',\n 'label' => 'Portfolio',\n 'supports' => array(\n 'title',\n 'editor',\n 'excerpt',\n 'custom-fields',\n 'thumbnail',\n 'page-attributes',)\n );\n register_post_type('portfolio', $args);\n\n\n}", "title": "" }, { "docid": "6c439c767662700982933b2423a9de7a", "score": "0.50658745", "text": "function sort_by_date_my_cpt( $query ) {\n if ( is_post_type_archive( 'bot') && $query->is_main_query() ) {\n $query->set('meta_key', 'latest_update_date');\n $query->set('orderby', 'meta_value');\n $query->set('order', 'DESC');\n return;\n }\n if ( is_post_type_archive( 'lto') && $query->is_main_query() ) {\n $query->set('meta_key', 'latest_update_date');\n $query->set('orderby', 'meta_value');\n $query->set('order', 'DESC');\n return;\n }\n if ( is_post_type_archive( 'ofi') && $query->is_main_query() ) {\n $query->set('meta_key', 'latest_update_date');\n $query->set('orderby', 'meta_value');\n $query->set('order', 'DESC');\n return;\n }\n }", "title": "" }, { "docid": "128cbe43ba79ae0be4cf9b2e08e90e8f", "score": "0.5047307", "text": "function aeris_wppl_project_sheets_cpt() {\n register_post_type( \n 'aeris-project-sheets', \t\t\t\t\t\t\t\n array(\n 'label' => __('Project sheet', 'aeris-wppl-project-sheets'),\t\t\t\n 'labels' => array( \t\t\t\n 'name' => __('Projects sheets', 'aeris-wppl-project-sheets'),\n 'singular-name' => __('project sheet', 'aeris-wppl-project-sheets'),\n 'all_items' => __('All projects', 'aeris-wppl-project-sheets'),\n 'add_new_item' => __('Add new project', 'aeris-wppl-project-sheets'),\n 'edit_item' => __('Edit project', 'aeris-wppl-project-sheets'),\n 'new_item' => __('New project', 'aeris-wppl-project-sheets'),\n 'view_item' => __('View project', 'aeris-wppl-project-sheets'),\n 'search_item' => __('Search project', 'aeris-wppl-project-sheets'),\n 'not_found' => __('No project found', 'aeris-wppl-project-sheets'),\n 'not_found_in_trash' => __('No project found in trash', 'aeris-wppl-project-sheets')\n ),\n 'public' => true, \t\t\t\t\n 'show_in_rest' => true, \n 'capability_type' => 'post',\n // rewrite URL \n 'rewrite' => array( 'slug' => 'project'),\n 'supports' => array(\t\t\t\n 'title',\n ),\n 'has_archive' => true, \n // Url vers une icone ou identifiant à choisir parmi celles de WP : https://developer.wordpress.org/resource/dashicons/.\n 'menu_icon' => 'dashicons-media-document'\n ) \n );\n}", "title": "" }, { "docid": "ed213b650ae3257aaaa3b42a61bbaa33", "score": "0.50451905", "text": "function create_my_post_types() {\n\t\n$options = get_option('kuma_theme_options');\n\tif((isset($options['homepageslider']))) {\n\t\n\tregister_post_type( 'homepage_slider',\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t'name' => __( 'Homepage Slider' ),\n\t\t\t'singular_name' => __( 'Slide' ),\n\t\t\t'add_new' => __( 'Add New' ),\n\t\t\t'add_new_item' => __( 'Add New Slide' ),\n\t\t\t'edit' => __( 'Edit' ),\n\t\t\t'edit_item' => __( 'Edit Slide' ),\n\t\t\t'new_item' => __( 'New Slide' ),\n\t\t\t'view' => __( 'View Slide' ),\n\t\t\t'view_item' => __( 'View Slide' ),\n\t\t\t'search_items' => __( 'Search Slides' ),\n\t\t\t'not_found' => __( 'No slides found' ),\n\t\t\t'not_found_in_trash' => __( 'No slides found in Trash' ),\n\t\t\t'parent' => __( 'Parent Slide' ),\n),\n\t\t\t\n\t\t\t'public' => true,\n\t\t\t'exclude_from_search' => true,\n\t\t\t'page-attributes' => true,\n\t\t\t'menu_position' => 20,\n\t\t\t\n\t\t\t'supports' => array( \n\t\t\t'title', \n\t\t\t'editor', \n\t\t\t'thumbnail',\n\t\t\t'revisions',\n\t\t\t'page-attributes'\n\t\t\t\n\t\t\t ),\n\t\t)\n\t); \n}\n\nfunction set_custom_post_types_admin_order($wp_query) {\n if (is_admin()) {\n\n // Get the post type from the query\n $post_type = $wp_query->query['post_type'];\n\n if ( $post_type == 'homepage_slider') {\n\n // 'orderby' value can be any column name\n $wp_query->set('orderby', 'menu_order');\n\n // 'order' value can be ASC or DESC\n $wp_query->set('order', 'ASC');\n }\n }\n}\nadd_filter('pre_get_posts', 'set_custom_post_types_admin_order');\n\n$options = get_option('kuma_theme_options');\n\tif(isset($options['facstafflisting'])) {\n\t\n\tregister_post_type( 'faculty_staff',\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t'name' => __( 'Faculty and Staff' ),\n\t\t\t'singular_name' => __( 'Faculty and Staff' ),\n\t\t\t'add_new' => __( 'Add New' ),\n\t\t\t'add_new_item' => __( 'Add New Faculty or Staff' ),\n\t\t\t'edit' => __( 'Edit' ),\n\t\t\t'edit_item' => __( 'Edit Faculty or Staff' ),\n\t\t\t'new_item' => __( 'New Faculty or Staff' ),\n\t\t\t'view' => __( 'View Faculty or Staff' ),\n\t\t\t'view_item' => __( 'View Faculty or Staff' ),\n\t\t\t'search_items' => __( 'Search Faculty and Staff' ),\n\t\t\t'not_found' => __( 'No super faculty or staff' ),\n\t\t\t'not_found_in_trash' => __( 'No faculty or staff found in Trash' ),\n\t\t\t'parent' => __( 'Parent Facutly or Staff' ),\n),\n\t\t\t'public' => true,\n\t\t\t'menu_position' => 20,\n\t\t\t'supports' => array( \n\t\t\t'title', \n\t\t\t'editor',\n\t\t\t'thumbnail',\n\t\t\t'revisions'\n\t\t\t ),\n\t\t)\n\t);\n}\n\n}", "title": "" }, { "docid": "116545d91a9f836de03d1a0631499210", "score": "0.5036355", "text": "private function modify_posts_array() {\n\n\t\t// Add data to post objects\n\t\t$this->add_posts_terms();\n\t\t$this->add_posts_relevance();\n\n\t\t// Order the posts\n\t\t$this->order_posts();\n\n\t}", "title": "" }, { "docid": "b05772547736af293f68f92771b69edc", "score": "0.5030892", "text": "function configure_custom_post_types() {\n //Use this to configure each Custom Post Type\n /*\n NEVER use these words as post-type names/slugs, they are reserved in Wordpress:\n post\n page\n attachment\n revision\n nav_menu_item\n custom_css\n customize_changeset\n action\n author\n order\n theme\n */\n\n //\"type\", \"singular_label\", and \"plural_label\" are required\n //\"type\" is either \"post\" or \"page\"\n //\"icon\" is the name of dashicons icon, or 'get_template_directory_uri() . \"/images/cutom-posttype-icon-name.png\"' for custom icon\n //Dashicons can be found here: https://developer.wordpress.org/resource/dashicons/#admin-post\n\n /*$sample_cpt = array(\n 'type' => 'post',\n 'singular_label' => '',\n 'plural_label' => '',\n 'slug' => '',\n 'position' => 10,\n 'icon' => '',\n 'queryable' => true,\n 'taxonomies' => array()\n );*/\n\n //Each Custom Post Type will need its own uniquely-named settings array\n //Include each Custom Post Type settings array here\n $settings = array();\n create_custom_post_types( $settings );\n}", "title": "" }, { "docid": "759c4aa1460b850bbc9eb183a6dee514", "score": "0.5016664", "text": "public function add_post_types() {\n $this->post_types = apply_filters('wputh_get_posttypes', array());\n foreach ($this->post_types as $slug => $post_type) {\n\n $args = array(\n 'menu_icon' => 'dashicons-portfolio',\n 'exclude_from_search' => false,\n 'hierarchical' => false,\n 'has_archive' => true,\n 'public' => true,\n 'publicly_queryable' => true,\n 'rewrite' => true,\n 'can_export' => true,\n 'show_ui' => true,\n 'with_front' => true,\n 'taxonomies' => array(),\n 'supports' => array(\n 'title',\n 'editor',\n 'thumbnail'\n )\n );\n\n // Hide only in front\n if (isset($post_type['wputh__hide_front']) && is_bool($post_type['wputh__hide_front']) && $post_type['wputh__hide_front'] !== false) {\n $args['has_archive'] = false;\n $args['public'] = false;\n $args['publicly_queryable'] = false;\n $args['query_var'] = false;\n $args['rewrite'] = false;\n $args['exclude_from_search'] = true;\n }\n\n if (!isset($post_type['keep_adjacents_links_head'])) {\n $this->post_types_without_adjacent[] = $slug;\n }\n unset($post_type['keep_adjacents_links_head']);\n\n // Default label: slug\n if (!isset($post_type['name'])) {\n $post_type['name'] = $this->ucfirst($slug);\n }\n $args['name'] = $post_type['name'];\n\n // Plural\n if (!isset($post_type['plural'])) {\n $post_type['plural'] = $post_type['name'];\n }\n $args['plural'] = $post_type['plural'];\n\n // Female\n $context = 'female';\n if (!isset($post_type['female']) || $post_type['female'] != 1) {\n $post_type['female'] = 0;\n $this->post_types[$slug]['female'] = 0;\n $context = 'male';\n }\n\n // Add array values\n foreach ($this->pt__values_array as $val_name) {\n if (isset($post_type[$val_name])) {\n if (!is_array($post_type[$val_name])) {\n $post_type[$val_name] = array($post_type[$val_name]);\n }\n $args[$val_name] = $post_type[$val_name];\n }\n }\n\n // Fix supports\n $this->post_types[$slug]['add_media_box'] = false;\n if (is_array($args['supports']) && in_array('media', $args['supports'])) {\n $this->post_types[$slug]['add_media_box'] = true;\n }\n\n // Add boolean values\n foreach ($this->pt__values_bool as $val_name) {\n if (isset($post_type[$val_name]) && is_bool($post_type[$val_name])) {\n $args[$val_name] = $post_type[$val_name];\n }\n }\n\n // Add text values\n foreach ($this->pt__values_text as $val_name) {\n if (isset($post_type[$val_name]) && !empty($post_type[$val_name])) {\n $args[$val_name] = $post_type[$val_name];\n }\n }\n\n // Add various values\n foreach ($this->pt__values_var as $val_name) {\n if (isset($post_type[$val_name]) && !empty($post_type[$val_name])) {\n $args[$val_name] = $post_type[$val_name];\n }\n }\n\n $post_type_name = strtolower($post_type['name']);\n $post_type_name_u = $this->ucfirst($post_type_name);\n $post_type_plural = strtolower($post_type['plural']);\n $post_type_plural_u = $this->ucfirst($post_type_plural);\n\n // Labels\n $args['labels'] = array(\n 'name' => $this->ucfirst($post_type['plural']),\n 'singular_name' => $this->ucfirst($post_type['name']),\n 'add_new' => __('Add New', 'wpuposttypestaxos'),\n 'add_new_item' => sprintf(_x('Add New %s', 'male', 'wpuposttypestaxos'), $post_type_name),\n 'edit_item' => sprintf(_x('Edit %s', 'male', 'wpuposttypestaxos'), $post_type_name),\n 'new_item' => sprintf(_x('New %s', 'male', 'wpuposttypestaxos'), $post_type_name),\n 'all_items' => sprintf(_x('All %s', 'male', 'wpuposttypestaxos'), $post_type_plural),\n 'view_item' => sprintf(_x('View %s', 'male', 'wpuposttypestaxos'), $post_type_name),\n 'view_items' => sprintf(_x('View %s', 'maleplural', 'wpuposttypestaxos'), $post_type_plural),\n 'search_items' => sprintf(_x('Search %s', 'male', 'wpuposttypestaxos'), $post_type_name),\n 'not_found' => sprintf(_x('No %s found', 'male', 'wpuposttypestaxos'), $post_type_name),\n 'not_found_in_trash' => sprintf(_x('No %s found in Trash', 'male', 'wpuposttypestaxos'), $post_type_name),\n 'parent_item_colon' => '',\n 'menu_name' => $this->ucfirst($post_type['plural']),\n 'item_published' => sprintf(_x('%s published.', 'male', 'wpuposttypestaxos'), $post_type_name_u),\n 'item_published_privately' => sprintf(_x('%s published privately.', 'male', 'wpuposttypestaxos'), $post_type_name_u),\n 'item_reverted_to_draft' => sprintf(_x('%s reverted to draft.', 'male', 'wpuposttypestaxos'), $post_type_name_u),\n 'item_draft_updated' => sprintf(_x('%s draft updated.', 'male', 'wpuposttypestaxos'), $post_type_name),\n 'item_scheduled' => sprintf(_x('%s scheduled.', 'male', 'wpuposttypestaxos'), $post_type_name_u),\n 'item_updated' => sprintf(_x('%s updated.', 'male', 'wpuposttypestaxos'), $post_type_name_u),\n 'item_saved' => sprintf(_x('%s saved.', 'male', 'wpuposttypestaxos'), $post_type_name_u),\n 'item_submitted' => sprintf(_x('%s submitted.', 'male', 'wpuposttypestaxos'), $post_type_name_u),\n 'item_preview' => sprintf(_x('Preview %s', 'male', 'wpuposttypestaxos'), $post_type_name)\n );\n\n // Allow correct translations for post types with a name starting with a consonant\n $letters = str_split($post_type_name);\n $first_letter = $letters[0];\n if (!in_array($first_letter, $this->non_consonants)) {\n $args['labels']['edit_item'] = sprintf(_x('Edit %s', 'male_consonant', 'wpuposttypestaxos'), $post_type_name);\n $args['labels']['view_item'] = sprintf(_x('View %s', 'male_consonant', 'wpuposttypestaxos'), $post_type_name);\n $args['labels']['item_preview'] = sprintf(_x('Preview %s', 'male_consonant', 'wpuposttypestaxos'), $post_type_name);\n $args['labels']['item_draft_updated'] = sprintf(_x('%s draft updated', 'male_consonant', 'wpuposttypestaxos'), $post_type_name);\n }\n\n // I couldn't use the content of $context var inside of _x() calls because of Poedit :(\n if ($context == 'female') {\n $args['labels']['add_new_item'] = sprintf(_x('Add New %s', 'female', 'wpuposttypestaxos'), $post_type_name);\n $args['labels']['edit_item'] = sprintf(_x('Edit %s', 'female', 'wpuposttypestaxos'), $post_type_name);\n $args['labels']['new_item'] = sprintf(_x('New %s', 'female', 'wpuposttypestaxos'), $post_type_name);\n $args['labels']['all_items'] = sprintf(_x('All %s', 'female', 'wpuposttypestaxos'), $post_type_plural);\n $args['labels']['view_item'] = sprintf(_x('View %s', 'female', 'wpuposttypestaxos'), $post_type_name);\n $args['labels']['view_items'] = sprintf(_x('View %s', 'femaleplural', 'wpuposttypestaxos'), $post_type_plural);\n $args['labels']['search_items'] = sprintf(_x('Search %s', 'female', 'wpuposttypestaxos'), $post_type_name);\n $args['labels']['not_found'] = sprintf(_x('No %s found', 'female', 'wpuposttypestaxos'), $post_type_name);\n $args['labels']['not_found_in_trash'] = sprintf(_x('No %s found in Trash', 'female', 'wpuposttypestaxos'), $post_type_name);\n $args['labels']['item_published'] = sprintf(_x('%s published.', 'female', 'wpuposttypestaxos'), $post_type_name_u);\n $args['labels']['item_published_privately'] = sprintf(_x('%s published privately.', 'female', 'wpuposttypestaxos'), $post_type_name_u);\n $args['labels']['item_reverted_to_draft'] = sprintf(_x('%s reverted to draft.', 'female', 'wpuposttypestaxos'), $post_type_name_u);\n $args['labels']['item_draft_updated'] = sprintf(_x('%s draft updated.', 'female', 'wpuposttypestaxos'), $post_type_name);\n $args['labels']['item_scheduled'] = sprintf(_x('%s scheduled.', 'female', 'wpuposttypestaxos'), $post_type_name_u);\n $args['labels']['item_updated'] = sprintf(_x('%s updated.', 'female', 'wpuposttypestaxos'), $post_type_name_u);\n $args['labels']['item_saved'] = sprintf(_x('%s saved.', 'female', 'wpuposttypestaxos'), $post_type_name_u);\n $args['labels']['item_submitted'] = sprintf(_x('%s submitted.', 'female', 'wpuposttypestaxos'), $post_type_name_u);\n $args['labels']['item_preview'] = sprintf(_x('Preview %s', 'female', 'wpuposttypestaxos'), $post_type_name);\n if (in_array($first_letter, $this->non_consonants)) {\n $args['labels']['item_preview'] = sprintf(_x('Preview %s', 'female_nonconsonant', 'wpuposttypestaxos'), $post_type_name);\n $args['labels']['item_draft_updated'] = sprintf(_x('%s draft updated', 'female_nonconsonant', 'wpuposttypestaxos'), $post_type_name);\n }\n }\n\n if (isset($post_type['labels']) && is_array($post_type['labels'])) {\n $args['labels'] = $post_type['labels'];\n }\n\n register_post_type($slug, $args);\n }\n\n }", "title": "" }, { "docid": "724fc0bf090a1ece539348a1a544fe9e", "score": "0.5015105", "text": "function get_archive_posts($post_type, $per_page = 5, $order = 'DESC') {\n return new WP_Query(\n array(\n 'post_type' => $post_type,\n 'posts_per_page' => $per_page,\n 'order' => $order,\n )\n );\n}", "title": "" }, { "docid": "672c37dd1affb5622065826a32344941", "score": "0.5005442", "text": "function add_custom_post_types() {\n register_post_type( 'portfolio', array(\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'art' ),\n 'has_archive' => true,\n 'hierarchical' => false,\n 'menu_position' => null,\n 'supports' => array( 'title', 'thumbnail', 'revisions' ),\n 'capability_type' => 'post',\n 'capabilities' => array(),\n 'labels' => array(\n 'name' => __( 'Portfolio', 'textdomain' ),\n 'singular_name' => __( 'Artwork', 'textdomain' ),\n 'add_new' => __( 'Add New', 'textdomain' ),\n 'add_new_item' => __( 'Add New Artwork', 'textdomain' ),\n 'edit_item' => __( 'Edit Artwork', 'textdomain' ),\n 'new_item' => __( 'New Artwork', 'textdomain' ),\n 'all_items' => __( 'All Portfolio', 'textdomain' ),\n 'view_item' => __( 'View Artwork', 'textdomain' ),\n 'search_items' => __( 'Search Portfolio', 'textdomain' ),\n 'not_found' => __( 'No artwork found', 'textdomain' ),\n 'not_found_in_trash' => __( 'No artwork found in Trash', 'textdomain' ),\n 'parent_item_colon' => '',\n 'menu_name' => 'Portfolio'\n )\n ) );\n}", "title": "" }, { "docid": "e8d8bb766cb628407a98d0a1c62ca80b", "score": "0.50010496", "text": "public function archive_settings(){\n\t\t//this is a patch for the Tribe Events Calender. There is a conflict with Genesis on\n\t\t//the archive 'events' page where it pulls in the site logo as a featured image if the\n\t\t//Featured image option is selected in the Genesis archive settings\n\t\tif ( is_post_type_archive(apply_filters('unity3_archive_no_featured_image', array('tribe_events'))) ) {\n\t\t\tremove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );\n\t\t\tremove_action( 'genesis_post_content', 'genesis_do_post_image' );\n\t\t}\n\n\t\t//forces the specified archive pages to show full content instead of excerpts\n\t\tif( is_post_type_archive(apply_filters('unity3_archive_full_content', array('tribe_events'))) ){\n\t\t\tremove_action( 'genesis_entry_content', 'genesis_do_post_content' );\n\t\t\tremove_action( 'genesis_post_content', 'genesis_do_post_content' );\n\t\t\tadd_action( 'genesis_entry_content', 'the_content' );\n\t\t\tadd_action( 'genesis_post_content', 'the_content' );\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "722f4a4071a96ae908b54deb36e987d2", "score": "0.4997155", "text": "public function register_post_types() {\n }", "title": "" }, { "docid": "f8a52ea2ecae9b013e88216730d88e6d", "score": "0.49955964", "text": "function CustomWork() {\n \n register_post_type( 'Custom Works',\n // CPT Options\n array(\n 'labels' => array(\n 'name' => __( 'Custom Works' ),\n 'singular_name' => __( 'Movie' )\n ),\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'custom_works'),\n 'show_in_rest' => true,\n 'supports' => array('thumbnail', 'title')\n \n )\n );\n}", "title": "" }, { "docid": "1fbdbf9d9dc532aac4b464e7dac58329", "score": "0.49922332", "text": "function adhc_timeline_post_type() {\n\n\t$labels = array(\n\t\t\"name\" => __( 'Timeline Entries', '' ),\n\t\t\"singular_name\" => __( 'Timeline Entry', '' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'Timeline Entry', '' ),\n\t\t'description' => \"\",\n\t\t'labels' => $labels,\n\t\t'supports' => array( ),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 2,\n\t\t\"menu_icon\" \t\t\t=> \"dashicons-clock\",\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\tregister_post_type( 'timeline-entries', $args );\n\n}", "title": "" }, { "docid": "7b2e8cef9383e5d5256bbfb5a1ca03d9", "score": "0.49885353", "text": "public function registerFilters()\n {\n add_filter( 'post_type_labels_page', [ $this, 'postTypeLabels' ] );\n add_filter( 'display_post_states', [ $this, 'displayPostStates' ], 10, 2 );\n\n add_filter(\n 'thelonius/permastructures/rewrite_rules/post_type/permastruct',\n [ $this, 'parsePostTypePermastruct' ],\n 10,\n 2\n );\n\n add_filter( 'post_link', [ $this, 'parsePostTypePermastruct' ], 10, 2 );\n add_filter( 'post_type_link', [ $this, 'parsePostTypePermastruct' ], 10, 2 );\n add_filter( 'post_type_archive_link', [ $this, 'parsePostTypePermastruct' ], 10, 2 );\n }", "title": "" }, { "docid": "357aeeaf51318c13b41a82578db34d2d", "score": "0.49837393", "text": "function university_adjust_queries($query) { \n \n //Campus event display\n if(!is_admin() AND is_post_type_archive('campus') AND $query->is_main_query()) {\n $query->set('posts_per_page', -1);\n }\n \n //Program event display\n if(!is_admin() AND is_post_type_archive('program') AND $query->is_main_query()) {\n $query->set('orderby', 'title');\n $query->set('order', 'ASC');\n $query->set('posts_per_page', -1);\n }\n\n //orders posts by event date and removes old dates in event archive; $query runs only on intended url; not globally or in the admin pages\n if(!is_admin() AND is_post_type_archive('event') AND $query->is_main_query()) {\n $today = date('Ymd');\n $query->set('meta_key', 'event_date'); \n $query->set('orderby', 'meta_value_num');\n $query->set('order', 'ASC'); \n $query->set('meta_query', array(\n array(\n 'key' => 'event_date',\n 'compare' => '>=', \n 'value' => $today,\n 'type' => 'numeric'\n )\n )\n );\n }\n}", "title": "" }, { "docid": "5c4c86b4afbc0008fbe3b007a1503a82", "score": "0.4956342", "text": "function wpimprov_create_post_type() {\n\n register_taxonomy(\n 'wpimprov_event_team', 'wpimprov_event', array(\n 'label' => __('Teams', 'wpimprov'),\n //'rewrite' => array( 'slug' => 'city' ),\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'hierarchical' => true,\n 'capabilities' => array(\n 'assign_terms' => 'edit_posts',\n 'edit_terms' => 'administrator'\n ),\n )\n );\n\n register_taxonomy(\n 'wpimprov_event_type', 'wpimprov_event', array(\n 'label' => __('Type of event', 'wpimprov'),\n //'rewrite' => array( 'slug' => 'city' ),\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'hierarchical' => true,\n 'capabilities' => array(\n 'assign_terms' => 'edit_posts',\n 'edit_terms' => 'administrator'\n ),\n )\n );\n\n register_post_type('wpimprov_team', array(\n 'labels' => array(\n 'name' => __('Improliga teams', 'wpimprov'),\n 'singular_name' => __('Improliga team', 'wpimprov')\n ),\n 'taxonomies' => array(\n ),\n \"supports\" => array(\n \"title\",\n \"editor\",\n \"thumbnail\",\n \"revisions\",\n ),\n 'public' => true,\n 'has_archive' => true,\n 'menu_icon' => 'dashicons-universal-access-alt',\n 'rewrite' => array('slug' => 'team'),\n )\n );\n\n register_post_type('wpimprov_event', array(\n 'labels' => array(\n 'name' => __('Improliga events', 'wpimprov'),\n 'singular_name' => __('Improliga event', 'wpimprov')\n ),\n 'taxonomies' => array(\n \"wpimprov_event_team\",\n 'wpimprov_event_type'\n ),\n \"supports\" => array(\n \"title\",\n \"editor\",\n \"thumbnail\",\n \"revisions\",\n ),\n 'public' => true,\n 'has_archive' => true,\n 'menu_icon' => 'dashicons-calendar-alt',\n 'rewrite' => array('slug' => 'event'),\n )\n );\n}", "title": "" }, { "docid": "e7042843ed492fb3ab4bba97c3ab3499", "score": "0.49559957", "text": "function register_news_post_type () {\n\n register_post_type (\n DN_POST_TYPE_NAME,\n array(\n 'labels' => array (\n 'name' => 'News Items',\n 'singular_name' => 'News Item',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New News Item',\n 'edit_item' => 'Edit News Item'\n ),\n 'public' => true,\n 'publicly_queryable' => true,\n 'exclude_from_search' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => array (\n 'slug'=> DN_BASE_PERMALINK,\n 'with_front'=> false,\n 'feeds'=> true,\n 'pages'=> true\n ),\n 'capability_type' => 'page',\n 'has_archive' => false,\n 'hierarchical' => true,\n 'menu_icon' => 'dashicons-megaphone',\n 'menu_position' => DN_ADMIN_LINK_POSITION,\n 'supports' => array (\n 'thumbnail',\n 'title',\n 'editor',\n 'excerpt'\n )\n )\n );\n\n }", "title": "" }, { "docid": "43f7c433e6bf7a7814ed457fb2dae735", "score": "0.49508497", "text": "public function register_post_types()\n {\n\n }", "title": "" }, { "docid": "715417d2c0aa92736f4dfaf09fad2047", "score": "0.4949959", "text": "public function register_post_types() {\n\n\t}", "title": "" }, { "docid": "763c17c10539586f657f0eef857a4d8c", "score": "0.4949678", "text": "public function rewrite_rules( $rules ) {\n\n $new_rules = [];\n\n if ( $this->_url_base ) {\n $new_rules[ $this->_url_base . '/([^/]+)/?$' ] = 'index.php?job_listing=$matches[1]';\n }\n\n end( $rules );\n $last_key = key( $rules );\n\n unset( $rules[ $last_key ] );\n\n $custom_rule = [];\n $regex_size = 1;\n $tag_index = 0;\n\n foreach ( $this->_permalink_structure as $structure ) {\n\n // If the permalink structure has a base, or has already had a tag with\n // the custom regex, then all following tags can use the generic matcher.\n if ( in_array( $structure, $this->_allowed_permalink_tags ) ) {\n $tag_index++;\n\n if ( $this->_url_base || $tag_index > 1 ) {\n $regex_size++;\n $custom_rule[] = '([^/]+)';\n continue;\n }\n }\n\n switch( $structure ) {\n case '%listing_type%' :\n $custom_rule[] = '(' . implode( '|', $this->get_listing_types() ) . ')';\n break;\n\n case '%listing_category%' :\n $custom_rule[] = '(' . implode( '|', $this->get_listing_categories() ) . ')';\n break;\n\n case '%listing_region%' :\n $custom_rule[] = '(' . implode( '|', $this->get_listing_regions() ) . ')';\n break;\n\n default :\n $custom_rule[] = $structure;\n $regex_size--;\n break;\n }\n\n $regex_size++;\n }\n\n $custom_rule[] = '([^/]+)/?$';\n $custom_rule = implode( '/', $custom_rule );\n\n $new_rules[ $custom_rule ] = 'index.php?job_listing=$matches[' . $regex_size . ']';\n\n $overwrite_rules = [];\n foreach ( $rules as $regex => $structure ) {\n\n $bracket_index = 0;\n $match_index = 1;\n\n preg_match_all('/\\$matches\\[\\d+\\]/', $structure, $matches, PREG_SET_ORDER );\n\n $regex_parts = explode('/', $regex );\n\n foreach ( $regex_parts as &$part ) {\n\n $first_bracket = strstr( $part, '(' );\n\n if ( $first_bracket && isset( $matches[ $bracket_index ] ) ) {\n\n $structure = str_replace( $matches[ $bracket_index ][0], \"\\$matches[__{$match_index}__]\", $structure );\n $bracket_index++;\n $match_index++;\n\n } elseif ( strstr( $part, '|' ) ) {\n $part = '(' . $part . ')';\n $match_index++;\n }\n }\n\n // Overwrite the structure variables\n $structure = str_replace('__', '', $structure);\n\n $regex = implode('/', $regex_parts);\n $overwrite_rules[ $regex ] = $structure;\n }\n\n $new_rules = array_merge( $overwrite_rules, $new_rules );\n\n return $new_rules;\n }", "title": "" }, { "docid": "9aafb6553c466cc75c03ba9bd35cb147", "score": "0.49482918", "text": "function option_page_posttypes()\n{\n $args = array('public' => true, '_builtin' => false);\n $excluded_post_types = array('participation', 'partners');\n $custom_post_types = get_post_types($args);\n foreach ($custom_post_types as $custom_post_type) {\n if (in_array($custom_post_type, $excluded_post_types)) { } else {\n if (function_exists('acf_add_options_page')) {\n\n $formated_string = str_replace('_', \" \", $custom_post_type);\n\n acf_add_options_sub_page(array(\n 'page_title' => 'Archive options ' . $formated_string . '',\n 'menu_title' => 'Archive options ' . $formated_string . '',\n 'parent_slug' => 'edit.php?post_type=' . $custom_post_type . '',\n ));\n\n $prefix = str_replace(\"_\", \"-\", $custom_post_type);\n $acf_pre = 'acf-options-archive-options-';\n $compiled_acf = $acf_pre .= $prefix;\n\n acf_add_local_field_group(array(\n 'key' => 'archive_options_' . $custom_post_type . '',\n 'title' => 'Archive options ' . $formated_string . '',\n 'location' => array(\n array(\n array(\n 'param' => 'options_page',\n 'operator' => '==',\n 'value' => $compiled_acf,\n ),\n ),\n ),\n 'menu_order' => 0,\n 'position' => 'normal',\n 'style' => 'default',\n 'label_placement' => 'top',\n 'instruction_placement' => 'label',\n 'hide_on_screen' => '',\n ));\n }\n }\n }\n}", "title": "" }, { "docid": "73f2e4f7a65f28dbf6fea4940f2f5be4", "score": "0.49441403", "text": "function register_post_types() {\n\n // Materials\n register_post_type(\n 'materials', array(\n 'public' => true,\n 'show_in_rest' => true,\n 'labels' => array(\n 'name' => pll__('Materais'),\n 'singular_name' => pll__('Material'),\n ),\n 'rewrite' => array(\n 'slug' => 'materials'\n ),\n 'has_archive' => true,\n 'menu_icon' => 'dashicons-playlist-video',\n 'menu_position' => 6,\n 'supports' => array(\n 'title',\n 'thumbnail',\n 'editor',\n 'post-formats',\n 'author',\n 'excerpt',\n ),\n 'taxonomies' => array('post_tag'),\n )\n );\n\n // Tracks\n register_post_type(\n 'tracks', array(\n 'public' => true,\n 'show_in_rest' => true,\n 'labels' => array(\n 'name' => pll__('Trilhas'),\n 'singular_name' => pll__('Trilha'),\n ),\n 'rewrite' => array(\n 'slug' => 'tracks'\n ),\n 'has_archive' => true,\n 'menu_icon' => 'dashicons-excerpt-view',\n 'menu_position' => 7,\n 'supports' => array(\n 'title',\n 'thumbnail',\n 'editor',\n 'author',\n 'excerpt',\n ),\n 'taxonomies' => array('post_tag'),\n )\n );\n\n return;\n\n}", "title": "" }, { "docid": "7993f7420d30040234b48264aadddf61", "score": "0.49423534", "text": "public function register_post_types()\n {\n }", "title": "" }, { "docid": "7993f7420d30040234b48264aadddf61", "score": "0.49423534", "text": "public function register_post_types()\n {\n }", "title": "" }, { "docid": "876feaa6a0e75d9c3d604495d14635bc", "score": "0.4939415", "text": "function Create_Register_Post_Type()\n{\n $labels = array(\n 'name' => _x('Redirection Manager', 'Post type general name', 'textdomain'),\n 'singular_name' => _x('rule', 'Post type singular name', 'textdomain'),\n 'menu_name' => _x('redirection manager', 'Admin Menu text', 'textdomain'),\n 'name_admin_bar' => _x('rule', 'Add New on Toolbar', 'textdomain'),\n\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => array('slug' => 'rule'),\n 'capability_type' => 'post',\n 'menu_icon' => 'dashicons-randomize',\n 'has_archive' => true,\n 'hierarchical' => false,\n 'rewrite' => array('slug' => 'rule'),\n 'capability_type' => 'post',\n 'supports' => array(\n 'title',\n ),\n\n );\n\n register_post_type('rule', $args);\n}", "title": "" }, { "docid": "61b30c5706158e64b4b857ba63708659", "score": "0.49342415", "text": "function _usdp_general_rewrite( $wp_rewrite ) {\n $feed_rules = array(\n 'board-games/(.+)/(.+)' => 'index.php?post_type=games&games=' . $wp_rewrite->preg_index(2) . '&name=' . $wp_rewrite->preg_index(2),\n 'board-games/(.+)' => 'index.php?Categories=' . $wp_rewrite->preg_index(1),\n 'board-games/' => 'index.php?post_type=games'\n );\n\n $wp_rewrite->rules = $feed_rules + $wp_rewrite->rules;\n return $wp_rewrite->rules;\n}", "title": "" }, { "docid": "7e0c7696a07e39e937019e9d42145f9c", "score": "0.49295413", "text": "function widget_eeArchives() {\n\tglobal $wpdb, $wp_locale;\n\t\n\t$args = '';\n\t$defaults = array(\n\t\t'type' => 'monthly', 'limit' => '',\n\t\t'format' => 'html', 'before' => '',\n\t\t'after' => '', 'show_post_count' => false,\n\t\t'echo' => 0\n\t);\n\n\t$r = wp_parse_args( $args, $defaults );\n\textract( $r, EXTR_SKIP );\n\n\tif ( '' == $type )\n\t\t$type = 'monthly';\n\n\tif ( '' != $limit ) {\n\t\t$limit = absint($limit);\n\t\t$limit = ' LIMIT '.$limit;\n\t}\n\t//filters\n\t$where = apply_filters( 'getarchives_where', \"WHERE post_type = 'post' AND post_status = 'publish'\", $r );\n\t$join = apply_filters( 'getarchives_join', '', $r );\n\n\t\n\t\n\t\n\t//var_dump($archive);\n\t$query = \"SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC $limit\";\n\t\t$key = md5($query);\n\t\t$cache = wp_cache_get( 'wp_get_archives' , 'general');\n\t\tif ( !isset( $cache[ $key ] ) ) {\n\t\t\t$arcresults = $wpdb->get_results($query);\n\t\t\t$cache[ $key ] = $arcresults;\n\t\t\twp_cache_set( 'wp_get_archives', $cache, 'general' );\n\t\t} else {\n\t\t\t$arcresults = $cache[ $key ];\n\t\t}\n\t\tif ( $arcresults ) {\n\t\t\t$afterafter = $after;\n\t\t\t//var_dump($arcresults);\n\t\t?>\n\t\t<table width=\"130\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"archive2 fl\" summary=\"\">\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t\t<img width=\"129\" height=\"11\" alt=\"img\" src=\"<?php bloginfo('template_directory'); ?>/images/archives.jpg\">\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td height=\"10\" colspan=\"2\"></td>\n\t\t\t\t</tr>\n\t\t<?php\n\t\n\t\t\tforeach ( (array) $arcresults as $arcresult ) {\n\t\t?>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width=\"80\">\n\t\t\t\t\t<a href=\"<?php echo get_month_link( $arcresult->year, $arcresult->month ); ?>\">\n\t\t\t\t\t\t<?php printf(__('%1$s %2$d'), $wp_locale->get_month($arcresult->month), $arcresult->year); ?>\n\t\t\t\t\t</a>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td width=\"50\" align=\"right\">\n\t\t\t\t\t\t<?php echo $arcresult->posts; ?> posts\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t<?php\n\t\t\t}\n\t\t\t?>\n\t\t\t\t<!--<tr>\n\t\t\t\t\t<td height=\"10\" colspan=\"2\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t\t<a href=\"javascript:void(0);\"><img width=\"129\" height=\"6\" alt=\"img\" src=\"<?php //bloginfo('template_directory'); ?>/images/see_more.jpg\"></a>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>-->\n\t\t\t</tbody></table>\n\t\t\t<?php\n\t\t}\n\t//var_dump($output);\n}", "title": "" }, { "docid": "454324b4d606a6b41c10631c4978f342", "score": "0.4925219", "text": "public function register_post_types() {\n foreach ( $this->post_types() as $post_type ) {\n Clanpress_Helper::register_post_type( $this->id(), $post_type );\n }\n\n // For some reason this is necessary to get the plugin's slugs to work.\n flush_rewrite_rules();\n }", "title": "" }, { "docid": "5ead989cf9c951a51aa8f25e965323a4", "score": "0.49207586", "text": "function register_post_types() {\n }", "title": "" }, { "docid": "eaf8343d261d4101fda59af2b417a242", "score": "0.48999745", "text": "function mastermind_add_rewrite_rules( $wp_rewrite )\n{\n //$my_rules = array();\n //$my_rules['blog/(.+?)/?$'] = 'index.php?pagename=blog&topicname=$matches[1]';\n //$wp_rewrite->rules = $my_rules + $wp_rewrite->rules;\n\n //echo '<pre>'; print_r($wp_rewrite->rules); echo '</pre>';\n\n}", "title": "" }, { "docid": "49e63a7c1b05efd3a1d6de71375c9a25", "score": "0.4892121", "text": "function search_posts_filter( $query ){\n if ($query->is_search){\n $query->set('post_type',array('post','custom_post_type1', 'custom_post_type2'));\n }\n return $query;\n}", "title": "" }, { "docid": "7832a64fc37e634a83d01a7ce24086ca", "score": "0.48897564", "text": "function scm_hook_feed() {\n global $wp_rewrite;\n add_action('do_feed_scm_feed', 'scm_feed_create', 10, 1);\n add_filter('rewrite_rules_array','scm_feed_rules');\n $wp_rewrite->flush_rules();\n}", "title": "" }, { "docid": "54f7c680ec718ad9732f961d02980f00", "score": "0.48882258", "text": "public function add_year_archive_items() {\n\n\t\t\t/* Add $wp_rewrite->front to the trail. */\n\t\t\t$this->add_rewrite_front_items();\n\n\t\t\t/* Get the year. */\n\t\t\t$year = sprintf(\n\t\t\t\t$this->args['labels']['archive_year'],\n\t\t\t\tget_the_time( $this->args['date_labels']['archive_year'] )\n\t\t\t);\n\n\t\t\t/* Add the year item. */\n\t\t\tif ( is_paged() ) {\n\t\t\t\t$this->_add_item(\n\t\t\t\t\t'link_format',\n\t\t\t\t\t$year,\n\t\t\t\t\tget_year_link( get_the_time( 'Y' ) )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$this->_add_item( 'target_format', $year );\n\n\t\t}", "title": "" }, { "docid": "f37bf9d8a5f8b0cf72d852c5b3c3ceaf", "score": "0.4885923", "text": "public function add_json_routes(){\n\t\t$lang = $this->get_lang();\n $data = array();\n $post_types = array('post');\n $post_types = apply_filters('wpgurus_theme_custom_post_routes', $post_types);\n $root = wpgurus_domain_url();\n\t\tif(!empty($post_types)){\n\t foreach($post_types as $type){\n\t $archive = get_post_type_archive_link($type);\n\t $archive = str_replace($root,'/',$archive);\n\t\t\t\t$route = $archive;\n\t\t\t\t$apis = apply_filters(\"wpgurus_theme_additional_api_data\", array(), $route);\n\t\t\t\t$paths = array();\n\t\t\t\tforeach($apis as $api_data){\n\t\t\t\t\t$path = apply_filters(\"wpgurus_theme_additional_api_path\", '', $api_data);\n\t\t\t\t\tif(empty($path)) continue;\n\t\t\t\t\tif(false === strpos($path, 'lang=')){\n\t\t\t\t\t\tif(false === strpos($path, '?') ) $path .='?lang='.$lang;\n\t\t\t\t\t\telse $path .='&lang='.$lang;\n\t\t\t\t\t}\n\t\t\t\t\t$paths[$api_data] = $path;\n\t\t\t\t}\n\n\t\t\t\t$data[$route] = $paths;\n\t\t\t\t$route = $archive.':postName';\n\t\t\t\t$apis = apply_filters(\"wpgurus_theme_additional_api_data\", array(), $route);\n\t\t\t\t$paths = array();\n\t\t\t\tforeach($apis as $api_data){\n\t\t\t\t\t$path = apply_filters(\"wpgurus_theme_additional_api_path\", '', $api_data);\n\t\t\t\t\tif(empty($path)) continue;\n\t\t\t\t\tif(false === strpos($path, 'lang=')){\n\t\t\t\t\t\tif(false === strpos($path, '?') ) $path .='?lang='.$lang;\n\t\t\t\t\t\telse $path .='&lang='.$lang;\n\t\t\t\t\t}\n\t\t\t\t\t$paths[$api_data] = $path;\n\t\t\t\t}\n\t\t\t\t$data[$route] = $paths;\n\t }\n\t\t}\n /**\n * add all published pages to custom routes.\n * add all published posts to custom routes.\n * add all public published cpt to custom routes\n * @since v0.6\n */\n\t\t//get cpt post_types.\n\t\t$cpt_args = array(\n\t\t 'public' => true,\n\t\t '_builtin' => false,\n\t\t\t 'show_ui' => true\n\t\t);\n\t\t$data_pages = array();\n\t\t$cpt_types = get_post_types( $cpt_args, 'objects', 'and' );\n\t\t//by default get the page & post\n $types = array('page', 'post');\n\t\t$rest_bases = array('post'=>'posts', 'page'=>'pages');\n\t\t$front_page = get_option('page_on_front',0);\n\n\t\tif($front_page>0){\n\t\t\t$posts_page = get_option('page_for_posts',0);\n\t\t\tif($posts_page>0){\n\t\t\t\t$archive = get_post_type_archive_link('post');\n\t\t\t\t$route = str_replace($root,'/',$archive);\n\t\t\t\t$data_pages[$route] = array(\n\t\t\t\t\t'rest'=>rest_url('/wp/v2/posts/?lang='.$lang),\n\t\t\t\t\t'post'=>'post',\n\t\t\t\t\t'type'=>'archive'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n foreach($cpt_types as $cpt_type){\n\t\t\t$type = $cpt_type->name;\n $types[] = $type;\n\t\t\t$obj = get_post_type_object($type);\n\t\t\t$rest = empty($obj->rest_base) ? $type : $obj->rest_base;\n\t\t\t$rest_bases[$type] = $rest;\n\t\t\t$archive = get_post_type_archive_link($type);\n\t\t\tif(false !== $archive){\n\t\t\t\t$route = str_replace($root,'/',$archive);\n\t\t\t\t$data_pages[$route] = array(\n\t\t\t\t\t'rest'=>rest_url('/wp/v2/'.$rest.'/?lang='.$lang),\n\t\t\t\t\t'post'=>$type,\n\t\t\t\t\t'type'=>'archive'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t* @todo apply a filter for the type of posts to capture in the vuejs router.\n\t\t*/\n $query = array(\n 'post_type' => $types,\n 'status' => 'published',\n\t\t\t'nopaging' => true\n );\n $pages = get_posts($query);\n if($pages){\n\t\t\t$posts_page = get_option( 'page_for_posts' );\n foreach($pages as $page){\n\t\t\t\t/**\n\t\t\t\t*v0.6 check if the page is used as the posts archive page.\n\t\t\t\t*/\n\t\t\t\tif($posts_page == $page->ID){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$route = str_replace($root,'/',get_permalink($page));\n $data_pages[$route] = array(\n\t\t\t\t\t'rest'=> rest_url('/wp/v2/'.$rest_bases[$page->post_type].'/'.$page->ID.'?lang='.$lang),\n\t\t\t\t\t'post'=>$page->post_type,\n\t\t\t\t\t'type'=>'single',\n\t\t\t\t\t'ID'=>$page->ID,\n 'async'=> apply_filters('wpgurus_themes_asynchronous_vuejs_template', false, $page->post_name, $page->post_type),\n 'script'=> apply_filters('wpgurus_themes_asynchronous_scripts', array(), $page->post_name, $page->post_type )\n\t\t\t\t);\n\t\t\t\t/** @since 2.0.0 add custom routes to pages too.*/\n\t\t\t\t$apis = apply_filters(\"wpgurus_theme_additional_api_data\", array(), $route);\n\t\t\t\t$paths = array();\n\t\t\t\tforeach($apis as $api_data){\n\t\t\t\t\t$path = apply_filters(\"wpgurus_theme_additional_api_path\", '', $api_data);\n\t\t\t\t\tif(empty($path)) continue;\n\t\t\t\t\tif(false === strpos($path, 'lang=')){\n\t\t\t\t\t\tif(false === strpos($path, '?') ) $path .='?lang='.$lang;\n\t\t\t\t\t\telse $path .='&lang='.$lang;\n\t\t\t\t\t}\n\t\t\t\t\t$paths[$api_data] = $path;\n\t\t\t\t}\n\t\t\t\t$data[$route] = $paths;\n }\n }\n\t\t//front page.\n\t\t$page_id = get_option('page_on_front');\n\t\t$home = str_replace($root,'/',home_url('/'));\n\t if ( $page_id > 0 ) {\n\t // Set url for call to retrieve the post, need WP REST API for this\n\t $data_pages[$home] = array(\n\t\t\t\t'rest'=>rest_url( '/wp/v2/pages/' . $page_id.'?lang='.$lang),\n\t\t\t\t'post'=>'page',\n\t\t\t\t'type'=>'single'\n\t\t\t);\n\t\t}else{\n\t\t\t$data_pages[$home] =array(\n\t\t\t\t'rest'=> rest_url( '/wp/v2/posts/?lang='.$lang),\n\t\t\t\t'post'=>'post',\n\t\t\t\t'type'=>'archive'\n\t\t\t);\n\t\t}\n /** add permalinks=>rest paths for taxonomy terms.\n * @since v0.7\n */\n foreach($types as $type){\n $taxonomies = get_object_taxonomies( $type, 'object' );\n foreach($taxonomies as $taxonomy => $tax_obj){\n if(apply_filters('wpgurus_include_taxonomy_routes',false, $taxonomy, $type)){\n\t\t\t\t\t$terms = get_terms( array(\n\t\t\t\t 'taxonomy' => $taxonomy,\n\t\t\t\t 'hide_empty' => false,\n\t\t\t\t\t) );\n\t\t\t\t\tforeach($terms as $term){\n\t\t\t\t\t\t$route = str_replace($root,'/', get_term_link($term, $taxonomy));\n\t\t\t\t\t\t$data_pages[$route] = array(\n\t\t\t\t\t\t\t'rest'=>rest_url( '/wp/v2/'.$rest_bases[$type].'/?'.$taxonomy.'='.$term->term_id.'&lang='.$lang),\n\t\t\t\t\t\t\t'post'=>$type,\n\t\t\t\t\t\t\t'type'=>'archive',\n\t\t\t\t\t\t\t'taxonomy'=>$taxonomy,\n\t\t\t\t\t\t\t'term'=>$term->term_id,\n\t\t\t\t\t\t);\n\t\t\t\t\t\t//in addition add the custom route to this term.\n\t\t\t\t\t\t$base = empty($tax_obj->rest_base) ? $taxonomy : $tax_obj->rest_base ;\n\t\t\t\t\t\t$path = array(\n\t\t\t\t\t\t\t$taxonomy => rest_url('/wp/v2/'. $base .'/'. $term->term_id)\n\t\t\t\t\t\t);\n //let user add additional routes.\n $apis = apply_filters(\"wpgurus_theme_additional_api_data\", array(), $route);\n \t\t\t\tforeach($apis as $api_data){\n \t\t\t\t\t$path = apply_filters(\"wpgurus_theme_additional_api_path\", '', $api_data);\n if(empty($path)) continue;\n \t\t\t\t\tif(false === strpos($path, 'lang=')){\n \t\t\t\t\t\tif(false === strpos($path, '?') ) $path .='?lang='.$lang;\n \t\t\t\t\t\telse $path .='&lang='.$lang;\n \t\t\t\t\t}\n $paths[$api_data] = $path;\n \t\t\t\t}\n $data[$route] = $paths;\n\t\t\t\t\t}\n }\n }\n }\n\t\t/** @since 1.1.0 if current page is 404, stick it in the routes*/\n\t\t$page404id = $this->get_404_page();\n\t\t$is404 = is_404();\n\t\tif( !empty($GLOBALS['wp_query']->posts) && $page404id == $GLOBALS['wp_query']->posts[0]->ID ){\n\t\t\t$is404 = true;\n\t\t}\n\t\tif($is404){ //add to routes for vuejs to load.\n\t\t\t$route = $_SERVER['REQUEST_URI'];\n\t\t\t$data_pages[$route] = array(\n\t\t\t\t'rest'=> '',\n\t\t\t\t'post'=>'page',\n\t\t\t\t'type'=>'single'\n\t\t\t);\n\t\t}\n\t\t/*const VueCustomRoutes*/\n return \\wp_json_encode(array(\n\t\t\t'routes'=>apply_filters('wpgurus_theme_vuejs_custom_routes', $data), //custom extra rest requests.\n\t\t\t'vues'=>apply_filters('wpgurus_theme_vuejs_routes', $data_pages) //default url_path=>rest_path Vue JS routes.\n\t\t));\n }", "title": "" }, { "docid": "8efe9fda7b752351191d0fc87f8a1e1a", "score": "0.48821846", "text": "function dysign_url_rewrite() {\n //global $wp_rewrite;\n\n // # filtres\n // add_rewrite_tag('%filtre%','([^&]+)');\n\n // # filter home\n // $wp_rewrite->add_rule('filtre-([^/]+)$','index.php?filtre=$matches[1]','top');\n\n // # filter cats\n // $wp_rewrite->add_rule('categorie/(.+?)/filtre-([^/]+)$','index.php?category_name=$matches[1]&filtre=$matches[2]','top');\n\n // # filter author\n // $wp_rewrite->add_rule('author/(.+?)/filtre-([^/]+)$','index.php?author_name=$matches[1]&filtre=$matches[2]','top');\n\n\n // //$wp_rewrite->flush_rules();\n}", "title": "" }, { "docid": "b17941481ab4ce28656781cdfa9d54d4", "score": "0.48733118", "text": "function broadcast_rewrite() {\n\t\n\t// Get broadcast terms\n\t$broadcast_terms = get_terms( array( 'taxonomy' => 'broadcast', 'hide_empty' => false ) );\n\t\n\t// Add rewrite rules\n\tforeach ( $broadcast_terms as $broadcast ) {\n\t\tadd_rewrite_rule( $broadcast->slug . '/page/?([0-9]{1,})/?$', 'index.php?broadcast=' . $broadcast->slug . '&paged=$matches[1]', 'top' );\n\t\tadd_rewrite_rule( $broadcast->slug . '([^/].+)?', 'index.php?broadcast=' . $broadcast->slug, 'top' );\n\t}\n\t\n\t// Update polylang rewrite rules with active polylang plugin\n\tif ( function_exists( 'broadcast_rewrite_polylang' ) ) {\n\t\tbroadcast_rewrite_polylang();\n\t}\n}", "title": "" }, { "docid": "957a773cc313eb49ca22e7ec9f34f48d", "score": "0.48724574", "text": "function register_post_types() {\n\t}", "title": "" }, { "docid": "957a773cc313eb49ca22e7ec9f34f48d", "score": "0.48724574", "text": "function register_post_types() {\n\t}", "title": "" }, { "docid": "957a773cc313eb49ca22e7ec9f34f48d", "score": "0.48724574", "text": "function register_post_types() {\n\t}", "title": "" }, { "docid": "957a773cc313eb49ca22e7ec9f34f48d", "score": "0.48724574", "text": "function register_post_types() {\n\t}", "title": "" }, { "docid": "957a773cc313eb49ca22e7ec9f34f48d", "score": "0.48724574", "text": "function register_post_types() {\n\t}", "title": "" }, { "docid": "371364b312a26190590d2a759c280c0b", "score": "0.48699814", "text": "function wp_university_custom_posts() {\n\n // Create the 'Programs' Custom Post type\n // Copied from wordpress codex\n $labels = array(\n 'name' => _x( 'Programs', 'Post type general name', 'programs' ),\n 'singular_name' => _x( 'Program', 'Post type singular name', 'program' ),\n 'menu_name' => _x( 'Programs', 'Admin Menu text', 'menu_program' ),\n 'featured_image' => _x( 'Program Cover Image', 'Overrides the “Featured Image” phrase for this post type. Added in 4.3', 'textdomain' ),\n 'set_featured_image' => _x( 'Set cover image', 'Overrides the “Set featured image” phrase for this post type. Added in 4.3', 'textdomain' ),\n 'add_new_item' => __( 'Add New Program', 'add_new_program' ),\n 'edit_item' => __( 'Edit Program', 'edit-program' ),\n 'all_items' => __('All Programs', 'all_programs'),\n 'name_admin_bar' => _x( 'Program', 'Add New on Toolbar', 'admin_program' ),\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'capability_type' => 'post',\n 'has_archive' => true,\n 'hierarchical' => false,\n 'menu_position' => null,\n 'menu_icon' => 'dashicons-awards',\n 'rewrite' => array( 'slug' => 'programs' ),\n 'supports' => array('title', 'editor'),\n );\n\n register_post_type( 'program', $args );\n\n // Create the Events Custom Post type\n // Copied from wordpress codex\n $labels = array(\n 'name' => _x( 'Events', 'Post type general name', 'events' ),\n 'singular_name' => _x( 'Event', 'Post type singular name', 'event' ),\n 'menu_name' => _x( 'Events', 'Admin Menu text', 'menu_events' ),\n 'featured_image' => _x( 'Event Cover Image', 'Overrides the “Featured Image” phrase for this post type. Added in 4.3', 'textdomain' ),\n 'set_featured_image' => _x( 'Set cover image', 'Overrides the “Set featured image” phrase for this post type. Added in 4.3', 'textdomain' ),\n 'add_new_item' => __( 'Add New Event', 'add_new_event' ),\n 'edit_item' => __( 'Edit Event', 'edit-event' ),\n 'all_items' => __('All Events', 'all_events'),\n 'name_admin_bar' => _x( 'Event', 'Add New on Toolbar', 'admin_event' ),\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'capability_type' => 'post',\n 'has_archive' => true,\n 'hierarchical' => false,\n 'menu_position' => null,\n 'menu_icon' => 'dashicons-calendar',\n 'rewrite' => array( 'slug' => 'events' ),\n 'supports' => array('title', 'editor', 'excerpt'),\n );\n\n register_post_type( 'event', $args );\n}", "title": "" }, { "docid": "8176a2fef2ec69fdeefdc49c9222c94c", "score": "0.48695305", "text": "function codex_custom_posts_init() {\n\t\t$args_courses = array(\n\t 'public' => true,\n\t 'label' => 'Courses',\n\t 'rewrite' => array( 'slug' => 'courses' ),\n\t 'menu_icon' => 'dashicons-book',\n\t 'taxonomies' => array('post_tag', 'category'),\n\t 'has_archive' => true,\n\t 'supports' => array(\n\t 'title', 'editor', 'author', 'thumbnail',\n\t 'excerpt','custom-fields', 'revisions', 'page-attributes'\n\t )\n\t );\n\tregister_post_type('cpt-courses', $args_courses);\n}", "title": "" } ]
c4704a76312f6d0025e18d03ce94fe8a
verifies that everything in the config file is good
[ { "docid": "acb276519f2ff9684ca1b530ac67dfcc", "score": "0.7151872", "text": "public function verifyConfig() {\n if (!$GLOBALS['CONFIG']['output'])\n throw new Exception('Navbar output directory may not be empty');\n if (!$GLOBALS['CONFIG']['input'])\n throw new Exception('Navbar input directory may not be empty');\n if (!is_dir($GLOBALS['CONFIG']['input']))\n throw new Exception('Input directory does not exist');\n if (empty($GLOBALS['CONFIG']['navbar']))\n throw new Exception('Navbar order array may not be empty. Please open config.php to edit.');\n $GLOBALS['CONFIG']['pages'] = Parser::parseDir($GLOBALS['CONFIG']['input']);\n if (empty($GLOBALS['CONFIG']['pages']))\n throw new Exception('Source directory is empty.');\n }", "title": "" } ]
[ { "docid": "de8b8076aa851a1cbede492cb13656ff", "score": "0.7363384", "text": "public function checkConfig();", "title": "" }, { "docid": "11cc7fadf9322a68adc8ca8025c001c9", "score": "0.7350066", "text": "private function checkConfig() {\n\t\t\t// read content\n\t\t\t$content = file_get_contents($this->mainConfigFile);\n\n\t\t\t// check for hint\n\t\t\tif(strpos($content, $this->hint) === false) {\n\t\t\t\t// note:\n\t\t\t\t// sudo chown root:www-data /etc/apache2/apache2.conf\n\t\t\t\t// sudo chmod 771 /etc/apache2/apache2.conf\n\t\t\t\t// include hint and \"include\" option\n\t\t\t\t$fp = fopen($this->mainConfigFile, 'a');\n\t\t\t\tfwrite($fp, $this->hint.\"\\n\".$this->include);\n\t\t\t\tfclose($fp);\n\t\t\t}\n\n\t\t\t// create directory if it does not exist\n\t\t\tif(!file_exists('/etc/apache2/pdaconfig/')) {\n\t\t\t\t// for this you have to change some permissions with the following commands\n\t\t\t\t// 1. sudo chown root:www-data /etc/apache2\n\t\t\t\t// 2. sudo chmod 771 /etc/apache2\n\t\t\t\t//shell_exec('mkdir bla');\n\t\t\t\tmkdir('/etc/apache2/pdaconfig', 0771);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c3c45ae0010f5dd8fb40e6249cad71d8", "score": "0.7152736", "text": "private function validateLoadedConfig(): void\n {\n\n Assert::inArray($this->getMode(), [self::MODE_PUBLIC, self::MODE_MAKE_VENDOR_PRIVATE], \"Mode not valid\");\n Assert::eq('0.1.0', $this->getVersion(), \"Version not valid\");\n Assert::directory($this->getStartPath()->get(), \"Start directory not valid\");\n Assert::directory($this->getPathComposerJson()->get(), \"Composer json directory not valid\");\n }", "title": "" }, { "docid": "e4bd24e2d51ed0432d3e8d62e5d7b8a9", "score": "0.7122854", "text": "public function validateConfig() {\n\n }", "title": "" }, { "docid": "8a22d541576ec2298779451ac60302bc", "score": "0.6940399", "text": "function isConfigPhpValid()\n{\n\tglobal $configfile;\n\tif(fopen($configfile, \"r\")) \n\t{ \n\t // If file contains a % then the search/replace hasn't worked\n \t $contents = file_get_contents($configfile);\n\t if(strpos($contents, \"%\")===false)\n\t {\n\t \treturn TRUE;\n\t }\n\t else\n\t {\n\t \treturn FALSE;\n\t }\n\t} \n\telse \n\t{ \n\t return FALSE; \n\t} \n\n}", "title": "" }, { "docid": "a4b88db78e235743d9a5ccbf23664038", "score": "0.69313276", "text": "public function testValidateConfig()\n\t{\n\t\t$config = $this->valid_config;\n\t\t$this->assertTrue(BaseDinkly::validateConfig($config));\n\t}", "title": "" }, { "docid": "422c0d7e5cad07572c6c076d0f937cfd", "score": "0.69100875", "text": "private function _checkConfigFile() {\n return !!file_exists(App::pluginPath('Users') . 'Config' . DS . 'config.php');\n }", "title": "" }, { "docid": "71410946c97d9845a341b860a96921d4", "score": "0.67760676", "text": "public function verifyConfig()\n {\n parent::verifyConfig();\n\n if (empty($this->config['dbconfig']['db_type'])) {\n throw new \\Exception(\"config dbconfig.db_type is empty.\", 1);\n }\n\n if ($this->config['dbconfig']['db_type'] != 'mysql') {\n throw new \\Exception(\"config dbconfig.db_type is not mysql.\", 1);\n }\n\n $mysqlTest = shell_exec(\"mysql --help 2>&1\");\n if (strpos($mysqlTest, 'command not found') !== false) {\n throw new \\Exception(\"mysql not found.\", 1);\n }\n\n $mysqldumpTest = shell_exec(\"mysqldump --help 2>&1\");\n if (strpos($mysqldumpTest, 'command not found') !== false) {\n throw new \\Exception(\"mysqldump not found.\", 1);\n }\n }", "title": "" }, { "docid": "af68687971b4f073f225e8ffc46ee565", "score": "0.6752442", "text": "public function check_config()\n {\n $this->load_config();\n\n if (!$this->configured) {\n return;\n }\n\n $out = $seen = array();\n\n // iterate over the current configuration\n foreach (array_keys($this->config) as $prop) {\n if ($replacement = $this->replaced_config[$prop]) {\n $out['replaced'][] = array('prop' => $prop, 'replacement' => $replacement);\n $seen[$replacement] = true;\n }\n else if (!$seen[$prop] && in_array($prop, $this->obsolete_config)) {\n $out['obsolete'][] = array('prop' => $prop);\n $seen[$prop] = true;\n }\n }\n\n // the old default mime_magic reference is obsolete\n if ($this->config['mime_magic'] == '/usr/share/misc/magic') {\n $out['obsolete'][] = array(\n 'prop' => 'mime_magic',\n 'explain' => \"Set value to null in order to use system default\"\n );\n }\n\n // check config dependencies and contradictions\n if ($this->config['enable_spellcheck'] && $this->config['spellcheck_engine'] == 'pspell') {\n if (!extension_loaded('pspell')) {\n $out['dependencies'][] = array(\n 'prop' => 'spellcheck_engine',\n 'explain' => \"This requires the <tt>pspell</tt> extension which could not be loaded.\"\n );\n }\n else if (!empty($this->config['spellcheck_languages'])) {\n foreach ($this->config['spellcheck_languages'] as $lang => $descr) {\n if (!@pspell_new($lang)) {\n $out['dependencies'][] = array(\n 'prop' => 'spellcheck_languages',\n 'explain' => \"You are missing pspell support for language $lang ($descr)\"\n );\n }\n }\n }\n }\n\n if ($this->config['log_driver'] == 'syslog') {\n if (!function_exists('openlog')) {\n $out['dependencies'][] = array(\n 'prop' => 'log_driver',\n 'explain' => \"This requires the <tt>syslog</tt> extension which could not be loaded.\"\n );\n }\n\n if (empty($this->config['syslog_id'])) {\n $out['dependencies'][] = array(\n 'prop' => 'syslog_id',\n 'explain' => \"Using <tt>syslog</tt> for logging requires a syslog ID to be configured\"\n );\n }\n }\n\n // check ldap_public sources having global_search enabled\n if (is_array($this->config['ldap_public']) && !is_array($this->config['autocomplete_addressbooks'])) {\n foreach ($this->config['ldap_public'] as $ldap_public) {\n if ($ldap_public['global_search']) {\n $out['replaced'][] = array(\n 'prop' => 'ldap_public::global_search',\n 'replacement' => 'autocomplete_addressbooks'\n );\n break;\n }\n }\n }\n\n return $out;\n }", "title": "" }, { "docid": "9bc9f578bccc106eb3de4e49d52b1632", "score": "0.6731168", "text": "function isSysConfigValid()\n{\n global $systemconfig;\n\n\t\tif(fopen($systemconfig, \"r\")) \n\t\t{ \n\t\t // If file is less than 10 lines long it hasn't been filled \n\t \t $lines = count(file($systemconfig));\n\t\t if($lines>10)\n\t\t {\n\t\t \treturn TRUE;\n\t\t }\n\t\t else\n\t\t {\n\t\t \treturn FALSE;\n\t\t }\n\t\t} \n\t\telse \n\t\t{ \n\t\t return FALSE; \n\t\t} \n}", "title": "" }, { "docid": "17f13ed8df80678a34fbbadaa31e7e9a", "score": "0.66770166", "text": "protected function checkConfigurationFile() {\n if (file_exists($this->configFile) === false) {\n die(\"Error: the file 'rocket-nginx.ini' could not be found to generate the configuration. \" .\n \"You must rename the orginal 'rocket-nginx.ini.disabled' file to 'rocket-nginx.ini' and run this script again.\");\n } \n }", "title": "" }, { "docid": "1296c5fd67e3ab4af4e6ce8dc2a7ae5a", "score": "0.6635375", "text": "public static function checkConf()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "1296c5fd67e3ab4af4e6ce8dc2a7ae5a", "score": "0.6635375", "text": "public static function checkConf()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "0139861af3a2d58e6ba36fe713b3303e", "score": "0.6576666", "text": "function configCheck()\n{\n\t$required = [\n\t\t'SCRIPT_URI',\n\t\t'PS_URL_BASE',\n\t\t'TEST_MEDIA_ID',\n\t\t'CIPHER',\n\t];\n\n\tforeach ($required as $constant) {\n\t\t$value = constant($constant);\n\t\tif (empty($value)) {\n\t\t\tthrow new Exception('config.php missing: ' . $constant);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "40f7abdbe6e4eaa512cc896f6c6f9773", "score": "0.6460105", "text": "public static function checkConf()\n\t{\n\t\treturn array(\n\t\t\t'convert_emoticons',\n\t\t\t'convert_groups',\n\t\t\t'convert_members'\n\t\t);\n\t}", "title": "" }, { "docid": "5a5769bf926b42ad48034830580cb1fd", "score": "0.6438924", "text": "function check_config_values($conf) {\n\n\tif (!$conf['database_hostname']) {\n\t\treturn false;\n\t}\n\tif (!$conf['database_name']) {\n\t\treturn false;\n\t}\n\tif (!$conf['database_username']) {\n\t\treturn false;\n\t}\n\tif (!$conf['database_password']) {\n\t\treturn false;\n\t}\n\tif (!$conf['session_length']) {\n\t\treturn false;\n\t}\n\tif (!$conf['session_name']) {\n\t\treturn false;\n\t}\n\tif (!isset($conf['session_cookielife'])) {\n\t\treturn false;\n\t}\n\tif (!isset($conf['session_cookiesecure'])) {\n\t\treturn false;\n\t}\n\tif (isset($conf['debug'])) {\n\t if (!isset($conf['log_path'])) {\n\t\treturn false;\n\t }\n\t}\n\n\treturn true;\n\n}", "title": "" }, { "docid": "caa8f16b1e49d7ee337cc7a548dbdf68", "score": "0.6419225", "text": "protected function checkConfiguration() {\n\t\tglobal $sourceDatabaseConfig;\n\n\t\t$good = true;\n\t\tforeach($sourceDatabaseConfig as $k => $v) {\n\t\t\tif(!$v) {\n\t\t\t\t$this->error(\"Target database variable $k is not defined.\");\t\t\t\t\n\t\t\t\t$good = false;\n\t\t\t}\n\t\t}\n\n\t\treturn $good;\n\t}", "title": "" }, { "docid": "277c1ae6d6bf8a9f251c86c41944c029", "score": "0.63898104", "text": "public function testConfig() {\n\t\t$this->assertEqual(LitleUtil::getConfig('logModel'), Configure::read('Litle.logModel'));\n\t\t$this->assertEqual(LitleUtil::getConfig('field_map'), Configure::read('Litle.field_map'));\n\t\t$this->assertEqual(LitleUtil::getConfig('defaults'), Configure::read('Litle.defaults'));\n\t\t$this->assertEqual(LitleUtil::getConfig('url'), Configure::read('Litle.url'));\n\t\t// not change config on the fly\n\t\t$url = Configure::read('Litle.url');\n\t\tLitleUtil::setConfig('url', 'http://google.com');\n\t\t$this->assertEqual(LitleUtil::getConfig('url'), 'http://google.com');\n\t\t$this->assertEqual(Configure::read('Litle.url'), 'http://google.com');\n\t\tLitleUtil::setConfig('url', $url);\n\t\t$this->assertEqual(LitleUtil::getConfig('url'), $url);\n\t\t$this->assertEqual(Configure::read('Litle.url'), $url);\n\t\t// now testing deeper nestings\n\t\t$orderSource = Configure::read('Litle.defaults.sale.orderSource');\n\t\t$this->assertEqual(LitleUtil::getConfig('defaults.sale.orderSource'), $orderSource);\n\t\tLitleUtil::setConfig('defaults.sale.orderSource', 'bad source');\n\t\t$this->assertEqual(LitleUtil::getConfig('defaults.sale.orderSource'), 'bad source');\n\t\tLitleUtil::setConfig('defaults.sale.orderSource', $orderSource);\n\t\t$this->assertEqual(LitleUtil::getConfig('defaults.sale.orderSource'), $orderSource);\n\t}", "title": "" }, { "docid": "6cf2763faadc771494a6cdcaac2d269f", "score": "0.6334951", "text": "public function testConfig(): void\n\t{\n\t\t\\App\\Config::set('security', 'USER_AUTHY_MODE', 'TOTP_OFF');\n\t\t$this->assertSame(\\App\\Config::security('USER_AUTHY_MODE'), 'TOTP_OFF', 'Problem with saving the configuration');\n\t\t$this->assertFalse(\\Users_Totp_Authmethod::isActive());\n\t\t\\App\\Config::set('security', 'USER_AUTHY_MODE', 'TOTP_OBLIGATORY');\n\t\t\\App\\Config::set('main', 'systemMode', 'demo');\n\t\t$this->assertFalse(\\Users_Totp_Authmethod::isActive());\n\t\t\\App\\Config::set('main', 'systemMode', 'prod');\n\t}", "title": "" }, { "docid": "2ea3eb5390ce9fd39d6e17ee0c37a725", "score": "0.63276696", "text": "function has_config() {\r\n return false;\r\n }", "title": "" }, { "docid": "a4a3344fdadbfd8bb75086eb14620c31", "score": "0.63237816", "text": "private static function verificarConfig() {\r\n\r\n // se o projeto estiver marcado como configurado\r\n if (isset(self::$configurationArray ['project'] ['is_config']) && self::$configurationArray ['project'] ['is_config'] == 'true') {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n // se os campos obrigatórios não estiverem preenchidos\r\n if (!isset(self::$configurationArray ['project'] ['directory']) || !isset(self::$configurationArray ['project'] ['url']) || !isset(self::$configurationArray ['project'] ['applUrl']) || !isset(self::$configurationArray ['project'] ['is_config'])) {\r\n return false;\r\n } else {\r\n // se o direitorio esta alcançando o um arkivo valido\r\n if (is_file(self::$configurationArray ['project'] ['directory']) . 'classes/samus/Samus.php') {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "7c29a57a142ae020a5f3380281d4dd5a", "score": "0.631785", "text": "public function testConfigAll()\n {\n $result = \\Barebone\\Config::read();\n $this->assertTrue(is_array($result));\n\n }", "title": "" }, { "docid": "87641a0be6cb15efa91db450c2734c3e", "score": "0.629728", "text": "function check_config()\n\t{\n\t\tif(@$GLOBALS['egw_info']['setup']['stage']['db'] != 10)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\ttry {\t// catch db errors\n\t\t\t$GLOBALS['egw_setup']->db->select($GLOBALS['egw_setup']->config_table,'config_name,config_value',array('config_app' => 'phpgwapi'),__LINE__,__FILE__);\n\t\t\twhile($GLOBALS['egw_setup']->db->next_record())\n\t\t\t{\n\t\t\t\t$config[$GLOBALS['egw_setup']->db->f(0)] = $GLOBALS['egw_setup']->db->f(1);\n\t\t\t}\n\t\t}\n\t\tcatch (egw_exception_db $e) {\n\t\t\tunset($e);\n\t\t\t// ignore db errors\n\t\t}\n\t\t$GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 2 (Needs Configuration)';\n\t\tif(!count($config))\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\t$config_errors =& $GLOBALS['egw_info']['setup']['config_errors'];\n\t\t$GLOBALS['egw_info']['setup']['config_errors'] = array();\n\t\t$error_msg = null;\n\t\tif (!$this->check_dir($config['temp_dir'],$error_msg))\n\t\t{\n\t\t\t$config_errors[] = lang(\"Your temporary directory '%1' %2\",$config['temp_dir'],$error_msg);\n\t\t}\n\n\t\tif ((!isset($config['file_repository']) || $config['file_repository'] == 'sql') &&\n\t\t\t(!isset($config['file_store_contents']) || $config['file_store_contents'] == 'filesystem') &&\n\t\t\t!$this->check_dir($config['files_dir'],$error_msg,true))\n\t\t{\n\t\t\t$config_errors[] = lang(\"Your files directory '%1' %2\",$config['files_dir'],$error_msg);\n\t\t}\n\t\t// set and create the default backup_dir\n\t\tif (@is_writeable($config['files_dir']) && !$config['backup_dir'] && $config['file_store_contents'] == 'filesystem')\n\t\t{\n\t\t\t$config['backup_dir'] = $config['files_dir'].'/db_backup';\n\t\t\tif (!is_dir($config['backup_dir']) && mkdir($config['backup_dir']))\n\t\t\t{\n\t\t\t\t$GLOBALS['egw_setup']->db->insert($GLOBALS['egw_setup']->config_table,array(\n\t\t\t\t\t'config_value' => $config['backup_dir'],\n\t\t\t\t),array(\n\t\t\t\t\t'config_app' => 'phpgwapi',\n\t\t\t\t\t'config_name' => 'backup_dir',\n\t\t\t\t),__LINE__,__FILE__);\n\t\t\t}\n\t\t}\n\t\tif (isset($config['backup_mincount']))\n\t\t{\n\t\t\t$GLOBALS['egw_setup']->db->insert($GLOBALS['egw_setup']->config_table,array(\n\t\t\t\t'config_value' => $config['backup_mincount'],\n\t\t\t\t),array(\n\t\t\t\t'config_app' => 'phpgwapi',\n\t\t\t\t'config_name' => 'backup_mincount',\n\t\t\t),__LINE__,__FILE__);\n\t\t}\n\t\tif (isset($config['backup_files']))\n\t\t{\n\t\t\t$GLOBALS['egw_setup']->db->insert($GLOBALS['egw_setup']->config_table,array(\n\t\t\t\t'config_value' => (int)$config['backup_files'],\n\t\t\t\t),array(\n\t\t\t\t'config_app' => 'phpgwapi',\n\t\t\t\t'config_name' => 'backup_files',\n\t\t\t),__LINE__,__FILE__);\n\t\t}\n\t\tif (!$this->check_dir($config['backup_dir'],$error_msg,true))\n\t\t{\n\t\t\t$config_errors[] = lang(\"Your backup directory '%1' %2\",$config['backup_dir'],$error_msg);\n\t\t}\n\t\tif ($config_errors)\n\t\t{\n\t\t\treturn 2;\n\t\t}\n\t\t$GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 2 (Configuration OK)';\n\t\treturn 10;\n\t}", "title": "" }, { "docid": "9e32c3add478cd7aa9613dfd6ce2032a", "score": "0.6284554", "text": "function alcuin ($file) {\r\n echo '<li>Searching for configuration file <code>' . $file . '</code>&hellip; ';\r\n $configuration = null;\r\n if (file_exists($file)) {\r\n assert(file_exists($file));\r\n success('Trying to parse configuration file <code>' . $file . '</code>');\r\n try {\r\n // create configuration from file using spyc\r\n $configuration = json_decode(json_encode(spyc_load_file($file)));\r\n if ($configuration === null) {\r\n throw new Exception($file . 'is not a valid YAML file');\r\n }\r\n assert(get_class($configuration) === 'stdClass');\r\n assert($configuration !== null);\r\n }\r\n catch (Exception $e) {\r\n error('The file <code>'.$this->file.'</code> is not in valid YAML format');\r\n }\r\n } else {\r\n error('The file <code>'.$file.'</code> does not exists. Have you forgotten to create it?');\r\n }\r\n\r\n success('Checking for database settings');\r\n if ($configuration->db === null) {\r\n error('The file <code>'.$file.'</code> has not defined a database configuration');\r\n } else {\r\n success('Checking database properties');\r\n $missing_prop = get_missing_prop($configuration->db, ['host', 'name', 'user', 'password']);\r\n if ($missing_prop == null) {\r\n success('Connecting to database server');\r\n try {\r\n // first, test the database connection\r\n $connection = connect_db($configuration);\r\n } catch (Exception $e) {\r\n error('The server could not be connected', $e->getMessage());\r\n }\r\n\r\n // Drop old database\r\n if ($configuration->drop_old_db) {\r\n success('Dropping old database because of configuration');\r\n try {\r\n $connection->exec('DROP SCHEMA IF EXISTS `' . $configuration->db->name . '`');\r\n }\r\n catch (Exception $e) {\r\n error('Could not drop old database ' . $configuration->db->name, $e->getMessage());\r\n }\r\n }\r\n\r\n // create new database\r\n success('Checking whether database <code>' . $configuration->db->name . '</code> exists and creating a new one if it doesn\\'t exists');\r\n try {\r\n $connection->exec('CREATE SCHEMA IF NOT EXISTS`' . $configuration->db->name . '` DEFAULT CHARACTER SET utf8 ;');\r\n }\r\n catch (Exception $e) {\r\n error($e, 'Could not create new database');\r\n }\r\n success();\r\n // success(null);\r\n close_sub(); // Models close\r\n\r\n $processings = [\r\n array(\r\n 'description' => 'Creating model tables in database',\r\n 'func' => 'create_model_in_db'\r\n ),\r\n array(\r\n 'description' => 'Creating associative tables',\r\n 'func' => 'create_assoc_tables'\r\n ),\r\n array(\r\n 'description' => 'Creating indexes for all tables',\r\n 'func' => 'create_table_indexes'\r\n ),\r\n array(\r\n 'description' => 'Creating history tables',\r\n 'func' => 'create_history_tables'\r\n ),\r\n array(\r\n 'description' => 'Creating foreign keys for all tables',\r\n 'func' => 'create_foreign_keys'\r\n ),\r\n array(\r\n 'description' => 'Creating instances',\r\n 'func' => 'create_instances'\r\n ),\r\n array(\r\n 'description' => 'Associating authentication instances with authorization instances',\r\n 'func' => 'associate_authentication_authorization'\r\n ),\r\n array(\r\n 'description' => 'Installing Lumen',\r\n 'func' => 'install_lumen'\r\n ),\r\n array(\r\n 'description' => 'Creating Lumen Configuration Files',\r\n 'func' => 'create_lumen_config'\r\n ),\r\n array(\r\n 'description' => 'Creating Lumen Middleware',\r\n 'func' => 'create_lumen_middleware'\r\n ),\r\n array(\r\n 'description' => 'Creating Lumen Models',\r\n 'func' => 'create_lumen_models'\r\n ),\r\n array(\r\n 'description' => 'Creating Lumen Controllers',\r\n 'func' => 'create_lumen_controllers'\r\n ),\r\n array(\r\n 'description' => 'Creating Lumen Policies',\r\n 'func' => 'create_lumen_policies'\r\n ),\r\n array(\r\n 'description' => 'Creating Lumen Observers',\r\n 'func' => 'create_lumen_observers'\r\n ),\r\n ];\r\n foreach ($processings as $process) {\r\n open_sub($process['description']);\r\n call_user_func($process['func'], $configuration, $connection);\r\n close_sub();\r\n }\r\n try {\r\n // assert(true);\r\n } catch (Exception $e) {\r\n // error('The database ' . $configuration->db->name . ' could not be connected', $e->getMessage());\r\n }\r\n } else {\r\n error('Required properties are missing', $missing_prop);\r\n }\r\n }\r\n}", "title": "" }, { "docid": "099539edcd434f9d990c3f838dbafd90", "score": "0.62782794", "text": "function has_config() {\n return false;\n }", "title": "" }, { "docid": "f6f70eb4cefe8295ab76f5bc9b2339e6", "score": "0.62490886", "text": "protected function validateConfig()\n {\n $defaults = [\n 'tpl_folder',\n 'cache_folder',\n 'tpl_file_format',\n //'compress',\n //'event_emitter',\n ];\n\n foreach ($defaults as $key) {\n if (! isset($this->config[$key])) {\n throw new InvalidConfigException(sprintf(\"Missing a configuration key (%s)\", $key));\n }\n }\n }", "title": "" }, { "docid": "e339be3f633747ff9453cbcbe4243dd1", "score": "0.62191796", "text": "function checkConfig()\n{\n global $MAX_FILESIZE;\n global $UPLOAD_TIMEOUT;\n warnConfig('upload_max_filesize', \"MAX_FILESIZE\", $MAX_FILESIZE);\n warnConfig('post_max_size', \"MAX_FILESIZE\", $MAX_FILESIZE);\n warnConfig('max_input_time', \"UPLOAD_TIMEOUT\", $UPLOAD_TIMEOUT);\n warnConfig('max_execution_time', \"UPLOAD_TIMEOUT\", $UPLOAD_TIMEOUT);\n}", "title": "" }, { "docid": "5a202162f86d47d2fa98ab289eac5d75", "score": "0.6213564", "text": "public function checkConfig() {\n //@todo check gateway against $this->gateway->getDefaultParameters();\n }", "title": "" }, { "docid": "fac121d037f083dd67277cfa1007b6d8", "score": "0.6201932", "text": "public static function checkConf()\n\t{\n\t\treturn array(\n\t\t\t'convert_downloads_files',\n\t\t\t'convert_downloads_reviews'\n\t\t);\n\t}", "title": "" }, { "docid": "eac7489a207754a1676ed53945a94f47", "score": "0.61971146", "text": "public static function checkConf()\n\t{\n\t\treturn array(\n\t\t\t'convertGalleryAlbums',\n\t\t\t'convertGalleryImages'\n\t\t);\n\t}", "title": "" }, { "docid": "f5e8da32a62d7da9b08341347ca82812", "score": "0.618961", "text": "public function checkDatabaseConfig()\n { if (!file_exists(\"config.ini\")){\n throw new Exception(\"config.ini.not.created\");\n }\n\n //config file contains required values?\n $configData = parse_ini_file('config.ini');\n if (empty($configData['DB_HOST']) || empty($configData['DB_NAME']) || empty($configData['DB_USER'])){\n throw new Exception(\"config.ini.not.complete\");\n }\n\n //database connection works?\n try {\n Database::getPDO();\n } catch(Exception $e){\n throw new Exception(\"database.connection.fail\");\n } \n\n return true;\n }", "title": "" }, { "docid": "bbd9b88ee0052737e6c611e9987438af", "score": "0.61839", "text": "public static function checkConf()\n\t{\n\t\treturn array(\n\t\t\t'convertCmsMedia',\n\t\t\t'convertCmsDatabaseRecords'\n\t\t);\n\t}", "title": "" }, { "docid": "75879ac96c0df97aaf853ef92f2994d8", "score": "0.61755586", "text": "public static function checkConf()\n\t{\n\t\treturn array(\n\t\t\t'convert_gallery_albums',\n\t\t\t'convert_gallery_images'\n\t\t);\n\t}", "title": "" }, { "docid": "e252ba4624be4e8b305208edd9444bba", "score": "0.6159517", "text": "static function checkSetup() {\n\t\tglobal $loitrConfig;\n\n\t\tif ( !file_exists($loitrConfig['keyFile']) || !fopen($loitrConfig['keyFile'], \"r\") )\n\t\t\treturn -1;\n\n\t\tif ( trim($loitrConfig['serviceid']) == '' || $loitrConfig['serviceid'] === false )\n\t\t\treturn -2;\n\n\t\tif ( $loitrConfig['dbConnection']->query(\"select count(*) from {$loitrConfig['tables']['tokens']['aliasedto']}\") === false ||\n\t\t\t$loitrConfig['dbConnection']->query(\"select count(*) from {$loitrConfig['tables']['mappings']['aliasedto']}\") === false )\n\t\t\treturn -3;\n\n\t\t# Wait what? Everything's good? Lets do it then.\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "4a3b468f8732068fd9c0d7bc6728ae86", "score": "0.61537635", "text": "public static function checkSettings()\r\n\t{\r\n if (!is_array(self::$_settings))\r\n {\r\n if (!self::$_settings = parse_ini_file('../config/config.ini', true))\r\n throw new \\Exception('Unable to open ' . '../config/config.ini' . '.');\r\n }\r\n\t}", "title": "" }, { "docid": "e94e6205a78cfbe7b739bf6c426b0d76", "score": "0.61495507", "text": "public static function checkConf()\n\t{\n\t\treturn array(\n\t\t\t'convert_forums_forums',\n\t\t\t'convert_attachments'\n\t\t);\n\t}", "title": "" }, { "docid": "3b5de339ec7e081001c7423008b65176", "score": "0.61311555", "text": "protected function checkConfiguration()\n {\n $configConfig = $this->getConfig();\n\n if ($configConfig['provider'] == Internal::PROVIDER_NAME && empty($configConfig['domain'])) {\n throw new \\InvalidArgumentException('Your main config provider is Internal one and must have a domain setted');\n }\n\n foreach ($this->getEntities() as $name => $data) {\n if (empty($data['route'])) {\n throw new \\InvalidArgumentException(sprintf('%s entity\\'s must have a route setted', $name));\n }\n\n if ($data['provider'] == Internal::PROVIDER_NAME && empty($data['domain'])) {\n throw new \\InvalidArgumentException(sprintf('%s entity\\'s provider is Internal and must have a domain setted', $name));\n }\n }\n }", "title": "" }, { "docid": "9e810f150fc1725fe695895c769f9e9d", "score": "0.61094725", "text": "protected function checkPerms()\n {\n\n //can we write to this file to disable when done template\n if (!is_writeable(\"install/install.php\"))\n {\n $this->throwError(\"install directory is not writeable\");\n return false;\n } \n\n //can we write to the config directory\n if (!file_put_contents(\"config/test.php\",\"TEST\"))\n {\n $this->throwError(\"Unable to write to config/ directory. Please make sure\n the user apache runs as has write access to this directory\");\n return false;\n }\n else unlink(\"config/test.php\");\n\n }", "title": "" }, { "docid": "c2c7a82af2cb86f131cc24794a04bd7a", "score": "0.61029106", "text": "public function validateDbConfigFile()\n\t{\n\t\tif ($this->_isDbConfigValid === null)\n\t\t{\n\t\t\t$messages = array();\n\n\t\t\t$databaseServerName = craft()->config->get('server', ConfigFile::Db);\n\t\t\t$databaseAuthName = craft()->config->get('user', ConfigFile::Db);\n\t\t\t$databaseName = craft()->config->get('database', ConfigFile::Db);\n\t\t\t$databasePort = craft()->config->get('port', ConfigFile::Db);\n\t\t\t$databaseCharset = craft()->config->get('charset', ConfigFile::Db);\n\t\t\t$databaseCollation = craft()->config->get('collation', ConfigFile::Db);\n\n\t\t\tif (StringHelper::isNullOrEmpty($databaseServerName))\n\t\t\t{\n\t\t\t\t$messages[] = Craft::t('The database server name isn’t set in your db config file.');\n\t\t\t}\n\n\t\t\tif (StringHelper::isNullOrEmpty($databaseAuthName))\n\t\t\t{\n\t\t\t\t$messages[] = Craft::t('The database user name isn’t set in your db config file.');\n\t\t\t}\n\n\t\t\tif (StringHelper::isNullOrEmpty($databaseName))\n\t\t\t{\n\t\t\t\t$messages[] = Craft::t('The database name isn’t set in your db config file.');\n\t\t\t}\n\n\t\t\tif (StringHelper::isNullOrEmpty($databasePort))\n\t\t\t{\n\t\t\t\t$messages[] = Craft::t('The database port isn’t set in your db config file.');\n\t\t\t}\n\n\t\t\tif (StringHelper::isNullOrEmpty($databaseCharset))\n\t\t\t{\n\t\t\t\t$messages[] = Craft::t('The database charset isn’t set in your db config file.');\n\t\t\t}\n\n\t\t\tif (StringHelper::isNullOrEmpty($databaseCollation))\n\t\t\t{\n\t\t\t\t$messages[] = Craft::t('The database collation isn’t set in your db config file.');\n\t\t\t}\n\n\t\t\tif (!empty($messages))\n\t\t\t{\n\t\t\t\t$this->_isDbConfigValid = false;\n\t\t\t\tthrow new DbConnectException(Craft::t('Database configuration errors: {errors}', array('errors' => implode(PHP_EOL, $messages))));\n\t\t\t}\n\n\t\t\t$this->_isDbConfigValid = true;\n\t\t}\n\n\t\treturn $this->_isDbConfigValid;\n\t}", "title": "" }, { "docid": "ce3d3341a6e30e9a4056650b33721b24", "score": "0.6093541", "text": "public function testConfigMemberIsNotEmpty() {\n\t\t$this->assertNotEmpty($this->buliBot->getConfig());\n\t}", "title": "" }, { "docid": "946a917bcf23db641a2afcfd6cd4d83f", "score": "0.6085735", "text": "function checkForConfigFile() {\n\n\treturn file_exists('./config.php');\n}", "title": "" }, { "docid": "5e2fb0a20112c5f54f687a83fe4bae36", "score": "0.6071014", "text": "public function testConfigHas()\n {\n $result = \\Barebone\\Config::exists('I_DONT_EXIST');\n $this->assertFalse($result);\n\n // property exists = true\n $result = \\Barebone\\Config::exists('mysql');\n $this->assertTrue($result);\n }", "title": "" }, { "docid": "032b4be44e65a16f3cee3952234ea6e6", "score": "0.6066873", "text": "function check_config_writable() {\n\n\t// file eixsts && is writable, or dir is writable\n\treturn ((file_exists(Config::get('prefix') . '/config/ampache.cfg.php') && is_writable(Config::get('prefix') . '/config/ampache.cfg.php'))\n\t\t|| (!file_exists(Config::get('prefix') . '/config/ampache.cfg.php') && is_writeable(Config::get('prefix') . '/config/')));\n}", "title": "" }, { "docid": "0cc5f42ae1c88b0a299007d10ffa77c0", "score": "0.603742", "text": "abstract public function validate_config($value);", "title": "" }, { "docid": "c9cd16cbdb69c969a14191b9bc927e3a", "score": "0.6026113", "text": "private function _checkIfParsingWasSuccessful()\n {\n if (!is_array($this->_configurationFileContent)) {\n throw new FileParseException(\n 'Could not parse configuration file ' .\n $this->_pathToConfigurationFile . '.', 3\n );\n }\n }", "title": "" }, { "docid": "90edac60ca2ac6cc99ee7e3d4bfc0687", "score": "0.6021602", "text": "public function checkConfig() {\n foreach ($this->config_array as $item) {\n $where = array();\n $where[self::FIELD_NAME] = $item[1];\n $check = array();\n if (!$this->sqlSelectRecord($where, $check)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError()));\n return false;\n }\n if (sizeof($check) < 1) {\n // record does not exist, create default\n $data = array();\n $data[self::FIELD_LABEL] = $item[0];\n $data[self::FIELD_NAME] = $item[1];\n $data[self::FIELD_TYPE] = $item[2];\n $data[self::FIELD_VALUE] = $item[3];\n $data[self::FIELD_DESCRIPTION] = $item[4];\n $data[self::FIELD_UPDATE_WHEN] = date('Y-m-d H:i:s');\n $data[self::FIELD_UPDATE_BY] = 'SYSTEM';\n if (!$this->sqlInsertRecord($data)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError()));\n return false;\n }\n }\n }\n return true;\n }", "title": "" }, { "docid": "aee0b4f17596e1bc96d7eeaba8774d3a", "score": "0.60165185", "text": "protected function checkModuleProperties()\n {\n $className = get_called_class();\n if(!$this->imageDir){\n throw new InvalidConfigException(\"{$className}: \\$image_dir must be defined\");\n }\n $this->imageDir = \\Yii::getAlias($this->imageDir);\n\n if(!file_exists($this->imageDir)){\n throw new InvalidConfigException(\"{$className}: Directory {$this->imageDir} is not exist\");\n }\n\n if(is_writable($this->imageDir)){\n throw new InvalidConfigException(\"{$className}: Directory {$this->imageDir} must be writable\");\n }\n }", "title": "" }, { "docid": "691ab33d8250101d0a1023b153e7cdb2", "score": "0.60108036", "text": "function instance_allow_config() {\n return true;\n }", "title": "" }, { "docid": "a01b27945ccd4f5cec50d7fabdcd3691", "score": "0.6007427", "text": "public function validate(): void\n {\n $paths = $this->getConfigPaths();\n\n foreach ($paths as $path) {\n WP_CLI::line(\n WP_CLI::colorize(\"%B====> Validating $path%n\")\n );\n\n try {\n Toml::parseFile($path);\n WP_CLI::success(\"File '$path' is valid.\");\n } catch (ParseException $parseException) {\n WP_CLI::error_multi_line([\n $parseException->getMessage(),\n ]);\n\n WP_CLI::warning(\"File '$path' will be ignored.\");\n }\n\n // Print a empty line for better UX.\n WP_CLI::line('');\n }\n }", "title": "" }, { "docid": "68fb15df9f0959160de2c34e28fe6a78", "score": "0.5962144", "text": "public function testFixtureEnvs() {\n $this->assertEquals('FOOBAR', $this->conf['index_page']);\n $this->assertEquals('FOOBAR', $this->conf['uri_protocol']);\n // $this->assertEquals('FOOBAR', $this->conf['webhost']);\n //$this->assertEquals('FOOBAR', $this->conf['subdirectory']);\n $this->assertEquals('FOOBAR', $this->conf['sitename']);\n $this->assertEquals(true, $this->conf['hide_inactive_modules']);\n $this->assertEquals('FOOBAR', $this->conf['recaptchaloginpublickey']);\n $this->assertEquals('FOOBAR', $this->conf['recaptchaloginprivatekey']);\n $this->assertEquals(true, $this->conf['enable_business_units']);\n $this->assertEquals(true, $this->conf['auth_secure']);\n $this->assertEquals('FOOBAR', $this->conf['vnc_link']);\n $this->assertEquals('FOOBAR', $this->conf['ssh_link']);\n\n //$this->assertEquals(['FOO','BAR'], $this->conf['bundleid_ignorelist']);\n //$this->assertEquals(['FOO','BAR'], $this->conf['bundlepath_ignorelist']);\n\n // GSX\n // $this->assertEquals(true, $this->conf['gsx_enable']);\n // $this->assertEquals('FOOBAR', $this->conf['gsx_cert']);\n // $this->assertEquals('FOOBAR', $this->conf['gsx_cert_keypass']);\n // $this->assertEquals('FOOBAR', $this->conf['gsx_sold_to']);\n // $this->assertEquals('FOOBAR', $this->conf['gsx_ship_to']);\n // $this->assertEquals('FOOBAR', $this->conf['gsx_username']);\n\n // $this->assertEquals(true, $this->conf['usb_internal']);\n // $this->assertEquals(true, $this->conf['fonts_system']);\n // $this->assertEquals('FOOBAR', $this->conf['google_maps_api_key']);\n $this->assertEquals(['FOO','BAR'], $this->conf['curl_cmd']);\n $this->assertEquals('FOOBAR', $this->conf['mwa2_link']);\n $this->assertEquals(['FOO','BAR'], $this->conf['modules']);\n\n // AUTH_AD\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_AD']['account_suffix']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_AD']['base_dn']);\n $this->assertEquals(['FOO','BAR'], $this->conf['auth']['auth_AD']['domain_controllers']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_AD']['admin_username']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_AD']['admin_password']);\n $this->assertEquals(['FOO','BAR'], $this->conf['auth']['auth_AD']['mr_allowed_users']);\n $this->assertEquals(['FOO','BAR'], $this->conf['auth']['auth_AD']['mr_allowed_groups']);\n $this->assertEquals(true, $this->conf['auth']['auth_AD']['mr_recursive_groupsearch']);\n\n // AUTH_LDAP\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_ldap']['server']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_ldap']['usertree']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_ldap']['grouptree']);\n $this->assertEquals(['FOO','BAR'], $this->conf['auth']['auth_ldap']['mr_allowed_users']);\n $this->assertEquals(['FOO','BAR'], $this->conf['auth']['auth_ldap']['mr_allowed_groups']);\n\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_ldap']['userfilter']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_ldap']['groupfilter']);\n $this->assertEquals(99, $this->conf['auth']['auth_ldap']['port']);\n $this->assertEquals(99, $this->conf['auth']['auth_ldap']['version']);\n $this->assertEquals(true, $this->conf['auth']['auth_ldap']['starttls']);\n $this->assertEquals(true, $this->conf['auth']['auth_ldap']['referrals']);\n $this->assertEquals(99, $this->conf['auth']['auth_ldap']['deref']);\n\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_ldap']['binddn']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_ldap']['bindpw']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_ldap']['userscope']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_ldap']['groupscope']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_ldap']['groupkey']);\n $this->assertEquals(true, $this->conf['auth']['auth_ldap']['debug']);\n\n // AUTH_SAML\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_saml']['sp']['NameIDFormat']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_saml']['sp']['entityId']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_saml']['idp']['entityId']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_saml']['idp']['singleSignOnService']['url']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_saml']['idp']['singleLogoutService']['url']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_saml']['idp']['x509cert']);\n $this->assertEquals(['FOO' => 'user', 'BAR' => 'groups'], $this->conf['auth']['auth_saml']['attr_mapping']);\n $this->assertEquals(['FOO','BAR'], $this->conf['auth']['auth_saml']['mr_allowed_users']);\n $this->assertEquals(['FOO','BAR'], $this->conf['auth']['auth_saml']['mr_allowed_groups']);\n $this->assertEquals(true, $this->conf['auth']['auth_saml']['disable_sso']);\n $this->assertEquals(true, $this->conf['auth']['auth_saml']['debug']);\n \n $this->assertEquals(true, $this->conf['auth']['auth_saml']['security']['nameIdEncrypted']);\n $this->assertEquals(true, $this->conf['auth']['auth_saml']['security']['authnRequestsSigned']);\n $this->assertEquals(true, $this->conf['auth']['auth_saml']['security']['logoutRequestSigned']);\n $this->assertEquals(true, $this->conf['auth']['auth_saml']['security']['logoutResponseSigned']);\n $this->assertEquals(true, $this->conf['auth']['auth_saml']['security']['signMetadata']);\n $this->assertEquals(true, $this->conf['auth']['auth_saml']['security']['wantMessagesSigned']);\n $this->assertEquals(true, $this->conf['auth']['auth_saml']['security']['wantAssertionsEncrypted']);\n $this->assertEquals(true, $this->conf['auth']['auth_saml']['security']['wantAssertionsSigned']);\n $this->assertEquals(true, $this->conf['auth']['auth_saml']['security']['wantNameId']);\n $this->assertEquals(true, $this->conf['auth']['auth_saml']['security']['wantNameIdEncrypted']);\n $this->assertEquals(true, $this->conf['auth']['auth_saml']['security']['requestedAuthnContext']);\n $this->assertEquals(true, $this->conf['auth']['auth_saml']['security']['wantXMLValidation']);\n $this->assertEquals(true, $this->conf['auth']['auth_saml']['security']['relaxDestinationValidation']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_saml']['security']['signatureAlgorithm']);\n $this->assertEquals('FOOBAR', $this->conf['auth']['auth_saml']['security']['digestAlgorithm']);\n $this->assertEquals(true, $this->conf['auth']['auth_saml']['security']['lowercaseUrlencoding']);\n\n }", "title": "" }, { "docid": "db920986490da9bf51f59b43da10892c", "score": "0.59383774", "text": "public function checkJoomlaConfig()\n {\n // List of keys (meta => conf)\n $keys = array(\n 'xmlrpc_url' => 'xmlrpc_url',\n 'api_user' => 'api_user',\n 'api_key' => 'api_key',\n );\n\n // Check the Joomla! settings\n foreach($keys as $meta_key => $conf_key) {\n $conf_value = Mage::getStoreConfig('magebridge/settings/'.$conf_key);\n $meta_value = $this->getMetaData($meta_key);\n if(empty($conf_value)) {\n Mage::getConfig()->saveConfig('magebridge/settings/'.$conf_key, $meta_value);\n }\n }\n }", "title": "" }, { "docid": "5a61037fa953422a517f0c4d7f814094", "score": "0.5921032", "text": "protected function isValidFile()\n {\n return file_exists($this::CONFIG_DIR . $this->fileName())\n && is_readable($this::CONFIG_DIR . $this->fileName());\n }", "title": "" }, { "docid": "9c76bee4959511be8a93e9917c2aaffc", "score": "0.59180146", "text": "public function testValidXmlFile()\n {\n $dom = new \\DOMDocument();\n $dom->load(__DIR__ . '/../_files/config_valid.xml');\n\n libxml_use_internal_errors(true);\n $errorMessages = \\Magento\\Framework\\Config\\Dom::validateDomDocument($dom, $this->_xsdFilePath);\n libxml_use_internal_errors(false);\n\n $this->assertEmpty($errorMessages);\n }", "title": "" }, { "docid": "3a6ebd43184e1ee9c86cec017584b499", "score": "0.5914494", "text": "function checkConfig() {\n $config = CRM_Core_Config::singleton();\n\n $error = array();\n\n if (empty($this->_paymentProcessor['user_name'])) {\n $error[] = ts('Merchant Identifier must not be empty.');\n }\n\n if (empty($this->_paymentProcessor['password'])) {\n $error[] = ts('Secret Key must not be empty.');\n }\n\n\n if (!empty($error)) {\n return implode('<p>', $error);\n }\n else {\n return NULL;\n }\n }", "title": "" }, { "docid": "b12e392bbedba66727d3cd112348e1c2", "score": "0.5889936", "text": "public function validate_config($config) {\n return parent::validate_config($config);\n }", "title": "" }, { "docid": "c0cf49701ac7e90a9bbdce5bbaa40759", "score": "0.5887964", "text": "public function validate_config_on_load($host_obj)\n\t\t{\n\t\t}", "title": "" }, { "docid": "39975728506d31952a7bd836f39b0a2f", "score": "0.58666575", "text": "protected function checkModuleProperties()\n\t{\n\t\t// set use fields based on required fields\n\t\tif (UsersSettings::requireEmail()) {\n\t\t\t$this->useEmail = true;\n\t\t}\n\t\tif (UsersSettings::requireUsername()) {\n\t\t\t$this->useUsername = true;\n\t\t}\n\n\t\t// get class name for error messages\n\t\t$className = get_called_class();\n\n\t\t// check required fields\n\t\tif (!UsersSettings::requireEmail() && !UsersSettings::requireUsername()) {\n\t\t\tthrow new InvalidConfigException(\"{$className}: \\$requireEmail and/or \\$requireUsername must be true\");\n\t\t}\n\t\t// check login fields\n\t\tif (!UsersSettings::loginEmail() && !UsersSettings::loginUsername()) {\n\t\t\tthrow new InvalidConfigException(\"{$className}: \\$loginEmail and/or \\$loginUsername must be true\");\n\t\t}\n\t\t// check email fields with emailConfirmation/emailChangeConfirmation is true\n\t\tif (\n\t\t\t!UsersSettings::useEmail() &&\n\t\t\t(\n\t\t\t\tUsersSettings::emailConfirmation() ||\n\t\t\t\tUsersSettings::emailChangeConfirmation()\n\t\t\t)\n\t\t) {\n\t\t\t$msg = \"{$className}: \\$useEmail must be true if \\$email(Change)Confirmation is true\";\n\t\t\tthrow new InvalidConfigException($msg);\n\t\t}\n\n\t\t// ensure that the \"user\" component is set properly\n\t\t// this typically causes problems in the yii2-advanced app when people set it in\n\t\t// \"common/config\" instead of \"frontend/config\" and/or \"backend/config\"\n\t\t// -> this results in users failing to login without any feedback/error message\n\t\t$userComponent = Yii::$app->get('user', false);\n\t\tif ($userComponent && !$userComponent instanceof \\amnah\\yii2\\user\\components\\User) {\n\t\t\tthrow new InvalidConfigException('Yii::$app->user is not set properly. It needs to extend \\amnah\\yii2\\user\\components\\User');\n\t\t}\n\t}", "title": "" }, { "docid": "094237edfd6e2dcdcaed90d0f1037d32", "score": "0.5865806", "text": "public function testRead()\n {\n global $config;\n $this->assertNotNull( $config );\n\n //print_r ( $config );\n }", "title": "" }, { "docid": "4a1e451d0bc3b0a70ea43b7edfa5ace8", "score": "0.586194", "text": "public function validate_config_on_save($host) {\n\t\t}", "title": "" }, { "docid": "5951106fb7f572815bbccb234cf0216d", "score": "0.58549285", "text": "public function testConfigReturnsCorrectValue()\n {\n $this->assertSame(config('skeleton.test'), 100);\n }", "title": "" }, { "docid": "ae666b6468960842c985fb5f5a12f384", "score": "0.585484", "text": "public function checkConfig()\n {\n $checkFunc = 'check' . $this->post->source;\n $this->view->title = $this->lang->convert->checkConfig;\n $this->view->source = $this->post->source;\n $this->view->checkResult = $this->fetch('convert', $checkFunc, \"version={$this->post->version}\");\n $this->display();\n }", "title": "" }, { "docid": "31c451c5446c9a2291de4728e0d9bb1d", "score": "0.5854423", "text": "private function _validate()\n {\n // verify channel\n $channelTarget = \"logging.channels.{$this->channel}\";\n if (!config($channelTarget)) {\n throw new Exception(\"Log channel [{$this->channel}] not exist. Please define it in file 'config/logging.php'.\");\n }\n $keyPath = \"{$channelTarget}.path\";\n $defaultPath = config($keyPath);\n // set name of log file dynamically if it is still as default filename\n if (self::USE_POSTFIX_DYNAMICALLY) {\n $filenameCurrent = current(array_slice(explode('/', $this->path), -1));\n if ($filenameCurrent == self::LOGGING_WEB_FILENAME) {\n $this->path = $this->_webLogFilePathDefault();\n } else if ($filenameCurrent == self::LOGGING_API_FILENAME) {\n $this->path = $this->_apiLogFilePathDefault();\n }\n }\n // verify log file & change default log file path\n $pathLogFile = $this->getLogFilePath();\n if (!file_exists($pathLogFile) || $defaultPath != $pathLogFile) {\n config()->set($keyPath, $pathLogFile);\n }\n }", "title": "" }, { "docid": "ed22c35d3beee287a06bb9e2c3bbc9a6", "score": "0.5852399", "text": "private function checkTokenConfigs() {\n\t\tif(!empty($this->prefix) && !empty($this->secret)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f423a93ab39d806043e7418777a14357", "score": "0.58414626", "text": "private function isConfigSet(){\n\t\t\treturn !empty($this->config['username']) || !empty($this->config['password']);\n\t\t}", "title": "" }, { "docid": "2fca1b5de84924fcc4f7786977dda411", "score": "0.58397377", "text": "public function testGetConfigValue()\n\t{\n\t\t$_SESSION['dinkly']['config'] = $this->valid_config;\n\t\t$app_name = 'demo';\n\t\t$key = \"app_name\";\n\t\t$this->assertEquals(BaseDinkly::getConfigValue($key,$app_name), \"Dinkly Demo\");\n\t\t\n\t\t//Test invalid key\n\t\t$dirty_key = \"bad\";\n\t\t$this->assertFalse(BaseDinkly::getConfigValue($dirty_key));\n\t}", "title": "" }, { "docid": "b3837a36c259798b375bc8ee4966875a", "score": "0.58362406", "text": "public function has_config() {\n return false;\n }", "title": "" }, { "docid": "256a418141833353b86cc7272b25209f", "score": "0.5815102", "text": "public static function config_file_exists() {\n return true;\n }", "title": "" }, { "docid": "ce5cff48c4f39564f367c012a72712f8", "score": "0.58093274", "text": "function load_config() {\n // ----- Security section\n\n // Test the security config file\n $security_config_file = BASE_PATH . \"app/config/security.php\";\n if(!is_readable($security_config_file)) {\n throw new KISResourceException(\"File not found : \" . $security_config_file);\n }\n\n // Read the file\n require_once $security_config_file;\n\n // Config the security class\n if(isset($security_config)) {\n KISSecurity::init_from_config($security_config);\n } else {\n throw new KISResourceException(\"Security config file is incorrect\");\n }\n\n // ----- Database configuration\n\n // Test the database config file\n $database_config_file = BASE_PATH . \"app/config/database.php\";\n if(!is_readable($database_config_file)) {\n throw new KISResourceException(\"File not found : \" . $database_config_file);\n }\n\n // Read the file\n require_once $database_config_file;\n\n // Config the database\n if(isset($database_config)) {\n KISDatabaseConnection::init_from_config($database_config);\n } else {\n throw new KISResourceException(\"Database config file is incorrect\");\n }\n }", "title": "" }, { "docid": "394d418e93afb78c792c52d7be9fe5b1", "score": "0.58031726", "text": "private function checkConfig() {\n\t\tif ($this->maniaControl->settingManager->getSettingValue($this, self::TEAMSPEAK_SERVERHOST) == 'ts3.somehoster.com') {\n\t\t\t$error = 'Missing the required serverhost, please set it up before enabling the TeamSpeak plugin!';\n\t\t\tthrow new \\Exception($error);\n\t\t}\n\n\t\t$this->ts3_queryServer(); // Get latest information from the TeamSpeak server\n\t\tif (!isset($this->serverData['channels']) || count($this->serverData['channels']) == 0) {\n\t\t\t$error = 'Could not make proper connections with the server!';\n\t\t\tthrow new \\Exception($error);\n\t\t}\n\t}", "title": "" }, { "docid": "9c9e77523ad806c08e02040ba394b3d3", "score": "0.5801466", "text": "private function _checkIfConfigurationFileExists()\n {\n clearstatcache();\n if (!file_exists($this->_pathToConfigurationFile)) {\n throw new IOException(\n 'Missing configuration file ' .\n $this->_pathToConfigurationFile . '.', 1\n );\n }\n }", "title": "" }, { "docid": "7378287dde0ad8f2ccc33d27c9b3178d", "score": "0.579951", "text": "public function validate_config_on_save($host_obj)\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "7378287dde0ad8f2ccc33d27c9b3178d", "score": "0.579951", "text": "public function validate_config_on_save($host_obj)\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "67adbe6e79478c57150f448578b3c8d9", "score": "0.57948864", "text": "private function config()\n {\n }", "title": "" }, { "docid": "f49b144a589ef8b2a4ef6c89f20a441a", "score": "0.57941425", "text": "public function configCheck() {\r\n global $tools;\r\n $message = '';\r\n $dbGlossaryCfg = new dbGlossaryCfg();\r\n // ueberpruefen, ob ein Eintrag geaendert wurde\r\n if ((isset($_REQUEST[self::request_items])) && (!empty($_REQUEST[self::request_items]))) {\r\n $ids = explode(\",\", $_REQUEST[self::request_items]);\r\n foreach ($ids as $id) {\r\n if (isset($_REQUEST[dbGlossaryCfg::field_value.'_'.$id])) {\r\n $value = $_REQUEST[dbGlossaryCfg::field_value.'_'.$id];\r\n $where = array();\r\n $where[dbGlossaryCfg::field_id] = $id;\r\n $config = array();\r\n if (!$dbGlossaryCfg->sqlSelectRecord($where, $config)) {\r\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbGlossaryCfg->getError()));\r\n return false;\r\n }\r\n if (sizeof($config) < 1) {\r\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, sprintf(gl_error_cfg_id, $id)));\r\n return false;\r\n }\r\n $config = $config[0];\r\n if ($config[dbGlossaryCfg::field_value] != $value) {\r\n // Wert wurde geaendert\r\n if (($config[dbGlossaryCfg::field_name] == dbGlossaryCfg::cfgGroupArray) && (empty($value))) {\r\n // Sonderfall: Gruppe darf nicht leer sein!\r\n $message .= gl_error_cfg_group_empty;\r\n }\r\n else {\r\n if (!$dbGlossaryCfg->setValue($value, $id) && $dbGlossaryCfg->isError()) {\r\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbGlossaryCfg->getError()));\r\n return false;\r\n }\r\n elseif ($dbGlossaryCfg->isMessage()) {\r\n $message .= $dbGlossaryCfg->getMessage();\r\n }\r\n else {\r\n // Datensatz wurde aktualisiert\r\n $message .= sprintf(gl_msg_cfg_id_updated, $id, $config[dbGlossaryCfg::field_name]);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // ueberpruefen, ob ein neuer Eintrag hinzugefuegt wurde\r\n if ((isset($_REQUEST[dbGlossaryCfg::field_name])) && (!empty($_REQUEST[dbGlossaryCfg::field_name]))) {\r\n // pruefen ob dieser Konfigurationseintrag bereits existiert\r\n $where = array();\r\n $where[dbGlossaryCfg::field_name] = $_REQUEST[dbGlossaryCfg::field_name];\r\n $where[dbGlossaryCfg::field_status] = dbGlossaryCfg::status_active;\r\n $result = array();\r\n if (!$dbGlossaryCfg->sqlSelectRecord($where, $result)) {\r\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbGlossaryCfg->getError()));\r\n return false;\r\n }\r\n if (sizeof($result) > 0) {\r\n // Eintrag existiert bereits\r\n $message .= sprintf(gl_msg_cfg_add_exists, $where[dbGlossaryCfg::field_name]);\r\n }\r\n else {\r\n // Eintrag kann hinzugefuegt werden\r\n $data = array();\r\n $data[dbGlossaryCfg::field_name] = $_REQUEST[dbGlossaryCfg::field_name];\r\n if (((isset($_REQUEST[dbGlossaryCfg::field_type])) && ($_REQUEST[dbGlossaryCfg::field_type] != dbGlossaryCfg::type_undefined)) &&\r\n ((isset($_REQUEST[dbGlossaryCfg::field_value])) && (!empty($_REQUEST[dbGlossaryCfg::field_value]))) &&\r\n ((isset($_REQUEST[dbGlossaryCfg::field_label])) && (!empty($_REQUEST[dbGlossaryCfg::field_label]))) &&\r\n ((isset($_REQUEST[dbGlossaryCfg::field_description])) && (!empty($_REQUEST[dbGlossaryCfg::field_description])))) {\r\n // Alle Daten vorhanden\r\n unset($_REQUEST[dbGlossaryCfg::field_name]);\r\n $data[dbGlossaryCfg::field_type] = $_REQUEST[dbGlossaryCfg::field_type];\r\n unset($_REQUEST[dbGlossaryCfg::field_type]);\r\n $data[dbGlossaryCfg::field_value] = stripslashes(str_replace('&quot;', '\"', $_REQUEST[dbGlossaryCfg::field_value]));\r\n unset($_REQUEST[dbGlossaryCfg::field_value]);\r\n $data[dbGlossaryCfg::field_label] = $_REQUEST[dbGlossaryCfg::field_label];\r\n unset($_REQUEST[dbGlossaryCfg::field_label]);\r\n $data[dbGlossaryCfg::field_description] = $_REQUEST[dbGlossaryCfg::field_description];\r\n unset($_REQUEST[dbGlossaryCfg::field_description]);\r\n $data[dbGlossaryCfg::field_status] = dbGlossaryCfg::status_active;\r\n $data[dbGlossaryCfg::field_update_by] = $tools->getDisplayName();\r\n $data[dbGlossaryCfg::field_update_when] = date('Y-m-d H:i:s');\r\n $id = -1;\r\n if (!$dbGlossaryCfg->sqlInsertRecord($data, $id)) {\r\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbGlossaryCfg->getError()));\r\n return false;\r\n }\r\n $message .= sprintf(gl_msg_cfg_add_success, $id, $data[dbGlossaryCfg::field_name]);\r\n }\r\n else {\r\n // Daten unvollstaendig\r\n $message .= gl_msg_cfg_add_incomplete;\r\n }\r\n }\r\n }\r\n // Sollen Daten als CSV gesichert werden?\r\n if ((isset($_REQUEST[self::request_csv_export])) && ($_REQUEST[self::request_csv_export] == 1)) {\r\n // Daten sichern\r\n $where = array();\r\n $where[dbGlossaryCfg::field_status] = dbGlossaryCfg::status_active;\r\n $csv = array();\r\n $csvFile = WB_PATH.MEDIA_DIRECTORY.'/'.date('ymd-His').'-glossary-cfg.csv';\r\n if (!$dbGlossaryCfg->csvExport($where, $csv, $csvFile)) {\r\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbGlossaryCfg->getError()));\r\n return false;\r\n }\r\n $message .= sprintf(gl_msg_cfg_csv_export, basename($csvFile));\r\n }\r\n\r\n if (!empty($message)) $this->setMessage($message);\r\n return $this->dlgConfig();\r\n }", "title": "" }, { "docid": "78ba942039dec0684d155074e72d5471", "score": "0.5771866", "text": "private function verifySource(): void\n {\n if (empty($this->source)) {\n throw ConfigurationException::noSourceProvided();\n }\n if (!$this->source->valid()) {\n throw FileNotFoundException::fileNotFound($this->source->path());\n }\n }", "title": "" }, { "docid": "fb78ca9d7e767b7607e157ee979fdf4e", "score": "0.5765218", "text": "abstract public function fillableConfig();", "title": "" }, { "docid": "79c83bdac035fb21b692ae6b5045de20", "score": "0.5759706", "text": "function prelevement_check_config()\r\n{\r\n\tglobal $conf;\r\n\tif(empty($conf->global->PRELEVEMENT_ID_BANKACCOUNT)) return -1;\r\n\tif(empty($conf->global->PRELEVEMENT_ICS)) return -1;\r\n if(empty($conf->global->PRELEVEMENT_USER)) return -1;\r\n\treturn 0;\r\n}", "title": "" }, { "docid": "7944109c14457f59450bc372b9757e44", "score": "0.5749347", "text": "public function ReadConfiguration()\r\n\t{\r\n\t\tStrings::StatusMessage(\"Checking if \" . Configuration::USER_CONF . \" exists\",false);\r\n\t\tif (file_exists($this->BASE_DIR . Configuration::USER_CONF))\r\n\t\t{\r\n\t\t\tStrings::Status(\"Yes\");\r\n\t\t\t$this->LoadConfiguration();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tStrings::Status(\"No\");\r\n\t\t\t$this->PromptForConfiguration();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0ce1279f920623f2046c4ec9e986e3bc", "score": "0.5749312", "text": "public function instance_allow_config() {\n return false;\n }", "title": "" }, { "docid": "307c6e8d1ae4a8bbf728202eae10cfc6", "score": "0.57478404", "text": "public function testConfigProcess()\n {\n $config = new Config($this->testConfig);\n\n $this->assertAttributeEquals($this->testConfig, 'rawConfig', $config);\n $this->assertAttributeEquals($this->processedConfig, 'pathMap', $config);\n }", "title": "" }, { "docid": "9d3a6837786489d4cea311b4f8401f5d", "score": "0.57471544", "text": "public function flushconfig() : bool\n {\n }", "title": "" }, { "docid": "6310ed31975352ace2733144ce401b50", "score": "0.5734174", "text": "public function validate_config_on_save($host_obj)\n\t\t{\n\t\t}", "title": "" }, { "docid": "2acfd77b5565e22b0e7b8d918c753c1c", "score": "0.57275856", "text": "function validConfiguration()\n {\n if ($this->isDefinedLayer('user') || $this->isDefinedLayer('system')) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "cae2f7af00de67e55239fdc980edf5ed", "score": "0.571548", "text": "public function testLoadConfiguration()\n {\n $configParams = $this->configParams;\n $this->assertTrue(is_array($configParams) and ! empty($configParams));\n\n $disqontrolConfig = new Configuration($configParams);\n $this->assertArraySubset($configParams, $disqontrolConfig->getWholeConfig());\n }", "title": "" }, { "docid": "541c337a459e411c070b5dee4b48ad89", "score": "0.5711188", "text": "function cms_config_upgrade()\n{\n\t#Get my lazy on and just do some regex magic...\n\t$newfiledir = dirname(CONFIG_FILE_LOCATION);\n\t$newfilename = CONFIG_FILE_LOCATION;\n\t$oldconfiglines = array();\n\t$oldconfig = cms_config_load();\n\tif (is_writable($newfilename) || is_writable($newfiledir))\n\t{\n\t\t$handle = fopen($newfilename, \"r\");\n\t\tif ($handle)\n\t\t{\n\t\t\twhile (!feof($handle))\n\t\t\t{\n\t\t\t\t$oldconfiglines[] = fgets($handle, 4096);\n\t\t\t}\n\t\t\tfclose($handle);\n\t\t\t$handle = fopen($newfilename, \"w\");\n\t\t\tif ($handle)\n\t\t\t{\n\t\t\t\tforeach ($oldconfiglines as $oneline)\n\t\t\t\t{\n\t\t\t\t\t/** from some ancient version? */\n\t\t\t\t\t$newline = trim(preg_replace('/\\$this-\\>(\\S+)/', '$config[\"$1\"]', $oneline));\n\n\t\t\t\t\t/* uploads_url, remove root url */\n\t\t\t\t\tif(preg_match( '/\\$config\\[\\'uploads_url\\'\\]/' , $oneline) ) {\n\t\t\t\t\t\t$newline = str_replace($oldconfig['root_url'], '', $oneline);\n\t\t\t\t\t}\n\n\t\t\t\t\t/* image_uploads_url, remove root url */\n\t\t\t\t\tif(preg_match('/\\$config\\[\\'image_uploads_url\\'\\]/',$oneline)) {\n\t\t\t\t\t\t$newline = str_replace($oldconfig['root_url'], '', $oneline);\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\tif ($newline != \"?>\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$newline .= \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tfwrite($handle, $newline);\n\t\t\t\t}\n\t\t\t\tfclose($handle);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "faa217394a09d754fe0551cdb575353b", "score": "0.5692906", "text": "function process_config($config) {\n\n $return = true;\n\n foreach ($config as $name => $value) {\n if (!set_config($name, $value)) {\n $return = false;\n }\n }\n\n return $return;\n}", "title": "" }, { "docid": "67d88a240a2bfab41a7bf98f02e546bb", "score": "0.5689106", "text": "public function testGetAuthSourcesConfigBad()\n {\n $path = __DIR__ . '/fixtures/authSources/config';\n $fileName = 'authsourcesBad.php';\n\n $expected = ['auth-choices']; \n\n $this->expectException('Sil\\SspUtils\\InvalidAuthSourcesException');\n $this->expectExceptionCode(1476966993);\n \n $results = AuthSourcesUtils::getAuthSourcesConfig($path, $fileName);\n $this->assertEquals($expected, $results);\n }", "title": "" }, { "docid": "b99867d4bbd231b03defbf61e06a9ecb", "score": "0.568138", "text": "private function validateSecureENV(){\n if(file_exists($this->secureENVPath)) return true;\n $secureENV = fopen($this->secureENVPath,\"w\");\n fwrite($secureENV,\"\");\n fclose($secureENV);\n }", "title": "" }, { "docid": "a33df56454427a6d85d0c98366ab319c", "score": "0.56805044", "text": "function check_config()\n {\n $sql = \"SHOW COLUMNS FROM `\" . $GLOBALS['xoopsDB']->prefix('configcategory') . \"` LIKE 'confcat_modid'\";\n $result = $GLOBALS['xoopsDB']->queryF($sql);\n if (!$result) return true;\n if ($GLOBALS['xoopsDB']->getRowsNum($result) > 0) return false;\n return true;\n }", "title": "" }, { "docid": "e920ca416b0426923c7263ca2f478e89", "score": "0.5674412", "text": "function validate_exist() {\n if (file_exists(ABS_CONFIG_PATH.'/settings-'.DIR_NAME.'.php')) {\n echo \"\\nThis site is already installed \\e[31m\\e[1m[fail]\\e[0m\\n\\n\";\n exit (1);\n }\n}", "title": "" }, { "docid": "aa80157c17202841bbc898a90b232893", "score": "0.56550705", "text": "private function getConfig() {\n\t\t$this->conf = require __DIR__.'/../cfg/alizephp_conf.php';\n\t}", "title": "" }, { "docid": "b0c2692c2d35031a362f95a40c439c77", "score": "0.5646145", "text": "public function testItemsCanBeSetAfterEntireFileIsLoaded()\n\t{\n\t\tConfig::get('application');\n\t\tConfig::set('application.key', 'taylor');\n\t\t$application = Config::get('application');\n\n\t\t$this->assertEquals('taylor', $application['key']);\n\t}", "title": "" }, { "docid": "f149c328a96c2d3b7fc5be163c8755c9", "score": "0.5644412", "text": "public function has_config() {\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "c0fe22ac6c20d310fa46ea21fd0c30b5", "score": "0.56443936", "text": "public static function verifyFileStructure(){\n\t\tclearstatcache(); // for is_dir\n\t\t\n\t\t// ---- db ----\n\t\tif (!is_dir(self::$dbPath)){\n\t\t\t$status = @mkdir(self::$dbPath,0755);if ($status === F){self::$errA[] = \"mkdir failed\";return F;}}\n\t\t// delete extra folders\n\t\t$filenameA = @scandir(self::$dbPath,SCANDIR_SORT_NONE);if ($filenameA === F){self::$errA[] = \"scandir failed\";return F;}\n\t\tforeach ($filenameA as $filename){\n\t\t\tif ($filename === \".\" || $filename === \"..\"){continue;}\n\t\t\tif (vInA($filename,self::$tblWhitelist)){continue;}\n\t\t\t$status = rmComplete(self::$dbPath.$filename);if ($status === F){self::$errA[] = \"rmComplete failed\";return F;}}\n\t\t// add missing folders\n\t\tforeach (self::$tblWhitelist as $tbl){\n\t\t\t$path = self::$dbPath.$tbl;\n\t\t\t$dirExistsF = is_dir($path);if ($dirExistsF === F){\n\t\t\t\t$status = @mkdir($path,0755);if ($status === F){self::$errA[] = \"mkdir failed\";return F;}}}\n\t\t\n\t\t// ---- file ----\n\t\tif (!is_dir(self::$filePath)){\n\t\t\t$status = @mkdir(self::$filePath,0755);if ($status === F){self::$errA[] = \"mkdir failed\";return F;}}\n\t\t// delete extra folders\n\t\t$filenameA = @scandir(self::$filePath,SCANDIR_SORT_NONE);if ($filenameA === F){self::$errA[] = \"scandir failed\";return F;}\n\t\tforeach ($filenameA as $filename){\n\t\t\tif ($filename === \".\" || $filename === \"..\"){continue;}\n\t\t\tif (vInA($filename,self::$tblWhitelist)){continue;}\n\t\t\t$status = rmComplete(self::$filePath.$filename);if ($status === F){self::$errA[] = \"rmComplete failed\";return F;}}\n\t\t// add missing folders\n\t\tforeach (self::$tblWhitelist as $tbl){\n\t\t\t$path = self::$filePath.$tbl;\n\t\t\t$dirExistsF = is_dir($path);if ($dirExistsF === F){\n\t\t\t\t$status = @mkdir($path,0755);if ($status === F){self::$errA[] = \"mkdir failed\";return F;}}\n\t\t\t$normative = DBM_VT_COMPLETE();if (!kInA($tbl,$normative)){continue;} // ignore-case\n\t\t\tforeach ($normative[$tbl] as $propertyS=>$ruleE){\n\t\t\t\tif (kInA(\"type\",$ruleE) && $ruleE[\"type\"] === \"fil\"){\n\t\t\t\t\t$path = self::$filePath.$tbl.\"/\".$propertyS;\n\t\t\t\t\t$dirExistsF = is_dir($path);if ($dirExistsF === F){\n\t\t\t\t\t\t$status = @mkdir($path,0755);if ($status === F){self::$errA[] = \"mkdir failed\";return F;}}}}}\n\t\treturn T;}", "title": "" }, { "docid": "62e530019c8729bfa1f8347479401bdd", "score": "0.56430817", "text": "protected function getConfiguration() {\r\n if (!file_exists(WB_PATH.'/modules/gitMD2CMS/config.json')) {\r\n self::setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, 'Missing the configuration file /modules/gitMD2CMS/config.json!'));\r\n return false;\r\n }\r\n // read the configuration file into an array\r\n self::$config = json_decode(file_get_contents(WB_PATH.'/modules/gitMD2CMS/config.json'), true);\r\n\r\n // check the TABLE_PREFIX\r\n if (!isset(self::$config['table_prefix']) || (isset(self::$config['table_prefix']) && empty(self::$config['table_prefix'])))\r\n self::$config['table_prefix'] = TABLE_PREFIX;\r\n\r\n // check if the main configuration entries exists\r\n if (!isset(self::$config['content']) || !isset(self::$config['content'][0])) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, 'Missing the configuration group \"content\" or the first entry \"0\", please check the config.json!'));\r\n return false;\n }\r\n return true;\n }", "title": "" }, { "docid": "ec121ee76035bf3f03b1f0e4a88bc4fa", "score": "0.56420183", "text": "function local_rollcheck_config_missing() {\r\n $config = get_config('local_rollcheck');\r\n\r\n $requiredfields = array('coursemap_dbtype', 'coursemap_dbhost', 'coursemap_dbuser', 'coursemap_dbpass', \r\n 'coursemap_dbname', 'coursemap_table', 'coursemap_extcode', 'coursemap_mdlcode', \r\n 'timetable_dbtype', 'timetable_dbhost', 'timetable_dbuser', 'timetable_dbpass', \r\n 'timetable_dbname', 'timetable_sql', 'alerttext', 'graceperiod', 'remindtime', );\r\n foreach ($requiredfields as $field) {\r\n if (empty($config->$field)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "c345475c01f979bd7e0b16f004905f26", "score": "0.56409246", "text": "public function validateSettings(): bool\n {\n if(!isset($this->settings[\"prefix\"])){\n return false;\n }\n if(!isset($this->settings[\"messages\"])){\n return false;\n }\n if(!isset($this->settings[\"webhooks\"])){\n return false;\n }\n if(!isset($this->settings[\"enabled\"])){\n return false;\n }\n if(!isset($this->settings[\"name\"])){\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "01a26665a9dc11f2e87458b153321d16", "score": "0.56406265", "text": "abstract protected function _loadConfig();", "title": "" }, { "docid": "bd7f40366b55ae0335f19ec887de7ec1", "score": "0.5629567", "text": "function completeCfg()\r\n\t{\r\n $base = trim($this->cfg->uribase,\"/\") . '/'; // be sure no double // at end\r\n\r\n if( !property_exists($this->cfg,'uriapi') )\r\n {\r\n $this->cfg->uriapi = $base . 'rest/api/latest/';\r\n }\r\n\r\n if( !property_exists($this->cfg,'uriview') )\r\n {\r\n $this->cfg->uriview = $base . 'browse/';\r\n }\r\n \r\n if( !property_exists($this->cfg,'uricreate') )\r\n {\r\n $this->cfg->uricreate = $base . '';\r\n }\r\n\r\n\r\n if( property_exists($this->cfg,'attributes') )\r\n {\r\n // echo __FUNCTION__ . \"::Debug::Step#$step Going To Add attributes <br>\";$step++;\r\n $this->processAttributes();\r\n } \r\n\t}", "title": "" }, { "docid": "96c813c35b6898e2896a6c0afd79de51", "score": "0.5626548", "text": "protected function check() {\n\t\tif (empty($this->file) || $this->file['error'] != 0) {\n\t\t\tthrow new Exception('missing file manual');\n\t\t}\n\t\tif ($this->parameters['user_workspace'] == '') {\n\t\t\tthrow new Exception('missing user_workspace parameter');\n\t\t}\n\t}", "title": "" } ]
1268d0ab9f024e7e2b5b7f56dacdb395
Set in query part where expression 'IS NOT NULL'
[ { "docid": "c0044ec221ca4a12f522e7373df4f364", "score": "0.6073954", "text": "public function notNull($fieldName, $modelTableData = [], $sqlLogical = Query_Builder::SQL_LOGICAL_AND)\n {\n return $this->where(\n $sqlLogical,\n [$fieldName => null],\n Query_Builder::SQL_COMPARISON_KEYWORD_IS_NOT_NULL,\n $modelTableData\n );\n }", "title": "" } ]
[ { "docid": "340fc926041fe4a98db00a6e3fa32194", "score": "0.6915805", "text": "protected function where_null($where)\n\t{\n\t\treturn $this->wrap($where['column']).' IS NULL';\n\t}", "title": "" }, { "docid": "7c9c31d85db58134bc1af0e568e0b9b2", "score": "0.6890135", "text": "protected function where_not_null($where)\n\t{\n\t\treturn $this->wrap($where['column']).' IS NOT NULL';\n\t}", "title": "" }, { "docid": "ab7053c7c3bd82af34e665544d688df0", "score": "0.6846998", "text": "public function isNull($column) { return $this->addCondition($column, null, Criterion::IS_NULL); }", "title": "" }, { "docid": "8a350233444835c9b8dd8a2a3015b8be", "score": "0.6806733", "text": "public function whereNull($field);", "title": "" }, { "docid": "4cb1c0cae4b338b571b81d29b13eabc5", "score": "0.6707042", "text": "protected function isNullOperation(Builder &$query)\n {\n if ( isset($this->value[ 'isNull' ]) && $this->value[ 'isNull' ] === true ) {\n $query->whereNull($this->field_name);\n } elseif ( isset($this->value[ 'isNull' ]) && $this->value[ 'isNull' ] === false ) {\n $query->whereNotNull($this->field_name);\n }\n }", "title": "" }, { "docid": "ee661d367f76c8a80d67070728ab074a", "score": "0.663591", "text": "public function where_not_null($column_name) {\n $column_name = $this->_quote_identifier($column_name);\n return $this->_add_where(\"{$column_name} IS NOT NULL\");\n }", "title": "" }, { "docid": "16f1326e6531be4ec3194397374b39bf", "score": "0.65930676", "text": "public function where_null( $column_name ) {\n\t\treturn $this->_add_where_no_value( $column_name, 'IS NULL' );\n\t}", "title": "" }, { "docid": "788b9d6b9199e6131986c731935f4ba2", "score": "0.6577396", "text": "public function where_null($column_name) {\n $column_name = $this->_quote_identifier($column_name);\n return $this->_add_where(\"{$column_name} IS NULL\");\n }", "title": "" }, { "docid": "f87b44768468191672b2a595daf39a72", "score": "0.6544195", "text": "public function where_not_null( $column_name ) {\n\t\treturn $this->_add_where_no_value( $column_name, 'IS NOT NULL' );\n\t}", "title": "" }, { "docid": "3d796af877096fea2b1dc039ce6c4779", "score": "0.64937633", "text": "public function whereIsNotNull($whereProp){\r\n \r\n $this->where($whereProp, 'IS NOT NULL');\r\n return $this;\r\n }", "title": "" }, { "docid": "4d422cb427fd5a87c76043915eee9b31", "score": "0.6474488", "text": "public function whereIsNull($whereProp){\r\n \r\n $this->where($whereProp, 'IS NULL');\r\n return $this;\r\n }", "title": "" }, { "docid": "6fb5305990423e6fc265811ee54d04f6", "score": "0.64081395", "text": "public function isNotNull($column) { return $this->addCondition($column, null, Criterion::IS_NOT_NULL); }", "title": "" }, { "docid": "03f2adfccab1ec1660355dd7dfdf9f16", "score": "0.6348078", "text": "public function isNull(string $column, string $type = Condition::AND): CriteriaInterface;", "title": "" }, { "docid": "c82172928348c1b7eaa1089abe1fe114", "score": "0.62721074", "text": "protected function default_condition()\n {\n $this->db->where($this->table . '.deleted_at !=', NULL);\n }", "title": "" }, { "docid": "27f25a1c718eb0be709677e551428dc6", "score": "0.625631", "text": "public function includeNull();", "title": "" }, { "docid": "fd0a57c62656b9b9ab09216f8e181c16", "score": "0.6234306", "text": "public function findWhereNull($field, $columns = ['*']);", "title": "" }, { "docid": "d55447d43a58f5673e858ab2b1207aaf", "score": "0.6184866", "text": "function wp_db_null_value( $query )\n{\n return str_ireplace( \"'NULL'\", \"NULL\", $query );\n}", "title": "" }, { "docid": "79fae61aade2a5d2350d01c40857f231", "score": "0.6177412", "text": "final protected function where_not_null( $column, $or = false ) {\n\t\t$this->_wheres[] = array( $this->and_or( $or ), sprintf( '%s IS NOT NULL', $this->escape_column_name( $column ) ) );\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "dcf1a117337054d228c5e470fa98858f", "score": "0.6062841", "text": "public function notNull(): ModelColumn\n\t{\n\t\treturn $this->add(ComplexValue::notNull());\n\t}", "title": "" }, { "docid": "7dedb82a269edd9268125c572c7bf33c", "score": "0.6032845", "text": "public function testOrmCriteriaNullAndNotNull()\n {\n $userModel = new IdiormDbal('users');\n\n $userModel->criteria('firstname', 'NULL', '');\n\n $users = $userModel->get();\n\n $this->assertCount(0, $users);\n\n $userModel = new IdiormDbal('users');\n\n $userModel->criteria('firstname', 'NOT NULL', '');\n\n $users = $userModel->get();\n\n $this->assertCount(2, $users);\n\n $this->assertEquals('John', $users[0]['firstname']);\n\n $this->assertEquals('Jane', $users[1]['firstname']);\n }", "title": "" }, { "docid": "dc842daab3b016f90edb57d5f0f73f59", "score": "0.59691006", "text": "public function isNullCondition(): bool\n {\n return $this->value === null;\n }", "title": "" }, { "docid": "f8f8a338a2b173d69dfd8c481f3c44aa", "score": "0.5936108", "text": "public function setNullValue($var) {}", "title": "" }, { "docid": "394ab11eb403ea30a7626fb3ff07dec9", "score": "0.5911659", "text": "public function whereIsNull($key)\n {\n return $this->where(\n ['$or' => [\n [$key => ['$exists' => false]],\n [$key => null]\n ]]\n );\n }", "title": "" }, { "docid": "90710708f5163d268a357682e16fa91e", "score": "0.5903009", "text": "public function notNull()\n {\n $this->_structure['notNull'] = 1;\n return $this;\n }", "title": "" }, { "docid": "ab00e231a448459dcd3e1d393b4dc84a", "score": "0.5900636", "text": "function rejectNulls() {\n return $this->filter(function ($item) {\n return $item !== null;\n });\n }", "title": "" }, { "docid": "479f1284f8035b306dd56c4f3ca54b8e", "score": "0.5869764", "text": "public function whereIsNull(string $field): self \n {\n return $this->whereNull($field);\n }", "title": "" }, { "docid": "e048e700951b9826a25e4a47cb44137a", "score": "0.58441156", "text": "function _wetkit_wetboew_libraries_filter_null_values($item) {\n return !empty($item);\n}", "title": "" }, { "docid": "27d02d526d530b72581016384749c9ff", "score": "0.58347946", "text": "public function setAllConditionsToNull()\n\t{\t\n\t try {\n $this->_getWriteAdapter()->update(\n $this->getMainTable(),array('condition_enabled'=>NULL) \n );\n \n $this->_getWriteAdapter()->commit();\n } \n catch (Exception $e) {\n $this->_getWriteAdapter()->rollBack();\n }\t\t\n\t}", "title": "" }, { "docid": "1898077b49ae4763a6bc26d0d3e015f5", "score": "0.5820932", "text": "public function whereNotNull($field);", "title": "" }, { "docid": "ac3fc748722a9a913ee0f287195d7906", "score": "0.5815568", "text": "public function isNull($fieldName, $modelTableData = [], $sqlLogical = Query_Builder::SQL_LOGICAL_AND)\n {\n return $this->where(\n $sqlLogical,\n [$fieldName => null],\n Query_Builder::SQL_COMPARISON_KEYWORD_IS_NULL,\n $modelTableData\n );\n }", "title": "" }, { "docid": "6e86710034a8ef8aa993a7ca7ea38b94", "score": "0.580234", "text": "public function testQuote_nullValue()\n {\n $expected = 'value to quote';\n $this->assertEquals($expected, Query::quote(null, \"value to quote\"));\n }", "title": "" }, { "docid": "631a5f73dcaf01181857e2edcadcdab5", "score": "0.57743925", "text": "public function set_not_null($name, $value = TRUE)\n\t{\n\t\tif ( ! $name instanceof Database_Expression\n\t\t\tAND ! $name instanceof Database_Identifier)\n\t\t{\n\t\t\t$name = new Database_Column($name);\n\t\t}\n\n\t\t$this->parameters[':actions'][] = new Database_Expression(($value ? 'SET' : 'DROP').' NOT NULL ?', array($name));\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "0d06631b4717c6183e71d8c3a7d62e36", "score": "0.577378", "text": "public function having_not_null( $column_name ) {\n\t\treturn $this->_add_having_no_value( $column_name, 'IS NOT NULL' );\n\t}", "title": "" }, { "docid": "864a5560624324aa00c4077688af44d1", "score": "0.5767895", "text": "public function buildIsNull( $is_null=true );", "title": "" }, { "docid": "eaf6c44e68effc827bac690198c8b935", "score": "0.57070994", "text": "public function testSetAndGetQueryNull()\n {\n $value = null;\n\n self::assertEquals($this->fixture, $this->fixture->setQuery($value));\n self::assertEquals($value, $this->fixture->getQuery());\n }", "title": "" }, { "docid": "7423391e5e1b4a74aeb8b355e5e8b91f", "score": "0.5689254", "text": "public function whereIsNull(...$columns)\n {\n if (Validate::variable($columns, Validate::IS_ARRAY)) {\n $columns = implode(', ', $columns);\n if (strpos($this->query, 'WHERE') === false) {\n $this->query .= \"WHERE {$columns} IS NULL \";\n } else {\n $this->query .= \"AND {$columns} IS NULL\";\n }\n\n return $this;\n }\n\n return false;\n }", "title": "" }, { "docid": "d084f32194bafb066692090b32234d8e", "score": "0.56423634", "text": "public function having_null( $column_name ) {\n\t\treturn $this->_add_having_no_value( $column_name, 'IS NULL' );\n\t}", "title": "" }, { "docid": "c73344307e247c369d9d9896c1e4cbee", "score": "0.5607", "text": "public function test_null_values_do_not_pass_requirements()\n {\n $required_parameter = \"value\";\n $array = [ 'value' => null ];\n $requirements = [ $required_parameter ];\n\n Verification\\require_set($array, $requirements);\n }", "title": "" }, { "docid": "7f9fdf61df257840737c2d717980c7a1", "score": "0.5590105", "text": "public function getNullValue() {}", "title": "" }, { "docid": "88852874a66925d26fbd93e1b95b8e62", "score": "0.5569978", "text": "function vld_notnull ($value) {\n if (strlen(trim($value)) == 0)\n return false;\n return true;\n}", "title": "" }, { "docid": "52bcb95f9785aa5d41d6fedebb5f246c", "score": "0.55625165", "text": "public function isNull()\n {\n return $prNull;\n }", "title": "" }, { "docid": "cfd1dc7e57e45eec0464d195cb560d4f", "score": "0.5552662", "text": "public function isNotNull(string $column, string $type = Condition::AND): CriteriaInterface;", "title": "" }, { "docid": "102a347885aafbc4d31fa942cefe6726", "score": "0.5543609", "text": "public function buildIsNull( $is_null=true )\n {\n return $is_null ? \" IS NULL \" : \" IS NOT NULL \";\n }", "title": "" }, { "docid": "bee796bf43044feafe2129790b6c736c", "score": "0.5533918", "text": "public function getNotnull()\n {\n return $this->notnull;\n }", "title": "" }, { "docid": "442f726296f72d9bc99b1e0204ea8661", "score": "0.5510685", "text": "function nulloSql()\n\t\t{\n\t\treturn 'NULL';\n\t\t}", "title": "" }, { "docid": "27123ff9455eba46c5651b9e31659520", "score": "0.5499798", "text": "public function isNull($a)\n\t{\n\t\t$items = \\is_array($a) ? $a : [$a];\n\n\t\treturn $this->conditions($items, self::OP_IS_NULL);\n\t}", "title": "" }, { "docid": "9adb0f791cd84d0f2939ddeb1e8d5e6d", "score": "0.5495627", "text": "function acf_nullify_empty($value, $post_id, $field) {\n if (empty($value)) {\n return null;\n }\n return $value;\n }", "title": "" }, { "docid": "12110275a27ccfe8c7269d5ff3c349b5", "score": "0.5479082", "text": "public function setNotnull($notnull)\n {\n $this->notnull = $notnull;\n }", "title": "" }, { "docid": "94361e59184e723550903c8628878c76", "score": "0.54731655", "text": "public function not_null()\n\t{\n\t\treturn self::$datatype . \" NOT NULL\";\n\t}", "title": "" }, { "docid": "77f5b79e8fcb03d3521f2244fdb654ba", "score": "0.5466674", "text": "private function notNull($value)\n {\n if ($value == null){\n $this->message = 'Merci de remplir ce champ' . $this->message;\n }\n }", "title": "" }, { "docid": "b1cc8722d7e9f7011161b24528ad6a7e", "score": "0.5456977", "text": "public static function notNullValue()\n {\n return Hamcrest_Core_IsNull::notNullValue();\n }", "title": "" }, { "docid": "e3a13dbd9df45a61695f7f775ddba98e", "score": "0.54457766", "text": "function removeNULLSFromResultsArray(&$resultsArray) {\r\n if (is_array($resultsArray)) {\r\n foreach ($resultsArray as $row => $val) { \r\n foreach ($resultsArray[$row] as $column => $value) {\r\n if ($value == null) {\r\n $resultsArray[$row][$column]=\"\";\r\n }\r\n } \r\n } \r\n }\r\n}", "title": "" }, { "docid": "45619a9e64bc8e7321b5ca9d361da286", "score": "0.54346496", "text": "public function whereIsNotNull(string $field): self \n {\n return $this->whereNotNull($field);\n }", "title": "" }, { "docid": "5197c7a85b05ed9200c3d4bb9b1c8d24", "score": "0.5406428", "text": "public function testNullsTheTopLevelIfSyncNonNullableFieldReturnsNull(): void\n {\n $doc = '\n query Q { syncNonNull }\n ';\n\n $expected = [\n 'errors' => [\n [\n 'locations' => [['line' => 2, 'column' => 17]],\n 'extensions' => ['debugMessage' => 'Cannot return null for non-nullable field \"DataType.syncNonNull\".'],\n ],\n ],\n ];\n self::assertArraySubset(\n $expected,\n Executor::execute($this->schema, Parser::parse($doc), $this->nullingData)->toArray(DebugFlag::INCLUDE_DEBUG_MESSAGE)\n );\n }", "title": "" }, { "docid": "e8fa81de512081948940a272048e9f22", "score": "0.5400519", "text": "public function findAllNotDeleted() { \n $all = $this->users->query()\n ->where('active IS NOT NULL')\n ->andWhere('deleted is NULL')\n ->execute();\n return $all;\n}", "title": "" }, { "docid": "11e66275b8cc0f6fe11e920c63bc2382", "score": "0.53944916", "text": "function acf_nullify_empty($value, $post_id, $field) {\n if (empty($value)) {\n return null;\n }\n return $value;\n}", "title": "" }, { "docid": "e7b823e15e057d5fb917f805dc9007fa", "score": "0.53869694", "text": "public function isNull(QueryBuilder $queryBuilder): string\n {\n return $queryBuilder->expr()->isNull($this->dbKey);\n }", "title": "" }, { "docid": "29fde79342ca3cc5fd7f85384bb22bad", "score": "0.53834814", "text": "function insert_nulls() {\r\n\t//Based on the table definition I've seen, this should be false.\r\n\treturn false;\r\n}", "title": "" }, { "docid": "496b900501c309a05eb0650ce39297dd", "score": "0.53806823", "text": "public function parametersWithoutNulls()\n {\n return array_filter($this->parameters(), function ($p) {\n return ! is_null($p);\n });\n }", "title": "" }, { "docid": "7dbc5e7904f095c60359ba5a71181933", "score": "0.53558433", "text": "protected function escapeNULL()\n {\n return 'NULL';\n }", "title": "" }, { "docid": "98de82c5da6ab642bc051d9ba3082b48", "score": "0.53557456", "text": "public function isNull() {\n\t\treturn $this->getType() == self::PARSED_TYPE_NULL;\n\t}", "title": "" }, { "docid": "26c423cad4cfa9dfdb1450e8f080bd74", "score": "0.53488135", "text": "public function updateSetNull()\n {\n $this->updateAction = self::ACTION_SET_NULL;\n\n return $this;\n }", "title": "" }, { "docid": "cce894e6a8999f303fc9afcd51b6699d", "score": "0.534872", "text": "abstract public function build__is_null( $is_null = true );", "title": "" }, { "docid": "60a1d646e26830ce1633c2781b731daf", "score": "0.5340625", "text": "public function get_where_clause() {\n\t\treturn ' 1 = 0 ';\n\t}", "title": "" }, { "docid": "a629d6e138263941166a7d36553df874", "score": "0.53405714", "text": "final public function null(): self\n {\n return $this->constraint($this->constraintFactory()->null());\n }", "title": "" }, { "docid": "83e58952c8a80008c59c51364472383f", "score": "0.53246635", "text": "public function whereNull(LaramoreBuilder $builder, string $boolean='and', bool $not=false): LaramoreBuilder;", "title": "" }, { "docid": "4f06d987e9cd0547cb89e67036591bd9", "score": "0.53185207", "text": "public function isNull($column)\n {\n return $this->addPredicate(new Predicate\\IsNull($column, $this->nextConjunction));\n }", "title": "" }, { "docid": "ab94da6f999552210761b53f7f362a1a", "score": "0.53095025", "text": "public function containsNone(array $values)\n {\n $this->expressionBuilder->containsNone($values);\n return $this->queryBuilder;\n }", "title": "" }, { "docid": "34c139daf49f75607c0fe39aa891c144", "score": "0.5292205", "text": "function test_field_not_equal_to_value_filter() {\n\t\tself::clear_get_values();\n\t\t$dynamic_view = self::get_view_by_key( 'dynamic-view' );\n\n\t\t$filter_args = array(\n\t\t\tarray( 'type' => 'field',\n\t\t\t\t'col' => '493ito',\n\t\t\t\t'op' => '!=',\n\t\t\t\t'val' => 'Jamie',\n\t\t\t),\n\t\t);\n\t\tself::add_filter_to_view( $dynamic_view, $filter_args );\n\n\t\t$d = self::get_default_args( $dynamic_view, array( 'Steve', 'Steph' ), array( 'Jamie' ) );\n\n\t\tself::run_get_display_data_tests( $d, 'field is NOT equal to value filter' );\n\t}", "title": "" }, { "docid": "61117ad7eb1a785ed084c7d7f01275a4", "score": "0.5290502", "text": "function db_sql_filter( $sql )\n{\n\t// Replace empty strings ('') with NULL values.\n\n\tif ( stripos( $sql, 'INSERT INTO ' ) !== false )\n\t{\n\t\t// Check for ( or , character before empty string ''.\n\t\t$sql = preg_replace( \"/([,\\(])[\\r\\n\\t ]*''(?!')/\", '\\\\1NULL', $sql );\n\t}\n\n\t// Check for <> or = character before empty string ''.\n\t$sql = preg_replace( \"/(<>|=)[\\r\\n\\t ]*''(?!')/\", '\\\\1NULL', $sql );\n\n\t/**\n\t * IS NOT NULL cases\n\t *\n\t * Replace <>NULL & !=NULL with IS NOT NULL\n\t *\n\t * @link http://www.postgresql.org/docs/current/static/functions-comparison.html\n\t */\n\t$sql = str_replace(\n\t\tarray( '<>NULL', '!=NULL' ),\n\t\tarray( ' IS NOT NULL', ' IS NOT NULL' ),\n\t\t$sql\n\t);\n\n\treturn $sql;\n}", "title": "" }, { "docid": "c17b5657afcb92fcc95c70a25c8fb609", "score": "0.5280366", "text": "public function field_is_null( $field_number ) {\n\t\tif ( $this->result )\n\t\t\treturn pg_field_is_null( $this->result , $field_number );\n\t\telse\n\t\t\treturn 0;\n\t}", "title": "" }, { "docid": "5022964f3b020bec5f15c0878d41792f", "score": "0.5275191", "text": "public function whereIsNotNull(...$columns)\n {\n if (Validate::variable($columns, Validate::IS_ARRAY)) {\n $columns = implode(', ', $columns);\n if (strpos($this->query, 'WHERE') === false) {\n $this->query .= \"WHERE {$columns} IS NOT NULL \";\n } else {\n $this->query .= \"AND {$columns} IS NOT NULL\";\n }\n\n return $this;\n }\n\n return false;\n }", "title": "" }, { "docid": "4a284de68c159de0774c57ed6bf06e9e", "score": "0.52749515", "text": "protected function checkForNull($param){\n foreach($param as $key=>$value){\n if(is_null($value) || $value == '')\n unset($param[$key]);\n }\n return $param;\n }", "title": "" }, { "docid": "b8da3c96eb89465f9b00ccf1ab0d4e1f", "score": "0.5269595", "text": "public function whereNull($column, $boolean = 'and', $not = false)\r\n {\r\n $type = $not ? 'NotNull' : 'Null';\r\n\r\n $this->wheres[] = compact('type', 'column', 'boolean');\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "6f2790577525e961e31b9216b9f96725", "score": "0.5260075", "text": "public function nullItem();", "title": "" }, { "docid": "5eee9a0bb97dca221f6e870bb7a5e864", "score": "0.5251964", "text": "public function nullOr()\n {\n if ($this->value === null) {\n $this->alwaysValid = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "dc939d892e847813869f4e70752c7309", "score": "0.5249728", "text": "function nullIfZero ($value) {\n\t\t\tif (intval ($value) == 0) {\n\t\t\t\treturn 'IS NULL';\n\t\t\t}else {\n\t\t\t\treturn '= ' . $value;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5c1b841e095ceb6633081542d805f146", "score": "0.52426296", "text": "public function query() {\n if (!empty($this->value)) {\n parent::query();\n }\n }", "title": "" }, { "docid": "cc2203a5bdbaac0354cd58f81f0e1cec", "score": "0.52361745", "text": "function cr_not_null($value){\n if(is_array($value)){\n if(sizeof($value) > 0){\n return TRUE;\n }else{\n return FALSE;\n }\n }else{\n if((is_string($value) || is_int($value)) && ($value != '') && (strlen(trim($value)) > 0)){\n return TRUE;\n }else{\n return FALSE;\n }\n }\n}", "title": "" }, { "docid": "b6268829d93722d87f8f47c1dd066a7a", "score": "0.52314216", "text": "public function test_array_filter_null_keeps_empty_string_values()\n {\n $array = [ \"value\" => null, \"object\" => \"\" ];\n $result = Verification\\array_filter_null($array);\n $this->assertArrayHasKey(\"object\", $result);\n $this->assertArrayNotHasKey(\"value\", $result);\n }", "title": "" }, { "docid": "41e1af16283357750d562ece5dc7effd", "score": "0.52311504", "text": "public function xtestNullValueAssignments()\n {\n $update = DBSql::PostgreSQL()->update();\n $bindKey = Value::getBindKey();\n\n $okayField = (new Value('okayToBeNull'))\n ->setValueMarker($bindKey)\n ->addBinding($bindKey, null);\n\n\n $update->table('tableNeedingData');\n $update->addFieldValue($okayField);\n $actual = $update->output();\n $value = $update->getBindings()[$bindKey];\n\n $expected = <<<SQL\nUPDATE\n \"tableNeedingData\"\nSET\n \"okayToBeNull\" = {$bindKey}\n\nSQL;\n\n $this->assertEquals($expected, $actual);\n $this->assertNull($value);\n }", "title": "" }, { "docid": "50195afcfbd71df842addac91033e742", "score": "0.5226667", "text": "public function isPrimaryKeyNull()\n {\n\n return null === $this->getIdordencompra();\n }", "title": "" }, { "docid": "291be73d4cfcfa0aa8eed91efb3cb851", "score": "0.5217818", "text": "public static function nullValue()\n {\n return Hamcrest_Core_IsNull::nullValue();\n }", "title": "" }, { "docid": "b2b32e8fd81db63beb6c9be5ec564e0d", "score": "0.5215789", "text": "function sap_filter_where( $where = '' ) {\n $where .= \" OR (mt1.meta_key = 'sap_site_id' AND CAST(mt1.meta_value AS CHAR) = '')\";\n return $where;\n}", "title": "" }, { "docid": "f89ad4e8035d465c320d5f0b3731a2b5", "score": "0.5213245", "text": "function nullCheck($param)\n{\n if(!empty($param))\n {\n return $param;\n }\n return NULL;\n \n}", "title": "" }, { "docid": "14d1022790253f98ec6555715751d43d", "score": "0.5206303", "text": "function blanc_to_null($val) \r\n{\r\n if ($val == '') \r\n {\r\n $val = NULL; \r\n }\r\n return $val;\r\n}", "title": "" }, { "docid": "9619d6a8aa9c04fb7d675764dd7cec62", "score": "0.520367", "text": "public function allowsNull(): bool;", "title": "" }, { "docid": "fa570b221eb0d929e9bdb9deec14a445", "score": "0.5191191", "text": "public static function whereNull($column, $boolean = 'and', $not = false)\n {\n return self::_s_call('whereNull', [$column, $boolean, $not]);\n }", "title": "" }, { "docid": "d6313f896a5d0cf34c6accc3f9e731b0", "score": "0.51902", "text": "public function __construct()\n\t{\n\t\tparent::__construct('must_not_be_null');\n\t}", "title": "" }, { "docid": "350bdefd3bf35ca392dd1f35d3d12de1", "score": "0.51800364", "text": "public function isPrimaryKeyNull()\n {\n return null === $this->getIntbwhse();\n }", "title": "" }, { "docid": "6444e5655b27b16aa2cbade7bfad61fc", "score": "0.51767915", "text": "function NotNull($value) {\n\n\t\tif (is_array($value)) {\n\n\t\t\tif (sizeof($value) > 0) {\n\n\t\t\t\treturn true;\n\n\t\t\t} else {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif (($value != '') && (strtolower($value) != 'null') && (strlen(trim($value)) > 0)) {\n\n\t\t\t\treturn true;\n\n\t\t\t} else {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "1467f0d1d7824a0538a1f0556526e757", "score": "0.51662", "text": "final public function null(): bool {\n\t\treturn !$this->optionBool(self::OPTION_NOT_NULL);\n\t}", "title": "" }, { "docid": "f9e5811cc3b126fbe668f70f7a9542d9", "score": "0.51542753", "text": "public function notEqual($column, $value) { return $this->addCondition($column, $value, Criterion::NOT_EQUAL_TO); }", "title": "" }, { "docid": "092341a9e85f2590cfe1227e321f467b", "score": "0.5154271", "text": "public static function orWhereNull($column)\n {\n /** @var \\Illuminate\\Database\\Query\\Builder $instance */\n return $instance->orWhereNull($column);\n }", "title": "" }, { "docid": "1aa04b5cd259de24022478be0f8d4ad7", "score": "0.5151566", "text": "public function nullCollection();", "title": "" }, { "docid": "4c3eba715bbb7770e54823e8ec115e33", "score": "0.51411533", "text": "function verif_null($var){\n if($var!=\"\"\n && $var!=\"n facture\"\n && $var!=\"date facture\"\n && $var!=\"date prestation\"\n && $var!=\"votre société\"\n && $var!=\"name contact\"\n ){\n return $var;\n }\n\n else{echo\"veuillez compléter les vides\";}\n }", "title": "" }, { "docid": "3c4fa723ed285d1e5dca7c4a5a478dce", "score": "0.5139624", "text": "public function isNull()\n {\n return is_null($this->storedValue);\n }", "title": "" }, { "docid": "dbe757b81ed7b520459a9613859e848f", "score": "0.5128424", "text": "public function get_no_email(){\n\t\t$this->db->select('c.*')\n\t\t\t->from('contacts c')\n\t\t\t->where_free('c.type = 2 AND (c.email IS NULL OR c.email = \"\")');\n\n\t\treturn $this->db->get();\n\t}", "title": "" }, { "docid": "ece76488bfa5cb29526ee63e205a3922", "score": "0.51213384", "text": "public function getNullifyOnEmptyPostFields()\n {\n return $this->nullify_on_empty_post_fields;\n }", "title": "" }, { "docid": "6bcf29b40e572c70b432ee120eef4127", "score": "0.5114702", "text": "public function isPrimaryKeyNull()\n {\n return (null === $this->getReapCActividad()) && (null === $this->getReapNumeroDictacion()) && (null === $this->getReapCEvaluacion()) && (null === $this->getReapNumeroEvaluacion()) && (null === $this->getReapCTrabajador()) && (null === $this->getReapCPregunta());\n }", "title": "" } ]
e14b9a778c76d8276951bb86daf9455f
Islandora Solr simple search form submit callback.
[ { "docid": "9bb948ef1c58e1d60cee373b7bd132bc", "score": "0.76306945", "text": "function openskydora_simple_search_form_submit($form, &$form_state) {\n module_load_include('inc', 'islandora_solr', 'includes/utilities');\n $search_string = islandora_solr_replace_slashes($form_state['values']['openskydora_simple_search_query']);\n\n $query = array('type' => 'dismax');\n\n\n if (isset ($form_state['values']['collection'])) {\n $col = $form_state['values']['collection'];\n if ($col) {\n $query['collection'] = $col;\n }\n }\n\n $form_state['redirect'] = array(\n ISLANDORA_SOLR_SEARCH_PATH . \"/$search_string\",\n array(\n 'query' => $query,\n ),\n );\n}", "title": "" } ]
[ { "docid": "5769873b568948ebb7d527aed3026652", "score": "0.7729944", "text": "function openskydora_advanced_search_form_submit($form, &$form_state) {\n module_load_include('inc', 'islandora_solr', 'includes/utilities');\n // Collect query values.\n $query_array = array();\n foreach ($form_state['values']['terms'] as $term) {\n $field = $term['field'];\n\n $search = trim($term['search']);\n $search = islandora_solr_replace_slashes($search);\n\n\n $boolean = (isset($term['boolean'])) ? $term['boolean'] : variable_get('openskydora_search_boolean', 'user');\n $field = islandora_solr_lesser_escape($field);\n // Add query.\n if (!empty($search)) {\n $query_array[] = array(\n 'search' => \"$field:($search)\",\n 'boolean' => $boolean,\n );\n }\n }\n\n // Create query.\n $query = '';\n $i = 0;\n foreach ($query_array as $term) {\n $query .= $term['search'];\n if (count($query_array) - 1 != $i) {\n $query .= ' ' . $term['boolean'] . ' ';\n }\n $i++;\n }\n\n // --------------------\n $params = array();\n\n if (isset ($form_state['values']['collection'])) {\n $col = $form_state['values']['collection'];\n if ($col) {\n $params['collection'] = $col;\n// $params['type'] = 'dismax';\n }\n }\n\n // -----------------------\n\n // Check if query is empty.\n if (empty($query) && empty($params)) {\n $query = '*:*';\n }\n\n // Navigate to results page.\n $form_state['redirect'] = array(\n ISLANDORA_SOLR_SEARCH_PATH . \"/$query\",\n array (\n 'query' => $params,\n ),\n );\n}", "title": "" }, { "docid": "8295050a037b7e7305518e2908cda515", "score": "0.76665854", "text": "function opensky_advanced_search_form_submit($form, &$form_state) {\n module_load_include('inc', 'islandora_solr', 'includes/utilities');\n // Collect query values.\n $query_array = array();\n foreach ($form_state['values']['terms'] as $term) {\n $field = $term['field'];\n\n $search = trim($term['search']);\n $search = islandora_solr_replace_slashes($search);\n\n\n $boolean = (isset($term['boolean'])) ? $term['boolean'] : variable_get('opensky_search_boolean', 'user');\n $field = islandora_solr_lesser_escape($field);\n // Add query.\n if (!empty($search)) {\n $query_array[] = array(\n 'search' => \"$field:($search)\",\n 'boolean' => $boolean,\n );\n }\n }\n\n // Create query.\n $query = '';\n $i = 0;\n foreach ($query_array as $term) {\n $query .= $term['search'];\n if (count($query_array) - 1 != $i) {\n $query .= ' ' . $term['boolean'] . ' ';\n }\n $i++;\n }\n\n // --------------------\n $params = array();\n\n if (isset ($form_state['values']['collection'])) {\n $col = $form_state['values']['collection'];\n if ($col) {\n $params['collection'] = $col;\n// $params['type'] = 'dismax';\n }\n }\n\n // -----------------------\n\n // Check if query is empty.\n if (empty($query) && empty($params)) {\n $query = '*:*';\n }\n\n // Navigate to results page.\n $form_state['redirect'] = array(\n ISLANDORA_SOLR_SEARCH_PATH . \"/$query\",\n array (\n 'query' => $params,\n ),\n );\n}", "title": "" }, { "docid": "a45960c105101094f3c611f2c81f5ef2", "score": "0.7516404", "text": "function opensky_simple_search_form_submit($form, &$form_state) {\n module_load_include('inc', 'islandora_solr', 'includes/utilities');\n $search_string = islandora_solr_replace_slashes($form_state['values']['opensky_simple_search_query']);\n\n $query = array('type' => 'dismax');\n\n\n if (isset ($form_state['values']['collection'])) {\n $col = $form_state['values']['collection'];\n if ($col) {\n $query['collection'] = $col;\n }\n }\n\n $form_state['redirect'] = array(\n ISLANDORA_SOLR_SEARCH_PATH . \"/$search_string\",\n array(\n 'query' => $query,\n ),\n );\n}", "title": "" }, { "docid": "c155ef768bdac1e9f9e41ded88911694", "score": "0.7495705", "text": "public function submitSearch()\n {\n }", "title": "" }, { "docid": "3367d271dc3f82b1c0c572952a1ebc8e", "score": "0.7341588", "text": "function islandora_collection_search_form_submit($form, &$form_state) {\n $form_state['rebuild'] = TRUE;\n $search_string = $form_state['values']['islandora_simple_search_query'];\n // Replace the slash so url doesn't break.\n module_load_include('inc', 'islandora_solr', 'includes/utilities');\n $search_string = islandora_solr_replace_slashes($search_string);\n\n $collection_pid = $form_state['values']['collection_pid'];\n\n $collection_select = isset($form_state['values']['collection_select']) ?\n $form_state['values']['collection_select'] :\n FALSE;\n\n // Using edismax by default.\n $query = array('type' => 'edismax');\n if (!empty($collection_pid) && isset($collection_select) && $collection_select == 1) {\n $query['cp'] = $collection_pid;\n }\n drupal_goto('islandora/search/' . $search_string, array('query' => $query));\n}", "title": "" }, { "docid": "831b8b76866520c2fd9a9c9d49dd802f", "score": "0.7185645", "text": "function apachesolr_location_range_widget_location_form_submit($form, &$form_state) {\n\n $field_name = $form_state['values']['field_name'];\n $mapid = $form_state['values']['mapid'];\n $params = $_GET;\n\n $query_param = implode(',', array(\n $form_state['input']['getlocations_search_lat_' . $mapid],\n $form_state['input']['getlocations_search_lon_' . $mapid],\n $form_state['input']['getlocations_search_distance_' . $mapid],\n )\n );\n\n $exits_filter = FALSE;\n unset($params['q']);\n if (isset($params['f'])) {\n foreach (array_values($params['f']) as $filter) {\n if (strpos($filter, $field_name . ':', 0) !== FALSE) {\n $array_index = array_keys($params['f'], $filter);\n $index = reset($array_index);\n $params['f'][$index] = $field_name . ':' . $query_param;\n $exits_filter = TRUE;\n }\n }\n }\n\n if (!$exits_filter) {\n $params['f'][] = $field_name . ':' . $query_param;\n }\n $params['search_location'] = $form_state['input']['getlocations_search_' . $mapid];\n $form_state['redirect'] = array($_GET['q'], array('query' => $params));\n}", "title": "" }, { "docid": "1cee1b0fcd59f07bb9f389f2ad32861f", "score": "0.70600957", "text": "function openskydora_search_collection_search_form_submit($form, &$form_state) {\n module_load_include('inc', 'islandora_solr', 'includes/utilities');\n $search_string =\n islandora_solr_replace_slashes($form_state['values']['openskydora_collection_search_query']);\n\n $query = array(\n 'type'=>'dismax',\n 'collection'=>$form_state['values']['collection']\n );\n\n $form_state['redirect'] = array(\n ISLANDORA_SOLR_SEARCH_PATH . \"/$search_string\",\n array(\n 'query' => $query,\n ),\n );\n}", "title": "" }, { "docid": "deb75f2273f363396dda4a6124121ac9", "score": "0.7003731", "text": "function openskydora_browse_collection_search_form_submit($form, &$form_state) {\n module_load_include('inc', 'islandora_solr', 'includes/utilities');\n $search_string = islandora_solr_replace_slashes($form_state['values']['openskydora_collection_search_query']);\n\n $query = array(\n 'type'=>'dismax',\n 'collection'=>$form_state['values']['collection']\n );\n\n $form_state['redirect'] = array(\n ISLANDORA_SOLR_SEARCH_PATH . \"/$search_string\",\n array(\n 'query' => $query,\n ),\n );\n}", "title": "" }, { "docid": "bf41347800cfa62ea22748a20a02c862", "score": "0.69958967", "text": "function opensky_search_collection_search_form_submit($form, &$form_state) {\n module_load_include('inc', 'islandora_solr', 'includes/utilities');\n $search_string =\n islandora_solr_replace_slashes($form_state['values']['opensky_collection_search_query']);\n\n $query = array(\n 'type'=>'dismax',\n 'collection'=>$form_state['values']['collection']\n );\n\n $form_state['redirect'] = array(\n ISLANDORA_SOLR_SEARCH_PATH . \"/$search_string\",\n array(\n 'query' => $query,\n ),\n );\n}", "title": "" }, { "docid": "797e7d8b88c314366d59f21818d8fd10", "score": "0.69627935", "text": "function opensky_browse_collection_search_form_submit($form, &$form_state) {\n module_load_include('inc', 'islandora_solr', 'includes/utilities');\n $search_string = islandora_solr_replace_slashes($form_state['values']['opensky_collection_search_query']);\n\n $query = array(\n 'type'=>'dismax',\n 'collection'=>$form_state['values']['collection']\n );\n\n $form_state['redirect'] = array(\n ISLANDORA_SOLR_SEARCH_PATH . \"/$search_string\",\n array(\n 'query' => $query,\n ),\n );\n}", "title": "" }, { "docid": "89ab02c52e4f31b50030e372da06adb9", "score": "0.69576305", "text": "function opensky_advanced_search_form($form, &$form_state) {\n module_load_include('inc', 'islandora_solr', 'includes/utilities');\n global $_islandora_solr_queryclass;\n\n // 1: Form update using AJAX.\n if (isset($form_state['triggering_element'])) {\n\n unset($form_state['input']['terms']);\n // Check for add.\n if ($form_state['triggering_element']['#value'] == '+') {\n $form_state['values']['terms'][] = array();\n }\n // Check for remove.\n elseif ($form_state['triggering_element']['#value'] == '-') {\n $field = $form_state['triggering_element']['#field'];\n array_splice($form_state['values']['terms'], $field, 1);\n }\n\n $values = $form_state['values'];\n }\n // 2: Populate with current query on search results page.\n elseif (islandora_solr_results_page($_islandora_solr_queryclass) == TRUE && \n !isset($_islandora_solr_queryclass->internalSolrParams['type'])) {\n\n // Get current query.\n $query = $_islandora_solr_queryclass->solrQuery;\n\n $values['terms'] = array();\n\n $query_explode = preg_split(ISLANDORA_SOLR_QUERY_SPLIT_REGEX, $query);\n\n // Break up the solr query to populate the advanced search form.\n $i = 0;\n foreach ($query_explode as $key => $value) {\n $term = array();\n // Check for first colon to split the string.\n if (strpos($value, ':') != FALSE) {\n // Split the filter into field and value.\n $value_split = preg_split(ISLANDORA_SOLR_QUERY_FIELD_VALUE_SPLIT_REGEX, $value, 2);\n\n $values['terms'][$i]['field'] = stripslashes($value_split[0]);\n\n // Second part of the split is the query value (or first part of\n // it).\n $value_split[1] = str_replace(array('(', ')'), '', $value_split[1]);\n\n $values['terms'][$i]['search'] = $value_split[1];\n\n }\n // If the string does not include a colon or AND/OR/NOT, then it is\n // a\n // part of the query value.\n elseif (!preg_match('/(AND|OR|NOT)/', $value, $matches)) {\n // Trim brackets.\n $value = str_replace(array('(', ')'), '', $value);\n\n if (isset($values['terms'][$i]['search'])) {\n // Append to search string.\n $values['terms'][$i]['search'] .= ' ' . $value;\n }\n else {\n // Search field is not set, so create new search value.\n $values['terms'][$i]['search'] = $value;\n }\n }\n // If it matches AND/OR/NOT, then we have the boolean operator.\n else {\n $values['terms'][$i]['boolean'] = $value;\n\n // XXX: Something about only incrementing here seems... Wrong?\n $i++;\n }\n }\n }\n // 3: Anywhere else: empty form.\n else {\n // Need at least one term to draw the search box.\n $values = array(\n 'terms' => array(''),\n );\n }\n\n $terms = array(\n '#type' => 'markup',\n '#prefix' => '<div id=\"opensky-advanced-terms\">',\n '#suffix' => '</div>',\n '#tree' => TRUE,\n );\n foreach ($values['terms'] as $i => $value) {\n $term = array(\n '#tree' => TRUE,\n '#prefix' => '<div>',\n '#suffix' => '</div>',\n );\n $term['field'] = array(\n '#title' => t('Field'),\n '#type' => 'select',\n '#default_value' => isset($value['field']) ? $value['field'] : 'dc.title',\n '#options' => islandora_solr_get_fields('search_fields'),\n );\n $term['search'] = array(\n '#title' => t('Search terms'),\n '#type' => 'textfield',\n '#size' => 20,\n '#default_value' => isset($value['search']) ? $value['search'] : '',\n );\n\n // Used for when the user presses enter on the search field.\n $term['hidden_submit'] = array(\n '#type' => 'submit',\n '#value' => t('Search'),\n '#attributes' => array('style' => 'visibility:hidden;position:fixed;top:-1000px;right:-1000px;'),\n );\n $term['add'] = array(\n '#type' => 'button',\n '#value' => '+',\n '#attributes' => array('title' => t('Add field')),\n '#name' => 'add-field-' . $i,\n '#ajax' => array(\n 'callback' => '_opensky_advanced_search_terms',\n 'wrapper' => 'opensky-advanced-terms',\n 'method' => 'replace',\n 'effect' => 'fade',\n 'progress' => array('type' => 'none'),\n ),\n );\n if (count($values['terms']) > 1) {\n $term['remove'] = array(\n '#type' => 'button',\n '#field' => $i,\n '#value' => '-',\n '#attributes' => array('title' => t('Remove field')),\n '#name' => 'remove-field-' . $i,\n '#ajax' => array(\n 'callback' => '_opensky_advanced_search_terms',\n 'wrapper' => 'opensky-advanced-terms',\n 'method' => 'replace',\n 'effect' => 'fade',\n 'progress' => array('type' => 'none'),\n ),\n );\n if ((variable_get('opensky_search_boolean', 'user') == 'user') && ((count($values['terms']) - 1) != $i)) {\n $term['boolean'] = array(\n '#type' => 'select',\n '#prefix' => '<div>',\n '#suffix' => '</div>',\n '#default_value' => isset($value['boolean']) ? $value['boolean'] : 'AND',\n '#options' => array(\n 'AND' => 'AND',\n 'OR' => 'OR',\n 'NOT' => 'NOT',\n ),\n );\n }\n }\n\n $terms[] = $term;\n }\n\n // Add terms.\n $form['terms'] = $terms;\n\n // ------------------------\n // collections options supplied by opensky_collection_select_options block,\n // and inserted into collection select via javascript (see custom.js in opensky theme)\n // All because we can't get current collection from this function: it is evaluated apparently\n // too early -> request_uri is the PREVIOUS page, not this one!?\n\n $form['collection'] = array(\n '#title' => t('Collection'),\n '#type' => 'select',\n '#default_value' => '',\n '#options' => array (),\n '#validated' => 'TRUE',\n );\n // ------------------------\n\n // Add controls.\n $form['controls'] = array(\n '#type' => 'markup',\n '#prefix' => '<div class=\"islandora-solr-advanced-controls\">',\n '#suffix' => '</div>',\n );\n $form['controls']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Search'),\n );\n return $form;\n}", "title": "" }, { "docid": "bf55699075a30696e541658857923763", "score": "0.6954148", "text": "function openskydora_advanced_search_form($form, &$form_state) {\n module_load_include('inc', 'islandora_solr', 'includes/utilities');\n global $_islandora_solr_queryclass;\n\n // 1: Form update using AJAX.\n if (isset($form_state['triggering_element'])) {\n\n unset($form_state['input']['terms']);\n // Check for add.\n if ($form_state['triggering_element']['#value'] == '+') {\n $form_state['values']['terms'][] = array();\n }\n // Check for remove.\n elseif ($form_state['triggering_element']['#value'] == '-') {\n $field = $form_state['triggering_element']['#field'];\n array_splice($form_state['values']['terms'], $field, 1);\n }\n\n $values = $form_state['values'];\n }\n // 2: Populate with current query on search results page.\n elseif (islandora_solr_results_page($_islandora_solr_queryclass) == TRUE && \n !isset($_islandora_solr_queryclass->internalSolrParams['type'])) {\n\n // Get current query.\n $query = $_islandora_solr_queryclass->solrQuery;\n\n $values['terms'] = array();\n\n $query_explode = preg_split(ISLANDORA_SOLR_QUERY_SPLIT_REGEX, $query);\n\n // Break up the solr query to populate the advanced search form.\n $i = 0;\n foreach ($query_explode as $key => $value) {\n $term = array();\n // Check for first colon to split the string.\n if (strpos($value, ':') != FALSE) {\n // Split the filter into field and value.\n $value_split = preg_split(ISLANDORA_SOLR_QUERY_FIELD_VALUE_SPLIT_REGEX, $value, 2);\n\n $values['terms'][$i]['field'] = stripslashes($value_split[0]);\n\n // Second part of the split is the query value (or first part of\n // it).\n $value_split[1] = str_replace(array('(', ')'), '', $value_split[1]);\n\n $values['terms'][$i]['search'] = $value_split[1];\n\n }\n // If the string does not include a colon or AND/OR/NOT, then it is\n // a\n // part of the query value.\n elseif (!preg_match('/(AND|OR|NOT)/', $value, $matches)) {\n // Trim brackets.\n $value = str_replace(array('(', ')'), '', $value);\n\n if (isset($values['terms'][$i]['search'])) {\n // Append to search string.\n $values['terms'][$i]['search'] .= ' ' . $value;\n }\n else {\n // Search field is not set, so create new search value.\n $values['terms'][$i]['search'] = $value;\n }\n }\n // If it matches AND/OR/NOT, then we have the boolean operator.\n else {\n $values['terms'][$i]['boolean'] = $value;\n\n // XXX: Something about only incrementing here seems... Wrong?\n $i++;\n }\n }\n }\n // 3: Anywhere else: empty form.\n else {\n // Need at least one term to draw the search box.\n $values = array(\n 'terms' => array(''),\n );\n }\n\n $terms = array(\n '#type' => 'markup',\n '#prefix' => '<div id=\"openskydora-advanced-terms\">',\n '#suffix' => '</div>',\n '#tree' => TRUE,\n );\n foreach ($values['terms'] as $i => $value) {\n $term = array(\n '#tree' => TRUE,\n '#prefix' => '<div>',\n '#suffix' => '</div>',\n );\n $term['field'] = array(\n '#title' => t('Field'),\n '#type' => 'select',\n '#default_value' => isset($value['field']) ? $value['field'] : 'dc.title',\n '#options' => islandora_solr_get_fields('search_fields'),\n );\n $term['search'] = array(\n '#title' => t('Search terms'),\n '#type' => 'textfield',\n '#size' => 20,\n '#default_value' => isset($value['search']) ? $value['search'] : '',\n );\n\n // Used for when the user presses enter on the search field.\n $term['hidden_submit'] = array(\n '#type' => 'submit',\n '#value' => t('Search'),\n '#attributes' => array('style' => 'visibility:hidden;position:fixed;top:-1000px;right:-1000px;'),\n );\n $term['add'] = array(\n '#type' => 'button',\n '#value' => '+',\n '#attributes' => array('title' => t('Add field')),\n '#name' => 'add-field-' . $i,\n '#ajax' => array(\n 'callback' => '_openskydora_advanced_search_terms',\n 'wrapper' => 'openskydora-advanced-terms',\n 'method' => 'replace',\n 'effect' => 'fade',\n 'progress' => array('type' => 'none'),\n ),\n );\n if (count($values['terms']) > 1) {\n $term['remove'] = array(\n '#type' => 'button',\n '#field' => $i,\n '#value' => '-',\n '#attributes' => array('title' => t('Remove field')),\n '#name' => 'remove-field-' . $i,\n '#ajax' => array(\n 'callback' => '_openskydora_advanced_search_terms',\n 'wrapper' => 'openskydora-advanced-terms',\n 'method' => 'replace',\n 'effect' => 'fade',\n 'progress' => array('type' => 'none'),\n ),\n );\n if ((variable_get('openskydora_search_boolean', 'user') == 'user') && ((count($values['terms']) - 1) != $i)) {\n $term['boolean'] = array(\n '#type' => 'select',\n '#prefix' => '<div>',\n '#suffix' => '</div>',\n '#default_value' => isset($value['boolean']) ? $value['boolean'] : 'AND',\n '#options' => array(\n 'AND' => 'AND',\n 'OR' => 'OR',\n 'NOT' => 'NOT',\n ),\n );\n }\n }\n\n $terms[] = $term;\n }\n\n // Add terms.\n $form['terms'] = $terms;\n\n // ------------------------\n // collections options supplied by openskydora_collection_select_options block,\n // and inserted into collection select via javascript (see custom.js in openskydora theme)\n // All because we can't get current collection from this function: it is evaluated apparently\n // too early -> request_uri is the PREVIOUS page, not this one!?\n\n $form['collection'] = array(\n '#title' => t('Collection'),\n '#type' => 'select',\n '#default_value' => '',\n '#options' => array (),\n '#validated' => 'TRUE',\n );\n // ------------------------\n\n // Add controls.\n $form['controls'] = array(\n '#type' => 'markup',\n '#prefix' => '<div class=\"islandora-solr-advanced-controls\">',\n '#suffix' => '</div>',\n );\n $form['controls']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Search'),\n );\n return $form;\n}", "title": "" }, { "docid": "00820c4c3cb19c79b61e588c73a9de84", "score": "0.6924596", "text": "function build_simple_solr_form() {\n // FIXME: This should actually be checking the settings in the request handler... Not making assumptions based on name\n $required = FALSE;\n if (variable_get('islandora_solr_search_block_request_handler', '') == 'standard') {\n $required = TRUE;\n }\n global $islandora_query;\n if (!strpos($islandora_query, ':')) {\n $default = $islandora_query;\n }\n // TODO: Fix the above. The global is no longer valid, and the test is not conclusive. Should instead test for deftype=dismax.\n $form[\"islandora_simple_search_query\"] = array(\n '#size' => '24%',\n '#type' => 'textfield',\n '#title' => '',\n '#default_value' => $default,\n '#required' => $required,\n );\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('search')\n );\n return $form;\n }", "title": "" }, { "docid": "97423f0bdae51d6919b518b8ef3ce26f", "score": "0.6841081", "text": "public function run_search()\n {\n ee()->load->library('logger');\n ee()->load->library('Rr_v2_form_service', null, 'Rr_forms');\n\n $params = array();\n\n if(isset($_POST)) {\n $resoParams = ee()->Rr_forms->toReso($_POST);\n\n $data = array(\n 'params' => $resoParams,\n 'site_id' => $this->siteId\n );\n\n // Check if doing a server scope by short code first\n if(isset($_POST['short_code']) && $_POST['short_code']) {\n $data['short_code'] = $_POST['short_code'];\n } elseif(isset($_POST['all']) && $_POST['all']) {\n $data['all'] = $_POST['all'];\n }\n\n ee()->Rr_search->insert($data);\n\n $resultsPath = $_POST['results_path'];\n preg_match_all(\"/:([^\\)]*):/\", $resultsPath, $matches);\n\n if(sizeof($matches) == 2) {\n $match = trim($matches[0][0]);\n\n if($match == ':search_id:') {\n $resultsPath = str_replace($matches[0][0], ee()->Rr_search->id, $resultsPath);\n } else {\n ee()->output->fatal_error('You must use :search_id: in your results path as the target search id token. You supplied the following token: ' . $match, 500);\n }\n } else {\n if(substr($resultsPath, -1) !== '/') {\n $resultsPath .= '/';\n }\n\n $resultsPath .= ee()->Rr_search->id;\n }\n \n ee()->functions->redirect($resultsPath);\n }\n }", "title": "" }, { "docid": "708ea7b65e66e26929d96180e0b5fd7e", "score": "0.683926", "text": "function pld_form_islandora_solr_simple_search_form_alter(&$form, &$form_state, $form_id) {\n\n\t$form['simple']['islandora_simple_search_query'] = array(\n\t\t'#size' => '30',\n\t\t'#type' => 'textfield',\n\t\t'#attributes' => array(\n\t\t\t'class' => array(\n\t\t\t\t'pld-collections-search',\n\t\t\t),\n\t\t\t'placeholder' => t('Search Collections'),\n\t\t),\n\t\t'#title' => '',\n\t);\n\t$form['simple']['submit'] = array(\n\t\t'#type' => 'submit',\n\t\t'#value' => t('search'),\n\t\t'#attributes' => array(\n\t\t\t'class' => array(\n\t\t\t\t'pld-simple-search-submit',\n\t\t\t),\n\t\t),\n\t);\n}", "title": "" }, { "docid": "cf90847511313bc15c11630b4495c4d7", "score": "0.67397714", "text": "private function search_form() {\n\n\t\tif ( isset( $_REQUEST['s'] ) ) { // Input var okay.\n\t\t\t$term = sanitize_text_field( wp_unslash( $_REQUEST['s'] ) ); // Input var okay.\n\t\t} else {\n\t\t\t$term = '';\n\t\t}\n?>\n\t\t<form id=\"app-addons-search\" class=\"search-form search-plugins\" method=\"get\" action=\"\">\n\t\t\t<ul class=\"filter-links addons-filter\">\n\t\t\t\t<?php echo $this->get_filters(); ?>\n\t\t\t\t<li>\n\t\t\t\t\t<div class=\"app-mp-addons-filter\">\n\t\t\t\t\t\t<span class=\"screen-reader-text\"><?php echo __( 'Search Add-ons', APP_TD ); ?></span>\n\t\t\t\t\t\t<input type=\"search\" name=\"s\" value=\"<?php echo esc_attr( $term ) ?>\" class=\"wp-filter-search\" placeholder=\"<?php echo esc_attr__( 'Search Add-ons', APP_TD ); ?>\">\n\t\t\t\t\t</div>\n\t\t\t\t\t<input type=\"submit\" name=\"\" id=\"search-submit\" class=\"button screen-reader-text\" value=\"<?php echo esc_attr__( 'Search Add-ons', APP_TD ); ?>\">\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<?php appthemes_pass_request_var( 'page' ); ?>\n\t\t\t<?php appthemes_pass_request_var( 'tab' ); ?>\n\t\t\t<?php appthemes_pass_request_var( 'post_type' ); ?>\n\t\t</form>\n<?php\n\t}", "title": "" }, { "docid": "606e91895291d09c563c98eab7f2cd6e", "score": "0.6666862", "text": "public function searchAction() {\n\t\t$form = $this->getForm ( '/admin/tickets/searchprocess' );\n\t\t$form->getElement ( 'save' )->setName ( 'search' );\n\t\t\n\t\t$this->view->form = $form;\n\t\t$this->render ( 'searchform' );\n\t}", "title": "" }, { "docid": "581bb38f08c4c9236b6ccfedfddbe5b1", "score": "0.6615941", "text": "function submit() {\r\n \r\n \tglobal $searchArgList;\r\n\r\n\t\tforeach ($searchArgList as $key=>$data) {\r\n\t\t\t\r\n\t\t\tif ($this->input->post($data))\r\n\t\t\t\t$segments[$data] = $this->input->post($data);\r\n\t\t\telse\r\n\t\t\t\t$segments[$data] = 0;\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$url = \"/Accounts/search/\";\r\n\t\t\r\n\t\tforeach ($segments as $data)\r\n\t\t\t$url .= $data . \"/\";\r\n\t\t\t\r\n\t\t\r\n\t\tredirect($url);\r\n\t\t\t\r\n\t\r\n \r\n }", "title": "" }, { "docid": "1fee72891c2243842276a1554ad17fd9", "score": "0.65234154", "text": "function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n \n // check if the user has filled the form\n if (isset($data->name))\n {\n // creates a filter using what the user has typed\n $filter = new TFilter('name', 'like', \"%{$data->name}%\");\n \n // stores the filter in the session\n TSession::setValue('City_filter', $filter);\n TSession::setValue('City_name', $data->name);\n \n // fill the form with data again\n $this->form->setData($data);\n }\n \n $param = array();\n $param['offset'] =0;\n $param['first_page']=1;\n $this->onReload($param);\n }", "title": "" }, { "docid": "5b711c2809e641a5660ac6904bef6a8a", "score": "0.64811474", "text": "function UTKdrupal_form_islandora_solr_simple_search_form_alter(&$form, &$form_state, $form_id) {\n $form['simple']['islandora_simple_search_query']['#attributes']['placeholder'] = t(\"Search Repository\");\n}", "title": "" }, { "docid": "f5d0dd9e6ea4e87e350eacc05da07d9e", "score": "0.6471418", "text": "public function search_form()\n {\n ee()->load->helper('form');\n\n $shortCode = ee()->TMPL->fetch_param(\"short_code\", '');\n $resultsPath = ee()->TMPL->fetch_param('results_path', ee()->uri->uri_string());\n $searchAll = ee()->TMPL->fetch_param('all', '');\n $actionUrl = ee()->functions->fetch_action_id(RETS_RABBIT_V2_NAME, 'run_search');\n\n $hiddenFields = array(\n 'ACT' => $actionUrl,\n 'results_path' => $resultsPath,\n );\n\n if($shortCode) {\n $hiddenFields['short_code'] = $shortCode;\n }\n\n if($searchAll) {\n $hiddenFields['all'] = $searchAll;\n }\n\n $formAttrs = array(\n 'name' => 'search_results',\n 'id' => ee()->TMPL->form_id,\n 'class' => ee()->TMPL->form_class,\n );\n\n $variable = array();\n $tagdata = ee()->TMPL->tagdata;\n\n $output = form_open('', $formAttrs, $hiddenFields);\n $output .= ee()->TMPL->parse_variables($tagdata, array($variable));\n $output .= \"</form>\";\n\n return $output;\n }", "title": "" }, { "docid": "ac9ef3c7d9d7a5b51c28e6e6d47e2fcf", "score": "0.64583117", "text": "function apachesolr_panels_form_apachesolr_panels_search_form_alter(&$form, &$form_state) {\n $form['#validate'] = array('search_form_validate');\n $form['#submit'] = array('search_form_submit');\n}", "title": "" }, { "docid": "da37599a73cbd559e845725ee4415547", "score": "0.6446408", "text": "function openskydora_simple_search_form($form, &$form_state) {\n\n $form['simple'] = array(\n '#type' => 'container',\n '#attributes' => array(\n 'class' => array(\n 'container-inline',\n ),\n ),\n );\n\n //---------------\n $form['simple']['collection'] = array(\n '#title' => t('Search in'),\n '#type' => 'select',\n '#default_value' => '',\n '#options' => array (),\n '#validated' => 'TRUE',\n );\n // ------------------------\n\n\n $form['simple'][\"openskydora_simple_search_query\"] = array(\n '#size' => '46',\n '#type' => 'textfield',\n '#title' => 'for',\n // @todo Should this be the searched value?\n '#default_value' => '',\n );\n $form['simple']['submit'] = array(\n '#type' => 'submit',\n '#value' => t(' Go '),\n );\n return $form;\n}", "title": "" }, { "docid": "23ab2baa0ac3e233668c05d7ed9a101d", "score": "0.6407876", "text": "function execute_search(){ \n\t\t \n\t\t $solr = new Apache_Solr_Service('localhost', 8983, '/solr');\n\t\t //$solr->setDefaultTimeout(5.0);\n\t\t if ($this->pingSolr($solr)) {\n\t\t //if (true) {\n\t\t\t\t try {\n\t\t\t\t\t $param_array = $this->param_array;\n\t\t\t\t\t \n\t\t\t\t\t if((count($param_array[\"facet.field\"])<10) && !$this->doPost){\t \n\t\t\t\t\t\t $response = $solr->search(\t$this->query,\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->offset,\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->number_recs,\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->param_array);\n\t\t\t\t\t }\n\t\t\t\t\t else{\n\t\t\t\t\t\t $response = $solr->search(\t$this->query,\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->offset,\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->number_recs,\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->param_array,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \"POST\");\n\t\t\t\t\t\t \n\t\t\t\t\t }\n\t\t\t\t\t $this->queryString = $solr->queryString;\n\t\t\t\t\t $docs_array = array();\n\t\t\t\t\t \n\t\t\t\t\t foreach (($response->response->docs) as $doc) {\n\t\t\t\t\t\t \n\t\t\t\t\t\t $actDocOutput = array(\"uuid\" => $doc->uuid);\n\t\t\t\t\t\t if(!$this->rawDocsArray){\n\t\t\t\t\t\t\t\t$actDocOutput = $this->addResultFields($doc, $actDocOutput);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t $allDoc = (array)$doc;\n\t\t\t\t\t\t\t $arrayKey = array_keys($allDoc);\n\t\t\t\t\t\t\t $actDocOutput = $allDoc[$arrayKey[1]]; //second key has the fields and data we want in an array\n\t\t\t\t\t\t\t //echo print_r($actDocOutput);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t\t $docs_array[] = $actDocOutput ;\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t $rawResponse = Zend_Json::decode($response->getRawResponse());\n\t\t\t\t\t $reponse = $rawResponse['response'];\n\t\t\t\t\t $numFound = $reponse['numFound'];\n\t\t\t\t\t $this->numFound = $numFound;\n\t\t\t\t\t $this->documentsArray = $docs_array;\n\t\t\t\t\t \n\t\t\t\t\t if(isset($rawResponse['facet_counts'])){\n\t\t\t\t\t\t $this->facets = $rawResponse['facet_counts'];\n\t\t\t\t\t }\n\t\t\t\t\t $this->pseudoBoost();\n\t\t\t\t\t $this->getGeoTiles();\n\t\t\t\t\t $this->getChronoTiles();\n\t\t\t\t\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t $this->solrDown = true;\n\t\t\t\t\t $this->queryString = $solr->queryString;\n\t\t\t\t\t $solrError = new SolrError;\n\t\t\t\t\t $requestParams = $this->requestParams;\n\t\t\t\t\t $requestParams[\"solrError\"] = (string)$e;\n\t\t\t\t\t $this->requestParams = $requestParams;\n\t\t\t\t\t $solrError->initialize($this->requestParams);\n\t\t\t\t}\n\t \n\t\t } else {\n\t\t\t\t //die(\"unable to connect to the solr server. exiting...\");\n\t\t\t\t //echo OpenContext_OCConfig::getSolrDownMessage();\n\t\t\t\t //die(\"Upgrade in progress, unable to connect to the solr server. exiting...\");\n\t\t\t\t \n\t\t\t\t$this->solrDown = true;\n\t\t\t\t$solrError = new SolrError;\n\t\t\t\t$solrError->initialize($this->requestParams);\n\t\t\n\t\t }\n\t\t \n\t\t $this->makeAltLinks(); //now that search results are found, make some links\n }", "title": "" }, { "docid": "6850a9007c0d124101fc6a7806c4fbd1", "score": "0.6362464", "text": "function _perform_solr_search($queryparam = 'dummy') {\n\n // TODO: needs tidying.\n // encode the queryparam?\n\n $params = array();\n $params['rows'] = 50;\n $params['start'] = 0;\n $params['indent'] = 'on';\n $params['q'] = $queryparam;\n $params['version'] = '2.2';\n\n $params['fl'] = \"*\";\n $params['qt'] = \"standard\";\n $params['wt'] = \"json\";\n $params['hl'] = \"true\";\n $params['hl.fl'] = \"dc.type\";\n\n // If we display all items without pager.\n if ($params['rows'] == 0) {\n $params['rows'] = 1000000;\n }\n\n // Add filters to parameters.\n if (isset($params['filters'])) {\n $params['fq'] = $params['filters'];\n }\n\n // Add sorting.\n if (isset($params['sort'])) {\n // Populate sorting parameters.\n foreach ($params['sort'] as $field => $order) {\n $params['sort'][] = $field . ' ' . $order;\n }\n }\n\n // Set query.\n $dismax = NULL;\n if (isset($params['q'])) {\n // Query.\n $query = $params['q'];\n\n // Dismax.\n if (isset($params['defType']) AND $params['defType'] == 'dismax') {\n $dismax = $params['defType'];\n // If no qf fields are specified in the requestHandler\n // a default list is supplied here for dismax searches.\n $params['qf'] = 'dc.title^5 dc.subject^2 dc.description^2 dc.creator^2 dc.contributor^1 dc.type';\n }\n }\n else {\n $query = '*:*';\n }\n\n $url = variable_get('islandora_solr_search_block_url', 'http://localhost:8080/solr');\n $pathparts = parse_url($url);\n\n $solr = new Apache_Solr_Service($pathparts['host'], $pathparts['port'], $pathparts['path'] . '/');\n $solr->setCreateDocuments(0);\n\n // This is where the query gets executed and output starts being created.\n try {\n $results = $solr->search($query, $params['start'], $params['rows'], $params);\n } catch (Exception $e) {\n drupal_set_message(t('_perform_solr_search :: ') . $e->getMessage());\n }\n\n// $total = (int) $results->response->numFound;\n// $start = min(1, $total);\n// $end = min(($limit + $recordstart), $total);\n\n return $results;\n}", "title": "" }, { "docid": "4e5d59be3b63c2483387ce8a4b8762f9", "score": "0.6343419", "text": "public function pi_listing_home_search_submit( ) {\n\t\tif ( ! isset( $_POST['pi_listing_search_data'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Verify that the nonce is valid.\n\t\tif ( ! wp_verify_nonce( $_POST['pi_listing_search_data'], 'pi_listing_nonce_field' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/* OK, it's safe for us to save the data now. */\n\t\t// Make sure that it is set.\n\n\t\tif ( !isset($_POST['ls']) ) {\n\t\t\treturn ; \n\t\t}else{\n\t\t\twp_redirect( home_url() . '/listings?ls=' . $_POST['ls'] );\n\t\t}\n\n\t}", "title": "" }, { "docid": "61fdca40cc91c9017600a82a358fa15f", "score": "0.63001394", "text": "function epf_custom_search_submit($form, &$form_state) {\n $delta = (isset($form_state['values']['delta'])) ? 'blocks_' . $form_state['values']['delta'] . '_' : '' ;\n variable_set('custom_search_delta', $delta); // save for later use (exclusion & refresh)\n $type = 'node';\n $keys = $form_state['values'][$form_state['values']['form_id']];\n\n $types = (isset($form_state['values']['custom_search_types'])) ? $form_state['values']['custom_search_types'] : array();\n if($types=='c-paper'){\n \t$types=array('c-paper','c-paper_from_arxiv');\n }\n if (!is_array($types)) $types = array($types);\n $types = array_map('_custom_search_filter_keys', array_filter($types));\n\n if (module_exists('taxonomy')) {\n $terms = array();\n $vocabularies = taxonomy_get_vocabularies();\n foreach ($vocabularies as $voc) {\n if (isset($form_state['values']['custom_search_vocabulary_' . $voc->vid])) {\n $vterms = $form_state['values']['custom_search_vocabulary_' . $voc->vid];\n if (!is_array($vterms)) $vterms = array($vterms);\n $terms = array_merge($terms, $vterms);\n }\n }\n $terms = array_map('_custom_search_filter_keys', array_values(array_filter($terms)));\n // if one or more -Any- is selected, delete them\n while (($index = array_search('all', $terms)) !== FALSE) array_splice($terms, $index, 1);\n }\n\n $search_types = module_implements('search_info');\n if (in_array(current($types), $search_types)) $type = current($types);\n else {\n if (isset($form_state['values']['custom_search_criteria_or']) && trim($form_state['values']['custom_search_criteria_or']) != '') $keys .= ' ' . str_replace(' ', ' OR ', trim($form_state['values']['custom_search_criteria_or']));\n if (isset($form_state['values']['custom_search_criteria_negative']) && trim($form_state['values']['custom_search_criteria_negative']) != '') $keys .= ' -' . str_replace(' ', ' -', trim($form_state['values']['custom_search_criteria_negative']));\n if (isset($form_state['values']['custom_search_criteria_phrase']) && trim($form_state['values']['custom_search_criteria_phrase']) != '') $keys .= ' \"' . trim($form_state['values']['custom_search_criteria_phrase']) . '\"';\n $original_keywords = $keys;\n if (count($types)) {\n // If a content type is selected, and it's not -Any-, search for that type.\n if (!in_array('all', $types)) $keys = search_expression_insert($keys, 'type', implode(',', $types));\n // If -Any- is selected and -Any- is set to restrict the search, grab the content types.\n elseif (variable_get('custom_search_' . $delta . 'any_restricts', FALSE)) {\n $restricted_types = array_keys(array_filter(variable_get('custom_search_' . $delta . 'node_types', array())));\n $keys = search_expression_insert($keys, 'type', implode(',', $restricted_types));\n }\n }\n if (module_exists('taxonomy') && count($terms)) {\n $keys = search_expression_insert($keys, 'term', implode(',', $terms));\n }\n if (module_exists('custom_search_i18n')) {\n if (variable_get('custom_search_i18n_' . $delta . 'search_language', 'all') == 'current') {\n $keys = search_expression_insert($keys, 'language', i18n_language()->language);\n }\n }\n }\n $search_path = array(\n 'path' => 'search/' . $type . '/' . $keys,\n 'query' => array(),\n );\n\n // Integrates other search modules\n if (module_exists('apachesolr_search')) {\n $search_path = _custom_search_apachesolr_search(array(\n 'keywords' => $original_keywords,\n 'types' => $types,\n 'terms' => (!empty($terms)) ? $terms : array(),\n ));\n }\n elseif (module_exists('google_appliance')) {\n $search_path = _custom_search_google_appliance_search(array(\n 'keys' => $keys,\n ));\n }\n elseif (module_exists('luceneapi_node') && variable_get('luceneapi:default_search', 0)) {\n $search_path = _custom_search_lucenapi_search(array(\n 'keywords' => $original_keywords,\n 'types' => $types,\n 'terms' => (!empty($terms)) ? $terms : array(),\n ));\n }\n elseif (module_exists('search_api_page')) {\n $search_api_page = search_api_page_load(variable_get('custom_search_' . $delta . 'search_api_page', 0));\n if ($search_api_page) {\n $search_path = _custom_search_search_api_search(array(\n 'keywords' => $original_keywords,\n 'types' => $types,\n 'terms' => (!empty($terms)) ? $terms : array(),\n 'page' => $search_api_page,\n ));\n }\n }\n\n // Build a custom path if needed\n if (isset($form_state['values']['custom_search_paths']) && $form_state['values']['custom_search_paths'] != '') {\n $custom_path = str_replace('[key]', $form_state['values'][$form_state['values']['form_id']], $form_state['values']['custom_search_paths']);\n if (strpos($form_state['values']['custom_search_paths'], '[terms]') !== FALSE) $custom_path = str_replace('[terms]', (count($terms)) ? implode($form_state['values']['custom_search_paths_terms_separator'], $terms) : '', $custom_path);\n // Check for a query string\n $custom_path_query_position = strpos($custom_path, '?');\n $custom_path_query = array();\n if ($custom_path_query_position !== FALSE) {\n $custom_path_query_tmp = substr($custom_path, 1 + $custom_path_query_position);\n $custom_path_query_tmp = str_replace('&amp;', '&', $custom_path_query_tmp);\n $custom_path_query_tmp = explode('&', $custom_path_query_tmp);\n foreach ($custom_path_query_tmp as $param) {\n $param_exploded = explode('=', $param);\n $custom_path_query[$param_exploded[0]] = $param_exploded[1];\n }\n $custom_path = substr($custom_path, 0, $custom_path_query_position);\n }\n // Check for external path. If not, add base path\n if (drupal_substr($custom_path, 0, 4) != 'http') $custom_path = url($custom_path, array('absolute' => TRUE));\n // Send the final url\n $form_state['redirect'] = url($custom_path, array('query' => $custom_path_query, 'absolute' => TRUE));\n }\n else $form_state['redirect'] = url($search_path['path'], array('query' => $search_path['query'], 'absolute' => TRUE));\n\n}", "title": "" }, { "docid": "d0c9eaf23ee111d46dd2f465d79bcb63", "score": "0.62920064", "text": "function freetext_search_block_form_submit($form, &$form_state) {\n $query = $_GET;\n unset($query['q']);\n\n if ($form_state['values']['pwb_search_facets_content_types'] != '_all_') {\n $form_state['redirect'] = array('search/personaleweb/' . $form_state['values']['search'], array('query' => array('fq' => 'bundle:' . $form_state['values']['pwb_search_facets_content_types'])));\n }\n else {\n $form_state['redirect'] = array('search/personaleweb/' . $form_state['values']['search']);\n }\n}", "title": "" }, { "docid": "f4f77d14b213e5a74aa536257bb48680", "score": "0.6265515", "text": "public function processAction() {\n\t\t$this->ultility = Mage::getModel('solrsearch/ultility');\n\t\t\n\t\t$startTime = time();\n\n\t\t$errors = array();\n\n\t\t//get current page\n\t\t$page = 1;\n\t\tif( isset($_POST['page']) && is_numeric($_POST['page'])) {\n\t\t\t$page = $_POST['page'];\n\t\t}\n\n\t\t//get solr core\n\t\t$solrcore = 'english';\n\t\tif ( isset($_POST['core']) && !empty($_POST['core'])) {\n\t\t\t$solrcore = $_POST['core'];\n\t\t}\n\n\t\t//get current website id\n\t\t$websiteid = array();\n\t\tif ( isset($_POST['website']) && !empty($_POST['website'])) {\n\t\t\t$websiteid = explode(',', $_POST['website']);\n\t\t}\n\n\t\t//get total pages\n\t\t$totalPages = 1;\n\t\tif ( isset($_POST['totalpage']) && is_numeric($_POST['totalpage'])) {\n\t\t\t$totalPages = $_POST['totalpage'];\n\t\t}\n\n\t\t//get stores ids\n\t\t$stores = '';\n\t\t$storesArr = array();\n\t\tif ( isset($_POST['stores']) && !empty($_POST['stores'])) {\n\t\t\t$stores = $_POST['stores'];\n\t\t\t$storesArr = explode(',', $stores);\n\t\t}\n\n\t\t//get total of products\n\t\t$productCount = 1;\n\t\tif ( isset($_POST['productcount']) && is_numeric($_POST['productcount'])) {\n\t\t\t$productCount = $_POST['productcount'];\n\t\t}\n\n\t\t//get total number of solr documents\n\t\t$numDocs = 0;\n\t\tif ( isset($_POST['numDocs']) && is_numeric($_POST['numDocs']) ) {\n\t\t\t$numDocs = $_POST['numDocs'];\n\t\t}\n\t\t//get action\n\t\t$action = 'NEW';\n\t\tif (isset($_POST['action']) && !empty($_POST['action'])) {\n\t\t\t$action = $_POST['action'];\n\t\t}\n\t\t\n\t\t//Items per page\n\t\t$itemsPerCommit = 50;\n\t\t$itemsPerCommitConfig = Mage::getStoreConfig('webmods_solrsearch/settings/items_per_commit', 0);\n\t\tif(intval($itemsPerCommitConfig) > 0) $itemsPerCommit = $itemsPerCommitConfig;\n\t\t$this->itemsPerCommit = $itemsPerCommit;\n\n\t\t$solr_server_url = Mage::getStoreConfig('webmods_solrsearch/settings/solr_server_url', 0);\n\n\t\t//is category name searchable\n\t\t$solr_include_category_in_search = Mage::getStoreConfig('webmods_solrsearch/settings/solr_search_in_category', 0);\n\t\t//use category for facets\n\t\t$use_category_as_facet = Mage::getStoreConfig('webmods_solrsearch/settings/use_category_as_facet', 0);\n\n\t\tif (empty($solrcore) || empty($solr_server_url)){\n\t\t\t$errors[] = Mage::helper('solrsearch')->__('Solr Server Url is empty or Magento store and Solr index not yet mapped.');\n\t\t}\n\t\t//Solr data update url\n\t\t$Url = trim($solr_server_url,'/').'/'.$solrcore.'/update/json?commit=true&wt=json';\n\t\t//Solr get one doc url\n\t\t$start = intval($page) - 1;\n\t\t//print_r($_POST);\n\n\t\t$SolrQueryUrl = trim($solr_server_url,'/').'/'.$solrcore.'/select/?q=*:*&fl=products_id,store_id&rows=1&wt=json';\n\n\t\t//Solr get all docs url\n\t\t$getExistingSolrDocsQueryUrl = trim($solr_server_url,'/').'/'.$solrcore.'/select/?q=*:*&fl=products_id,store_id&start=0&rows='.$_POST['productcount'].'&wt=json';\n\t\t//Solr delete all docs from index\n\t\t$clearnSolrIndexUrl = trim($solr_server_url,'/').'/'.$solrcore.'/update?stream.body=<delete><query>*:*</query></delete>&commit=true';\n\n\t\t//get product collection\n\n\n\t\t$collection = null;//$this->loadProductCollection($page);\n\t\t \n\t\tif($action == 'UPDATE') {\n\t\t\tif ($productCount == $numDocs && $page == 1) {\n\t\t\t\t//empty solr index\n\n\t\t\t\t$storeMappingString = Mage::getStoreConfig('webmods_solrsearch_indexes/'.$solrcore.'/stores', 0);\n\n\t\t\t\t$storeMappingString = trim($storeMappingString, ',');\n\t\t\t\t\n\t\t\t\t$connection = $this->getWriteConnection();\n\t\t\t\t$logtable = $this->getLogTable();\n\t\t\t\t\n\t\t\t\tif (!empty($storeMappingString)) {\n\t\t\t\t\t$results = $connection->query(\"DELETE FROM {$logtable} WHERE `logs_type` = 'INDEXEDPRODUCT' AND store_id IN({$storeMappingString});\");\n\t\t\t\t}\n\n\t\t\t\t$results = $connection->query(\"DELETE FROM {$logtable} WHERE `logs_type` = 'INDEXEDPRODUCT' AND store_id IN({$storeMappingString});\");\n\n\t\t\t\t$this->doRequest($clearnSolrIndexUrl);\n\t\t\t\t$returnData = array();\n\t\t\t\t$returnData['page'] = $page;\n\t\t\t\t$returnData['documents'] = 0;\n\t\t\t\t$returnData['continueprocess'] = 'yes';\n\t\t\t\t$returnData['nextpage'] = 1;\n\t\t\t\t$returnData['percent'] = 0;\n\t\t\t\t$this->getResponse()->setHeader(\"Content-Type\", \"application/json\", true);\n\t\t\t\t\t\n\t\t\t\t$returnData['estimatedtime'] = 0;\n\t\t\t\t$returnData['remainedtime'] = 0;\n\t\t\t\t$returnData['numdocs'] = 0;\n\t\t\t\t$returnData['action'] = 'NEW';\n\t\t\t\techo json_encode($returnData);\n\t\t\t\texit;\n\t\t\t}\n\t\t\t$updateParams = array(\n\t\t\t\t\t'existing_solr_docs_query_url' => $getExistingSolrDocsQueryUrl.'&rows='.$_POST['numDocs'],\n\t\t\t\t\t'stores' => explode(',', $stores),\n\t\t\t\t\t'solr_update_url' => $Url,\n\t\t\t\t\t'solr_query_url' => $SolrQueryUrl,\n\t\t\t\t\t'page' => $page\n\t\t\t);\n\t\t\t$numberOfDocuments = $this->processUpdateSolrIndex($collection, $updateParams);\n\t\t}else {\n\t\t\t$newParams = array(\n\t\t\t\t\t'existing_solr_docs_query_url' => $getExistingSolrDocsQueryUrl.'&rows='.$_POST['numDocs'],\n\t\t\t\t\t'stores' => explode(',', $stores),\n\t\t\t\t\t'solr_update_url' => $Url,\n\t\t\t\t\t'solr_query_url' => $SolrQueryUrl,\n\t\t\t\t\t'page' => $page\n\t\t\t);\n\t\t\t$numberOfDocuments = $this->processNewSolrIndex($collection, $newParams);\n\t\t}\n\n\t\t//Log index fields\n\t\t$resource = Mage::getSingleton('core/resource');\n\t\t$writeConnection = $resource->getConnection('core_write');\n\t\t$logtable = $resource->getTableName('solrsearch/logs');\n\n\t\t$returnData = array();\n\t\t$returnData['page'] = $page;\n\t\t$returnData['documents'] = $numberOfDocuments;\n\t\t$returnData['continueprocess'] = (is_numeric($numberOfDocuments) && $numberOfDocuments < $productCount)?'yes':'no';\n\t\t$returnData['nextpage'] = $page + 1;\n\t\t$returnData['action'] = (is_numeric($numberOfDocuments) && $numberOfDocuments > 0)?'UPDATE':'NEW';\n\t\t$returnData['percent'] = round(($numberOfDocuments*100)/$productCount);\n\t\t$returnData['numdocs'] = $numberOfDocuments;\n\t\t$this->getResponse()->setHeader(\"Content-Type\", \"application/json\", true);\n\n\t\t$endTime = time();\n\n\t\tif (!isset($_POST['estimatedtime']) || $_POST['estimatedtime'] < 1) {\n\t\t\t$seconds = $endTime - $startTime;\n\t\t}else{\n\t\t\t$seconds = $_POST['estimatedtime'];\n\t\t}\n\t\t$returnData['estimatedtime'] = $seconds;\n\t\t$returnData['remainedtime'] = $this->calculateRemainTime($productCount, $numberOfDocuments, $seconds, $itemsPerCommit);\n\n\t\techo json_encode($returnData);\n\t\texit;\n\t}", "title": "" }, { "docid": "1605255f10586b62c1ebe83ccc51f99b", "score": "0.6254405", "text": "function searchBox() {\n ?>\n <div id=\"p-search\" class=\"portlet\">\n <h5><label for=\"searchInput\"><?php $this->msg('search') ?></label></h5>\n <div id=\"searchBody\" class=\"pBody\">\n <form action=\"<?php $this->text('searchaction') ?>\" id=\"searchform\"><div>\n <input id=\"searchInput\" name=\"search\" type=\"text\"<?php echo $this->skin->tooltipAndAccesskey('search');\n if( isset( $this->data['search'] ) ) {\n ?> value=\"<?php $this->text('search') ?>\"<?php } ?> />\n <input type='submit' name=\"go\" class=\"searchButton\" id=\"searchGoButton\"\tvalue=\"<?php $this->msg('searcharticle') ?>\"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> />&nbsp;\n <input type='submit' name=\"fulltext\" class=\"searchButton\" id=\"mw-searchButton\" value=\"<?php $this->msg('searchbutton') ?>\"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />\n </div></form>\n </div>\n </div>\n <?php\n }", "title": "" }, { "docid": "8179578923938437a465c30e32545c05", "score": "0.6249681", "text": "function opensky_simple_search_form($form, &$form_state) {\n\n $form['simple'] = array(\n '#type' => 'container',\n '#attributes' => array(\n 'class' => array(\n 'container-inline',\n ),\n ),\n );\n\n //---------------\n $form['simple']['collection'] = array(\n '#title' => t('Search in'),\n '#type' => 'select',\n '#default_value' => '',\n '#options' => array (),\n '#validated' => 'TRUE',\n );\n // ------------------------\n\n\n $form['simple'][\"opensky_simple_search_query\"] = array(\n '#size' => '46',\n '#type' => 'textfield',\n '#title' => 'for',\n // @todo Should this be the searched value?\n '#default_value' => '',\n );\n $form['simple']['submit'] = array(\n '#type' => 'submit',\n '#value' => t(' Go '),\n );\n return $form;\n}", "title": "" }, { "docid": "5786c7643c5fc78c104ab02b23a789c9", "score": "0.6249447", "text": "public function onSearch()\r\n {\r\n $data = $this->form->getData();\r\n \r\n // clear session filters\r\n TSession::setValue('LinksList_filter_lincodigo', NULL);\r\n TSession::setValue('LinksList_filter_artcodigo', NULL);\r\n\r\n if (isset($data->lincodigo) AND ($data->lincodigo)) {\r\n $filter = new TFilter('lincodigo', '=', $data->lincodigo); // create the filter\r\n TSession::setValue('LinksList_filter_lincodigo', $filter); // stores the filter in the session\r\n }\r\n \r\n if (isset($data->artcodigo) AND ($data->artcodigo)) {\r\n $filter = new TFilter('artcodigo', '=', $data->artcodigo); // create the filter\r\n TSession::setValue('LinksList_filter_artcodigo', $filter); // stores the filter in the session\r\n }\r\n\r\n \r\n // fill the form with data again\r\n $this->form->setData($data);\r\n \r\n // keep the search data in the session\r\n TSession::setValue('Musica_filter_data', $data);\r\n \r\n $param=array();\r\n $param['offset'] =0;\r\n $param['first_page']=1;\r\n $this->onReload($param);\r\n }", "title": "" }, { "docid": "5fcbb4b23e2f595f4d84f336a0816c50", "score": "0.6247921", "text": "public function SimpleSearchForm()\n {\n $placeholder = _t('SimpleSearchControllerExtension.SEARCH', 'Search');\n $searchText = '';\n $request = $this->owner->getRequest();\n if ($request) {\n $searchText = $request->getVar('q');\n }\n $fieldsList = [];\n\n $Search = new TextField('q', false, $searchText);\n $Search->setAttribute('placeholder', $placeholder);\n $fieldsList[] = $Search;\n\n $fields = new FieldList($fieldsList);\n\n $actionsList = [];\n\n $Go = new FormAction('doSearch', _t('SimpleSearchControllerExtension.GO', 'Go'));\n $Go->setName('');\n $Go->setUseButtonTag(true);\n $Go->setButtonContent('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M10,18c1.846,0,3.543-0.635,4.897-1.688l4.396,4.396l1.414-1.414l-4.396-4.396C17.365,13.543,18,11.846,18,10 c0-4.411-3.589-8-8-8s-8,3.589-8,8S5.589,18,10,18z M10,4c3.309,0,6,2.691,6,6s-2.691,6-6,6s-6-2.691-6-6S6.691,4,10,4z\"/></svg>');\n $actionsList[] = $Go;\n\n $actions = new FieldList($actionsList);\n\n $directorRules = Config::inst()->get(Director::class, 'rules');\n $searchControllerLink = '/sitesearch';\n foreach ($directorRules as $segment => $controller) {\n if ($controller == SearchController::class) {\n $searchControllerLink = '/' . $segment;\n }\n }\n $form = Form::create($this->owner, __FUNCTION__, $fields, $actions);\n $form->setFormMethod('GET');\n $form->setFormAction($searchControllerLink);\n $form->disableSecurityToken();\n\n return $form;\n }", "title": "" }, { "docid": "fe8d3a0103670bb3596f1c3b5d5c85f5", "score": "0.62478197", "text": "public function search() {\n\n $term = !empty($this->request->query['term']) ? $this->request->query['term'] : '';\n\n if (!empty($term)) {\n $this->search_results($term, false);\n }\n\n $this->loadShoutbox();\n }", "title": "" }, { "docid": "aea82358cc25c417f69a2d0bb351defb", "score": "0.6184742", "text": "public function submitAction() {\n $this->solrExtlistContext->resetPagerCollection();\n\t\t// TODO prevent redirect here\n\t\t$this->redirect('show');\n }", "title": "" }, { "docid": "f39044d40c2997fa0a76dfb517c23694", "score": "0.6173116", "text": "function culturefeed_bootstrap_form_culturefeed_pages_basic_search_form_alter(&$form, &$form_state) {\n\n $form['zipcode'] = array(\n '#prefix' => '<div class=\"row\"><div class=\"col-sm-2\">',\n '#suffix' => '</div>',\n '#type' => 'textfield',\n '#default_value' => isset($_GET['zipcode']) ? $_GET['zipcode'] : '',\n );\n\n $form['page'] = array(\n '#prefix' => '<div class=\"col-sm-7\">',\n '#suffix' => '</div>',\n '#type' => 'textfield',\n '#attributes' => array('placeholder' => array(t('Keyword'))),\n '#autocomplete_path' => 'ajax/culturefeed/pages/page-suggestion',\n '#default_value' => isset($_GET['search']) ? $_GET['search'] : '',\n );\n\n $form['submit'] = array(\n '#prefix' => '<div class=\"col-sm-3 form-group\">',\n '#suffix' => '</div></div>',\n '#attributes' => array('class' => array('btn-block')),\n '#type' => 'submit',\n '#value' => t('Search'),\n );\n\n return $form;\n\n}", "title": "" }, { "docid": "836b937a782153568403e2a5b0930a7a", "score": "0.61345726", "text": "function apachesolr_index_action_form_cron_submit(array $form, array &$form_state) {\n if (!empty($form_state['build_info']['args'][0])) {\n $env_id = $form_state['build_info']['args'][0];\n $form_state['redirect'] = 'admin/config/search/apachesolr/settings/' . $env_id . '/index';\n }\n else {\n $env_id = apachesolr_default_environment();\n $form_state['redirect'] = 'admin/config/search/apachesolr';\n }\n apachesolr_cron($env_id);\n drupal_set_message(t('Apachesolr cron succesfully executed'));\n}", "title": "" }, { "docid": "56767006c84a95b238914a5f1709797f", "score": "0.61253357", "text": "function SearchForm() {\n error_log(\"Show search form\");\n\n // show search term or empty text\n $searchText = isset($this->Query) ? $this->Query : '';\n\n $tf = new TextField(\"Search\", \"\", $searchText);\n $tf->addExtraClass('span6');\n\n\n \n $fields = new FieldSet(\n $tf\n );\n\n $fa = new FormAction('results', _t('SearchPage.SEARCH', 'Search'));\n\n // for bootstrap\n $fa->useButtonTag = true;\n $fa->addExtraClass('btn');\n $fa->addExtraClass('btn-primary');\n \n $actions = new FieldSet(\n $fa\n );\n\n\n $requiredFields = new RequiredFields(); \n $requiredFields->set_javascript_validation_handler('none');\n\n \n $form = new SearchForm($this, \"SearchForm\", $fields, $actions, $requiredFields);\n $form->setTemplate('HorizontalForm');\n\n $form->addExtraClass('form-inline');\n\n $form->Horizontal = true;\n\n return $form;\n }", "title": "" }, { "docid": "45ec7ec81f44a96c5a6932f51549e5e5", "score": "0.6113486", "text": "function onSearch() {\n // get the search form data\n $data = $this->form->getData();\n\n // check if the user has filled the form\n if ($data->nome) {\n // creates a filter using what the user has typed\n $filter = new TFilter('nome', 'like', \"{$data->nome}%\");\n\n // stores the filter in the session\n TSession::setValue('customer_filter1', $filter);\n TSession::setValue('nome', $data->nome);\n } else {\n TSession::setValue('customer_filter1', NULL);\n TSession::setValue('customer_name', '');\n }\n\n\n // check if the user has filled the form\n if ($data->city_name) {\n // creates a filter using what the user has typed\n $filter = new TFilter('(SELECT name from city WHERE id=customer.city_id)', 'like', \"{$data->city_name}%\");\n\n // stores the filter in the session\n TSession::setValue('customer_filter2', $filter);\n TSession::setValue('customer_city_name', $data->city_name);\n } else {\n TSession::setValue('customer_filter2', NULL);\n TSession::setValue('customer_city_name', '');\n }\n\n // fill the form with data again\n $this->form->setData($data);\n\n $param = array();\n $param['offset'] = 0;\n $param['first_page'] = 1;\n $this->onReload($param);\n }", "title": "" }, { "docid": "2ffd15327c7032e41b0aea1783b59571", "score": "0.6106589", "text": "public function submitForm(array &$form, FormStateInterface $form_state) {\n $search_text = urlencode($form_state->getValue('search_text'));\n $form_state->setRedirect('cfr_wiki.search', ['search_text' => $search_text]);\n }", "title": "" }, { "docid": "8fb0281f9837c55b55c02db048323807", "score": "0.60888463", "text": "function search() {\n echo \"<form method='post' action='scrip-results.php'>\";\n echo \"<input type='text' name='bookToFind'>\";\n echo \"<button type='submit'>Search</button>\";\n echo \"</form>\";\n }", "title": "" }, { "docid": "10381f334a9b723dd6c0aa0d237c2982", "score": "0.60665727", "text": "public function submit();", "title": "" }, { "docid": "511bb4399f5d3b06f9ec1974e10ae303", "score": "0.60622865", "text": "public function search(){\r\n $this->benchmark->mark('search_start');\r\n\t\t$q = $this->input->get('q');\r\n\t\t$q = trim($q); //remove spaces\r\n\r\n\t\tif($q=='') $q=\"*:*\";\r\n\r\n $page = $this->input->get('p');\r\n if($page=='') $page=1;\r\n $groupFilter = urldecode($this->input->get('group'));\r\n if($groupFilter=='') $groupFilter='All';\r\n $classFilter = $this->input->get('class');\r\n if($classFilter=='') $classFilter='All';\r\n\t\t$typeFilter = urldecode($this->input->get('type'));\r\n\t\tif($typeFilter=='') $typeFilter='All';\r\n\t\t$subjectFilter = urldecode($this->input->get('subject'));\r\n if($subjectFilter=='') $subjectFilter='All';\r\n \r\n $fortwoFilter = urldecode($this->input->get('fortwoFilter'));\r\n if($fortwoFilter=='') $fortwoFilter='All';\r\n $forfourFilter = urldecode($this->input->get('forfourFilter'));\r\n if($forfourFilter=='') $forfourFilter='All';\r\n $forsixFilter = urldecode($this->input->get('forsixFilter'));\r\n if($forsixFilter=='') $forsixFilter='All';\r\n\t\t/*\r\n\t\t$spatial_included_ids = $this->input->post('spatial_included_ids');\r\n\t\t$temporal = $this->input->post('temporal');\r\n $alltab = $this->input->post('alltab');\r\n */\r\n\r\n\t\t$query = $q;\r\n\t\t$extended_query = '';\r\n\r\n\t\t//echo '+spatial:('.$spatial_included_ids.')';\r\n /*\r\n\t\tif($spatial_included_ids!='') {\r\n\t\t\t$extended_query .= $spatial_included_ids;\r\n\t\t}\r\n\t\tif($temporal!='All'){\r\n\t\t\t$temporal_array = explode('-', $temporal);\r\n\t\t\t$extended_query .='+dateFrom:['.$temporal_array[0].' TO *]+dateTo:[* TO '.$temporal_array[1].']';\r\n\t\t}\r\n */\r\n\t\t//echo $query;\r\n\r\n\t\t/*Search Part*/\r\n\r\n\t\t$this->load->model('solr');\r\n\t\t$data['json'] = $this->solr->search($query, $extended_query, 'json', $page, $classFilter, $groupFilter, $typeFilter, $subjectFilter, $fortwoFilter, $forfourFilter,$forsixFilter,'PUBLISHED');\r\n \r\n \r\n\t\t//print_r($data['json']);\r\n\r\n\t\t/**getting the tabbing right**/\r\n\t\t$data['json_tab'] = $data['json'];\r\n //$this->solr->search($query, $extended_query, 'json', $page, 'All', $groupFilter, $typeFilter, $subjectFilter,'PUBLISHED');//just for the tabbing mechanism (getting the numbers right)\r\n\t\t/*just that! and json_tab is used in tab view*/\r\n\r\n\t\t/**getting the facet right**/\r\n\t\t//$query_tab = $q;\r\n\t\t//$data['json_facet']=$this->solr->search($query, $page, $classFilter);//just for the tabbing mechanism (getting the numbers right)\r\n\r\n\t\t/*Passing Variables down to the view*/\r\n\t\tif($q=='*:*') $q = 'All Records';\r\n\t\t$data['query']=$q;\r\n\t\t$data['classFilter']=$classFilter;\r\n\t\t$data['typeFilter']=$typeFilter;\r\n\t\t$data['groupFilter']=$groupFilter;\r\n\t\t$data['subjectFilter']=$subjectFilter;\r\n\t\t$data['page']=$page;/*\r\n $data['alltab'] = $alltab;\r\n\t\t$data['spatial_included_ids']=$spatial_included_ids;\r\n\t\t$data['temporal']=$temporal;\r\n*/\r\n\r\n\r\n\t\t$this->benchmark->mark('search_end');\r\n\t\t//echo $this->benchmark->elapsed_time('search_start', 'search_end');\r\n\r\n\t\t$this->load->view('mobile/search_result', $data);//load the view\r\n\t}", "title": "" }, { "docid": "0fd52f03c39f8a510e4552662baa99a6", "score": "0.60185015", "text": "public function searchprocessAction() {\n\t\t$this->_helper->ajaxgrid->setConfig ( OauthClients::grid() )->search ();\n\t}", "title": "" }, { "docid": "f2f917361a1be30a1264ea6c14999ce4", "score": "0.6015549", "text": "public function searchAction(){\n // Type of company\n $companyType = $this->request->getQuery('type', 'string');\n // Pass the general parameters to the view.\n $this->view->setVar('company_type', $companyType);\n $this->view->setVar('title', ucfirst($companyType) . 's');\n $this->view->setVar('subtitle', '');\n // @todo::: Define controls.\n $this->view->setVar('show_submit', FALSE);\n //$this->view->setVar('submit_text', 'Submit');\n $this->view->setVar('show_cancel', FALSE);\n //$this->view->setVar('cancel_text', \"Cancel\");\n $this->view->setVar('main_form_id', 'search_company_form');\n $this->view->setVar('exit_to', $this->url->getBaseUri() . 'company/list?type=' . $companyType);\n }", "title": "" }, { "docid": "2e88993cb0eac670efc355298f24fedf", "score": "0.6015092", "text": "public function formSolrSearchUrl()\n\t{\n\t\t$urlToHit = $this->solrServerUrl;\n\t\tif(is_array($this->filters))\n\t\tforeach($this->filters as $k=>$v)\n\t\t\t$this->solrPostParams.= $v;\n\n\t\tif(is_array($this->clusters))\n\t\tforeach($this->clusters as $k=>$v)\n\t\t\t$this->solrPostParams.= $v;\n\n\t\tif(is_array($this->groupConditions))\n\t\tforeach($this->groupConditions as $k=>$v)\n\t\t\t$this->solrPostParams.= $v;\n //print_r($this->solrPostParams);die;\n\t}", "title": "" }, { "docid": "e2fb87ccd1ccec3a5d849f39177a2934", "score": "0.6010772", "text": "public function searchprocessAction() {\n\t\t$this->_helper->ajaxgrid->setConfig ( Customers::grid() )->search ();\n\t}", "title": "" }, { "docid": "9827ac32c4911f065bc01cd64b674eaa", "score": "0.6003247", "text": "public function searchprocessAction() {\n\t\t$this->_helper->ajaxgrid->setConfig ( Tickets::grid() )->search ();\n\t}", "title": "" }, { "docid": "52890054c9820ccccbdd7101a9bf67bd", "score": "0.59991497", "text": "public function searchAction()\n {\n //...\n }", "title": "" }, { "docid": "a46c4d060924347795ec2bb8f036e75c", "score": "0.5984748", "text": "public function browseAction() {\n $field = $this->_getParam(\"field\");\n $_value = urldecode($this->_getParam(\"value\")); // store original form\n $value = $_value;\n $value = urldecode($value);\n\n // pass browse value to generate remove-facet links\n $this->view->url_params = array(\"value\" => $_value);\n\n $exact = $this->_getParam(\"exact\", false);\n if (! $exact) {\n $value = strtolower($value);\n $value = str_replace(\",\", \"\", $value); // remove commas from names\n }\n\n // add year to sort options\n $this->view->sort_fields[] = \"year\";\n\n $solr = Zend_Registry::get('solr');\n\n // note - solr default set to OR (seems to work best)\n //splitting out name parts to get an accurate match here (e.g.,\n //not matching committee members with a common first name)\n if ($exact) {\n $query = $field . ':\"' . $value . '\"';\n } else {\n $queryparts = array();\n foreach (preg_split('/[ +,.-]+/ ', strtolower($value), -1, PREG_SPLIT_NO_EMPTY) as $part) {\n if ($part != \"a\") // stop words that cause solr problem\n array_push($queryparts, \"$field:$part\");\n }\n $query = join($queryparts, '+AND+');\n }\n\n $options = $this->getFilterOptions();\n $options[\"query\"] = $query;\n $options[\"return_type\"] = \"solrEtd\";\n\n $etdSet = new EtdSet($options, null, 'findPublished');\n $this->view->etdSet = $etdSet;\n\n // Pagination Code\n /**\n * @todo refactor this paginator code that is repeated\n */\n // TODO: find a way to refactor this code that is repeated in this controller.\n $paginator = new Zend_Paginator($etdSet);\n $paginator->setItemCountPerPage(10);\n\n if ($this->_hasParam('page')) $paginator->setCurrentPageNumber($this->_getParam('page'));\n $this->view->paginator = $paginator;\n\n // if there's only one match found, forward directly to full record view\n if ($this->view->count == 1) {\n $this->_helper->flashMessenger->addMessage(\"Only one match found; displaying full record\");\n $this->_helper->redirector->gotoRoute(array(\"controller\" => \"view\",\n \"action\" => \"record\", \"pid\" => $etdSet->etds[0]->pid), \"\", true);\n }\n\n $this->view->value = $_value;\n\n $this->view->title = \"Browse by \" . $this->view->browse_mode . \" : \" . $_value;\n }", "title": "" }, { "docid": "2805f7b98a1c67bcf08e673a37d48730", "score": "0.59736705", "text": "public function runSearch()\n {\n $this->modifyDatabaseCriteriaAccordingToValuesFromFilterForm();\n }", "title": "" }, { "docid": "25032d096d43e3cceac2fd239a44778a", "score": "0.5972646", "text": "public function searchAction() {\n $searchContainer = new Main_Session_Search_Companies();\n $searchContainer->clearSearchData();\n\n if ($this->_request->isPost() && $this->getService('company')->search($searchContainer)) {\n $this->redirect($this->url('search_results'), array( 'exit' => true ));\n return;\n }\n\n $this->view->title = 'Search';\n $this->view->searchForm = Main_Service_Models::getStaticForm('search');\n }", "title": "" }, { "docid": "94c2b7bbb872883decf07ac2f56f014f", "score": "0.5967477", "text": "private function _handleCustomSearchForm() {\n\t\tif ($this->search()->isSearch()) {\n\t\t\t$this->_iStatus = $this->request()->getInt('status');\n\n\t\t\tif (!empty($this->_iStatus)) {\n\t\t\t\t$this->search()->setCondition('AND campaign.status = ' . $this->_iStatus);\n\t\t\t}\n\n\t\t\t$startDate = $this->request()->get('from');\n\n\t\t\tif (!empty($startDate)) {\n\t\t\t\t$aDate = explode('_', $startDate, 3);\n\t\t\t\t$iStartTime = Phpfox::getLib('date')->mktime(23, 59, 59, isset($aDate[0]) ? $aDate[0] : 0, isset($aDate[1]) ? $aDate[1] : 0, isset($aDate[2]) ? $aDate[2] : 0);\n\t\t\t\t$this->search()->setCondition('AND campaign.end_time >= ' . $iStartTime);\n\t\t\t}\n\n\t\t\t$endDate = $this->request()->get('to');\n\n\t\t\tif (!empty($endDate)) {\n\t\t\t\t$aDate = explode('_', $endDate, 3);\n\t\t\t\t$iEndTime = Phpfox::getLib('date')->mktime(23, 59, 59, isset($aDate[0]) ? $aDate[0] : 0, isset($aDate[1]) ? $aDate[1] : 0, isset($aDate[2]) ? $aDate[2] : 0);\n\t\t\t\t$this->search()->setCondition('AND campaign.end_time <= ' . $iEndTime);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a3cbe0a8444bf3bc027ec4be82e7ec89", "score": "0.59593046", "text": "private function process_searchform() {\n $sfh = new SugarFieldHandler();\n $sf = $sfh->getSugarField('Teamset', true);\n $teams = $sf->getTeamsFromRequest($this->name);\n\t\t$full_form_values = array();\n if(!empty($teams)) {\n //If a primary team is selected, adjust the appropriate settings; otherwise use the first\n \t//team from the $_REQUEST\n\t \tif(isset($_REQUEST[\"primary_{$this->name}_collection\"])){\n\t \t\t$this->ss->assign('hasPrimaryTeam', true);\n\t \t\t$primary = $_REQUEST[\"primary_{$this->name}_collection\"];\n\t \t\t$key = \"id_{$this->name}_collection_{$primary}\"; //Get the $_REQUEST index key\n\t \t\t$primary = $_REQUEST[$key];\n\t \t\t$primaryTeam = array('id' => $primary, 'name'=>$teams[$primary]);\n\t \t\t$full_form_values['primary'] = $primaryTeam;\n\t \t\tunset($teams[$primary]); //Unset the primary team\n\t \t} else {\n\t \t foreach($teams as $team_id=>$team_name) {\n\t \t\t $full_form_values['primary'] = array('id'=>$team_id, 'name'=>$team_name);\n\t \t\t unset($teams[$team_id]);\n\t \t\t break;\n\t \t }\n\t \t}\n\n \tforeach($teams as $team_id=>$team_name) {\n\t \t\t\t$full_form_values['secondaries'][] = array('id'=>$team_id, 'name'=>$team_name);\n\t \t}\n\n\t \t$this->bean->{$this->value_name}=array_merge($this->bean->{$this->value_name}, $full_form_values);\n\n\t \t//Save the search type (any, all, exact)\n\t if (isset($_REQUEST[\"{$this->name}_type\"])) {\n\t \t$this->displayParams['searchType'] = InputValidation::getService()->getValidInputRequest($this->name.'_type');\n\t }\n } else {\n //Don't pre-populate the search form\n\t\t\t$this->bean->{$this->value_name} = array();\n\t\t}\n\n }", "title": "" }, { "docid": "8bd8e96ac249c40eb2f45750457af1e6", "score": "0.59568274", "text": "function openskydora_browse_collection_search_form() {\n return get_openskydora_search_collection_form(openskydora_get_pid_from_request());\n}", "title": "" }, { "docid": "2dfc9c6f8fb9b2472f0a861dcfc3b295", "score": "0.5940862", "text": "public function postMasterInbound(AbstractSearchBO $filter);", "title": "" }, { "docid": "d30ab79010e9d2a1c05840a469cd77cc", "score": "0.5940139", "text": "public function formSearchAction() {\n\n //GET NAVIGATION\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('siteevent_admin_main', array(), 'siteevent_admin_main_formsearch');\n\n //GET SEARCH TABLE\n $tableSearchForm = Engine_Api::_()->getDbTable('searchformsetting', 'seaocore');\n\n //CHECK POST\n if ($this->getRequest()->isPost()) {\n\n //BEGIN TRANSCATION\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n $values = $_POST;\n $rowCategory = $tableSearchForm->getFieldsOptions('siteevent', 'category_id');\n $rowLocation = $tableSearchForm->getFieldsOptions('siteevent', 'location');\n $defaultCategory = 0;\n $defaultAddition = 0;\n $count = 1;\n try {\n foreach ($values['order'] as $key => $value) {\n $multiplyAddition = $count * 5;\n $tableSearchForm->update(array('order' => $defaultAddition + $defaultCategory + $key + $multiplyAddition + 1), array('searchformsetting_id = ?' => (int) $value));\n\n if (!empty($rowCategory) && $value == $rowCategory->searchformsetting_id) {\n $defaultCategory = 1;\n $defaultAddition = 10000000;\n }\n $count++;\n }\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n\n //MAKE QUERY\n $select = $tableSearchForm->select()->where('module = ?', 'siteevent')->order('order');\n include APPLICATION_PATH . '/application/modules/Siteevent/controllers/license/license2.php';\n }", "title": "" }, { "docid": "a9bbe265719fa88e35ab0f0389052779", "score": "0.593951", "text": "function apachesolr_index_config_form_submit(array $form, array &$form_state) {\n module_load_include('inc', 'apachesolr', 'apachesolr.index');\n $form_values = $form_state['values'];\n $env_id = $form_values['env_id'];\n\n foreach ($form_values['entities'] as $entity_type => $bundles) {\n $existing_bundles = apachesolr_get_index_bundles($env_id, $entity_type);\n $all_bundles = array_keys($bundles);\n $new_bundles = array_values(array_filter($bundles));\n apachesolr_index_set_bundles($env_id, $entity_type, $new_bundles);\n\n // Remove all excluded bundles - this happens on form submit\n // even if there is no change so the admin can remove\n // bundles if there was an error.\n $excluded_bundles = array_diff($all_bundles, $new_bundles);\n if (apachesolr_index_delete_bundles($env_id, $entity_type, $excluded_bundles)) {\n $callback = apachesolr_entity_get_callback($entity_type, 'bundles changed callback');\n if (!empty($callback)) {\n call_user_func($callback, $env_id, $existing_bundles, $new_bundles);\n }\n }\n else {\n drupal_set_message(t('Search is temporarily unavailable. If the problem persists, please contact the site administrator.'), 'error');\n }\n }\n\n // Clear the entity cache, since we will be changing its data.\n entity_info_cache_clear();\n cache_clear_all('apachesolr:environments', 'cache_apachesolr');\n drupal_set_message(t('Your settings have been saved.'));\n}", "title": "" }, { "docid": "d1bfa27ed8e8ff72bd38f195040d9d74", "score": "0.5936026", "text": "public function customSearch()\n {\n // no action\n }", "title": "" }, { "docid": "7cff43222c42b9bacfe7eadae6e019c8", "score": "0.5931975", "text": "public function route_submit_search_course() {\n CM_Request::verify_nonce('wp_search_nonce', CM_Request::get_param('_wpnonce'), is_admin());\n $key_word = CM_Request::get_param('keyword');\n $result = CM_Course_Mgr::search_course($key_word);\n wp_send_json(array(\n 'result' => $result\n ));\n }", "title": "" }, { "docid": "b3228bbfa147609d620ca4ef0e3a79ed", "score": "0.59287846", "text": "private function new_search()\n {\n /// cambiamos la plantilla HTML\n $this->template = 'ajax/contabilidad_nuevo_asiento';\n\n $eje0 = $this->ejercicio->get_by_fecha($_POST['fecha']);\n if ($eje0) {\n $this->resultados = $this->subcuenta->search_by_ejercicio($eje0->codejercicio, $this->query);\n } else {\n $this->resultados = [];\n $this->new_error_msg('Ningún ejercicio encontrado para la fecha ' . $_POST['fecha']);\n }\n }", "title": "" }, { "docid": "6d8dd5c34ab1d0aa9b75a56ef64e3e06", "score": "0.59273285", "text": "function display_search_form() {\r\n \t\r\n \techo \"<form action=\\\"?\".$this->remove_arg_from_query($_SERVER[\"REQUEST_URI\"], array(\"filter\", \"view\")).\"\\\" method=\\\"POST\\\">\"\r\n \t.\"Search: <input type=\\\"text\\\" name=\\\"search\\\">\"\r\n \t. \"<input type=\\\"submit\\\" value=\\\"Search\\\"></form>\";\r\n \t\r\n }", "title": "" }, { "docid": "abbcf9ca605173979c745e818a71191f", "score": "0.5926442", "text": "function submit() {}", "title": "" }, { "docid": "02af03f205d13c2109ad5d2ff2232b66", "score": "0.5914446", "text": "function _admin_search_query()\n{\n}", "title": "" }, { "docid": "9787d7ca236935ad63e87b6231db2d0a", "score": "0.59135455", "text": "private function display_search_form()\r\n {\r\n echo $this->get_search_form()->display();\r\n }", "title": "" }, { "docid": "305266c532fe3fb0ea63ab5b8264d15c", "score": "0.5910473", "text": "function get_openskydora_search_collection_form($collection_pid) {\n $form = array(\n '#type' => 'container',\n '#attributes' => array(\n 'class' => array(\n 'container-inline',\n ),\n ),\n );\n\n $form['openskydora_collection_search_query'] = array(\n '#size' => '30',\n '#type' => 'textfield',\n '#title' => '<none>',\n // @todo Should this be the searched value?\n '#default_value' => '',\n );\n\n $form['collection'] = array (\n '#type' => 'hidden',\n '#default_value' => $collection_pid,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('search'),\n );\n\n return $form;\n}", "title": "" }, { "docid": "706aa85909d86aeefeadc7240bae6308", "score": "0.5909527", "text": "function customSearch()\n {\n }", "title": "" }, { "docid": "0cdf436098e113c20b87ca090a205db1", "score": "0.5904297", "text": "function RenderSearchForm( $target_url ) {\n global $session, $theme, $search_record;\n\n $html = \"\";\n $search_record = (object) array();\n $org_code = intval($GLOBALS['org_code']);\n if ( $org_code > 0 ) $search_record->org_code = $org_code;\n// $session->Log( 'DBG: isset($_POST[submit])=%s isset($_GET[saved_query])=%s', isset($_POST[submit]), isset($_GET['saved_query'] ) );\n if ( !isset($_POST['submit']) && isset($_GET['saved_query'])) {\n $qry = new PgQuery(\"SELECT query_params FROM saved_queries WHERE (user_no = ? OR public ) AND lower(query_name) = lower(?);\",\n $session->user_no, $_GET['saved_query'] );\n if ( $qry->Exec('RenderSearchForm') && $qry->rows == 1 && $row = $qry->Fetch() ) {\n $_POST = unserialize($row->query_params);\n }\n }\n\n $ef = new EntryForm( $REQUEST_URI, $search_record, true );\n\n // We do the formatting fairly carefully here...\n $ef->SimpleForm('<span style=\"white-space: nowrap\"><span class=\"srchp\">%s:</span><span class=\"srchf\">%s</span></span> ' );\n\n $html .= $ef->StartForm( array(\"autocomplete\" => \"off\", \"onsubmit\" => \"return CheckSearchForm();\" ) );\n\n $html .= \"<table border=0 cellspacing=2 cellpadding=0 align=center class=row0 width=100% style=\\\"border: 1px dashed #aaaaaa;\\\">\\n\";\n $html .= \"<tr><td width=100%><table border=0 cellspacing=0 cellpadding=0 width=100%><tr valign=middle><td width=100%>\\n\";\n\n if ( isset($_GET['search_for']) && ! isset( $_POST['search_for']) ) {\n $_POST['search_for'] = $_GET['search_for'];\n }\n $html .= $ef->DataEntryLine( \"Find\", \"%s\", \"text\", \"search_for\",\n array( \"size\" => 10, \"class\" => \"srchf\",\n \"title\" => \"Search for free text in the request or notes. Regular expressions are OK too.\" ) );\n\n // Organisation drop-down\n if ( $session->AllowedTo(\"Admin\") || $session->AllowedTo(\"Support\") || $session->AllowedTo(\"Contractor\") ) {\n\n $html .= $ef->DataEntryLine( \"Organisation\", \"\", \"lookup\", \"org_code\",\n array(\"_sql\" => SqlSelectOrganisations($org_code),\n \"_null\" => \"-- All Organisations --\", \"onchange\" => \"OrganisationChanged();\",\n \"title\" => \"The organisation that this work will be done for.\",\n \"class\" => \"srchf\",\n \"style\" => \"width: 18em\" ) );\n }\n\n // System (within Organisation) drop-down\n $html .= $ef->DataEntryLine( \"System\", \"\", \"lookup\", \"system_id\",\n array(\"_sql\" => SqlSelectSystems($org_code),\n \"_null\" => \"-- All Systems --\", \"onchange\" => \"SystemChanged();\",\n \"title\" => \"The business system that this request applies to.\",\n \"class\" => \"srchf\",\n \"style\" => \"width: 18em\") );\n\n $html .= $ef->DataEntryLine( \"Requester\", \"\", \"lookup\", \"requested_by\",\n array(\"_sql\" => SqlSelectRequesters($org_code),\n \"_null\" => \"-- Any Requester --\", \"onchange\" => \"PersonChanged();\",\n \"title\" => \"The client who is requesting this, or who is in charge of ensuring it happens.\",\n \"class\" => \"srchf\",\n \"style\" => \"width: 12em\" ) );\n\n $html .= $ef->DataEntryLine( \"Watching\", \"\", \"lookup\", \"interested_in\",\n array(\"_sql\" => SqlSelectSubscribers($org_code), \"_null\" => \"-- Any Interested User --\",\n \"title\" => \"The client who is requesting this, or who is in charge of ensuring it happens.\",\n \"class\" => \"srchf\",\n \"style\" => \"width: 12em\" ) );\n\n // Person Assigned to W/R\n $html .= $ef->DataEntryLine( \"ToDo\", \"\", \"lookup\", \"allocated_to\",\n array(\"_sql\" => SqlSelectSubscribers($org_code),\n \"_null\" => \"-- Any Assigned User --\",\n \"_nobody\" => \"-- Not Yet Allocated --\",\n \"class\" => \"srchf\",\n \"title\" => \"A person who has been assigned to work on requests.\",\n \"style\" => \"width: 12em\" ) );\n\n // Date range\n $html .= $ef->DataEntryLine( \"Last Action\", \"%s\", \"date\", \"from_date\",\n array( \"size\" => 10, \"class\" => \"srchf\",\n \"title\" => \"Only show requests with action after this date.\" ) );\n $html .= \"<a href=\\\"javascript:show_calendar('forms.form.from_date');\\\" onmouseover=\\\"window.status='Date Picker';return true;\\\" onmouseout=\\\"window.status='';return true;\\\">\".$theme->Image(\"date-picker.gif\").\"</a> &nbsp; \\n\";\n\n $html .= $ef->DataEntryLine( \"To\", \"%s\", \"date\", \"to_date\",\n array( \"size\" => 10, \"class\" => \"srchf\",\n \"title\" => \"Only show requests with action before this date.\" ) );\n $html .= \"<a href=\\\"javascript:show_calendar('forms.form.to_date');\\\" onmouseover=\\\"window.status='Date Picker';return true;\\\" onmouseout=\\\"window.status='';return true;\\\">\".$theme->Image(\"date-picker.gif\").\"</a> &nbsp; \\n\";\n\n // Type of Request\n $html .= $ef->DataEntryLine( \"Type\", \"%s\", \"lookup\", \"type_code\",\n array(\"_type\" => \"request|request_type\",\n \"_null\" => \"-- All Types --\",\n \"class\" => \"srchf\",\n \"style\" => \"width: 8em\",\n \"title\" => \"Only show this type of request\") );\n\n if ( ($session->AllowedTo(\"Admin\") /* || $session->AllowedTo(\"Support\") */ ) ) {\n// $html .= \"<div id=\\\"whereclause\\\">\";\n $html .= $ef->DataEntryLine( \"Where\", \"%s\", \"text\", \"where_clause\",\n array( \"size\" => 60, \"class\" => \"srchf\",\n \"title\" => \"Add an SQL 'WHERE' clause to further refine the search - you will need to know what you are doing...\" ) );\n// $html .= \"</div>\";\n }\n\n\n $html .= \"<table border='0' cellspacing='0' cellpadding='0' width='100%'><tr>\";\n $html .= \"<td style=\\\"vertical-align: top; padding-top: 0.3em; white-space:wrap;\\\"><span class=\\\"srchp\\\">Status:</span></td><td valign='top'>\\n\";\n $sql = \"SELECT * FROM lookup_code WHERE source_table='request' \";\n $sql .= \" AND source_field='status_code' \";\n $sql .= \" ORDER BY source_table, source_field, lookup_seq, lookup_code \";\n $qry = new PgQuery( $sql );\n if ( $qry->Exec(\"RenderSearchForm\") && $qry->rows > 0 ) {\n $i = 0;\n while ( $status = $qry->Fetch() ) {\n $ef->record->incstat[$status->lookup_code] = (strpos($GLOBALS['default_search_statuses'],$status->lookup_code) != false?1:'');\n if ( $i++ > 0 ) $html .= \" \";\n $html .= $ef->DataEntryField( \"%s\", \"checkbox\", \"incstat[$status->lookup_code]\",\n array(\"_label\" => $status->lookup_desc, \"class\" => \"srchf\", \"value\" => 1 ) );\n // if ( $i++ == round($qry->rows / 2) ) $html .= \"<br />\";\n }\n $html .= $ef->DataEntryField( \"%s\", \"checkbox\", \"inactive\",\n array(\"_label\" => \"inactive\", \"class\" => \"srchf\", \"value\" => 1 ) );\n $html .= \"</td>\\n\";\n }\n $html .= \"</tr></table>\\n\";\n\n\n $html .= RenderTagsPanel($ef);\n\n $html .= RenderColumnSelections($ef);\n\n // style=\"display: block; float:right; clear: left;\"\n $html .= '<div id=\"savesearch\">';\n $html .= $ef->DataEntryLine( \"Save as\", \"%s\", \"text\", \"savelist\",\n array( \"size\" => 20, \"class\" => \"srchf\",\n \"title\" => \"A name to use to refer to this query in the future.\" ) );\n $html .= $ef->DataEntryField( \"%s\", \"checkbox\", \"save_query_order\",\n array(\"_label\" => \"With Order?\", \"class\" => \"srchf\", \"value\" => 1 ) );\n $html .= $ef->DataEntryField( \"%s\", \"checkbox\", \"save_public\",\n array(\"_label\" => \"Public?\", \"class\" => \"srchf\", \"value\" => 1 ) );\n\n $search_record->save_hotlist = 't';\n $html .= $ef->DataEntryField( \"%s\", \"checkbox\", \"save_hotlist\",\n array(\"_label\" => \"In my menu?\", \"class\" => \"srchf\", \"value\" => 1 ) );\n\n $html .= $ef->SubmitButton( \"submit\", \"Save Query\",\n array(\"title\" => \"Save this query so you can run it again.\" ) );\n $html .= \"</div>\";\n\n $html .= $ef->DataEntryLine( \"Max results\", \"%s\", \"text\", \"maxresults\",\n array( \"size\" => 6, \"class\" => \"srchf\",\n \"title\" => \"The maximum number of rows to show in the listing\" ) );\n\n $html .= $ef->SubmitButton( \"submit\", \"Run Query\",\n array(\"title\" => \"Run a query with these settings\" ) );\n\n\n $html .= \"</td></tr></table>\\n\";\n $html .= \"</td></tr></table>\\n\";\n $html .= $ef->EndForm();\n\n return $html;\n}", "title": "" }, { "docid": "b7804ee5dd2cb3f2e2b07d7d303c6b6b", "score": "0.5898128", "text": "public function searchForm($resource=null);", "title": "" }, { "docid": "6420f98786a09767cef41c38af67f1f0", "score": "0.58943516", "text": "public function searchprocessAction() {\n\t\t$this->_helper->ajaxgrid->setConfig ( Newsletters::grid() )->search ();\n\t}", "title": "" }, { "docid": "cde9ec89c292cde329f577f73de801f4", "score": "0.5866761", "text": "public function search()\n {\n $event = array(\n 'event' => 'pageview',\n 'page' => 'search',\n 'ip' => $this->input->ip_address(),\n 'user_agent' => $this->input->user_agent(),\n );\n vocab_log_terms($event);\n $this->blade\n ->set('search_app', true)\n ->set('title', 'Research Vocabularies Australia')\n ->render('index');\n }", "title": "" }, { "docid": "9a31fb6c27def9fc9ba0e4fe67d17fb0", "score": "0.5865418", "text": "function apachesolr_location_range_widget_location_form($form, &$form_state, $field_name) {\n $getmap = getlocations_search_getmap('page');\n $map = $getmap['map'];\n $mapid = $getmap['mapid'];\n $default_latitude = '';\n $default_longitude = '';\n $default_distance = '';\n //If Location form is already submitted or there is another filters setted by facets.\n if (isset($_GET['f'])) {\n $facet_filters = $_GET['f'];\n //Get filters name.\n foreach (array_values($facet_filters) as $filter) {\n //Checking for filter name.\n if (strpos($filter, $field_name . ':', 0) !== FALSE) {\n $array_index = array_keys($facet_filters, $filter);\n $index = reset($array_index);\n list($default_latitude, $default_longitude, $default_distance) = explode(',', str_replace($field_name . ':', '', $facet_filters[$index]));\n }\n }\n }\n\n //Generate location range form.\n $form['mapid'] = array('#type' => 'value', '#value' => $mapid);\n $form['getlocations_search_' . $mapid] = array(\n '#type' => 'textfield',\n '#title' => t('Search Address'),\n '#maxlength' => 255,\n '#required' => TRUE,\n '#default_value' => isset($_GET['search_location']) ? $_GET['search_location'] : '',\n );\n\n $form['getlocations_search_distance_' . $mapid] = array(\n '#type' => 'textfield',\n '#title' => t('Search distance'),\n '#size' => 10,\n '#required' => TRUE,\n '#description' => t('The distance away from the center to search for locations.'),\n '#default_value' => $default_distance,\n );\n $form['getlocations_search_lon_' . $mapid] = array(\n '#type' => 'textfield',\n '#default_value' => $default_longitude,\n );\n $form['getlocations_search_lat_' . $mapid] = array(\n '#type' => 'textfield',\n '#default_value' => $default_latitude,\n );\n\n $form['getlocations_search_submit_' . $mapid] = array(\n '#type' => 'submit',\n '#value' => t('Go')\n );\n $form['#attributes']['name'] = 'apachesolr_location_range_search_form_' . $mapid;\n\n //Set field name that are using for this facet.\n $form['field_name'] = array('#type' => 'value', '#value' => $field_name);\n\n return $form;\n}", "title": "" }, { "docid": "29e1e57644019c429166a10b5e822334", "score": "0.58651525", "text": "public function search() {\n $this->render(false, false);\n \n // parâmetros da requisição\n debug($this->request->params);\n}", "title": "" }, { "docid": "8352eae50072e42e04278ae73e6b24da", "score": "0.5857178", "text": "function get_opensky_search_collection_form($collection_pid) {\n // dsm ('get_opensky_search_collection_form');\n // dsm (request_uri());\n $form = array(\n '#type' => 'container',\n '#attributes' => array(\n 'class' => array(\n 'container-inline',\n ),\n ),\n );\n\n $form['opensky_collection_search_query'] = array(\n '#size' => '30',\n '#type' => 'textfield',\n '#title' => '<none>',\n // @todo Should this be the searched value?\n '#default_value' => '',\n );\n\n $form['collection'] = array (\n '#type' => 'hidden',\n '#default_value' => $collection_pid,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('search'),\n );\n return $form;\n}", "title": "" }, { "docid": "587a7d41dffe20e16c6a0e96b05bd23a", "score": "0.58500403", "text": "function theme_solr_search_form($form) {\n if (!isset($repeat)) {\n $repeat = variable_get('islandora_solr_search_block_repeat', '3');\n }\n\n $output = drupal_render($form['search_type']['type1']);\n $output .= drupal_render($form['fedora_terms1']);\n $output .= drupal_render($form['andor1']) . drupal_render($form['search_type']['type2']);\n $output .= drupal_render($form['fedora_terms2']);\n if ($repeat > 2 && $repeat < 9) {\n for ($i = 3; $i < $repeat + 1; $i++) {\n $t = $i - 1;\n $output .= drupal_render($form[\"andor$t\"]) . drupal_render($form['search_type'][\"type$i\"]);\n $output .= drupal_render($form[\"fedora_terms$i\"]);\n }\n }\n $output .= drupal_render($form['submit']);\n $output .= drupal_render($form);\n return $output;\n }", "title": "" }, { "docid": "442d8fa862580d2753311f1532ec39f6", "score": "0.58377343", "text": "function initForm()\n {\n foreach ($this->FormElements as $_el) {\n global ${$_el};\n ${$_el} = trim($_REQUEST[$_el]);\n }\n\n $action = \"search\";\n\n if ($this->CDRTool['filter']['gateway']) {\n $gateway = $this->CDRTool[\"filter\"][\"gateway\"];\n }\n\n if ($this->CDRTool['filter']['aNumber']) {\n $UserName = $this->CDRTool['filter']['aNumber'];\n }\n\n if ($this->CDRTool['filter']['domain']) {\n $Realm = $this->CDRTool['filter']['domain'];\n }\n\n if (!$maxrowsperpage) {\n $maxrowsperpage = 15;\n }\n\n $this->f = new form;\n\n if (isset($this->CDRTool['dataSourcesAllowed'])) {\n while (list($k, $v)=each($this->CDRTool['dataSourcesAllowed'])) {\n if ($this->DATASOURCES[$v]['invisible']) continue;\n $cdr_source_els[]=array(\"label\"=>$this->DATASOURCES[$v]['name'],\"value\"=>$v);\n }\n }\n\n if (!$cdr_source) {\n $cdr_source=$cdr_source_els[0]['value'];\n }\n\n $this->f->add_element(\n array(\n \"name\"=>\"cdr_source\",\n \"type\"=>\"select\",\n \"options\"=>$cdr_source_els,\n \"size\"=>\"1\",\n \"extrahtml\"=>\"class=span2 onChange=\\\"document.datasource.submit.disabled = true; location.href = 'callsearch.phtml?cdr_source=' + this.options[this.selectedIndex].value\\\"\",\n \"value\"=>\"$cdr_source\"\n )\n );\n\n $cdr_table_els = array();\n foreach ($this->tables as $_table) {\n if (preg_match(\"/^.*(\\d{6})$/\", $_table, $m)) {\n $cdr_table_els[]=array(\"label\"=>$m[1],\"value\"=>$_table);\n } else {\n $cdr_table_els[]=array(\"label\"=>$_table,\"value\"=>$_table);\n }\n }\n\n $this->f->add_element(\n array(\n \"name\"=>\"cdr_table\",\n \"type\"=>\"select\",\n \"options\"=>$cdr_table_els,\n \"size\"=>\"1\",\n \"class\"=>\"span2\",\n \"value\"=>$cdr_table,\n \"extrahtml\"=>\"class=span2\"\n )\n );\n\n if ($begin_datetime) {\n preg_match(\"/^(\\d\\d\\d\\d)-(\\d+)-(\\d+)\\s+(\\d\\d):(\\d\\d)/\", \"$begin_datetime\", $parts);\n $begin_year = date(Y, $begin_datetime);\n $begin_month = date(m, $begin_datetime);\n $begin_day = date(d, $begin_datetime);\n $begin_hour = date(H, $begin_datetime);\n $begin_min = date(i, $begin_datetime);\n } else {\n $begin_day = $_REQUEST[\"begin_day\"];\n $begin_month = $_REQUEST[\"begin_month\"];\n $begin_year = $_REQUEST[\"begin_year\"];\n $begin_hour = $_REQUEST[\"begin_hour\"];\n $begin_min = $_REQUEST[\"begin_min\"];\n list($begin_hour, $begin_min)=explode(\":\", $begin_time);\n list($begin_year, $begin_month, $begin_day)=explode(\"-\", $begin_date);\n }\n\n if ($end_datetime) {\n preg_match(\"/^(\\d\\d\\d\\d)-(\\d+)-(\\d+)\\s+(\\d\\d):(\\d\\d)/\", \"$end_datetime\", $parts);\n $end_year = date(Y, $end_datetime);\n $end_month = date(m, $end_datetime);\n $end_day = date(d, $end_datetime);\n $end_hour = date(H, $end_datetime);\n $end_min = date(i, $end_datetime);\n } else {\n $end_day = $_REQUEST[\"end_day\"];\n $end_month = $_REQUEST[\"end_month\"];\n $end_year = $_REQUEST[\"end_year\"];\n $end_hour = $_REQUEST[\"end_hour\"];\n $end_min = $_REQUEST[\"end_min\"];\n list($end_hour, $end_min)=explode(\":\", $end_time);\n list($end_year, $end_month, $end_day)=explode(\"-\", $end_date);\n }\n\n // corect last day of the month to be valid day\n $begin_day = validDay($begin_month, $begin_day, $begin_year);\n $end_day = validDay($end_month, $end_day, $end_year);\n\n $default_year = Date(\"Y\");\n $default_month = Date(\"m\");\n $default_day = Date(\"d\");\n $default_hour = Date(H, time());\n\n if ($default_hour > 1) {\n $default_hour=$default_hour-1;\n }\n\n $default_hour = preg_replace(\"/^(\\d)$/\", \"0$1\", $default_hour);\n $default_min = Date(\"i\");\n\n if ($default_min > 10) {\n $default_min = $default_min-10;\n $default_min = preg_replace(\"/^(\\d)$/\", \"0$1\", $default_min);\n }\n\n if (!$begin_hour) $begin_hour = $default_hour;\n if (!$begin_min) $begin_min = $default_min;\n if (!$begin_day) $begin_day = $default_day;\n if (!$begin_month) $begin_month = $default_month;\n if (!$begin_year) $begin_year = $default_year;\n\n if (!$end_hour) $end_hour = 23;\n if (!$end_min) $end_min = 55;\n if (!$end_day) $end_day = $default_day;\n if (!$end_month) $end_month = $default_month;\n if (!$end_year) $end_year = $default_year;\n\n $this->f->add_element(\n array(\n \"name\"=>\"begin_time\",\n \"size\"=>\"1\",\n \"type\"=>\"text\",\n \"extrahtml\"=>\"id='timepicker1' class=\\\"input-small\\\" data-show-meridian='false' data-minute-step='1' data-default-time='$begin_hour:$begin_min'\"\n )\n );\n $this->f->add_element(\n array(\n \"name\"=>\"end_time\",\n \"size\"=>\"1\",\n \"type\"=>\"text\",\n \"extrahtml\"=>\"id='timepicker2' class=\\\"input-small\\\" data-show-meridian='false' data-minute-step='1' data-default-time='$end_hour:$end_min'\"\n )\n );\n $this->f->add_element(\n array(\n \"name\"=>\"call_id\",\n \"type\"=>\"text\",\n \"size\"=>\"50\",\n \"maxlength\"=>\"100\",\n \"extrahtml\"=>\"class=span4\"\n )\n );\n\n $this->f->add_element(\n array(\n \"name\"=>\"UserName\",\n \"type\"=>\"text\",\n \"size\"=>\"25\",\n \"maxlength\"=>\"255\",\n \"extrahtml\"=>\"class=span2\"\n )\n );\n\n $this->f->add_element(\n array(\n \"name\"=>\"a_number\",\n \"type\"=>\"text\",\n \"size\"=>\"25\",\n \"maxlength\"=>\"255\",\n \"extrahtml\"=>\"class=span2\"\n )\n );\n $this->f->add_element(\n array(\n \"name\"=>\"BillingId\",\n \"type\"=>\"text\",\n \"size\"=>\"25\",\n \"maxlength\"=>\"255\",\n \"extra_html\"=>\"class=span2\"\n )\n );\n $this->f->add_element(\n array(\n \"name\"=>\"c_number\",\n \"type\"=>\"text\",\n \"size\"=>\"25\",\n \"maxlength\"=>\"255\",\n \"extrahtml\"=>\"class=span2\"\n )\n );\n $this->f->add_element(\n array(\n \"name\" => \"sip_status\",\n \"type\" => \"select\",\n \"options\" => $this->disconnectCodesElements,\n \"size\" => \"1\",\n \"value\" => $sip_status,\n \"extrahtml\" => \"class=span3\"\n )\n );\n $this->f->add_element(\n array(\n \"name\" => \"sip_status_class\",\n \"type\" => \"select\",\n \"options\" => $this->disconnectCodesClassElements,\n \"size\" => \"1\",\n \"extrahtml\" => \"class=span3\"\n )\n );\n\n if (!$this->CDRTool['filter']['aNumber']) {\n $durations_els = array(\n array(\"label\"=>\"All calls\",\"value\"=>\"\"),\n array(\"label\"=>\"0 seconds\",\"value\"=>\"zero\"),\n array(\"label\"=>\"non 0 seconds\",\"value\"=>\"nonzero\"),\n array(\"label\"=>\"non 0 seconds without price\",\"value\"=>\"zeroprice\"),\n array(\"label\"=>\"less than 5 seconds\",\"value\"=>\"< 5\"),\n array(\"label\"=>\"more than 5 seconds\",\"value\"=>\"> 5\"),\n array(\"label\"=>\"less than 60 seconds\",\"value\"=>\"< 60\"),\n array(\"label\"=>\"more than 2 minutes\",\"value\"=>\"> 120\"),\n array(\"label\"=>\"greater than 1 hour\",\"value\"=>\"> 3600\"),\n array(\"label\"=>\"one hour\",\"value\"=>\"onehour\"),\n array(\"label\"=>\"greater than 5 hours\",\"value\"=>\"> 18000\"),\n array(\"label\"=>\"Un-normalized calls\",\"value\"=>\"unnormalized\"),\n array(\"label\"=>\"Un-normalized calls > 0s\",\"value\"=>\"unnormalized_duration\"),\n array(\"label\"=>\"One way media\",\"value\"=>\"onewaymedia\"),\n array(\"label\"=>\"No media\",\"value\"=>\"nomedia\")\n );\n } else {\n $durations_els = array(\n array(\"label\"=>\"All calls\",\"value\"=>\"\"),\n array(\"label\"=>\"0 seconds call\",\"value\"=>\"zero\"),\n array(\"label\"=>\"Succesfull calls\",\"value\"=>\"nonzero\"),\n array(\"label\"=>\"less than 60 seconds\",\"value\"=>\"< 60\"),\n array(\"label\"=>\"greater than 1 hour\",\"value\"=>\"> 3600\")\n );\n $this->GROUPBY = array(\n 'UserName' => 'SIP Billing Party',\n 'CallingStationId' => 'SIP Caller Party',\n 'DestinationId' => 'SIP Destination Id',\n 'SipApplicationType' => 'Application',\n ' ' => '-------------',\n 'hour' => 'Hour of day',\n 'DAYOFWEEK' => 'Day of Week',\n 'DAYOFMONTH' => 'Day of Month',\n 'DAYOFYEAR' => 'Day of Year',\n 'BYMONTH' => 'Month',\n 'BYYEAR' => 'Year'\n );\n }\n\n $flow_els = array(\n array(\"label\"=>\"Any Call Flow\",\"value\"=>\"\"),\n array(\"label\"=>\"On Net\",\"value\"=>\"on-net\"),\n array(\"label\"=>\"Incoming\",\"value\"=>\"incoming\"),\n array(\"label\"=>\"Outgoing\",\"value\"=>\"outgoing\"),\n array(\"label\"=>\"Transit\",\"value\"=>\"transit\"),\n array(\"label\"=>\"Diverted On Net\",\"value\"=>\"diverted-on-net\"),\n array(\"label\"=>\"Diverted Off Net\",\"value\"=>\"diverted-off-net\"),\n array(\"label\"=>\"On Net Diverted On Net\",\"value\"=>\"on-net-diverted-on-net\"),\n array(\"label\"=>\"On Net Diverted Off Net\",\"value\"=>\"on-net-diverted-off-net\"),\n array(\"label\"=>\"Unknown Flow\",\"value\"=>\"Sip-Session\")\n );\n\n $this->f->add_element(array( \"name\"=>\"flow\",\n \"type\"=>\"select\",\n \"options\"=>$flow_els,\n \"value\"=>\"\",\n \"size\"=>\"1\",\n \"extrahtml\"=>\"class=span3\"\n ));\n\n $this->f->add_element(array( \"name\"=>\"duration\",\n \"type\"=>\"select\",\n \"options\"=>$durations_els,\n \"value\"=>\"All\",\n \"size\"=>\"1\",\n \"extrahtml\"=>\"class=span3\"\n ));\n $comp_ops_els = array(\n array(\"label\"=>\"Begins with\",\"value\"=>\"begin\"),\n array(\"label\"=>\"Contains\",\"value\"=>\"contain\"),\n array(\"label\"=>\"Is empty\",\"value\"=>\"empty\"),\n array(\"label\"=>\"Equal\",\"value\"=>\"equal\")\n );\n $this->f->add_element(array( \"name\"=>\"a_number_comp\",\n \"type\"=>\"select\",\n \"options\"=>$comp_ops_els,\n \"value\"=>\"begin\",\n \"size\"=>\"1\",\n \"extrahtml\"=>\"class=span2\"\n ));\n $this->f->add_element(array( \"name\"=>\"c_number_comp\",\n \"type\"=>\"select\",\n \"options\"=>$comp_ops_els,\n \"value\"=>\"begin\",\n \"size\"=>\"1\",\n \"extrahtml\"=>\"class=span2\"\n ));\n $this->f->add_element(array( \"name\"=>\"UserName_comp\",\n \"type\"=>\"select\",\n \"options\"=>$comp_ops_els,\n \"value\"=>\"begin\",\n \"size\"=>\"1\",\n \"extrahtml\"=>\"class=span2\"\n ));\n $this->f->add_element(array( \"name\"=>\"Realm\",\n \"type\"=>\"text\",\n \"size\"=>\"25\",\n \"maxlength\"=>\"25\",\n \"extrahtml\"=>\"class=span2\"\n ));\n\n $media_info_els=array(\n array(\"label\"=>\"\",\"value\"=>\"\"),\n array(\"label\"=>\"Timeout\",\"value\"=>\"timeout\"),\n array(\"label\"=>\"ICE session\",\"value\"=>\"ICE session\")\n );\n\n $this->f->add_element(array( \"name\"=>\"media_info\",\n \"type\"=>\"select\",\n \"options\"=>$media_info_els,\n \"size\"=>\"1\",\n \"value\"=>\"\",\n \"extrahtml\"=>\"class=span2\"\n ));\n\n $this->f->add_element(array(\"type\"=>\"submit\",\n \"name\"=>\"submit\",\n \"value\"=>\"Search\",\"extrahtml\"=>\"class=btn\"\n ));\n $max_els = array(\n array(\"label\"=>\"5\",\"value\"=>\"5\"),\n array(\"label\"=>\"10\",\"value\"=>\"10\"),\n array(\"label\"=>\"15\",\"value\"=>\"15\"),\n array(\"label\"=>\"25\",\"value\"=>\"25\"),\n array(\"label\"=>\"50\",\"value\"=>\"50\"),\n array(\"label\"=>\"100\",\"value\"=>\"100\"),\n array(\"label\"=>\"500\",\"value\"=>\"500\")\n );\n $this->f->add_element(array( \"name\"=>\"maxrowsperpage\",\n \"type\"=>\"select\",\n \"options\"=>$max_els,\n \"size\"=>\"1\",\n \"value\"=>\"25\",\n \"extrahtml\"=>\"class = span2\"\n ));\n $order_type_els = array(\n array(\"label\"=>\"Descending\",\"value\"=>\"DESC\"),\n array(\"label\"=>\"Ascending\",\"value\"=>\"ASC\")\n );\n $this->f->add_element(array( \"name\"=>\"order_type\",\n \"type\"=>\"select\",\n \"options\"=>$order_type_els,\n \"size\"=>\"1\",\n \"extrahtml\"=>\"class=span2\"\n ));\n $this->f->add_element(array(\"type\"=>\"hidden\",\n \"name\"=>\"action\",\n \"value\"=>$action\n ));\n\n $order_by_els = array(array(\"label\"=>\"Id\",\"value\"=>\"RadAcctId\"),\n array(\"label\"=>\"Date\",\"value\"=>\"AcctStopTime\"),\n array(\"label\"=>\"Billing Party\",\"value\"=>\"UserName\"),\n array(\"label\"=>\"Remote Party Id\",\"value\"=>\"SipRPID\"),\n array(\"label\"=>\"Caller Party\",\"value\"=>\"CallingStationId\"),\n array(\"label\"=>\"Destination\",\"value\"=>\"CalledStationId\"),\n array(\"label\"=>\"Duration\",\"value\"=>\"AcctSessionTime\"),\n array(\"label\"=>\"Input traffic\",\"value\"=>\"AcctInputOctets\"),\n array(\"label\"=>\"Output traffic\",\"value\"=>\"AcctOutputOctets\"),\n array(\"label\"=>\"Price\",\"value\"=>\"Price\"),\n array(\"label\"=>\"Failures(%)\",\"value\"=>\"zeroP\"),\n array(\"label\"=>\"Success(%)\",\"value\"=>\"nonzeroP\"),\n array(\"label\"=>\"Group by\",\"value\"=>\"group_by\")\n );\n\n $group_by_els[] = array(\"label\"=>\"\", \"value\"=>\"\");\n\n global $perm;\n\n if (!$perm->have_perm(\"showCallerId\")) {\n $order_by_els = array_filter(\n $order_by_els,\n function ($element) {\n return $element['label'] != \"Remote Party Id\";\n }\n );\n unset($this->GROUPBY['SipRPID']);\n }\n\n while (list($k,$v) = each($this->GROUPBY)) {\n $group_by_els[]=array(\"label\"=>$v,\"value\"=>$k);\n }\n\n $this->f->add_element(\n array(\n \"name\" => \"order_by\",\n \"type\" => \"select\",\n \"options\" => $order_by_els,\n \"value\" => $order_by,\n \"size\" => \"1\",\n \"extrahtml\" => \"class=span3\"\n )\n );\n\n $this->f->add_element(\n array(\n \"name\"=> \"group_by\",\n \"type\" => \"select\",\n \"options\" => $group_by_els,\n \"value\" => $group_by,\n \"size\" => \"1\",\n \"extrahtml\" => \"class=span3\"\n )\n );\n\n $application_els = array(\n array(\n \"label\" => \"Any Application\",\n \"value\" => \"\"\n ),\n array(\n \"label\" => \"Audio\",\n \"value\" => \"audio\"\n ),\n array(\n \"label\" => \"Video\",\n \"value\"=>\"video\"\n ),\n array(\n \"label\" => \"Message\",\n \"value\" => \"message\"\n ),\n array(\n \"label\" => \"IM Chat\" ,\n \"value\" => \"chat\"\n ),\n array(\n \"label\" => \"Audio + Chat\" ,\n \"value\" => \"audio=2C chat\"\n ),\n array(\n \"label\" => \"File Transfer\",\n \"value\" => \"file-transfer\"\n )\n );\n\n $this->f->add_element(array(\"name\"=>\"application\",\n \"type\"=>\"select\",\n \"options\"=>$application_els,\n \"value\"=>$application,\n \"size\"=>\"1\",\n \"extrahtml\"=>\"class=span2\"\n ));\n $this->f->add_element(array(\"name\"=>\"UserAgent\",\n \"type\"=>\"text\",\n \"size\"=>\"25\",\n \"maxlength\"=>\"50\",\n \"value\"=>$UserAgent,\n \"extrahtml\"=>\"class=span2\"\n ));\n $this->f->add_element(array(\"name\"=>\"SipCodec\",\n \"type\"=>\"text\",\n \"size\"=>\"10\",\n \"maxlength\"=>\"50\",\n \"value\"=>$SipCodec,\n \"extrahtml\"=>\"class=span2\"\n ));\n $this->f->add_element(\n array(\n \"name\"=>\"sip_proxy\",\n \"type\"=>\"text\",\n \"size\"=>\"25\",\n \"maxlength\"=>\"255\",\n \"value\"=>$sip_proxy,\n \"extrahtml\"=>\"class=span2\"\n )\n );\n $this->f->add_element(\n array(\n \"name\"=>\"media_proxy\",\n \"type\"=>\"text\",\n \"size\"=>\"25\",\n \"maxlength\"=>\"255\",\n \"value\"=>$media_proxy,\n \"extrahtml\"=>\"class=span2\"\n )\n );\n $this->f->add_element(\n array(\n \"name\"=>\"tlscn\",\n \"type\"=>\"text\",\n \"size\"=>\"25\",\n \"maxlength\"=>\"255\",\n \"value\"=>$tlscn,\n \"extrahtml\"=>\"class=span2\"\n )\n );\n $this->f->add_element(\n array(\n \"name\"=>\"gateway\",\n \"type\"=>\"text\",\n \"size\"=>\"25\",\n \"maxlength\"=>\"255\",\n \"value\"=>$gateway,\n \"extrahtml\"=>\"class=span2\"\n )\n );\n $this->f->add_element(\n array(\n \"name\"=>\"DestinationId\",\n \"type\"=>\"text\",\n \"size\"=>\"10\",\n \"extrahtml\"=>\"class=span3\"\n )\n );\n $this->f->add_element(\n array(\n \"name\"=>\"ExcludeDestinations\",\n \"type\"=>\"text\",\n \"size\"=>\"20\",\n \"maxlength\"=>\"255\",\n \"extrahtml\"=>\"class=span3\"\n )\n );\n $this->f->load_defaults();\n $this->f->add_element(\n array(\n \"name\"=>\"begin_date\",\n \"size\"=>\"10\",\n \"maxlength\"=>\"10\",\n \"type\"=>\"text\",\n \"value\" => \"$begin_year-$begin_month-$begin_day\",\n \"extrahtml\"=>\"id='begin_date' data-date-format=\\\"yyyy-mm-dd\\\" class=\\\"span2\\\"\"\n )\n );\n $this->f->add_element(array(\n \"name\"=>\"end_date\",\n \"size\"=>\"1\",\n \"type\"=>\"text\",\n \"value\"=>\"$end_year-$end_month-$end_day\",\n \"extrahtml\"=>\"id='end_date' data-date-format=\\\"yyyy-mm-dd\\\" class=\\\"span2\\\"\"\n ));\n }", "title": "" }, { "docid": "30ee1a128baa0cc1f0c2710b977e576f", "score": "0.5835891", "text": "static function build_query_two_form() {\n\t\t\t$num_rows = 10;\n\t\t\t$search_domain = 'https://api.github.com';\n\t\t\t$search_path = '/wordpress-phoenix/';\n\t\t\tif ( ! empty( $_REQUEST['wrc-limit-num'] ) ) {\n\t\t\t\t$num_rows = $_REQUEST['wrc-limit-num'];\n\t\t\t}\n\t\t\tif ( ! empty( $_REQUEST['wrc-search-rest-domain'] ) ) {\n\t\t\t\t$search_domain = esc_url( $_REQUEST['wrc-search-rest-domain'] );\n\t\t\t}\n\t\t\tif ( ! empty( $_REQUEST['wrc-search-rest-path'] ) ) {\n\t\t\t\t$search_path = esc_attr( $_REQUEST['wrc-search-rest-path'] );\n\t\t\t}\n\t\t\t?>\n\t\t\t<div class=\"card\" style=\"max-width: 100%;\">\n\t\t\t\t\t<form id=\"wrc-util-search\" method=\"POST\" action=\"\">\n\t\t\t\t\t<p><strong>Search for a specific request:</strong></p>\n\t\t\t\t\t<?php wp_nonce_field( static::$utilities_id, 'wrc-util-search' ); ?>\n\t\t\t\t\t<label for=\"wrc-limit-num\">Max # of rows to return: </label>\n\t\t\t\t\t<br><input type=\"number\" value=\"<?php echo $num_rows; ?>\"\n\t\t\t\t\t name=\"wrc-limit-num\"\n\t\t\t\t\t id=\"wrc-limit-num\"/>\n\t\t\t\t\t<br><label for=\"wrc-search-rest-domain\">REST Call Domain (ex: <em>https://api.github.com</em>):\n\t\t\t\t\t</label>\n\t\t\t\t\t<br><input type=\"text\" style=\"width: 100%;\"\n\t\t\t\t\t value=\"<?php echo $search_domain; ?>\"\n\t\t\t\t\t name=\"wrc-search-rest-domain\"\n\t\t\t\t\t id=\"wrc-search-rest-domain\"/>\n\t\t\t\t\t<br><label for=\"wrc-search-rest-path\">REST Call Path (ex: <em>/wordpress-phoenix/</em>): </label>\n\t\t\t\t\t<br><input type=\"text\" style=\"width: 100%;\"\n\t\t\t\t\t value=\"<?php echo $search_path; ?>\"\n\t\t\t\t\t name=\"wrc-search-rest-path\"\n\t\t\t\t\t id=\"wrc-search-rest-path\"/>\n\t\t\t\t\t<p><em>Both the Domain and Path fields are searched on an EQUALS basis to help deal with DB search\n\t\t\t\t\t\t\tperformance.</em></p>\n\t\t\t\t\t<input type=\"submit\" id=\"wrc-util-search-submit\" value=\"Run\" class=\"button-primary\">\n\t\t\t\t\t</form>\n\t\t\t\t\t<br />\n\t\t\t\t\t<div class=\"results\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t! empty( $_REQUEST['wrc-util-search'] )\n\t\t\t\t\t\t\t&& wp_verify_nonce( $_REQUEST['wrc-util-search'], static::$utilities_id )\n\t\t\t\t\t\t\t&& ! empty( $_REQUEST['wrc-limit-num'] )\n\t\t\t\t\t\t\t&& ( ! empty( $_REQUEST['wrc-search-rest-domain'] ) || ! empty( $_REQUEST['wrc-search-rest-path'] ) )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t$searched_domain = ! empty( $_REQUEST['wrc-search-rest-domain'] ) ? $search_domain : '';\n\t\t\t\t\t\t\t$searched_path = ! empty( $_REQUEST['wrc-search-rest-path'] ) ? $search_path : '';\n\t\t\t\t\t\t\t$returned_items = WRC_DB::query_rest_table( $_REQUEST['wrc-limit-num'], $searched_domain, $searched_path );\n\n\t\t\t\t\t\t\techo '<hr>';\n\t\t\t\t\t\t\t$csv = '\"REST Call Domain\",\"REST Call Path\",\"md5\",\"action\"' . PHP_EOL;\n\n\t\t\t\t\t\t\tif ( ! empty( $returned_items ) ) {\n\t\t\t\t\t\t\t\tforeach ( $returned_items as $item ) {\n\t\t\t\t\t\t\t\t\t$csv .= $item['rest_domain'] . ',';\n\t\t\t\t\t\t\t\t\t$csv .= $item['rest_path'] . ',';\n\t\t\t\t\t\t\t\t\t$csv .= $item['rest_md5'] . ',';\n\t\t\t\t\t\t\t\t\t$csv .= '{{action_delete__' . $item['rest_md5'] . '}}' . PHP_EOL;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\techo WRC_Admin_Utility::csv_to_table( $csv );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\techo 'There are no items that match your search for <em>' . $searched_domain . $searched_path . '</em>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "fbc8f1fb0b4a0899cc332c42b682d273", "score": "0.5828456", "text": "function insight_index_search() {\n?>\n <form role=\"search\" method=\"get\" id=\"searchform\" class=\"insight-index-search\" action=\"<?php echo home_url( '/' ); ?>\">\n <div>\n <label class=\"screen-reader-text\" for=\"s\"><?php _e( 'Search for:', 'insight' ); ?></label>\n <input type=\"text\" value=\"\" name=\"s\" class=\"index-search-input\" id=\"s\" placeholder=\"<?php _e( 'Search documentation...', 'insight' ); ?>\" />\n <input type=\"submit\" class=\"index-search-button\" id=\"searchsubmit\" value=\"<?php _e( 'Search', 'insight'); ?>\" />\n </div>\n </form>\n <?php \n}", "title": "" }, { "docid": "296d5dc58c39aba93b321a0fe22d5703", "score": "0.5828216", "text": "public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n $filters = [];\n\n //<onBeforeDatagridSearch>\n\n //</onBeforeDatagridSearch> \n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->gencodigo) AND ( (is_scalar($data->gencodigo) AND $data->gencodigo !== '') OR (is_array($data->gencodigo) AND (!empty($data->gencodigo)) )) )\n {\n\n $filters[] = new TFilter('gencodigo', '=', $data->gencodigo);// create the filter \n }\n\n if (isset($data->gennome) AND ( (is_scalar($data->gennome) AND $data->gennome !== '') OR (is_array($data->gennome) AND (!empty($data->gennome)) )) )\n {\n\n $filters[] = new TFilter('gennome', 'like', \"%{$data->gennome}%\");// create the filter \n }\n\n $param = array();\n $param['offset'] = 0;\n $param['first_page'] = 1;\n\n //<onDatagridSearch>\n\n //</onDatagridSearch>\n\n // fill the form with data again\n $this->form->setData($data);\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n TSession::setValue(__CLASS__.'_filters', $filters);\n\n $this->onReload($param);\n }", "title": "" }, { "docid": "450e883f0e9a573bd3e7d58b27f11559", "score": "0.5824953", "text": "public function indexAction() {\n\t\t//$this->view->form = $form;\n\n\t\t//$this->form->setAction(Zend_Controller_Front::getInstance()->getBaseUrl().'/user/search');\n\t\t$request = $this->getRequest();\n\t\t$params = $request->getParams();\n\t\t$formValues = $this->namespace->formValues;\n\n\t\t$this->namespace->unsetAll();\n\t\t$this->namespace->searchParams = $params;\n\n\t\t//-----------------------------------------------------------------\n\t\t//build form\n\t\t$this->form = new Fish_Form_Search();\n\t\t$this->form->removeElement(Image::COL_ID);\n\t\t$this->form->removeElement('save');\n\n\t\t$this->form->addElement('submit', 'submit', array('label'=>'Search'\n\t\t));\n\n\t\t//set all elements to required=FALSE\n\t\t//clear all validators\n\t\t$formElements = $this->form->getElements();\n\t\tforeach ($formElements as $elem)\n\t\t{\n\t\t\t$elem->setRequired(false);\n\t\t\t$elem->clearValidators();\n\t\t}\n\t\t//$this->form->setElements($formElements);\n\t\tunset($elem);\n\t\tunset($formElements);\n\t\t//-----------------------------------------------------------------\n\n\t\tif ($request->isPost() && $this->form->isValid($params))\n\t\t{\n\t\t\t$this->namespace->formValues = $this->form->getValues();\n\t\t\t$this->redirectTo('search');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//$this->form->setValues($params);\n\t\t\t//TODO follow-action setzen... HIER? nachfolgende Zeile zum Test...\n\t\t\t//$this->form->setAction(Zend_Controller_Front::getInstance()->getBaseUrl().'/user/search/search');\n\t\t\t//$this->form->populate($params);\n\t\t\t$this->view->form = $this->form;\n\t\t}\n\t}", "title": "" }, { "docid": "271ee52f3485ab1109459662aa030114", "score": "0.5818684", "text": "public function submit(){\n\n\t\t$filter = new Form\\FilterText();\n\t\t$filter->addAllowedTags(['svg']);\n\n\t\t$packet = [];\n\t\t$packet['form'] = new Form\\Form();\n\t\t$packet['text'] = $this->input->secure()->post('text', $filter);\n\n\t\t$this->view->load('filter', $packet);\n\t}", "title": "" }, { "docid": "aa3ac988b355b62eb4e20bb848499875", "score": "0.5809262", "text": "function forschungsatlas_map_form_builder_submit($form, &$form_state) {\n\n switch ($form_state['values']['op']) {\n case t('Refresh'):\n $_SESSION['forschungsatlas_map_filter'] = forschungsatlas_search_init_filters();\n // Federal state\n if (!empty($form_state['values']['fsids'])) {\n $fsids = array_intersect_key($form_state['values']['fsids'], forschungsatlas_get_federal_states());\n $_SESSION['forschungsatlas_map_filter']['fsids'] = $fsids;\n }\n // City\n if (!empty($form_state['values']['cids'])) {\n $cids = array_intersect_key($form_state['values']['cids'], forschungsatlas_search_get_cities($_SESSION['forschungsatlas_map_filter']['fsids']));\n $_SESSION['forschungsatlas_map_filter']['cids']= $cids;\n }\n // Organization Type\n if (!empty($form_state['values']['otids'])) {\n $otids = array_intersect_key($form_state['values']['otids'], forschungsatlas_get_organization_types());\n $_SESSION['forschungsatlas_map_filter']['otids'] = $otids;\n }\n // Name\n if (!empty($form_state['values']['name'])) {\n $name = trim(forschungsatlas_clean_name($form_state['values']['name']));\n if (!empty($name)) {\n $_SESSION['forschungsatlas_map_filter']['name'] = $name;\n }\n }\n // Show Departments\n $_SESSION['forschungsatlas_map_filter']['showsub'] = $form_state['values']['showsub'];\n //\n // Categories\n //\n // Research Network\n if (!empty($form_state['values']['rnids'])) {\n $rnids = array_intersect_key($form_state['values']['rnids'], forschungsatlas_search_get_research_network());\n $_SESSION['forschungsatlas_map_filter']['rnids'] = $rnids;\n }\n // Habitats\n if (!empty($form_state['values']['hids'])) {\n $hids = array_intersect_key($form_state['values']['hids'], forschungsatlas_search_get_habitats());\n $_SESSION['forschungsatlas_map_filter']['hids'] = $hids;\n }\n // Methodologies\n if (!empty($form_state['values']['mids'])) {\n $mids = array_intersect_key($form_state['values']['mids'], forschungsatlas_search_get_methodologies());\n $_SESSION['forschungsatlas_map_filter']['mids'] = $mids;\n }\n // Organisms\n if (!empty($form_state['values']['oids'])) {\n $oids = array_intersect_key($form_state['values']['oids'], forschungsatlas_search_get_organisms());\n $_SESSION['forschungsatlas_map_filter']['oids'] = $oids;\n }\n // Interdisciplinary Subjects\n if (!empty($form_state['values']['isids'])) {\n $isids = array_intersect_key($form_state['values']['isids'], forschungsatlas_search_get_interdisciplinary_subjects());\n $_SESSION['forschungsatlas_map_filter']['isids'] = $isids;\n }\n // Research Topics\n if (!empty($form_state['values']['tids'])) {\n $tids = array_intersect_key($form_state['values']['tids'], forschungsatlas_search_get_research_topics());\n $_SESSION['forschungsatlas_map_filter']['tids'] = $tids;\n }\n if (_forschungsatlas_map_form_is_ajusted()) {\n $_SESSION['forschungsatlas_map_filter']['adjusted'] = TRUE;\n }\n $form_state['rebuild'] = TRUE;\n break;\n case t('Reset'):\n $_SESSION['forschungsatlas_map_filter'] = forschungsatlas_search_init_filters();\n break;\n }\n}", "title": "" }, { "docid": "c0fa9cb8a42600cec3fa7f7ccba615de", "score": "0.58003175", "text": "protected function applySearch() {\n\n }", "title": "" }, { "docid": "767270d144c099fc1b014ad3856f2200", "score": "0.5796985", "text": "public function SearchForm() {\n\t\t$fields = FieldList::create(array(\n\t\t\t\n\t\t\t$keyword = TextField::create('Keyword',''),\n\t\t\t$artnr = TextField::create('ArticleNumber',''),\n\t\t\t$producer = DropdownField::create('Producer', '', Producer::get()->sort('Name', 'ASC')->map('ID', 'Name') )->setEmptyString('- Producer -'),\t\t\t\n\t\t\t$shipType = DropdownField::create('ShipType', '', ShipType::get()->sort('ShipType', 'ASC')->map('ID', 'ShipType') )->setEmptyString('- Ship Type -'),\n\t\t\t//$country = CountryDropdownField::create('Country')->setEmptyString('- Country -'),\n\t\t\t//$country = DropdownField::create('Country','', Country::get()->sort('Name', 'ASC')->map('ID', 'Name'))->setEmptyString('- Country -'),\n\t\t\t//$country = DropdownField::create('Country', ShipPage::get()->sort('Country', 'ASC')->map('ID', 'Name') )->setEmptyString('- Country -'),\n\t\t\t$shippingCompany = DropdownField::create('ShippingCompany', '', ShippingCompany::get()->sort('Name', 'ASC')->map('ID', 'Name') )->setEmptyString('- Shipping Company -'),\t\n\t\t\t\n\t\t));\n\n\t\n\t\t//var_dump($country);\n\t\t$keyword->setAttribute('placeholder', 'Ship Name');\n\t\t$artnr->setAttribute('placeholder', 'Article Number');\n\n\t\t$actions = FieldList::create(array(\n\t\t\tFormAction::create('doSearch', 'Search'),\n\t\t));\n\t\t\n\t\t$form = Form::create(\n\t\t\t$this, // controller\n\t\t\t__FUNCTION__, // Name of the form\n\t\t\t$fields,\n\t\t\t$actions\n\t\t);\n\t\t\n\t\t// use get and disable security token to have a canonical url.\n\t\t$form->setFormMethod('GET');\n\t\t$form->disableSecurityToken();\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "4bc1397d7898dc5c93813a1da3059216", "score": "0.5793766", "text": "function form_Search ()\n\t{\n\t\tglobal $func, $DB, $conf, $vnT;\n\t\tif ($_GET['sub'] == \"search\") \n\t\t{\n\t\t\tif (isset($_GET['day']))\t$day = $_GET['day'];\n\t\t\tif (isset($_POST['day']))\t$day = $_POST['day'];\n\t\t\tif (isset($_GET['month']))\t$month = $_GET['month'];\n\t\t\tif (isset($_POST['month']))\t$month = $_POST['month'];\n\t\t\tif (isset($_GET['year']))\t$year = $_GET['year'];\n\t\t\tif (isset($_POST['year'])) $year = $_POST['year'];\n\t\t\t\n\t\t\t$data['day'] = $day;\n\t\t\t$data['list_thang'] = List_Thang($month);\n\t\t\t$data['list_nam'] = List_Nam($year);\n\t\t\t$data['back'] = \"<div align=center class=font_err><a href='?mod=statistics&act=statistics'>[\" . $vnT->lang['back_to_statistics'] . \"]</a></div>\";\n\t\t\t$data['link_action'] = \"?mod=statistics&act=statistics&sub=search\";\n\t\t} else {\n\t\t\t$data['day'] = date(\"d\");\n\t\t\t$data['list_thang'] = List_Thang(date(\"m\"));\n\t\t\t$data['list_nam'] = List_Nam(date(\"Y\"));\n\t\t\t$data['back'] = \"<div align=center class=font_err>\" . $vnT->lang['note_search'] . \"</div>\";\n\t\t\t$data['link_action'] = \"?mod=statistics&act=statistics&sub=search\";\n\t\t}\n\t\t\n\t\t/*assign the array to a template variable*/\n $this->skin->assign('data', $data);\n $this->skin->parse(\"html_form_search\");\n return $this->skin->text(\"html_form_search\");\n\t\t\n \t}", "title": "" }, { "docid": "f14686da6e389d5a10ff4fb126a2c7a0", "score": "0.57889235", "text": "public function execute_search()\n {\n $search_term = $this->input->post('search');\n\n // Use a model to retrieve the results.\n $data['results'] = $this->search_model->get_results($search_term);\n\n // Pass the results to the view.\n $this->load->view('search_results',$data);\n }", "title": "" }, { "docid": "5bdc13b3801d09f5d5532cdc5245476c", "score": "0.57808083", "text": "function nicholls_get_form_google_search() {\n\t\n\t$form_google_search_content .= fnbx_form_input( array( 'type' => 'text', 'name' => 'q', 'size' => 13, 'maxlength' => 256, 'return' => true ) );\n\t$form_google_search_content .= fnbx_form_input( array( 'type' => 'hidden', 'name' => 'sort', 'value' => 'date:D:L:d1', 'return' => true ) );\n\t$form_google_search_content .= fnbx_form_input( array( 'type' => 'hidden', 'name' => 'output', 'value' => 'xml_no_dtd', 'return' => true ) );\n\t$form_google_search_content .= fnbx_form_input( array( 'type' => 'hidden', 'name' => 'oe', 'value' => 'UTF-8', 'return' => true ) );\n\t$form_google_search_content .= fnbx_form_input( array( 'type' => 'hidden', 'name' => 'ie', 'value' => 'UTF-8', 'return' => true ) );\n\t$form_google_search_content .= fnbx_form_input( array( 'type' => 'hidden', 'name' => 'client', 'value' => 'default_frontend', 'return' => true ) );\n\t$form_google_search_content .= fnbx_form_input( array( 'type' => 'hidden', 'name' => 'proxystylesheet', 'value' => 'default_frontend', 'return' => true ) );\n\t$form_google_search_content .= fnbx_form_input( array( 'type' => 'hidden', 'name' => 'numgm', 'value' => '5', 'return' => true ) );\n\t$form_google_search_content .= fnbx_form_input( array( 'type' => 'hidden', 'name' => 'site', 'value' => 'default_collection', 'return' => true ) );\n\t$form_google_search_content .= fnbx_form_button( array( \n\t\t'type' => 'submit',\n\t\t'name' => 'search',\n\t\t'value' => 'search',\n\t\t'tag_content' => 'Search',\n\t\t'return' => true \n\t), array(\n\t\t'onmouseover' => \"this.className='button-search- button-search-hover-'\",\n\t\t'onmouseout' => \"this.className='button-search-'\"\t\n\t) );\n\t\n\treturn fnbx_form( 'gs', 'http://www.nicholls.edu/search', 'get', $form_google_search_content, true );\n\n}", "title": "" }, { "docid": "321e0427b99a56ef832037f5c0c52251", "score": "0.5779409", "text": "public function getSearchForm()\n {\n $pageSizes = array();\n\n \t$url = $this->controller->createUrl('');\n\n foreach ($this->pageSizes as $size)\n $pageSizes[$size] = $size;\n\n $config = array(\n 'title' => 'Filter',\n 'method' => 'POST', //use GET because of pagination\n\n 'elements' => array(\n 'level' => array(\n 'type' => 'dropdownlist',\n 'items' => $this->getDropDownItems('level'),\n 'prompt' => ' - ',\n ),\n 'category' => array(\n 'type' => 'dropdownlist',\n 'items' => $this->getDropDownItems('category'),\n 'prompt' => ' - ',\n ),\n\n 'keywords' => array(\n 'type' => 'text',\n 'size' => 60,\n 'maxlength' => 100,\n ),\n\n 'pagesize' => array(\n 'type' => 'dropdownlist',\n 'items' => $pageSizes,\n ),\n\n ),\n\n 'buttons' => array(\n 'apply' => array(\n 'type' => 'submit',\n 'label' => 'Apply',\n ),\n \t'reset' => array(\n \t 'type' => 'reset',\n \t 'label' => 'Reset',\n \t ),\n\t\t ),\n );\n\n $formModel = new EMongoDBLogSearchModel;\n\n if (isset($_POST['EMongoDBLogSearchModel']))\n $formModel->attributes = $_POST['EMongoDBLogSearchModel'];\n\n return new CForm($config, $formModel);\n }", "title": "" }, { "docid": "be163f989c1c1898cbacbf49350e1281", "score": "0.57760924", "text": "abstract public function searchExecuted();", "title": "" }, { "docid": "ad8c0b04d1f5d8127e7ec74fbcd71b69", "score": "0.5769432", "text": "public function searchprocessAction() {\n\t\t$this->_helper->ajaxgrid->setConfig ( Products::grid () )->search ();\n\t}", "title": "" }, { "docid": "20348fe6ff3cea3acb9de355022d464e", "score": "0.5766654", "text": "function show_search_formular()\n{\n ?> <form name=\"search\" action=\"index.php\">\n <input type=\"hidden\" name=\"action\" value=\"retrieve\">\n <input type=\"hidden\" name=\"subcommand\" value=\"EvaluateSearch\">\n <?\n echo '<table border=0 cellspacing=2 cellpadding=2>\n <tr>\n <td class=\"shortinfo\">Description:</td>\n <td class=\"shortinfo\"><input type=\"text\" name=\"description\" size=80 ></td>\n </tr>\n <tr>\n <td class=\"shortinfo\">Tags:</td>\n <td class=\"shortinfo\"><input type=\"text\" name=\"tags\" size=80 /></td>\n </tr>\n <tr>\n <td class=\"shortinfo\">&nbsp;</td>\n <td class=\"shortinfo\">example: \"author: moritz; keywords: locomotion,\n running\"<br /> if you just enter values, all tags will be searched.<br />\n example: \"locomotion, running, moritz\"<br />\n <b>Note:</b> use comma to separate values!\n </td>\n </tr>\n <tr>\n <td>&nbsp;</td>\n <td><input type=\"submit\" value=\"search\" name=\"search\"></td>\n </table></form>';\n}", "title": "" }, { "docid": "a3c02e1c4a65122d023e337f9c5f4e4e", "score": "0.57646877", "text": "function patternentity_search_submit($form, &$form_state) {\n\n if ($form_state['values']['search'] == '') {\n form_set_error('keys', t('Please enter some keywords.'));\n }\n\n $form_id = $form['form_id']['#value'];\n //dsm($form_state);\n $form_state['redirect'] = 'pattern/search/' . trim($form_state['values']['selected']) . '/' . trim($form_state['values']['search']);\n \n\n}", "title": "" }, { "docid": "d38033eb21d42bb5a38a05c6b7165525", "score": "0.5762806", "text": "function apachesolr_environment_edit_test_submit(array $form, array &$form_state) {\n $ping = apachesolr_server_status($form_state['values']['url'], $form_state['values']['service_class']);\n if ($ping) {\n drupal_set_message(t('Your site has contacted the Apache Solr server.'));\n }\n else {\n drupal_set_message(t('Your site was unable to contact the Apache Solr server.'), 'error');\n }\n $form_state['rebuild'] = TRUE;\n}", "title": "" }, { "docid": "a5bd5d12b297835f7f9a0a3e88aa3326", "score": "0.57552195", "text": "public function search()\n\t{\n\t}", "title": "" }, { "docid": "a5bd5d12b297835f7f9a0a3e88aa3326", "score": "0.57552195", "text": "public function search()\n\t{\n\t}", "title": "" }, { "docid": "8d62d8104dae26bcfc02592eafd8d174", "score": "0.57521814", "text": "public function admin_search() {\n $this->search();\n }", "title": "" }, { "docid": "3618bfb0761e03499eee205c91629ef2", "score": "0.57497376", "text": "public function savesearchAction()\n {\n \t$this->_helper->viewRenderer->setNoRender();\n \t\n \t$searchform = $this->getSearchForm();\n \t$formData = $this->getRequest()->getParams();\n\t \t\t\n \tif ($searchform->isValidPartial($formData))\n \t{\n \t\t$values = $searchform->getValues();\n\t \t$searchname = $values[\"savesearchinput\"];\n\t\t\t$jsondata = $values[\"advancedsearchparameters\"];\n\t\t\t$this->saveSearch($searchname, $jsondata);\n \t}\n \telse \n \t{\n \t\t//Assign the override input name\n \t\t$formData['hiddenoverridesearchnameinput'] = $formData['savesearchinput'];\n \t\t$this->displaySearchErrors($formData, 'There is a problem with your search name. Please try again.');\n\t\t}\n }", "title": "" }, { "docid": "ca546641654e68290c1913fc435d7d1c", "score": "0.57476354", "text": "function clsRecordautsri_Search()\n {\n\n global $FileName;\n $this->Visible = true;\n $this->Errors = new clsErrors();\n $this->ErrorBlock = \"Record autsri_Search/Error\";\n $this->ReadAllowed = true;\n if($this->Visible)\n {\n $this->ComponentName = \"autsri_Search\";\n $CCSForm = split(\":\", CCGetFromGet(\"ccsForm\", \"\"), 2);\n if(sizeof($CCSForm) == 1)\n $CCSForm[1] = \"\";\n list($FormName, $FormMethod) = $CCSForm;\n $this->FormEnctype = \"application/x-www-form-urlencoded\";\n $this->FormSubmitted = ($FormName == $this->ComponentName);\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\n $this->s_aut_IdAuxiliar = new clsControl(ccsTextBox, \"s_aut_IdAuxiliar\", \"s_aut_IdAuxiliar\", ccsInteger, \"\", CCGetRequestParam(\"s_aut_IdAuxiliar\", $Method));\n $this->s_aut_TipoDocum = new clsControl(ccsTextBox, \"s_aut_TipoDocum\", \"s_aut_TipoDocum\", ccsText, \"\", CCGetRequestParam(\"s_aut_TipoDocum\", $Method));\n $this->s_aut_AutSri = new clsControl(ccsTextBox, \"s_aut_AutSri\", \"s_aut_AutSri\", ccsInteger, \"\", CCGetRequestParam(\"s_aut_AutSri\", $Method));\n $this->Button_DoSearch = new clsButton(\"Button_DoSearch\");\n }\n }", "title": "" }, { "docid": "9e73aadb30289dba4b28c36dd98d3686", "score": "0.5746896", "text": "public function search()\r\n\t{\r\n\r\n }", "title": "" }, { "docid": "e16f6f923755e4fd8b31dd7817ca6b79", "score": "0.5739301", "text": "function search_form()\n {\n $action = $this->EE->TMPL->fetch_param('action','catalog/search');\n $name = $this->EE->TMPL->fetch_param('form_name','search_form');\n $form_id = $this->EE->TMPL->fetch_param('form_id','search_form');\n $form_class = $this->EE->TMPL->fetch_param('form_class','search_form');\n\n $form_details = array(\n 'action' => $this->EE->functions->create_url($action),\n 'name' => $name,\n 'id' => $form_id,\n 'class' => $form_class\n );\n\n $form = $this->EE->functions->form_declaration($form_details);\n return $form.$this->EE->TMPL->tagdata.form_close();\n }", "title": "" } ]
80825f826f78dbe20c9b0597a1839778
Function to sort shows in priority order.
[ { "docid": "e90d26f9424f303186154bf6fdce7403", "score": "0.6617706", "text": "protected function sortShowsByPriority(array $show_a, array $show_b)\n {\n for ($i = 0; $i < count($show_a); $i++) {\n if (($show_a[$i] <=> $show_b[$i]) !== 0) {\n return $show_a[$i] <=> $show_b[$i];\n }\n }\n }", "title": "" } ]
[ { "docid": "82fa7e5542605fa1a6ef31a408e04dde", "score": "0.7124654", "text": "public function sort_decisions() {\n\t\t$this->uasort( function( Decision $a, Decision $b ) {\n\t\t\treturn $a->priority < $b->priority ? -1 : 1;\n\t\t} );\n\t}", "title": "" }, { "docid": "8bb377bdf389b4c66bf52c3d787d5ea8", "score": "0.7031795", "text": "function order_by_priority() {\n\t\t\t\tuasort($this->queue,array($this,'order_by_callback'));\n\t\t\t}", "title": "" }, { "docid": "300512a2e957d67b449a292155b011a1", "score": "0.7008063", "text": "public function sort();", "title": "" }, { "docid": "4306dfda8cbe3cbbbfee6901b0056fdd", "score": "0.69393885", "text": "function priority_sort($a, $b) {\n return ($b['priority'] > $a['priority']);\n}", "title": "" }, { "docid": "a00b844c4bdd1338a1396f4176d08544", "score": "0.690203", "text": "public function sort() {\n\t\tuasort($this->scenarios, function (Scenario $firstScenario, Scenario $secondScenario) {\n\t\t\treturn $firstScenario->getPriority() <=> $secondScenario->getPriority();\n\t\t});\n\t}", "title": "" }, { "docid": "70fb517e5b555de2ee7bc0312f988b2f", "score": "0.6874856", "text": "function sort_pois() {\n\t\tusort($this->pois, array(__CLASS__, 'compare_title'));\n\t\tdo_action('mappress_sort_pois', $this);\n\t}", "title": "" }, { "docid": "3487f4c4ee2545ab4e6be8044cf68512", "score": "0.678786", "text": "function _sort_priority_callback( $a, $b ) {\n\t\t\t\tif ( ! isset( $a['priority'], $b['priority'] ) || $a['priority'] === $b['priority'] ) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\treturn ( $a['priority'] < $b['priority'] ) ? -1 : 1;\n\t\t\t}", "title": "" }, { "docid": "9e678ad33e6bcf5fabe80146444837bc", "score": "0.6742654", "text": "function order_by_callback($a,$b) {\n\t\t\t\t\treturn $this->priorities[$a] < $this->priorities[$b] ? -1 : 1;\n\t\t\t\t}", "title": "" }, { "docid": "5714b2987151b656a867f1264e39fb5e", "score": "0.6610006", "text": "public function doSort();", "title": "" }, { "docid": "d3e38b0a312108bf35178549288a4808", "score": "0.64979297", "text": "public function getPriorityList() {\n return array(Yii::t('constants', 'Task.priority.low'),\n Yii::t('constants', 'Task.priority.medium'),\n Yii::t('constants', 'Task.priority.high'),\n Yii::t('constants', 'Task.priority.escalated'));\n }", "title": "" }, { "docid": "ef38d2ed2e5f99b4c0651c4ebb96e8e7", "score": "0.64939153", "text": "public function sort() {\n uasort($this->classes, function(array $first, array $second) { return strcmp($first[0], $second[0]); });\n }", "title": "" }, { "docid": "d29709f511f9b253b66865376756005e", "score": "0.64894146", "text": "public function getSortOrder();", "title": "" }, { "docid": "40dc840d84d5668f1f69957fee043731", "score": "0.6472076", "text": "function getPriority();", "title": "" }, { "docid": "d0f59b3f64ef74141ef59e9f8796a316", "score": "0.64373755", "text": "public function sort()\n {\n usort(\n $this->options, \n function ($option_a, $option_b)\n {\n return strcmp($option_a->get_name(), $option_b->get_name());\n });\n }", "title": "" }, { "docid": "de9537758f1b832e93b18a5b4c8fbbac", "score": "0.6418914", "text": "public function getDefaultSort();", "title": "" }, { "docid": "ed65050d3017dce4b4e7a70de992352f", "score": "0.6410441", "text": "private function sort() {\n\t\tkrsort($this->data, SORT_REGULAR);\n\t}", "title": "" }, { "docid": "2541f01f4767acfd9e451ed9a0d50f23", "score": "0.63841844", "text": "public function order() {\n\t\t$order = array();\n\t\t$sort = func_get_args();\n $dualCheck = array(\"time\" => false, \"tagCount\" => false, \n \"value\" => false, \"random\" => false);\n\n\t\tif(func_num_args() == 1)\n\t\t\tif(is_array($sort[0]))\n\t\t\t\t$sort = $sort[0];\n\t\telse if(func_num_args() == 0)\n\t\t\t$sort = array(0);\n\n foreach($sort as $s){\n \tswitch($s){\n // sort newest first\n case SORT_NEWEST:\n if($dualCheck['time']) {\n trigger_error(\n \"Trying to sort value twice! \"\n . \"Declaration ignored!\", E_USER_WARNING);\n break;\n }\n $order[] = SORT_NEWEST;\n $dualCheck['time'] = true;\n break;\n\n // sort random\n case SORT_RANDOM:\n if($dualCheck['random']) {\n trigger_error(\n \"Trying to sort by random twice! \"\n . \"Declaration ignored!\", E_USER_WARNING);\n break;\n }\n $order[] = SORT_RANDOM;\n $dualCheck['random'] = true;\n break;\n\n // sort oldest first\n case SORT_OLDEST:\n if($dualCheck['time']){\n trigger_error(\n \"Trying to sort value twice! \"\n . \"Declaration ignored!\", E_USER_WARNING);\n break;\n }\n $order[] = SORT_OLDEST;\n $dualCheck['time'] = true;\n break;\n\n // sort best voted first\n case SORT_POPULARITY:\n if($dualCheck['value']) {\n trigger_error(\n \"Trying to sort value twice! \"\n . \"Declaration ignored!\", E_USER_WARNING);\n break;\n }\n $order[] = SORT_POPULARITY;\n $dualCheck['value'] = true;\n break;\n\n // sort worst voted first\n case SORT_IMPOPULARITY:\n if($dualCheck['value']){\n trigger_error(\n \"Trying to sort value twice! \"\n . \"Declaration ignored!\", E_USER_WARNING);\n break;\n }\n $order[] = SORT_IMPOPULARITY;\n $dualCheck['value'] = true;\n break;\n\n // sort images with least tags first\n case SORT_LESSTAGS:\n if($dualCheck['tagCount']) {\n trigger_error(\n \"Trying to sort value twice! \"\n . \"Declaration ignored!\", E_USER_WARNING);\n break;\n }\n $order[] = SORT_LESSTAGS;\n $dualCheck['tagCount'] = true;\n break;\n\n // sort images with most tags first\n case SORT_MORETAGS:\n if($dualCheck['tagCount']) {\n trigger_error(\n \"Trying to sort value twice! \"\n . \"Declaration ignored!\", E_USER_WARNING);\n break;\n }\n $order[] = SORT_MORETAGS;\n $dualCheck['tagCount'] = true;\n break;\n default: \n \ttrigger_error(\"Sort mode not supported!\", E_USER_NOTICE);\n \t\t}\n \t\t\n } // end of while\n \n \n\t\t\tif(count($order) == 0){\n\t\t\t\ttrigger_error(\"No order given! Defaulting to SORT_NEWEST\", E_USER_NOTICE);\n\t $this->query['order'] = array(SORT_NEWEST);\n\t\t\t}\n\t\t\telse\n\t $this->query['order'] = $order;\n }", "title": "" }, { "docid": "4ecae696f2375aa848e1ccbd94781f5c", "score": "0.6381782", "text": "function getSort ()\n {\n return 10;\n }", "title": "" }, { "docid": "3be8d0cab6ca34d62ac7df9cda1116c7", "score": "0.63691616", "text": "function getSort()\n {\n return 999;\n }", "title": "" }, { "docid": "ffc626cb1a539c7f48eceb393f71e14d", "score": "0.63681304", "text": "function sortPanes(){\r\n\t\tksort ( $this->content);\r\n\t}", "title": "" }, { "docid": "9ff7926ca3c8e0ffde3664adaad0d8d7", "score": "0.6351793", "text": "public static function prioritySorter($a, $b) {\n return $b['priority'] - $a['priority'];\n }", "title": "" }, { "docid": "3be484d1a716c18e1500e9285410f747", "score": "0.6343837", "text": "public function getPriority();", "title": "" }, { "docid": "3be484d1a716c18e1500e9285410f747", "score": "0.6343837", "text": "public function getPriority();", "title": "" }, { "docid": "3be484d1a716c18e1500e9285410f747", "score": "0.6343837", "text": "public function getPriority();", "title": "" }, { "docid": "3be484d1a716c18e1500e9285410f747", "score": "0.6343837", "text": "public function getPriority();", "title": "" }, { "docid": "3be484d1a716c18e1500e9285410f747", "score": "0.6343837", "text": "public function getPriority();", "title": "" }, { "docid": "62f23b87d83c80974008b52341bf748d", "score": "0.63434273", "text": "public function order_by_priority( $a, $b ) {\n\t\treturn (int) $a->priority === (int) $b->priority ? 0 : (int) $a->priority > (int) $b->priority;\n\t}", "title": "" }, { "docid": "284d2dc5e36ec0420c976e1aaa530a0b", "score": "0.63319296", "text": "function getSort() {return 310;}", "title": "" }, { "docid": "9074ed1709aa58acb7339e364eaf7b14", "score": "0.6268018", "text": "public function comparator();", "title": "" }, { "docid": "3902ebc6dc0bee257763a8d6b71ddbd7", "score": "0.62672764", "text": "function getSort(){\n return 999;\n }", "title": "" }, { "docid": "de84bdc4e0a2e595bb7e5df67833b753", "score": "0.6266148", "text": "function sort() {\n usort($this->feeds,array(\"RssMerger\",\"feeds_cmp\"));\n }", "title": "" }, { "docid": "c0af328951c9f42d5c64fbd6b4c2baa3", "score": "0.6260865", "text": "function sortMenuItems($a, $b) {\n return ($a['display'] < $b['display']) ? -1 : 1;\n }", "title": "" }, { "docid": "b4389741210ea96146693f586374f189", "score": "0.6233728", "text": "function order($comparer = null);", "title": "" }, { "docid": "da4f686e70bef134796565edf2935289", "score": "0.62088495", "text": "public function asort ()\n\t{\n\t\t$this->_setDirty();\n\t\treturn parent::asort();\n\t}", "title": "" }, { "docid": "8c124db6ebdcb1f9bc776734cc1f40ae", "score": "0.6200939", "text": "public function getSort();", "title": "" }, { "docid": "031b6bbe9574dc617664740e3d440767", "score": "0.62000704", "text": "function communityservice_sort_task_tabs( $tabs = array() ) {\n\n\t\t// Make sure the $tabs parameter is an array.\n\t\tif ( ! is_array( $tabs ) ) {\n\t\t\ttrigger_error( 'Function communityservice_sort_task_tabs() expects an array as the first parameter. Defaulting to empty array.' ); // @codingStandardsIgnoreLine\n\t\t\t$tabs = array();\n\t\t}\n\n\t\t// Re-order tabs by priority.\n\t\tif ( ! function_exists( '_sort_priority_callback' ) ) {\n\t\t\t/**\n\t\t\t * Sort Priority Callback Function\n\t\t\t *\n\t\t\t * @param array $a Comparison A.\n\t\t\t * @param array $b Comparison B.\n\t\t\t * @return bool\n\t\t\t */\n\t\t\tfunction _sort_priority_callback( $a, $b ) {\n\t\t\t\tif ( ! isset( $a['priority'], $b['priority'] ) || $a['priority'] === $b['priority'] ) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\treturn ( $a['priority'] < $b['priority'] ) ? -1 : 1;\n\t\t\t}\n\t\t}\n\n\t\tuasort( $tabs, '_sort_priority_callback' );\n\n\t\treturn $tabs;\n\t}", "title": "" }, { "docid": "c25295893b7b79bbc39848da9937a183", "score": "0.61655015", "text": "function _page_manager_handler_sort($a, $b) {\n if ($a['weight'] < $b['weight']) {\n return -1;\n }\n elseif ($a['weight'] > $b['weight']) {\n return 1;\n }\n elseif ($a['name'] < $b['name']) {\n return -1;\n }\n elseif ($a['name'] > $b['name']) {\n return 1;\n }\n}", "title": "" }, { "docid": "b583c303bfd0efd3be7c5c37a7837b54", "score": "0.61641335", "text": "function sort() {\n\t\tfor($j = count ( $this->optimalClasses ) - 1; $j > 0; $j --)\n\t\t\tfor($i = 0; $i < $j; $i ++) {\n\t\t\t\tif (($this->optimalClasses [$i] [1] < $this->optimalClasses [$i + 1] [1]) || ($this->optimalClasses [$i] [1] == $this->optimalClasses [$i + 1] [1] && $this->optimalClasses [$i] [2] > $this->optimalClasses [$i + 1] [1])) {\n\t\t\t\t\t\n\t\t\t\t\t$this->swap ( $i, $i + 1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\treturn;\n\t}", "title": "" }, { "docid": "28f2def00c8b9d6d2e2e55d94ac54db8", "score": "0.61529636", "text": "function getSort() {\n return 139;\n }", "title": "" }, { "docid": "5e6a0b09628119fd57ae354e8d7ef576", "score": "0.6147459", "text": "protected function applyDefaultSorts()\n {\n }", "title": "" }, { "docid": "eded480342608c6799675ce9e2e15124", "score": "0.6130913", "text": "private function move_priority_results_to_top() {\n\t\t$priority = [];\n\t\tforeach ( $this->results as $id => $result ) {\n\t\t\tif ( is_array( $result ) && 'priority' === $result['category'] ) {\n\t\t\t\t$priority[ $id ] = $result;\n\t\t\t\tunset( $this->results[ $id ] );\n\t\t\t}\n\t\t}\n\n\t\t$this->results = array_replace( $priority, $this->results );\n\t}", "title": "" }, { "docid": "793703da0191197de8d23972a8b6bfd0", "score": "0.6130295", "text": "public function natsort ()\n\t{\n\t\t$this->_setDirty();\n\t\treturn parent::natsort();\n\t}", "title": "" }, { "docid": "6de5c9ff89242e429c2e23cb4bfebf19", "score": "0.61242753", "text": "static public function _sortByPriority($a, $b)\n {\n if ($a->priority == $b->priority) {\n return self::_sortByIdentity($a, $b);\n }\n return ($a->priority > $b->priority) ? 1 : -1;\n }", "title": "" }, { "docid": "cec962b2470fe100648c835117cacff4", "score": "0.612405", "text": "public function get_sort_order(): array {\n return [\n 'completionview',\n 'tincancompletionverb',\n 'tincancompletioexpiry'\n ];\n }", "title": "" }, { "docid": "26aed8ce6346b88d46cdb6c5db8fe14e", "score": "0.61099404", "text": "public function pluginsSorted(): array {\n $plugins = $this->plugins();\n usort($plugins, function (HiddenTabPluginBase $a, HiddenTabPluginBase $b) {\n return $a->weight() > $b->weight();\n });\n return $plugins;\n }", "title": "" }, { "docid": "8fb3775a72edac0ccb39af4b445543b3", "score": "0.60778576", "text": "static function defaultSort() { return 'failcount' ; }", "title": "" }, { "docid": "e2b651ff0d77c0efaac760040263bda3", "score": "0.60776716", "text": "function user_sort($a, $b)\n {\n if ($b == 'smarts') {\n return 1;\n } else if ($a == 'smarts') {\n return -1;\n }\n return ($a == $b) ? 0 : (($a < $b) ? -1 : 1);\n }", "title": "" }, { "docid": "3aacb95fd268d8faefb913305ec550e9", "score": "0.6072845", "text": "private function sort()\n {\n usort(\n $this->intervals,\n function (Interval $a, Interval $b) {\n if (0 == $this->cmpV($a->low(), $b->low())) {\n if ($a->low()->isIncluded() != $b->low()->isIncluded()) {\n return $a->low()->isIncluded() && !$b->low()->isIncluded() ? -1 : 1;\n } else {\n if (0 == $this->cmpV($a->high(), $b->high())) {\n if ($a->high()->isIncluded() != $b->high()->isIncluded()) {\n return $a->high()->isIncluded() && !$b->high()->isIncluded() ? 1 : -1;\n } else {\n return 0;\n }\n } else {\n return $this->cmpV($a->high(), $b->high());\n }\n }\n } else {\n return $this->cmpV($a->low(), $b->low());\n }\n }\n );\n }", "title": "" }, { "docid": "1f9f5a74f5626a654c135292c75dfe60", "score": "0.60657", "text": "function usort_reorder($a,$b){\r\n $orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'blog_title'; //If no sort, default to title\r\n $order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc'; //If no order, default to asc\r\n $result = strcmp($a[$orderby], $b[$orderby]); //Determine sort order\r\n return ($order==='asc') ? $result : -$result; //Send final sort direction to usort\r\n }", "title": "" }, { "docid": "a6181808f12eb7a959c8f3695eb0aced", "score": "0.6058617", "text": "function getSort(){\n return 152;\n }", "title": "" }, { "docid": "1df6a0553847790a5c63e719e39cfe70", "score": "0.60468143", "text": "public function getMovieOrdering()\n\t{\n\t\treturn array('title_asc', 'title_desc', 'year_asc', 'year_desc', 'rating_asc', 'rating_desc');\n\t}", "title": "" }, { "docid": "a6d13844a74246e3b279b3c3d376607b", "score": "0.6041659", "text": "function sortFunction($x,$y){\r\n return $x->getlName()<=> $y->getlName();\r\n }", "title": "" }, { "docid": "cbff6f536f667054a6daf28e228b29c9", "score": "0.60229135", "text": "function getSort(){\n\t\treturn 108;\n\t}", "title": "" }, { "docid": "298133712f2da47d8ca8643dbf12b172", "score": "0.6018569", "text": "protected function sortTags()\n\t{\n\t\t$arr = [];\n\t\tforeach ($this->tagStack as $i => $tag)\n\t\t{\n\t\t\t$key = $this->getSortKey($tag, $i);\n\t\t\t$arr[$key] = $tag;\n\t\t}\n\t\tkrsort($arr);\n\n\t\t$this->tagStack = array_values($arr);\n\t\t$this->tagStackIsSorted = true;\n\t}", "title": "" }, { "docid": "f11c825f387446b8193f391096e65fc7", "score": "0.60148764", "text": "function getSort(){\r\n return 299;\r\n }", "title": "" }, { "docid": "f11c825f387446b8193f391096e65fc7", "score": "0.60148764", "text": "function getSort(){\r\n return 299;\r\n }", "title": "" }, { "docid": "3d93653d55f48d3591c9c67d2993df62", "score": "0.60109943", "text": "function sortAll(&$tasks, $order) {\n if (isset($_GET['field']) && isset($_GET['order'])){\n if ($order == 0) {\n uasort($tasks, function ($a, $b) {\n return strcmp($a[$_GET['field']] ,$b[$_GET['field']]);//0 - 1, 1 \n });\n } else{\n uasort($tasks, function($a, $b) {\n return strcmp($b[$_GET['field']] ,$a[$_GET['field']]);\n });\n }\n }\n}", "title": "" }, { "docid": "3d93653d55f48d3591c9c67d2993df62", "score": "0.60109943", "text": "function sortAll(&$tasks, $order) {\n if (isset($_GET['field']) && isset($_GET['order'])){\n if ($order == 0) {\n uasort($tasks, function ($a, $b) {\n return strcmp($a[$_GET['field']] ,$b[$_GET['field']]);//0 - 1, 1 \n });\n } else{\n uasort($tasks, function($a, $b) {\n return strcmp($b[$_GET['field']] ,$a[$_GET['field']]);\n });\n }\n }\n}", "title": "" }, { "docid": "3d93653d55f48d3591c9c67d2993df62", "score": "0.60109943", "text": "function sortAll(&$tasks, $order) {\n if (isset($_GET['field']) && isset($_GET['order'])){\n if ($order == 0) {\n uasort($tasks, function ($a, $b) {\n return strcmp($a[$_GET['field']] ,$b[$_GET['field']]);//0 - 1, 1 \n });\n } else{\n uasort($tasks, function($a, $b) {\n return strcmp($b[$_GET['field']] ,$a[$_GET['field']]);\n });\n }\n }\n}", "title": "" }, { "docid": "90b00db1e746fb0573293b829f631c5a", "score": "0.60082966", "text": "function sortingAllPageInfo($a_id1,$a_id2)\r\n{\r\n\t@$elt1 = $a_id1[ARRAY_INDEX_LEVEL];\r\n\t@$elt2 = $a_id2[ARRAY_INDEX_LEVEL];\r\n\treturn ($elt1 > $elt2) ? -1 : 1;\r\n}", "title": "" }, { "docid": "1f817405c250c9663bf510522ca18510", "score": "0.60049343", "text": "function cmp($a, $b)\n{\n if ($a->getScore() == $b->getScore()) {\n return 0;\n }\n return ($a->getScore() > $b->getScore()) ? -1 : 1;\n}", "title": "" }, { "docid": "dfbad08947f75fd9807d988ecbd7f083", "score": "0.6001379", "text": "function getSort(){\n return 299;\n }", "title": "" }, { "docid": "6d6daf4f734aa4fef83e3afd1559b540", "score": "0.599932", "text": "public static function autoSort() {\n\n }", "title": "" }, { "docid": "da122bdde2336f125ceb48b9f7eec1b0", "score": "0.5987887", "text": "function custom_sort($a,$b) {\n return $a['percentage']<$b['percentage'];\n}", "title": "" }, { "docid": "d0d7b6cc36c8ed155d4eae7df3c60864", "score": "0.5981764", "text": "public function sort() {\n\t\t\treturn $this->sortInner( func_get_args() );\n\t\t}", "title": "" }, { "docid": "403ef89e8779f62a4e7ffdd740057590", "score": "0.59743714", "text": "private function get_sort_types() {\n\t\treturn array(\n\t\t\t'relevance|DESC' => is_admin() ? esc_html__( 'Relevance (recommended)', 'jetpack' ) : esc_html__( 'Relevance', 'jetpack' ),\n\t\t\t'date|DESC' => esc_html__( 'Newest first', 'jetpack' ),\n\t\t\t'date|ASC' => esc_html__( 'Oldest first', 'jetpack' ),\n\t\t);\n\t}", "title": "" }, { "docid": "95aa041052addb475671eb90bd0d9637", "score": "0.59709775", "text": "public function sorts(): array;", "title": "" }, { "docid": "dd10f60721a33a858d8cfb553d83ba5b", "score": "0.5938369", "text": "function getMenuSort() {\n return 40;\n }", "title": "" }, { "docid": "297ec3b34956041a9abb7c59f276b644", "score": "0.59336686", "text": "function mts_sort_plugin_items( $items ) {\n\t\t$type = array();\n\t\t$name = array();\n\t\t$status = array();\n\n\t\tglobal $mts_plugins_config_order;\n\n\t\t$have_installed = false;\n\t\tforeach ( $items as $i => $plugin ) {\n\t\t\tif ( ! isset( $plugin['sanitized_plugin'] ) ) {\n\t\t\t\t$type[ $i ] = '';\n\t\t\t\t$status[ $i ] = '';\n\t\t\t\t$name[ $i ] = '';\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$type[ $i ] = $plugin['type']; // Required / recommended.\n\t\t\t$status[ $i ] = $plugin['status']; // Active / Installed But Not Activated / Not Installed.\n\t\t\t$name[ $i ] = $plugin['sanitized_plugin'];\n\t\t\tif ( !empty( $plugin['installed_version'] ) ) {\n\t\t\t\t$have_installed = true;\n\t\t\t}\n\t\t}\n\n\t\tif ( !$have_installed ) {\n\n\t\t\t// Sort as it is defined in tgma()\n\t\t\t$items = array_merge( array_flip( $mts_plugins_config_order ), $items );\n\n\t\t} else {\n\n\t\t\t// Required, Recommended / Not Installed, Installed But Not Activated, Active / By name\n\t\t\tarray_multisort( $type, SORT_DESC, $status, SORT_DESC, $name, SORT_ASC, $items );\n\t\t}\n\n\t\treturn $items;\n}", "title": "" }, { "docid": "b20b8ced2d08db922a04c2b9d04185ae", "score": "0.5923383", "text": "static function get_sort_order_options() {\n return array(\"weight\" => t(\"Manual\"),\n \"captured\" => t(\"Date captured\"),\n \"created\" => t(\"Date uploaded\"),\n \"title\" => t(\"Title\"),\n \"name\" => t(\"File name\"),\n \"updated\" => t(\"Date modified\"),\n \"view_count\" => t(\"Number of views\"),\n \"rand_key\" => t(\"Random\"));\n }", "title": "" }, { "docid": "96590d2ae66dec59865d80ab58fdfe62", "score": "0.5898424", "text": "function sortProc($a, $b)\r\n\t\t\t{\r\n\t\t\t\tif ($a[\"x\"] === $b[\"x\"]) {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t\treturn ($a[\"x\"] < $b[\"x\"]) ? -1 : 1;\r\n\t\t\t}", "title": "" }, { "docid": "90ddf9842adc9b42ca451518fa9fa9cf", "score": "0.5891257", "text": "function sorteer($a, $b){\n if($a->klasse == $b->klasse){return 0;}\n elseif($a->klasse < $b->klasse){return -1;}\n else{return 1;}\n }", "title": "" }, { "docid": "a46c674ab1f0b7662d779c1811712bd7", "score": "0.58879936", "text": "static public function _rsortByPriority($a, $b)\n {\n return self::_sortByPriority($b, $a);\n }", "title": "" }, { "docid": "fc8068216a588ee63d52f702f17f1d69", "score": "0.588158", "text": "function sortAndPrint ($array) {\r\n sort($array);\r\n\r\n echo \"<p>\";\r\n foreach($array as $element) {\r\n echo $element.\" \";\r\n }\r\n echo \"</p>\";\r\n }", "title": "" }, { "docid": "4ecf201f9a451fcdb09768301b52ea14", "score": "0.5877327", "text": "static function cmp($a, $b){\n\t\tif($a->getTopicName() > $b->getTopicName()){\n\t\t\treturn 1;\n\t\t} else if($a->getTopicName() < $b->getTopicName()){\n\t\t\treturn -1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "f9ec2992fb650bb6445da1b989bb663e", "score": "0.586726", "text": "public function order_d(){\n sort($this->d);\n }", "title": "" }, { "docid": "ab678a44aa7678a691413471bd0022ec", "score": "0.58620775", "text": "protected function getDefaultSorting()\n {\n return array('name' => 'asc');\n }", "title": "" }, { "docid": "efc654b183c67e9531fe210ac1e2880e", "score": "0.58604264", "text": "function orderByPrioritas(){\r\n\t\t$query = \"SELECT * FROM tb_to_do ORDER BY prioritas ASC\";\r\n\r\n\t\t// Mengeksekusi query\r\n\t\treturn $this->execute($query);\r\n\t}", "title": "" }, { "docid": "1b15f7fe6999d5bbbbab73d3fc89ea3b", "score": "0.58444285", "text": "public function sortByAlertsCriticalFirst(){\n $this->sortByMultiple('ak_alert_critical desc', 'cvDatePublic desc');\n }", "title": "" }, { "docid": "52b9deb778656cc58149186994af8a7d", "score": "0.58339775", "text": "function usort_reorder( $a, $b ) {\n $orderby = ( ! empty( $_GET['orderby'] ) ) ? $_GET['orderby'] : 'post_date';\n // If no order, default to asc\n $order = ( ! empty($_GET['order'] ) ) ? $_GET['order'] : 'dsc';\n // Determine sort order\n $result = strcmp( $a[$orderby], $b[$orderby] );\n // Send final sort direction to usort\n return ( $order === 'asc' ) ? $result : -$result;\n }", "title": "" }, { "docid": "58493513e1698e5a8b0bd0b30303e21b", "score": "0.5826", "text": "function _requirementsSort($a, $b)\n\t{\n\t\t$cata = isset($a['category']) ? $a['category'] : '';\n\t\t$catb = isset($b['category']) ? $b['category'] : '';\n\n\t if ($cata == $catb) {\n\t return 0;\n\t }\n\t return ($cata < $catb) ? -1 : 1;\n\t}", "title": "" }, { "docid": "16ec0e18adbfc4b5100d52066fcdeef4", "score": "0.58030516", "text": "private function get_row_action_sort_order()\n {\n }", "title": "" }, { "docid": "16ec0e18adbfc4b5100d52066fcdeef4", "score": "0.58030516", "text": "private function get_row_action_sort_order()\n {\n }", "title": "" }, { "docid": "16ec0e18adbfc4b5100d52066fcdeef4", "score": "0.58030516", "text": "private function get_row_action_sort_order()\n {\n }", "title": "" }, { "docid": "a6ab602b4ec2754ab1ae1da0eda04f66", "score": "0.5795416", "text": "public static function get_display_order() {\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "b9b8bfbcbf44e23d1d2c448ed6ed23f8", "score": "0.5784703", "text": "function communityservice_catalog_ordering() {\n\t\tif ( ! cs_get_loop_prop( 'is_paginated' ) || ! communityservice_tasks_will_display() ) {\n\t\t\treturn;\n\t\t}\n\t\t$show_default_orderby = 'menu_order' === apply_filters( 'communityservice_default_catalog_orderby', get_option( 'communityservice_default_catalog_orderby', 'menu_order' ) );\n\t\t$catalog_orderby_options = apply_filters( 'communityservice_catalog_orderby', array(\n\t\t\t'menu_order' => __( 'Default sorting', 'communityservice' ),\n\t\t\t'popularity' => __( 'Sort by popularity', 'communityservice' ),\n\t\t\t'rating' => __( 'Sort by average rating', 'communityservice' ),\n\t\t\t'date' => __( 'Sort by latest', 'communityservice' ),\n\t\t\t'price' => __( 'Sort by price: low to high', 'communityservice' ),\n\t\t\t'price-desc' => __( 'Sort by price: high to low', 'communityservice' ),\n\t\t) );\n\n\t\t$default_orderby = cs_get_loop_prop( 'is_search' ) ? 'relevance' : apply_filters( 'communityservice_default_catalog_orderby', get_option( 'communityservice_default_catalog_orderby', '' ) );\n\t\t$orderby = isset( $_GET['orderby'] ) ? cs_clean( wp_unslash( $_GET['orderby'] ) ) : $default_orderby; // WPCS: sanitization ok, input var ok, CSRF ok.\n\n\t\tif ( cs_get_loop_prop( 'is_search' ) ) {\n\t\t\t$catalog_orderby_options = array_merge( array( 'relevance' => __( 'Relevance', 'communityservice' ) ), $catalog_orderby_options );\n\n\t\t\tunset( $catalog_orderby_options['menu_order'] );\n\t\t}\n\n\t\tif ( ! $show_default_orderby ) {\n\t\t\tunset( $catalog_orderby_options['menu_order'] );\n\t\t}\n\n\t\tif ( 'no' === get_option( 'communityservice_enable_review_rating' ) ) {\n\t\t\tunset( $catalog_orderby_options['rating'] );\n\t\t}\n\n\t\tif ( ! array_key_exists( $orderby, $catalog_orderby_options ) ) {\n\t\t\t$orderby = current( array_keys( $catalog_orderby_options ) );\n\t\t}\n\n\t\tcs_get_template( 'loop/orderby.php', array(\n\t\t\t'catalog_orderby_options' => $catalog_orderby_options,\n\t\t\t'orderby' => $orderby,\n\t\t\t'show_default_orderby' => $show_default_orderby,\n\t\t) );\n\t}", "title": "" }, { "docid": "5bcb825775800cd2b2f8e1dfe4cb7764", "score": "0.5781803", "text": "function getSort(){\r\n return 301;\r\n }", "title": "" }, { "docid": "90b11f08584fbfccf3fc928e8cfa2a61", "score": "0.57781696", "text": "public static function get_sort_options() {\n\t\t$sort_options = [];\n\n\t\t$sort_options[__( 'Select', 'papi' )] = null;\n\n\t\t$sort_options[__( 'Name (alphabetically)', 'papi' )] = function ( $a, $b ) {\n\t\t\treturn strcmp( strtolower( $a->post_title ), strtolower( $b->post_title ) );\n\t\t};\n\n\t\t$sort_options[__( 'Post created date (ascending)', 'papi' )] = function ( $a, $b ) {\n\t\t\treturn strtotime( $a->post_date ) > strtotime( $b->post_date );\n\t\t};\n\n\t\t$sort_options[__( 'Post created date (descending)', 'papi' )] = function ( $a, $b ) {\n\t\t\treturn strtotime( $a->post_date ) < strtotime( $b->post_date );\n\t\t};\n\n\t\t$sort_options[__( 'Post id (ascending)', 'papi' )] = function ( $a, $b ) {\n\t\t\treturn $a->ID > $b->ID;\n\t\t};\n\n\t\t$sort_options[__( 'Post id (descending)', 'papi' )] = function ( $a, $b ) {\n\t\t\treturn $a->ID < $b->ID;\n\t\t};\n\n\t\t$sort_options[__( 'Post order value (ascending)', 'papi' )] = function ( $a, $b ) {\n\t\t\treturn $a->menu_order > $b->menu_order;\n\t\t};\n\n\t\t$sort_options[__( 'Post order value (descending)', 'papi' )] = function ( $a, $b ) {\n\t\t\treturn $a->menu_order < $b->menu_order;\n\t\t};\n\n\t\t$sort_options[__( 'Post modified date (ascending)', 'papi' )] = function ( $a, $b ) {\n\t\t\treturn strtotime( $a->post_modified ) > strtotime( $b->post_modified );\n\t\t};\n\n\t\t$sort_options[__( 'Post modified date (descending)', 'papi' )] = function ( $a, $b ) {\n\t\t\treturn strtotime( $a->post_modified ) < strtotime( $b->post_modified );\n\t\t};\n\n\t\t$sort_options = apply_filters( 'papi/property/relationship/sort_options', $sort_options );\n\t\treturn $sort_options;\n\t}", "title": "" }, { "docid": "77fbe5dd281148ee6026698b78bc5a51", "score": "0.5773608", "text": "public static function sort( $p1, $p2 )\n {\n if( $p1->menu_order == $p2->menu_order ) return 0;\n\n return $p1->menu_order < $p2->menu_order ? -1 : 1;\n }", "title": "" }, { "docid": "2264f2e2c3dfb4695fdd87180196f4ff", "score": "0.57734853", "text": "function sortPlayers(& $players){\r\n usort($players, array($this,'sortFunction'));\r\n }", "title": "" }, { "docid": "99a8007ed437202a4f87bfacde5a28bb", "score": "0.57727987", "text": "public function sort($callable);", "title": "" }, { "docid": "5557f5c2d31a1c01baf57bf7b66f7dee", "score": "0.57726645", "text": "public function getDefaultSort()\n {\n return ['id', 'desc'];\n }", "title": "" }, { "docid": "6cb9ef6efc34371b9a3285f2c6c062c8", "score": "0.5764794", "text": "function cmp($a, $b) {\n if ($a[\"Distanza\"] == $b[\"Distanza\"]) {\n return 0;\n }\n return ($a[\"Distanza\"] < $b[\"Distanza\"]) ? -1 : 1;\n}", "title": "" }, { "docid": "3ebc28217131c2c0f41c991fa25ace13", "score": "0.57626384", "text": "function kalium_sort_terms_taxonomy_order_fn( $a, $b ) {\n\treturn $a->term_order > $b->term_order ? 1 : - 1;\n}", "title": "" }, { "docid": "0b7bffea8a98f88f042189d43d679fb7", "score": "0.5754011", "text": "function cmp($a, $b) {\n if ($a == $b) {\n return 0;\n }\n return ($a < $b) ? 1 : -1;\n}", "title": "" }, { "docid": "66ee977ba16a447aaced06f3cb5e342d", "score": "0.57419974", "text": "private function prioritize() {\n $aPriorityQueue = Configuration::getInstance()->get('PriorityQueue');\n if(count($aPriorityQueue) == 0) {\n return false;\n }\n\n $aModuleList = [\n 'Prioritized' => [],\n 'Normal' => []\n ];\n\n /** Determain which modules are prioritized **/\n foreach($this->m_aModules as $sName => $pModule) {\n $nPriority = array_search($sName, $aPriorityQueue, true);\n if($nPriority !== false) {\n $aModuleList ['Prioritized'] [$nPriority] = $pModule;\n } else {\n $aModuleList ['Normal'] [$sName] = $pModule;\n }\n }\n\n /** Now sort both arrays, and merge them into one array **/\n ksort($aModuleList ['Prioritized']);\n ksort($aModuleList ['Normal']);\n\n $this->m_aModules = [];\n foreach($aModuleList ['Prioritized'] as $pModule) {\n $this->m_aModules [get_class($pModule ['Instance'])] = $pModule;\n }\n\n foreach($aModuleList ['Normal'] as $sName => $pModule) {\n $this->m_aModules [$sName] = $pModule;\n }\n\n return true;\n }", "title": "" }, { "docid": "a9a490ce002fc426bec41180a4ad2ac0", "score": "0.57299596", "text": "function tagsort($a, $b)\n{\n $returnval = 0;\n $o = getTagRanking($a);\n $p = getTagRanking($b);\n if ($o == $p) return 0;\n if ($o < $p) return -1;\n if ($o > $p) return 1;\n}", "title": "" }, { "docid": "44aeb1f6439cdfbb6fb90886c49a561f", "score": "0.5724083", "text": "function cmpPriceAsc($a, $b)\n{\n if ((float)$a['price_tmp'] < (float)$b['price_tmp']) {\n return (-1);\n } elseif ((float)$a['price_tmp'] > (float)$b['price_tmp']) {\n return (1);\n }\n\n return 0;\n}", "title": "" }, { "docid": "f03fd5d8542fc085dfdc3265b286c0ab", "score": "0.5721904", "text": "function usort_reorder( $a, $b ) {\n\t\t\t$orderby = ( ! empty( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : 'title'; // If no sort, default to title\n\t\t\t$order = ( ! empty( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : 'asc'; // If no order, default to asc\n\t\t\t$result = strcmp( $a[ $orderby ], $b[ $orderby ] ); // Determine sort order\n\t\t\treturn ( $order === 'asc' ) ? $result : -$result; // Send final sort direction to usort\n\t\t}", "title": "" }, { "docid": "7f15672ae84f2ddee8e1013e173c239f", "score": "0.5715428", "text": "public static function getPriorityColumnsOrdering(): array\n {\n return collect(static::getPriorityColumns())\n ->mapWithKeys(\n fn($column) => [$column => 'desc']\n )->toArray();\n }", "title": "" } ]
8e435467e013b76b98f50be3abcc67de
For Creating the respective model in storage
[ { "docid": "391a70831dcb40405533095005b52eed", "score": "0.0", "text": "public function create(array $input)\n {\n $data = self::MODEL;\n $data = new $data();\n if ($data->save($input)) {\n return true;\n }\n throw new GeneralException(trans('exceptions.backend.data.create_error'));\n }", "title": "" } ]
[ { "docid": "14ef489107bd22d94c98fd053126d353", "score": "0.73001385", "text": "public function createModel()\n {\n }", "title": "" }, { "docid": "1cbaf628f21caf594d477dd9f4919961", "score": "0.67576677", "text": "protected function createModel()\n {\n $this->call('make:model', array_filter([\n 'name' => $this->getNameInput(),\n '--factory' => $this->option('factory'),\n '--migration' => $this->option('migration'),\n ]));\n }", "title": "" }, { "docid": "aedf4219d396d3901b355960a9937adc", "score": "0.6709781", "text": "public function creating($model)\n\t{\n\t}", "title": "" }, { "docid": "995bcbef75b97377751ca150e0efeaa2", "score": "0.6691042", "text": "public function create(): Model;", "title": "" }, { "docid": "bcf69aa6e7d5eafd957a432ddaf5ee93", "score": "0.6662146", "text": "function create($model)\n {\n }", "title": "" }, { "docid": "1814215510b408364c22b036ba66843b", "score": "0.6658147", "text": "public function __construct($modelType, Storage $storage);", "title": "" }, { "docid": "07a65923fd88cfdb061c84755e0c7de9", "score": "0.65386873", "text": "public function modelCreate()\r\n {\r\n return \\Core\\ORM::create(self::$dbname, self::$getvars);\r\n }", "title": "" }, { "docid": "7632fd83aa733ee3ae602ab1e99735ec", "score": "0.65182114", "text": "public function create(){\n\t\t//\n\t}", "title": "" }, { "docid": "7632fd83aa733ee3ae602ab1e99735ec", "score": "0.65182114", "text": "public function create(){\n\t\t//\n\t}", "title": "" }, { "docid": "ed9cb17a7ae845022afd8ba30fedad53", "score": "0.6500595", "text": "public function create()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t}", "title": "" }, { "docid": "83665830ff6bacecbfb672a3306426ba", "score": "0.6484097", "text": "protected function createBaseModel()\n {\n $name = $this->qualifyClass('Model');\n $path = $this->getPath($name);\n\n if (!$this->files->exists($path)) {\n $this->files->put(\n $path,\n $this->files->get(__DIR__.'/../../stubs/model.base.stub')\n );\n }\n }", "title": "" }, { "docid": "b017b226969eb5fb6cc33571df315d20", "score": "0.64762735", "text": "public function create()\n {\n //\n }", "title": "" }, { "docid": "c721e87679a1659de1aa4b01fe07b209", "score": "0.6462548", "text": "public function create()\n {\n \n \n }", "title": "" }, { "docid": "4d7607ef82ae31e9e49473a692ccd859", "score": "0.6457443", "text": "public function create()\n {\n \n //\n }", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.64481515", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "f8fe982c3819dcb225a9044e6597a6a4", "score": "0.64456075", "text": "public function create()\n {\n //\n }", "title": "" }, { "docid": "f8fe982c3819dcb225a9044e6597a6a4", "score": "0.64456075", "text": "public function create()\n {\n //\n }", "title": "" }, { "docid": "f46c4965ffdeeb5da18e8edcaa3ac2b0", "score": "0.644146", "text": "public function create(){\n\n //\n }", "title": "" }, { "docid": "727547d89fe8f80aab03dab82f9ca307", "score": "0.64399254", "text": "public function create()\n {\n //\n\t\t\n }", "title": "" }, { "docid": "7461ee08d3b7c54c0221ed258eba2c38", "score": "0.64353263", "text": "public function create()\n {\n \n //\n }", "title": "" }, { "docid": "031a12821347d1189c50c4e1d6a93e7c", "score": "0.643346", "text": "public function create() {\n\n\t\t\n\t}", "title": "" }, { "docid": "5776398ee6b553cd026dcf6a17515884", "score": "0.6432642", "text": "public function create()\n {\n //create\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" }, { "docid": "5feddf0f52d6569e0764ea9482220792", "score": "0.64304644", "text": "public function create() {\n //\n }", "title": "" } ]
32cc39de5e87cc87455e5f153d5e82b5
WooCommerce helper functions This functions only load if WooCommerce is enabled because they should be used within Woo loops only.
[ { "docid": "b840b8a9530e8087d697ee06a386b65b", "score": "0.0", "text": "function athen_woo_placeholder_img() {\n if ( function_exists( 'wc_placeholder_img_src' ) && wc_placeholder_img_src() ) {\n $placeholder = '<img src=\"'. wc_placeholder_img_src() .'\" alt=\"'. __( 'Placeholder Image', 'athen_transl' ) .'\" class=\"woo-entry-image-main\" />';\n $placeholder = apply_filters( 'athen_woo_placeholder_img_html', $placeholder );\n if ( $placeholder ) {\n echo $placeholder;\n }\n }\n}", "title": "" } ]
[ { "docid": "b0b26e2af6f6510661a96dea9b8aa761", "score": "0.79569167", "text": "function air_helper_maybe_woocommerce() {\n\tif ( current_theme_supports( 'woocommerce' ) ) {\n\t\trequire_once air_helper_base_path() . '/inc/woocommerce.php';\n\t}\n}", "title": "" }, { "docid": "1c7d47e2734c63082cde98b984f68147", "score": "0.7693778", "text": "public function woocommerce() {\n\n\t\tif ( class_exists('WooCommerce') && ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {\n\n\t\t\t## Dequeue styles.\n\t\t\twp_dequeue_style( 'woocommerce-layout' );\n\t\t\twp_dequeue_style( 'woocommerce-smallscreen' );\n\t\t\twp_dequeue_style( 'woocommerce-general' );\n\t\t\twp_dequeue_style( 'woocommerce_prettyPhoto_css' );\n\n\t\t\t## Dequeue scripts.\n\t\t\twp_dequeue_script( 'wc-add-payment-method' );\n\t\t\twp_dequeue_script( 'wc_price_slider' );\n\t\t\twp_dequeue_script( 'wc-add-to-cart-variation' );\n\t\t\twp_dequeue_script( 'prettyPhoto' );\n\t\t\twp_dequeue_script( 'prettyPhoto-init' );\n\n\t\t\twp_dequeue_script( 'wc-cart-fragments' );\n\t\t\twp_dequeue_script( 'woocommerce' );\n\t\t\twp_dequeue_script( 'wc-add-to-cart' );\n\t\t\twp_dequeue_script( 'wc-checkout' );\n\t\t\twp_dequeue_script( 'wc-cart' );\n\t\t\twp_dequeue_script( 'wc-single-product' );\n\t\t}\n\t}", "title": "" }, { "docid": "fce8fe9391814e9703d1189acfabb3d5", "score": "0.7450825", "text": "public static function wp_init(){\n\n if( self::checkWooCommerceInstall() ) {\n\n self::woo_add_product_to_cart();\n\n }\n\n }", "title": "" }, { "docid": "eee527bfa3b789f8cd2f5177a5e75ebd", "score": "0.7412128", "text": "function LLMS_WooCommerce() {\n\treturn LifterLMS_WooCommerce::instance();\n}", "title": "" }, { "docid": "2cddd40da1d5dd2c741b7dee85317d21", "score": "0.7336902", "text": "function artevenus_add_woocommerce_support() {\n\tadd_theme_support( 'woocommerce' );\n}", "title": "" }, { "docid": "1dcfc11d1667cb37f108d1cfa3594540", "score": "0.7288293", "text": "function wpcoupon_is_wc() {\n return class_exists('WooCommerce');\n}", "title": "" }, { "docid": "db68548f89a89095fcea24a6d2cf8918", "score": "0.7267215", "text": "function objectiv_child_wc_support() {\n add_theme_support( 'woocommerce' );\n}", "title": "" }, { "docid": "57ff4a323ccbdfb1d52940ec6806f771", "score": "0.7160787", "text": "function woocommerce_support() {\n add_theme_support('woocommerce');\n}", "title": "" }, { "docid": "cc3eabe3ca14b1dfce286b79ba69ee35", "score": "0.71596205", "text": "function superfood_elated_is_woocommerce_installed() {\n return function_exists('is_woocommerce');\n }", "title": "" }, { "docid": "66e4b5786ff8ca7d3c48f77c3de8fb46", "score": "0.71596", "text": "public function add_woocommerce_support() {\n\t\tadd_theme_support('woocommerce');\n\t}", "title": "" }, { "docid": "55c2177f9a3add867b0548cf44d2b20f", "score": "0.71511436", "text": "function abitwo_add_woocommerce_support()\n{\n add_theme_support('woocommerce');\n}", "title": "" }, { "docid": "405627c5969072b96aafeb538d2ba761", "score": "0.71407163", "text": "function is_really_woocommerce () {\n if( function_exists ( \"is_woocommerce\" ) && is_woocommerce()){\n return true;\n }\n $woocommerce_keys = array ( \"woocommerce_shop_page_id\" ,\n \"woocommerce_terms_page_id\" ,\n \"woocommerce_cart_page_id\" ,\n \"woocommerce_checkout_page_id\" ,\n \"woocommerce_pay_page_id\" ,\n \"woocommerce_thanks_page_id\" ,\n \"woocommerce_myaccount_page_id\" ,\n \"woocommerce_edit_address_page_id\" ,\n \"woocommerce_view_order_page_id\" ,\n \"woocommerce_change_password_page_id\" ,\n \"woocommerce_logout_page_id\" ,\n \"woocommerce_lost_password_page_id\" ) ;\n foreach ( $woocommerce_keys as $wc_page_id ) {\n if ( get_the_ID () == get_option ( $wc_page_id , 0 ) ) {\n return true ;\n }\n }\n return false;\n}", "title": "" }, { "docid": "1a25c1f26a91973542c7da89c8b0c873", "score": "0.7113825", "text": "function themeSetupWooCommerce()\n {\n add_theme_support('woocommerce');\n //[Commerce] - Make product view customizeable\n// add_theme_support('wc-product-gallery-slider');\n// add_theme_support('wc-product-gallery-lightbox');\n// add_theme_support('wc-product-gallery-zoom');\n /*\n $optionsProductGrid = [\n 'default_rows' => 3,\n 'min_rows' => 2,\n 'max_rows' => 8,\n 'default_columns' => 4,\n 'min_columns' => 2,\n 'max_columns' => 5,\n ];\n $optionsThemeSupport = [\n 'thumbnail_image_width' => 150,\n 'single_image_width' => 300,\n 'product_grid' => $optionsProductGrid\n ];\n add_theme_support( 'woocommerce', $optionsThemeSupport);*/\n }", "title": "" }, { "docid": "55237337d3beaa164d497716bedd2c7a", "score": "0.71043414", "text": "public static function isWooCommerceActive() {\n return class_exists('WooCommerce');\n }", "title": "" }, { "docid": "c47985ff6d04973406079bbf40eb7f56", "score": "0.7073698", "text": "private function is_woocommerce_installed()\n\t\t{\n\t\t\t// Make sure WooCommerce is active.\n return function_exists( 'get_woocommerce_api_url' );\n\t\t}", "title": "" }, { "docid": "4af9d70553c19156124b7cb02a31f98f", "score": "0.70448476", "text": "function checkWooCommerceInstall() {\n\n if ( is_multisite() ) {\n $active_plugins = get_site_option( 'active_sitewide_plugins', array() );\n $active_plugins = array_keys( $active_plugins );\n } else {\n $active_plugins = get_option( 'active_plugins', array() );\n }\n\n $woo_is_active = in_array( 'woocommerce/woocommerce.php', $active_plugins );\n if ( !$woo_is_active ) {\n self::$notices[] = '<div class=\"error\"><p><b>Important: </b>The <strong>Woocommerce Remote Product to Cart</strong> plugin requires the <a href=\"http://wordpress.org/extend/plugins/woocommerce\" target=\"_blank\">Woocommerce</a> plugin to be activated</p></div>';\n }\n\n return $woo_is_active;\n\n }", "title": "" }, { "docid": "4fd178081bff7c2e24b2e5bf4d1c2618", "score": "0.70286846", "text": "public static function sensei_is_woocommerce_present () {\n\t\tif ( class_exists( 'Woocommerce' ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$active_plugins = apply_filters( 'active_plugins', get_option('active_plugins' ) );\n\t\t\tif ( is_array( $active_plugins ) && in_array( 'woocommerce/woocommerce.php', $active_plugins ) ) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t} // End If Statement\n\t\t} // End If Statement\n\t}", "title": "" }, { "docid": "e86ea8c6ce9dd9b8e1803da949de904b", "score": "0.70281696", "text": "function mytheme_add_woocommerce_support() {\n\tadd_theme_support( 'woocommerce' );\n}", "title": "" }, { "docid": "e86ea8c6ce9dd9b8e1803da949de904b", "score": "0.70281696", "text": "function mytheme_add_woocommerce_support() {\n\tadd_theme_support( 'woocommerce' );\n}", "title": "" }, { "docid": "c2adc6e7b2afaa53e37c582b10e56cc1", "score": "0.70276916", "text": "function mkd_burst_is_woocommerce_installed() {\n\t\treturn function_exists('is_woocommerce');\n\t}", "title": "" }, { "docid": "1e0cc81b9105ebe597154cffe8e78f3b", "score": "0.7022284", "text": "function fluid_edge_load_woo_assets() {\n\t\treturn fluid_edge_is_woocommerce_installed() && (fluid_edge_is_woocommerce_page() || fluid_edge_has_woocommerce_shortcode() || fluid_edge_has_woocommerce_widgets());\n\t}", "title": "" }, { "docid": "9376150f7c3bc2147b5f62d6ddee86d7", "score": "0.70140845", "text": "function gencwooc_setup() {\n\n\trequire_once GCW_ADMIN_DIR . '/notices.php';\n\n\t$ready = true;\n\n\tif ( ! function_exists( 'is_plugin_active' ) ) {\n\t\trequire_once ABSPATH . '/wp-admin/includes/plugin.php';\n\t}\n\n\tif ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) {\n\t\tadd_action( 'admin_notices', 'gencwooc_woocommerce_notice' );\n\n\t\t$ready = false;\n\t}\n\n\tif ( ! function_exists( 'genesis' ) ) {\n\t\tif ( ! is_multisite() ) {\n\t\t\tadd_action( 'admin_notices', 'gencwooc_genesis_notice' );\n\t\t}\n\n\t\t$ready = false;\n\t}\n\n\tif ( ! $ready ) {\n\t\treturn;\n\t}\n\n\tglobal $woocommerce;\n\n\trequire_once GCW_LIB_DIR . '/template-loader.php';\n\trequire_once GCW_LIB_DIR . '/posts-per-page.php';\n\trequire_once GCW_LIB_DIR . '/widgets.php';\n\n\tif ( ! current_theme_supports( 'gencwooc-woo-breadcrumbs' ) ) {\n\t\trequire_once GCW_LIB_DIR . '/breadcrumb.php';\n\t}\n\n\tadd_theme_support( 'woocommerce' );\n\n\tadd_post_type_support( 'product', array( 'genesis-layouts', 'genesis-scripts', 'genesis-seo' ) );\n\tadd_post_type_support( 'product', array( 'genesis-simple-sidebars', 'genesis-simple-menus' ) );\n\n\tif ( current_theme_supports( 'gencwooc-featured-products-widget' ) ) {\n\t\trequire_once GCW_WIDGETS_DIR . '/class-gencwooc-featured-products.php';\n\t}\n\n\tremove_filter( 'template_include', array( &$woocommerce, 'template_loader' ) );\n\tadd_filter( 'template_include', 'gencwooc_template_loader', 20 );\n\n\tif ( is_plugin_active( 'genesis-simple-sidebars/plugin.php' ) ) {\n\t\trequire_once GCW_SP_DIR . '/genesis-simple-sidebars.php';\n\t}\n\n\tif ( is_plugin_active( 'genesis-simple-menus/simple-menu.php' ) ) {\n\t\trequire_once GCW_SP_DIR . '/genesis-simple-menus.php';\n\t}\n\n}", "title": "" }, { "docid": "cee2993450282a708821c9a6950a4fd7", "score": "0.70133", "text": "public function woo_register() {\n\n\t //check if woocommerce is activated and styles are loaded\n\t if( class_exists( 'WooCommerce' ) ) {\n\t\t\t$deps = array( 'woocommerce-layout', 'woocommerce-smallscreen', 'woocommerce-general' );\n\t\t\t$this->style( 'theme-shop', $this->get_css_uri('theme-shop.min'), $deps );\n\t\t\twp_enqueue_style( 'rella-sc-button' );\n\t\t\twp_enqueue_style( 'jquery-ui' );\n\t\t\twp_enqueue_style( 'theme-shop' );\n\t\t\twp_enqueue_style( 'magnific-popup' );\n\t\t\twp_enqueue_style( 'flickity' );\n\t }\n\t\tif( class_exists( 'WooCommerce' ) && is_rtl() ) {\n\t\t\t$this->style( 'theme-shop-rtl', $this->get_css_uri('theme-shop-rtl.min'), $deps );\n\t\t\twp_enqueue_style( 'rella-sc-button' );\n\t\t\twp_enqueue_style( 'jquery-ui' );\n\t\t\twp_enqueue_style( 'magnific-popup' );\n\t\t\twp_enqueue_style( 'theme-shop-rtl' );\n\t\t\twp_enqueue_style( 'flickity' );\n\t\t}\n\n }", "title": "" }, { "docid": "fc82ecde9e9ba68e1336eb4e91a322b6", "score": "0.7002037", "text": "function crunchify_disable_woocommerce_loading_css_js() {\n\tif( function_exists( 'is_woocommerce' ) ){\n \n\t\t// Check if it's any of WooCommerce page\n\t\tif(! is_woocommerce() && ! is_cart() && ! is_checkout() ) { \t\t\n\t\t\t\n\t\t\t## Dequeue WooCommerce styles\n\t\t\twp_dequeue_style('woocommerce-layout'); \n\t\t\twp_dequeue_style('woocommerce-general'); \n\t\t\twp_dequeue_style('woocommerce-smallscreen'); \t\n \n\t\t\t## Dequeue WooCommerce scripts\n\t\t\twp_dequeue_script('wc-cart-fragments');\n\t\t\twp_dequeue_script('woocommerce'); \n\t\t\twp_dequeue_script('wc-add-to-cart'); \n\t\t\n\t\t\twp_deregister_script( 'js-cookie' );\n\t\t\twp_dequeue_script( 'js-cookie' );\n \n\t\t}\n\t}\t\n}", "title": "" }, { "docid": "1b3473b4a259e742ae6eb47dba69c2e3", "score": "0.697862", "text": "function realhomes_is_woocommerce_activated() {\n\n\tif ( class_exists( 'woocommerce' ) ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "9e0cf41665477ef459149a931e72d305", "score": "0.6959755", "text": "function c9_add_woocommerce_support() {\n add_theme_support( 'woocommerce' );\n add_theme_support('wc-product-gallery-zoom');\n add_theme_support('wc-product-gallery-lightbox');\n add_theme_support('wc-product-gallery-slider');\n\t}", "title": "" }, { "docid": "21a975d74e3bab39a6326a751d604f01", "score": "0.69532716", "text": "function mytheme_add_woocommerce_support() {\n add_theme_support( 'woocommerce' );\n}", "title": "" }, { "docid": "c12d2bea89c67057ef67c0eeb3df3915", "score": "0.6875405", "text": "function child_manage_woocommerce_styles() {\r\n remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );\r\n //first check that woo exists to prevent fatal errors\r\n if ( function_exists( 'is_woocommerce' ) ) {\r\n //dequeue scripts and styles\r\n if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {\r\n wp_dequeue_script( 'wc_price_slider' );\r\n wp_dequeue_script( 'wc-single-product' );\r\n wp_dequeue_script( 'wc-add-to-cart' );\r\n wp_dequeue_script( 'wc-cart-fragments' );\r\n wp_dequeue_script( 'wc-checkout' );\r\n wp_dequeue_script( 'wc-add-to-cart-variation' );\r\n wp_dequeue_script( 'wc-single-product' );\r\n wp_dequeue_script( 'wc-cart' );\r\n wp_dequeue_script( 'wc-chosen' );\r\n wp_dequeue_script( 'woocommerce' );\r\n \t// wp_dequeue_script( 'prettyPhoto' );\r\n //wp_dequeue_script( 'prettyPhoto-init' );\r\n wp_dequeue_script( 'jquery-blockui' );\r\n wp_dequeue_script( 'jquery-placeholder' );\r\n //wp_dequeue_script( 'fancybox' );\r\n //wp_dequeue_script( 'jqueryui' );\r\n }\r\n }\r\n }", "title": "" }, { "docid": "3eadbb9abb7662abe909f6b1d22c01ee", "score": "0.68721116", "text": "function cv_load_woocommerce_assets() {\n\n // prevent default lightbox from loading\n wp_dequeue_script( 'prettyPhoto' );\n\n // Register compressed WooCommerce jQuery file\n wp_register_script('jquery-theme-woocommerce', THEME_PLUGIN_DIR . 'woocommerce/assets/compressed/jquery.woocommerce.min.js', null, THEME_VER, true );\n\n // Register Primary WooCommerce Stylesheet\n wp_register_style( 'cv-woocommerce', THEME_PLUGIN_DIR . 'woocommerce/assets/woocommerce.css');\n\n // Enqueue all frontend scripts\n wp_enqueue_script('jquery-theme-woocommerce');\n\n // Enque all stylesheets\n wp_enqueue_style( 'cv-woocommerce' );\n\n}", "title": "" }, { "docid": "db45be0288e0150f420f9689e620ed08", "score": "0.68669087", "text": "function mytheme_add_woocommerce_support() {\r\n add_theme_support( 'woocommerce' ); // <<<< here\r\n}", "title": "" }, { "docid": "c199a22f7d51ac4fef39cc00f7ec8c0b", "score": "0.6846202", "text": "public static function woocommerce_active_check() {\r\n\r\n\t\t\tif ( ! self::$active_plugins ) self::init();\r\n\r\n\t\t\treturn in_array( 'woocommerce/woocommerce.php', self::$active_plugins ) || array_key_exists( 'woocommerce/woocommerce.php', self::$active_plugins );\r\n\r\n\t\t}", "title": "" }, { "docid": "5355667e53035d35d5c7dec5e7e2b7b8", "score": "0.6819976", "text": "function mkd_burst_is_woocommerce_page() {\n\t\treturn function_exists('is_woocommerce') && is_woocommerce();\n\t}", "title": "" }, { "docid": "74f96f2f977a10307cffe6bb9b6d66cf", "score": "0.6800016", "text": "public function need_woocommerce() {\n\t\t$error = sprintf( __( 'WooCommerce PDF Invoices & Packing Slips Professional requires %sWooCommerce%s to be installed & activated!' , 'wpo_wcpdf_pro' ), '<a href=\"https://wordpress.org/plugins/woocommerce/\">', '</a>' );\n\n\t\t$message = '<div class=\"error\"><p>' . $error . '</p></div>';\n\t\n\t\techo $message;\n\t}", "title": "" }, { "docid": "a1b69f160f3ed438eb010bd292a24ea9", "score": "0.67568713", "text": "function ld_woocommerce_template_hooks() {\n\t// Display markup before woocommerce\n\tremove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );\n\tadd_action('woocommerce_before_main_content', 'ld_woocommerce_before', 10 );\n\n\t// Display markup after woocommerce\n\tremove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );\n\tadd_action( 'woocommerce_after_main_content', 'ld_woocommerce_after', 10 );\n\n\tif ( is_singular('product') ) {\n\t\t// Disable sidebar on single product pages\n\t\tadd_filter( 'sidebar_enabled', '__return_false' );\n\t\tremove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );\n\t}else{\n\t\t// Move sidebar into custom hook on other pages\n\t\tadd_action( 'ld_woocommerce_sidebar_area', 'woocommerce_get_sidebar', 10 );\n\t\tremove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );\n\t}\n}", "title": "" }, { "docid": "c24777fc574e6c93f998317b6bffa22f", "score": "0.67558306", "text": "static function alert_woo_not_active() {\n \techo '<div id=\"message\" class=\"error\"><p>';\n \techo sprintf( __('Sorry, <strong>%s</strong> requires WooCommerce to be installed and activated first. Please <a href=\"%s\">install WooCommerce</a> first.', PAYOH_TEXT_DOMAIN), PAYOH_NAME, admin_url('plugin-install.php?tab=search&type=term&s=WooCommerce') );\n \techo '</p></div>';\n }", "title": "" }, { "docid": "caf64ca2314fbfb314e5fa60d41186d1", "score": "0.67437375", "text": "public function test_shopp_and_woocommerce_are_active() {\n\t\t$this->assertTrue( is_plugin_active( 'shopp/Shopp.php' ), 'Shopp is not active.' );\n\t\t$this->assertTrue( class_exists( 'WooCommerce' ), 'WooCommerce is not active.' );\n\t}", "title": "" }, { "docid": "5813984b9c5373d31b7cc131f603f66b", "score": "0.6722379", "text": "function fluid_edge_is_woocommerce_shop() {\n\t\treturn function_exists('is_shop') && (is_shop() || is_product());\n\t}", "title": "" }, { "docid": "1604f002038181b70fe01d47aeb05f30", "score": "0.6716499", "text": "function placeholder_woocommerce_support() {\n \n // add woocommmerce support\n add_theme_support( 'woocommerce', array(\n\t\t'thumbnail_image_width' => 150,\n\t\t'single_image_width' => 300,\n\n 'product_grid' => array(\n 'default_rows' => 3,\n 'min_rows' => 2,\n 'max_rows' => 8,\n 'default_columns' => 4,\n 'min_columns' => 2,\n 'max_columns' => 5,\n ),\n ) );\n \n // disable all woocommerce stylesheets\n // add_filter( 'woocommerce_enqueue_styles', '__return_empty_array' );\n\n}", "title": "" }, { "docid": "271078ec52e78a1a571245aa8934e9e4", "score": "0.6674658", "text": "function child_manage_woocommerce_styles() {\n remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );\n\n //first check that woo exists to prevent fatal errors\n if ( function_exists( 'is_woocommerce' ) ) {\n //dequeue scripts and styles\n if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {\n wp_dequeue_style( 'woocommerce_frontend_styles' );\n wp_dequeue_style( 'woocommerce_fancybox_styles' );\n wp_dequeue_style( 'woocommerce_chosen_styles' );\n wp_dequeue_style( 'woocommerce_prettyPhoto_css' );\n wp_dequeue_script( 'wc_price_slider' );\n wp_dequeue_script( 'wc-single-product' );\n wp_dequeue_script( 'wc-add-to-cart' );\n wp_dequeue_script( 'wc-cart-fragments' );\n wp_dequeue_script( 'wc-checkout' );\n wp_dequeue_script( 'wc-add-to-cart-variation' );\n wp_dequeue_script( 'wc-single-product' );\n wp_dequeue_script( 'wc-cart' );\n wp_dequeue_script( 'wc-chosen' );\n wp_dequeue_script( 'woocommerce' );\n wp_dequeue_script( 'prettyPhoto' );\n wp_dequeue_script( 'prettyPhoto-init' );\n wp_dequeue_script( 'jquery-blockui' );\n wp_dequeue_script( 'jquery-placeholder' );\n wp_dequeue_script( 'fancybox' );\n wp_dequeue_script( 'jqueryui' );\n }\n }\n}", "title": "" }, { "docid": "6195460775956f025ed399eccdf12398", "score": "0.6624387", "text": "function enqueueScriptsWooCommerce()\n {\n wp_enqueue_style('fixes', $this->uriToLibs . 'fixes.css', ['woocommerce-general']);\n wp_deregister_script('selectWoo');\n if (is_checkout()) {\n wp_enqueue_script('wc-cart');\n wp_add_inline_script('wc-cart', \"jQuery( document ).on('change select', '.qty', function() {\n jQuery('[name=update_cart]').trigger('click');\n });\");\n }\n }", "title": "" }, { "docid": "93f1c11ba290167b9f1cdd621a257a7c", "score": "0.6611004", "text": "function fluid_edge_is_woocommerce_page() {\n\t\tif (function_exists('is_woocommerce') && is_woocommerce()) {\n\t\t\treturn is_woocommerce();\n\t\t} elseif (function_exists('is_cart') && is_cart()) {\n\t\t\treturn is_cart();\n\t\t} elseif (function_exists('is_checkout') && is_checkout()) {\n\t\t\treturn is_checkout();\n\t\t} elseif (function_exists('is_account_page') && is_account_page()) {\n\t\t\treturn is_account_page();\n\t\t}\n\t}", "title": "" }, { "docid": "b9bf884827c3a831e5d42754519f7303", "score": "0.65975934", "text": "public function init() {\n\n\t\t\t// Remove WooCommerce breadcrumbs\n\t\t\tremove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );\n\n\t\t\t// Alter upsells display\n\t\t\tremove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );\n\t\t\tif ( '0' != get_theme_mod( 'ocean_woocommerce_upsells_count', '3' ) ) {\n\t\t\t\tadd_action( 'woocommerce_after_single_product_summary', array( $this, 'upsell_display' ), 15 );\n\t\t\t}\n\n\t\t\t// Alter cross-sells display\n\t\t\tremove_action( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' );\n\t\t\tif ( '0' != get_theme_mod( 'ocean_woocommerce_cross_sells_count', '2' ) ) {\n\t\t\t\tadd_action( 'woocommerce_cart_collaterals', array( $this, 'cross_sell_display' ) );\n\t\t\t}\n\n\t\t\t// Add product thumbnail\n\t\t\tif ( 'hover' != get_theme_mod( 'ocean_woo_products_style', 'default' ) ) {\n\t\t\t\tadd_action( 'woocommerce_before_shop_loop_item_title', array( $this, 'loop_product_thumbnail' ), 10 );\n\t\t\t}\n\n\t\t\t// Remove related products if is set to no\n\t\t\tif ( 'on' != get_theme_mod( 'ocean_woocommerce_display_related_items', 'on' ) ) {\n\t\t\t\tremove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );\n\t\t\t}\n\n\t\t\t// Remove orderby if disabled\n\t\t\tif ( ! get_theme_mod( 'ocean_woo_shop_sort', true ) ) {\n\t\t\t\tremove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );\n\t\t\t}\n\n\t\t\t// Add result count if not disabled\n\t\t\tif ( get_theme_mod( 'ocean_woo_shop_result_count', true ) ) {\n\t\t\t\tadd_action( 'woocommerce_before_shop_loop', array( $this, 'result_count' ), 31 );\n\t\t\t}\n\n\t\t\tif ( defined( 'ELEMENTOR_WOOSTORE__FILE__' ) ) {\n\t\t\t\tremove_action( 'woocommerce_after_shop_loop_item_title', 'woostore_output_product_excerpt', 35 );\n\t\t\t\tadd_action( 'woocommerce_after_shop_loop_item', 'woostore_output_product_excerpt', 21 );\n\t\t\t}\n\n\t\t\tif ( ! function_exists( 'yith_wcbm_shop_badge_container_start' )\n\t\t\t\t&& ! function_exists( 'yith_wcbm_shop_badge_container_end' ) ) {\n\t\t\t\tadd_action( 'woocommerce_before_shop_loop_item_title', array( $this, 'yith_wcbm_shop_badge_container_start' ), 9 );\n\t\t\t\tadd_action( 'woocommerce_before_shop_loop_item_title', array( $this, 'yith_wcbm_shop_badge_container_end' ), 20 );\n\t\t\t}\n\n\t\t\tif ( class_exists( 'WooCommerce_Germanized' ) ) {\n\t\t\t\tremove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_gzd_template_single_shipping_costs_info', 7 );\n\t\t\t\tremove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_gzd_template_single_tax_info', 6 );\n\t\t\t\tremove_action( 'woocommerce_single_product_summary', 'woocommerce_gzd_template_single_legal_info', 12 );\n\t\t\t\tadd_action( 'ocean_after_archive_product_inner', array( $this, 'woocommerce_germanized' ) );\n\t\t\t\tadd_action( 'ocean_after_single_product_price', 'woocommerce_gzd_template_single_legal_info' );\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "235e85e7719caeef488a35df4983b67a", "score": "0.65501404", "text": "function nanosoft_woocommerce_supports() {\n\tadd_theme_support( 'wc-product-gallery-zoom' );\n add_theme_support( 'wc-product-gallery-lightbox' );\n add_theme_support( 'wc-product-gallery-slider' );\n}", "title": "" }, { "docid": "88756e57719260340f2a76e356b85ed6", "score": "0.64797735", "text": "function mkd_burst_is_woocommerce_shop() {\n\t\treturn function_exists('is_shop') && is_shop();\n\t}", "title": "" }, { "docid": "b6f2bfc3d7cad00d8f2672320a103d18", "score": "0.64791274", "text": "public static function add_custom_scripts() {\n\n\t\t\t// Register WooCommerce styles\n\t\t\twp_enqueue_style( 'oceanwp-woocommerce', OCEANWP_CSS_DIR_URI .'woo/woocommerce.min.css' );\n\t\t\twp_enqueue_style( 'oceanwp-woo-star-font', OCEANWP_CSS_DIR_URI .'woo/woo-star-font.min.css' );\n\n\t\t\t// If rtl\n\t\t\tif ( is_RTL() ) {\n\t\t\t\twp_enqueue_style( 'oceanwp-woocommerce-rtl', OCEANWP_CSS_DIR_URI .'woo/woocommerce-rtl.css' );\n\t\t\t}\n\n\t\t\t// If products hover style\n\t\t\tif ( 'hover' == get_theme_mod( 'ocean_woo_products_style', 'default' ) ) {\n\t\t\t\twp_enqueue_style( 'oceanwp-woo-hover-style', OCEANWP_CSS_DIR_URI .'woo/hover-style.min.css' );\n\t\t\t\twp_enqueue_script( 'oceanwp-woo-hover-style', OCEANWP_JS_DIR_URI .'third/woo/woo-hover-style.min.js', array( 'jquery' ), OCEANWP_THEME_VERSION, true );\n\t\t\t}\n\n\t\t\t// If dropdown category widget style\n\t\t\tif ( 'dropdown' == get_theme_mod( 'ocean_woo_cat_widget_style', 'default' ) ) {\n\t\t\t\twp_enqueue_script( 'oceanwp-woo-cat-widget', OCEANWP_JS_DIR_URI .'third/woo/woo-cat-widget.min.js', array( 'jquery' ), OCEANWP_THEME_VERSION, true );\n\t\t\t}\n\n\t\t\t// If vertical thumbnails style\n\t\t\tif ( 'vertical' == get_theme_mod( 'ocean_woo_product_thumbs_layout', 'horizontal' ) ) {\n\t\t\t\twp_enqueue_script( 'oceanwp-woo-thumbnails', OCEANWP_JS_DIR_URI .'third/woo/woo-thumbnails.min.js', array( 'jquery' ), OCEANWP_THEME_VERSION, true );\n\t\t\t}\n\n\t\t\t// If quick view\n\t\t\tif ( get_theme_mod( 'ocean_woo_quick_view', true ) ) {\n\t\t\t\twp_enqueue_script( 'oceanwp-woo-quick-view', OCEANWP_JS_DIR_URI .'third/woo/woo-quick-view.min.js', array( 'jquery' ), OCEANWP_THEME_VERSION, true );\n\t\t\t\twp_enqueue_style( 'oceanwp-woo-quick-view', OCEANWP_CSS_DIR_URI .'woo/woo-quick-view.min.css' );\n\t\t\t\twp_enqueue_script( 'wc-add-to-cart-variation' );\n\t\t\t\twp_enqueue_script( 'flexslider' );\n\t\t\t}\n\n\t\t\t// If whislist\n\t\t\tif ( class_exists( 'TInvWL_Wishlist' ) ) {\n\t\t\t\twp_enqueue_style( 'oceanwp-wishlist', OCEANWP_CSS_DIR_URI .'woo/wishlist.min.css' );\n\t\t\t}\n\n\t\t\t// If single product ajax add to cart\n\t\t\tif ( true == get_theme_mod( 'ocean_woo_product_ajax_add_to_cart', false )\n\t\t\t\t&& oceanwp_is_woo_single() ) {\n\t\t\t\twp_enqueue_script( 'oceanwp-woo-ajax-addtocart', OCEANWP_JS_DIR_URI .'third/woo/woo-ajax-add-to-cart.min.js', array( 'jquery' ), OCEANWP_THEME_VERSION, true );\n\t\t\t}\n\n\t\t\t// If floating bar\n\t\t\tif ( 'on' == get_theme_mod( 'ocean_woo_display_floating_bar', 'on' )\n\t\t\t\t&& oceanwp_is_woo_single() ) {\n\t\t\t\twp_enqueue_style( 'oceanwp-woo-floating-bar', OCEANWP_CSS_DIR_URI .'woo/woo-floating-bar.min.css' );\n\t\t\t\twp_enqueue_script( 'oceanwp-woo-floating-bar', OCEANWP_JS_DIR_URI .'third/woo/woo-floating-bar.min.js', array( 'jquery' ), OCEANWP_THEME_VERSION, true );\n\t\t\t}\n\n\t\t\t// If display cart when product added\n\t\t\tif ( 'yes' == get_theme_mod( 'ocean_woo_display_cart_product_added', 'no' ) ) {\n\t\t\t\twp_enqueue_script( 'oceanwp-woo-display-cart', OCEANWP_JS_DIR_URI .'third/woo/woo-display-cart.min.js', array( 'jquery' ), OCEANWP_THEME_VERSION, true );\n\t\t\t}\n\n\t\t\t// If off canvas filter\n\t\t\tif ( true == get_theme_mod( 'ocean_woo_off_canvas_filter', false )\n\t\t\t\t&& ( oceanwp_is_woo_shop()\n\t\t\t\t\t|| oceanwp_is_woo_tax() ) ) {\n\t\t\t\twp_enqueue_script( 'oceanwp-woo-off-canvas', OCEANWP_JS_DIR_URI .'third/woo/woo-off-canvas.min.js', array( 'jquery' ), OCEANWP_THEME_VERSION, true );\n\t\t\t}\n\n\t\t\t// If mobile menu mini cart\n\t\t\tif ( get_theme_mod( 'ocean_woo_add_mobile_mini_cart', true ) ) {\n\t\t\t\twp_enqueue_script( 'oceanwp-woo-mini-cart', OCEANWP_JS_DIR_URI .'third/woo/woo-mini-cart.min.js', array( 'jquery' ), OCEANWP_THEME_VERSION, true );\n\t\t\t}\n\n\t\t\t// If multi step checkout\n\t\t\tif ( true == get_theme_mod( 'ocean_woo_multi_step_checkout', false )\n\t\t\t\t&& is_checkout() ) {\n\t\t\t\twp_enqueue_style( 'oceanwp-woo-multistep-checkout', OCEANWP_CSS_DIR_URI .'woo/woo-multistep-checkout.min.css' );\n\n\t $woo_deps = array( 'jquery', 'wc-checkout', 'wc-country-select' );\n\n\t if ( class_exists( 'WC_Ship_Multiple' ) ){\n\t $woo_deps[] = 'wcms-country-select';\n\t }\n\n\t\t\t\twp_enqueue_script( 'oceanwp-woo-multistep-checkout', OCEANWP_JS_DIR_URI .'third/woo/woo-multistep-checkout.min.js', $woo_deps, OCEANWP_THEME_VERSION, true );\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "000226480296d18fd5eb99106d48c6b2", "score": "0.64723265", "text": "function woo_scripts() {\n //if ( 'product' !== get_post_type() && !is_page( 'cart' ) && !is_page( 'checkout' ) ) {\n wp_dequeue_script( 'prettyPhoto' );\n wp_dequeue_script( 'prettyPhoto-init' );\n wp_dequeue_style( 'woocommerce_prettyPhoto_css' );\n //}\n global $woocommerce;\n if ( $woocommerce ) {\n if ( is_product() ) {\n wp_enqueue_script( 'jquery.fancybox.pack' );\n }\n }\n }", "title": "" }, { "docid": "4ce74e740f2533d7882766c7f02979af", "score": "0.64696974", "text": "function wooslide_scripts_method() {\n\n\t$wooslide_wp_plugin_path = plugins_url() . '/wooslide' ;\n\t$options = get_option('wooslide_options');\n\n\tif ( class_exists( 'WooCommerce' ) && is_product() ) {\n\t\twp_enqueue_style( 'pswp-css', $wooslide_wp_plugin_path . '/pswp/photoswipe.css' );\n\n\t if($options['white_theme']) wp_enqueue_style( 'white_theme', $wooslide_wp_plugin_path . '/pswp/white-skin/skin.css' );\n\t else wp_enqueue_style( 'pswp-skin', $wooslide_wp_plugin_path . '/pswp/default-skin/default-skin.css' );\n\t wp_enqueue_style( 'swiper-css', $wooslide_wp_plugin_path . '/swiper-4.1.6/css/swiper.min.css' );\n\n\t wp_enqueue_script( 'pswp', $wooslide_wp_plugin_path . '/pswp/photoswipe.min.js', null, null, true );\n\t wp_enqueue_script( 'pswp-ui', $wooslide_wp_plugin_path . '/pswp/photoswipe-ui-default.min.js', null, null, true );\n\n\t\t\twp_enqueue_script( 'swiper-js', $wooslide_wp_plugin_path .'/swiper-4.1.6/js/swiper.min.js', null, null, true );\n\n\t\t\twp_enqueue_style( 'wooslide-css', $wooslide_wp_plugin_path . '/wooslide.css' );\n\t wp_enqueue_script( 'wooslide-js', $wooslide_wp_plugin_path .'/wooslide.js', null, null, true );\n\t}\n}", "title": "" }, { "docid": "33071b834782fd464ff4481af51a8b37", "score": "0.64696217", "text": "function iver_select_is_woocommerce_shop() {\n\t\treturn function_exists( 'is_shop' ) && ( is_shop() || is_product() );\n\t}", "title": "" }, { "docid": "1ec4004088cb75a2c56648132d7b09c3", "score": "0.6465406", "text": "function wapci_need_deps(){\n\t?>\n <div class=\"updated\">\n <p><?php _e('Please activate Woocommerce plugins', 'wapci'); ?></p>\n </div>\n <?php\n}", "title": "" }, { "docid": "194e67b891a8d4d8720b7324a6478abe", "score": "0.6452058", "text": "public function check_required_plugins() {\n if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) { ?>\n \t<div id=\"message\" class=\"error\">\n \t<p>WooCommerce Deal Of The Day requires <a href=\"http://www.woothemes.com/woocommerce/\" target=\"_blank\">WooCommerce</a> to be activated in order to work. Please install and activate <a href=\"<?php echo admin_url('/plugin-install.php?tab=search&amp;type=term&amp;s=WooCommerce'); ?>\" target=\"\">WooCommerce</a> first.</p>\n </div>\n\n <?php deactivate_plugins( '/prices-deal-of-the-day/prices-deal-of-the-day.php' );\n }\n\t}", "title": "" }, { "docid": "ccd067b1b7189252b693b80b4166784f", "score": "0.645056", "text": "function aa_wc_woocommerce_template_hooks() {\n\t// Add underline to single product titles\n\tremove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );\n\tadd_action('woocommerce_single_product_summary', 'aa_single_product_title', 5 );\n\t\n\t// Display markup before woocommerce\n\tremove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );\n\tadd_action('woocommerce_before_main_content', 'aa_wc_woocommerce_before', 10 );\n\t\n\t// Display markup after woocommerce\n\tremove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );\n\tadd_action( 'woocommerce_after_main_content', 'aa_wc_woocommerce_after', 10 );\n\t\n\tif ( is_singular('product') ) {\n\t\t// Disable sidebar on single product pages\n\t\tadd_filter( 'sidebar_enabled', '__return_false' );\n\t\tremove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );\n\t}else{\n\t\t// Move sidebar into custom hook on other pages\n\t\tadd_action( 'aa_wc_woocommerce_sidebar_area', 'woocommerce_get_sidebar', 10 );\n\t\tremove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );\n\t}\n}", "title": "" }, { "docid": "495889c60b5afc28729522b7c2912f07", "score": "0.64444", "text": "function iver_select_is_woocommerce_page() {\n\t\tif ( function_exists( 'is_woocommerce' ) && is_woocommerce() ) {\n\t\t\treturn is_woocommerce();\n\t\t} elseif ( function_exists( 'is_cart' ) && is_cart() ) {\n\t\t\treturn is_cart();\n\t\t} elseif ( function_exists( 'is_checkout' ) && is_checkout() ) {\n\t\t\treturn is_checkout();\n\t\t} elseif ( function_exists( 'is_account_page' ) && is_account_page() ) {\n\t\t\treturn is_account_page();\n\t\t}\n\t}", "title": "" }, { "docid": "e1e4b36b854c360feab16ac1f447a789", "score": "0.6432036", "text": "private function check_requirements() {\n \t//global $wp_version, $woocommerce;\n \n \trequire_once(ABSPATH.'/wp-admin/includes/plugin.php');\n \n \t//@TODO version compare\n \n \tif( function_exists( 'is_plugin_active' ) ) {\n \t\tif ( !is_plugin_active( 'woocommerce/woocommerce.php' ) ) {\n \t\t\tadd_action('admin_notices', array( &$this, 'alert_woo_not_active' ) );\n \t\t\treturn false;\n \t\t}\n \t}\n \n \treturn true;\n }", "title": "" }, { "docid": "06cd5c03b064f254dea61deec72dc753", "score": "0.6409501", "text": "function aa_wc_woocommerce_before() {\n\t\n\tif ( !is_cart() && !is_checkout() && !is_singular('product') ) {\n\t\tget_template_part( '_template-parts/hero-section', 'shop' );\n\t}\n\t\n\t?>\n\t<div class=\"container\">\n\t\t<article>\n\t<?php\n}", "title": "" }, { "docid": "ecf767ba2185aa5caf9981d19c219bfa", "score": "0.63860095", "text": "function thim_manage_woocommerce_styles()\n {\n remove_action('wp_head', array($GLOBALS['woocommerce'], 'generator'));\n\n //first check that woo exists to prevent fatal errors\n if (function_exists('is_woocommerce')) {\n //dequeue scripts and styles\n if (!is_woocommerce() && !is_cart() && !is_checkout()) {\n wp_dequeue_style('woocommerce_frontend_styles');\n wp_dequeue_style('woocommerce_fancybox_styles');\n wp_dequeue_style('woocommerce_chosen_styles');\n wp_dequeue_style('woocommerce_prettyPhoto_css');\n wp_dequeue_style('woocommerce-layout');\n wp_dequeue_style('woocommerce-general');\n wp_dequeue_script('wc_price_slider');\n wp_dequeue_script('wc-single-product');\n //wp_dequeue_script( 'wc-add-to-cart' );\n //wp_dequeue_script( 'wc-cart-fragments' );\n wp_dequeue_script('wc-checkout');\n //wp_dequeue_script( 'wc-add-to-cart-variation' );\n wp_dequeue_script('wc-single-product');\n //wp_dequeue_script( 'wc-cart' );\n wp_dequeue_script('wc-chosen');\n wp_dequeue_script('woocommerce');\n }\n }\n }", "title": "" }, { "docid": "b68e8d8a50f520bdbc5e75694c92ea07", "score": "0.63846236", "text": "function is_woocommerce_page () {\n if( function_exists ( \"is_woocommerce\" ) && is_woocommerce()){\n return true;\n }\n $woocommerce_keys = array ( \"woocommerce_shop_page_id\" ,\n \"woocommerce_terms_page_id\" ,\n \"woocommerce_cart_page_id\" ,\n \"woocommerce_checkout_page_id\" ,\n \"woocommerce_pay_page_id\" ,\n \"woocommerce_thanks_page_id\" ,\n \"woocommerce_myaccount_page_id\" ,\n \"woocommerce_edit_address_page_id\" ,\n \"woocommerce_view_order_page_id\" ,\n \"woocommerce_change_password_page_id\" ,\n \"woocommerce_logout_page_id\" ,\n \"woocommerce_lost_password_page_id\" ) ;\n foreach ( $woocommerce_keys as $wc_page_id ) {\n if ( get_the_ID () == get_option ( $wc_page_id , 0 ) ) {\n return true ;\n }\n }\n return false;\n}", "title": "" }, { "docid": "d8016399423b0d4f2448957110283097", "score": "0.6372351", "text": "function iver_select_load_woo_assets() {\n\t\treturn iver_select_is_woocommerce_installed() && ( iver_select_is_woocommerce_page() || iver_select_has_woocommerce_shortcode() || iver_select_has_woocommerce_widgets() );\n\t}", "title": "" }, { "docid": "38c44e6b55aaa19cbad25d538054f216", "score": "0.6331566", "text": "function pf_grd_woocommerce_script_cleaner() {\n if (function_exists('is_woocommerce')) {\n if ( !is_woocommerce() && !is_page('store') && !is_shop() && !is_product_category() && !is_product() && !is_cart() && !is_checkout() && !is_product_tag() && !is_product_taxonomy() && !is_view_order_page() ) {\n wp_dequeue_style( 'select2' );\n wp_dequeue_script( 'select2' );\n }\n }\n}", "title": "" }, { "docid": "0a0a00c895012403abcef413a4f70a5a", "score": "0.6316831", "text": "public function is_plugin_woocommerce_active() {\r\n\t\treturn cpac_is_woocommerce_active();\r\n\t}", "title": "" }, { "docid": "d2eeeae48dbeebd9b1b0de72748c0c32", "score": "0.6284259", "text": "function woocommerce_cointopay_init( )\n {\n if ( class_exists( 'WC_Payment_Gateway' ) === false ) {\n return;\n } //class_exists( 'WC_Payment_Gateway' ) === false\n \n }", "title": "" }, { "docid": "badf47d68c2665a9de3436e6a3e5a99b", "score": "0.6208855", "text": "public static function init() {\n\n\t\t// Register our custom subscription order type after WC_Post_types::register_post_types()\n\t\tadd_action( 'init', __CLASS__ . '::register_order_types', 6 );\n\n\t\tadd_filter( 'woocommerce_data_stores', __CLASS__ . '::add_data_stores', 10, 1 );\n\n\t\t// Register our custom subscription order statuses before WC_Post_types::register_post_status()\n\t\tadd_action( 'init', __CLASS__ . '::register_post_status', 9 );\n\n\t\tadd_action( 'init', __CLASS__ . '::maybe_activate_woocommerce_subscriptions' );\n\n\t\tregister_deactivation_hook( __FILE__, __CLASS__ . '::deactivate_woocommerce_subscriptions' );\n\n\t\t// Override the WC default \"Add to Cart\" text to \"Sign Up Now\" (in various places/templates)\n\t\tadd_filter( 'woocommerce_order_button_text', __CLASS__ . '::order_button_text' );\n\t\tadd_action( 'woocommerce_subscription_add_to_cart', __CLASS__ . '::subscription_add_to_cart', 30 );\n\t\tadd_action( 'woocommerce_variable-subscription_add_to_cart', __CLASS__ . '::variable_subscription_add_to_cart', 30 );\n\t\tadd_action( 'wcopc_subscription_add_to_cart', __CLASS__ . '::wcopc_subscription_add_to_cart' ); // One Page Checkout compatibility\n\n\t\t// Ensure a subscription is never in the cart with products\n\t\tadd_filter( 'woocommerce_add_to_cart_validation', __CLASS__ . '::maybe_empty_cart', 10, 5 );\n\n\t\t// Enqueue front-end styles, run after Storefront because it sets the styles to be empty\n\t\tadd_filter( 'woocommerce_enqueue_styles', __CLASS__ . '::enqueue_styles', 100, 1 );\n\n\t\t// Load translation files\n\t\tadd_action( 'init', __CLASS__ . '::load_plugin_textdomain', 3 );\n\n\t\t// Load dependent files\n\t\tadd_action( 'plugins_loaded', __CLASS__ . '::load_dependant_classes' );\n\n\t\t// Attach hooks which depend on WooCommerce constants\n\t\tadd_action( 'plugins_loaded', __CLASS__ . '::attach_dependant_hooks' );\n\n\t\t// Staging site or site migration notice\n\t\tadd_action( 'admin_notices', __CLASS__ . '::woocommerce_site_change_notice' );\n\n\t\t// Add the \"Settings | Documentation\" links on the Plugins administration screen\n\t\tadd_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), __CLASS__ . '::action_links' );\n\n\t\tadd_filter( 'action_scheduler_queue_runner_batch_size', __CLASS__ . '::action_scheduler_multisite_batch_size' );\n\n\t\tadd_action( 'in_plugin_update_message-' . plugin_basename( __FILE__ ), __CLASS__ . '::update_notice', 10, 2 );\n\n\t\tself::$cache = WCS_Cache_Manager::get_instance();\n\n\t\t$scheduler_class = apply_filters( 'woocommerce_subscriptions_scheduler', 'WCS_Action_Scheduler' );\n\n\t\tself::$scheduler = new $scheduler_class();\n\t}", "title": "" }, { "docid": "93ab7e3081a04bb707839eca8425ac62", "score": "0.619166", "text": "private static function check_requirements() {\n\t\tglobal $wp_version;\n\t\trequire_once( ABSPATH . '/wp-admin/includes/plugin.php' ) ;\n\t\t\n\t\t$errors = array();\n\t\t\n\t\tif ( version_compare( PHP_VERSION, WC_WALLEE_REQUIRED_PHP_VERSION, '<' ) ) {\n\t\t\t$errors[] = sprintf(__(\"PHP %s+ is required. (You're running version %s)\", \"woocommerce-wallee\"), WC_WALLEE_REQUIRED_PHP_VERSION, PHP_VERSION);\n\t\t}\n\t\tif ( version_compare( $wp_version, WC_WALLEE_REQUIRED_WP_VERSION, '<' ) ) {\n\t\t\t$errors[] = sprintf(__(\"Wordpress %s+ is required. (You're running version %s)\", \"woocommerce-wallee\"), WC_WALLEE_REQUIRED_WP_VERSION, $wp_version);\n\t\t\t\n\t\t}\n\t\t\n\t\tif (!is_plugin_active('woocommerce/woocommerce.php')){\n\t\t\t$errors[] = sprintf(__(\"Woocommerce %s+ has to be active.\", \"woocommerce-wallee\"), WC_WALLEE_REQUIRED_WC_VERSION);\n\t\t}\n\t\telse{\n\t\t\t$woocommerce_data = get_plugin_data(WP_PLUGIN_DIR .'/woocommerce/woocommerce.php', false, false);\n\t\t\t\n\t\t\tif (version_compare ($woocommerce_data['Version'] , WC_WALLEE_REQUIRED_WC_VERSION, '<')){\n\t\t\t\t$errors[] = sprintf(__(\"Woocommerce %s+ is required. (You're running version %s)\", \"woocommerce-wallee\"), WC_WALLEE_REQUIRED_WC_VERSION, $woocommerce_data['Version']);\n\t\t\t}\n\t\t}\n\t\t\n\t\ttry{\n\t\t\t\\Wallee\\Sdk\\Http\\HttpClientFactory::getClient();\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\t$errors[] = __(\"Install the PHP cUrl extension or ensure the 'stream_socket_client' function is available.\");\n\t\t}\n\t\t\n\t\tif(!empty($errors)){\n\t\t\t$title = __('Could not activate plugin WooCommerce Wallee', 'woocommerce-wallee');\n\t\t\t$message = '<h1><strong>'.$title.'</strong></h1><br/>'.\n\t\t\t\t\t'<h3>'.__('Please check the following requirements before activating:', 'woocommerce-wallee').'</h3>'.\n\t\t\t\t\t'<ul><li>'.\n\t\t\t\t\timplode('</li><li>', $errors).\n\t\t\t\t\t'</li></ul>';\n\t\t\t\t\t\n\t\t\t \n\t\t\twp_die($message, $title, array('back_link' => true));\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "a0033f30b1e812996b6d95c450878c61", "score": "0.61740375", "text": "static function display_req_woo_not_active_notice() {\n\t\techo '<div id=\"message\" class=\"error\"><p>';\n\t\techo sprintf( __('Sorry, <strong>%s</strong> requires WooCommerce to be installed and activatd first. Please <a href=\"%s\">install WooCommerce</a> first.', self::text_domain), WC_DIGITAL_DETAILS, admin_url('plugin-install.php?tab=search&type=term&s=WooCommerce') );\n\t\techo '</p></div>';\n\t}", "title": "" }, { "docid": "ee9237103bcde1db99e119ad8358ce53", "score": "0.61652344", "text": "function wps_woo_modified_parts() {\n\t// Shop page redirect\n\tadd_action( 'template_redirect', 'wps_woo_custom_shop_page_redirect' );\n\n\t/* ========================\n\t * === SINGLE PRODUCT ===\n\t=========================*/\n\t// Set Default Length\n\tadd_filter( 'woocommerce_product_get_length', 'wps_woo_product_default_length' );\n\tadd_filter( 'woocommerce_product_variation_get_length', 'wps_woo_product_default_length' );\n\n\t// Set Default Width\n\tadd_filter( 'woocommerce_product_get_width', 'wps_woo_product_default_width' );\n\tadd_filter( 'woocommerce_product_variation_get_width', 'wps_woo_product_default_width' );\n\n\t// Set Default Height\n\tadd_filter( 'woocommerce_product_get_height', 'wps_woo_product_default_height' );\n\tadd_filter( 'woocommerce_product_variation_get_height', 'wps_woo_product_default_height' );\n\n\t// START Wrap Content in Container\n\tadd_action( 'woocommerce_before_main_content', 'wps_woo_content_wrap_start' );\n\n\t// Display SKU under Title\n\tadd_action( 'woocommerce_single_product_summary', 'wps_woo_move_sku', 5 );\n\n\t// Display Custom Breadcrumbs\n\tadd_action( 'woocommerce_before_main_content', 'wps_woo_custom_breadcrumbs', 20, 0 );\n\n\t// Move Main Content to Product Short summary\n\tadd_action( 'woocommerce_single_product_summary', 'wps_woo_product_main_content', 20 );\n\n\t// Change name of Dropdown labels\n\tadd_filter( 'woocommerce_dropdown_variation_attribute_options_args', 'wps_woo_filter_dropdown_args', 10 );\n\n\t// END Wrap Content in Container\n\tadd_action( 'woocommerce_after_main_content', 'wps_woo_content_wrap_end' );\n\n\t// Rename 'Related Products' Title\n\tadd_filter( 'gettext', 'wps_woo_rename_related_products_title' );\n\tadd_filter( 'ngettext', 'wps_woo_rename_related_products_title' );\n\n\t/* ========================\n\t * === CART ===\n\t=========================*/\n\t// Remove attributes from product title\n\tadd_filter( 'woocommerce_product_variation_title_include_attributes', 'wps_woo_remove_attributes_in_title' );\n\t// Change \"Return to Shop\" link to homepage\n\tadd_filter( 'woocommerce_return_to_shop_redirect', 'wps_woo_empty_cart_redirect_url' );\n\t// Remove ability to change quantity, only display number\n\tadd_filter( 'woocommerce_cart_item_quantity', 'wps_woo_cart_item_quantity', 10, 3 );\n\t// Remove Update Cart button\n\tadd_action( 'wp_head', 'wps_woo_hide_update_cart_button', 99 );\n\n\t/* ========================\n\t * === CHECKOUT ===\n\t=========================*/\n\t// Add Login Form to Checkout\n\tadd_action( 'woocommerce_before_checkout_billing_form', 'woocommerce_checkout_login_form' );\n\n}", "title": "" }, { "docid": "610ad69b60b1dee3a0d69d1e516c4994", "score": "0.61222905", "text": "public function check_required_plugins(){\n\n\t\t// just left to show you how to do it\n\t\tif( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ){ ?>\n\n\t\t\t<div id=\"message\" class=\"error\">\n\t\t\t\t<p>Automatic Product Purchase expects WooCommerce to be active. This plugin has been deactivated.</p>\n\t\t\t</div>\n\n\t\t\t<?php\n\t\t\tdeactivate_plugins( '/auto-product-purchase/auto-product-purchase.php' );\n\t\t} // compmany team if\n\n\t}", "title": "" }, { "docid": "2f84c676d868d12e805ae62e425c0228", "score": "0.6121767", "text": "public function cws_getWooMiniCart() {\n\t\tob_start();\n\t\tif ( class_exists( 'woocommerce' ) ) {\twoocommerce_mini_cart(); }\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "135fd0beead818b3275a9f14d935d4ce", "score": "0.61164635", "text": "public function __construct() {\n\t\tif ( ! kalium()->is->woocommerce_active() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Include files\n\t\t$this->include_files();\n\n\t\t// Hooks\n\t\tadd_action( 'after_setup_theme', [ $this, '_after_setup_theme' ] );\n\t}", "title": "" }, { "docid": "f9b3c1a545b42979c70f2ce15fa995d5", "score": "0.6091904", "text": "function woocommerce_theme_wc_modify()\n{\n\n \n /*******************archive-product.php***************************/\n /*******************archive-product.php***************************/\n add_action( 'woocommerce_before_main_content', 'woocommerce_theme_open_container_row', 5 );\n\n function woocommerce_theme_open_container_row()\n {\n\n ?>\n\n <div class=\"container shop-content\">\n <div class=\"row\">\n\n\n <?php\n\n\n }//end function\n\n\n\n\n\n\n\n\n add_action( 'woocommerce_after_main_content', 'woocommerce_theme_close_container_row', 5 );\n\n\n function woocommerce_theme_close_container_row()\n {\n\n ?>\n \n </div><!--row-->\n </div><!--container-->\n\n <?php\n\n\n }//end function\n\n\n\n if( is_shop() )\n {\n\n\n add_action('woocommerce_before_main_content','woocommerce_theme_add_sidebar_tags', 6 );\n\n function woocommerce_theme_add_sidebar_tags()\n {\n\n ?>\n\n <div class=\"sidebar-shop col-lg-3 col-md-4 order-2 order-md-1\">\n \n <?php\n\n\n }//end function\n\n\n add_action( 'woocommerce_before_main_content', 'woocommerce_get_sidebar', 7 );\n\n\n add_action('woocommerce_before_main_content','woocommerce_theme_close_sidebar_tags', 8 );\n\n function woocommerce_theme_close_sidebar_tags()\n {\n\n ?>\n\n </div><!--sidebar-shop-->\n \n <?php\n\n\n }//end function\n\n\n //Descrição curta do produto\n add_action('woocommerce_after_shop_loop_item_title','the_excerpt', 1 );\n\n }//end if\n\n\n\n\n \n\n\n\n\n add_action('woocommerce_before_main_content','woocommerce_theme_add_shop_tags', 9 );\n\n function woocommerce_theme_add_shop_tags()\n {\n\n if( is_shop() )\n {\n\n ?>\n\n <div class=\"col-lg-9 col-md-8 order-1 order-md-2\">\n \n <?php\n\n\n }//end if\n else\n {\n\n ?>\n\n <div class=\"col\">\n \n <?php\n\n }//ene else\n\n\n }//end function\n\n\n\n add_action('woocommerce_after_main_content','woocommerce_theme_close_shop_tags', 4 );\n\n function woocommerce_theme_close_shop_tags()\n {\n \n\n\n if( is_shop() )\n {\n\n ?>\n\n </div>\n \n <?php\n\n\n }//end if\n else\n {\n\n ?>\n\n </div>\n \n <?php\n\n }//ene else\n\n\n\n\n }//end function\n\n\n\n\n\n\n\n remove_action('woocommerce_sidebar','woocommerce_get_sidebar');\n \n /*******************archive-product.php***************************/\n /*******************archive-product.php***************************/\n\n\n\n\n\n\n\n /*\n add_filter('woocommerce_show_page_title','woocommerce_theme_remove_shop_title');\n\n function woocommerce_theme_remove_shop_title()\n {\n return false;\n\n }//end function\n\n\n //OUTRA FORMA DE FAZER O FILTRO\n function woocommerce_theme_remove_shop_title($val)\n {\n $val = false;\n return $val;\n\n }//end function\n\n */\n\n\n\n\n \n\n\n}", "title": "" }, { "docid": "c383d4e8f0ba1abc4cd4e126dca381d2", "score": "0.6088665", "text": "public function is_woocommerce_hf() {\n\n return $this->woocommerce_hf;\n }", "title": "" }, { "docid": "a7f5e9c29ae5a98343fa9bb191fc3c5f", "score": "0.6083099", "text": "function cpt_advanced_nav_scripts()\n{\n if (!function_exists('is_product') or !is_product())\n wp_enqueue_script('pageloader', get_bloginfo('stylesheet_directory') . '/js/ajax_layered_nav.js', array('jquery'), '1.2.231', true);\n\n\n $html_containers = array(\n '#product_list',\n '.products',\n '#pagination-wrapper',\n '.woocommerce-pagination',\n '.woo-pagination',\n '.pagination',\n '.widget_layered_nav',\n '.widget_layered_nav_filters',\n '.woocommerce-ordering',\n '.sod-inf-nav-next',\n '.woocommerce-result-count',\n\n );\n\n $clickables = array(\n '.widget_layered_nav a',\n '.widget_layered_nav input[type=\"checkbox\"]',\n '.widget_ajax_layered_nav_filters a'\n );\n\n $html_containers = apply_filters('sod_ajax_layered_nav_containers', $html_containers);\n $clickables = apply_filters('sod_ajax_layered_nav_clickables', $clickables);\n $order_by_form = apply_filters('sod_ajax_layered_nav_orderby', '.woocommerce-ordering');\n $products_container = apply_filters('sod_ajax_layered_nav_product_container', '#product_list');\n $inf_scroll_nav = apply_filters('sod_ajax_layered_nav_inf_scroll_nav', '.sod-inf-nav-next');\n $redirect = apply_filters('woocommerce_redirect_single_search_result', false) ? '1' : '0';\n $scroll = apply_filters('sod_ajax_layered_nav_scrolltop', true) ? '1' : '0';\n $offset = apply_filters('sod_ajax_layered_nav_offset', '150');\n $args = array(\n 'loading_img' => get_bloginfo('stylesheet_directory') . '/images/loading.gif',\n 'superstore_img' => get_bloginfo('stylesheet_directory') . '/images/ajax-loader.gif',\n 'nextSelector' => apply_filters('sod_aln_inf_scroll_next', '.pagination a.next'),\n 'navSelector' => apply_filters('sod_aln_inf_scroll_nav', '.pagination'),\n 'itemSelector' => apply_filters('sod_aln_inf_scroll_item', '#main .product'),\n 'contentSelector' => apply_filters('sod_aln_inf_scroll_content', '#main ul.products'),\n 'loading_text' => __('Loading', 'sod_ajax_layered_nav'),\n 'containers' => $html_containers,\n 'triggers' => $clickables,\n 'orderby' => $order_by_form,\n 'product_container' => $products_container,\n 'inf_scroll_nav' => $inf_scroll_nav,\n 'search_page_redirect' => $redirect,\n 'scrolltop' => $scroll,\n 'offset' => $offset,\n );\n\n wp_localize_script('pageloader', 'ajax_layered_nav', $args);\n}", "title": "" }, { "docid": "b011fa4af6fd31cee14c54bdd0d3b6b3", "score": "0.60658187", "text": "function storefront_child_woocommerce_load_styles_and_scripts() {\n\twp_enqueue_style( 'storefront-child-woocommerce', get_stylesheet_directory_uri() . '/inc/woocommerce/woocommerce.css' );\n\twp_enqueue_script( 'storefront-child-woocommerce', get_stylesheet_directory_uri() . '/inc/woocommerce/woocommerce.js', array( 'jquery' ), '20150327', true );\n}", "title": "" }, { "docid": "c7313e8bdcdf6671be929f42f1a181f4", "score": "0.6059884", "text": "function WooCommerce_Auto_Populate_Category_Images() {\n\n\t$needed = array('woocommerce/woocommerce.php');\n\t$activated = apply_filters( 'active_plugins', get_option( 'active_plugins' ) );\n\t\n\t$pass = count(array_intersect($needed, $activated)) == count($needed);\n\n\tif ( $pass ) {\n\t\treturn WooCommerce_Auto_Populate_Category_Images::instance();\n\t} else {\n\t\tadd_action( 'admin_notices', 'wapci_need_deps' );\n\t}\n}", "title": "" }, { "docid": "8b918c737cc899db705ad4ecce6302d2", "score": "0.6042523", "text": "function fluid_edge_has_woocommerce_shortcode() {\n\t\t$woocommerce_shortcodes = array(\n\t\t\t'edgtf_product_info',\n\t\t\t'edgtf_product_list',\n\t\t\t'edgtf_product_list_carousel',\n\t\t\t'edgtf_product_list_simple',\n\t\t\t'add_to_cart',\n\t\t\t'add_to_cart_url',\n\t\t\t'product_page',\n\t\t\t'product',\n\t\t\t'products',\n\t\t\t'product_categories',\n\t\t\t'product_category',\n\t\t\t'recent_products',\n\t\t\t'featured_products',\n\t\t\t'sale_products',\n\t\t\t'best_selling_products',\n\t\t\t'top_rated_products',\n\t\t\t'product_attribute',\n\t\t\t'related_products',\n\t\t\t'woocommerce_messages',\n\t\t\t'woocommerce_cart',\n\t\t\t'woocommerce_checkout',\n\t\t\t'woocommerce_order_tracking',\n\t\t\t'woocommerce_my_account',\n\t\t\t'woocommerce_edit_address',\n\t\t\t'woocommerce_change_password',\n\t\t\t'woocommerce_view_order',\n\t\t\t'woocommerce_pay',\n\t\t\t'woocommerce_thankyou'\n\t\t);\n\n\t\tforeach($woocommerce_shortcodes as $woocommerce_shortcode) {\n\t\t\t$has_shortcode = fluid_edge_has_shortcode($woocommerce_shortcode);\n\n\t\t\tif($has_shortcode) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "04bb4efa2e2a376f721e29db1703636d", "score": "0.6027813", "text": "function theme_setup() {\n\tadd_theme_support( 'automatic-feed-links' );\n\tadd_theme_support( 'title-tag' );\n\tadd_theme_support( 'custom-logo' );\n\tadd_theme_support( 'post-thumbnails' );\n\tadd_theme_support( 'align-wide' );\n\tadd_theme_support(\n\t\t'html5', [\n\t\t\t'search-form',\n\t\t\t'comment-form',\n\t\t\t'comment-list',\n\t\t\t'gallery',\n\t\t\t'caption',\n\t\t]\n\t);\n\tadd_theme_support( 'customize-selective-refresh-widgets' );\n\n\t// Additional theme support for woocommerce 3.0.+\n\t// Uncomment as needed.\n\t//add_theme_support( 'wc-product-gallery-zoom' );\n\t//add_theme_support( 'wc-product-gallery-lightbox' );\n\t//add_theme_support( 'wc-product-gallery-slider' );\n\n\t// Add featured image sizes.\n\t// Sizes are optimized and cropped for landscape aspect ratio and\n\t// optimized for HiDPI displays on 'small' and 'medium' screen sizes.\n\tadd_image_size( 'featured-small', 640, 9999 );\n\tadd_image_size( 'featured-medium', 1280, 9999 );\n\tadd_image_size( 'featured-large', 1440, 9999 );\n\tadd_image_size( 'featured-xlarge', 1920, 9999 );\n\n\t// Load editor stylesheet.\n\tadd_editor_style( get_asset_url( 'css', 'editor' ) );\n\n\t// Register nav menus.\n\tregister_nav_menus(\n\t\t[\n\t\t\t'main-navigation' => __( 'Main Navigation', 'slim-chance' ),\n\t\t\t'secondary-navigation' => __( 'Secondary Navigation', 'slim-chance' ),\n\t\t\t'footer-navigation' => __( 'Footer Navigation', 'slim-chance' ),\n\t\t\t'social' => __( 'Social Navigation', 'slim-chance' ),\n\t\t]\n\t);\n}", "title": "" }, { "docid": "a75b4d4b0745a90ffbef4c380a1a9440", "score": "0.6020813", "text": "function ajax_load_product_categories () {\n\t\n\tglobal $post, $sequoia_woo_is_active, $sequoia_wishlist_is_active, $product, $woocommerce_loop, $wp_query, $woocommerce;\n\t\n\tif( $sequoia_woo_is_active ) {\n\t\n\t// get variables using $_POST\n\t$tax_term\t\t= $_POST[ 'termID' ];\n\t$taxonomy\t\t= $_POST[ 'tax' ];\n\t$post_type\t\t= $_POST[ 'post_type' ];\n\t$total_items\t= $_POST[ 'total_items' ];\n\t$filters\t\t= $_POST[ 'filters' ];\n\t$img_format\t\t= $_POST[ 'img_format' ];\n\t$shop_quick\t\t= $_POST[ 'shop_quick' ];\n\t$shop_buy_action= $_POST[ 'shop_buy_action' ];\n\t$shop_wishlist\t= $_POST[ 'shop_wishlist' ];\n\t$enter_anim\t\t= $_POST[ 'enter_anim' ];\n\t$no_slider_grid\t= $_POST[ 'no_slider_grid' ];\n\t$zoom_button\t= $_POST[ 'zoom_button' ];\n\t$link_button\t= $_POST[ 'link_button' ];\n\t//\n\t//\n\t// PRODUCT FILTERS:\n\t$order_rand\t= false;\n\tif ( $filters == 'featured' ){\n\t\t\n\t\t$args_filters = array( \n\t\t\t'meta_key' => '_featured',\n\t\t\t'meta_value' => 'yes'\n\t\t);\n\t\tremove_filter( 'posts_clauses', array( $woocommerce->query, 'order_by_rating_post_clauses' ) );\n\t\t\n\t}elseif( $filters == 'best_sellers' ){\n\t\t\n\t\t$args_filters = array( \n\t\t\t'meta_key' \t => 'total_sales'\n\t\t);\n\t\tremove_filter( 'posts_clauses', array( $woocommerce->query, 'order_by_rating_post_clauses' ) );\n\t\n\t}elseif( $filters == 'best_rated' ){\n\t\t\n\t\t$args_filters = array();\n\t\tadd_filter( 'posts_clauses', array( $woocommerce->query, 'order_by_rating_post_clauses' ) );\n\t\t\n\t}elseif( $filters == 'latest' ){\n\t\t\n\t\t$args_filters = array();\n\t\tremove_filter( 'posts_clauses', array( $woocommerce->query, 'order_by_rating_post_clauses' ) );\n\t\n\t}elseif( $filters == 'random' ){\n\t\t\n\t\t$order_rand\t= true;\n\t\t$args_filters = array();\n\t\tremove_filter( 'posts_clauses', array( $woocommerce->query, 'order_by_rating_post_clauses' ) );\n\t}\n\t//\n\t\n\tif( !empty($tax_term) ) {\n\n\t\t$tax_term = explode(\",\", $tax_term); // back to array\n\t\t\n\t\t$tax_filter_args = array('tax_query' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'taxonomy' => $taxonomy,\n\t\t\t\t\t\t\t\t'field' => 'slug', // can be 'slug' too\n\t\t\t\t\t\t\t\t'operator' => 'IN', // NOT IN to exclude\n\t\t\t\t\t\t\t\t'terms' => $tax_term\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t}else{\n\t\t$tax_filter_args = array();\n\t}\n\t$main_args = array(\n\t\t'no_found_rows' => 1,\n\t\t'post_status' => 'publish',\n\t\t'post_type' => $post_type,\n\t\t'post_parent' => 0,\n\t\t'suppress_filters' => false,\n\t\t'orderby' => $order_rand ? 'rand menu_order date' : 'menu_order date',\n\t\t'order' => 'ASC',\n\t\t'numberposts' => $total_items\n\t);\n\t$all_args = array_merge( $main_args, $args_filters, $tax_filter_args );\n\t\n\t$content = get_posts($all_args);\n\t\t\n\tob_start ();\n\n\t$i = 1;\n\t\n\tif( count( $content ) == 0 ) {\n\t\n\t\techo '<h4 class=\"no-category-item\">'.__('No product was found for this category.','sequoia').'</h4>';\n\t\t\n\t} \n\t\n\t\n\tforeach ( $content as $post ) {\n\t\tsetup_postdata( $post );\n\t\t\n\t\tglobal $product, $yith_wcwl;\n\t\t\n\t\tif( defined('WPML_ON') ) { // if WPML plugin is active\n\t\t\t$id\t= icl_object_id( get_the_ID(), 'product', false, ICL_LANGUAGE_CODE ); \n\t\t\t$lang_code\t= ICL_LANGUAGE_CODE;\n\t\t}else{\n\t\t\t$id\t= get_the_ID();\n\t\t\t$lang_code\t= '';\n\t\t}\n\t\t$link = get_permalink($id);\n\t\t\n\t\t\n\t\t// DATA for back image\n\t\t$attachment_ids = $product->get_gallery_attachment_ids();\n\t\tif ( $attachment_ids ) {\n\t\t\t$image_url = wp_get_attachment_image_src( $attachment_ids[0], 'large' );\n\t\t\t$img_url = $image_url[0];\n\t\t\t/* // IMAGE SIZES:\n\t\t\t$imgSizes = all_image_sizes(); // as custom fuction\n\t\t\t$img_width = $imgSizes[$img_format]['width'];\n\t\t\t$img_height = $imgSizes[$img_format]['height'];\n\t\t\t*/\n\t\t}\n\t\t// end DATA\n\t\t\n\t\t$prod_title = '<h4 class=\"prod-title\"><a href=\"'. $link .'\" title=\"'.esc_attr(get_the_title()).'\"> ' . esc_attr(get_the_title()) .'</a></h4>';\n\t\t?>\t\n\t\t\n\t\t<div class=\"column item <?php echo $no_slider_grid; ?><?php echo ($enter_anim != 'none') ? ' to-anim' : ''; ?>\" data-i=\"<?php echo $i; ?>\">\n\n\t\t\t<?php echo (!$zoom_button && !$link_button) ? '<a href=\"'.$link.'\" title=\"'. esc_attr(get_the_title()) .'\">' : ''; ?>\n\t\t\t\n\t\t\t<div class=\"item-img\">\n\t\t\t\t\n\t\t\t\t<div class=\"front\">\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t<?php function_exists('woocommerce_show_product_loop_sale_flash') ? woocommerce_show_product_loop_sale_flash() : '';\n\t\t\t\t\t\n\t\t\t\t\techo as_image( $img_format ); ?>\n\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div class=\"back\">\n\t\t\t\t\n\t\t\t\t\t<div class=\"item-overlay\"></div>\n\t\t\t\t\t<?php \n\t\t\t\t\t$params = array( 'width' => $img_width, 'height' => $img_height );\n\t\t\t\t\tif ( $attachment_ids ) {\n\t\t\t\t\t\tif( $img_width && $img_height ) {\n\t\t\t\t\t\t\t\t$params = array( 'width' => $img_width, 'height' => $img_height );\n\t\t\t\t\t\t\t\techo '<img src=\"'. bfi_thumb( $img_url, $params ).'\" alt=\"'. esc_attr(get_the_title()) .'\" class=\"back-image\" />';\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\techo wp_get_attachment_image( $attachment_ids[0], $img_format );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo as_image( $img_format );\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\techo '<div class=\"back-buttons\">';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\techo $zoom_button ? '<a href=\"'. as_get_full_img_url() .'\" class=\"button tiny magnificpopup mfp-image\" title=\"'.esc_attr(strip_tags(get_the_title())).'\"><span class=\"icon icon-zoom-in\" aria-hidden=\"true\"></span></a>' : null;\n\t\t\t\t\t\t\t\n\t\t\t\t\techo $link_button ? '<a href=\"'.$link.'\" class=\"button tiny\" title=\"'. esc_attr(get_the_title()) .'\"><span class=\"icon icon-link\" aria-hidden=\"true\"></span></a>' : null;\n\t\t\t\t\t\n\t\t\t\t\techo '</div>';\n\t\t\t\t\t\n\t\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t</div>\n\t\t\t\n\t\t\t<?php echo (!$zoom_button && !$link_button) ? '</a>' : ''; ?>\n\t\t\t\n\t\t\t<div class=\"item-data\">\n\t\t\t\t\t\n\t\t\t\t<div class=\"table\">\n\t\t\t\t\n\t\t\t\t\t<div class=\"tablerow\">\t\n\t\t\t\t\t\n\t\t\t\t\t<?php\n\t\t\t\t\tif( $shop_quick ) {\n\t\t\t\t\t\techo '<div class=\"item-buttons-holder tablecell\">';\n\t\t\t\t\t\techo '<a href=\"#qv-holder\" class=\"quick-view tip-top\" title=\"'.__('Quick view','sequoia').' - '. esc_attr(strip_tags(get_the_title())) .'\" data-id=\"'.$id.'\" data-lang=\"'. $lang_code .'\" data-tooltip><span class=\"icon-eye\"></span></a>';\n\t\t\t\t\t\techo '</div>'; // tablecell\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( !wp_script_is( 'wc-add-to-cart-variation', 'enqueued' )) {\n\t\t\t\t\t\n\t\t\t\t\t\t\twp_register_script( 'wc-add-to-cart-variation', WP_PLUGIN_DIR . '/woocommerce/assets/frontend/add-to-cart-variation.min.js');\n\t\t\t\t\t\t\twp_enqueue_script( 'wc-add-to-cart-variation' );\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\n\t\t\t\t\tif( $shop_buy_action ) {\n\t\t\t\t\t\techo '<div class=\"item-buttons-holder tablecell\">';\n\t\t\t\t\t\t\tdo_action( 'woocommerce_after_shop_loop_item' );\n\t\t\t\t\t\techo '</div>'; // tablecell\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif( $sequoia_wishlist_is_active && $shop_wishlist ) {\n\t\t\t\t\t\techo '<div class=\"item-buttons-holder tablecell\">';\n\t\t\t\t\t\t\tdo_action('as_wishlist_button');\n\t\t\t\t\t\techo '</div>'; // tablecell\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//\n\t\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t\t<?php //function_exists('woocommerce_template_loop_rating') ? woocommerce_template_loop_rating() : ''; ?>\n\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<?php \n\t\t\t\t// if all buttons disabled\n\t\t\t\t$no_buttons =( !$shop_quick && !$shop_buy_action && !$shop_wishlist ) ? true : false;\n\t\t\t\t\n\t\t\t\techo $no_buttons ? '<div class=\"no-buttons\">' : null;\n\t\t\t\t\n\t\t\t\techo $prod_title;\n\t\t\t\t\n\t\t\t\twoocommerce_template_loop_price();\n\t\t\t\t\n\t\t\t\techo $no_buttons ? '</div>' : null;\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\n\t\t\t</div><!-- .item-data -->\n\t\t\t\n\t\t\t<div class=\"clearfix\"></div>\t\n\t\t\n\t\t</div>\n\t\t\t\t\t\t\n\t\t<?php \n\t\t$i++;\n\t} // END foreach\n\t?>\n\t\n\t<script>\n\t(function( $ ){\n\t\tvar startMagnificPopupAjax = window.magnificPopupSequoia();\n\t\t\n\t})( jQuery );\n\t</script>\n\t\n\t<?php \n\t/* reset, clean buffer and respond with content */\n\twp_reset_postdata();\n\t$response = ob_get_contents();\n\tob_end_clean();\n\n\techo $response;\n\tdie(1);\n\n\t}else{\n\t\techo '<h5 class=\"no-woo-notice\">' . __('AJAX PRODUCTS BLOCK DISABLED.<br> Sorry, it seems like WooCommerce is not active. Please install and activate last version of WooCommerce.','sequoia') . '</h5>';\n\t\t\treturn;\n\t} // if $sequoia_woo_is_active\n\t\n}", "title": "" }, { "docid": "c7bbdf35dcc2b5b484765e37712a6d18", "score": "0.6011441", "text": "function is_woocommerce_v23_plus() {\r\n\r\n\t$version = get_option( 'wqc_wc_version_flag' );\r\n\r\n\tif ( ! empty( $version ) && version_compare( $version, '2.3' ) >= 0 ) {\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "ab20196e6e743849b5df742e563c47be", "score": "0.6010316", "text": "public function is_woocommerce_activated() {\n\t\t$blog_plugins = get_option( 'active_plugins', array() );\n\t\t$site_plugins = get_site_option( 'active_sitewide_plugins', array() );\n\n\t\tif ( in_array( 'woocommerce/woocommerce.php', $blog_plugins ) || isset( $site_plugins['woocommerce/woocommerce.php'] ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "3de9e87239a2f5ef22e3d2ac8faed105", "score": "0.6006949", "text": "private function maybe_load_dependencies() {\n\t\tif ( ! class_exists( 'WC_Subscriptions_Renewal_Order' ) ) {\n\t\t\tinclude_once( WCS_PLUGIN_DIR . '/includes/class-wc-subscriptions-renewal-order.php' );\n\t\t}\n\n\t\tif ( ! class_exists( 'WC_Subscriptions_Manager' ) ) {\n\t\t\tinclude_once( WCS_PLUGIN_DIR . '/includes/class-wc-subscriptions-manager.php' );\n\t\t}\n\n\t\tif ( ! class_exists( 'WC_Subscriptions_Order' ) ) {\n\t\t\tinclude_once( WCS_PLUGIN_DIR . '/includes/class-wc-subscriptions-order.php' );\n\t\t}\n\t}", "title": "" }, { "docid": "ab24c5cffd0d14f2270fd73fe3f7b5d0", "score": "0.60061204", "text": "function mogfw_keep_shop_private() {\n\t// Remove styles below when putting the shop live\n\tadd_action( 'wp_head', function() { echo '<style>body:not(.logged-in) .xoo-wsc-modal { display: none; }</style>'; } );\t// this hides the floating cart added with Woo Side Cart plugin\n\tadd_action( 'wp_head', function() { echo '<style>body:not(.logged-in) .widget.widget_search { display: none !important; }</style>'; } );\t// this hides the Search Widget\n\tif (!is_user_logged_in()) {\n\t\tif( strpos($_SERVER['REQUEST_URI'], '/shop/') !== false || strpos($_SERVER['REQUEST_URI'], '/product') !== false || strpos($_SERVER['REQUEST_URI'], '/product-category') !== false || strpos($_SERVER['REQUEST_URI'], '/cart') !== false || strpos($_SERVER['REQUEST_URI'], '/checkout') !== false ) {\n\t\t\twp_redirect( '/');\n\t\t\texit;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "e347193ff9c6b6e5e09da0654c1cd4ab", "score": "0.60038114", "text": "public function check_dependencies() {\n\t\tif ( ! class_exists( 'woocommerce' ) || version_compare(\n\t\t\tget_option( 'woocommerce_db_version' ),\n\t\t\tWC_API_Dev::WC_MIN_VERSION,\n\t\t\t'<='\n\t\t) ) {\n\t\t\tadd_action( 'admin_notices', array( $this, 'dependency_notice' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "361af103a87ad48629cf31f2ef54afa9", "score": "0.59957415", "text": "function theme_enqueue_styles() {\n\t$the_theme = wp_get_theme();\n\n if(is_product()){\n wp_enqueue_style('owl-carousel-css', 'https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css', [], $the_theme->get('Version'));\n wp_enqueue_style('owl-carousel-css-theme-default', 'https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.css', [], $the_theme->get('Version'));\n wp_enqueue_script('owl-carousel-js', 'https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js', [], $the_theme->get('Version'), true);\n\n wp_enqueue_style('single-product-custom-css', get_stylesheet_directory_uri() . '/css/single-product.css', array(), $the_theme->get( 'Version' ) );\n wp_enqueue_script('single-product-custom-js', get_stylesheet_directory_uri() . '/js/single-product-custom.js', array(), $the_theme->get( 'Version' ) );\n }\n\n if(is_page('checkout')){\n wp_enqueue_style('single-product-custom-css', get_stylesheet_directory_uri() . '/css/custom-checkout.css', array(), $the_theme->get( 'Version' ) );\n }\n\n if(is_shop() || is_product_category()){\n wp_deregister_script('wc-price-slider');\n }\n\n wp_enqueue_style( 'child-understrap-styles', get_stylesheet_directory_uri() . '/css/child-theme.min.css', array(), $the_theme->get( 'Version' ) );\n wp_enqueue_style( 'owl-carousel-style', get_stylesheet_directory_uri() . '/css/owl.carousel.min.css', array(), $the_theme->get( 'Version' ) );\n // wp_enqueue_style( 'owl-carousel-default-style', get_stylesheet_directory_uri() . '/css/simplebar.css', array(), $the_theme->get( 'Version' ) );\n wp_enqueue_style( 'custom-styles', get_stylesheet_directory_uri() . '/css/custom.css', array(), $the_theme->get( 'Version' ) );\n wp_enqueue_style( 'media-styles', get_stylesheet_directory_uri() . '/css/media.css', array(), $the_theme->get( 'Version' ) );\n wp_enqueue_script( 'jquery');\n wp_enqueue_script( 'child-understrap-scripts', get_stylesheet_directory_uri() . '/js/child-theme.min.js', array(), $the_theme->get( 'Version' ), true );\n wp_enqueue_script( 'simplebar-scripts', 'https://unpkg.com/simplebar@latest/dist/simplebar.min.js', array(), $the_theme->get( 'Version' ), true );\n wp_enqueue_script( 'owl-carousel-scripts', get_stylesheet_directory_uri() . '/js/owl.carousel.min.js', array(), $the_theme->get( 'Version' ), true );\n\n wp_enqueue_script( 'imageloaded-scripts', 'https://unpkg.com/imagesloaded@4/imagesloaded.pkgd.min.js', array(), $the_theme->get( 'Version' ), true );\n\n wp_enqueue_script( 'custom-scripts', get_stylesheet_directory_uri() . '/js/custom.js', array(), $the_theme->get( 'Version' ), true );\n\n\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n}", "title": "" }, { "docid": "f2c77ec174cd91693a5307e436f04ef9", "score": "0.5985401", "text": "function hongo_before_shop_loop_shop_modern_callback() {\n remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 );\n\n /* To Remove loop product image link close and cover only image & sale falsh */\n remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 );\n\n $product_archive_enable_gallery_slider = hongo_get_product_archive_enable_gallery_slider();\n if( $product_archive_enable_gallery_slider == '1' ) {\n\n // Main Image\n remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );\n \n // For Grid Product Slider\n add_action( 'woocommerce_before_shop_loop_item_title', 'hongo_template_loop_product_slider', 12 );\n\n } else {\n\n /* To Remove loop product image link open and cover only image & sale falsh */\n add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 5 );\n\n /* To Display alternate image */\n add_action( 'woocommerce_before_shop_loop_item_title', 'hongo_template_loop_alternate_product_image', 15 );\n\n /* To Remove loop product image link close and cover only image & sale falsh */\n add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 100 );\n }\n\n // To Add loop product Coutdown\n $product_archive_enable_deal = hongo_get_product_archive_enable_deal();\n if( $product_archive_enable_deal == '1' ) {\n add_action( 'woocommerce_before_shop_loop_item_title', 'hongo_template_loop_product_deal', 200 );\n }\n\n /* To add product buttons like add to cart */\n remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );\n $hongo_product_archive_enable_add_to_cart = hongo_get_product_archive_enable_add_to_cart();\n if( $hongo_product_archive_enable_add_to_cart == 1 ) {\n add_action( 'hongo_shop_modern_loop_add_to_cart', 'woocommerce_template_loop_add_to_cart', 5 );\n add_action( 'hongo_shop_loop_button', 'woocommerce_template_loop_add_to_cart', 25 );\n }\n\n /* To Remove loop product title and add new title with alternate font */\n remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 );\n add_action( 'woocommerce_shop_loop_item_title', 'hongo_template_loop_product_title', 10 );\n\n /* To Remove loop category title and add new title with alternate font */\n remove_action( 'woocommerce_shop_loop_subcategory_title', 'woocommerce_template_loop_category_title', 10 );\n add_action( 'woocommerce_shop_loop_subcategory_title', 'hongo_template_loop_category_title', 10 );\n\n /* To Remove loop product price and change priority */\n remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );\n add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 5 );\n\n /* To Remove loop product rating and change priority */\n remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );\n $hongo_product_archive_enable_star_rating = hongo_get_product_archive_enable_star_rating();\n if( $hongo_product_archive_enable_star_rating == '1' ) {\n add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 10 );\n }\n }", "title": "" }, { "docid": "fda75c7c344db94c1579191cfad858ef", "score": "0.5959828", "text": "public static function sensei_is_woocommerce_activated () {\n\t\tglobal $woothemes_sensei;\n\t\tif ( WooThemes_Sensei_Utils::sensei_is_woocommerce_present() && isset( $woothemes_sensei->settings->settings['woocommerce_enabled'] ) && $woothemes_sensei->settings->settings['woocommerce_enabled'] ) { return true; } else { return false; }\n\t}", "title": "" }, { "docid": "87cab026087b013b52fbe439121742a2", "score": "0.594999", "text": "function should_load() {\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\n\t\treturn ( is_plugin_active( 'yith-woocommerce-quick-view/init.php' ) );\n\t}", "title": "" }, { "docid": "b5eb10ab077a3149e1ed4702b3adeacb", "score": "0.59488976", "text": "public function woocommerce($data) {\n $params = array(\n 'element' => $data,\n 'operation' => 'woocommerce',\n 'sessionName' => $this->config['sessionName']\n );\n $result = array();\n $response = $this->exec($params, true);\n if($response->success) {\n $result = $response->result;\n } else {\n throw new Exception($response);\n }\n return $result;\n }", "title": "" }, { "docid": "08053df62bdba815ccb6cb95cbad3ba7", "score": "0.59485537", "text": "function __construct()\n {\n if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {\n $this->initHooks();\n }\n\n }", "title": "" }, { "docid": "ea8f3ac2f58d5f44ea6f2e2f27e982c7", "score": "0.5929253", "text": "function fluid_edge_has_woocommerce_widgets() {\n\t\t$widgets_array = array(\n\t\t\t'edgtf_woocommerce_dropdown_cart',\n\t\t\t'woocommerce_widget_cart',\n\t\t\t'woocommerce_layered_nav',\n\t\t\t'woocommerce_layered_nav_filters',\n\t\t\t'woocommerce_price_filter',\n\t\t\t'woocommerce_product_categories',\n\t\t\t'woocommerce_product_search',\n\t\t\t'woocommerce_product_tag_cloud',\n\t\t\t'woocommerce_products',\n\t\t\t'woocommerce_recent_reviews',\n\t\t\t'woocommerce_recently_viewed_products',\n\t\t\t'woocommerce_top_rated_products'\n\t\t);\n\n\t\tforeach($widgets_array as $widget) {\n\t\t\t$active_widget = is_active_widget(false, false, $widget);\n\n\t\t\tif($active_widget) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "554d888676c917ec1ab29b8c037a2365", "score": "0.59205204", "text": "public function wwof_remove_wwpp_pre_get_posts_arg_hook() {\r\n\r\n global $wc_wholesale_prices , $wc_wholesale_prices_premium;\r\n\r\n // We only do this if WWP and WWPP are installed and active\r\n if( ( $wc_wholesale_prices != null && $wc_wholesale_prices_premium != null ) && get_class( $wc_wholesale_prices_premium ) == 'WooCommerceWholeSalePricesPremium' && get_class( $wc_wholesale_prices ) == 'WooCommerceWholeSalePrices' ) {\r\n\r\n // When \"List product variation individually\" option is enabled\r\n if ( get_option( 'wwof_general_list_product_variation_individually' , 'no' ) === 'yes' ) {\r\n\r\n remove_filter( 'wwof_filter_product_listing_query_arg' , array( $wc_wholesale_prices_premium->wwpp_query, 'pre_get_posts_arg' ) );\r\n \r\n // Filter product query in wwof\r\n add_filter( 'wwof_filter_product_listing_query_arg' , array( $this , 'wwof_pre_get_posts_arg' ) , 90 , 1 );\r\n\r\n // Fix for WWOF-349\r\n add_filter( 'wwof_product_listing_price_filter_meta_query' , function( $meta_query ) {\r\n\r\n global $wc_wholesale_prices;\r\n\r\n $user_wholesale_role = $wc_wholesale_prices->wwp_wholesale_roles->getUserWholesaleRole();\r\n $user_wholesale_role = ( is_array( $user_wholesale_role ) && !empty( $user_wholesale_role ) ) ? $user_wholesale_role[ 0 ] : '';\r\n \r\n $meta_query[] = array(\r\n 'key' => 'wwpp_product_wholesale_visibility_filter',\r\n 'value' => array( $user_wholesale_role , 'all' ),\r\n 'compare' => 'IN'\r\n );\r\n\r\n return $meta_query;\r\n\r\n } , 10 , 1 );\r\n\r\n }\r\n\r\n }\r\n\r\n }", "title": "" }, { "docid": "b23056c346b3661ac1659bff2bf450e9", "score": "0.5911421", "text": "function blossom_recipe_wc_wrapper(){ \r\n ?>\r\n <div id=\"primary\" class=\"content-area\">\r\n <main id=\"main\" class=\"site-main\" role=\"main\">\r\n <?php\r\n}", "title": "" }, { "docid": "1c917e8fb7c854fd1e64a3d7705f41fd", "score": "0.58957714", "text": "function objectiv_shopping_cpt_layout() {\n if ( class_exists( 'WooCommerce' ) ) {\n if( is_page ( array( 'cart', 'checkout' )) || is_shop() || 'product' == get_post_type() ) {\n remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );\n remove_action( 'genesis_sidebar', 'objectiv_do_podcast_sidebar' );\n return 'full-width-content';\n }\n }\n}", "title": "" }, { "docid": "8cc420844d355f76134c6b48851100d9", "score": "0.5893129", "text": "public function __construct() {\n\t\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'dequeue_woocommerce_cart_fragments' ), 11 );\n\n\t\t\tadd_filter( 'woocommerce_add_to_cart_fragments', array( $this, 'header_add_to_cart_fragment' ) );\n\n\t\t\tadd_filter( 'woocommerce_checkout_fields', array( $this, 'override_checkout_fields' ) );\n\n\t\t\tadd_action( 'wp_head', array( $this, 'init' ) );\n\n\t\t\tadd_action( 'after_switch_theme', array( $this, 'change_woocommerce_image_dimensions' ), 1 );\n\n\t\t\t/* Begin hook for shop archive */\n\n\t\t\tadd_filter( 'loop_shop_per_page', array( $this, 'loop_shop_per_page' ), 20 );\n\n\t\t\t// Moving the catalog order to left side.\n\t\t\tremove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );\n\t\t\tadd_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 10 );\n\n\t\t\tadd_filter( 'woocommerce_pagination_args', array( $this, 'override_pagination_args' ) );\n\t\t\tadd_filter( 'woocommerce_product_tag_cloud_widget_args', array( $this, 'change_product_tag_cloud_args' ) );\n\n\t\t\t// Change thumbnail size per product shortcode\n\t\t\tremove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );\n\t\t\tadd_action( 'woocommerce_before_shop_loop_item_title', array(\n\t\t\t\t$this,\n\t\t\t\t'change_template_loop_product_thumbnail',\n\t\t\t), 10 );\n\n\t\t\t/* End hook for shop archive */\n\n\t\t\t/* Begin hook for single product */\n\n\t\t\t// Remove tab heading in on single product pages.\n\t\t\tadd_filter( 'woocommerce_product_description_heading', array(\n\t\t\t\t$this,\n\t\t\t\t'remove_product_description_heading',\n\t\t\t) );\n\t\t\tadd_filter( 'woocommerce_product_additional_information_heading', array(\n\t\t\t\t$this,\n\t\t\t\t'remove_product_additional_information_heading',\n\t\t\t) );\n\n\t\t\tadd_filter( 'woocommerce_review_gravatar_size', array( $this, 'woocommerce_review_gravatar_size' ) );\n\n\t\t\t/* End hook for single product */\n\t\t}", "title": "" }, { "docid": "6982d1411aeacbb2feb19f708b1692aa", "score": "0.5889645", "text": "function fg_woocommerce_wrapper_before() {\n\t\t?>\n\t\t<div id=\"primary\" class=\"content-area large-8 medium-8 small-12 cell\">\n\t\t\t<main id=\"main\" class=\"site-main\" role=\"main\"><article class=\"woo-article-fix\">\n\t\t\t<?php\n\t}", "title": "" }, { "docid": "9070be8bbd94ba03e1d028b9d5b5c8a1", "score": "0.5878389", "text": "function mkd_burst_load_woo_assets() {\n\t\treturn mkd_burst_is_woocommerce_installed() && (mkd_burst_is_ajax_enabled() || mkd_burst_is_woocommerce_page() ||\n\t\t\tmkd_burst_has_woocommerce_shortcode() || mkd_burst_has_woocommerce_widgets());\n\t}", "title": "" }, { "docid": "6ab6b6d16413d3fb4e52f47976921cdb", "score": "0.586002", "text": "public function load_classes() {\n\t\tif ( $this->is_woocommerce_activated() === false ) {\n\t\t\tadd_action( 'admin_notices', array ( $this, 'need_woocommerce' ) );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( version_compare( PHP_VERSION, '5.6', '<' ) ) {\n\t\t\tadd_action( 'admin_notices', array ( $this, 'required_php_version' ) );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $this->is_base_plugin_activated() === false ) {\n\t\t\tadd_action( 'admin_notices', array ( $this, 'base_plugin_requirement' ) );\n\t\t\treturn;\n\t\t}\n\n\t\t// all systems ready - GO!\n\t\t$this->includes();\n\t}", "title": "" }, { "docid": "dd7efa645bce8685a1c6e4530894d6e4", "score": "0.58598524", "text": "public function is_available()\n {\n global $woocommerce;\n\n if ($this->enabled == 'yes') {\n if ($woocommerce->version < '1.5.8') {\n return false;\n }\n\n if ($this->testmode != 'yes' && (!$this->login || !$this->tran_key)) {\n return false;\n }\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "bb2fe220adfca1288b417cf73cd5ec3c", "score": "0.5858479", "text": "public function init_error_messages(){\n\t\t?>\n\t\t<div class=\"error\">\n\t\t\t<p><?php echo __( 'Kiss plugin requires <strong>WooCommerce</strong> to be activated.', 'omise' ); ?></p>\n\t\t</div>\n\t\t<?php\n }", "title": "" }, { "docid": "16798e8b6f830858c83f5b8dfe6e4c35", "score": "0.5848109", "text": "public function add_theme_support() {\n\t\tadd_theme_support( 'woocommerce' );\n\n\t\tadd_theme_support( 'wc-product-gallery-zoom' );\n\t\tadd_theme_support( 'wc-product-gallery-lightbox' );\n\t\tadd_theme_support( 'wc-product-gallery-slider' );\n\t}", "title": "" }, { "docid": "59de85de5c02c2f57d65226fef086644", "score": "0.58426833", "text": "function woocommerce_vendor_styles(){\n wp_enqueue_style('wc-setup-custom', get_stylesheet_directory_uri(). '/dist/css/woocommerce.css');\n }", "title": "" }, { "docid": "2a56a6ebb1aab5df29866747c93120f1", "score": "0.5839343", "text": "function storefront_woocommerce_pagination() {\n\t\tif ( woocommerce_products_will_display() ) {\n\t\t\twoocommerce_pagination();\n\t\t}\n\t}", "title": "" }, { "docid": "27097961f9a01e4e2deed2e458a28715", "score": "0.5829918", "text": "function hongo_after_shop_loop_shop_modern_callback() {\n add_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 );\n\n /* To Remove loop product image link close and cover only image & sale falsh */\n add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 );\n\n $product_archive_enable_gallery_slider = hongo_get_product_archive_enable_gallery_slider();\n if( $product_archive_enable_gallery_slider == '1' ) {\n\n // Main Image\n add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );\n \n // For Grid Product Slider\n remove_action( 'woocommerce_before_shop_loop_item_title', 'hongo_template_loop_product_slider', 12 );\n\n } else {\n\n /* To Remove loop product image link open and cover only image & sale falsh */\n remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 5 );\n\n /* To Display alternate image */\n remove_action( 'woocommerce_before_shop_loop_item_title', 'hongo_template_loop_alternate_product_image', 15 );\n\n /* To Remove loop product image link close and cover only image & sale falsh */ \n remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 100 );\n }\n\n // To Add loop product Coutdown\n $product_archive_enable_deal = hongo_get_product_archive_enable_deal();\n if( $product_archive_enable_deal == '1' ) {\n remove_action( 'woocommerce_before_shop_loop_item_title', 'hongo_template_loop_product_deal', 200 );\n }\n\n /* To add product buttons like add to cart */\n add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );\n $hongo_product_archive_enable_add_to_cart = hongo_get_product_archive_enable_add_to_cart();\n if( $hongo_product_archive_enable_add_to_cart == 1 ) {\n remove_action( 'hongo_shop_modern_loop_add_to_cart', 'woocommerce_template_loop_add_to_cart', 5 );\n remove_action( 'hongo_shop_loop_button', 'woocommerce_template_loop_add_to_cart', 25 );\n }\n\n /* To Remove loop product title and add new title with alternate font */\n add_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 );\n remove_action( 'woocommerce_shop_loop_item_title', 'hongo_template_loop_product_title', 10 );\n\n /* To Remove loop category title and add new title with alternate font */\n add_action( 'woocommerce_shop_loop_subcategory_title', 'woocommerce_template_loop_category_title', 10 );\n remove_action( 'woocommerce_shop_loop_subcategory_title', 'hongo_template_loop_category_title', 10 );\n\n /* To Remove loop product price and change priority */\n add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );\n remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 5 );\n\n /* To Remove loop product rating and change priority */\n add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );\n $hongo_product_archive_enable_star_rating = hongo_get_product_archive_enable_star_rating();\n if( $hongo_product_archive_enable_star_rating == '1' ) {\n remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 10 );\n }\n }", "title": "" }, { "docid": "287f661d3bc613b39b1cd8345cf3ed0e", "score": "0.5822382", "text": "function _WELD_theme_setup() {\n add_theme_support( 'automatic-feed-links' );\n\n /**\n * Enables post thumbnail\n */\n add_theme_support( 'post-thumbnails' );\n\n add_theme_support( 'custom-header' );\n\n add_theme_support( 'woocommerce' );\n\n /*\n * Common Navigation Location\n */\n register_nav_menus( array(\n 'header-navigation' => __( 'Header Navigation' ),\n 'footer-navigation' => __( 'Footer Navigation' ),\n 'sidebar-navigation' => __( 'Sidebar Navigation' )\n ));\n\n /*\n * Sidebar Widgets\n */\n register_sidebar(array(\n 'name' => 'Sidebar Widgets',\n 'id' => 'sidebar-widgets',\n 'description' => 'These are widgets for the sidebar.',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n ));\n \n\n }", "title": "" } ]
08aa08cf2dab2b6906c6a1a7dd826815
get all route that passing certain bus stop
[ { "docid": "27a8d29ad4a7406b166e87471768c797", "score": "0.6844281", "text": "public function getRoutePassingBusStop($halte_id){\n $busRouteModel = new BusRoute();\n $busRoute = $busRouteModel->select('rute_id')\n ->where('halte_id', '=', $halte_id)\n ->groupBy('rute_id')\n ->get()\n ->toArray();\n\n $response = array();\n\n if($busRoute!=null){\n $response['code'] = 200;\n $response['data'] = $busRoute;\n } else {\n $response['code'] = 400;\n $response['data']['msg'] = 'bus stop is not registered in system, make sure you make correct request.';\n }\n\n header(\"Access-Control-Allow-Origin: *\");\n return response()->json($response);\n }", "title": "" } ]
[ { "docid": "057be2f10473edc0f48476b8f6668fc2", "score": "0.7225469", "text": "public function getAllBusStop(){\n $counter = 0;\n $busRouteModel = new BusRoute();\n if(sizeof($this->listBusHistory) > 0){\n $listBusRoute = $busRouteModel->where('rute_id', '=', $this->rute_id)\n ->whereNotIn('halte_id', $this->listBusHistory)\n ->with('detailHalte')\n ->get()\n ->toArray();\n } else {\n $listBusRoute = $busRouteModel->where('rute_id', '=', $this->rute_id)\n ->with('detailHalte')\n ->get()\n ->toArray();\n }\n\n //find normally finish, normally start, and nearest bus stop\n $lastBusStop = 0; //not exist\n $firstBusStop = 0;\n $indexLastBusStop = -1;\n $indexFirstBusStop = -1;\n $indexInitialBusStop = -1;\n $waypoints = '';\n $busStopIdWaypoint = '';\n\n try{\n $busStopHistoryModel = new BusStopHistory();\n $busStopHistory = $busStopHistoryModel->where('plat_nomor', '=', $this->plat_nomor)\n ->where('rute_id', '=', $this->rute_id)\n ->orderBy('arrival_history', 'desc')\n ->get()\n ->toArray();\n\n if($busStopHistory==null){\n throw new \\Exception('arrival history not found');\n }\n\n $nearestBusStop = $busRouteModel->where('halte_id', '=', $busStopHistory[0]['halte_id'])\n ->where('rute_id', '=', $busStopHistory[0]['rute_id'])\n ->orderBy('urutan', 'desc')\n ->first();\n\n $initialBusStop = $nearestBusStop['urutan']+1;\n\n foreach($listBusRoute as $busRoute){\n //find normally finish\n if($busRoute['urutan']>$lastBusStop){\n $lastBusStop = $busRoute['urutan'];\n $indexLastBusStop = $counter;\n }\n\n //handle if bus is starting operation not from start route\n if($busRoute['urutan'] == 1){\n $firstBusStop = 1;\n $indexFirstBusStop = 0;\n }\n\n if($busRoute['urutan'] == $initialBusStop){\n $indexInitialBusStop = $counter;\n }\n $counter++;\n }\n\n $counter = 0;\n\n// echo 'initial bus stop: '.$initialBusStop.'<br>';\n// echo 'index initial bus stop: '.$indexInitialBusStop.'<br>';\n// echo 'last bus stop: '.$lastBusStop.'<br>';\n// echo 'index last bus stop: '.$indexLastBusStop.'<br>';\n// echo 'first bus stop: '.$firstBusStop.'<br>';\n// echo 'index first bus stop: '.$indexFirstBusStop.'<br>';\n\n foreach($listBusRoute as $busRoute){\n// echo $busRoute['urutan'].'<br><br>';\n// echo 'initial bus stop: '.$initialBusStop.'<br>';\n if($initialBusStop == $busRoute['urutan']){\n //if bus stop being estimated is nearest bus stop\n// echo 'condition 1 '.$busRoute['urutan'].'<br>';\n $param = array(\n 'units' => 'metric',\n 'origin' => $this->busLat . ', ' . $this->busLon,\n 'destination'=> $busRoute['detail_halte']['latitude'] . ', ' . $busRoute['detail_halte']['longitude'],\n 'key' => 'AIzaSyDkN-x6OugkPjuxqgibtHe3bSTt5y3WoRU'\n );\n\n $url = 'https://maps.googleapis.com/maps/api/directions/json?' . http_build_query($param);\n// echo $url.'<br>';\n $response = \\Httpful\\Request::get($url)->send();\n $dataResponse = json_decode($response->raw_body, true);\n $dataResponse['halte_id'] = $busRoute['detail_halte']['halte_id'];\n $this->listBusStopDuration[$counter] = $dataResponse;\n $counter++;\n } else if($busRoute['urutan'] > $initialBusStop){\n //if bus stop being estimated is bus stop next to nearest bus stop\n //example: nearest => 5, next bus => 6,7\n// echo 'condition 2 '.$busRoute['urutan'].'<br>';\n $tempIndexInitial = $indexInitialBusStop;\n $selisih = $counter - $indexInitialBusStop;\n if($selisih>15){\n $selisih = 15;\n }\n for($i = 0; $i<$selisih; $i++){\n if($i == 0){\n //initialization bus stop\n $waypoints = 'via:'.$listBusRoute[$indexInitialBusStop]['detail_halte']['latitude'].', '\n .$listBusRoute[$initialBusStop]['detail_halte']['longitude'];\n //for debugging purpose\n $busStopIdWaypoint = $listBusRoute[$indexInitialBusStop]['detail_halte']['halte_id'];\n } else {\n $waypoints = $waypoints.'|via:'.$listBusRoute[$indexInitialBusStop]['detail_halte']['latitude'].', '\n .$listBusRoute[$initialBusStop]['detail_halte']['longitude'];\n //for debugging purpose\n $busStopIdWaypoint = $busStopIdWaypoint.', '.$listBusRoute[$indexInitialBusStop]['detail_halte']['halte_id'];\n }\n $indexInitialBusStop++;\n }\n $indexInitialBusStop = $tempIndexInitial;\n\n $param = array(\n 'units' => 'metric',\n 'origin' => $this->busLat.', '.$this->busLon,\n 'destination' => $busRoute['detail_halte']['latitude'].', '.$busRoute['detail_halte']['longitude'],\n 'waypoints' => $waypoints,\n 'key' => 'AIzaSyDkN-x6OugkPjuxqgibtHe3bSTt5y3WoRU'\n );\n\n $url = 'https://maps.googleapis.com/maps/api/directions/json?' . http_build_query($param);\n// echo $url.'<br>';\n// echo 'route waypoints: '.$busStopIdWaypoint.'<br>';\n $response = \\Httpful\\Request::get($url)->send();\n $dataResponse = json_decode($response->raw_body, true);\n $dataResponse['halte_id'] = $busRoute['detail_halte']['halte_id'];\n $this->listBusStopDuration[$counter] = $dataResponse;\n $counter++;\n } else if($busRoute['urutan'] < $initialBusStop){\n /**********************************************************************\n * if bus stop being estimated is before the nearest bus stop *\n * this case only happen if bus start not from the beginning of route *\n * example rute 1A => 1,2,3,4,5,6,7,8,9 *\n * bus start from garage and heading to 4 *\n * then estimation for 2 is through waypoint 5,6,7,8,9,1 *\n **********************************************************************/\n// echo 'condition 3 '.$busRoute['urutan'].'<br>';\n $tempIndexInitial = $indexInitialBusStop;\n $selisih = $indexLastBusStop - $indexInitialBusStop;\n if($selisih>15){\n $selisih = 15;\n }\n\n for($i = 0; $i<$selisih; $i++){\n if($i == 0){\n //initialization bus stop\n $waypoints = 'via:'.$listBusRoute[$indexInitialBusStop]['detail_halte']['latitude'].', '\n .$listBusRoute[$initialBusStop]['detail_halte']['longitude'];\n //for debugging purpose\n $busStopIdWaypoint = $listBusRoute[$indexInitialBusStop]['detail_halte']['halte_id'];\n } else {\n $waypoints = $waypoints.'|via:'.$listBusRoute[$indexInitialBusStop]['detail_halte']['latitude'].', '\n .$listBusRoute[$initialBusStop]['detail_halte']['longitude'];\n //for debugging purpose\n $busStopIdWaypoint = $busStopIdWaypoint.', '.$listBusRoute[$indexInitialBusStop]['detail_halte']['halte_id'];\n }\n $indexInitialBusStop++;\n }\n $indexInitialBusStop = $tempIndexInitial;\n\n $selisih = $counter - $indexFirstBusStop;\n if($selisih>15){\n $selisih = 15;\n }\n for($i = 0; $i<$selisih; $i++){\n $waypoints = $waypoints.'|via:'.$listBusRoute[$i]['detail_halte']['latitude'].', '\n .$listBusRoute[$i]['detail_halte']['longitude'];\n //for debugging purpose\n $busStopIdWaypoint = $busStopIdWaypoint.', '.$listBusRoute[$i]['detail_halte']['halte_id'];\n }\n\n $param = array(\n 'units' => 'metric',\n 'origin' => $this->busLat.', '.$this->busLon,\n 'destination' => $busRoute['detail_halte']['latitude'].', '.$busRoute['detail_halte']['longitude'],\n 'waypoints' => $waypoints,\n 'key' => 'AIzaSyDkN-x6OugkPjuxqgibtHe3bSTt5y3WoRU'\n );\n\n $url = 'https://maps.googleapis.com/maps/api/directions/json?' . http_build_query($param);\n// echo $url.'<br>';\n// echo 'route waypoints: '.$busStopIdWaypoint.'<br>';\n $response = \\Httpful\\Request::get($url)->send();\n $dataResponse = json_decode($response->raw_body, true);\n $dataResponse['halte_id'] = $busRoute['detail_halte']['halte_id'];\n $this->listBusStopDuration[$counter] = $dataResponse;\n $counter++;\n }\n //reset waypoint each change of bus stop ETA\n $waypoints='';\n $busStopIdWaypoint='';\n }\n }catch(\\Exception $e) {\n// echo $e;\n foreach($listBusRoute as $busRoute){\n $param = array(\n 'units' => 'metric',\n 'origin' => $this->busLat . ', ' . $this->busLon,\n 'destination'=> $busRoute['detail_halte']['latitude'] . ', ' . $busRoute['detail_halte']['longitude'],\n 'key' => 'AIzaSyDkN-x6OugkPjuxqgibtHe3bSTt5y3WoRU'\n );\n\n $url = 'https://maps.googleapis.com/maps/api/directions/json?' . http_build_query($param);\n $response = \\Httpful\\Request::get($url)->send();\n $dataResponse = json_decode($response->raw_body, true);\n $dataResponse['halte_id'] = $busRoute['detail_halte']['halte_id'];\n $this->listBusStopDuration[$counter] = $dataResponse;\n $counter++;\n }\n }\n\n $this->makeOrUpdateAllArrivalEstimation();\n }", "title": "" }, { "docid": "ce613d783b0b1f7dd970c56609ce100d", "score": "0.63337034", "text": "public function BusStops()\n {\n $queryBuilder = $this->db->createQueryBuilder();\n $queryBuilder\n ->select('*')\n ->from('Stop','A');\n $statement = $queryBuilder->execute();\n $StopsData = $statement->fetchAll();\n foreach ($StopsData as $StopData) {\n $StopsBusList[$StopData['idStop']] = new Stop($StopData['idStop'], $StopData['nameStop'],$StopData['latitude'], $StopData['longitude']);\n }\n return $StopsData;\n }", "title": "" }, { "docid": "413fb2c412d62e741b8e80745396c264", "score": "0.6316868", "text": "public function getAllRoute(){\r\n\t\treturn $this->db->select('DISTINCT(route_id), origin, destination, route_name')\r\n\t\t\t\t\t\t\t\t\t\t->get('route')->result();\r\n\t}", "title": "" }, { "docid": "508351104f67739ac0a6c8cd51f1701a", "score": "0.625837", "text": "public function filterNearestBusStop(){\n $counter = 0;\n foreach ($this->listBusStopDuration as $durationResponse){\n\n if($counter == 0){\n $this->nearestBusStop = $durationResponse;\n } else{\n if((integer)$durationResponse['routes'][0]['legs'][0]['duration']['value'] < (integer)\n $this->nearestBusStop['routes'][0]['legs'][0]['duration']['value']){\n $this->nearestBusStop = $durationResponse;\n }\n }\n\n $counter++;\n }\n }", "title": "" }, { "docid": "be2b22178550b3a3118a8f04b50a7fc7", "score": "0.62410206", "text": "public function get_stops_from_route($route_id)\n {\n $this->custom_model->check_session();\n\n\n $this->db->select('stop_id');\n $this->db->where('status', \"1\");\n $this->db->where('route_id', $route_id);\n\n $query = $this->db->get('route_stops');\n\n\n\n $stop_id = [];\n foreach ($query->result_array() as $id) {\n $stop_id[] = $id['stop_id'];\n }\n\n $stop_id[] = $this->custom_model->getvalues(\"route\", \"id\", $route_id, \"departing_stop\");\n\n $today = date(\"Y-m-d\");\n $this->db->where(\"status\", \"1\");\n $this->db->order_by(\"id\", \"desc\");\n $this->db->where_in('id', $stop_id);\n $query = $this->db->get('stops');\n return $query->result_array();\n }", "title": "" }, { "docid": "75a6e21daab9c7b99b07f078fec5929c", "score": "0.61993134", "text": "public function getRoutes() ;", "title": "" }, { "docid": "71427d4b7786e09dfae583bb6d00cabf", "score": "0.61973095", "text": "function get_route_list($param) {\r\n\t$route_list = array();\r\n\t$sql = \"SELECT route_id,route_name FROM view_ship_route WHERE flag=1 AND $param\";\r\n\t$result = $GLOBALS['db_read']->getAll($sql);\r\n\tforeach ($result as $key => $val) {\r\n\t\t$route_list[$val['route_id']] = $val['route_name'];\r\n\t}\r\n\treturn $route_list;\r\n}", "title": "" }, { "docid": "c194e167ef657dde00c3bb9732941cc7", "score": "0.614132", "text": "public function getRoutes();", "title": "" }, { "docid": "c194e167ef657dde00c3bb9732941cc7", "score": "0.614132", "text": "public function getRoutes();", "title": "" }, { "docid": "c194e167ef657dde00c3bb9732941cc7", "score": "0.614132", "text": "public function getRoutes();", "title": "" }, { "docid": "c194e167ef657dde00c3bb9732941cc7", "score": "0.614132", "text": "public function getRoutes();", "title": "" }, { "docid": "c194e167ef657dde00c3bb9732941cc7", "score": "0.614132", "text": "public function getRoutes();", "title": "" }, { "docid": "c194e167ef657dde00c3bb9732941cc7", "score": "0.614132", "text": "public function getRoutes();", "title": "" }, { "docid": "6177ef95e5402fafb3b3a8a448704e75", "score": "0.6139709", "text": "public function getForRoutes();", "title": "" }, { "docid": "350dd790e11e729eaac4534e06c42c9e", "score": "0.60398763", "text": "public function nextBusStop($halte_id){\n $arrivalEstimationModel = new ArrivalEstimation();\n try{\n $arrivalEstimation = $arrivalEstimationModel->where('halte_id_tujuan', $halte_id)\n ->orderBy('waktu_kedatangan', 'asc')\n ->take(1)\n ->get()\n ->toArray();\n\n if (isset($arrivalEstimation[0]['rute_id'])) {\n $rute_id = $arrivalEstimation[0]['rute_id'];\n\n $busRouteModel = new BusRoute();\n $busRouteOrder = $busRouteModel->where('rute_id', '=', $rute_id)\n ->where('halte_id', '=', $halte_id)\n ->first();\n\n $nextOrder = array();\n for($i = 0; $i < 3; $i++){\n $nextOrder[$i] = $busRouteOrder['urutan'] + $i + 1;\n }\n\n $busRouteModel = new BusRoute();\n $nextOrder = $busRouteModel->where('rute_id', '=', $rute_id)\n ->whereIn('urutan', $nextOrder)\n ->with('detailHalte')\n ->get()\n ->toArray();\n\n $response = array();\n $response['code'] = 200;\n $response['data'] = $nextOrder;\n } else {\n $response['code'] = 400;\n $response['data']['msg'] = 'could not find nearest bus. Please try again later';\n }\n } catch (\\Exception $e){\n $response['code'] = 500;\n $response['data']['msg'] = 'internal error, please try again later or contact administrator';\n }\n\n\n header(\"Access-Control-Allow-Origin: *\");\n return response()->json($response);\n }", "title": "" }, { "docid": "7ce845e75085a7badde5e720bce7afb5", "score": "0.6008374", "text": "public abstract function getRoutes();", "title": "" }, { "docid": "95a09302c07190b8210f634b70960f3f", "score": "0.6004439", "text": "public function index()\n {\n\t\t //check authorization\n // if(Gate::denies('bus-search'))\n // return redirect('/bus');\n // if (Gate::denies('index')) {\n // return redirect('/bus');\n // }\n //user location\n $latitude = 1.299430;\n $longitude = 103.855669;\n\n //get all bus stops\n $busStops = BusStop::select('id',\n 'name',\n 'description',\n DB::raw('(6371 * acos(cos(radians(latitude)) * cos( radians('.$latitude.')) * cos( radians('.$longitude.') - radians(longitude)) + sin(radians(latitude)) * sin( radians('.$latitude.')))) AS distanceFromUser'))\n ->orderBy('distanceFromUser', 'asc')\n ->get();\n\n $busStopsIds = $this->getArrData($busStops, 'id');\n\n //get all bus assigned to the bus stop\n $busStopScheds = DB::table('bus_stop_schedule')\n ->leftJoin('bus', 'bus.id', '=', 'bus_stop_schedule.bus_id')\n ->select(\n 'bus_stop_schedule.bus_stop_id',\n 'bus_stop_schedule.day',\n 'bus_stop_schedule.time',\n 'bus_stop_schedule.description as sched_desc',\n 'bus.name',\n 'bus.description as bus_desc'\n )\n ->whereIn('bus_stop_id', $busStopsIds)//('bus_stop_id', $busStop->id)\n ->orderByRaw(DB::raw(\"FIELD(bus_stop_schedule.day, 'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY', 'SUNDAY'), `bus_stop_schedule`.`time` asc\"))\n ->get();\n\n //map busses scheduled in the bus stop\n $schedules = [];\n foreach ($busStops as $busStop) {\n $bstop = [\n 'id' => $busStop->id,\n 'name' => $busStop->name,\n 'description' => $busStop->description,\n 'distanceFromUser' => $busStop->distanceFromUser\n ];\n $buses = [];\n foreach ($busStopScheds as $busStopSched) {\n if($busStopSched->bus_stop_id == $busStop->id)\n {\n $buses[] = [\n 'day' => $busStopSched->day,\n 'time' => $busStopSched->time,\n 'name' => $busStopSched->name,\n 'bus_desc' => $busStopSched->bus_desc,\n 'sched_desc' => $busStopSched->sched_desc\n ];\n }\n }\n\n $bstop['buses'] = $buses;\n $schedules[] = $bstop;\n }\n\n return view('bus.search', ['schedules' => $schedules]);\n }", "title": "" }, { "docid": "4c8e39a1ec9fd02f8a7c5dcac92506c1", "score": "0.59979784", "text": "public function getPastRoutes(): array;", "title": "" }, { "docid": "a1233d870df93dfd3ae9852bbab97d75", "score": "0.5948508", "text": "public function getAvailableOtherStops() {\n\t\t$list = array();\n\n\t\t$query = \"SELECT * FROM destinations WHERE _rowid NOT IN (SELECT destination_id FROM trips_stops WHERE trip_id=1);\";\n\t\t$result = mysqli_query($GLOBALS[\"mysql_link\"], $query);\n\t\techo mysqli_error($GLOBALS[\"mysql_link\"]);\n\t\tif ($result && mysqli_num_rows($result)) {\n\t\t\twhile ($row = mysqli_fetch_object($result)) {\n\t\t\t\t$list[$row->_rowid] = $row->title;\n\t\t\t}\n\t\t}\n\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "d12bfcda0025a94d69093ab99ace1bf5", "score": "0.59433794", "text": "public static function getAllRoutes()\n {\n return self::$listRoute;\n }", "title": "" }, { "docid": "2209d9b9cebfd125b0b37d3d7bc2b4c0", "score": "0.5931679", "text": "public function getRoutes (): array;", "title": "" }, { "docid": "86ac78622b182e1d064ca0cdc50b526f", "score": "0.58985496", "text": "public function findRoutes(Request $request)\n {\n $request->validate([\n 'city_to_id' => 'required|numeric|min:1',\n 'city_from_id' => 'required|numeric|min:1',\n ]);\n\n $results = [];\n\n $column = 'city_id';\n $startAirports = Airport::where($column, $request->city_from_id)->get();\n $endAirports = Airport::where($column, $request->city_to_id)->get();\n \n if (!$startAirports || !$endAirports)\n {\n return response()->json(['error' => 'No Airport found in one of the cities'], 404);\n }\n\n $startRoutesList = [];\n foreach ($startAirports as $startAirport)\n {\n $startRoutesList[] = Route::where('source_airport_id', $startAirport->airport_id)->get();\n }\n $endRoutesList = [];\n foreach ($endAirports as $endAirport)\n {\n $endRoutesList[] = Route::where('destination_airport_id', $endAirport->airport_id)->get();\n }\n\n $allRoutes = Route::all();\n $allRoutes = $allRoutes->keyBy('route_id');\n\n $routes = [];\n $second = [];\n $remainingRoutes = [];\n foreach ($startRoutesList as $startRoutes)\n {\n foreach ($startRoutes as $startRoute)\n {\n foreach ($endRoutesList as $endRoutes)\n {\n foreach ($endRoutes as $endRoute)\n {\n // First round\n $foundRoutes = $allRoutes->filter(function($route) use($startRoute, $endRoute) {\n if ($route->source_airport_id == $startRoute->source_airport_id\n && $route->destination_airport_id == $endRoute->destination_airport_id)\n {\n return $route;\n }\n });\n array_push ($routes, $foundRoutes);\n\n foreach ($foundRoutes as $found) {\n $allRoutes->forget($found->route_id);\n }\n\n // Next start and end airports\n $nextStart = [];\n $nextEnd = [];\n if ($startRoute->destination_airport_id !== $endRoute->destination_airport_id) {\n $nextStart = $allRoutes->filter(function($route) use($startRoute) {\n if ($route->source_airport_id == $startRoute->destination_airport_id)\n {\n return $route;\n }\n });\n }\n\n if ($startRoute->source_airport_id !== $endRoute->source_airport_id) {\n $nextEnd = $allRoutes->filter(function($route) use($endRoute) {\n if ($route->destination_airport_id == $endRoute->source_airport_id)\n {\n return $route;\n }\n });\n }\n\n // Second Round\n $foundSecond = $allRoutes->filter(function($route) use($startRoute, $endRoute) {\n if ($route->source_airport_id == $startRoute->source_airport_id\n && $route->destination_airport_id == $endRoute->destination_airport_id)\n {\n return $route;\n }\n });\n\n foreach ($foundSecond as $found) {\n $allRoutes->forget($found->route_id);\n }\n array_push ($second, $foundSecond);\n }\n }\n }\n }\n dd($routes, $second);\n\n return response()->json($results, 200);\n }", "title": "" }, { "docid": "d68494fd36d4ce4f5a4f986fbede80c5", "score": "0.5892498", "text": "public function getRoutes(){\n return $this->routes;\n }", "title": "" }, { "docid": "d68494fd36d4ce4f5a4f986fbede80c5", "score": "0.5892498", "text": "public function getRoutes(){\n return $this->routes;\n }", "title": "" }, { "docid": "8913105bcfc9711b3d31ed61314910cd", "score": "0.58680165", "text": "private function getRoutes() {\n\t\tglobal $echelle;\n\t\t$query = \"SELECT x, y, type_route\n\t\tFROM \".DB_PREFIX.\"route\n\t\tORDER BY x, y, type_route DESC;\";\n\t\t$res = mysql_query($query);\n\t\twhile ($row = mysql_fetch_assoc($res)) {\n\t\t\tif ($row['type_route'] == 'balise') {\n\t\t\t\t$this->routes[] = new Balise(\n\t\t\t\t\t$row['type_route'],\n\t\t\t\t\tnew Point($row['x']*$echelle, $row['y']*-1*$echelle));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->routes[] = new Tuile(\n\t\t\t\t\t$row['type_route'],\n\t\t\t\t\tnew Point($row['x']*$echelle, $row['y']*-1*$echelle));\n\t\t\t}\n\t\t}\n\t\tmysql_free_result($res);\n\t}", "title": "" }, { "docid": "0aacd8b9c533f7b05be5bd25e09ab456", "score": "0.58388424", "text": "public function get_route() {}", "title": "" }, { "docid": "8468c0656307b9da9f5fc6f527f70cea", "score": "0.5833011", "text": "public function getAllBusStop(){\n $busStopModel = new BusStop();\n try{\n $listBusStop = $busStopModel->select('halte_id', 'nama_halte', 'lokasi_halte')\n\t\t ->get()\n ->toArray();\n\n if (isset($listBusStop[0])) {\n $response = array();\n $response['code'] = 200;\n $response['data'] = $listBusStop;\n } else{\n $response['code'] = 400;\n $response['data']['msg'] = 'there is no bus stop could be found, please contact administrator';\n }\n } catch(\\Exception $e){\n $response['code'] = 500;\n $response['data']['msg'] = 'internal error, please try again later or contact administrator';\n }\n\n header(\"Access-Control-Allow-Origin: *\");\n return response()->json($response);\n }", "title": "" }, { "docid": "71f1a39578487e19453992103a0061bb", "score": "0.58291894", "text": "public function routes()\n {\n \treturn (array) $this->routes;\n }", "title": "" }, { "docid": "4b387c9086b32df76f2398434cc0d7a2", "score": "0.5811043", "text": "public function getRoute();", "title": "" }, { "docid": "4b387c9086b32df76f2398434cc0d7a2", "score": "0.5811043", "text": "public function getRoute();", "title": "" }, { "docid": "4b387c9086b32df76f2398434cc0d7a2", "score": "0.5811043", "text": "public function getRoute();", "title": "" }, { "docid": "a843475901417fcf5e2b4ddfc1711467", "score": "0.5797967", "text": "public function get_stops_ticket_from_route($route_id)\n {\n $this->custom_model->check_session();\n\n $array = $this->uri->uri_to_assoc();\n\n $this->db->order_by(\"id\", \"desc\");\n $this->db->where(\"status =\", \"1\");\n $this->db->where(\"route_id =\", $route_id);\n $query = $this->db->get('route_stop_to_stop_price');\n return $query->result_array();\n }", "title": "" }, { "docid": "172c0890a3c126a4583a0914e6a83b7d", "score": "0.57743365", "text": "public function getAvailableDirections(): array;", "title": "" }, { "docid": "4f4246c7601ea49fcee67a4c51a807c8", "score": "0.5771707", "text": "public static function getRoutes(){\n return self::$routes;\n }", "title": "" }, { "docid": "a758c4a10864051f33658cb34051062e", "score": "0.5754643", "text": "public function get_pending_route()\n {\n $this->custom_model->check_session();\n\n\n $array = $this->uri->uri_to_assoc();\n // @JIRA TSM-521\n if (!empty($this->account_info_id)) {\n $this->db->where('account_info_id', $this->account_info_id);\n $this->db->select('r.*, pcs.action');\n $this->db->join('route r', 'r.route_category_id = pcs.category_id');\n $this->db->where('pcs.status', 2);\n $this->db->where('r.status', 2);\n $this->db->order_by('id', 'ESC');\n $results = $this->db->get('permission_category_sub pcs')->result_array();\n // END @JIRA TSM-521\n } else {\n $this->db->order_by(\"id\", \"desc\");\n $this->db->where(\"status =\", \"2\");\n $query = $this->db->get('route');\n $results = $query->result_array();\n }\n return $results;\n }", "title": "" }, { "docid": "2a6b4cf0c83559a221d16b75897f3d9b", "score": "0.57490253", "text": "public function get_stops_from_route_new($route_id)\n {\n $this->custom_model->check_session();\n\n $this->db->select('stop_id');\n $this->db->where('status', \"1\");\n $this->db->where('route_id', $route_id);\n $query = $this->db->get('route_stops');\n $stop_id = [];\n foreach ($query->result_array() as $id) {\n $stop_id[] = $id['stop_id'];\n }\n\n $stop_id[] = $this->custom_model->getvalues(\"route\", \"id\", $route_id, \"departing_stop\");\n\n $today = date(\"Y-m-d\");\n $this->db->where(\"status\", \"1\");\n $this->db->order_by(\"name\");\n // $this->db->where_not_in('id', $stop_id);\n $query = $this->db->get('stops');\n return $query->result_array();\n }", "title": "" }, { "docid": "c42994a84d57040fd8f6971375f07fd0", "score": "0.5739971", "text": "public function getRoutes() {\n\treturn $this->routes;\n}", "title": "" }, { "docid": "a7075b2043d80285fd9151269604ab34", "score": "0.57221204", "text": "private static function getRegexRoutes()\n {\n foreach (self::$routes as $key => $value) {\n unset(self::$routes[$key]);\n\n if (strpos($key, ':') !== false) {\n self::any($key, $value);\n }\n }\n }", "title": "" }, { "docid": "1e94fee5655493b99222954059ff3b1e", "score": "0.57190704", "text": "public function checkBusStopHistory(){\n\n $busStopHistoryModel = new BusStopHistory();\n $busStopHistory = $busStopHistoryModel->where('plat_nomor', '=', $this->plat_nomor)\n ->orderBy('arrival_history', 'desc')\n ->with('routeOrder')\n ->take(1)\n ->get()\n ->toArray();\n\n if(sizeof($busStopHistory > 0) && $busStopHistory!=null){\n $busRouteModel = new BusRoute();\n $lastRouteOrder = $busRouteModel->where('rute_id', '=', $busStopHistory[0]['rute_id'])\n ->orderBy('urutan', 'desc')\n ->take(1)\n ->get()\n ->toArray();\n\n //if bus has reach the last bus stop on its route, then delete related record\n if($busStopHistory[0]['route_order']['urutan'] == $lastRouteOrder[0]['urutan']){\n $busStopHistoryModel = new BusStopHistory();\n $busStopHistoryModel->where('plat_nomor', '=', $this->plat_nomor)\n ->delete();\n }\n }\n }", "title": "" }, { "docid": "e46796566c79c1ef022bb7cabd384226", "score": "0.5718927", "text": "public function getRoutes()\n\t{\n\t\treturn $this->_routes;\n\t}", "title": "" }, { "docid": "df00b675957f02cd133a49c001aac7c1", "score": "0.57175344", "text": "public function getRoutes()\n\t{\n\t\treturn $this->routes;\n\t}", "title": "" }, { "docid": "3e69e06bda669114b077847f7acad147", "score": "0.5717026", "text": "public function getRoutes()\r\n {\r\n return $this->routes;\r\n }", "title": "" }, { "docid": "3e69e06bda669114b077847f7acad147", "score": "0.5717026", "text": "public function getRoutes()\r\n {\r\n return $this->routes;\r\n }", "title": "" }, { "docid": "bb45c3c076dada6422b500eb44e10e38", "score": "0.57057613", "text": "public static function getAllRoutes()\n {\n return self::$routes;\n }", "title": "" }, { "docid": "d0dc000e972f37f107decae8d40bb807", "score": "0.56919265", "text": "public function get_route()\n {\n }", "title": "" }, { "docid": "c225a18df8b3e6539e32f934b87c470f", "score": "0.56868166", "text": "public function getRoutes() {\r\n\t\treturn $this->routes;\r\n\t}", "title": "" }, { "docid": "19fcdcb271a93997c9c540cfb45d9aa4", "score": "0.566173", "text": "public function get_stops_from_dbr($driver_bus_route_id)\n {\n $this->custom_model->check_session();\n\n $this->db->select('route_id');\n $this->db->where('id', $driver_bus_route_id);\n\n $query = $this->db->get('driver_bus_route');\n return $this->get_stops_from_route($query->row()->route_id);\n }", "title": "" }, { "docid": "26b8a8f9ac4451049ef5f39cec005de3", "score": "0.5641586", "text": "public function getRoutes() : array\r\n\t{\r\n\t\treturn $this->routes;\r\n\t}", "title": "" }, { "docid": "838a99f4d00daa0395e54b9c82b53592", "score": "0.56386715", "text": "public static function all()\r\n\t{\r\n\t\treturn self::$_routes;\r\n\t}", "title": "" }, { "docid": "1fe13ca8e825be6abe92282d79dac461", "score": "0.5621305", "text": "public function getRoutes ()\n {\n return $this->routes;\n }", "title": "" }, { "docid": "c4313d2c0ce9f4acf50a392ed7030e36", "score": "0.5614174", "text": "public function getStopsByLocation($coord) {\n\t\t\t$results = $this->queryMBTA(\"stopsbylocation\", \"lat=\" . $coord[0] . \"&lon=\" . $coord[1]);\n\n\t\t\tif ( $this->isError($results) ) {\n\t\t\t\tthrow new libMBTA\\StopNotAvailable($this->isError($results));\n\t\t\t} else {\n\t\t\t\treturn $results;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "34e3ca5f850bb0fb46d013bb6ababd0b", "score": "0.55965555", "text": "public function getRoutes()\n {\n return $this->_routes;\n }", "title": "" }, { "docid": "275ff09d25cdef7fbe2dbc88e27febdf", "score": "0.55929875", "text": "private function getRoutes() {\n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n \n $query->select('*');\n $query->from('#__simplecustomrouter');\n $db->setQuery($query);\n \n try {\n $result = $db->loadObjectList();\n } catch (DatabaseException $e) {\n return null;\n }\n \n return $result;\n }", "title": "" }, { "docid": "4863c9ee61657af7a639a09f0f63e4d0", "score": "0.55871713", "text": "public function routeBuses($route)\n {\n $buses = Bus::where([\n //['terminal_id', Auth::user()->terminal_id],\n ['route_id', $route]\n ])->with('schedule')->withCount('schedule')->get();\n return view('admin.schedule.buses', ['buses' => $buses]);\n }", "title": "" }, { "docid": "d06f00697ecf4df4253b049c5c3082d2", "score": "0.55871385", "text": "public function getRoutes()\n {\n return $this->routes;\n }", "title": "" }, { "docid": "d06f00697ecf4df4253b049c5c3082d2", "score": "0.55871385", "text": "public function getRoutes()\n {\n return $this->routes;\n }", "title": "" }, { "docid": "d06f00697ecf4df4253b049c5c3082d2", "score": "0.55871385", "text": "public function getRoutes()\n {\n return $this->routes;\n }", "title": "" }, { "docid": "d06f00697ecf4df4253b049c5c3082d2", "score": "0.55871385", "text": "public function getRoutes()\n {\n return $this->routes;\n }", "title": "" }, { "docid": "d06f00697ecf4df4253b049c5c3082d2", "score": "0.55871385", "text": "public function getRoutes()\n {\n return $this->routes;\n }", "title": "" }, { "docid": "d06f00697ecf4df4253b049c5c3082d2", "score": "0.55871385", "text": "public function getRoutes()\n {\n return $this->routes;\n }", "title": "" }, { "docid": "d06f00697ecf4df4253b049c5c3082d2", "score": "0.55871385", "text": "public function getRoutes()\n {\n return $this->routes;\n }", "title": "" }, { "docid": "d06f00697ecf4df4253b049c5c3082d2", "score": "0.55871385", "text": "public function getRoutes()\n {\n return $this->routes;\n }", "title": "" }, { "docid": "d5e12bd65c1a404b071124bcdde15a7d", "score": "0.5577704", "text": "public static function SearchGoodRoute($from, $to): array{\n try {\n //Get all trip\n $allTraject = Backend::readData();\n \n //Get one trip having this from\n $trajectFrom = reset(array_filter($allTraject , function($c) use($from){\n return $c->getFrom() === $from;\n }));\n \n //Get one trip having this destination\n $trajectTo = reset(array_filter($allTraject , function($c) use($to){\n return $c->getTo() === $to;\n }));\n \n \n //Check if(one of theses trips exists)\n if($trajectFrom === false || $trajectTo === false){\n throw new Exception(\"We don't know any way to go from $from to $to. \");\n }\n\n //Set to first index trip(from and destination)\n $trajectsForFrom = Backend::GoToFirst($allTraject, $trajectFrom);\n $trajectsForTo = Backend::GoToFirst($allTraject, $trajectTo);\n \n //All trip have source from\n $fileOne = [];\n //All trip have source destination\n $fileTwo = [];\n \n //Save initial from and destination\n $to1 = $to;\n $from1 = $from;\n \n //Set all trip have $from for source (Like tree search algorithme)\n foreach($trajectsForFrom as $card){\n //Check if we have a direct trip\n if($card->getTo() == $to1 && $card->getFrom() == $from1){\n return [$card];\n }\n }\n\n for($i=0; $i<count ($trajectsForFrom); $i++){\n \n if($trajectsForFrom[$i]->getFrom() == $from){\n $fileTemp = array_filter($trajectsForFrom, function($c) use($from) {\n return $c->getFrom() === $from;\n });\n array_push($fileOne, ...$fileTemp);\n $from = $trajectsForFrom[$i]->getTo();\n array_splice($trajectsForFrom, $i,1);\n if(Backend::GetFirstTripByFrom($from) == NULL){\n continue;\n }\n $trajectsForFrom[$i] = Backend::GetFirstTripByFrom($from);\n $i--;\n }\n\n }\n\n //Set all trip have $to for destination (Like tree search algorithme by end)\n for($i=0; $i<count ($trajectsForTo); $i++){\n \n if($trajectsForTo[$i]->getTo() == $to){\n $fileTemp2 = array_filter($trajectsForTo, function($c) use($to) {\n return $c->getTo() === $to;\n });\n array_push($fileTwo, ...$fileTemp2);\n $to = $trajectsForTo[$i]->getFrom();\n array_splice($trajectsForTo, $i,1);\n if(Backend::GetFirstTripByDestination($to) == NULL){\n continue;\n }\n $trajectsForTo[$i] = Backend::GetFirstTripByDestination($to);\n $i--;\n }\n }\n //Intersection is way to get\n $sameTraject = array_intersect($fileOne,$fileTwo);\n \n //Get first node(trip) for travel\n $firstTraject = reset (array_filter($allTraject, function($c) use($sameTraject, $from1){\n foreach($sameTraject as $traject){\n if($c->getFrom() == $from1 && $c->getTo() == $traject->getFrom())\n {\n return true;\n }\n }\n return false;\n }));\n $intersect = [];\n if($firstTraject === false){\n throw new Exception(\"\\n====================We don't know any way to go from $from1 to $to1 =====================\\n\");\n }\n array_push ($intersect, $firstTraject);\n array_push ($intersect, ...array_intersect($fileOne,$fileTwo)); \n return array_unique ($intersect);\n } catch (Exception $e) {\n $message = $e->getMessage();\n echo \"\\n ====================== $message ===================== \";\n return [];\n }\n }", "title": "" }, { "docid": "ea89ea88d791fe5cbf08b4c301292fd1", "score": "0.55698717", "text": "function get_routes() {\r\n return isset($this->routes) ? $this->routes : false;\r\n }", "title": "" }, { "docid": "89a73210b4b3a713a3af49b6210db9e3", "score": "0.5564536", "text": "public function getRoutes() : array {\n return $this->_routes[$this->_mode];\n }", "title": "" }, { "docid": "29975ce8943709015438b98f7792857a", "score": "0.5560521", "text": "protected function getRoutes(): array\n {\n return $this->routes;\n }", "title": "" }, { "docid": "d0069e8bb3b40fbf980a5dda9c7b9e66", "score": "0.55448663", "text": "private function getRoutes()\n {\n return config('health.routes.list');\n }", "title": "" }, { "docid": "93eb254c22fa2db8124683f739448893", "score": "0.553866", "text": "public function checkBusLocationStatus(){\n $this->filterNearestBusStop();\n if($this->nearestBusStop['routes'][0]['legs'][0]['distance']['value']<=15){\n $arrivalEstimationModel = new ArrivalEstimation();\n $arrivalEstimationModel->where('halte_id_tujuan', '=', $this->nearestBusStop['halte_id'])\n ->delete();\n\n $busStop = new BusStop();\n $busStop->where('halte_id', '=', $this->nearestBusStop['halte_id'])\n ->update(['last_bus' => $this->plat_nomor]);\n\n $busStopHistoryModel = new BusStopHistory();\n $busStopHistoryModel->plat_nomor = $this->plat_nomor;\n $busStopHistoryModel->halte_id = $this->nearestBusStop['halte_id'];\n $busStopHistoryModel->rute_id = $this->rute_id;\n $busStopHistoryModel->save();\n }\n }", "title": "" }, { "docid": "e69a3ddfd4df132551ececcd8761c876", "score": "0.5537694", "text": "protected function getRoutes() {\n\t\treturn array_merge_recursive( $this->routes, $this->liteRoutes );\n\t}", "title": "" }, { "docid": "f5ffe2b1e66ae7f6768dbe7bb30504c6", "score": "0.5519351", "text": "function getStops(){\n //getting stops\n $get_data = callAPI('GET', 'https://platform.whereismytransport.com/api/stops?agencies=uCp9CGEAika36aipAPakUQ', false);\n $response = json_decode($get_data, true);\n return $response;\n}", "title": "" }, { "docid": "a04558942032150cb4701996423bb0f2", "score": "0.55182785", "text": "public function getRoutes() {\n return $this->routes;\n }", "title": "" }, { "docid": "51493e0888c1076ec5ebb60932be1e4f", "score": "0.54934204", "text": "public function route_stops($route_id, $for_section_matrix = false)\n {\n $this->custom_model->check_session();\n //$this->logdata();\n // $this->logText(\"step1\");\n $query1 = $this->db->query('SELECT departing_stop as stop_id FROM `route` WHERE id = ' . $route_id);\n //$this->logdata();\n // $this->logText(\"step2\");\n\n //TSM 325 ADD CONDITON section_number !=0 (FIX BUG departing stop don't view again when it looks the way back from end stop back departing_stop)\n $section_order = $for_section_matrix ? 'section_number asc, ' : '';\n $query = $this->db->query(\"select stop_id from route_stops where section_number !=0 and route_id = ${route_id} and status = 1 ORDER BY ${section_order} position asc\");\n //END TSM 325\n $q_array = $query->result_array();\n return array_merge((array) $query1->result_array(), (array) $q_array);\n }", "title": "" }, { "docid": "6210d4eb48f28d106644483ff7d3f3af", "score": "0.5478945", "text": "protected function getRoutes()\n {\n $options = $this->getOptions();\n return $options[self::KEY_ROUTES] ?? [];\n }", "title": "" }, { "docid": "447f8ca1e43b1b78d82a8bb445f8b906", "score": "0.54712105", "text": "public static function route() {\n\t\treturn static::$routing;\n\t}", "title": "" }, { "docid": "7debee657566bad38e7dc25e8403919b", "score": "0.54550713", "text": "public function receive(Request $request){\n\n $sourceLat = $request->get('txtLatitude1');\n $sourceLong = $request->get('txtLongitude1');\n $destinyLat = $request->get('txtLatitude2');\n $destinyLong = $request->get('txtLongitude2');\n\n $response = \\GoogleMaps::load('directions')\n ->setParam ([\n 'origin' => $sourceLat . ',' . $sourceLong,\n 'destination' => $destinyLat . ',' . $destinyLong,\n 'mode' => 'driving',\n 'alternatives' => 'true'\n ])\n ->get();\n\n //get response and define the 3 shortest paths (in time)\n $routes = json_decode($response, true)['routes'];\n $durations = [];\n foreach ($routes as $key => $route) {\n $duration = $route['legs'][0]['duration']['value'];\n $durations[$key] = $duration;\n }\n\n // sort array\n asort($durations, SORT_NUMERIC);\n //get 3 smallest values from array\n $smallest_durations = array_slice($durations, 0, 3, true);\n\n //get the values to return from original routes array\n $origin = [];\n $destination = [];\n $origin['latitude'] = $routes[array_keys($smallest_durations)[0]]['legs'][0]['start_location']['lat'];\n $origin['longitude'] = $routes[array_keys($smallest_durations)[0]]['legs'][0]['start_location']['lng'];\n $origin['address'] = $routes[array_keys($smallest_durations)[0]]['legs'][0]['start_address'];\n $destination['latitude'] = $routes[array_keys($smallest_durations)[0]]['legs'][0]['end_location']['lat'];\n $destination['longitude'] = $routes[array_keys($smallest_durations)[0]]['legs'][0]['end_location']['lng'];\n $destination['address'] = $routes[array_keys($smallest_durations)[0]]['legs'][0]['end_address'];\n $legs = $routes[array_keys($smallest_durations)[0]]['legs'];\n\n\n return response()->json(['origin' => $origin, 'destination' => $destination, 'legs' => $legs]);\n }", "title": "" }, { "docid": "69aeaefcd586967d3174beb6a97e58a9", "score": "0.5437139", "text": "public function getRoutes(): array\n {\n return $this->routes;\n }", "title": "" }, { "docid": "69aeaefcd586967d3174beb6a97e58a9", "score": "0.5437139", "text": "public function getRoutes(): array\n {\n return $this->routes;\n }", "title": "" }, { "docid": "69aeaefcd586967d3174beb6a97e58a9", "score": "0.5437139", "text": "public function getRoutes(): array\n {\n return $this->routes;\n }", "title": "" }, { "docid": "6297a5aaf2527fe05e5de6fac33e2a47", "score": "0.54331625", "text": "function ermittleRouten() {\n eigenschaften::$frachter_routen = array();\n foreach(eigenschaften::$frachter_ids as $frachter_id) {\n $route = @mysql_query(\"SELECT routing_id FROM skrupel_schiffe \n\t\t\t\tWHERE (id='$frachter_id') AND (routing_status=2)\");\n $route = @mysql_fetch_array($route);\n if($route != null) {\n $route = $route['routing_id'];\n $planeten_ids = explode(':', $route);\n eigenschaften::$frachter_routen[] = $planeten_ids;\n }\n }\n }", "title": "" }, { "docid": "bb9ad0aab93efd4b6def9eb38dafab08", "score": "0.54307604", "text": "public function get_matched_route() {}", "title": "" }, { "docid": "b9428ce73383ee08b679ab5a5fd76872", "score": "0.54198784", "text": "public function index()\n {\n $routes = Route::all('start','destination','route_id');\n $stops = Stop::all('stop_name','stop_id');\n $stops_poms = Stop::all('stop_name','stop_id')->toArray();\n\n $stop_infos = array();\n\n foreach($stops_poms as $stops_pom){\n $stop_infos[$stops_pom['stop_id']] = $stops_pom['stop_name'];\n }\n\n return view('routes')\n ->with('routes',$routes)\n ->with('stops',$stops)\n ->with('stop_infos',$stop_infos)\n ->with('stops_poms',$stops_poms);\n }", "title": "" }, { "docid": "51843ecc388edfd9c00009ef9b7b33ac", "score": "0.5410259", "text": "public function detailBusStop($halte_id){\n $busStopModel = new BusStop();\n\t $busRouteModel = new BusRoute();\n\t $arrivalEstimationModel = new ArrivalEstimation();\n\t $busStopHistoryModel = new BusStopHistory();\n\t \n try{\n $busStop = $busStopModel->where('halte_id', '=', $halte_id)\n ->first();\n\t \n if ($busStop!=null) {\n \t//algorithm for searching extra information\n\t $routePass = $busRouteModel->select('rute_id')\n\t\t\t ->where('halte_id', '=', $halte_id)\n\t\t\t ->groupBy('rute_id')\n\t\t\t ->get()\n\t\t\t ->toArray();\n\n $arrivalEstimation = $arrivalEstimationModel->where('halte_id_tujuan', '=', $halte_id)\n ->orderBy('waktu_kedatangan', 'asc')\n ->take(10)\n ->get()\n ->toArray();\n \n $counter = 0;\n $tempContainer = array(); \n foreach ($arrivalEstimation as $value) {\n $urutan = $busRouteModel->select('urutan')\n ->where('rute_id', '=', $value['rute_id'])\n ->first();\n\n $urutan = $urutan['urutan'] + 1; \n\n $toHalte = $busRouteModel->where('rute_id', '=', $value['rute_id'])\n ->where('urutan', '=', $urutan)\n ->with('detailHalte')\n ->first(); \n \n $urutan = $urutan['urutan'] + 1;\n $tempContainer[$counter] = $value;\n $tempContainer[$counter]['to_halte']['halte_id'] = $toHalte['halte_id'];\n $tempContainer[$counter]['to_halte']['nama_halte'] = $toHalte['detailHalte']['nama_halte'];\n $counter++;\n } \n \t\n \t$busStop['rute_pass'] = $routePass;\n\t $busStop['bus_directing'] = $tempContainer;\n $response = array();\n $response['code'] = 200;\n $response['data'] = $busStop;\n } else{\n $response['code'] = 400;\n $response['data']['msg'] = 'bus stop data could not be found, make sure type a correct bus stop identifier';\n }\n } catch(\\Exception $e){\n $response['code'] = 500;\n $response['data']['msg'] = 'internal error, please try again later or contact administrator';\n }\n\n header(\"Access-Control-Allow-Origin: *\");\n return response()->json($response);\n }", "title": "" }, { "docid": "049fb856d99c33a970c7f57af39933f3", "score": "0.540022", "text": "public function schedules()\n {\n return $this->hasMany(BusSchedule::class,'bus_route_id');\n }", "title": "" }, { "docid": "a8e89eaf6ab19317a32e24ef94af1f41", "score": "0.5378549", "text": "public function getRoutes() : array\n {\n return $this->routes;\n }", "title": "" }, { "docid": "a8e89eaf6ab19317a32e24ef94af1f41", "score": "0.5378549", "text": "public function getRoutes() : array\n {\n return $this->routes;\n }", "title": "" }, { "docid": "cee4ecbe8bf225df9b3da2ee0e1228f5", "score": "0.5377512", "text": "protected function getRoutes()\n {\n return json_decode(base64_decode($_ENV[\"PLATFORM_ROUTES\"]), true);\n }", "title": "" }, { "docid": "7327c669d7897affc760c7070439b103", "score": "0.53700006", "text": "public function getStopPointwiseList($conditions='',$limit='',$flag='') {\n \n $query = \"SELECT\n bus_route.routeCode AS RouteName\n , count(bus_stop.busRouteId) AS 'Total Stop Points'\n FROM\n bus_stop\n INNER JOIN bus_route ON (bus_stop.busRouteId = bus_route.busRouteId)\n GROUP BY bus_route.routeCode\n ORDER BY bus_route.routeCode ASC, 'Total Stop Points' ASC $limit \";\n \n if($flag!='') {\n return SystemDatabaseManager::getInstance()->executeField($query,\"Query: $query\"); \n }\n else {\n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }\n }", "title": "" }, { "docid": "31f7b0266e7387c85b3ce1d29639fb9b", "score": "0.53579426", "text": "private function findInLiveboard($lb,$from,$dest,$time){\n\t $newarray = array();\n\t $conn = $this->getConnections($from, $dest, \"depart\", $time, date(\"dmy\"));\n\t $vehicearr=array();\n\t foreach($conn[\"connection\"] as $con){\n\t //DBGecho $con[\"arrival\"][\"vehicle\"];\n\t $vehicearr[sizeof($vehicearr)] = $con[\"arrival\"][\"vehicle\"];\n\t }\n\t foreach($lb[\"departures\"][\"departure\"] as $dep){\n\t if(strtolower($dep[\"station\"]) == strtolower($dest) || in_array($dep[\"vehicle\"],$vehicearr)){\t \n\t\t $newarray[sizeof($newarray)] = $dep;\n\t }\n//DBG echo $dep[\"vehicle\"];\n\t }\n\t unset($lb[\"departures\"][\"departure\"]);\n\t $lb[\"departures\"][\"departure\"] = $newarray;\n\t $lb[\"departures\"][\"number\"] = sizeof($newarray);\n\t return $lb;\n }", "title": "" }, { "docid": "9eab94eee68ce86f279226ded2a4f541", "score": "0.53399205", "text": "public function get_routes($route_namespace = '')\n {\n }", "title": "" }, { "docid": "e9ee538eefcc6b6826a6fcfe4832c110", "score": "0.5333229", "text": "public function get_all_routerboard() {\n $sentence = new SentenceUtil();\n $sentence->fromCommand(\"/system/routerboard/getall\");\n $this->talker->send($sentence);\n $rs = $this->talker->getResult();\n $i = 0;\n if ($i < $rs->size()) {\n return $rs->getResultArray();\n }\n }", "title": "" }, { "docid": "697ae0d786bd036a214ee942fddb7167", "score": "0.53101707", "text": "public function list_route_len(){\n }", "title": "" }, { "docid": "d06655e898e3a75b27180c8a6643a3a2", "score": "0.53072464", "text": "public function selectBusHistory(){\n $busHistoryModel = new BusStopHistory();\n $busHistory = $busHistoryModel->where('plat_nomor', '=', $this->plat_nomor)\n ->get()\n ->toArray();\n $counter = 0;\n foreach($busHistory as $itemBusHistory){\n $this->listBusHistory[$counter] = $itemBusHistory['halte_id'];\n $counter++;\n }\n }", "title": "" }, { "docid": "bb9fb45a312d812c6fc685520b642440", "score": "0.5294642", "text": "function queryRoutes($options = null)\n {\n return $this->_api->newApiCursor('Telerivet_Route', \"{$this->getBaseApiPath()}/routes\", $options);\n }", "title": "" }, { "docid": "f77d71264705dd042f781bafab140e9b", "score": "0.52801126", "text": "public function getRouteOfRequest();", "title": "" }, { "docid": "56c5abc1eae211948f18985b6dbec4cd", "score": "0.5266435", "text": "function getClosestStops($lat,$long){\n\t\t\t$stops = query(\"SELECT * FROM `tbl_bus_stops` \");\n\t\t\tforeach ($stops as $key => $stop) {;\n\t\t\t\t$stops[$key]['distance'] = getLocDistance($stop['bus_stop_lat'],$stop['bus_stop_long'],$lat,$long)['distance'];\n\t\t\t}\n\t\t\tusort($stops, function($a, $b) {\n\t\t\t\t$result = 0;\n\t\t if ($a['distance'] > $b['distance']) {\n\t\t $result = 1;\n\t\t } else if ($a['distance'] < $b['distance']) {\n\t\t $result = -1;\n\t\t }\n\t\t return $result;\n\t\t\t});\n\t\t\treturn $stops;\n\t\t}", "title": "" }, { "docid": "fa0fbf22d24372599ec7e99407469193", "score": "0.52663594", "text": "public function listRoutes($type = 'web')\n\t{\n\t\tif ($type == 'web') {\n\t\t\tinclude_once(\\App::routingPath() . 'Routes.php');\t\n\t\t\t$routes = \\Route::getRoutes();\n\t\t} else if ($type == 'console') {\n\t\t\tinclude_once(\\App::routingPath() . 'Commands.php');\n\t\t\t$routes = \\Command::getCommands();\n\t\t} else {\n\t\t\t$routes = 'No routes found';\n\t\t}\n\t\tdd($routes);\n\t}", "title": "" }, { "docid": "c8f40cec60d38e9d4d5c8fe2b7e8ede7", "score": "0.52631783", "text": "public function routes()\n {\n $list = Route::where('from_terminal_id', Auth::user()->terminal_id)->get();\n return view('admin.schedule.routes', ['list' => $list]);\n }", "title": "" }, { "docid": "e192b71545548bb995194844a991823c", "score": "0.5246238", "text": "public function getDeniedRoutes();", "title": "" }, { "docid": "bb725a3bd8ac8b6c769d62bc842d99f7", "score": "0.52424014", "text": "public function getRoutes()\n {\n $results = [];\n\n foreach ($this->router->getRoutes() as $route) {\n $results[] = $this->getRouteInformation($route);\n }\n\n return array_filter($results);\n }", "title": "" }, { "docid": "bd215e938646995d5a9c3651a0d86240", "score": "0.52412", "text": "abstract protected function getAllOrderRouteName() : string;", "title": "" } ]
cc41d14dadcde804cf3d388200fd8630
Add new outbound arc
[ { "docid": "c35e9af842a101265358e177ce81b40f", "score": "0.6559875", "text": "public function addOutArc(Arc $arc) {\n\t\t$this->outArcs[$arc->getId()] = $arc;\n\t}", "title": "" } ]
[ { "docid": "5634312925a717bd4811a11fc3f295f4", "score": "0.5536611", "text": "public function addInArc(Arc $arc) {\n\t\t$this->inArcs[$arc->getId()] = $arc;\n\t}", "title": "" }, { "docid": "920c37e4c4fe6acca2e85446791e4935", "score": "0.48516396", "text": "public function saveArc() {\n if (isset($this->arc)) {\n file_save_data(serialize($this->arc), $this->temp_file, FILE_EXISTS_REPLACE);\n unset($this->arc);\n }\n }", "title": "" }, { "docid": "8646902219bed612db8459622808d960", "score": "0.4824111", "text": "public function addOutput(PNArc $arc)\n\t{\n\t\t$this->outputs[] = $arc;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "49d661137df3d09a502833ba40a42e9b", "score": "0.4789448", "text": "function addCc($email)\n\t{\n\t\tif (isset($this->_headers['Cc'])) {\n\t\t\t$this->_headers['Cc'] .= \", $email\";\n\t\t} else {\n\t\t\t$this->_headers['Cc'] = $email;\n\t\t}\n\t}", "title": "" }, { "docid": "acc19de366320be215d6e94ad01ce578", "score": "0.47649118", "text": "function __construct($startArc, $endArc){\n parent::__construct(0, 1, 0, $startArc, $endArc);\n\n }", "title": "" }, { "docid": "412410efd5e41faacba400bd21c37acc", "score": "0.4711878", "text": "function AddCc( $recipient ) {\n return $this->_AppendDelimited($this->Cc, $recipient);\n }", "title": "" }, { "docid": "cf2c0514cdf271e44e12ab7c0835662d", "score": "0.47115842", "text": "public function __invoke($total, $remaining, $backwards=false, $radius = null, $padding = null)\n\t{\n\t\t//check for radius/padding override\n\t\t$radius = ($radius===null)?$this->radius:$radius;\n\t\t$padding = ($padding===null)?$this->padding:$padding;\n\n\t\t//center of arc/ellipse\n\t\t$originX = $radius+$padding; \n\t\t$originY = $radius+$padding;\n\t\t\n\t\t//offsets to add to relative position for arc endpoint\n\t\t$startX = 0;\n\t\t$startY = $radius;\n\n\t\t\n\t\t//get coordinates of portion start/end points for divider lines\n\t\t$portionAngleDegrees = (1/$total)*360;\n\t\t$portionAngle = pi()*($portionAngleDegrees)/180;\n\t\t$coordinates = array();\n\t\tfor ($i=0; $i<$total; $i++)\n\t\t{\n\t\t\t$angle = $i*$portionAngle;\n\t\t\t$y = -round(cos($angle)*$radius);\n\t\t\t$x = round(sin($angle)*$radius);\n\t\t\t$coordinates[$i] = array($x, $y);\n\t\t}\n\t\t\n\t\t//other arc params\n\t\t$rotation=0; \n\t\t$missingPercent = ($total - $remaining ) / $total;\n\t\t$angleDegrees = $missingPercent*360;\n\t\t$angle = pi()*($angleDegrees)/180;\n\t\t$largeArc = (int) (($angleDegrees%360) > 180); //large-arc flag, true if angle > 180 degrees\n\t\t$xSign = ($backwards)?-1:1; //invert X if $backwards specified\n\t\t$sweep=($backwards)?0:1; //use other arc section if $backwards specified\n\n\t\t//find arc endpoint with trigenometry\n\t\t$y = -round(cos($angle)*$radius);\n\t\t$x = round(sin($angle)*$radius)*$xSign;\n\t\t$y += $startY;\n\t\t$x += $startX;\n\n\t\t//aggregate html output for svg arc/ellipse\n\t\t$result = \"\";\n\t\t$result .= \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" version=\\\"1.1\\\">\";\n\t\tif ($total === $remaining) //arc start and end point would be the same, so use an ellipse instead\n\t\t{\n\t\t\t$largeArc=1-$largeArc;\n\t\t\t$sweep=1-$sweep;\n\t\t\t$result .= \"<ellipse class=\\\"remaining\\\" cx=\\\"$originX\\\" cy=\\\"$originY\\\" rx=\\\"$radius\\\" ry=\\\"$radius\\\" />\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//draw missing pieces\n\t\t\t$result .= \"<path class=\\\"gone\\\" d=\\\"M $originX,$originY l 0,-$radius a$radius,$radius $rotation $largeArc,$sweep $x, $y z \\\" />\";\n\n\t\t\t//switch arc flags so the other arc in the same circle can be drawn\n\t\t\t$largeArc=1-$largeArc;\n\t\t\t$sweep=1-$sweep;\n\n\t\t\t//draw remaining pieces\n\t\t\t$result .= \"<path class=\\\"remaining\\\" d=\\\"M $originX,$originY l 0,-$radius a$radius,$radius $rotation $largeArc,$sweep $x, $y z \\\" />\";\n\t\t}\n\n\t\t//draw divider lines for each portion, but only if there is more than one portion\n\t\tif (count($coordinates) > 1)\n\t\t{\n\t\t\tforeach ($coordinates as $coordinate)\n\t\t\t{\n\t\t\t\t$result .= \"<path class=\\\"divider\\\" d=\\\"M $originX,$originY l \".$coordinate[0].\",\".$coordinate[1].\" z \\\" />\";\n\t\t\t}\n\t\t}\n\t\t$result .= \"</svg>\";\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "d38a43cab7f47a7a4decc6d8864992e5", "score": "0.4702794", "text": "public function addEdge(DotInterface $path)\n {\n $this->edges[] = $path;\n }", "title": "" }, { "docid": "680de2c728c3962a5c2eca89f4f75d3c", "score": "0.45565853", "text": "public function getOutArcs() {\n\t\treturn $this->outArcs;\n\t}", "title": "" }, { "docid": "d15058729ec542809b5ee8a5fc17badd", "score": "0.4475265", "text": "public function addAssociation(AssociationInterface $association);", "title": "" }, { "docid": "b5652b93e7b7ca8894fe2049ef1f899f", "score": "0.44277543", "text": "public function outlineIcon(): OutlineIconRequestBuilder {\n return new OutlineIconRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "title": "" }, { "docid": "57bc3b6a40fcc7f61b067becf7714102", "score": "0.4420523", "text": "public function arc ($sx, $sy, $ex, $ey, $sd, $ed) {}", "title": "" }, { "docid": "efeaa8d4d7ed24713b00863c40175cea", "score": "0.43989474", "text": "public function addCc ( $cc ) {\n\n if(empty($cc))\n throw new Hoa_Mail_Exception(\n '\"Cc\" could not be empty.', 10);\n\n foreach((array) $cc as $mail => $owner) {\n\n if(is_int($mail))\n $mail = $owner;\n\n $owner = $this->headerEncode($owner);\n\n if(!empty($this->header['header']['Cc']))\n $this->header['header']['Cc'] .= ',' . \"\\n\" .\n ' ' . $owner .\n ' <' . $mail . '>';\n else\n $this->header['header']['Cc'] = $owner . ' <' . $mail . '>';\n }\n\n return true;\n }", "title": "" }, { "docid": "205978c2ffde2416f65f0e45ffc1db06", "score": "0.438451", "text": "static public function addRoutesForConsumer(sfEvent $event)\n {\n $r = $event->getSubject();\n $r->prependRoute('sf_cacophony_connect', new sfRoute('/oauth/connect/:provider', array('module' => 'sfCacophonyConsumer', 'action' => 'connect')));\n $r->prependRoute('sf_cacophony_callback', new sfRoute('/oauth/callback/:provider', array('module' => 'sfCacophonyConsumer', 'action' => 'callback')));\n $r->prependRoute('sf_cacophony_register', new sfRoute('/oauth/register/:provider', array('module' => 'sfCacophonyConsumer', 'action' => 'register')));\n }", "title": "" }, { "docid": "8e93c2b9edea25971310c9f5b10852a0", "score": "0.4359079", "text": "function considine_card_export_action($line_item) {\n if (!in_array($line_item->type, array('envelope', 'card'))) {\n return;\n }\n considine_card_export_line_item($line_item);\n}", "title": "" }, { "docid": "5158d408c0fe901b4b1090c54cd0fae0", "score": "0.4339247", "text": "public function pathEllipticArcAbsolute ($rx, $ry, $x_axis_rotation, $large_arc_flag, $sweep_flag, $x, $y) {}", "title": "" }, { "docid": "5a03ae3f18384f58d95328f008e05b4c", "score": "0.43280137", "text": "public function addAssociation($handle, $macFunc, $secret, $expires)\n {\n $row = $this->_associationsTable->createRow();\n $row->handle = $handle;\n $row->mac_func = trim($macFunc); // trim any extraneous whitespace that $macFunc seems to have\n $row->secret = base64_encode($secret);\n $row->expires = $expires;\n $row->save();\n\n return true;\n }", "title": "" }, { "docid": "157281c89547407df15bd9b5e507d064", "score": "0.4316932", "text": "private function addInvoice($options)\n {\n $this->post->addChild('Reference_No', $options->order_id);\n $this->post->addChild('Reference_3', $options->description);\n\n }", "title": "" }, { "docid": "cb37335945cd16d59c8ac54931e35768", "score": "0.43149465", "text": "function AddCC($address, $name = \"\") {\n $cur = count($this->cc);\n $this->cc[$cur][0] = trim($address);\n $this->cc[$cur][1] = $name;\n }", "title": "" }, { "docid": "760d173c54a523fd5943bf0c4fd79cae", "score": "0.4289018", "text": "public function addIntendedRoute(?FHIRCodeableConcept $intendedRoute = null): object\n\t{\n\t\t$this->_trackValueAdded();\n\t\t$this->intendedRoute[] = $intendedRoute;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1b60eabdfdc15e8f7d4a891149098f5e", "score": "0.42755896", "text": "public function addRelationship(array $relational_filter);", "title": "" }, { "docid": "9ed61a5d6837f95f7a8d55c9c9adc247", "score": "0.42753708", "text": "public function createEdgeToRoom() : void\n {\n $this->edge = $this->createEdge($this->room);\n }", "title": "" }, { "docid": "9be6a9f8a1ab2ca48ee540d9eaf2aaed", "score": "0.42667106", "text": "public function addRecipient($email);", "title": "" }, { "docid": "aa4b84ef6e54131cccb714447bbe269b", "score": "0.42628574", "text": "public function addInput(PNArc $arc)\n\t{\n\t\t$this->inputs[] = $arc;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "9784bbf5b7a5d87a479722f2cbb55a44", "score": "0.42466775", "text": "public static function add(string $identification, string $routing);", "title": "" }, { "docid": "9ef896335c78f2545153564b0ccd04ff", "score": "0.4240206", "text": "function AddBcc( $recipient ) {\n return $this->_AppendDelimited($this->Bcc, $recipient);\n }", "title": "" }, { "docid": "1669085a6312aaf6a22d9d144d9b5128", "score": "0.42173606", "text": "public function addRoute($name, Yaf\\Route_Interface $route) {}", "title": "" }, { "docid": "113eee9ee2c34fcc07809c278e6725b2", "score": "0.42147565", "text": "function append(iUriSequence $appendUri);", "title": "" }, { "docid": "b87856ec0808c507bed1221b4256a9cf", "score": "0.4214111", "text": "function _push($edge, $size = \"100%\")\n {\n if (($edge == IMAGE_GRAPH_AREA_MAX) or (!is_array($this->_alignSize))) {\n $this->_alignSize = array (IMAGE_GRAPH_AREA_LEFT => 0, IMAGE_GRAPH_AREA_TOP => 0, IMAGE_GRAPH_AREA_RIGHT => 0, IMAGE_GRAPH_AREA_BOTTOM => 0);\n } else {\n $this->_alignSize[$edge] = (ereg(\"([0-9]*)\\%\", $size, $result) ? min(100, max(0, $result[1] / 100)) : $size);\n }\n }", "title": "" }, { "docid": "48e9365503bb7e6f258e5a9c22d7d5f5", "score": "0.42098892", "text": "function addPath($src, $dst, $path, &$paths) {\n $paths[] = array_merge(\n array(array(\"ip\" => $src, \"hostname\" => $src)), \n $path, \n array(array(\"ip\" => $dst, \"hostname\" => $dst))); \n}", "title": "" }, { "docid": "4ab434a8ce53db9bc5c27909fe744a71", "score": "0.42089435", "text": "public function add(Invoice $invoice);", "title": "" }, { "docid": "5b40ecd99af4b74e677f77e00f38bf3f", "score": "0.42081282", "text": "function partnership_generate_affiliate_link(){\n\t}", "title": "" }, { "docid": "0bc8e76501915fd34f040ab2fd7e7d25", "score": "0.4206777", "text": "private function getArc(Color $color, $x, $y, $radius, $angle, $width, $start = 0)\n {\n return (new Path(\n $x + $radius * cos(deg2rad($start)),\n $y + $radius * sin(deg2rad($start))\n ))\n ->setFillColor($color)\n ->setStrokeColor($color)\n ->setStrokeWidth(1)\n ->arcTo(\n $x + $radius * cos(deg2rad($start + $angle)),\n $y + $radius * sin(deg2rad($start + $angle)),\n $radius,\n $radius,\n 0,\n $angle > 180,\n 1\n )\n ->lineTo(\n $x + ($radius + $width) * cos(deg2rad($start + $angle)),\n $y + ($radius + $width) * sin(deg2rad($start + $angle))\n )\n ->arcTo(\n $x + ($radius + $width) * cos(deg2rad($start)),\n $y + ($radius + $width) * sin(deg2rad($start)),\n $radius + $width,\n $radius + $width,\n 0,\n $angle > 180,\n 0\n )\n ->lineTo(\n $x + $radius * cos(deg2rad($start)),\n $y + $radius * sin(deg2rad($start))\n );\n }", "title": "" }, { "docid": "4c0f15ca90f84cdffb1f12250a57db9f", "score": "0.42043996", "text": "function addBcc($email)\n\t{\n\t\tif (isset($this->_headers['Bcc'])) {\n\t\t\t$this->_headers['Bcc'] .= \", $email\";\n\t\t} else {\n\t\t\t$this->_headers['Bcc'] = $email;\n\t\t}\n\t}", "title": "" }, { "docid": "f390cef0f38f76d9f79b1e427f14c9c5", "score": "0.42000055", "text": "public function addRoute(RouteInterface $route): RouteInterface;", "title": "" }, { "docid": "cc5f03601474d477c34577f8f95fcc8a", "score": "0.41897988", "text": "public function addRoute(array $route);", "title": "" }, { "docid": "e520b9b44e890c7ce3df99035410d4e5", "score": "0.4181377", "text": "public function addRoute(RouteInterface $route);", "title": "" }, { "docid": "426fff6a0420aa6bcf8f3d102659a6c7", "score": "0.41704872", "text": "public function addCc($cc)\n\t{\n\t\t$this->MMM_CC = str_replace(\"\\n\", ' ', str_replace(\"\\r\", '', $cc));\n\t}", "title": "" }, { "docid": "d923276ab7ee78cea6aac97da8362881", "score": "0.41562998", "text": "public function edge($parent, $child);", "title": "" }, { "docid": "c17a237386f7ff3c43680528501b111c", "score": "0.41529077", "text": "public function getArcs()\n {\n return $this->arcs;\n }", "title": "" }, { "docid": "414ba317ee388bd119d38c6b1db8a025", "score": "0.41478047", "text": "public function addLineItem($line_item) {\n $this->links->LineItems[] = $line_item;\n }", "title": "" }, { "docid": "f8128b474933eefcb0f9ad0d437b6668", "score": "0.4143527", "text": "function AddAddress($address, $name = '') {\r\n $cur = count($this->to);\r\n $this->to[$cur][0] = trim($address);\r\n $this->to[$cur][1] = $name;\r\n }", "title": "" }, { "docid": "74538c747ca8bf9b8a499efcc20aed00", "score": "0.41410697", "text": "public function addEdge(EdgeInterface $edge): void\n {\n $this->vertexEdges[] = $edge;\n }", "title": "" }, { "docid": "e436c736193038547921236e1405aa7d", "score": "0.4123376", "text": "public function outbound(): Outbound\r\n {\r\n $outbound = new Outbound($this);\r\n return $outbound;\r\n }", "title": "" }, { "docid": "fe42ecdd460c350e991c461faf9c07c2", "score": "0.41209736", "text": "public function addACL(ACLInterface $acl): void\n {\n $this->acls[] = $acl;\n }", "title": "" }, { "docid": "c8de3e66771350864bcd17efdc78c3e3", "score": "0.41206545", "text": "function AddBCC($address, $name = \"\") {\n $cur = count($this->bcc);\n $this->bcc[$cur][0] = trim($address);\n $this->bcc[$cur][1] = $name;\n }", "title": "" }, { "docid": "68f2dbb5b13d28da603eb70d986d324f", "score": "0.41107175", "text": "public function add(NodeConnectionInterface $connection);", "title": "" }, { "docid": "f8532156dfc7b0bad9eb105efdc06767", "score": "0.4110114", "text": "protected function addNewAddress()\n {\n $this->_rootElement->find($this->addNewAddress)->click();\n }", "title": "" }, { "docid": "5d389876d1b6feb1707a1c3bbc4a761c", "score": "0.41079888", "text": "function appendObject($ossClient,$bucket){\n\t$object = \"g.file\";\n\t$content_array = array('Hello OSS', 'Hi OSS');\n\t$options = array(\n\t\tOssClient::OSS_HEADERS => array(\n\t\t\t'x-oss-tagging' => 'key1=value1&key2=value2',\n\t\t));\n\t\n\ttry {\n\t\t$position = $ossClient->appendObject($bucket, $object, $content_array[0], 0, $options);\n\t\tprintf($content_array[0].' append object Success'.PHP_EOL);\n\t\t$position = $ossClient->appendObject($bucket, $object, $content_array[1], $position);\n\t\tprintf($content_array[1].' append object Success'.PHP_EOL);\n\t} catch (OssException $e) {\n\t\tprintf(__FUNCTION__ . \": FAILED\\n\");\n\t\tprintf($e->getMessage() . \"\\n\");\n\t\treturn;\n\t}\n\t\n\tprint(__FUNCTION__ . \": OK\" . \"\\n\");\n}", "title": "" }, { "docid": "d2badda0b16655554eddb5f96e55b8c6", "score": "0.4106832", "text": "function AddAddress($address, $name = \"\") {\n $cur = count($this->to);\n $this->to[$cur][0] = trim($address);\n $this->to[$cur][1] = $name;\n }", "title": "" }, { "docid": "b6d402d137d45850f61b24d04977fa37", "score": "0.41015178", "text": "public function addRoute(Route $Route);", "title": "" }, { "docid": "883eb5f3b7c1b97863fab6e832fd0cd1", "score": "0.40995285", "text": "public function AddSliceToCSIM($i, $xc, $yc, $radius, $sa, $ea)\n\t{\n\t\twhile ($sa > 2 * M_PI) {\n\t\t\t$sa = $sa - 2 * M_PI;\n\t\t}\n\n\t\twhile ($ea > 2 * M_PI) {\n\t\t\t$ea = $ea - 2 * M_PI;\n\t\t}\n\n\t\t$sa = 2 * M_PI - $sa;\n\t\t$ea = 2 * M_PI - $ea;\n\n\t\t// Special case when we have only one slice since then both start and end\n\t\t// angle will be == 0\n\t\tif (abs($sa - $ea) < 0.0001) {\n\t\t\t$sa = 2 * M_PI;\n\t\t\t$ea = 0;\n\t\t}\n\n\t\t// Add inner circle first point\n\t\t$xp\t = floor(($this->imidsize * $radius * cos($ea)) + $xc);\n\t\t$yp\t = floor($yc - ($this->imidsize * $radius * sin($ea)));\n\t\t$coords = \"${xp}, ${yp}\";\n\n\t\t//add coordinates every 0.25 radians\n\t\t$a = $ea + 0.25;\n\n\t\t// If we cross the 360-limit with a slice we need to handle\n\t\t// the fact that end angle is smaller than start\n\t\tif ($sa < $ea) {\n\t\t\twhile ($a <= 2 * M_PI) {\n\t\t\t\t$xp = floor($radius * cos($a) + $xc);\n\t\t\t\t$yp = floor($yc - $radius * sin($a));\n\t\t\t\t$coords .= \", ${xp}, ${yp}\";\n\t\t\t\t$a += 0.25;\n\t\t\t}\n\t\t\t$a -= 2 * M_PI;\n\t\t}\n\n\t\twhile ($a < $sa) {\n\t\t\t$xp = floor(($this->imidsize * $radius * cos($a) + $xc));\n\t\t\t$yp = floor($yc - ($this->imidsize * $radius * sin($a)));\n\t\t\t$coords .= \", ${xp}, ${yp}\";\n\t\t\t$a += 0.25;\n\t\t}\n\n\t\t// Make sure we end at the last point\n\t\t$xp = floor(($this->imidsize * $radius * cos($sa) + $xc));\n\t\t$yp = floor($yc - ($this->imidsize * $radius * sin($sa)));\n\t\t$coords .= \", ${xp}, ${yp}\";\n\n\t\t// Straight line to outer circle\n\t\t$xp = floor($radius * cos($sa) + $xc);\n\t\t$yp = floor($yc - $radius * sin($sa));\n\t\t$coords .= \", ${xp}, ${yp}\";\n\n\t\t//add coordinates every 0.25 radians\n\t\t$a = $sa - 0.25;\n\t\twhile ($a > $ea) {\n\t\t\t$xp = floor($radius * cos($a) + $xc);\n\t\t\t$yp = floor($yc - $radius * sin($a));\n\t\t\t$coords .= \", ${xp}, ${yp}\";\n\t\t\t$a -= 0.25;\n\t\t}\n\n\t\t//Add the last point on the arc\n\t\t$xp = floor($radius * cos($ea) + $xc);\n\t\t$yp = floor($yc - $radius * sin($ea));\n\t\t$coords .= \", ${xp}, ${yp}\";\n\n\t\t// Close the arc\n\t\t$xp = floor(($this->imidsize * $radius * cos($ea)) + $xc);\n\t\t$yp = floor($yc - ($this->imidsize * $radius * sin($ea)));\n\t\t$coords .= \", ${xp}, ${yp}\";\n\n\t\tif (!empty($this->csimtargets[$i])) {\n\t\t\t$this->csimareas .= \"<area shape=\\\"poly\\\" coords=\\\"${coords}\\\" href=\\\"\" .\n\t\t\t$this->csimtargets[$i] . '\"';\n\t\t\tif (!empty($this->csimwintargets[$i])) {\n\t\t\t\t$this->csimareas .= ' target=\"' . $this->csimwintargets[$i] . '\" ';\n\t\t\t}\n\t\t\tif (!empty($this->csimalts[$i])) {\n\t\t\t\t$tmp = sprintf($this->csimalts[$i], $this->data[$i]);\n\t\t\t\t$this->csimareas .= \" title=\\\"${tmp}\\\" alt=\\\"${tmp}\\\" \";\n\t\t\t}\n\t\t\t$this->csimareas .= \" />\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "3f7cf2c6ed3adeb7373cb7f829601201", "score": "0.4084053", "text": "public function addCircuit( Circuit $circuit );", "title": "" }, { "docid": "ef858c39cdaa50c7b8a1def9737a6df2", "score": "0.4083528", "text": "public function addRelation($association){\r\n\t\t$this->relations[] = $association;\r\n\t}", "title": "" }, { "docid": "cef5f4203403f1af618d7c1af3189707", "score": "0.40736118", "text": "function fn_add_partner_action($action, $banner_id, $partner_id, $customer_id = '', $additional_data = '', $amount = '0', $multi_tier_account = false)\n{\n $auth = & $_SESSION['auth'];\n $payout_types = Registry::get('payout_types');\n\n if (empty($action) || empty($partner_id)) {\n return false;\n }\n if (!$multi_tier_account && AREA != 'A') {\n fn_set_partner_cookie($partner_id);\n }\n\n $data = array();\n $data['banner_id'] = $banner_id;\n $data['partner_id'] = $partner_id;\n $data['customer_id'] = $customer_id;\n $data['date'] = TIME;\n $data['ip'] = ($action == 'init_balance') ? '' : $_SERVER['REMOTE_ADDR'];\n $data['action'] = $action;\n $data['approved'] = (Registry::get('addons.affiliate.automatic_approval_commissions') == 'Y' && $action != 'sale') ? 'Y' : 'N';\n $data['plan_id'] = db_get_field(\"SELECT plan_id FROM ?:aff_partner_profiles WHERE user_id = ?i\", $partner_id);\n if (empty($data['plan_id'])) {\n return false;\n }\n if ($multi_tier_account) {\n $data['amount'] = round($amount, 2);\n } elseif (!empty($payout_types[$action])) {\n $plan_data = fn_get_affiliate_plan_data($data['plan_id']);\n $payout_values = $plan_data['payout_types'];\n $p_value = false;\n if ($action == 'sale' && !empty($additional_data['P'])) {\n $p_value = fn_get_payout_value($data['plan_id'], $additional_data['P'], 'product');\n if ($p_value === false) {\n $product_data = fn_get_product_data($additional_data['P'], $auth);\n if (!empty($product_data['main_category'])) {\n $p_value = fn_get_payout_value($data['plan_id'], $product_data['main_category'], 'category');\n }\n }\n } elseif ($action == 'use_coupon' && !empty($additional_data['D'])) {\n $p_value = fn_get_payout_value($data['plan_id'], $additional_data['D'], 'promotion');\n }\n if ($p_value === false) {\n if (empty($payout_values[$action]) || ($action != 'init_balance' && (empty($payout_types[$action]['default']) || $payout_types[$action]['default'] != 'Y'))) {\n $p_value = array('value' => 0, 'value_type' => 'A');\n } else {\n $p_value = $payout_values[$action];\n }\n }\n $data['amount'] = (@$p_value['value_type'] == 'A') ? @$p_value['value'] : $amount * $p_value['value'] / 100;\n $data['amount'] = round($data['amount'], 2);\n }\n\n $action_id = db_query(\"INSERT INTO ?:aff_partner_actions ?e\", $data);\n if (!empty($action_id)) {\n if (Registry::get('addons.affiliate.automatic_approval_commissions') == 'Y' && $action != 'sale') {\n fn_update_partner_balance($data['partner_id'], $data['amount'], '+');\n }\n if (!empty($additional_data) && is_array($additional_data)) {\n foreach ($additional_data as $object_type => $object_data) {\n $object_type = substr($object_type, 0, 1);\n $object_type = strtoupper($object_type);\n $_data = array('action_id' => $action_id, 'object_data' => $object_data, 'object_type' => $object_type);\n\n db_query(\"INSERT INTO ?:aff_action_links ?e\", $_data);\n }\n }\n if (!$multi_tier_account && $action != 'init_balance') {\n fn_add_commissions_to_multi_tier_affiliates($action, $data['partner_id'], array('commission' => $data['amount'], 'price' => round($amount, 2)), $action_id, $data['customer_id'], $data['banner_id'], $additional_data);\n }\n }\n\n Registry::set('payout_types', $payout_types);\n\n return true;\n}", "title": "" }, { "docid": "4b05a54fc3a90b9461e4bb3797454849", "score": "0.4065611", "text": "public function addRoute($body = [])\n {\n return $this->apiClient->post('/inbound/add-route', $body);\n }", "title": "" }, { "docid": "c0c1c83ab6ccc1a1e3e8a5110c5eabc2", "score": "0.40632075", "text": "public function addAddress(Address $address): void;", "title": "" }, { "docid": "f8918c0691adefa729042c5e0579a0b0", "score": "0.40435037", "text": "public function edgeImage ($radius) {}", "title": "" }, { "docid": "f5869424d2df477ec26de7afb7f97e39", "score": "0.40330553", "text": "private function appendNextAvailability ()\n {\n ( new AssetAvailabilityManagement([\n 'start_time' => $this->startTime,\n 'address_id' => $this->dropAddress->id,\n ], $this->nextAvailability) )->update();\n }", "title": "" }, { "docid": "6a631743a8910694ba3404dcf6742288", "score": "0.40223503", "text": "function addNS($ns)\n\t{\n\t\tif(!isset($this->all_ns[$ns])) {\n\t\t\t$this->all_ns[$ns]['bio2rdf_uri'] = self::base_uri.$ns.':';\n\t\t}\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "47abcd9a1f6fd5c68ca3f44a771a851d", "score": "0.40196887", "text": "public function add($uri) {\r\n $this->_uri[] = $uri;\r\n }", "title": "" }, { "docid": "6da0109a354594d19932338e21b4bbe4", "score": "0.40191585", "text": "public function testAddANode()\n {\n // get node address\n $nodeAddress = json_decode($this->node->retrieveClusterStatus()->getBody()->getContents(), true)['data'][0]['address'];\n\n // prepare document\n $document = new Document();\n $document\n ->setAddress($nodeAddress);\n\n // assert\n $response = $this->node->addANode($document);\n $data = json_decode($response->getBody()->getContents(), true);\n\n $this->assertSame(200, $response->getStatusCode());\n $this->assertSame('OK', $response->getReasonPhrase());\n $this->assertSame(null, $data);\n }", "title": "" }, { "docid": "5694c9bd17a67016b646f913da8ca2c6", "score": "0.4009894", "text": "public function add_cc(string $email, ?string $name = null): mail_interface;", "title": "" }, { "docid": "3a39b954b0b294578e34247b5519feed", "score": "0.40084496", "text": "public function addInvoice()\n {\n }", "title": "" }, { "docid": "09aa4ed082a02cbb999f7c90e68326de", "score": "0.40028554", "text": "public function addAuthenticator(AuthenticatorInterface $authenticator);", "title": "" }, { "docid": "243a2bf413899ae1260e723b395b7e62", "score": "0.40020156", "text": "public function addToParent()\n {\n $this->builder->addRelationshipsCollection(\n $this->factory->createRelationshipsCollection(\n $this->relationships\n )\n );\n }", "title": "" }, { "docid": "03336353243ca94bc4bd3ec9d7b63c8f", "score": "0.39945", "text": "public function createRecipient()\n {\n }", "title": "" }, { "docid": "b3925b0a9ce7cc017971880958e427c9", "score": "0.39930186", "text": "private function addInvoice($options)\n {\n $this->post['CustomerInvoiceRef'] = $options['order_id'];\n $this->post['CustomerInvoiceDescription'] = @$options['description'];\n }", "title": "" }, { "docid": "11ac47554c18e18a51c957c39a8dba55", "score": "0.39911112", "text": "function gd_filled_arc ($image, $cx, $cy, $width, $height, $start, $end, $color, $style)\n{\n return imagefilledarc($image, $cx, $cy, $width, $height, $start, $end, $color, $style);\n}", "title": "" }, { "docid": "cffbd56629be18f5ca7816d556b37648", "score": "0.39882627", "text": "public function edgeImage($radius) {\n\t}", "title": "" }, { "docid": "ef1cf815e3053a1beff6a65e4bcbd567", "score": "0.39879698", "text": "public function setCc($cc);", "title": "" }, { "docid": "4fe206cf07d31303406e4000afbc4161", "score": "0.39873806", "text": "public function setOutputs(array $arcs)\n\t{\n\t\tforeach ($arcs as $arc)\n\t\t{\n\t\t\t$this->addOutput($arc);\n\t\t}\n\t}", "title": "" }, { "docid": "d4a123345562633837aaa23149fd2875", "score": "0.39835623", "text": "public function hookActionPaymentCCAdd()\n {\n }", "title": "" }, { "docid": "f7226f442e724307d640b657d5b0ec93", "score": "0.39834344", "text": "public static function createAssociate($relationship, $descripcion) {\n $relationship->associate(Referente::create(['descripcion' => $descripcion]));\n\t}", "title": "" }, { "docid": "36f8bd720dc5150b463db5b0f649d231", "score": "0.397825", "text": "public function addPath(string $path, string $namespace): void;", "title": "" }, { "docid": "f7fa2aa6bdcf8e129b6f2b7c98ac09a9", "score": "0.39774644", "text": "function PDF_add_outline(PDF $pdf, $text)\n{\n return $pdf->add_outline($text);\n}", "title": "" }, { "docid": "375025b679c9c2d031db3a92049d0e76", "score": "0.39698914", "text": "function add( $destination, $data )\n {\n if ( !$connected ) $this->connect( );\n }", "title": "" }, { "docid": "1b4d27ca88a922e124b1fb8919ecfb0e", "score": "0.39652005", "text": "public function addPath(string $namespace, ?string $path = null): void;", "title": "" }, { "docid": "1b4d27ca88a922e124b1fb8919ecfb0e", "score": "0.39652005", "text": "public function addPath(string $namespace, ?string $path = null): void;", "title": "" }, { "docid": "450a8e5010021a1c695e9c52ce603276", "score": "0.39639705", "text": "function appendPathWay( $name, $link = null ) {\n\n\t\t/*\n\t\t * To provide backward compatability if no second parameter is set\n\t\t * set it to null\n\t\t */\n\t\tif ($link == null) {\n\t\t\t$link = '';\n\t\t}\n\n\t\t// Add item to the pathway object\n\t\tif ($this->_pathway->addItem($name, $link)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n }", "title": "" }, { "docid": "7939793de89d853ab1b6b7cb595fc0a1", "score": "0.39560348", "text": "public function addCc(string $email, string $name = '')\n {\n if ($this->fakeTo) {\n return;\n }\n\n if (is_array($email)) {\n foreach ($email as $addr => $name) {\n $this->mailObj->addCc($addr, $name);\n }\n\n return;\n }\n\n $this->mailObj->addCc($email, $name);\n }", "title": "" }, { "docid": "5f1c2b12892500accae9e836af417332", "score": "0.39510772", "text": "public function add_cc_recipient($address, $name=null) {\n\t\t$this->mailer->add_cc_recipient($address, $name);\n\t}", "title": "" }, { "docid": "39eee988676a8f51aab0ca90abebb977", "score": "0.39438373", "text": "public function addAddress($address);", "title": "" }, { "docid": "775847f5dd236e7eaec5f73ef32f15ab", "score": "0.39407873", "text": "private function addChannelImage($url) {\r\n $image=$this->dom->createElement('image');\r\n $image->setAttribute('rdf:resource',$url);\r\n $this->channel->appendChild($image);\r\n }", "title": "" }, { "docid": "5b434d47e2ea6783a0701db56ec90b64", "score": "0.39407274", "text": "public function testOutboundAppendToCampaignPost()\n {\n }", "title": "" }, { "docid": "08a721762e35d85f1af483b958c4d61e", "score": "0.39386404", "text": "public function add_bcc(string $email, ?string $name = null): mail_interface;", "title": "" }, { "docid": "ada947ef51617c99b3572d2b44e2102e", "score": "0.39330554", "text": "private function defineDestinyAirport(): void\n {\n try {\n $parameters = [\n 'javax.faces.partial.ajax' => 'true',\n 'javax.faces.source' => 'form:destinationId',\n 'javax.faces.partial.execute' => 'form:destinationId',\n 'javax.faces.behavior.event' => 'blur',\n 'javax.faces.partial.event' => 'blur',\n 'form' => 'form',\n 'form:originId_input' => $this->originAirport,\n 'form:j_idt30' => $this->collect,\n 'form:collectCepId' => $this->senderZipCode,\n 'form:destinationId_input' => $this->destinyAirport,\n 'form:j_idt84_input' => 'ALL',\n 'form:j_idt98_input' => 'TAM',\n 'form:j_idt110' => 'P',\n 'form:accordionDC_active' => '0',\n 'form:table_dim_scrollState' => '0,0',\n 'javax.faces.ViewState' => $this->viewStateLogin,\n ];\n\n $promise = $this->client->requestAsync('POST',\n 'https://mycargomanager.appslatam.com/eBusiness-web-1.0-view/private/CreateQuotation.jsf',\n [\n 'form_params' => $parameters,\n 'headers' => $this->mainHeader\n ])->then(function() {\n $this->defineDelivery();\n });\n $promise->wait();\n } catch (RequestException $e) {\n $this->result->status = 'ERROR';\n $this->result->errors[] = 'Curl Error: ' . $e->getMessage();\n }\n }", "title": "" }, { "docid": "311efba079b76d1e1afacc86d678dde7", "score": "0.39323977", "text": "public function createEdge($sourceLabel, $targetLabel, $label);", "title": "" }, { "docid": "9cedef71d3859da3e9532c4ac2dfbc5a", "score": "0.3930933", "text": "public function makecircular()\n {\n $this->lastNode->nextNode = $this->head; \n }", "title": "" }, { "docid": "8c23df8b537e2f81be8203c0a82b8dff", "score": "0.39304072", "text": "public function addRefundedAmount($orderId, $refundedAmount);", "title": "" }, { "docid": "8f503d0cbcb845aaee39594d8ce43bf0", "score": "0.39253846", "text": "public function addCc($emailAddress, $name='')\n {\n Assertion::email($emailAddress);\n $this->cc[$emailAddress] = EmailAddress::create($emailAddress, $name);\n return $this;\n }", "title": "" }, { "docid": "66f85ba93df38637b5122ed927c20943", "score": "0.39223334", "text": "static public function cc( array $cc_params, array $other=[] ): object ;", "title": "" }, { "docid": "d78f1003171d8b49c5f3ab1de80a119d", "score": "0.3918856", "text": "private function _writeAssocationSetEnds(ResourceAssociationSet $associationSet)\n {\n $associationTypeEnd1 = $associationSet->resourceAssociationType->getResourceAssociationTypeEnd($associationSet->getEnd1()->getResourceType(), $associationSet->getEnd1()->getResourceProperty());\n $associationTypeEnd2 = $associationSet->resourceAssociationType->getResourceAssociationTypeEnd($associationSet->getEnd2()->getResourceType(), $associationSet->getEnd2()->getResourceProperty());\n $this->_xmlWriter->startElement(ODataConstants::END);\n $this->_xmlWriter->writeAttribute(ODataConstants::ROLE, $associationTypeEnd1->getName());\n $this->_xmlWriter->writeAttribute(ODataConstants::ENTITY_SET, $associationSet->getEnd1()->getResourceSet()->getName());\n $this->_xmlWriter->endElement();\n $this->_xmlWriter->startElement(ODataConstants::END);\n $this->_xmlWriter->writeAttribute(ODataConstants::ROLE, $associationTypeEnd2->getName());\n $this->_xmlWriter->writeAttribute(ODataConstants::ENTITY_SET, $associationSet->getEnd2()->getResourceSet()->getName());\n $this->_xmlWriter->endElement();\n }", "title": "" }, { "docid": "e568ba41125474ce6987b9d114f6eb89", "score": "0.3918669", "text": "function pshb_add_rdf_ns_link() {\n\techo ' xmlns:atom=\"http://www.w3.org/2005/Atom\" ' . PHP_EOL;\n}", "title": "" }, { "docid": "220ddb83dc8ad867791f9ff444131084", "score": "0.39133668", "text": "public function addDestination($destination) {\n $this->destination[] = $destination;\n return $this;\n }", "title": "" }, { "docid": "8000244985b669be844d648d72ccc12d", "score": "0.39031568", "text": "public function addOwners( $value){\n return $this->_add(6, $value);\n }", "title": "" }, { "docid": "555d664673cbd2f3600fb279d1cffe75", "score": "0.39023185", "text": "private function addObjectNode(HCKmlNode $node, $object, $visibility) {\n\n\t\tif ($object->objectType == HC_OBJECT_TYPE_COLLECTION) {\n\t\t\t$objNode = $node->createAndAppendElementWithAttributes(\"NetworkLink\", array(\n\t\t\t\t\"targetId\" => OBJECT.$object->id,\n\t\t\t));\n\t\t\t\n\t\t\tif ($visibility) {\n\t\t\t\t$objNode->createAndAppendTextNodes(array(\n\t\t\t\t\t\"visibility\" => 1,\n\t\t\t\t\t\"gx:balloonVisibility\" => 1,\n\t\t\t\t\t\"styleUrl\" => \"#\".BALLOON_STYLE,\n\t\t\t\t));\n\t\t\t} else {\n\t\t\t\t$objNode->createAndAppendTextNodes(array(\"visibility\" => 0));\n\t\t\t}\n\t\t} elseif ($object->maps || $object->objects) {\n\t\t\t$objNode = $node->createAndAppendElementWithAttributes(\"Folder\", array(\n\t\t\t\t\"targetId\" => RICH_OBJECT.$object->id,\n\t\t\t));\n\t\t\t// richObject has to add placemark in it for showing ballon\n\t\t\t$pmNode = $node->createAndAppendElementWithAttributes(\"Placemark\", array(\n\t\t\t\t\"targetId\" => OBJECT.$object->id,\n\t\t\t));\n\n\t\t\tif ($visibility) {\n\t\t\t\t$objNode->createAndAppendTextNodes(array(\n\t\t\t\t\t\"visibility\" => 1,\n\t\t\t\t));\n\t\t\t\t$pmNode->createAndAppendTextNodes(array(\n\t\t\t\t\t\"visibility\" => 1,\n\t\t\t\t\t\"gx:balloonVisibility\" => 1,\n\t\t\t\t\t\"styleUrl\" => \"#\".BALLOON_STYLE,\n\t\t\t\t));\n\t\t\t} else {\n\t\t\t\t$objNode->createAndAppendTextNodes(array(\"visibility\" => 0));\n\t\t\t}\n\n\t\t} elseif ($object->objectType == HC_OBJECT_TYPE_KML || $object->objectType == HC_OBJECT_TYPE_3D_NETWORKLINK) {\n\t\t\t$objNode = $node->createAndAppendElementWithAttributes(\"NetworkLink\", array(\n\t\t\t\t\"targetId\" => OBJECT.$object->id,\n\t\t\t));\n\t\t\t\n\t\t\tif ($visibility) {\n\t\t\t\t$objNode->createAndAppendTextNodes(array(\n\t\t\t\t\t\"visibility\" => 1,\n\t\t\t\t\t\"gx:balloonVisibility\" => 1,\n\t\t\t\t\t\"styleUrl\" => \"#\".BALLOON_STYLE,\n\t\t\t\t));\n\t\t\t} else {\n\t\t\t\t$objNode->createAndAppendTextNodes(array(\"visibility\" => 0));\n\t\t\t}\n\t\t} else {\n\t\t\t$objNode = $node->createAndAppendElementWithAttributes(\"Placemark\", array(\n\t\t\t\t\"targetId\" => OBJECT.$object->id,\n\t\t\t));\n\t\t\t\n\t\t\tif ($visibility) {\n\t\t\t\t$objNode->createAndAppendTextNodes(array(\n\t\t\t\t\t\"visibility\" => 1,\n\t\t\t\t\t\"gx:balloonVisibility\" => 1,\n\t\t\t\t\t\"styleUrl\" => \"#\".BALLOON_STYLE,\n\t\t\t\t));\n\t\t\t} else {\n\t\t\t\t$objNode->createAndAppendTextNodes(array(\"visibility\" => 0));\n\t\t\t}\n\t\t}\n\n\t\treturn $objNode;\n\t}", "title": "" }, { "docid": "d0dfe2684a6608c785063be7dd997e21", "score": "0.38964382", "text": "protected function addLicenceOperatingCentre(Aoc $aoc, Licence $licence)\n {\n $loc = new Loc($licence, $aoc->getOperatingCentre());\n $licence->addOperatingCentres($loc);\n $this->updateLicenceOperatingCentre($aoc, $loc);\n }", "title": "" }, { "docid": "403bbc72dc9a17056736c5176089144a", "score": "0.38883233", "text": "public function Add_Event($event)\n\t{\n\t\t// Calculate Interest up to last completed item? Check.\n\t\t$type = $event->type;\n\t\t\n\t\t$principal = NULL;\n\t\t$principal_balance = $this->principal_balance;\n\t\t$total = 0;\n\t\t\n\t\t$this->Log(\"Adding event of type '{$type}' for '{$event->date_event}'\");\n\t\t\n\t\tif($type === 'payment_service_chg') $this->num_scs_payment++;\n\t\tif($type === 'assess_service_chg') $this->num_scs_assessed++;\n\n\t\tforeach($event->amounts as $ea)\n\t\t{\n\t\t\tif(!empty($ea->amount) || $this->skip_first_interest_payment)\n\t\t\t{\n\t\t\t\t$total += $ea->amount;\n\n\t\t\t\tswitch ($ea->event_amount_type)\n\t\t\t\t{\n\t\t\t\t\tcase 'principal' :\n\t\t\t\t\t\t$this->principal_balance = bcadd($this->principal_balance, $ea->amount);\n\t\t\t\t\t\t$principal = $ea->amount;\n\t\t\t\t\t\t$this->Log(\"Adjusted principal balance : {$ea->amount}, Principal Balance: {$this->principal_balance}\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'service_charge' :\n\t\t\t\t\t\t$this->service_charge_balance = bcadd($ea->amount, $this->service_charge_balance);\n\t\t\t\t\t\t$this->Log(\"Adjusted interest balance : {$ea->amount}, Interest Balance: {$this->service_charge_balance}\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'fee' :\n\t\t\t\t\t\t$this->fee_balance = bcadd($ea->amount, $this->fee_balance);\n\t\t\t\t\t\t$this->Log(\"Adjusted fees balance : {$ea->amount}, Fee Balance: {$this->fee_balance}\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t//\tif($total === 0) return;\n\t\t\n//\t\tif($this->rules['service_charge']['svc_charge_type'] === 'Daily')\n//\t\t{\n//\t\t\t$this->Log(\"Attempting to add Daily interest\");\n//\t\t\tif($principal !== NULL)\n//\t\t\t{\n//\t\t\t\t$this->Log(\"Princial = $principal\");\n//\t\t\t\tif($this->last_date === NULL)\n//\t\t\t\t{\n//\t\t\t\t\t$paid_to = Interest_Calculator::getInterestPaidPrincipalAndDate($this->posted_schedule,false);\n//\t\t\t\t\t$first_date = $paid_to['date'];\n//\t\t\t\t\t$this->last_date = $event->date_effective;\n//\t\t\t\t\t$amount = Interest_Calculator::scheduleCalculateInterest($this->rules, $this->posted_schedule, $this->last_date);\n//\t\t\t\t\t$this->Log(\"New interest balance: $amount\");\n//\t\t\t\t\t$this->Add_Interest_Assessment($amount, $first_date, $this->last_date, $event->date_event);\n//\t\t\t\t}\n//\t\t\t\telse if(strtotime($event->date_effective) > strtotime($this->last_date))\n//\t\t\t\t{\n//\t\t\t\t\t$this->Log(\"{$event->date_effective} > {$this->last_date}\");\n//\n//\t\t\t\t\t$interest = Interest_Calculator::calculateDailyInterest($this->rules, $principal_balance, $this->last_date, \n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $event->date_effective);\n//\t\t\t\t\t$this->Add_Interest_Assessment($interest, $this->last_date, $event->date_effective, $event->date_event);\n//\t\t\t\t\t$this->last_date = $event->date_effective;\n//\t\t\t\t}\n//\t\t\t\t$this->Log(\"Comparing {$event->date_event} to {$this->dates['event'][0]}\");\n//\t\t\t\tif(strtotime($event->date_event) === strtotime($this->dates['event'][0]))\n//\t\t\t\t{\n//\t\t\t\t\t$this->Log(\"Dates Match, Interest Balance: {$this->service_charge_balance}\");\n//\t\t\t\t\tif ($this->service_charge_balance > 0 && !$this->skip_first_interest_payment)\n//\t\t\t\t\t{\n//\t\t\t\t\t\t$sc_amounts = array();\n//\t\t\t\t\t\t$sc_amounts[] = Event_Amount::MakeEventAmount('service_charge', -$this->service_charge_balance);\n//\t\t\t\t\t\t$sc_event = Schedule_Event::MakeEvent($this->dates['event'][0],$this->dates['effective'][0],\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $sc_amounts, 'payment_service_chg', \"Interest Payment\");\n//\t\t\t\t\t\t$this->new_events[] = $sc_event;\n//\t\t\t\t\t\t$this->service_charge_balance = 0;\n//\t\t\t\t\t}\n//\t\t\t\t\telse \n//\t\t\t\t\t{\n//\t\t\t\t\t\t$this->skip_first_interest_payment = false;\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\n\t\tif ($total != 0) $this->new_events[] = $event;\n\t}", "title": "" }, { "docid": "9bf8dc7387bf6d51d366ef4c3d5ba13d", "score": "0.38855174", "text": "protected function add_endpoint( $endpoint ) {\n\t\tself::$rest_routes[] = $endpoint;\n\t}", "title": "" } ]
b8bb056d594f8ebc9593620be9acf18c
The emails that belong to this person or organization.
[ { "docid": "776fc579e1bd65098dc2647a75db1012", "score": "0.8190065", "text": "public function getEmails()\n {\n return $this->emails;\n }", "title": "" } ]
[ { "docid": "e39a250dbd66c96082f380090ae8f8bc", "score": "0.82249916", "text": "public function emails()\n {\n return $this->emails;\n }", "title": "" }, { "docid": "7793f6b78c074e14f2b9de6cc9300cab", "score": "0.7905766", "text": "public function getEmails()\n\t{\n \\Phalcon\\DI::getDefault()->get('logger')->log(\"Emails: \" . print_r($this->emails, true));\n\t\treturn $this->emails;\n\t}", "title": "" }, { "docid": "82c7a1a4b9f8e68db238a664454589d7", "score": "0.7708889", "text": "protected function getRecipientEmails()\n {\n return $this->recipients\n ->map(function($user) {\n return $user->{User::COLUMN_EMAIL};\n })\n ->toArray();\n }", "title": "" }, { "docid": "d55230e612e49ad88a02a1f6ee473a55", "score": "0.7704081", "text": "public function getEmails() {\n\t\treturn empty( $this->container['emails'] ) ? null : $this->container['emails'];\n\t}", "title": "" }, { "docid": "97217f464c34d8f28e1cface4113c91b", "score": "0.7623657", "text": "public function GetEmailAddresses()\n {\n $dbTalker = new DbTalker();\n return $dbTalker->GetAllMembersAndEmails();\n }", "title": "" }, { "docid": "dfe7bee103f756ed26dd503b030fa922", "score": "0.7623368", "text": "public function getEmailAddresses()\n {\n return isset($this->EmailAddresses) ? $this->EmailAddresses : null;\n }", "title": "" }, { "docid": "8dc0d411b0eebb2bfc3d6161ba284bca", "score": "0.753788", "text": "public function get_emails() {\n\n\t\t$emails = array();\n\n\t\tforeach ( $this->settings['recipients'] as $item ) {\n\t\t\t$emails[] = $item['value'];\n\t\t}\n\n\t\treturn $emails;\n\t}", "title": "" }, { "docid": "2a1aa95b22f7072041032b47c304234d", "score": "0.74841624", "text": "public function getEmails()\n {\n $response = $this->get('user/emails');\n\n return $response['emails'];\n }", "title": "" }, { "docid": "63ab63a58bd958093439351e4d909146", "score": "0.74795765", "text": "public function emails()\n\t{\n\t\treturn $this->oneToMany(__NAMESPACE__ . '\\\\Mailinglist\\\\Email', 'mid');\n\t}", "title": "" }, { "docid": "a2919ae1c3f03ba0831334604c2b6b66", "score": "0.7323829", "text": "public function getAllEmails() {\n $users = $this->getDoctrine()->getRepository(User::class)->findAll();\n $emails = [];\n foreach($users as $email) {\n if(\"[email protected]\" != $email->getEmail())\n array_push($emails, $email->getEmail());\n }\n\n return $emails;\n }", "title": "" }, { "docid": "691bc552f209845ec79022c287da072f", "score": "0.7275437", "text": "public function getAllEmailAddresses() {\n $saveCurrentFolder = $this->folder;\n $emails = array();\n foreach($this->getFolders() as $folder) {\n $this->selectFolder($folder);\n foreach($this->getMessages(false) as $message) {\n $emails[] = $message['from'];\n $emails = array_merge($emails, $message['to']);\n if (isset($message['cc'])) {\n $emails = array_merge($emails, $message['cc']);\n }\n }\n }\n $this->selectFolder($saveCurrentFolder);\n return array_unique($emails);\n }", "title": "" }, { "docid": "a8c13916442786e409c3c204906a6c3e", "score": "0.7177426", "text": "public function getAllEmails() {\n $this->db->cache = false;\n if (!$this->db->from($this->table)->select('email')->all()) {\n return [];\n }\n return $this->db->from($this->table)->select('email')->all();\n }", "title": "" }, { "docid": "6e8533ebdb1c2fa416927fb922f277f0", "score": "0.71287966", "text": "public function getAllEmail()\n {\n $query = $this->db->select('first_name, last_name, email')\n ->get('user');\n return $query->result_object();\n }", "title": "" }, { "docid": "a7cc08b83b3330eaf861a29face3e1f1", "score": "0.7089606", "text": "public function getWhoToNotifyByEmail()\n\t{\n\t\t//return array\n\t\t$group = Group::model()->findByPk($this->groupId);\n\t\t$emails = $group->getMembersByStatus(User::STATUS_ACTIVE);\n\t\treturn $emails->data;\n\t}", "title": "" }, { "docid": "4bde4a708681e5215bde4ec56bd92c72", "score": "0.7087397", "text": "protected function getEmailNotificationsRecipients()\n {\n return [\n ['address' => null, 'name' => null],\n ];\n }", "title": "" }, { "docid": "10deb6e64e155c4efb30a762dbd7a531", "score": "0.70782363", "text": "public function email()\n {\n return $this->emails && isset($this->emails[0])\n ? $this->emails[0] : null;\n }", "title": "" }, { "docid": "d0e5e7a793d63a49ac35821f2febdc4c", "score": "0.70560974", "text": "public function getNotificationEmailAddresses()\n {\n if (array_key_exists(\"notificationEmailAddresses\", $this->_propDict)) {\n return $this->_propDict[\"notificationEmailAddresses\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "ef72907b7bc9f3f134becd5261a75e6f", "score": "0.7048263", "text": "public function getContactAllEmail()\n\t{\n\t\t$emails = 'nothing';\n\n\t\tif( $this->token != '' )\n\t\t{\n\t\t\t$url = $this->url . \"/Contacts/filter\";\n\t\t\t$filter_arguments = array(\n\t\t\t\t\"offset\" => 0,\n\t\t\t\t\"fields\" => \"id,portal_name\",\n\t\t\t);\n\n\t\t\t$response = self::call($url, $this->token, 'GET',$filter_arguments);\n\n\t\t\t$email_records = $response->records;\n\n\t\t\tforeach($email_records as $record)\n\t\t\t{\n\t\t\t\t$emails[] = $record->portal_name;\n\t\t\t}\n\t\t}\n\n\t\treturn $emails;\n\t}", "title": "" }, { "docid": "4b3d4cc1973e9506ede83557f1b9f866", "score": "0.6964807", "text": "protected function get_notified_email_address()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "d7492d3ca923e88b73d0642188aee686", "score": "0.6948979", "text": "private function emailList()\n {\n return array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n );\n }", "title": "" }, { "docid": "57fe64a6bedb5c4e6b16445a5dc87c0a", "score": "0.6839253", "text": "public function emails()\n {\n return $this->hasMany(Email::class);\n }", "title": "" }, { "docid": "f938bea3a99c78278955fa4d294dcb2e", "score": "0.68305916", "text": "public function emails()\n {\n return $this->hasManyThrough(Contact::class, Profile::class)\n ->select([DB::raw('IFNULL(prefix, \"Email\") AS type'), 'value AS url', 'is_primary'])\n ->where('type', 'email');\n }", "title": "" }, { "docid": "4a13802a72d2ceb4ab700a63e98d07c4", "score": "0.6788644", "text": "public function getSubscriberEmails() {\n $stmt = $this->pdo->query(\"SELECT email\n FROM subscribers\n \");\n $subscribers = [];\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $subscribers[] = $row['email'];\n }\n return $subscribers;\n }", "title": "" }, { "docid": "0fd73e668e65a7ddc49e0d3ada9e18d0", "score": "0.67613935", "text": "public function getEmails()\n {\n if (!isset($this->options['keep'])) {\n throw new BadMethodCallException(\"This function only works with the `keep` option\");\n }\n \n return $this->emails;\n }", "title": "" }, { "docid": "c4f4fc637b6b736dc5b12e5daa800f39", "score": "0.6720578", "text": "private function filterEmailNotificationsRecipients()\n {\n return collect($this->getEmailNotificationsRecipients())\n ->filter(function (array $recipient) {\n return isset($recipient['address'])\n && is_email($recipient['address']);\n })\n ->toArray();\n }", "title": "" }, { "docid": "f21214ec8fcb5b1c0030deb8cf5c8627", "score": "0.6675778", "text": "public function getSentEmails(){\n\t\treturn $this->sent_emails;\n\t}", "title": "" }, { "docid": "712191c4f057103f8f1687fd7aedf314", "score": "0.66611874", "text": "public function getEmailReferrers();", "title": "" }, { "docid": "0a95b682358b30ebeec9479c60638e8d", "score": "0.6654516", "text": "public function getEmailAddress()\n {\n return $this->emailAddress;\n }", "title": "" }, { "docid": "0a95b682358b30ebeec9479c60638e8d", "score": "0.6654516", "text": "public function getEmailAddress()\n {\n return $this->emailAddress;\n }", "title": "" }, { "docid": "5c2aa58b568c5dc26251515cbcc76ed1", "score": "0.66250426", "text": "public function get_email_instance() {\n\n\t\treturn $this->emails;\n\t}", "title": "" }, { "docid": "22b9d5e15266e9c970b28f57a87a68e0", "score": "0.65861267", "text": "public function getMails(): Collection\n {\n\n return $this->mails;\n\n }", "title": "" }, { "docid": "c716b0039a75675e04a2659c68aefa1e", "score": "0.6585644", "text": "public function getEmailAddress()\n {\n // to return email of user even if user->student not exists.\n\n if($this->willUseParentEmail())\n {\n return $this->student->getEmailAddress();\n }\n\n return $this->email;\n }", "title": "" }, { "docid": "a7725fbd89d6780ce563b451c600240b", "score": "0.65830123", "text": "public function getMail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "2dcbf25765c1bdf7fd6935cdb17494e3", "score": "0.65723604", "text": "public function getExtraEmailAddresses(): array\n {\n if (empty($this->extra_emails)) {\n return [];\n }\n\n return collect($this->extra_emails)\n ->map(function ($email) {\n return trim($email['email']);\n })\n ->all();\n }", "title": "" }, { "docid": "490cc5b482da9d324e44f95f33776eb5", "score": "0.65685785", "text": "function getEmails() {\n\treturn db_query(\"SELECT email FROM Emails\");\n}", "title": "" }, { "docid": "c81fceff770a839e85314a72fadac0ab", "score": "0.65594506", "text": "function getRecipients() {\n\t\treturn $this->getData('recipients');\n\t}", "title": "" }, { "docid": "4a4e79594eb2915b35ad0c82aa7d5be3", "score": "0.65519124", "text": "public function getCcEmails()\n {\n return $this->cc_emails;\n }", "title": "" }, { "docid": "679fc81f8c0ab2529138f11cba0fad69", "score": "0.6526922", "text": "public function getRecipients()\r\n {\r\n return ['to' => $this->to, 'cc' => $this->cc, 'bcc' => $this->bcc];\r\n }", "title": "" }, { "docid": "aa073aada724f91adec18867e3d617dc", "score": "0.65116674", "text": "public function emailadressen() {\r\n\t\t$objDBMaillijstEmailAdres = new clsDBMaillijstEmailAdres();\r\n\t\tforeach($objDBMaillijstEmailAdres->selectAll($this->getm_iBedrijfID(), $this->getm_iMaillijstID()) as $rs){\r\n\t\t\tarray_push($this->m_colEmailAdressen,new clsEmailAdres($rs['BedrijfID'],$rs['EmailAdresID'])); // voeg object MaillijstEmailAdres toe aan emailadressen collection\r\n\t\t};\r\n\t \treturn $this->m_colEmailAdressen;\r\n\t}", "title": "" }, { "docid": "5e670ea76b7f2b66f2cfa2863ce0bf46", "score": "0.6501924", "text": "public function getEmail()\r\n\t{\r\n\t\treturn $this['email'];\r\n\t}", "title": "" }, { "docid": "2455df3120e332150e77e9cac861e8cc", "score": "0.64898914", "text": "public function getMailUsers()\n {\n return $this->userRepo->getMailUsers(\\Auth::user()->id);\n }", "title": "" }, { "docid": "3c3bd2d28d54618019fd2ed1fa81ef1c", "score": "0.6489692", "text": "public static function getAllAdminEmails()\n {\n $pdo = static::getDB();\n\n $user_role = User::ROLE_ADMIN;\n\n $sql = \"select email from users where user_role = :email\";\n\n $result = $pdo->prepare($sql);\n \n $result->execute([$user_role]);\n\n return $result->fetchAll(PDO::FETCH_COLUMN, 0); \n }", "title": "" }, { "docid": "dbdd64e0d8c2bd63de1a0e886b508adb", "score": "0.64769506", "text": "public function getCaApprovalCopyToEmails()\n {\n return $this->scopeConfig->getValue(\n self::XML_PATH_APPROVAL_COPY_TO_EMAILS,\n ScopeInterface::SCOPE_STORE\n );\n }", "title": "" }, { "docid": "6b2c15229a1bc46d5db5a5978f570880", "score": "0.647564", "text": "public function getEmail()\n {\n return $this->Email;\n }", "title": "" }, { "docid": "6b2c15229a1bc46d5db5a5978f570880", "score": "0.647564", "text": "public function getEmail()\n {\n return $this->Email;\n }", "title": "" }, { "docid": "a4363ff7a9a1b140573a282472532a94", "score": "0.6467428", "text": "public function getEmail()\n {\n return $this->scopeConfig->getValue(self::XML_PATH_FINDIFY_SMARTCOLLECTIONS_EMAIL, ScopeInterface::SCOPE_STORE);\n }", "title": "" }, { "docid": "4e3d6ca09bb1a3a77b26009d242702de", "score": "0.6460481", "text": "public function getRecipients();", "title": "" }, { "docid": "c251a55210cb83136391c8097ce9764d", "score": "0.64550436", "text": "public function getEmail() {\n return($this->email);\n }", "title": "" }, { "docid": "398e41f42d4b3fd00fe62ef9d9f2d271", "score": "0.644636", "text": "public function getRecipients()\n {\n return $this->getMessage()['recipient'];\n }", "title": "" }, { "docid": "beb15c89eea51a8cbeaa58f493f9bbe9", "score": "0.6435525", "text": "public function getEmail()\n\t{\n\t\treturn $this->correo;\n\t}", "title": "" }, { "docid": "a9728c1618de663fcbf92f483fd8e4ea", "score": "0.6435362", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "a9728c1618de663fcbf92f483fd8e4ea", "score": "0.6435362", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "a9728c1618de663fcbf92f483fd8e4ea", "score": "0.6435362", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "48b99806d453858ed6eddc7b8cab3061", "score": "0.6425965", "text": "public function getEmail()\n {\n return $this->get(self::EMAIL);\n }", "title": "" }, { "docid": "185e32436e95bf50db89d967d75ade3b", "score": "0.64186156", "text": "private function disposableEmailList()\n {\n return array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n );\n }", "title": "" }, { "docid": "0699c97d58e71727f73236cf0961dda6", "score": "0.6415822", "text": "public function getEmail() {\n\t\treturn($this->email);\n\t}", "title": "" }, { "docid": "424052d05d31fbeb258661fb9d69cbb9", "score": "0.6404125", "text": "public function getEmailToAddress() { return $this->_emailToAddress; }", "title": "" }, { "docid": "dfd083cadb99b6b91eadb33d16fed9da", "score": "0.6400584", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dfd083cadb99b6b91eadb33d16fed9da", "score": "0.6400584", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dfd083cadb99b6b91eadb33d16fed9da", "score": "0.6400584", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dfd083cadb99b6b91eadb33d16fed9da", "score": "0.6400584", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dfd083cadb99b6b91eadb33d16fed9da", "score": "0.6400584", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dfd083cadb99b6b91eadb33d16fed9da", "score": "0.6400584", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "65b1cb382097ca47fa9963bc573a4226", "score": "0.6397855", "text": "public function getEmail() \n {\n return $this->email;\n }", "title": "" }, { "docid": "feb5d58e0a9510d36b9626df1a31019f", "score": "0.63948375", "text": "public function getEmail() {\n return $this->get('email', 'user');\n }", "title": "" }, { "docid": "761ca67f0dcf633488473c280841babe", "score": "0.63890016", "text": "public function getEmail()\n {\n return $this->get('Email');\n }", "title": "" }, { "docid": "d25c13bd2a35163590c384bd18c93f23", "score": "0.6386973", "text": "public function getEmail() {\n\t\treturn empty( $this->container['emails'] ) ? null : $this->container['emails'][0];\n\t}", "title": "" }, { "docid": "a9246f82cd7410cb68ad2370ca37c859", "score": "0.6379827", "text": "public function getEmailAddress() : string\n {\n return $this->emailAddress;\n }", "title": "" }, { "docid": "a8e361d2c9649a725922a47704a34d35", "score": "0.6378699", "text": "public function getEmail() {\r\n return $this->email;\r\n }", "title": "" }, { "docid": "ec34b1e1b40d234fbfc9be370d82645c", "score": "0.63687235", "text": "public function getEmail()\n {\n return $this->_email;\n }", "title": "" }, { "docid": "ec34b1e1b40d234fbfc9be370d82645c", "score": "0.63687235", "text": "public function getEmail()\n {\n return $this->_email;\n }", "title": "" }, { "docid": "852ffb5c3706d67e01ae6e79a0af9bc9", "score": "0.63607556", "text": "public function emailAddresses()\n {\n return $this->hasMany(OfficeEmailAddress::class);\n }", "title": "" }, { "docid": "852ffb5c3706d67e01ae6e79a0af9bc9", "score": "0.63607556", "text": "public function emailAddresses()\n {\n return $this->hasMany(OfficeEmailAddress::class);\n }", "title": "" }, { "docid": "3198602f5010bc73b3836432f16fd705", "score": "0.6356047", "text": "public function getEmail() {\n return $this->email;\n }", "title": "" }, { "docid": "3198602f5010bc73b3836432f16fd705", "score": "0.6356047", "text": "public function getEmail() {\n return $this->email;\n }", "title": "" }, { "docid": "3198602f5010bc73b3836432f16fd705", "score": "0.6356047", "text": "public function getEmail() {\n return $this->email;\n }", "title": "" }, { "docid": "3198602f5010bc73b3836432f16fd705", "score": "0.6356047", "text": "public function getEmail() {\n return $this->email;\n }", "title": "" }, { "docid": "3198602f5010bc73b3836432f16fd705", "score": "0.6356047", "text": "public function getEmail() {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dd6c7a13d8063b4eb64b98e4ac912900", "score": "0.634649", "text": "public function getEmail()\n {\n return $this->email;\n }", "title": "" } ]
3719aacf382f08caeb66c449c3e4a385
get all the registered options pages
[ { "docid": "bb7b371a92ba93b67d15540c930a3ffe", "score": "0.6766421", "text": "public function options_boxes()\n {\n if (self::$ewp_options !== false) {\n return self::$ewp_options;\n }\n $optionsPages = apply_filters('awm_add_options_boxes_filter', array());\n /**\n * sort settings by order\n */\n if (!empty($optionsPages)) {\n uasort($optionsPages, function ($a, $b) {\n $first = isset($a['order']) ? $a['order'] : 100;\n $second = isset($b['order']) ? $b['order'] : 100;\n return $first - $second;\n });\n }\n\n\n self::$ewp_options = $optionsPages;\n\n return $optionsPages;\n }", "title": "" } ]
[ { "docid": "af0bb4114aa791470b216c2427ad2cdf", "score": "0.73028016", "text": "public function get_page_type_options()\n {\n }", "title": "" }, { "docid": "7f54bb7e351838c155706df8a27bbec4", "score": "0.7084078", "text": "private static function getPageOptions() {\n\t\treturn self::OPT_TEMPLATE;\n\t}", "title": "" }, { "docid": "9aceac99a967bc6f34c8bf5cc3dce2ac", "score": "0.6872326", "text": "public function options()\n {\n if (request()->has('language')) {\n $pages = HCPagesTranslations::select('record_id as id', 'title', 'language_code')\n ->where('language_code', request('language'));\n\n if (request()->has('type')) {\n $pages->whereHas('record', function ($query) {\n $query->where('type', strtoupper(request('type')));\n });\n }\n\n if (request()->has('q')) {\n $pages->where('title', 'LIKE', '%' . request('q') . '%');\n }\n\n return $pages->get();\n }\n\n return [];\n }", "title": "" }, { "docid": "4f49a40f6fb73b41d23d0485c25d572d", "score": "0.6870399", "text": "public function getUrlOptions()\n\t\t{\n\t\t\t$allPages = Page::sortBy('baseFileName')->lists('title', 'baseFileName');\n\t\t\t$pages = array('');\n\n\t\t\tforeach ($allPages as $key => $value) {\n\t\t\t\t\t$pages[$key] = \"{$value} - (File: $key)\";\n\t\t\t}\n\n\t\t\treturn $pages;\n\t\t}", "title": "" }, { "docid": "de157bea0b5a25e42b58a59391c97195", "score": "0.6852447", "text": "function contact_pages() {\n\t\tglobal $lang;\n\t\t$pages[] = array(\n\t\t\t'func' => 'contact_settings',\n\t\t\t'title' => $lang['contact']['options']\n\t\t);\n\t\treturn $pages;\n\t}", "title": "" }, { "docid": "8048ea3b5c3cacd905f22515be5cf370", "score": "0.6824795", "text": "public function getPageSelectOptions()\n {\n //echo \"I am in Pages Service's getHotelOption<br/>\"; \n $optionsTotal = array();\n //inject default property as Not Assigned \n $hotels = $this->getDefaultEntityManager()->getRepository('Pages\\Entity\\Pages')->findBy(array('status' => 1));\n\n foreach ($hotels as $keyHotel => $valHotel) {\n\n $optionsTotal[$valHotel->getId()] = $valHotel->getDataSection() . '/' . str_replace(\"default\", \"\", $valHotel->getPageKey());\n }\n $optionsUnique = array_unique(($optionsTotal));\n\n natcasesort($optionsUnique);\n $arr1 = array('' => 'Select Pages');\n //$arr1 = array('' => 'Not Assigned'); \n $options = $arr1 + $optionsUnique;\n return $options;\n }", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.67742956", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.67742956", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.67742956", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.67742956", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.67742956", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.67742956", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.67742956", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.67742956", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.67742956", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.67742956", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.67742956", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.67742956", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.67742956", "text": "public function getOptions();", "title": "" }, { "docid": "704b6199c1d9d8e16d54780d430589af", "score": "0.67558956", "text": "public function getPageOptions()\n {\n $result = [];\n\n $pages = $this->listPagesWithCampaignComponent();\n foreach ($pages as $baseName => $page) {\n $result[$baseName] = strlen($page->name) ? $page->name : $baseName;\n }\n\n if (!$result) {\n $result[null] = 'No pages found';\n }\n\n return $result;\n }", "title": "" }, { "docid": "f5cafde3acf20f2c9e32d950a7e3820e", "score": "0.67355496", "text": "function getOptions() {}", "title": "" }, { "docid": "f331e5fbaa8aee6403c6545754a99b5a", "score": "0.66958064", "text": "function get_pages() {\n\t\t\t$pages = get_pages();\n\t\t\t$pages_options = array();\n\t\t\tif ( $pages ) {\n\t\t\t\tforeach ($pages as $page) {\n\t\t\t\t\t$pages_options[$page->ID] = $page->post_title;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $pages_options;\n\t\t}", "title": "" }, { "docid": "3092186b19568ca73857117dd375230c", "score": "0.66850716", "text": "function get_pages() {\n \t$pages = get_pages();\n \t$pages_options = array();\n \tif ( $pages ) {\n \t\tforeach ($pages as $page) {\n \t\t\t$pages_options[$page->ID] = $page->post_title;\n \t\t}\n \t}\n\n \treturn $pages_options;\n }", "title": "" }, { "docid": "028a5aca598da621f3ba202216362c94", "score": "0.66649556", "text": "public function initOptionsPage()\n\t{\n\t\tadd_options_page(\n 'Configuração do WP Zap', // title\n 'WPZap', // menu\n 'manage_options', // capability\n 'wpzap', // \n array($this, 'showOptionsPage')\n \t);\n\t}", "title": "" }, { "docid": "e15bacfc771dad8b21636590645d0e39", "score": "0.6664217", "text": "protected function get_options()\n {\n }", "title": "" }, { "docid": "e57ae1f67914cbb2712a4077e203c0b8", "score": "0.66576976", "text": "function get_pages() {\n $pages = get_pages();\n $pages_options = array();\n if ( $pages ) {\n foreach ($pages as $page) {\n $pages_options[$page->ID] = $page->post_title;\n }\n }\n\n return $pages_options;\n }", "title": "" }, { "docid": "e57ae1f67914cbb2712a4077e203c0b8", "score": "0.66576976", "text": "function get_pages() {\n $pages = get_pages();\n $pages_options = array();\n if ( $pages ) {\n foreach ($pages as $page) {\n $pages_options[$page->ID] = $page->post_title;\n }\n }\n\n return $pages_options;\n }", "title": "" }, { "docid": "e57ae1f67914cbb2712a4077e203c0b8", "score": "0.66576976", "text": "function get_pages() {\n $pages = get_pages();\n $pages_options = array();\n if ( $pages ) {\n foreach ($pages as $page) {\n $pages_options[$page->ID] = $page->post_title;\n }\n }\n\n return $pages_options;\n }", "title": "" }, { "docid": "12563e5ec9858b566949b974107deb61", "score": "0.66458195", "text": "public function renderOptionsPage(): void\n {\n require_once plugin_dir_path(__FILE__) . '../../html/easy-translate-options.php';\n }", "title": "" }, { "docid": "f3ff6dccff5dd0ee0b43c089947c6f52", "score": "0.66289055", "text": "function zn_framework_options_page(){\n\tglobal $options_machine;\n\t\t\n\t$html = new zn_html();\n\n\tglobal $zn_options;\n\n\techo $html->zn_show_options($zn_options); \n\n}", "title": "" }, { "docid": "08b93b3a08955c0a32346045d4abfc0c", "score": "0.6590176", "text": "function vm_options_pages() {\n\n\tadd_theme_page(\n\t\t__( 'Customize Theme', VM_TD ),\n\t\t__( 'Theme options', VM_TD ),\n\t\t'edit_theme_options',\n\t\t'vm-theme-options',\n\t\t'vm_theme_options_markup'\n\t);\n\n\tadd_theme_page(\n\t\t__( 'Customize front-page tiers', VM_TD ),\n\t\t__( 'Front-page Tiers', VM_TD ),\n\t\t'edit_theme_options',\n\t\t'vm-front-page-tiers-options',\n\t\t'vm_front_page_tiers_options_markup'\n\t);\n\n}", "title": "" }, { "docid": "2cbd692ec9dc6554ad67ad4e35dd86ed", "score": "0.65887976", "text": "public function getAll(){\n return $this->options;\n }", "title": "" }, { "docid": "d725d245bc9bd76a26d5186c541a80b8", "score": "0.6564216", "text": "function get_pages() {\n\t\t$pages = get_pages();\n\t\t$pages_options = array();\n\t\tif ( $pages ) {\n\t\t\tforeach ( $pages as $page ) {\n\t\t\t\t$pages_options[ $page->ID ] = $page->post_title;\n\t\t\t}\n\t\t}\n\n\t\treturn $pages_options;\n\t}", "title": "" }, { "docid": "bd451042855266680f23977da988eb73", "score": "0.654759", "text": "public static function pages(): array\n {\n $options = static::options();\n $pages = [];\n\n foreach ($options as $key => $value) {\n array_push($pages, $key, ...(array) $value);\n }\n\n return array_unique($pages);\n }", "title": "" }, { "docid": "2e003eccd46925834199d8867d0cbdc8", "score": "0.65203553", "text": "function site_options_page() {\n include( dirname(__FILE__) . LF_SITE_SETTINGS_PAGE);\n \n }", "title": "" }, { "docid": "fd8a1b8cad5af0fb7dbe22188d1d4add", "score": "0.6516606", "text": "function process_options_pages(){\r\n \r\n // Get task\r\n $options_pages = acf_maybe_get($this->data['tasks'], 'options_pages', array());\r\n \r\n // No taxonomy to process\r\n if(!$options_pages) return;\r\n \r\n // Normal > Single\r\n if(get_field('conversion') === 'normal_to_single'){\r\n \r\n // Check rule\r\n $rule = apply_filters('acfe/modules/single_meta/options', false);\r\n \r\n // All options disabled\r\n if($rule === false){\r\n \r\n // Update data\r\n $this->data['offset'] = -1;\r\n unset($this->data['tasks']['options_pages']); // Remove all options from data\r\n \r\n // Send response\r\n $this->send_response(array(\r\n 'message' => \"<strong>All Options Pages</strong> are excluded from Single Meta module\",\r\n 'status' => 'error',\r\n ));\r\n \r\n }\r\n \r\n }\r\n \r\n // Processing\r\n if($this->data['offset'] === -1){\r\n \r\n // Update data\r\n $this->data['offset'] = 0;\r\n \r\n // Empty response\r\n $this->send_response();\r\n \r\n }\r\n \r\n // Items\r\n $items = array_slice($options_pages, $this->data['offset'], get_field('items_per_request'));\r\n \r\n // Finished\r\n if(!$items){\r\n \r\n // Update data\r\n $this->data['offset'] = -1;\r\n $this->data['tasks']['options_pages'] = array();\r\n \r\n // Empty response\r\n $this->send_response();\r\n \r\n }\r\n \r\n // Temp vars\r\n $left = $this->stats['left'];\r\n $offset = $this->data['offset'];\r\n $converted = $this->data['converted'];\r\n \r\n // Vars\r\n $found = array();\r\n \r\n // Loop items\r\n foreach($items as $item){\r\n \r\n // Vars\r\n $object = acf_get_options_page($item);\r\n $item_id = $object['post_id'];\r\n $title = $object['page_title'];\r\n $link = admin_url(\"admin.php?page={$object['menu_slug']}\");\r\n \r\n // Normal > Single\r\n if(get_field('conversion') === 'normal_to_single'){\r\n \r\n // Check rule\r\n $rule = apply_filters('acfe/modules/single_meta/options', false);\r\n \r\n // Not in allowed rule\r\n if(!empty($rule) && !in_array($item_id, $rule)){\r\n \r\n // Update data\r\n $this->data['offset'] = -1;\r\n $this->data['tasks']['options_pages'] = array_diff($options_pages, array($item)); // Remove current object\r\n \r\n // Send response\r\n $this->send_response(array(\r\n 'message' => \"Processing: <strong>{$title}</strong>. This options page is excluded from Single Meta module\",\r\n 'status' => 'error',\r\n ));\r\n \r\n }\r\n \r\n }\r\n \r\n // Meta\r\n $meta = $this->convert_meta($item_id, $this->confirm); // Confirm = true/false/null (confirm/cancel/doesn't exists)\r\n $count = count($meta);\r\n \r\n // Update vars\r\n $left--;\r\n $offset++;\r\n $converted += $this->confirm ? $count : 0;\r\n \r\n // No convert found\r\n if(!$meta) continue;\r\n \r\n $found['messages'][] = \"Processing: <strong>{$title}</strong> - {$count} meta to convert\";\r\n \r\n $found['debug'][] = array(\r\n 'post_id' => $item_id,\r\n 'title' => $title,\r\n 'convert' => $meta\r\n );\r\n \r\n }\r\n \r\n // Ask confirmation\r\n if($found && $this->confirm === null){\r\n \r\n $found['messages'][] = \"Perform conversion?\";\r\n \r\n // Send response\r\n $this->send_response(array(\r\n 'message' => $found['messages'],\r\n 'debug' => $found['debug'],\r\n 'event' => 'confirm',\r\n 'status' => 'warning',\r\n ));\r\n \r\n }\r\n \r\n // Reset confirm\r\n $this->confirm = null;\r\n \r\n // Update data\r\n $this->stats['left'] = $left;\r\n $this->data['offset'] = $offset;\r\n $this->data['converted'] = $converted;\r\n \r\n // Empty response\r\n $this->send_response();\r\n \r\n }", "title": "" }, { "docid": "e08624b35597f136a2de805a0af27358", "score": "0.6509955", "text": "function target_visitors_add_pages() {\r\n\r\n add_options_page(__('Target Visitors options',\"target_visitors\"), 'Target Visitors', 8, __FILE__, 'target_visitors_options_page');\r\n\r\n}", "title": "" }, { "docid": "391df17c363e694c52bfff56ad04e5c4", "score": "0.6496943", "text": "public function get_options()\n\t{\n\t\treturn get_site_option( SHIBBOLETH_HELPER_OPTIONS, array() );\n\t}", "title": "" }, { "docid": "a25d6160a56a7f6981172498627c4d13", "score": "0.64813066", "text": "public static function options_page() {\n\t\t// add top level menu page.\n\t\tadd_options_page(\n\t\t\tTAO_ScheduleUpdate::$tao_publish_label,\n\t\t\tTAO_ScheduleUpdate::$tao_publish_label,\n\t\t\t'manage_options',\n\t\t\t'tsu',\n\t\t\tarray( __CLASS__, 'options_page_html' )\n\t\t);\n\t}", "title": "" }, { "docid": "e7ec78b31c3992cb0eb4d58b215c3ad8", "score": "0.64788455", "text": "function lkiAdminOptionsPage()\n{\n\tadd_options_page('Lki Feed', 'Lki Feed', 'manage_options', 'lkifeed', 'lkiOptionsPage');\n}", "title": "" }, { "docid": "b65ef9644d2943b5e669824d5ec3f249", "score": "0.6472422", "text": "function theplus_get_pages_list() {\n $page_ids=get_all_page_ids();\n if ( empty( $page_ids ) ) {\n $options = [ '0' => esc_html__( 'Not Page List', 'theplus' ) ];\n } else {\n $options = [ '0' => esc_html__( 'Select Page', 'theplus' ) ];\n \n foreach ( $page_ids as $page ) {\n $options[ $page ] = get_the_title($page);\n }\n }\n\n return $options;\n}", "title": "" }, { "docid": "e7dc8e77308d130b558d61a8fe9e7a88", "score": "0.64636326", "text": "public function get_options() {\n\t\tparent::get_options();\n\t}", "title": "" }, { "docid": "e7dc8e77308d130b558d61a8fe9e7a88", "score": "0.64636326", "text": "public function get_options() {\n\t\tparent::get_options();\n\t}", "title": "" }, { "docid": "c43339e00ddc671c498ea3cf6925ff98", "score": "0.6457477", "text": "public static function options_page()\n\t\t{ \n\t\t\tif (!current_user_can('manage_options')) \n\t\t\t{\n\t\t\t\twp_die( __('You do not have sufficient permissions to access this page.') );\n\t\t\t}\n\t\t\t\n\t\t\t$plugin_id = WOOREMOVEQTYTEXT_ID;\n\t\t\t// display options page\n\t\t\tinclude(self::file_path('options.php'));\n\t\t}", "title": "" }, { "docid": "716e5af72bd54ed08b82e53c7d9708a8", "score": "0.6425863", "text": "public static function get_settings_pages() {\n\t\t\tif ( empty( self::$settings ) ) {\n\t\t\t\t$settings = array();\n\n\t\t\t\tinclude_once( WC()->plugin_path().'/includes/admin/settings/class-wc-settings-page.php' );\n\n\t\t\t\t$settings[] = include( 'settings/wc-crm-settings-general.php' );\n\t\t\t\t$settings[] = include( 'settings/wc-crm-settings-newsletter.php' );\n\t\t\t\t$settings[] = include( 'settings/wc-crm-settings-statuses.php' );\n $settings[] = include( 'settings/wc-crm-settings-indication.php' );\n $settings[] = include( 'settings/wc-crm-settings-validation.php' );\n $settings[] = include( 'settings/wc-crm-settings-woocommerce.php' );\n $settings[] = include( 'settings/wc-crm-settings-updates.php' );\n\n\t\t\t\tself::$settings = apply_filters( 'wc_crm_get_settings_pages', $settings );\n\t\t\t}\n\t\t\treturn self::$settings;\n\t\t}", "title": "" }, { "docid": "cc58ac75c8096c8b9d70c529b657b4ad", "score": "0.6422732", "text": "public function social_options_main_page(){\n\t\t$args = [\n\t\t\t'id' => $this->options_key . '_page',\n\t\t\t'title' => 'Site Options',\n\t\t\t'object_types' => [ 'options-page' ],\n\t\t\t'option_key' => $this->options_key,\n\t\t\t'tab_group' => $this->options_key,\n\t\t\t'tab_title' => 'General',\n\t\t];\n\n\t\t$main_options = new_cmb2_box( $args );\n\t\t/**\n\t\t * Options fields ids only need\n\t\t * to be unique within this box.\n\t\t * Prefix is not needed.\n\t\t */\n\n\t\t$main_options->add_field( [\n\t\t\t'name' => 'Public Phone Number',\n\t\t\t'desc' => 'Your organization\\'s public phone number',\n\t\t\t'id' => 'phone',\n\t\t\t'type' => 'text',\n\t\t] );\n\n\t\t$main_options->add_field( [\n\t\t\t'name' => 'Public Email Address',\n\t\t\t'desc' => 'Your organization\\'s public email address',\n\t\t\t'id' => 'email',\n\t\t\t'type' => 'text',\n\t\t] );\n\n\t\t$main_options->add_field( [\n\t\t\t'name' => 'Facebook Page URL',\n\t\t\t'desc' => 'Insert your Facebook URL here i.e. (https://facebook.com/example/)',\n\t\t\t'id' => 'facebook_url',\n\t\t\t'type' => 'text_url',\n\t\t] );\n\n\t\t$main_options->add_field( [\n\t\t\t'name' => 'Twitter Profile URL',\n\t\t\t'desc' => 'Insert your Twitter URL here (i.e. https://twitter.com/example/)',\n\t\t\t'id' => 'twitter_url',\n\t\t\t'type' => 'text_url',\n\t\t] );\n\n\t\t$main_options->add_field( [\n\t\t\t'name' => 'LinkedIn Page URL',\n\t\t\t'desc' => 'Insert your LinkedIn URL here (i.e. https://linkedin.com/company/example/)',\n\t\t\t'id' => 'linkedin_url',\n\t\t\t'type' => 'text_url',\n\t\t] );\n\n\t\t$main_options->add_field( [\n\t\t\t'name' => 'Instagram Page URL',\n\t\t\t'id' => 'instagram_url',\n\t\t\t'type' => 'text_url',\n\t\t] );\n\n\t\t$main_options->add_field( [\n\t\t\t'name' => 'YouTube Page URL',\n\t\t\t'id' => 'youtube_url',\n\t\t\t'type' => 'text_url',\n\t\t] );\n\n\t\t$main_options->add_field( [\n\t\t\t'name' => 'TikTok URL',\n\t\t\t'id' => 'tiktok_url',\n\t\t\t'type' => 'text_url',\n\t\t] );\n\n\t\t$main_options->add_field( [\n\t\t\t'name' => 'Threads URL',\n\t\t\t'id' => 'threads_url',\n\t\t\t'type' => 'text_url',\n\t\t] );\n\t\t\n\t}", "title": "" }, { "docid": "44f0111fc9a3d66023d06e80ae56068c", "score": "0.64037454", "text": "protected function pages()\n {\n return [];\n }", "title": "" }, { "docid": "612b4bb72b484de0a7197e999a662b78", "score": "0.63722306", "text": "public function register_all_option_page_sections() {\n\t\t// Used quite a lot in the method stored for perf and convenience\n\t\t$page_id = $this->get_menu_slug();\n\n\t\t/**\n\t\t * Run through the provided sections and set them up\n\t\t */\n\t\tforeach ($this->sections as $section_id => $section) {\n\t\t\t/**\n\t\t\t * Add the section\n\t\t\t */\n\t\t\tadd_settings_section( $section_id, $section['title'], null, $page_id );\n\n\t\t\tforeach ( $section['fields'] as $option_id => $field ) {\n\t\t\t\t/**\n\t\t\t\t * Add a new field specifying the options id, it's heading, how it should be output on the page, the\n\t\t\t\t * section it belongs to.\n\t\t\t\t */\n\t\t\t\tadd_settings_field( $option_id, $field['heading'], [ $this, 'add_option' ], $page_id, $section_id, [$option_id, $field['type'], $section_id] );\n\n\t\t\t\t/**\n\t\t\t\t * Then actually add that setting to the current section\n\t\t\t\t */\n\t\t\t\tregister_setting( $page_id . '-options', $option_id );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "cf07af6e189e021b9029310c1e132190", "score": "0.63709974", "text": "private static function admin_pages() {\n\t\t\tglobal $wpseo_admin_pages;\n\n\t\t\treturn $wpseo_admin_pages;\n\t\t}", "title": "" }, { "docid": "a15ff13761ac74e713618e94beade4c3", "score": "0.6370843", "text": "public function setup_options_page() {\n\t\tacf_add_options_sub_page( [\n\t\t\t'page_title' \t=> _x( 'Social Login', 'Social Login page title in WP Admin', 'my-listing' ),\n\t\t\t'menu_title'\t=> _x( 'Social Login', 'Social Login menu title in WP Admin', 'my-listing' ),\n\t\t\t'menu_slug' \t=> 'theme-social-login-settings',\n\t\t\t'capability'\t=> 'manage_options',\n\t\t\t'redirect'\t\t=> false,\n\t\t\t'parent_slug' => 'case27/tools.php',\n\t\t] );\n\t}", "title": "" }, { "docid": "d479353b6a5f5f81468956d18feabb3a", "score": "0.63603544", "text": "public function index()\n {\n $options = Option::orderBy('option_ID', 'asc')->get();\n Session::put('requestReferrer', URL::current());\n return view('options.index')->with('options', $options);\n }", "title": "" }, { "docid": "7839e8d749021f203f96b386e40a7f09", "score": "0.63574743", "text": "function get_page_permission_options(){\n\t\t\t\t$permissions = array(\n\t\t\t\t\t'create',\n\t\t\t\t\t'edit_content',\n\t\t\t\t\t'edit_info',\n\t\t\t\t\t'publish',\n\t\t\t\t\t'reorder',\n\t\t\t\t\t'delete'\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\treturn $permissions;\n\t\t\t}", "title": "" }, { "docid": "440e0d59c614eac07f0a89f4a238e41b", "score": "0.63478404", "text": "public function add_options_page() {\n $this->options_page = add_menu_page( $this->title, $this->title, 'manage_options', self::$key, array( $this, 'admin_page_display' ) );\n }", "title": "" }, { "docid": "440e0d59c614eac07f0a89f4a238e41b", "score": "0.63478404", "text": "public function add_options_page() {\n $this->options_page = add_menu_page( $this->title, $this->title, 'manage_options', self::$key, array( $this, 'admin_page_display' ) );\n }", "title": "" }, { "docid": "597b7b10abf99032e1b23e8e9ccccee3", "score": "0.6339822", "text": "function site_options_page() {\n\n /* Should we display the Enterprise or Regular version of the settings?\n * Needs to be decided by the build process\n * The file gets set in the bash script that builds this.\n * The default is community\n */\n\n include( dirname(__FILE__) . LF_SITE_SETTINGS_PAGE);\n \n }", "title": "" }, { "docid": "80336423cadcd339669a500c39a3c302", "score": "0.6338783", "text": "public function get_submenu_pages()\n {\n }", "title": "" }, { "docid": "80336423cadcd339669a500c39a3c302", "score": "0.63362867", "text": "public function get_submenu_pages()\n {\n }", "title": "" }, { "docid": "9d42c9911076f8d0f4bcbfcb302225e5", "score": "0.63354576", "text": "public function add_options_page() { \r\n add_submenu_page( 'listeo-fields-and-form', 'Search Forms', 'Search Forms', 'manage_options', 'listeo-forms-builder', array( $this, 'output' )); \r\n }", "title": "" }, { "docid": "0fb04491e24682487e8172ad0f89c6fd", "score": "0.63317835", "text": "public static function plugin_options() {\n $tab = $_REQUEST['tab'];\n switch ($tab) {\n case 'advanced':\n return self::plugin_options_advanced();\n case 'debug':\n return self::plugin_options_debug();\n case 'settings':\n default:\n return self::plugin_options_settings();\n }\n }", "title": "" }, { "docid": "a223e583cbbe6d3408d18a09a18668c0", "score": "0.63279444", "text": "public function add_options_page() {\n $this->options_page = add_menu_page( $this->title, $this->title, 'manage_options', $this->key, array( $this, 'admin_page_display' ) );\n }", "title": "" }, { "docid": "69b22aeea37acc24764ebecb2f9fca7d", "score": "0.63251877", "text": "function _page_html(){$options = get_option($this->option_name);?>\n\t\t<div class=\"wrap\">\n\t\t\t<img src=\"<?php echo WPIU_IMG .'32/icon.png';?>\" style=\"margin:14px 6px 0px 0px;float:left;\"/>\n\t\t\t<h2 style=\"display:inline-block;\"><?php echo get_admin_page_title(); ?></h2>\n\r\t\t\t\t<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">\r\t\t\t\t\t<?php settings_fields($this->option_name.'_group');\n\t\t\t\t\t\t\t$options = get_option($this->option_name);\n\t\t\t\t\t\t\tdo_settings_sections(__FILE__); ?>\n\t\t\t\t\t<p><br/><br/><input type=\"submit\" name=\"<?php echo $this->option_name;?>[save]\" value=\"Save Changes\" class=\"button-primary\" /></p>\r\t\t\t\t</form>\r\t\t\t\t<!-- <?php $options = get_option($this->option_name); print_r($options);?> -->\n\t\t\t\t<div class=\"clear\"></div>\n\t\t</div>\r\t<?php \n\t}", "title": "" }, { "docid": "0140a4ebfa1e00fae91cb9038a48bf38", "score": "0.63211554", "text": "function register_spamjirut_options_options_page() {\r\n\tadd_options_page('Spamjirut Configuration', 'Spamjirut', 'manage_options', 'spamjirut_page', 'spamjirut_options_options_page');\r\n}", "title": "" }, { "docid": "16cbb9ceff4410012ba1ec1fd45d8201", "score": "0.6312933", "text": "public function getOptions(): array;", "title": "" }, { "docid": "04f60f81a51a1da1cbf5ddc3f25bfe1d", "score": "0.62996817", "text": "public function toOptionArray()\n {\n $data = [\n ['value' => 'product_page', 'label' => __('Product Page')],\n ['value' => 'category_page', 'label' => __('Category Page')],\n ['value' => 'cms_page_content', 'label' => __('CMS Page Content')],\n ];\n\n if ($this->landingPage->isLandingPageEnabled()) {\n $data[] = ['value' => 'landingpage', 'label' => __('Landing Page')];\n }\n\n return $data;\n }", "title": "" }, { "docid": "db929c41ff87138969fe83bbe792f52d", "score": "0.62920284", "text": "function options() {\r\n\r\n\t\tif (function_exists('add_options_page'))\r\n\t\t\tadd_options_page('Post Thumb Revisited', 'Post Thumb', 8, basename(__FILE__), array(&$this, 'MenuOptions'));\r\n\r\n\t}", "title": "" }, { "docid": "bc2159dcb0d8e0f06fe43ec40f514f5e", "score": "0.6284107", "text": "function add_options_page() {\n\t\t\tif (function_exists('add_options_page')) {\n\t\t\t\tadd_options_page('3rd Party Authentication', '3rd Party Authentication', 9, __FILE__, array(&$this, '_display_options_page'));\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7ee9c2dc69a5d0727875d3c848e593d5", "score": "0.62712294", "text": "public static function get_settings_pages() {\n\t\tif ( empty( self::$settings ) ) {\n\t\t\t$settings = array();\n\n\t\t\t// Load WC_POS_Settings_Page.\n\t\t\tinclude_once WC_POS()->plugin_path() . '/includes/admin/settings/wc-pos-settings-page.php';\n\n\t\t\t$settings[] = include WC_POS()->plugin_path() . '/includes/admin/settings/wc-pos-settings-general.php';\n\t\t\t$settings[] = include WC_POS()->plugin_path() . '/includes/admin/settings/wc-pos-settings-register.php';\n\t\t\t$settings[] = include WC_POS()->plugin_path() . '/includes/admin/settings/wc-pos-settings-tiles.php';\n\t\t\t// $settings[] = include WC_POS()->plugin_path() . '/includes/admin/settings/wc-pos-settings-products.php';\n\t\t\t$settings[] = include WC_POS()->plugin_path() . '/includes/admin/settings/wc-pos-settings-customer.php';\n\t\t\t$settings[] = include WC_POS()->plugin_path() . '/includes/admin/settings/wc-pos-settings-tax.php';\n\t\t\t$settings[] = include WC_POS()->plugin_path() . '/includes/admin/settings/wc-pos-settings-reports.php';\n\t\t\t$settings[] = include WC_POS()->plugin_path() . '/includes/admin/settings/wc-pos-settings-advanced.php';\n\n\t\t\tself::$settings = apply_filters( 'wc_pos_get_settings_pages', $settings );\n\t\t}\n\n\t\treturn self::$settings;\n\t}", "title": "" }, { "docid": "f9e0dac9730ef1faaab8f2aff27ccc3c", "score": "0.62641007", "text": "public function screenOptions() {\n $page = ( isset( $_GET['page'] ) ) ? esc_attr( $_GET['page'] ) : false;\n if( 'snll_network_menu' == $page OR 'snll_admin_menu' == $page ){\n\n $current_screen = get_current_screen();\n\n //define options\n $per_page_field = 'per_page';\n $per_page_option = $current_screen->id . '_' . $per_page_field;\n\n //Save options that were applied\n if( isset( $_REQUEST['wp_screen_options'] ) && isset( $_REQUEST['wp_screen_options']['value'] ) )\n { \n update_option( $per_page_option, esc_html( $_REQUEST['wp_screen_options']['value'] ) );\n } \n\n //prepare options for display\n\n //if per page option is not set, use default\n $per_page_val = get_option( $per_page_option, 20 );\n $args = array( 'label' => __( 'Records', 'sll' ), 'default' => $per_page_val );\n\n //display options\n add_screen_option( $per_page_field, $args );\n $_per_page = get_option( 'users_page_login_log_per_page' );\n\t} else {\n\n\t return;\n\t}\n }", "title": "" }, { "docid": "7512b8fa944ae19099d742ef4ea1a53c", "score": "0.6263024", "text": "function wp_options_page() {\n\t\t$form = ( count($this->_config_form) > 0 ) ? $this->_config_form : $this->_config;\n\t\t\n\t\t$permalink_structure = get_option('permalink_structure');\n\t\tif ( empty($permalink_structure) ) {\n\t $this->errors[] = sprintf(\n\t\t\t $this->__('Please be sure to use mod_rewrite and, by extension, \"nice URLs\" (ie: not \"Default\") in the <a href=\"%s/options-permalink.php\">WordPress permalink structure</a> to setup your Praized Community.</p>'),\n\t\t\t $this->_admin_url\n\t\t\t);\n\t\t\t$this->wp_action_admin_errors();\n\t\t} else {\n\t\t $this->_load_praized();\n\t\t require_once($this->_includes . '/php/config.php');\n }\n\t}", "title": "" }, { "docid": "e59265b0d70c8ebad9243c13bbd261d0", "score": "0.62587315", "text": "public static function getOptions(): array;", "title": "" }, { "docid": "9eb085f6d0127b279505397c448d5950", "score": "0.6253336", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "title": "" }, { "docid": "a7c9b9577b03594b32bcab2f60e7e575", "score": "0.62491196", "text": "function mt_add_pages() {\n add_options_page(__('Nova Settings','menu-test'), __('Nova Settings','menu-test'), 'manage_options', 'acorn-theme-options', 'acorn_settings_page');\n}", "title": "" }, { "docid": "1757494285a85b5c696abea2c0de2398", "score": "0.62489575", "text": "protected function getOptions()\n\t{\n \n return array();\n \n\t}", "title": "" }, { "docid": "86cf3d8efb5fa6e9223dea906b98f2c6", "score": "0.6244718", "text": "function apgmxs_add_pages() {\n\t\tadd_options_page(\"AP Monthly XML Sitemap\", \"Monthly XML Sitemap\", 8, basename(__FILE__), \"apgmxs_admin_page\");\n\t}", "title": "" }, { "docid": "645ac3b646c5d7e320b46e669202389f", "score": "0.6238077", "text": "function of_options()\r\n\t{\r\n\t\t$of_categories \t\t= array(); \r\n\t\t$of_categories_obj \t= get_categories('hide_empty=0');\r\n\t\tforeach ($of_categories_obj as $of_cat) {\r\n\t\t $of_categories[$of_cat->cat_ID] = $of_cat->cat_name;}\r\n\t\t$categories_tmp \t= array_unshift($of_categories, \"Select a category:\"); \r\n\t \r\n\t\t//Access the WordPress Pages via an Array\r\n\t\t$of_pages \t\t\t= array();\r\n\t\t$of_pages_obj \t\t= get_pages('sort_column=post_parent,menu_order'); \r\n\t\tforeach ($of_pages_obj as $of_page) {\r\n\t\t $of_pages[$of_page->ID] = $of_page->post_name; }\r\n\t\t$of_pages_tmp \t\t= array_unshift($of_pages, \"Select a page:\"); \r\n\t\r\n\t\t//Testing \r\n\t\t$of_options_select \t= array(\"one\",\"two\",\"three\",\"four\",\"five\"); \r\n\t\t$of_options_radio \t= array(\"one\" => \"One\",\"two\" => \"Two\",\"three\" => \"Three\",\"four\" => \"Four\",\"five\" => \"Five\");\r\n\t\t\r\n\t\t//Sample Homepage blocks for the layout manager (sorter)\r\n\t\t$of_options_homepage_blocks = array\r\n\t\t( \r\n\t\t\t\"disabled\" => array (\r\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\r\n\t\t\t\t\"module_two\"\t=> \"Module Two\",\r\n\t\t\t\t\"module_three\"\t=> \"Module Three\",\r\n\t\t\t\t\"module_four\"\t=> \"Module Four\",\r\n\t\t\t\t\"module_five\"\t=> \"Module Five\",\t\r\n\t\t\t), \r\n\t\t\t\"enabled\" => array (\r\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\r\n\t\t\t\t\"module_one\"\t=> \"Module One\",\r\n\t\t\t),\r\n\t\t);\r\n\r\n\r\n\t\t//Stylesheets Reader\r\n\t\t$alt_stylesheet_path = LAYOUT_PATH;\r\n\t\t$alt_stylesheets = array();\r\n\t\t\r\n\t\tif ( is_dir($alt_stylesheet_path) ) \r\n\t\t{\r\n\t\t if ($alt_stylesheet_dir = opendir($alt_stylesheet_path) ) \r\n\t\t { \r\n\t\t while ( ($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false ) \r\n\t\t {\r\n\t\t if(stristr($alt_stylesheet_file, \".css\") !== false)\r\n\t\t {\r\n\t\t $alt_stylesheets[] = $alt_stylesheet_file;\r\n\t\t }\r\n\t\t } \r\n\t\t }\r\n\t\t}\r\n\r\n\r\n\t\t//Background Images Reader\r\n\t\t$bg_images_path = get_stylesheet_directory(). '/images/bg/'; // change this to where you store your bg images\r\n\t\t$bg_images_url = get_template_directory_uri().'/images/bg/'; // change this to where you store your bg images\r\n\t\t$bg_images = array();\r\n\t\t\r\n\t\tif ( is_dir($bg_images_path) ) {\r\n\t\t if ($bg_images_dir = opendir($bg_images_path) ) { \r\n\t\t while ( ($bg_images_file = readdir($bg_images_dir)) !== false ) {\r\n\t\t if(stristr($bg_images_file, \".png\") !== false || stristr($bg_images_file, \".jpg\") !== false) {\r\n\t\t $bg_images[] = $bg_images_url . $bg_images_file;\r\n\t\t }\r\n\t\t } \r\n\t\t }\r\n\t\t}\r\n\t\t\r\n\r\n\t\t/*-----------------------------------------------------------------------------------*/\r\n\t\t/* TO DO: Add options/functions that use these */\r\n\t\t/*-----------------------------------------------------------------------------------*/\r\n\t\t\r\n\t\t//More Options\r\n\t\t$uploads_arr \t\t= wp_upload_dir();\r\n\t\t$all_uploads_path \t= $uploads_arr['path'];\r\n\t\t$all_uploads \t\t= get_option('of_uploads');\r\n\t\t$other_entries \t\t= array(\"Select a number:\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\");\r\n\t\t$body_repeat \t\t= array(\"no-repeat\",\"repeat-x\",\"repeat-y\",\"repeat\");\r\n\t\t$body_pos \t\t\t= array(\"top left\",\"top center\",\"top right\",\"center left\",\"center center\",\"center right\",\"bottom left\",\"bottom center\",\"bottom right\");\r\n\t\t\r\n\t\t// Image Alignment radio box\r\n\t\t$of_options_thumb_align = array(\"alignleft\" => \"Left\",\"alignright\" => \"Right\",\"aligncenter\" => \"Center\"); \r\n\t\t\r\n\t\t// Image Links to Options\r\n\t\t$of_options_image_link_to = array(\"image\" => \"The Image\",\"post\" => \"The Post\"); \r\n\r\n\r\n/*-----------------------------------------------------------------------------------*/\r\n/* The Options Array */\r\n/*-----------------------------------------------------------------------------------*/\r\n\r\n// Set the Options Array\r\nglobal $of_options;\r\n$of_options = array();\r\n$url = ADMIN_DIR . 'assets/images/';\r\n\r\n\r\n\r\n/*----------------------------------------------------------------------------------- GENERAL SETTINGS */\r\n$of_options[] = array( \t\"name\" \t\t=> \"General Settings\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Hello There', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"introduction\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"<h3 style=\\\"margin: 0 0 10px;\\\">Welcome to The News Option Panel</h3>\r\n\t\t\t\t\t\tThank you for purchasing my item. If you need any help, please don't hesitate and send a message via my profile page <a href=\\\"http://www.themeforest.com/user/MyPassion/\\\">Here</a>\",\r\n\t\t\t\t\t\t\"icon\" \t\t=> true,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"info\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" => __('Tracking Code', 'framework'),\r\n\t\t\t\t\t\t\"desc\" => \"Paste your Google Analytics Code (or other) here.\",\r\n\t\t\t\t\t\t\"id\" => \"trackingcode\",\r\n\t\t\t\t\t\t\"std\" => \"\",\r\n\t\t\t\t\t\t\"type\" => \"textarea\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Layout Skin', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"layout_skin\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"white\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"select\",\r\n\t\t\t\t\t\t\"options\" \t=> array(\"white\",\"black\")\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Layout Style', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Boxed / Wide', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"boxed_or_fullwidth\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"on\" \t\t=> \"Boxed\",\r\n\t\t\t\t\t\t\"off\" \t\t=> \"Wide\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Background Pattern','framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Select One of them','framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"bg-repeat-image\",\r\n\t\t\t\t\t\t\"std\" \t\t=> $url .\"pattern/1.png\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"images\",\r\n\t\t\t\t\t\t\"options\" \t=> array(\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/1.png' \t=> $url . 'bg/1.png',\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/2.png' \t=> $url . 'bg/2.png',\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/3.png' \t=> $url . 'bg/3.png',\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/4.png' \t=> $url . 'bg/4.png',\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/5.png' \t=> $url . 'bg/5.png',\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/6.png' \t=> $url . 'bg/6.png',\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/7.png' \t=> $url . 'bg/7.png',\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/8.png' \t=> $url . 'bg/8.png',\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/9.png' \t=> $url . 'bg/9.png',\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/10.png' => $url . 'bg/10.png',\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/11.png' => $url . 'bg/11.png',\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/12.png' => $url . 'bg/12.png',\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/13.png' => $url . 'bg/13.png',\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/14.png' => $url . 'bg/14.png',\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/15.png' => $url . 'bg/15.png',\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/16.png' => $url . 'bg/16.png',\r\n\t\t\t\t\t\t\t\t\t\t\t$url . 'pattern/17.png' => $url . 'bg/17.png'\r\n\t\t\t\t\t\t\t\t\t\t)\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Default Bakcground Image','framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Upload image or put image url to input box','framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"bg-cover-image\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"upload\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Main Color','framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('default: #EA4748','framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"main-color\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"#EA4748\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Buton Gradient Color - Top','framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('default: #ee6c6d','framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"button_color_top\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"#ee6c6d\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Buton Gradient Color - Bottom','framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('default: #bc393a','framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"button_color_bottom\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"#bc393a\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\r\n);\r\n\r\n\r\n\r\n\r\n/*----------------------------------------------------------------------------------- HOME SETTINGS */\r\n$of_options[] = array( \t\"name\" \t\t=> \"Home Settings\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Homepage Style', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Select One of Them', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"home_style\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"home_rightsidebar\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"images\",\r\n\t\t\t\t\t\t\"options\" \t=> array(\r\n\t\t\t\t\t\t\t\t\t\t\t'home_leftsidebar' \t=> $url . '/2cl.png',\r\n\t\t\t\t\t\t\t\t\t\t\t'home_rightsidebar' => $url . '/2cr.png'\r\n\t\t\t\t\t\t\t\t\t\t)\r\n);\r\n\r\n$of_options[] = array( \"name\" \t\t=> __('Top Banner', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Image size should not be higher than \"940 x Optional\".', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"banner-top\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"type\" => \"media\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Top Banner Link', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Enter banner link here', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"banner-top-link\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Homepage Layout Manager', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Organize how you want the layout to appear on the homepage. Drag and Drop modules.', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"homepage_moduls\",\r\n\t\t\t\t\t\t\"std\" \t\t=> $of_options_homepage_blocks,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"sorter\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Home Post Meta Date', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"home_date\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"on\" \t\t=> \"Enable\",\r\n\t\t\t\t\t\t\"off\" \t\t=> \"Disable\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Home Post Meta Category', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"home_category\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"on\" \t\t=> \"Enable\",\r\n\t\t\t\t\t\t\"off\" \t\t=> \"Disable\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Home Post Meta Comment', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"home_comment\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"on\" \t\t=> \"Enable\",\r\n\t\t\t\t\t\t\"off\" \t\t=> \"Disable\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n\r\n$of_options[] = array( \"name\" \t\t=> __('Logo Uploader', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Image size should not be higher than \"200x60\".', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"logo\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"mod\" \t\t=> \"min\",\r\n\t\t\t\t\t\t\"type\" => \"media\"\r\n);\r\n\t\t\t\t\t\r\n$of_options[] = array( \t\"name\" \t\t=> __('Logo Margin Parameters', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Default value is \"35px 0px 20px 0px\". Please use like this.', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"logo-margin\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"35px 0px 20px 0px\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n\t\t\t\t\r\n$of_options[] = array( \"name\" \t\t=> __('Favicon Uploader (16x16)', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Upload your Favicon (16x16px ico/png - use <a href='http://www.favicon.cc/' target='_blank'>favicon.cc</a> to make sure it's fully compatible)\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"favicon\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"mod\" \t\t=> \"min\",\r\n\t\t\t\t\t\t\"type\" => \"media\"\r\n);\r\n\t\t\t\t\t\r\n$of_options[] = array( \t\"name\" \t\t=> __('Apple iPhone Icon Upload (57x57)', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Upload your Apple Touch Icon (57x57px png)\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"media_favicon_iphone\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"mod\" \t\t=> \"min\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"media\"\r\n);\r\n\t\t\t\t\t\r\n$of_options[] = array( \t\"name\" \t\t=> __('Apple iPhone Retina Icon Upload (114x114)', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Upload your Apple Touch Retina Icon (114x114px png)\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"media_favicon_iphone_retina\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"mod\" \t\t=> \"min\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"media\"\r\n);\r\n\t\t\t\t\t\r\n$of_options[] = array( \t\"name\" \t\t=> __('Apple iPad Icon Upload (72x72)', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Upload your Apple Touch Retina Icon (144x144px png)\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"media_favicon_ipad\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"mod\" \t\t=> \"min\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"media\"\r\n);\r\n\t\t\t\t\t\r\n$of_options[] = array( \t\"name\" \t\t=> __('Apple iPad Retina Icon Upload (144x144px)', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Upload your Apple Touch Retina Icon (144x144px png)\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"media_favicon_ipad_retina\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"mod\" \t\t=> \"min\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"media\"\r\n);\r\n\r\n\r\n/*----------------------------------------------------------------------------------- LAYOUT SETTINGS */\r\n$of_options[] = array( \t\"name\" \t\t=> \"Layout\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('POINT / POINTLESS design for all elements', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"point_design\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"on\" \t\t=> \"Enable\",\r\n\t\t\t\t\t\t\"off\" \t\t=> \"Disable\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('POINT / POINTLESS design for menu only', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"point_design2\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"on\" \t\t=> \"Enable\",\r\n\t\t\t\t\t\t\"off\" \t\t=> \"Disable\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Enable Sticky Navigation Menu', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"sticky\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 0,\r\n\t\t\t\t\t\t\"on\" \t\t=> \"Enable\",\r\n\t\t\t\t\t\t\"off\" \t\t=> \"Disable\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Menu margin right', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('default value: 30', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"menu_margin_right\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"30\",\r\n\t\t\t\t\t\t\"min\" \t\t=> \"0\",\r\n\t\t\t\t\t\t\"step\"\t\t=> \"1\",\r\n\t\t\t\t\t\t\"max\" \t\t=> \"100\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"sliderui\" \r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Enable Bread Crumbs', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"breadcrumbs\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"on\" \t\t=> \"Enable\",\r\n\t\t\t\t\t\t\"off\" \t\t=> \"Disable\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Breadcrumbs Divider', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"divider1\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"//\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Enable Header Search', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"header_search\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"on\" \t\t=> \"Enable\",\r\n\t\t\t\t\t\t\"off\" \t\t=> \"Disable\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Post Meta Divider', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"divider2\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"//\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Blog Excerpt Style','framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Select One of them','framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"excerpt_style\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"excerpt1\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"images\",\r\n\t\t\t\t\t\t\"options\" \t=> array(\r\n\t\t\t\t\t\t\t\t\t\t\t'excerpt1' \t=> $url . 'excerpt/1.png',\r\n\t\t\t\t\t\t\t\t\t\t\t'excerpt2' \t=> $url . 'excerpt/2.png',\r\n\t\t\t\t\t\t\t\t\t\t\t'excerpt3' \t=> $url . 'excerpt/3.png'\r\n\t\t\t\t\t\t\t\t\t\t)\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Blog excerpt length', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('default value: 25', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"excerpt_length\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"25\",\r\n\t\t\t\t\t\t\"min\" \t\t=> \"5\",\r\n\t\t\t\t\t\t\"step\"\t\t=> \"1\",\r\n\t\t\t\t\t\t\"max\" \t\t=> \"70\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"sliderui\" \r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Blog Style','framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Select One of them','framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"blog_style\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"blog1\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"images\",\r\n\t\t\t\t\t\t\"options\" \t=> array(\r\n\t\t\t\t\t\t\t\t\t\t\t'blog1' \t=> $url . 'blog/1.png',\r\n\t\t\t\t\t\t\t\t\t\t\t'blog2' \t=> $url . 'blog/2.png',\r\n\t\t\t\t\t\t\t\t\t\t\t'blog3' \t=> $url . 'blog/3.png',\r\n\t\t\t\t\t\t\t\t\t\t\t'blog4' \t=> $url . 'blog/4.png'\r\n\t\t\t\t\t\t\t\t\t\t)\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Posts background', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Make enable when you choose \"Medium\" or \"Medium Stylish\" from Blog Style', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"posts_bg\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 0,\r\n\t\t\t\t\t\t\"on\" \t\t=> \"Enable\",\r\n\t\t\t\t\t\t\"off\" \t\t=> \"Disable\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n\r\n\r\n\r\n\r\n/*----------------------------------------------------------------------------------- MODULE-1 SETTINGS */\r\n$of_options[] = array( \t\"name\" \t\t=> \"Module-1 Settings\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Modul-1 first column Title', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m1_column1_title\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"Popular News\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Order By Post View or Post Comments', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m1_post_order\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"on\" \t\t=> \"by View\",\r\n\t\t\t\t\t\t\"off\" \t\t=> \"by Comments\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Modul-1 second column Title', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m1_column2_title\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"Hot News\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Number of Posts', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('default value: 4', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m1_numberofposts\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"4\",\r\n\t\t\t\t\t\t\"min\" \t\t=> \"0\",\r\n\t\t\t\t\t\t\"step\"\t\t=> \"1\",\r\n\t\t\t\t\t\t\"max\" \t\t=> \"10\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"sliderui\" \r\n);\r\n\r\n\r\n\r\n\r\n/*----------------------------------------------------------------------------------- MODULE-2 SETTINGS */\r\n$of_options[] = array( \t\"name\" \t\t=> \"Module-2 Settings\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Select Category For Module-2', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Posts created under choosen category will be displayed in module-2 on homepage', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m2_category\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"Select a category:\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"select\",\r\n\t\t\t\t\t\t\"options\" \t=> $of_categories\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Visible Number of Posts', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Default value: 3', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m2_visiblenumberofposts\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"3\",\r\n\t\t\t\t\t\t\"min\" \t\t=> \"0\",\r\n\t\t\t\t\t\t\"step\"\t\t=> \"1\",\r\n\t\t\t\t\t\t\"max\" \t\t=> \"15\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"sliderui\" \r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Max Number of Posts', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Default value: 6', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m2_maxnumberofposts\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"6\",\r\n\t\t\t\t\t\t\"min\" \t\t=> \"0\",\r\n\t\t\t\t\t\t\"step\"\t\t=> \"1\",\r\n\t\t\t\t\t\t\"max\" \t\t=> \"15\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"sliderui\" \r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Sliding Number of Posts', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Default value: 1', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m2_slidenumberofposts\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\"min\" \t\t=> \"0\",\r\n\t\t\t\t\t\t\"step\"\t\t=> \"1\",\r\n\t\t\t\t\t\t\"max\" \t\t=> \"10\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"sliderui\" \r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Carousel Direction', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m2_carousel_direction\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"bottom\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"select\",\r\n\t\t\t\t\t\t\"options\" \t=> array(\"bottom\",\"up\")\r\n);\r\n\r\n\r\n\r\n/*----------------------------------------------------------------------------------- MODULE-3 SETTINGS */\r\n$of_options[] = array( \t\"name\" \t\t=> \"Module-3 Settings\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Select Category For Module-3', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Posts created under choosen category will be displayed in module-3 on homepage', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m3_category\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"Select a category:\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"select\",\r\n\t\t\t\t\t\t\"options\" \t=> $of_categories\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Max Number of Posts', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Default value: 2', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m3_maxnumberofposts\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"2\",\r\n\t\t\t\t\t\t\"min\" \t\t=> \"0\",\r\n\t\t\t\t\t\t\"step\"\t\t=> \"1\",\r\n\t\t\t\t\t\t\"max\" \t\t=> \"15\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"sliderui\" \r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Carousel Direction', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m3_carousel_direction\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"left\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"select\",\r\n\t\t\t\t\t\t\"options\" \t=> array(\"left\",\"right\")\r\n);\r\n\r\n\r\n\r\n/*----------------------------------------------------------------------------------- MODULE-4 SETTINGS */\r\n$of_options[] = array( \t\"name\" \t\t=> \"Module-4 Settings\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Select Category For Module-4 First Column', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Posts created under choosen category will be displayed in module-4 first column', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m4_category1\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"Select a category:\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"select\",\r\n\t\t\t\t\t\t\"options\" \t=> $of_categories\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Select Category For Module-4 Second Column', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Posts created under choosen category will be displayed in module-4 second column', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m4_category2\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"Select a category:\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"select\",\r\n\t\t\t\t\t\t\"options\" \t=> $of_categories\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Number of Posts', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Default value: 2', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m4_numberofposts\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"2\",\r\n\t\t\t\t\t\t\"min\" \t\t=> \"0\",\r\n\t\t\t\t\t\t\"step\"\t\t=> \"1\",\r\n\t\t\t\t\t\t\"max\" \t\t=> \"15\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"sliderui\" \r\n);\r\n\r\n/*----------------------------------------------------------------------------------- MODULE-5 SETTINGS */\r\n$of_options[] = array( \t\"name\" \t\t=> \"Module-5 Settings\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Select Category For Module-5', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Posts created under choosen category will be displayed in module-5 on homepage', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m5_category\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"Select a category:\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"select\",\r\n\t\t\t\t\t\t\"options\" \t=> $of_categories\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Max Number of Posts', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Default value: 2', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m5_maxnumberofposts\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"2\",\r\n\t\t\t\t\t\t\"min\" \t\t=> \"0\",\r\n\t\t\t\t\t\t\"step\"\t\t=> \"1\",\r\n\t\t\t\t\t\t\"max\" \t\t=> \"15\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"sliderui\" \r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Carousel Direction', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"m3_carousel_direction\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"left\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"select\",\r\n\t\t\t\t\t\t\"options\" \t=> array(\"left\",\"right\")\r\n);\r\n\r\n\r\n/*----------------------------------------------------------------------------------- SLIDER */\r\n$of_options[] = array( \t\"name\" \t\t=> \"Slider Options\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Slider Section ON/OFF', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"slider_section\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Main Slider Posts Number', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('default value: 5', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"slider_post_number\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"5\",\r\n\t\t\t\t\t\t\"min\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\"step\"\t\t=> \"1\",\r\n\t\t\t\t\t\t\"max\" \t\t=> \"15\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"sliderui\" \r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Main Slider Ribbons ON/OFF', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"ribbons_switcher\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Main Slider Ribbon Name', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"slider_ribbon1\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"Latest\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Secondary Slider Ribbon Name', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"slider_ribbon2\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"Hotstuff\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n\r\n\r\n\r\n/*----------------------------------------------------------------------------------- TYPOGRAPHY */\r\n$of_options[] = array( \t\"name\" \t\t=> \"Typography\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Body Font', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"body_font\",\r\n\t\t\t\t\t\t\"std\" \t\t=> array('size' => '12px','face' => 'Merriweather Sans','style' => 'normal','color' => '#929292'),\r\n\t\t\t\t\t\t\"type\" \t\t=> \"typography\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Navigation Font', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"nav_font\",\r\n\t\t\t\t\t\t\"std\" \t\t=> array('size' => '13px','face' => 'Merriweather Sans','style' => 'bold','color' => '#696969'),\r\n\t\t\t\t\t\t\"type\" \t\t=> \"typography\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Navigation Font Transform', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"nav_font_transform\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"uppercase\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"select\",\r\n\t\t\t\t\t\t\"options\" \t=> array(\"uppercase\",\"lowercase\",\"capitalize\",\"inherit\",\"none\")\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Main Title Transform', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"main_title_transform\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"uppercase\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"select\",\r\n\t\t\t\t\t\t\"options\" \t=> array(\"uppercase\",\"lowercase\",\"capitalize\",\"inherit\",\"none\")\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> \"Hello there!\",\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"introduction\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"HEADLINE STYLES\",\r\n\t\t\t\t\t\t\"icon\" \t\t=> true,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"info\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('H1 - Headline Font', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"font_h1\",\r\n\t\t\t\t\t\t\"std\" \t\t=> array('size' => '24px','face' => 'Merriweather Sans','style' => 'normal','color' => '#696969'),\r\n\t\t\t\t\t\t\"type\" \t\t=> \"typography\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('H2 - Headline Font', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"font_h2\",\r\n\t\t\t\t\t\t\"std\" \t\t=> array('size' => '22px','face' => 'Merriweather Sans','style' => 'normal','color' => '#696969'),\r\n\t\t\t\t\t\t\"type\" \t\t=> \"typography\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('H3 - Headline Font', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Specify the H3 Headline font properties\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"font_h3\",\r\n\t\t\t\t\t\t\"std\" \t\t=> array('size' => '20px','face' => 'Merriweather Sans','style' => 'normal','color' => '#696969'),\r\n\t\t\t\t\t\t\"type\" \t\t=> \"typography\"\r\n); \r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('H4 - Headline Font', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"font_h4\",\r\n\t\t\t\t\t\t\"std\" \t\t=> array('size' => '18px','face' => 'Merriweather Sans','style' => 'normal','color' => '#696969'),\r\n\t\t\t\t\t\t\"type\" \t\t=> \"typography\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('H5 - Headline Font', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"font_h5\",\r\n\t\t\t\t\t\t\"std\" \t\t=> array('size' => '16px','face' => 'Merriweather Sans','style' => 'normal','color' => '#696969'),\r\n\t\t\t\t\t\t\"type\" \t\t=> \"typography\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('H6 - Headline Font', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"font_h6\",\r\n\t\t\t\t\t\t\"std\" \t\t=> array('size' => '14px','face' => 'Merriweather Sans','style' => 'normal','color' => '#696969'),\r\n\t\t\t\t\t\t\"type\" \t\t=> \"typography\"\r\n);\r\n\r\n\r\n\r\n/*----------------------------------------------------------------------------------- PAGES SETTINGS */\r\n$of_options[] = array( \t\"name\" \t\t=> \"Pages Settings\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('404 Error Page', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('1-Left sidebar, 2-Right Sidebar, 3-Fullwidth', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"404_style\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"404_rightsidebar\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"images\",\r\n\t\t\t\t\t\t\"options\" \t=> array(\r\n\t\t\t\t\t\t\t\t\t\t\t'404_leftsidebar' \t=> $url . '/2cl.png',\r\n\t\t\t\t\t\t\t\t\t\t\t'404_rightsidebar' => $url . '/2cr.png',\r\n\t\t\t\t\t\t\t\t\t\t\t'404_fullwidth' => $url . '/1col.png'\r\n\t\t\t\t\t\t\t\t\t\t)\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Search Page', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('1-Left sidebar, 2-Right Sidebar', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"search_style\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"search_rightsidebar\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"images\",\r\n\t\t\t\t\t\t\"options\" \t=> array(\r\n\t\t\t\t\t\t\t\t\t\t\t'search_leftsidebar' \t=> $url . '/2cl.png',\r\n\t\t\t\t\t\t\t\t\t\t\t'search_rightsidebar' => $url . '/2cr.png'\r\n\t\t\t\t\t\t\t\t\t\t)\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Archive Page', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('1-Left sidebar, 2-Right Sidebar', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"archive_style\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"archive_rightsidebar\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"images\",\r\n\t\t\t\t\t\t\"options\" \t=> array(\r\n\t\t\t\t\t\t\t\t\t\t\t'archive_leftsidebar' \t=> $url . '/2cl.png',\r\n\t\t\t\t\t\t\t\t\t\t\t'archive_rightsidebar' => $url . '/2cr.png'\r\n\t\t\t\t\t\t\t\t\t\t)\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Category Page', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('1-Left sidebar, 2-Right Sidebar', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"cat_style\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"cat_rightsidebar\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"images\",\r\n\t\t\t\t\t\t\"options\" \t=> array(\r\n\t\t\t\t\t\t\t\t\t\t\t'cat_leftsidebar' \t=> $url . '/2cl.png',\r\n\t\t\t\t\t\t\t\t\t\t\t'cat_rightsidebar' => $url . '/2cr.png'\r\n\t\t\t\t\t\t\t\t\t\t)\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Blog and Category Page Ribbons ON/OFF', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"ribbons_switcher2\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Category Page Ribbon Name', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"cat_ribbon\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"Featured\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n\r\n\r\n\r\n/*----------------------------------------------------------------------------------- SOCIAL SHARING */\r\n$of_options[] = array( \t\"name\" \t\t=> \"Social Sharing\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('All Share Buttons ON/OFF', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"all_share\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Facebook Share Button ON/OFF', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"facebook_share\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Twitter Share Button ON/OFF', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"twitter_share\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Pinterest Share Button ON/OFF', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"pinterest_share\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Linkedin Share Button ON/OFF', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"linkedin_share\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 0,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Reddit Share Button ON/OFF', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"reddit_share\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 0,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Digg Share Button ON/OFF', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"digg_share\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 0,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Delicious Share Button ON/OFF', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"delicious_share\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 0,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Google Share Button ON/OFF', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"google_share\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 0,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('E-mail Share Button ON/OFF', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"email_share\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 0,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n\r\n\r\n\r\n\r\n/*----------------------------------------------------------------------------------- SINGLE PAGE */\r\n$of_options[] = array( \t\"name\" \t\t=> \"Single Page\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Meta Line On/Off', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"meta_box\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Post Views On/Off', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"postview_box\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 0,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Author Info Box ON/OFF', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"author_box\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Tags Box ON/OFF', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"tag_box\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Prev/Next Box', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"prev_next_box\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Related Posts Box', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"related_post_box\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n\r\n/*----------------------------------------------------------------------------------- REVIEW SETTINGS */\r\n$of_options[] = array( \t\"name\" \t\t=> \"Review Settings\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Review ON/OFF', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> __('Switch ON', 'framework'),\r\n\t\t\t\t\t\t\"id\" \t\t=> \"review_switcher\",\r\n\t\t\t\t\t\t\"std\" \t\t=> 1,\r\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Review Content Text', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"review_p\",\r\n\t\t\t\t\t\t\"std\" \t\t=> array('size' => '12px','face' => 'Merriweather Sans','style' => 'normal','color' => '#696969'),\r\n\t\t\t\t\t\t\"type\" \t\t=> \"typography\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> __('Review Header Text', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"review_header\",\r\n\t\t\t\t\t\t\"std\" \t\t=> array('size' => '14px','face' => 'Merriweather Sans','style' => 'normal','color' => '#696969'),\r\n\t\t\t\t\t\t\"type\" \t\t=> \"typography\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Review Final Score', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"review_h1\",\r\n\t\t\t\t\t\t\"std\" \t\t=> array('size' => '24px','face' => 'Merriweather Sans','style' => 'normal','color' => '#696969'),\r\n\t\t\t\t\t\t\"type\" \t\t=> \"typography\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> __('Review Final Score Text', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"review_h6\",\r\n\t\t\t\t\t\t\"std\" \t\t=> array('size' => '14px','face' => 'Merriweather Sans','style' => 'normal','color' => '#696969'),\r\n\t\t\t\t\t\t\"type\" \t\t=> \"typography\"\r\n);\r\n\r\n\r\n\r\n/*----------------------------------------------------------------------------------- FOOTER SETTINGS */\r\n$of_options[] = array( \t\"name\" \t\t=> \"Footer Options\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\r\n);\r\n\t\t\t\t\r\n$of_options[] = array( \t\"name\" \t\t=> __('Copyright Text', 'framework'),\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"copyright\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"Copyright 2013. Designed by <a href=\\\"http://themeforest.net/user/MyPassion/portfolio\\\">MyPassion</a>\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"textarea\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> \"Twitter Link\",\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Enter full URL to your account\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"twitter\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> \"Facebook Link\",\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Enter full URL to your account\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"facebook\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> \"Dribbble Link\",\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Enter full URL to your account\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"dribble\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> \"Google Link\",\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Enter full URL to your account\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"google\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> \"Flickr Link\",\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Enter full URL to your account\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"flickr\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> \"Linkedin Link\",\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Enter full URL to your account\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"linkedin\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> \"Tumblr Link\",\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Enter full URL to your account\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"tumblr\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> \"Skype Link\",\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Enter full URL to your account\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"skype\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n$of_options[] = array( \t\"name\" \t\t=> \"Vimeo Link\",\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Enter full URL to your account\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"vimeo\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> \"Instagram Link\",\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Enter full URL to your account\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"instagram\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n\r\n$of_options[] = array( \t\"name\" \t\t=> \"Pinterest Link\",\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Enter full URL to your account\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"pinterest\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\r\n);\r\n\r\n\r\n/*----------------------------------------------------------------------------------- STYLING */\t\t\t\r\n$of_options[] = array( \t\"name\" \t\t=> \"Styling Options\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\r\n);\t\t\t\t\r\n\t\t\t\t\r\n$of_options[] = array( \t\"name\" \t\t=> \"Custom CSS\",\r\n\t\t\t\t\t\t\"desc\" \t\t=> \"Quickly add some CSS to your theme by adding it to this block.\",\r\n\t\t\t\t\t\t\"id\" \t\t=> \"custom_css\",\r\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\r\n\t\t\t\t\t\t\"type\" \t\t=> \"textarea\"\r\n);\r\n\r\n\t\t\t\t\r\n\r\n\t\t\t\t\r\n\t}", "title": "" }, { "docid": "d52fedd57cff7628cd326d8f1faf4ccb", "score": "0.6236938", "text": "public function index()\n {\n $title = trans('option.options');\n\n $this->generateParams();\n\n return View('option.index', compact('title'));\n }", "title": "" }, { "docid": "931fc25b706295daf5ab3e280a8d1579", "score": "0.62305444", "text": "function options_page() {\r\n\t\t$action = '';\r\n\r\n\t\tif (isset($_GET['action'])) {\r\n\t\t\t$action = $_GET['action'];\r\n\t\t}\r\n\r\n\t\tswitch($action) {\r\n\t\t\tcase 'update':\r\n\t\t\t\tcheck_admin_referer('postgroups-update-options');\r\n\t\t\t\tPostGroups::update_options();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tPostGroups::default_options_page();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9f5cc961bfb171c270913cc70cacc4d5", "score": "0.62249315", "text": "public function get_options_etpl() {\n\t}", "title": "" }, { "docid": "2086dc878ea99dbce27c7e7cd6f3ecb0", "score": "0.62212616", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "title": "" }, { "docid": "2086dc878ea99dbce27c7e7cd6f3ecb0", "score": "0.62212616", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "title": "" }, { "docid": "9b8f02e1bea42c17858ddd06c86b69b5", "score": "0.6219427", "text": "function aps_create_options_page()\n{\n\tglobal $aps_config;\n\t$option_pages = $aps_config['option_pages'];\n\n\t$first = true;\n\t$first_page = $option_pages[0]['id'];\n\t$index_page = 0;\n\t\n\tforeach($option_pages as $page)\n\t{\n\t\tif ($first)\n\t\t{\n\t\t\t$id = $page['id'];\n\t\t\t$main_page = add_menu_page(\n\t\t\t\t$page['page_title'],\n\t\t\t\t$page['menu_title'],\n\t\t\t\t'edit_theme_options',\n\t\t\t\t$page['id'],\n\t\t\t\t'aps_mostrar_pagina_opciones',\n\t\t\t\tisset($page['icon']) ? $page['icon'] : '',\n\t\t\t\t$page['position']\n\t\t\t);\n\t\t\t$first = false;\t\n\t\t\t\n\t\t\t// Adds actions to hook in the required css and javascript\n\t\t\tadd_action( 'admin_print_styles-' . $main_page,'aps_options_load_styles' );\n\t\t\tadd_action( 'admin_print_scripts-' . $main_page, 'aps_options_load_scripts' );\n\t\t\tadd_action( 'admin_print_scripts-' . $main_page, 'aps_options_media_scripts' );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$subpage = add_submenu_page(\n\t\t\t\t$first_page,\n\t\t\t\t$page['page_title'],\n\t\t\t\t$page['menu_title'],\n\t\t\t\t'edit_theme_options',\n\t\t\t\t$page['id'],\n\t\t\t\t'aps_mostrar_pagina_opciones'\n\t\t\t);\n\t\t\t\n\t\t\t// Adds actions to hook in the required css and javascript\n\t\t\tadd_action( 'admin_print_styles-' . $subpage,'aps_options_load_styles' );\n\t\t\tadd_action( 'admin_print_scripts-' . $subpage, 'aps_options_load_scripts' );\n\t\t\tadd_action( 'admin_print_scripts-' . $subpage, 'aps_options_media_scripts' );\n\t\t}\n\t\t$index_page++;\n\t}\n\t\n\t//Change menu name for main page\n\tglobal $submenu;\n\tif (isset($submenu['aps_op_general'][0][0])){\n\t\t$submenu[$option_pages[0]['id']][0][0] = $option_pages['0']['menu_title_in'];\n\t}\n}", "title": "" }, { "docid": "f64d36b3fe55c9cf1a1ddab7461cae5e", "score": "0.62187755", "text": "function of_options()\n\t{\n\t\t$of_categories \t\t= array();\n\t\t$of_categories_obj \t= get_categories('hide_empty=0');\n\t\tforeach ($of_categories_obj as $of_cat) {\n\t\t $of_categories[$of_cat->cat_ID] = $of_cat->cat_name;}\n\t\t$categories_tmp \t= array_unshift($of_categories, \"Select a category:\");\n\t \n\t\t//Access the WordPress Pages via an Array\n\t\t$of_pages \t\t\t= array();\n\t\t$of_pages_obj \t\t= get_pages('sort_column=post_parent,menu_order');\n\t\tforeach ($of_pages_obj as $of_page) {\n\t\t $of_pages[$of_page->ID] = $of_page->post_name; }\n\t\t$of_pages_tmp \t\t= array_unshift($of_pages, \"Select a page:\");\n\t\n\t\t//Testing\n\t\t$of_options_select \t= array(\"one\",\"two\",\"three\",\"four\",\"five\");\n\t\t$of_options_radio \t= array(\"one\" => \"One\",\"two\" => \"Two\",\"three\" => \"Three\",\"four\" => \"Four\",\"five\" => \"Five\");\n\t\t\n\t\t//Sample Homepage blocks for the layout manager (sorter)\n\t\t$of_options_homepage_blocks = array\n\t\t(\n\t\t\t\"disabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t\"block_one\"\t\t=> \"Block One\",\n\t\t\t\t\"block_two\"\t\t=> \"Block Two\",\n\t\t\t\t\"block_three\"\t=> \"Block Three\",\n\t\t\t),\n\t\t\t\"enabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t\"block_four\"\t=> \"Block Four\",\n\t\t\t),\n\t\t);\n\n\n\t\t//Stylesheets Reader\n\t\t$alt_stylesheet_path = LAYOUT_PATH;\n\t\t$alt_stylesheets = array();\n\t\t\n\t\tif ( is_dir($alt_stylesheet_path) )\n\t\t{\n\t\t if ($alt_stylesheet_dir = opendir($alt_stylesheet_path) )\n\t\t {\n\t\t while ( ($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false )\n\t\t {\n\t\t if(stristr($alt_stylesheet_file, \".css\") !== false)\n\t\t {\n\t\t $alt_stylesheets[] = $alt_stylesheet_file;\n\t\t }\n\t\t }\n\t\t }\n\t\t}\n\n\n\t\t//Background Images Reader\n\t\t$bg_images_path = get_stylesheet_directory(). '/images/bg/'; // change this to where you store your bg images\n\t\t$bg_images_url = get_template_directory_uri().'/images/bg/'; // change this to where you store your bg images\n\t\t$bg_images = array();\n\t\t\n\t\tif ( is_dir($bg_images_path) ) {\n\t\t if ($bg_images_dir = opendir($bg_images_path) ) {\n\t\t while ( ($bg_images_file = readdir($bg_images_dir)) !== false ) {\n\t\t if(stristr($bg_images_file, \".png\") !== false || stristr($bg_images_file, \".jpg\") !== false) {\n\t\t \tnatsort($bg_images); //Sorts the array into a natural order\n\t\t $bg_images[] = $bg_images_url . $bg_images_file;\n\t\t }\n\t\t }\n\t\t }\n\t\t}\n\t\t\n\n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t/* TO DO: Add options/functions that use these */\n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t\n\t\t//More Options\n\t\t$uploads_arr \t\t= wp_upload_dir();\n\t\t$all_uploads_path \t= $uploads_arr['path'];\n\t\t$all_uploads \t\t= get_option('of_uploads');\n\t\t$other_entries \t\t= array(\"Select a number:\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\");\n\t\t$body_repeat \t\t= array(\"no-repeat\",\"repeat-x\",\"repeat-y\",\"repeat\");\n\t\t$body_pos \t\t\t= array(\"top left\",\"top center\",\"top right\",\"center left\",\"center center\",\"center right\",\"bottom left\",\"bottom center\",\"bottom right\");\n\t\t\n\t\t// Image Alignment radio box\n\t\t$of_options_thumb_align = array(\"alignleft\" => \"Left\",\"alignright\" => \"Right\",\"aligncenter\" => \"Center\");\n\t\t\n\t\t// Image Links to Options\n\t\t$of_options_image_link_to = array(\"image\" => \"The Image\",\"post\" => \"The Post\");\n\n\n/*-----------------------------------------------------------------------------------*/\n/* The Options Array */\n/*-----------------------------------------------------------------------------------*/\n\n// Set the Options Array\nglobal $of_options;\n$of_options = array();\n\n$of_options[] = array( \t\"name\" \t\t=> \"Pengaturan Umum\",\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Petunjuk penggunaan\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\n\t\t\t\t\t\t\"id\" \t\t=> \"introduction_1\",\n\t\t\t\t\t\t\"std\" \t\t=> \"<h3 style=\\\"margin: 0 0 10px;\\\">Pentunjuk Penggunaan.</h3>\n\t\t\t\t\t\tBaca teks di sebelah kanan setiap opsi setting.\",\n\t\t\t\t\t\t\"icon\" \t\t=> true,\n\t\t\t\t\t\t\"type\" \t\t=> \"info\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Favicon\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Upload favicon untuk website ini.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_favicon\",\n\t\t\t\t\t\t// Use the shortcodes [site_url] or [site_url_secure] for setting default URLs\n\t\t\t\t\t\t\"std\" \t\t=> \"[site_url]/wp-content/themes/khalifah-theme/assets/images/favicon.png\",\n\t\t\t\t\t\t\"type\" \t\t=> \"upload\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Logo\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Upload logo untuk website ini. Ukuran 250x39 px dan tipe file-nya harus PNG yang transparan, atau JPG tapi warna background belakang logo harus sama dengan warna background menu. Jika tidak diisi, logo yang tampil adalah logo bawaan theme ini.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_logo\",\n\t\t\t\t\t\t// Use the shortcodes [site_url] or [site_url_secure] for setting default URLs\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"upload\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Avatar\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Upload avatar untuk ditampilkan di homepage. Tipe file jpg dengan ukuran 128x128 px.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_ava\",\n\t\t\t\t\t\t// Use the shortcodes [site_url] or [site_url_secure] for setting default URLs\n\t\t\t\t\t\t\"std\" \t\t=> \"[site_url]/wp-content/themes/khalifah-theme/assets/images/logo_khalifah.jpg\",\n\t\t\t\t\t\t\"type\" \t\t=> \"upload\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Hero Background\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Upload foto untuk header di homepage. Tipe file jpg dengan ukuran 1200x600 px.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_hero_bg\",\n\t\t\t\t\t\t// Use the shortcodes [site_url] or [site_url_secure] for setting default URLs\n\t\t\t\t\t\t\"std\" \t\t=> \"[site_url]/wp-content/themes/khalifah-theme/assets/images/header01.jpg\",\n\t\t\t\t\t\t\"type\" \t\t=> \"upload\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Teks Judul Header\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Masukkan teks untuk judul header yang tampil di homepage.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_hero_title\",\n\t\t\t\t\t\t\"std\" \t\t=> \"Khalifah Umroh & Tour\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Teks Header\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Masukkan teks untuk konten header yang tampil di homepage.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_hero_text\",\n\t\t\t\t\t\t\"std\" \t\t=> \"Sekarang setiap muslim bisa umroh. Cukup hanya 5 juta rupiah langsung berangkat umroh. Hanya di Khalifah Umroh & Tour!\",\n\t\t\t\t\t\t\"type\" \t\t=> \"textarea\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Username Twitter\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Masukkan <span style='color:red'>username</span> twitter. Contoh : google\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_link_tw\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\",\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Fanpage facebook\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Masukkan url fanpage facebook. Harus menyertakan <span style='color:red'>https://</span> di bagian depannya.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_link_fb\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\",\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Sosok\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Masukkan judul dan foto untuk kolom Sosok. Link URL dan Description tidak perlu diisi.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_slide_sosok\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"slider\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Pengaturan Paket\",\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Paket\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Masukkan judul dan foto untuk kolom Sosok. Link URL dan Description tidak perlu diisi.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_paket_home\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"slider\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Pengaturan Khusus\",\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Berita\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Masukkan ID kategori yang tidak ingin ditampilkan di halaman berita. Awali dengan tanda minus (<span style=\\\"color:red;\\\">-</span>) dan pisahkan dengan koma (<span style=\\\"color:red;\\\">,</span>) tanpa ada spasi. Postingan pada ID kategori yang dimasukkan akan di-exclude dari halaman berita.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_cat_id_exclude\",\n\t\t\t\t\t\t\"std\" \t\t=> \"-1\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Pengaturan Warna\",\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Color Scheme\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna background menu.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_main\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#046603\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna teks pada menu.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_menu\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#ffffff\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna teks pada menu ketika aktif.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_menu_active\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#ebd203\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna border header di bawah menu.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_menu_border\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#ebd203\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna background sub menu ketika kursor berada di atasnya.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_menu_bg_hover\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#047c02\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Background header.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_hero_bg\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#161616\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna teks di header.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_hero\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#606060\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna border foto avatar.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_border_ava\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#6b8c6a\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna kalimat utama dan link di header.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_hero_title\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#ebd203\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna icon sosial media di homepage.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_sosmed_icon\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#37593a\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna icon sosial media ketika kursor berada di atasnya.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_sosmed_icon_hover\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#046603\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Background footer.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_footer_bg\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#f0f4ef\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna teks di footer.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_footer\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#6c8e6d\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna link di footer.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_footer_link\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#375635\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna link secara umum.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_link\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#107c02\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna link ketika kursor diletakkan di atasnya.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_link_hover\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#3e5937\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna link judul berita.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_link_berita\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#35563a\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna link judul berita ketika kursor diletakkan di atasnya.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_link_hover_berita\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#038e01\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna tanggal berita.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_meta\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#aabfab\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna teks berita.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_body\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#445442\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna background Galeri, Opini Publik dan penomoran halaman.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_galeri_bg\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#EDF0F3\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna blok heading.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_h1\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#345132\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna border blok heading.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_h1_border\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#E7EBF0\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Background button.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_btn_bg\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#107c02\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna teks pada button.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_btn\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#ffffff\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Warna background pada button ketika kursor diletakkan di atasnya.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"k_color_btn_hover\",\n\t\t\t\t\t\t\"std\" \t\t=> \"#118e01\",\n\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t);\n\t\t\t\t\n/*$of_options[] = array( \t\"name\" \t\t=> \"Switch 2\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Switch ON\",\n\t\t\t\t\t\t\"id\" \t\t=> \"switch_ex2\",\n\t\t\t\t\t\t\"std\" \t\t=> 1,\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Select a Category\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"A list of all the categories being used on the site.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"example_category\",\n\t\t\t\t\t\t\"std\" \t\t=> \"Select a category:\",\n\t\t\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\t\t\"options\" \t=> $of_categories\n\t\t\t\t);*/\n\t\t\t\t\n// Backup Options\n$of_options[] = array( \t\"name\" \t\t=> \"Backup Pengaturan\",\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\",\n\t\t\t\t\t\t\"icon\"\t\t=> ADMIN_IMAGES . \"icon-slider.png\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Backup and Restore Options\",\n\t\t\t\t\t\t\"id\" \t\t=> \"of_backup\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"backup\",\n\t\t\t\t\t\t\"desc\" \t\t=> 'Gunakan 2 button di bawah untuk mem-backup Pengaturan Anda saat ini, agar nantinya bisa di-restore di kemudian hari jika diperlukan. Hal ini berguna jika Anda ingin bereksperimen dengan Pengaturan yang ada saat ini, namun tetap ingin menyimpan Pengaturan lama jika Anda membutuhkannya kembali.',\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Transfer Data Pengaturan Theme\",\n\t\t\t\t\t\t\"id\" \t\t=> \"of_transfer\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"transfer\",\n\t\t\t\t\t\t\"desc\" \t\t=> 'You can tranfer the saved options data between different installs by copying the text inside the text box. To import data from another install, replace the data in the text box with the one from another install and click \"Import Options\".',\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t\n\t}", "title": "" }, { "docid": "8eb7f99d594cf7f27ed8c185fca469c2", "score": "0.6206862", "text": "abstract public function admin_options();", "title": "" }, { "docid": "2b515fe0e66bb2b1c2069cf0bd3084da", "score": "0.62058043", "text": "public function getOptions()\n\t{\n\t\t// TODO: Implement getOptions() method.\n\t}", "title": "" }, { "docid": "528a05ecf01e352796847538ca63ec17", "score": "0.61954194", "text": "public static function CallHtmlShowOptionsPage() {\n\t\tif(self::LoadPlugin()) {\n\t\t\tGoogleSitemapGenerator::GetInstance()->HtmlShowOptionsPage();\n\t\t}\n\t}", "title": "" }, { "docid": "8a8ac991e72211b9b5f5454fbadd5874", "score": "0.619417", "text": "private static function create_options() {\n\t\t// Include settings so that we can run through defaults.\n\t\tinclude_once dirname( __FILE__ ) . '/admin/class-evf-admin-settings.php';\n\n\t\t$settings = EVF_Admin_Settings::get_settings_pages();\n\n\t\tforeach ( $settings as $section ) {\n\t\t\tif ( ! method_exists( $section, 'get_settings' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$subsections = array_unique( array_merge( array( '' ), array_keys( $section->get_sections() ) ) );\n\n\t\t\tforeach ( $subsections as $subsection ) {\n\t\t\t\tforeach ( $section->get_settings( $subsection ) as $value ) {\n\t\t\t\t\tif ( isset( $value['default'] ) && isset( $value['id'] ) ) {\n\t\t\t\t\t\t$autoload = isset( $value['autoload'] ) ? (bool) $value['autoload'] : true;\n\t\t\t\t\t\tadd_option( $value['id'], $value['default'], '', ( $autoload ? 'yes' : 'no' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f666055a958473df9ed6ec604c0ee152", "score": "0.61921185", "text": "public function getOptions()\n {\n $totalPages = ceil($this->total / $this->limit);\n\n $this->maybeAddPreviousOption();\n\n $totalPagesToDisplay = ($this->pageDeviation * 2) + 3;\n\n if ($totalPages <= $totalPagesToDisplay) {\n $this->addRangeOfOptions(1, $totalPages);\n } else {\n $this->addRangeOptions($totalPages);\n }\n\n $this->maybeAddNextOption($totalPages);\n\n return $this->options;\n }", "title": "" }, { "docid": "78f6d033218adc24690db3d77dddcc1a", "score": "0.619036", "text": "function plugin_options_page() {\r\n\t\r\n\t\t$tab = isset( $_GET['tab'] ) ? sanitize_text_field($_GET['tab']) : $this->get_started_option_name;\r\n\t\t\r\n\t\tif(isset($_GET['clear_scripts_list'])){\r\n\t\t\t$this->clearScripts();\r\n\t\t}\r\n\t\t\r\n\t\t?>\r\n\t\t<div class=\"wrap\">\r\n\t\t\r\n\t\t\t<?php $this->plugin_options_tabs();\r\n\r\n\t\t\tif($tab == 'androapp_getstarted' || $tab == $this->build_option_name || \r\n\t\t\t$tab == $this->language_option_name || $tab == 'androapp_tools_tab'\r\n\t\t\t|| $tab == 'androapp_post_content_tab'){\r\n\t\t\t\tdo_settings_sections( $tab ); \r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$this->renderForm($tab, \"\");\r\n\t\t\t}\r\n\t\t\t?>\r\n\t\t</div>\r\n\t\t<?php\r\n\t}", "title": "" }, { "docid": "0be9ea8e5941a12143579f5a87bc5e0f", "score": "0.6187162", "text": "function mtm_options_page() {\n\n\tif ( false !== mtm_acf_check() ) {\n\n\t\t// acf_add_options_page( array(\n\t\t// \t'page_title' \t=> 'Theme General Settings',\n\t\t// \t'menu_title'\t=> 'Theme Settings',\n\t\t// \t'menu_slug' \t=> 'theme-general-settings',\n\t\t// \t'capability'\t=> 'edit_posts',\n\t\t// \t'redirect'\t\t=> true // false gives this its own page\n\t\t// ) );\n\n\t\tacf_add_options_sub_page( array(\n\t\t\t'page_title' \t=> __('Global Text & Images', 'mtm'),\n\t\t\t'menu_title'\t=> __('Global Text & Images', 'mtm'),\n\t\t\t'menu_slug' => 'global-text-settings',\n\t\t\t'parent_slug'\t=> 'options-general.php',\n\t\t) );\n\n\t\tacf_add_options_sub_page( array(\n\t\t\t'page_title' \t=> __('Social & Sharing', 'mtm'),\n\t\t\t'menu_title'\t=> __('Social & Sharing', 'mtm'),\n\t\t\t'menu_slug' => 'social-sharing-settings',\n\t\t\t'parent_slug'\t=> 'options-general.php',\n\t\t) );\n\n\t\tacf_add_options_sub_page( array(\n\t\t\t'page_title' \t=> __('Special Pages', 'mtm'),\n\t\t\t'menu_title'\t=> __('Special Pages', 'mtm'),\n\t\t\t'menu_slug' => 'special-pages',\n\t\t\t'parent_slug'\t=> 'options-general.php',\n\t\t) );\n\t}\n}", "title": "" }, { "docid": "25e453e0e941ea673073ed02f66566e8", "score": "0.6183294", "text": "protected function getOptions ()\n {\n return array();\n\n }", "title": "" }, { "docid": "7d60f3725652f9dd9d54bee96124e526", "score": "0.61719185", "text": "function of_options()\n\t{\n\t\t$of_categories = array(); \n\t\t$of_categories_obj = get_categories('hide_empty=0');\n\t\tforeach ($of_categories_obj as $of_cat) {\n\t\t $of_categories[$of_cat->cat_ID] = $of_cat->cat_name;}\n\t\t$categories_tmp = array_unshift($of_categories, \"Select a category:\"); \n\t \n\t\t//Access the WordPress Pages via an Array\n\t\t$of_pages = array();\n\t\t$of_pages_obj = get_pages('sort_column=post_parent,menu_order'); \n\t\tforeach ($of_pages_obj as $of_page) {\n\t\t $of_pages[$of_page->ID] = $of_page->post_name; }\n\t\t$of_pages_tmp = array_unshift($of_pages, \"Select a page:\"); \n\t\n\t\t$of_options_select = array(\"one\",\"two\",\"three\",\"four\",\"five\"); \n\t\t$of_options_radio = array(\"one\" => \"One\",\"two\" => \"Two\",\"three\" => \"Three\",\"four\" => \"Four\",\"five\" => \"Five\");\n\t\t$of_options_slider_select = array(\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\");\n\t\t$of_options_latest_work_select = array(\"3\",\"6\",\"9\",\"12\");\n\t\t$of_options_quotes_select = array(\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\");\n\t\t$of_options_services_select = array(\"3\",\"6\",\"9\",\"12\");\n\t\t$of_options_meet_team_select = array(\"3\",\"6\",\"9\",\"12\");\n\t\t$of_options_latest_project_select = array(\"3\",\"6\",\"9\",\"12\");\n\t\t$of_options_latest_project_col = array(\"2\",\"3\",\"4\");\n\t\t$of_options_project_nav = array(\"Yes\",\"No\"); \n\t \n\t\t\n\t\t//Homepage blocks for the layout manager (sorter)\n\t\t$of_options_homepage_blocks = array\n\t\t( \n\t\t\t\"enabled\" => array (\n\t\t\t\t\"placebo\" => \"placebo\", //REQUIRED!\n\t\t\t\t\"slider_block\" => \"Slider\",\n\t\t\t \"about_block\" => \"About\",\n\t\t\t\t\"project_block\" => \"Projects\",\n\t\t\t\t\"submission_block\" => \"Project (Form)\",\n\t\t\t\t\"contact_block\" => \"Contact\",\n\t\t\t\t\"logo_block\" => \"Client Logos\",\n\t\t\t),\n\t\t\t\"disabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t/*\"wpg_map\" => \"Map\",*/\n\t\t\t),\n\t\t);\n\n\t\t//Stylesheets Reader\n\t\t$alt_stylesheet_path = LAYOUT_PATH;\n\t\t$alt_stylesheets = array();\n\t\t\n\t\tif ( is_dir($alt_stylesheet_path) ) \n\t\t{\n\t\t if ($alt_stylesheet_dir = opendir($alt_stylesheet_path) ) \n\t\t { \n\t\t while ( ($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false ) \n\t\t {\n\t\t if(stristr($alt_stylesheet_file, \".css\") !== false)\n\t\t {\n\t\t $alt_stylesheets[] = $alt_stylesheet_file;\n\t\t }\n\t\t } \n\t\t }\n\t\t}\n\n\n\t\t//Background Images Reader\n\t\t$bg_images_path = get_stylesheet_directory(). '/assets/img/bg/'; // change this to where you store your bg images\n\t\t$bg_images_url = get_template_directory_uri().'/assets/img/bg/'; // change this to where you store your bg images\n\t\t$bg_images = array();\n\t\t\n\t\tif ( is_dir($bg_images_path) ) {\n\t\t if ($bg_images_dir = opendir($bg_images_path) ) { \n\t\t while ( ($bg_images_file = readdir($bg_images_dir)) !== false ) {\n\t\t if(stristr($bg_images_file, \".png\") !== false || stristr($bg_images_file, \".jpg\") !== false) {\n\t\t $bg_images[] = $bg_images_url . $bg_images_file;\n\t\t }\n\t\t } \n\t\t }\n\t\t}\n\t\t $wpg_site_url = get_template_directory_uri();\n\t\t \n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t/* TO DO: Add options/functions that use these */\n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t\n\t\t//More Options\n\t\t$uploads_arr = wp_upload_dir();\n\t\t$all_uploads_path = $uploads_arr['path'];\n\t\t$all_uploads = get_option('of_uploads');\n\t\t$other_entries = array(\"Select a number:\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\");\n\t\t$body_repeat = array(\"no-repeat\",\"repeat-x\",\"repeat-y\",\"repeat\");\n\t\t$body_pos = array(\"top left\",\"top center\",\"top right\",\"center left\",\"center center\",\"center right\",\"bottom left\",\"bottom center\",\"bottom right\");\n\t\t\n\t\t// Image Alignment radio box\n\t\t$of_options_thumb_align = array(\"alignleft\" => \"Left\",\"alignright\" => \"Right\",\"aligncenter\" => \"Center\"); \n\t\t\n\t\t// Image Links to Options\n\t\t$of_options_image_link_to = array(\"image\" => \"The Image\",\"post\" => \"The Post\"); \n\n\n/*-----------------------------------------------------------------------------------*/\n/* The Options Array */\n/*-----------------------------------------------------------------------------------*/\n\n// Set the Options Array\nglobal $of_options;\n$of_options = array();\n\n$of_options[] = array( \"name\" => __('Home Settings', 'wpg'),\n\t\t\t\t\t\"type\" => \"heading\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Homepage Layout Manager', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Organize how you want the layout to appear on the homepage.<br /><br />You can choose to enable/disable sections via drag & drop, or re-order their stacking order on the homepage.<br /><br />NB; Once you have re-ordered or disabled, do not forget to adjust your Menu (Navigation) in the same way.', 'wpg'),\n\t\t\t\t\t\"id\" => \"homepage_blocks\",\n\t\t\t\t\t\"std\" => $of_options_homepage_blocks,\n\t\t\t\t\t\"type\" => \"sorter\");\n$of_options[] = array( \"name\" => __('General Settings', 'wpg'),\n \"type\" => \"heading\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Custom Favicon', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Upload a 32px x 32px PNG/GIF image that will represent your website favicon.', 'wpg'),\n\t\t\t\t\t\"id\" => \"custom_favicon\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"mod\" => \"min\",\n\t\t\t\t\t\"type\" => \"upload\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Footer Text', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter the text to appear at the bottom of your Footer (eg; All rights reserved. Designed by WpgraceThemes.)', 'wpg'),\n\t\t\t\t\t\"id\" => \"textarea_footer_text\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"textarea\");\n \n$of_options[] = array( \"name\" => __('Google Analytics Tracking Code', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Paste your Google Analytics tracking code here (Remember you need to paste all the Javascript code, not just your ID). This will be added into the footer template of your theme.<br /><br />Do not have Google Analytics? Unsure what to paste in this box? Visit this <a href=\"http://www.google.com/analytics\">link</a> to find out more.', 'wpg'),\n\t\t\t\t\t\"id\" => \"google_analytics\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"textarea\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Header Settings', 'wpg'),\n\t\t\t\t\t\"type\" => \"heading\");\n\n$of_options[] = array( \"name\" => __('Custom Logo', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Upload your own logo to use on the site.', 'wpg'),\n\t\t\t\t\t\"id\" => \"custom_logo\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"mod\" => \"min\",\n\t\t\t\t\t\"type\" => \"media\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Text Logo', 'wpg'),\n\t\t\t\t\t\"desc\" => __('If you do not have a logo you can choose to use a plain text logo instead.', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_logo\",\n\t\t\t\t\t\"std\" => true,\n\t\t\t\t\t\"type\" => \"checkbox\");\n/*$of_options[] = array( \"name\" => __('Styling Options', 'wpg'),\n\t\t\t\t\t\"type\" => \"heading\"); \n\n$of_options[] = array( \"name\" => __('Text Logo Styling', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Specify the text logo font properties (if you chose this option on the previous page).', 'wpg'),\n\t\t\t\t\t\"id\" => \"logo_font\",\n\t\t\t\t\t\"std\" => array('size' => '39px','face' => 'pacifico','style' => 'normal','color' => '#333333'),\n\t\t\t\t\t\"type\" => \"typography\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Body Font Styling', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Specify the body font properties.', 'wpg'),\n\t\t\t\t\t\"id\" => \"body_font\",\n\t\t\t\t\t\"std\" => array('size' => '14px','face' => 'cabin','style' => 'normal','color' => '#333333'),\n\t\t\t\t\t\"type\" => \"typography\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Headings Styling', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Specify the h1, h2, h3, h4, h5 font properties.', 'wpg'),\n\t\t\t\t\t\"id\" => \"headings_font\",\n\t\t\t\t\t\"std\" => array('face' => 'oswald','style' => 'normal','color' => '#333333'),\n\t\t\t\t\t\"type\" => \"typography\");\n\n$of_options[] = array( \"name\" => __('Accent Color', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Pick an accent color for the theme. (This will affect Header Navigation, Project Filter, Quotes, Blockquotes, Pricing Tables, Tabs, Project Navigation & Social Icons).', 'wpg'),\n\t\t\t\t\t\"id\" => \"accent_color\",\n\t\t\t\t\t\"std\" => \"#e47c14\",\n\t\t\t\t\t\"type\" => \"color\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Button Color', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Pick an accent color for the buttons.', 'wpg'),\n\t\t\t\t\t\"id\" => \"accent_color_button\",\n\t\t\t\t\t\"std\" => \"#e47c14\",\n\t\t\t\t\t\"type\" => \"color\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Body Link Color', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Pick an accent color for the main body links.', 'wpg'),\n\t\t\t\t\t\"id\" => \"body_link_color\",\n\t\t\t\t\t\"std\" => \"#e47c14\",\n\t\t\t\t\t\"type\" => \"color\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Footer Link Color', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Pick an accent color for the footer text links.', 'wpg'),\n\t\t\t\t\t\"id\" => \"footer_link_color\",\n\t\t\t\t\t\"std\" => \"#e47c14\",\n\t\t\t\t\t\"type\" => \"color\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Service Icons Color', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Pick an accent color for the service icons.', 'wpg'),\n\t\t\t\t\t\"id\" => \"accent_color_service_icons\",\n\t\t\t\t\t\"std\" => \"#e47c14\",\n\t\t\t\t\t\"type\" => \"color\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Team Member Social Icons Color', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Pick an accent color for the team member social icons.', 'wpg'),\n\t\t\t\t\t\"id\" => \"accent_color_team_icons\",\n\t\t\t\t\t\"std\" => \"#e47c14\",\n\t\t\t\t\t\"type\" => \"color\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Custom CSS', 'wpg'),\n \"desc\" => __('Quickly add some CSS to your theme by adding it to this block.', 'wpg'),\n \"id\" => \"custom_css\",\n \"std\" => \"\",\n \"type\" => \"textarea\");\n \n$of_options[] = array( \"name\" => __('Background Settings', 'wpg'),\n\t\t\t\t\t\"type\" => \"heading\"); \n \n$of_options[] = array( \"name\" => __('Background Image', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Upload a background image to use', 'wpg'),\n\t\t\t\t\t\"id\" => \"upload_logos_background\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"media\");*/\n\t\t\t\t\t\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Slider Settings', 'wpg'),\n\t\t\t\t\t\"type\" => \"heading\");\n$of_options[] = array( \"name\" => __('Welcome Message Line 1', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please Enter Welcome Message Line 1', 'wpg'),\n\t\t\t\t\t\"id\" => \"grid_slider_msg_1\",\n\t\t\t\t\t\"std\" => \"WELCOME TO funder\",\n\t\t\t\t\t\"type\" => \"text\");\n$of_options[] = array( \"name\" => __('Welcome Message Line 2', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please Enter Welcome Message Line 2', 'wpg'),\n\t\t\t\t\t\"id\" => \"grid_slider_msg_2\",\n\t\t\t\t\t\"std\" => \"AMAZING CROWDFUNDING SITE\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n$of_options[] = array( \"name\" => __('About Us Settings', 'wpg'),\n\t\t\t\t\t\"type\" => \"heading\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Title', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter a title for the About Us section. (eg; We are an award winning digital agency. And truly awesome too.)', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_about_us_title\",\n\t\t\t\t\t\"std\" => \"About\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Discription', 'wpg'),\n\t\t\t\t\t\"desc\" => __('You can add a short Discription to appear in this section.<br /><br /><em>*HTML tags are allowed.</em>', 'wpg'),\n\t\t\t\t\t\"id\" => \"textarea_about_us_discription\",\n\t\t\t\t\t\"std\" => \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi vulputate egestas sem, eu cursus ligula ullamcorper non. Curabitur tristique velit eu mauris venenatis egestas. Phasellus bibendum placerat metus, sed molestie magna semper eget. Sed sit amet dui felis, tempus porttitor justo.\",\n\t\t\t\t\t\"type\" => \"textarea\");\n\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Step 1 (Image)', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Upload your Image for step 1', 'wpg'),\n\t\t\t\t\t\"id\" => \"step_1_img\",\n\t\t\t\t\t\"std\" => $wpg_site_url. '/img/folder1.png',\n\t\t\t\t\t\"mod\" => \"min\",\n\t\t\t\t\t\"type\" => \"media\");\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Step 1 (Url)', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter of you want to link', 'wpg'),\n\t\t\t\t\t\"id\" => \"step_1_url\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n$of_options[] = array( \"name\" => __('Step 1 (Heading)', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter heading text', 'wpg'),\n\t\t\t\t\t\"id\" => \"step_1_heading\",\n\t\t\t\t\t\"std\" => \"Step 1:\",\n\t\t\t\t\t\"type\" => \"text\");\n$of_options[] = array( \"name\" => __('Step 1 (Sub-heading)', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter sub-heading text', 'wpg'),\n\t\t\t\t\t\"id\" => \"step_1_subheading\",\n\t\t\t\t\t\"std\" => \"Choose a project\",\n\t\t\t\t\t\"type\" => \"text\");\n// Step 2\n$of_options[] = array( \"name\" => __('Step 2 (Image)', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Upload your Image for step 1', 'wpg'),\n\t\t\t\t\t\"id\" => \"step_2_img\",\n\t\t\t\t\t\"std\" => $wpg_site_url. '/img/folder2.png',\n\t\t\t\t\t\"mod\" => \"min\",\n\t\t\t\t\t\"type\" => \"media\");\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Step 2 (Url)', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter of you want to link', 'wpg'),\n\t\t\t\t\t\"id\" => \"step_2_url\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n$of_options[] = array( \"name\" => __('Step 2 (Heading)', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter heading text', 'wpg'),\n\t\t\t\t\t\"id\" => \"step_2_heading\",\n\t\t\t\t\t\"std\" => \"Step 2:\",\n\t\t\t\t\t\"type\" => \"text\");\n$of_options[] = array( \"name\" => __('Step 2 (Sub-heading)', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter sub-heading text', 'wpg'),\n\t\t\t\t\t\"id\" => \"step_2_subheading\",\n\t\t\t\t\t\"std\" => \"Back a project\",\n\t\t\t\t\t\"type\" => \"text\");\n// Step 3\n$of_options[] = array( \"name\" => __('Step 3 (Image)', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Upload your Image for step 1', 'wpg'),\n\t\t\t\t\t\"id\" => \"step_3_img\",\n\t\t\t\t\t\"std\" => $wpg_site_url. '/img/folder3.png',\n\t\t\t\t\t\"mod\" => \"min\",\n\t\t\t\t\t\"type\" => \"media\");\n\t\t\t\t\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Step 3 (Url)', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter of you want to link', 'wpg'),\n\t\t\t\t\t\"id\" => \"step_3_url\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n$of_options[] = array( \"name\" => __('Step 3 (Heading)', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter heading text', 'wpg'),\n\t\t\t\t\t\"id\" => \"step_3_heading\",\n\t\t\t\t\t\"std\" => \"Step 3:\",\n\t\t\t\t\t\"type\" => \"text\");\n$of_options[] = array( \"name\" => __('Step 3 (Sub-heading)', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter sub-heading text', 'wpg'),\n\t\t\t\t\t\"id\" => \"step_3_subheading\",\n\t\t\t\t\t\"std\" => \"Receive a gift\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Project Settings', 'wpg'),\n\t\t\t\t\t\"type\" => \"heading\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Title', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter a title for the Project section. (eg; Our work says a lot about us. Passionate about all we do.)', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_project_title\",\n\t\t\t\t\t\"std\" => \"Projects\",\n\t\t\t\t\t\"type\" => \"text\");\n$of_options[] = array( \"name\" => __('Numbers of Col', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please select how many items you would like show.', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_project_col\",\n\t\t\t\t\t\"std\" => \"3\",\n\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\"class\" => \"tiny\",\n\t\t\t\t\t\"options\" => $of_options_latest_project_col);\n$of_options[] = array( \"name\" => __('Numbers of Item', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please select how many items you would like show.', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_project_num\",\n\t\t\t\t\t\"std\" => \"9\",\n\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\"class\" => \"tiny\",\n\t\t\t\t\t\"options\" => $of_options_latest_project_select);\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Show Navigation', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please select you would like to show navigation', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_project_nav\",\n\t\t\t\t\t\"std\" => \"9\",\n\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\"class\" => \"tiny\",\n\t\t\t\t\t\"options\" => $of_options_project_nav);\t\n\t\t\t\t\t\n/*$of_options[] = array( \"name\" => __('Service Settings', 'wpg'),\n\t\t\t\t\t\"type\" => \"heading\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Title', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter a title for the Services section. (eg; We provide a multitude of services. Everything is covered.)', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_services_title\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Icon', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please add an icon to appear above your title. (eg; [icon name=icon-cog])<br/><br />All list of available icons can be found <a href=\"http://fortawesome.github.com/Font-Awesome/\" target=\"_blank\">here</a>.', 'wpg'),\n\t\t\t\t\t\"id\" => \"icon_services\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Overview', 'wpg'),\n\t\t\t\t\t\"desc\" => __('You can add a short overview to appear in this section.<br /><br /><em>*HTML tags are allowed.</em>', 'wpg'),\n\t\t\t\t\t\"id\" => \"textarea_services_overview\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"textarea\");\n\t\t\t\t\t\n$of_options[] = array( \"desc\" => __('Please select how many items you would like to show in the services section.', 'wpg'),\n\t\t\t\t\t\"id\" => \"select_services\",\n\t\t\t\t\t\"std\" => \"6\",\n\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\"class\" => \"tiny\",\n\t\t\t\t\t\"options\" => $of_options_services_select);\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Team Settings', 'wpg'),\n\t\t\t\t\t\"type\" => \"heading\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Title', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter a title for the Meet the Team section. (eg; We have a team of truly awesome folk. You will love them.)', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_team_title\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Icon', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please add an icon to appear above your title. (eg; [icon name=icon-user])<br/><br />All list of available icons can be found <a href=\"http://fortawesome.github.com/Font-Awesome/\" target=\"_blank\">here</a>.', 'wpg'),\n\t\t\t\t\t\"id\" => \"icon_team\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Overview', 'wpg'),\n\t\t\t\t\t\"desc\" => __('You can add a short overview to appear in this section.<br /><br /><em>*HTML tags are allowed.</em>', 'wpg'),\n\t\t\t\t\t\"id\" => \"textarea_team_overview\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"textarea\");\n\t\t\t\t\t\n$of_options[] = array( \"desc\" => __('Please select how many items you would like to show in the meet the team section.', 'wpg'),\n\t\t\t\t\t\"id\" => \"select_team\",\n\t\t\t\t\t\"std\" => \"3\",\n\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\"class\" => \"tiny\",\n\t\t\t\t\t\"options\" => $of_options_meet_team_select);\n\n$of_options[] = array( \"name\" => __('News Settings', 'wpg'),\n\t\t\t\t\t\"type\" => \"heading\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Title', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter a title for the Latest News section. (eg; Hear what we have to say. It is all good.)', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_news_title\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Icon', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please add an icon to appear above your title. (eg; [icon name=icon-book])<br/><br />All list of available icons can be found <a href=\"http://fortawesome.github.com/Font-Awesome/\" target=\"_blank\">here</a>.', 'wpg'),\n\t\t\t\t\t\"id\" => \"icon_news\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Overview', 'wpg'),\n\t\t\t\t\t\"desc\" => __('You can add a short overview to appear in this section.<br /><br /><em>*HTML tags are allowed.</em>', 'wpg'),\n\t\t\t\t\t\"id\" => \"textarea_news_overview\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"textarea\");\n\t\t\t\t\t\n$of_options[] = array( \"desc\" => __('Please select how many items you would like to show in the latest news section.', 'wpg'),\n\t\t\t\t\t\"id\" => \"select_news\",\n\t\t\t\t\t\"std\" => \"3\",\n\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\"class\" => \"tiny\",\n\t\t\t\t\t\"options\" => $of_options_latest_project_select);\t\t\t*/\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Contact Settings', 'wpg'),\n\t\t\t\t\t\"type\" => \"heading\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Title', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter a title for the Contact section. (eg; Contact Us)', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_contact_us_title\",\n\t\t\t\t\t\"std\" => \"Contact Us\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Contact Email', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter your company email address (eg; [email protected].), Contact From will send email to this address.', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_contact_email\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Column Right', 'wpg'),\n\t\t\t\t\t\"desc\" => __('You can add a short overview to appear in this section.<br /><br /><em>*HTML tags are allowed.</em>', 'wpg'),\n\t\t\t\t\t\"id\" => \"contact_right_col\",\n\t\t\t\t\t\"std\" => ' <div class=\"paddin_map\"><div class=\"map\">\n <iframe width=\"100%\" height=\"200\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=ru&amp;geocode=&amp;q=Ottawa,+ON,+Canada&amp;sll=45.421438,-75.693569&amp;sspn=0.017531,0.042272&amp;ie=UTF8&amp;hq=&amp;hnear=%D0%9E%D1%82%D1%82%D0%B0%D0%B2%D0%B0,+%D0%9E%D1%82%D1%82%D0%B0%D0%B2%D0%B0+%D0%94%D0%B8%D0%B2%D0%B8%D0%B6%D0%B5%D0%BD,+%D0%9E%D0%BD%D1%82%D0%B0%D1%80%D0%B8%D0%BE,+%D0%9A%D0%B0%D0%BD%D0%B0%D0%B4%D0%B0&amp;t=m&amp;ll=45.421528,-75.697603&amp;spn=0.012049,0.034332&amp;z=14&amp;output=embed\"></iframe><br />\n </div>\n </div>',\n\t\t\t\t\t\"type\" => \"textarea\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Column Left', 'wpg'),\n\t\t\t\t\t\"desc\" => __('You can add a short overview to appear in this section.<br /><br /><em>*HTML tags are allowed.</em>', 'wpg'),\n\t\t\t\t\t\"id\" => \"contact_left_col\",\n\t\t\t\t\t\"std\" => '<div class=\"span3\">\n\t\t\t\t\t<h4>Address Details:</h4>\n\t\t\t\t\t<div class=\"cont\">\n\t\t\t\t\t\t<div class=\"inline-table \"><i class=\"icon-map-marker\"></i></div>\n\t\t\t\t\t\t<div class=\"inline-table mleft10\">\n\t\t\t\t\t\t\t<span>1234 Street </span>\n\t\t\t\t\t\t\t<p>Lorem Ipsum, CA 91919</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"clear clrbot\"></div>\n\t\t\t\t\t\t<div class=\"inline-table\"><i class=\"icon-phone-sign\"></i></div>\n\t\t\t\t\t\t<div class=\"inline-table mleft10\">\n\t\t\t\t\t\t\t<span>Phone: +1 123 123-123-123</span>\n\t\t\t\t\t\t\t<p>Fax: +1 123-123-123</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"clear clrbot\"></div>\n\t\t\t\t\t\t<div class=\"inline-table\"><i class=\"icon-envelope\"></i></div>\n\t\t\t\t\t\t<div class=\"inline-table mleft10\">\n\t\t\t\t\t\t\t<span>E-mail: <span class=\"green\">[email protected]</span></span>\n\t\t\t\t\t\t\t<p>Website: <span class=\"green\">www.example.com</span></p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"span3\">\n\t\t\t\t\t<h4>Opening Hours:</h4>\n\t\t\t\t\t<div class=\"cont contp\">\n\t\t\t\t\t\t<div class=\"inline\">\n\t\t\t\t\t\t\t<p><strong>Monday-Friday:</strong></p>\n\t\t\t\t\t\t\t<p><strong>Saturday:</strong></p>\n\t\t\t\t\t\t\t<p><strong>Sunday:</strong></p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"inline mleft10\">\n\t\t\t\t\t\t\t<p>9am - 5pm</p>\n\t\t\t\t\t\t\t<p>10am - 3pm</p>\n\t\t\t\t\t\t\t<p>Closed</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n </div>',\n\t\t\t\t\t\"type\" => \"textarea\");\t\t\t\t\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Client Settings', 'wpg'),\n\t\t\t\t\t\"type\" => \"heading\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Client Logos Title', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Please enter a title for the Client Logos section. (eg; Folks we have worked with)', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_client_logos_title\",\n\t\t\t\t\t\"std\" => \"OUR PARTNERS\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Client Logo One', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Upload client logos to appear in the client logo section. Choose an image around 100px wide to achieve the best layout.', 'wpg'),\n\t\t\t\t\t\"id\" => \"client_logo_one\",\n\t\t\t\t\t\"std\" => $wpg_site_url. '/img/partn_1.png',\n\t\t\t\t\t\"mod\" => \"min\",\n\t\t\t\t\t\"type\" => \"media\");\n$of_options[] = array( \"name\" => __('Client Logo URL One', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Enter your URL of your client', 'wpg'),\n\t\t\t\t\t\"id\" => \"client_logo_url_one\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Client Logo Two', 'wpg'),\n\t\t\t\t\t\"id\" => \"client_logo_two\",\n\t\t\t\t\t\"std\" => $wpg_site_url. '/img/partn_2.png',\n\t\t\t\t\t\"mod\" => \"min\",\n\t\t\t\t\t\"type\" => \"media\");\n$of_options[] = array( \"name\" => __('Client Logo URL Two', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Enter your URL of your client', 'wpg'),\n\t\t\t\t\t\"id\" => \"client_logo_url_two\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Client Logo Three', 'wpg'),\n\t\t\t\t\t\"id\" => \"client_logo_three\",\n\t\t\t\t\t\"std\" => $wpg_site_url. '/img/partn_3.png',\n\t\t\t\t\t\"mod\" => \"min\",\n\t\t\t\t\t\"type\" => \"media\");\n$of_options[] = array( \"name\" => __('Client Logo URL Tree', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Enter your URL of your client', 'wpg'),\n\t\t\t\t\t\"id\" => \"client_logo_url_tree\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Client Logo Four', 'wpg'),\n\t\t\t\t\t\"id\" => \"client_logo_four\",\n\t\t\t\t\t\"std\" => $wpg_site_url. '/img/partn_4.png',\n\t\t\t\t\t\"mod\" => \"min\",\n\t\t\t\t\t\"type\" => \"media\");\n$of_options[] = array( \"name\" => __('Client Logo URL Four', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Enter your URL of your client', 'wpg'),\n\t\t\t\t\t\"id\" => \"client_logo_url_four\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Client Logo Five', 'wpg'),\n\t\t\t\t\t\"id\" => \"client_logo_five\",\n\t\t\t\t\t\"std\" => $wpg_site_url. '/img/partn_5.png',\n\t\t\t\t\t\"mod\" => \"min\",\n\t\t\t\t\t\"type\" => \"media\");\n$of_options[] = array( \"name\" => __('Client Logo URL Five', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Enter your URL of your client', 'wpg'),\n\t\t\t\t\t\"id\" => \"client_logo_url_five\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Client Logo Six', 'wpg'),\n\t\t\t\t\t\"id\" => \"client_logo_six\",\n\t\t\t\t\t\"std\" => $wpg_site_url. '/img/partn_6.png',\n\t\t\t\t\t\"mod\" => \"min\",\n\t\t\t\t\t\"type\" => \"media\");\n$of_options[] = array( \"name\" => __('Client Logo URL Six', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Enter your URL of your client', 'wpg'),\n\t\t\t\t\t\"id\" => \"client_logo_url_six\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Client Logo Seven', 'wpg'),\n\t\t\t\t\t\"id\" => \"client_logo_seven\",\n\t\t\t\t\t\"std\" => $wpg_site_url. '/img/partn_7.png',\n\t\t\t\t\t\"mod\" => \"min\",\n\t\t\t\t\t\"type\" => \"media\");\n$of_options[] = array( \"name\" => __('Client Logo URL Seven', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Enter your URL of your client', 'wpg'),\n\t\t\t\t\t\"id\" => \"client_logo_url_seven\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Social Profiles', 'wpg'),\n\t\t\t\t\t\"type\" => \"heading\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Twitter Username', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Enter your Twitter Username <br />(ie; guuthemes). This enables you to show your latest tweet in the theme', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_twitter_username\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Twitter', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Enter your Twitter Profile URL <br />(ie; http://twitter.com/guuthemes)', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_twitter_profile\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => __('Facebook', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Enter your Facebook Profile URL <br />(ie; http://facebook.com/guuthemes)', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_facebook_profile\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Dribbble', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Enter your Dribbble Profile URL <br />(ie; http://dribbble.com/guuthemes)', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_dribbble_profile\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => __('Linkedin', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Enter your Linkedin Profile URL <br />(ie; http://linkedin.com/in/guuthemes)', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_linkedin_profile\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Pinterest', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Enter your Pinterest Profile URL <br />(ie; http://pinterest.com/guuthemes)', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_pinterest_profile\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Google +', 'wpg'),\n\t\t\t\t\t\"desc\" => __('Enter your Google + Profile URL <br />(ie; http://plus.google.com/1030594445)', 'wpg'),\n\t\t\t\t\t\"id\" => \"text_googleplus_profile\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\n\n\n\n// Backup Options\n/*$of_options[] = array( \"name\" => __('Backup Options', 'wpg'),\n\t\t\t\t\t\"type\" => \"heading\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Backup and Restore Options', 'wpg'),\n \"id\" => \"of_backup\",\n \"std\" => \"\",\n \"type\" => \"backup\",\n\t\t\t\t\t\"desc\" => __('You can use the two buttons below to backup your current options, and then restore it back at a later time. This is useful if you want to experiment on the options but would like to keep the old settings in case you need it back.', 'wpg'),\n\t\t\t\t\t);\n\t\t\t\t\t\n$of_options[] = array( \"name\" => __('Transfer Theme Options Data', 'wpg'),\n \"id\" => \"of_transfer\",\n \"std\" => \"\",\n \"type\" => \"transfer\",\n\t\t\t\t\t\"desc\" => __('You can tranfer the saved options data between different installs by copying the text inside the text box. To import data from another install, replace the data in the text box with the one from another install and click \"Import Options\".\n\t\t\t\t\t\t', 'wpg'),\n\t\t\t\t\t);*/\n\t\t\t\t\t\n\t}", "title": "" }, { "docid": "7cd6f803cb4b859024227288dc66a62f", "score": "0.61682975", "text": "function md_the_frontend_settings_pages() {\n \n // Call the frontend_settings_pages class\n $frontend_settings_pages = (new MidrubBaseClassesPages\\Frontend_settings);\n\n // Return frontend settings pages\n return $frontend_settings_pages->load_pages();\n \n }", "title": "" }, { "docid": "2d1bfdd1c4a21c73bc2a6369fb1a5e2f", "score": "0.6166422", "text": "public function loadOptions()\n {\n global $current_user;\n\n $dashletDefs = $current_user->getPreference('dashlets', 'Home'); // load user's dashlets config\n if(isset($dashletDefs[$this->id]['options']))\n return $dashletDefs[$this->id]['options'];\n else\n return array();\n }", "title": "" }, { "docid": "09b345728a1f9f953c0a4494d25cd0e8", "score": "0.61572546", "text": "protected function getOptions()\r\n\t{\r\n\t\treturn array();\r\n\t}", "title": "" }, { "docid": "09b345728a1f9f953c0a4494d25cd0e8", "score": "0.61572546", "text": "protected function getOptions()\r\n\t{\r\n\t\treturn array();\r\n\t}", "title": "" }, { "docid": "230fb0c9d957f24294223e295a437997", "score": "0.6156419", "text": "function forms_api_register_options_page()\n{\n add_options_page(\n 'Forms API Settings',\n 'Forms API',\n 'manage_options',\n 'forms-api-settings',\n 'forms_api_options_page'\n );\n}", "title": "" }, { "docid": "d5549149b5d1f29a983344d35151032a", "score": "0.61543244", "text": "function AWM_add_option_pages() {\r\n\tif (function_exists('add_options_page')) {\r\n\t\t$page = add_options_page('AllWebMenus WordPress Menu Plugin', 'AllWebMenus-WP-Menu', \"edit_pages\", __FILE__, array($this,'AWM_options_page'));\r\n\t}\r\n add_action( 'admin_print_styles-' . $page, array($this,'AWM_admin_styles' ));\r\n}", "title": "" }, { "docid": "a7c2c9eef2fd41cdc93d33d1f7f7e747", "score": "0.61530024", "text": "function kloe_qodef_get_page_options() {\n $id = kloe_qodef_get_page_id();\n $page_options = array();\n $menu_area_background_color_rgba = '';\n $menu_area_background_color = '';\n $menu_area_background_transparency = '';\n $vertical_header_background_color = '';\n $vertical_header_opacity = '';\n $vertical_background_image = '';\n\n $header_type = kloe_qodef_get_meta_field_intersect('header_type');\n\n switch ($header_type) {\n case 'header-standard':\n\n if(($meta_temp = get_post_meta($id, 'qodef_menu_area_background_color_header_standard_meta', true)) != '') {\n $menu_area_background_color = $meta_temp;\n }\n\n if(($meta_temp = get_post_meta($id, 'qodef_menu_area_background_transparency_header_standard_meta', true)) != '') {\n $menu_area_background_transparency = $meta_temp;\n }\n\n if(kloe_qodef_rgba_color($menu_area_background_color, $menu_area_background_transparency) !== null) {\n $menu_area_background_color_rgba = 'background-color:'.kloe_qodef_rgba_color($menu_area_background_color, $menu_area_background_transparency);\n }\n\n break;\n\n case 'header-vertical':\n if(($meta_temp = get_post_meta($id, 'qodef_vertical_header_background_color_meta', true)) !== '') {\n $vertical_header_background_color = 'background-color:'.$meta_temp;\n }\n\n if(($meta_temp = get_post_meta($id, 'qodef_vertical_header_transparency_meta', true)) !== '') {\n $vertical_header_opacity = 'opacity:'.$meta_temp;\n }\n\n if(get_post_meta($id, 'qodef_disable_vertical_header_background_image_meta', true) == 'yes'){\n $vertical_background_image = 'background-image:none';\n }elseif(($meta_temp = get_post_meta($id, 'qodef_vertical_header_background_image_meta', true)) !== ''){\n $vertical_background_image = 'background-image:url('.$meta_temp.')';\n }\n\n break;\n }\n\n $page_options['menu_area_background_color'] = $menu_area_background_color_rgba;\n $page_options['vertical_header_background_color'] = $vertical_header_background_color;\n $page_options['vertical_header_opacity'] = $vertical_header_opacity;\n $page_options['vertical_background_image'] = $vertical_background_image;\n\n return $page_options;\n }", "title": "" }, { "docid": "69bd618e3e69984341b90c7dcf7fd762", "score": "0.61517656", "text": "function md_get_admin_component_options() {\n \n // Get component's options\n $component_options = md_the_admin_component_options();\n\n // Verify if component's options exists\n if ( $component_options ) {\n\n // Lista all options\n foreach ( $component_options as $component_option ) {\n\n // Verify if class has the method\n if ( method_exists((new MidrubBaseClassesComponents\\Admin_options_templates), $component_option['type']) ) {\n\n // Set the method to call\n $method = $component_option['type'];\n\n // Display input\n echo (new MidrubBaseClassesComponents\\Admin_options_templates)->$method($component_option);\n \n }\n\n }\n\n }\n \n }", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.61508036", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "5a1332266daa878ac009b0d2ad1af5a2", "score": "0.0", "text": "public function destroy($id)\n {\n if(Tarea::destroy($id)){\n return response('Recurso eliminado',201);\n }else{\n\n return response('Error',500);\n }\n }", "title": "" } ]
[ { "docid": "dcc1d6b4440ac73f55e995eb411296ea", "score": "0.6932749", "text": "public function destroy($id)\n {\n dd('Remove the specified resource from storage.');\n }", "title": "" }, { "docid": "dcc1d6b4440ac73f55e995eb411296ea", "score": "0.6932749", "text": "public function destroy($id)\n {\n dd('Remove the specified resource from storage.');\n }", "title": "" }, { "docid": "6ffd51684d27200dd20bb77ae5392465", "score": "0.65282005", "text": "public function dispatchOnPostRemoveResource($resource);", "title": "" }, { "docid": "20340ae69f46965449dc508b639c84e9", "score": "0.6511765", "text": "public function remove_storage()\n\t{\n\t\t$this->_storage->destroy_storage();\n\t}", "title": "" }, { "docid": "052edc379f178da3bc9936ef223b6ef8", "score": "0.64856714", "text": "public function remove() {\n Storage::disk('public')->delete($this->getPath());\n $this->delete(); //Remove db record\n }", "title": "" }, { "docid": "8566de5772ba8f11471da580f8907d09", "score": "0.64848197", "text": "public static function remove(string $resourcePath): void\n {\n $file = self::generatePath(\n self::generateHash($resourcePath)\n );\n\n if (\\is_file($file)) {\n \\unlink($file);\n }\n }", "title": "" }, { "docid": "b9b85ab47af2f085664ea4fb3f54b26d", "score": "0.6444909", "text": "public function dispatchOnPreRemoveResource($resource);", "title": "" }, { "docid": "7c8424d31eaa624067dc5241abfb9372", "score": "0.6257354", "text": "public function deleteStorage($storageId);", "title": "" }, { "docid": "5881486a94aded91c41895b5d1b51444", "score": "0.6238561", "text": "public function delete($resource) {\r\n\t\t\t\r\n\t\t$url = $this->_path . '/api/v2' . $resource;\r\n\t\t\r\n\t\t$curl = curl_init();\r\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\r\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $this->_headers);\r\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n\t\tcurl_setopt($curl, CURLOPT_VERBOSE, 1);\r\n\t\tcurl_setopt($curl, CURLOPT_HEADER, 1);\r\n\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\r\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\r\n\t\t$response = curl_exec($curl);\r\n\t\t$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\r\n\t\t$header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\r\n\t\t$headers = substr($response, 0, $header_size);\r\n\t\t$body = substr($response, $header_size);\r\n\t\tself::http_parse_headers($headers);\t \r\n\t\tcurl_close ($curl);\r\n\t\tif ($http_status == 204) {\r\n\t \treturn $http_status . ' DELETED';\r\n\t\t } else {\r\n\t\t \t$this->error($body, $url, null, 'DELETE');\r\n\t\t }\r\n\t}", "title": "" }, { "docid": "71cdf2c8771b0884ed0346cbff1672a0", "score": "0.62021154", "text": "abstract protected function destroyResource(): void;", "title": "" }, { "docid": "8c0ed41f8673fd843b7ffdb22bce5eb0", "score": "0.611688", "text": "public function afterDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "77d39170a9748d8eca11f292068832c6", "score": "0.6077847", "text": "public function delete($storageName, $key);", "title": "" }, { "docid": "ece2955e505228c5979763b54ea0ee46", "score": "0.6066214", "text": "public function remove(\n int $right,\n $resource,\n IUser $user,\n ?IResource $parentResource = null\n ): void\n {\n $hash = $this->hash($right, $resource, $user, $parentResource);\n $this->storage->remove($hash);\n }", "title": "" }, { "docid": "43dc6df10818b4435103bc0ee31fc8d1", "score": "0.6045101", "text": "public function destroy($id)\n {\n $record = Resource::where('id', $id)->get();\n\n if (!empty($record[0])) {\n DB::beginTransaction();\n\n $isRemoved = self::remove($record);\n }\n }", "title": "" }, { "docid": "db4382353b96e87cb5a70c801383930a", "score": "0.603214", "text": "public function delete($resourceId = null, $options = []);", "title": "" }, { "docid": "1a7799a3edae94b9a12c008d1d703c57", "score": "0.59831214", "text": "public function deleteStorageService($name);", "title": "" }, { "docid": "a2014b07fec4eb27432905d903e64664", "score": "0.59784347", "text": "public function destroy($id)\n {\n $storage = Storage::find($id);\n if($storage->item())\n {\n $storage->item()->detach();\n if( $storage->delete() )\n {\n return response('Deleted.',200);\n }\n }\n return response('Error.',400);\n }", "title": "" }, { "docid": "f23ad90184663348cc9db3cf44d0b0a5", "score": "0.595982", "text": "public function destroy(Resource $resource)\n {\n //\n\t\t\t\treturn response()->json([\n\t\t\t\t\t'destroyed'=>$resource->delete()\n\t\t\t\t]);\n }", "title": "" }, { "docid": "462a710c39c75c675bfe433bce80e2fe", "score": "0.5951811", "text": "public function destroy()\n {\n if ($this->instance instanceof Storage) {\n $this->instance->destroy();\n }\n $this->instance = null;\n }", "title": "" }, { "docid": "c39bd1cfb71eb924026011c0e976a9d4", "score": "0.5933563", "text": "public function delete(string $resourceType, $modelOrResourceId): void;", "title": "" }, { "docid": "31f350f911a74d37fb3a78e6981becb5", "score": "0.5921418", "text": "public function removeStorage()\n\t{\n\t\t$this->taskExec('docker rm chrome-print-storage')->run();\n\t}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "e03265a289855852afd2372dcb1d8daa", "score": "0.58933157", "text": "public function remove($path, $hard = false);", "title": "" }, { "docid": "7a7d76b4d53301e7ae6922b772849358", "score": "0.5886972", "text": "public function destroy($file)\n {\n $file = File::where('id', $file)->first();\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n $file->delete();\n return redirect()->route('files.index')->with('eliminar', 'ok');\n }", "title": "" }, { "docid": "3f6a8794d81fc01347d2f3307ac44d78", "score": "0.58504206", "text": "public function destroy($id)\n {\n //\n\n $contratista= contratistas::findOrFail($id);\n\n if (Storage::delete('public/'.$contratista->Foto)){\n Contratistas::destroy($id);\n\n }\n\n \n \n return redirect('contratistas')->with('Mensaje','Contratista eliminado');\n }", "title": "" }, { "docid": "a85763dd50ac74b8d2b8124b1c0e3e7b", "score": "0.5850285", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return back()->with('info', 'Resource deleted');\n }", "title": "" }, { "docid": "02a5bc50f3aa8ecd04834387832bc77c", "score": "0.5844418", "text": "public function destroy($id)\n {\n // $this->authorize('haveaccess','producto.destroy');\n $producto= Producto::findOrFail($id);\n\n if(Storage::delete('public/'.$producto->imagen)){\n\n Producto::destroy($id); \n }\n\n return redirect('producto');\n }", "title": "" }, { "docid": "8f406917023a0110d93d6350033a3ab5", "score": "0.58313775", "text": "public function removeItem($id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "title": "" }, { "docid": "a193f7ebf258b5fb63b8919a07678081", "score": "0.5821789", "text": "public function removeAll ($storage) {}", "title": "" }, { "docid": "dc36a581460d40a22ac889b4e61a4ab9", "score": "0.58165264", "text": "public function removeResource($resourceID)\n {\n $resourceID = db::escapechars($resourceID);\n $sql = \"DELETE FROM kidschurchresources WHERE resourceID='$resourceID' LIMIT 1\";\n $result = db::execute($sql);\n if($result){\n return true;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "83da6d00e9ec003d7115d52e8eaed9e7", "score": "0.5812055", "text": "public function del($path);", "title": "" }, { "docid": "c603e0ea04551111c5de9c6585b2815e", "score": "0.5802033", "text": "public function delete()\n {\n $this->repository->git('rm %s', escapeshellarg($this->getRelativePathname())\n );\n }", "title": "" }, { "docid": "f35aaf17008b130a60b3962b50777f92", "score": "0.5800284", "text": "public function unlink();", "title": "" }, { "docid": "818914cdd28df643181e6a2330bc11c4", "score": "0.5789049", "text": "public function destroy($id)\n {\n $supplier=Supplier::find($id);\n $photo=$supplier->photo;\n if($photo){\n unlink($photo);\n }\n $supplier->delete();\n }", "title": "" }, { "docid": "8f1b5736b25701e2b67e4f655f581689", "score": "0.57634306", "text": "public function testResourceRemoveOne()\n {\n $resourceArea = new Zend_Acl_Resource('area');\n $this->_acl->add($resourceArea)\n ->remove($resourceArea);\n $this->assertFalse($this->_acl->has($resourceArea));\n }", "title": "" }, { "docid": "5cc9f2ec9efb9c5303b848052688e6c4", "score": "0.5744329", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n $filename = $product->image;\n $product->delete();\n Storage::delete($filename);\n }", "title": "" }, { "docid": "d1f7c96fed94f01bef33d5bc03b96940", "score": "0.5735748", "text": "public function hardDelete();", "title": "" }, { "docid": "fec8d4881ffc82e41c0642f366a1a75a", "score": "0.5726655", "text": "public function delete($resource)\n {\n return DB::transaction(function () use ($resource) {\n $resource = $this->beforeDelete($resource);\n\n $resource->delete();\n\n return $this->afterDelete($resource);\n });\n }", "title": "" }, { "docid": "7b06ca498cebb34097bee47d0def61eb", "score": "0.5718601", "text": "public function delete() {\n if (unlink($this->fullPath)) {\n $this->fullPath = '';\n $this->mimeType = '';\n $this->simpleName = '';\n $this->size = 0;\n } else {\n throw new Exception('Check write Access to delete file!');\n }\n }", "title": "" }, { "docid": "8c0c11de31899ddf1bbfd6c29f1c19a7", "score": "0.571522", "text": "public function deleteImage(){\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "40f1e1a14810f5eceacb200ffe7aeb20", "score": "0.5696079", "text": "public function destroy(Request $request)\n {\n $slider=Slider::where('id', '=', $request->id)->first();\n if($slider!=null){\n $mi_imagen = public_path().'/'.$slider->url;\n unlink($mi_imagen);\n $slider->delete();\n return 1;\n }else{\n return 0;\n }\n// Lo eliminamos de la base de datos\n\n\n\n }", "title": "" }, { "docid": "60a2181c36b7592447d90a90fcadbe74", "score": "0.5695835", "text": "public function delete($record) {\n $this->fileDataSource->delete($this->resourceName, $record->id);\n $this->afterDelete($record);\n }", "title": "" }, { "docid": "7ef5024136aac86c4c004ee1e7edea43", "score": "0.56815386", "text": "public function drop(): void {\n $disk = Storage::disk($this->scope);\n if ($disk->exists($this->filepath)) {\n $disk->delete($this->filepath);\n }\n }", "title": "" }, { "docid": "c4f845a8d7bbb2425211bda284218817", "score": "0.56762695", "text": "function destroy() {\n\t\tunlink($this->get_file_name());\n\t\tself::remove_from_cache($this);\n\t}", "title": "" }, { "docid": "af7a37a01e344ca75b406caaaa916b45", "score": "0.56741655", "text": "private function removeOldIcon($resource)\n {\n $icon = $resource->getIcon();\n\n if ($icon->getIconType()->getIconType() == IconType::CUSTOM_ICON) {\n $pathName = $this->container->getParameter('claroline.param.thumbnails_directory')\n . DIRECTORY_SEPARATOR . $icon->getIconLocation();\n if (file_exists($pathName)) {\n unlink($pathName);\n }\n }\n }", "title": "" }, { "docid": "cb1740d372b49263432bcc5cf39f97d8", "score": "0.56595594", "text": "public function destroy($id)\n {\n $emp = Employee::where('id',$id)->first();\n $photo = $emp->image;\n if($photo){\n unlink($photo);\n $emp->delete();\n }else{\n $emp->delete();\n }\n\n }", "title": "" }, { "docid": "7567af40a4901dd5dd42113b0bbccb95", "score": "0.56567484", "text": "public function removeResource($name)\n {\n unset($this->resources[$name]);\n if ($name === 'file') {\n $this->resources['file'] = array(\n 'class' => 'Dwoo\\Template\\File',\n 'compiler' => null\n );\n }\n }", "title": "" }, { "docid": "d261281fcf3d7ca08f9b610eb6c3b1f0", "score": "0.56346554", "text": "public function destroy($id)\n {\n $photo = Photo::findOrFail($id);\n unlink(public_path() . $photo->image_url);\n $photo->delete();\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "5e46d09ef2d1d9f143d6831260992e3f", "score": "0.56248415", "text": "public function destroy($id)\n {\n $pres=Prescription::find($id);\n $fileName=$pres->item;\n unlink(storage_path().'/'.'app'.'/'.'public' .'/'.'prescriptions'.'/'. $fileName);\n $pres->delete();\n }", "title": "" }, { "docid": "0428848b8d6110c6be21d9479ece2192", "score": "0.56237406", "text": "public function removeImage()\n {\n if (!empty($this->image) && !empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "title": "" }, { "docid": "81b2a149b82ad070a8fc5640c23cb4c5", "score": "0.56235874", "text": "public function deleteResource($resourceId)\n {\n $req = new RESTRequest();\n $data = $req->adminGet('LearningObject/delete/' . $resourceId)->getData();\n return $data;\n }", "title": "" }, { "docid": "1ed1ac142686a23f0827e755ecbc86db", "score": "0.5618705", "text": "public function delete($resource, array $args = [], array $options = []) {\n return $this->do('DELETE', $resource, $args, $options);\n\n }", "title": "" }, { "docid": "c0ac500c5b367ee589c3c33143eb832b", "score": "0.5617002", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return response()->json(['success' => 'borrado correctamente']);\n }", "title": "" }, { "docid": "a9c212129736f6a4e7fd4eddbccc6f2f", "score": "0.56163317", "text": "public function destroy($id)\n {\n $delete = Supplier::where(\"id\", $id)->first();\n $img = $delete->photo;\n if($img){\n unlink('backend/assets/images/supplier/'.$img);\n $delete->delete();\n toast('Supplier Information Delete Successfully','success');\n return redirect()->route('index.supplier');\n }else{\n toast('Supplier Not Deleted','success');\n return redirect()->route('index.supplier');\n }\n }", "title": "" }, { "docid": "6b5dbac631e37705e1c7cf319db2d7e6", "score": "0.56112254", "text": "public function deleteFromDisk()\n {\n return Storage::disk($this->getLocalDiskName())->delete($this->getStoragePath(true));\n }", "title": "" }, { "docid": "14d4df02668a2d07f51666ab31e093b8", "score": "0.5609148", "text": "public function destroy($id)\n {\n $store = Store::findorFail($id);\n $product = Product::firstorfail()->where('store_id', $id);\n // unlink(public_path() . '/img/' . $product->image);\n $product->delete();\n unlink(public_path() . '/str_img/' . $store->image);\n $store->delete();\n return redirect()->back()->withDelete(\"Store Deleted Succesfully\");\n\n\n \n }", "title": "" }, { "docid": "ea306158775b698c5435960d49c257ab", "score": "0.56042147", "text": "public function delete()\n {\n $this->remote->delete($this->file);\n }", "title": "" }, { "docid": "f7e25a0f3411ba82d9ef10dbdff68bb4", "score": "0.5600532", "text": "public function beforeDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "6fbcf9a59c7f34ed85fd172cdf3d3c38", "score": "0.5595493", "text": "public function remove(){}", "title": "" }, { "docid": "5f7b880d9042e6af83f1343c11f66a8e", "score": "0.5595085", "text": "public function destroy($record);", "title": "" }, { "docid": "eb90c146961dd680727f52741dd87d78", "score": "0.55930966", "text": "public function delete($key) {\n $this->assertKey($key);\n \n unset($this->storage[$key]);\n }", "title": "" }, { "docid": "13866f5828119bb8aae429440b86e949", "score": "0.55884856", "text": "public function destroy($id)\n {\n\n $imga = Image::find($id);\n Storage::disk('public')->delete('img/' . $imga->src);\n $imga->delete();\n\n\n return redirect()->back();\n }", "title": "" }, { "docid": "24ef05d1335abf0bd48387e294875133", "score": "0.5576293", "text": "public function delete($fireStorageEvents = true);", "title": "" }, { "docid": "0d6640f36c0ca88fbe56977a74dad5f1", "score": "0.55737436", "text": "public function remove(MediaInterface $media);", "title": "" }, { "docid": "268c30c6782025503083fc7ba52c1d0a", "score": "0.557298", "text": "public function delete() {\n $this->dataStoreAdapter->deleteObject($this->getUuid());\n }", "title": "" }, { "docid": "2d72bcdac1bcdd14301b9a6ad301fae7", "score": "0.5572793", "text": "public function actionPatientremove() {\n\n $id = $_POST['id'];\n $name = $_POST['name'];\n\n $root_path = Yii::$app->basePath . '/../uploads/patient';\n $path = $root_path . '/' . $id . '/' . $name;\n\n\n if (file_exists($path)) {\n\n if (unlink($path)) {\n\n }\n }\n }", "title": "" }, { "docid": "65ec7f8ef3c165ae2d123008792c4d10", "score": "0.55707175", "text": "public function delete()\n {\n \\File::delete([\n $this->path,\n $this->thumbnail_path,\n\n ]);\n\n parent::delete();\n }", "title": "" }, { "docid": "8179dc9b6bd99410fef7c74e3b56208a", "score": "0.5570384", "text": "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n @unlink($file); \n \n }", "title": "" }, { "docid": "ead6a9412215d17945f8769860e1b262", "score": "0.5569038", "text": "public function remove($file) {\n\t\t$this->emitCache('put', $file);\n\t\tparent::remove($file);\n\t}", "title": "" }, { "docid": "4aff284263b8a4a2b80b972accc89eb6", "score": "0.55585116", "text": "public function removeFile($file_obj)\n\t{\n\t\t$fs = new Filesystem();\n\t\tif($fs->exists($file_obj->getUrlStorage()))\n\t\t{\n\t\t\t$fs->remove($file_obj->getUrlStorage());\n\t\t}\n\t}", "title": "" }, { "docid": "ec1b691c67eb4c9111f82f370bc46ab2", "score": "0.55521524", "text": "public function removeAction ()\n { \n if (!empty ($this->params ['file']) AND file_exists (UPLOAD_PATH.$this->params ['file']))\n unlink (UPLOAD_PATH.$this->params ['file']); \n if (!empty ($this->params ['media_id']))\n {\n $model = new Model_DbTable_MediaData ();\n $model->delete_media ($this->params ['media_id']);\n } \n }", "title": "" }, { "docid": "cf67810bc53f9cd6c02a127c0ee780e0", "score": "0.55445576", "text": "public function remove()\n\t{\n\t\tFile::remove($this->tempName);\n\t}", "title": "" }, { "docid": "94cb51fff63ea161e1d8f04215cfe7bf", "score": "0.55422723", "text": "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "9ac57f5d74d74f050136ae1e642ec949", "score": "0.5532133", "text": "public function delete($path) {\n $absPath = $this->_getAbsPath($path);\n $status = @unlink($absPath);\n\n if (!$status) {\n if (file_exists($absPath)) {\n throw new Scalar_Storage_Exception('Unable to delete file.');\n } else {\n $this->_log(\"Scalar_Storage_Adapter_Filesystem: Tried to delete missing file '$path'.\");\n }\n }\n }", "title": "" }, { "docid": "584dea86c95ee49398418c499126a231", "score": "0.55317944", "text": "public function forgetUsed()\n {\n if ($this->app['files']->exists($this->getUsedStoragePath())) {\n $this->app['files']->delete($this->getUsedStoragePath());\n }\n }", "title": "" }, { "docid": "52c48eff326d035cdfe9e0df0c79a23f", "score": "0.55300117", "text": "public function removeFromStorage()\n {\n if ( ! $this->is_raw ) {\n return MediaStorage::adapterByDisk($this->disk)->delete($this->path);\n }\n\n return true;\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
c07bbf15cf5e523eeff5a93c92430ef5
Updates an existing PagePartial model. If update is successful, the browser will be redirected to the 'view' page.
[ { "docid": "631099cd792285d256b81bb3b2328c06", "score": "0.5809043", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n \n // Load all the translations\n $model->loadTranslations(array_keys(Yii::$app->params['languages']));\n \n if (Yii::$app->request->getIsPost()) {\n \n $post = Yii::$app->request->post();\n \n // Ajax request, validate the models\n if (Yii::$app->request->isAjax) {\n \n // Populate the model with the POST data\n $model->load($post);\n \n // Populate the translation model for the primary language\n $translationModel = $model->getTranslation(Yii::$app->language);\n $translationModel->name = $post['PagePartialLang'][Yii::$app->language]['name'];\n $translationModel->content = $post['PagePartialLang'][Yii::$app->language]['content'];\n \n // Validate the translation model\n $translationValidation = ActiveForm::validate($translationModel);\n $correctedTranslationValidation = [];\n \n // Correct the keys of the validation\n foreach($translationValidation as $k => $v) {\n $correctedTranslationValidation[str_replace('pagepartiallang-', \"pagepartiallang-{$translationModel->language}-\", $k)] = $v; \n }\n\n // Validate the model and primary translation model\n $response = array_merge(ActiveForm::validate($model), $correctedTranslationValidation);\n \n // Return validation in JSON format\n Yii::$app->response->format = Response::FORMAT_JSON;\n return $response;\n \n // Normal request, save models\n } else {\n // Wrap the everything in a database transaction\n $transaction = Yii::$app->db->beginTransaction(); \n \n // Save the main model\n if (!$model->load($post) || !$model->save()) {\n return $this->render('update', [\n 'model' => $model\n ]);\n } \n \n // Save the translation models\n foreach (Yii::$app->params['languages'] as $languageId => $languageName) {\n $model->language = $languageId;\n $model->name = $post['PagePartialLang'][$languageId]['name'];\n $model->content = $post['PagePartialLang'][$languageId]['content'];\n \n if (!$model->saveTranslation()) {\n return $this->render('update', [\n 'model' => $model\n ]); \n } \n }\n \n $transaction->commit();\n \n // Set flash message\n $model->language = Yii::$app->language;\n Yii::$app->getSession()->setFlash('partial', Yii::t('app', '{item} has been updated', ['item' => $model->name]));\n \n return $this->redirect(['index']); \n } \n }\n\n return $this->render('update', [\n 'model' => $model\n ]);\n }", "title": "" } ]
[ { "docid": "80a4d5f32fd26ef808ccace193a3cca1", "score": "0.6609385", "text": "public function update()\n\t{\n\t $this->load->model('Pages_model');\n\t return $this->Pages_model->update();\n\t}", "title": "" }, { "docid": "d3d9656e61e6e34e8afae1c5b5f2021d", "score": "0.63256776", "text": "public function actionUpdate($id)\n {\n\t\tif (!\\Yii::$app->user->can('cmsPagesUpdate')) {\n\t\t\tthrow new ForbiddenHttpException('You do not have privileges to view this content.');\n\t\t}\n\t\t\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "5794d8afcf47109c6acbe70a23a82299", "score": "0.6222532", "text": "public function update_page($id)\r\n\t{\r\n\t\t$this->load->model('pages_model');\r\n\r\n\t\t$this->load->library('form_validation');\r\n\r\n\t\tif ($this->input->post('update_page'))\r\n\t\t{\r\n\t\t\t$this->form_validation->set_rules('name', 'above', 'required');\r\n\t\t\t$this->form_validation->set_rules('body', 'above', 'required');\r\n\r\n\t\t\tif ($this->form_validation->run())\r\n\t\t\t{\r\n\t\t\t\t$response = $this->pages_model->update_page($id);\r\n\t\t\t\tredirect(current_url());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->data['page_data'] = $this->pages_model->get_pages($id);\r\n\r\n\t\t// Get any status message that may have been set.\r\n\t\t$this->data['message'] = $this->session->flashdata('message');\r\n\t\t\r\n\t\t$this->load->view('admin/pages/pages_update_view', $this->data);\r\n\t}", "title": "" }, { "docid": "cc8616baab61f4336321986a93dad492", "score": "0.61494786", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $activePages = PagesDetail::getActivePages();\n $activePages = ArrayHelper::map($activePages,'category_name','category_name');\n if ($model->load(Yii::$app->request->post())) {\n $file = UploadedFile::getInstance($model, 'page_image');\n if (!empty($file)) {\n // image\n $tempFileName = $model->title . '-' . time();\n $prodImageTitle = strtolower(preg_replace('/[^A-Za-z0-9-]+/', '-', $tempFileName));\n $model->page_image = $prodImageTitle . \".\" . $file->getExtension();\n FileHelper::createDirectory(PagesDetail::getPagesUploadDir(), 0777, true);\n if (file_exists(PagesDetail::getPagesUploadDir() . DIRECTORY_SEPARATOR . $model->page_image)) {\n unlink(PagesDetail::getPagesUploadDir() . DIRECTORY_SEPARATOR . $model->page_image);\n }\n $file->saveAs(PagesDetail::getPagesUploadDir() . DIRECTORY_SEPARATOR . $model->page_image);\n } else {\n unset($model->page_image);\n }\n $model->updated_by = Yii::$app->user->identity->id;\n $model->updated_at = date('Y-m-d H:i:s');\n if ( $model->save() ) {\n Yii::$app->session->setFlash('success', \"Page detail updated successfully.\");\n return $this->redirect(['view', 'id' => $model->id]);\n }\n Yii::$app->session->setFlash('error', \"Page detail not added.\");\n }\n $categoryStatus = PagesDetail::CATEGORY_STATUS;\n return $this->render('update', [\n 'model' => $model,\n 'activePages' => $activePages,\n 'categoryStatus' => $categoryStatus,\n ]);\n }", "title": "" }, { "docid": "2fd6933db8ec3c571ea435239688e8e0", "score": "0.5968355", "text": "public function actionUpdate()\n {\n $model = Yii::$app->website;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->refresh();\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "3700f0c46e034877dc11151354a8e1ba", "score": "0.5954367", "text": "public function actionUpdate($id)\n {\n \n $model = $this->findModel($id);\n \n if ($model->load(Yii::$app->request->post()))\n {\n $model->u_by = Yii::$app->user->id;\n $model->u_date = time();\n if($model->save())\n {\n $msg = '<div class=\"alert alert-dismissable alert-success fade in\">\n <button data-dismiss=\"alert\" class=\"close close-sm\" type=\"button\">\n <i class=\"fa fa-times\"></i>\n </button>\n <strong>Success!</strong> '.' CMS Page has been successfully updated.'.'</div>';\n Yii::$app->getSession()->setFlash('flash_msg', $msg);\n return $this->redirect('index');\n }\n else\n {\n $msg = Yii::$app->params['msg_error'].' Enable to update CMS Page. Please try again later.'.Yii::$app->params['msg_end'];\n Yii::$app->getSession()->setFlash('flash_msg', $msg);\n return $this->redirect('index');\n }\n \n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "e6fe8a3c33835b8242e6c40e91108f1d", "score": "0.59496444", "text": "public function actionUpdate()\n\t{\n\t\t$model=$this->loadModel();\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Creativeparkbaseinfo']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Creativeparkbaseinfo'];\n $this->formatAttributes($model);\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->cp_id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "e12144ee917126c7559ce46253923ddd", "score": "0.59324706", "text": "public function actionUpdate($id) {\n\t\t$model=$this->loadmodel($id);\n\t\t$gibcat = new GenericImageBankCategory;\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Pagecontent']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Pagecontent'];\n\t\t\t$model->date_last_modified = date(\"Y-m-d H:i:s\");\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->pageid));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model, 'gibcat'=>$gibcat,\n\t\t));\n\t}", "title": "" }, { "docid": "21d2132829dfd7d55c6fc2650669ecf4", "score": "0.5912644", "text": "public function actionUpdate($id)\n {\n if ($id) {\n $model=$this->loadModel($id);\n }\n else {\n $model=new Sections;\n }\n\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['Sections'])){\n $model->attributes=$_POST['Sections'];\n if($model->save()){\n echo 'success';\n Yii::app()->end();\n }\n }\n\n $this->renderPartial('edit',array('model'=>$model), false, true);\n }", "title": "" }, { "docid": "853a15d6b3dc46ce6b383bc9a6020b88", "score": "0.58766526", "text": "public function actionUpdate($id)\r\n {\r\n $model = $this->loadModel($id);\r\n\r\n $this->renderPartial('update', array('model'=> $model));\r\n\r\n }", "title": "" }, { "docid": "e89e52cf31cdd947a116d7cf9e5fb4b2", "score": "0.5852044", "text": "public function relatedPageUpdate(Request $request){ \n //return $request->all();\n $pageId = $request->input('id');\n if(!empty($pageId)) {\n //class model include\n $pagesData = RelatedPage::findOrFail($pageId);\n $pagesData->page_title = $request->input('page_title'); \n $pagesData->menu_name = $request->input('menu_name'); \n $pagesData->sub_title = $request->input('sub_title'); \n $pagesData->page_desc = $request->input('page_desc'); \n // insert check & success message\n if($pagesData->update()){\n Session::flash('success', 'Data updated successfully');\n return redirect()->back();\n }else{\n Session::flash('failed', 'Unable to perfrom the Action');\n return redirect()->back();\n } \n } \n \n }", "title": "" }, { "docid": "864ae07044468854e6899599104a8560", "score": "0.5830345", "text": "public function editAction(){\n \t\t\n\t\tglobal $mySession; \n \t\t\n\t\t$this->view->pageHeading = \"Edit Page Content\";\n\t\t$this->view->pageDescription = \"edit page content\";\n \t\t$this->view->pageIcon = \"fa fa-save\";\n\t\t$this->view->showEditorUpload = \"page\";\n\t\t \n \t\t$page_id = $this->_getParam('page_id') ;\n\t\n\t\t$content = $this->modelStatic->getPage($page_id);\n\t\t\n \t\tif(!$content){\n\t\t\t$mySession->errorMsg = \"No Such Page Found \";\n\t\t\t$this->_redirect(\"privatepanel/pages\");\n\t\t}\n\t\t\n \t\t \n \t\t$form = new Application_Form_StaticForm();\n\t\t$form->page();\n \t\t$form->populate($content);\n\t\t\n \t\tif($this->getRequest()->isPost()) { \n\t\t\n\t\t\t$posted_data = $this->getRequest()->getPost();\n \t\t\t\n \t\t\tif($form->isValid($posted_data)){\n\t\t\t\t\n\t\t\t\t$data=$form->getValues();\n\t\t\t\t$data['page_updated']=date('Y-m-d H:i:s');\n \t\t\t\t$is_update = $this->modelStatic->add(\"pages\",$data ,\"page_id=\".$page_id);\n\t\t\t\t\n\t\t\t\tif($is_update->success){\n\t\t\t\t\t$mySession->successMsg = \" Page Content Successfully Updated \";\n\t\t\t\t\t$this->_helper->getHelper(\"Redirector\")->gotoRoute(array(),\"admin_static_pages\");\n\t\t\t\t}\n\n\t\t\t\t$mySession->errorMsg = $is_update->message;\n\n \t\t\t}else{\n\t\t\t\t$mySession->errorMsg = \" Please Check Information Again ... ! \";\n \t\t\t}\n\t\t }\n \t\t \n\t\t \n\t\t $this->view->page_content = $content;\n \t\t \n\t\t $this->view->form =$form;\n\t\t \n\t\t $this->_helper->getHelper('viewRenderer')->renderScript(\"add.phtml\");\n\t}", "title": "" }, { "docid": "e44265f3db2ad22a7e7a42329ac02afb", "score": "0.58024853", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n // No language is set for this model, we will use the current user language\n if (is_null($model->locale)) {\n\n $model->locale = Yii::$app->sourceLanguage;\n if (!Yii::$app->request->isPost) {\n\n $languages = $model->getLanguagesList(false);\n Yii::$app->getSession()->setFlash(\n 'danger',\n Yii::t(\n 'app/modules/pages',\n 'No display language has been set. Source language will be selected: {language}',\n [\n 'language' => (isset($languages[Yii::$app->sourceLanguage])) ? $languages[Yii::$app->sourceLanguage] : Yii::$app->sourceLanguage\n ]\n )\n );\n }\n }\n\n // Get current URL before save this page\n $oldPageUrl = $model->getPageUrl(false);\n\n if (Yii::$app->request->isAjax) {\n if ($model->load(Yii::$app->request->post())) {\n if ($model->validate())\n $success = true;\n else\n $success = false;\n\n return $this->asJson(['success' => $success, 'alias' => $model->alias, 'errors' => $model->errors]);\n }\n } else {\n\n if ($model->load(Yii::$app->request->post())) {\n\n // Get new URL for saved page\n $newPageUrl = $model->getPageUrl(false);\n\n if($model->save()) {\n\n // Set 301-redirect from old URL to new\n if (isset(Yii::$app->redirects) && ($oldPageUrl !== $newPageUrl) && ($model->status == $model::STATUS_PUBLISHED)) {\n // @TODO: remove old redirects\n Yii::$app->redirects->set('pages', $oldPageUrl, $newPageUrl, 301);\n }\n\n // Log activity\n $this->module->logActivity(\n 'Page `' . $model->name . '` with ID `' . $model->id . '` has been successfully updated.',\n $this->uniqueId . \":\" . $this->action->id,\n 'success',\n 1\n );\n\n Yii::$app->getSession()->setFlash(\n 'success',\n Yii::t(\n 'app/modules/pages',\n 'OK! Page `{name}` successfully updated.',\n [\n 'name' => $model->name\n ]\n )\n );\n } else {\n // Log activity\n $this->module->logActivity(\n 'An error occurred while update the page `' . $model->name . '` with ID `' . $model->id . '`.',\n $this->uniqueId . \":\" . $this->action->id,\n 'danger',\n 1\n );\n\n Yii::$app->getSession()->setFlash(\n 'danger',\n Yii::t(\n 'app/modules/pages',\n 'An error occurred while update a page `{name}`.',\n [\n 'name' => $model->name\n ]\n )\n );\n }\n return $this->redirect(['index']);\n }\n }\n\n return $this->render('update', [\n 'module' => $this->module,\n 'model' => $model\n ]);\n }", "title": "" }, { "docid": "b5512cb2927c0a7fbbb0fbf763460583", "score": "0.5771069", "text": "public function actionUpdate()\n\t{\n\t\t$model=$this->loadModel();\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Survey']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Survey'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->sur_id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "e3d1e9204b907d1ecfb326902a2ef2ba", "score": "0.5761052", "text": "public function updatePage(){\n\n }", "title": "" }, { "docid": "88824914a803a08500652647850a951c", "score": "0.57437694", "text": "public function actionUpdate()\n\t{\n\t\t$frontRoot=\\Yii::getAlias('@frontend');\n\t\t$parentDirFull=$frontRoot.'\\views';\n\t\t\n\t\t$parentDir=LuLu::getGetValue('d','.');\n\t\t$parentDirFull.=ltrim($parentDir,'.');\n\t\t\n\t\t$file=LuLu::getGetValue('file');\n\t\t$filePath=$parentDirFull.'\\\\'.$file;\n\t\t\n\t\t\n\t\t\n\t\t$model=[]; //= $this->findModel($id);\n\t\t\n\t\t\n\t\t$fileContent=LuLu::getPostValue('FileContent');\n\t\tif($fileContent!=null)\n\t\t{\n\t\t\t\n\t\t\tTFileHelper::writeFile($filePath, $fileContent);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fileContent = TFileHelper::readFile($filePath);\n\t\t}\n\t\t\n\t\t$locals=[];\n\t\t$locals['parentDirFull']=$parentDirFull;\n\t\t$locals['model']=$model;\n\t\t$locals['file']=$file;\n\t\t$locals['content']=$fileContent;\n\t\t$locals['isNewRecord']=false;\n\t\t\n\t\treturn $this->render('update', $locals);\n\t\t\n\t\n\t}", "title": "" }, { "docid": "6ed826b0e5ba174f239127a1bedc24dd", "score": "0.5743272", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=Page::model()->findByPk($id);\n\n\t\tif(isset($_POST['Page']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Page'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('admin'));\n\t\t}\n\t\t\n\t\t// Query all the widgets on this page\n\t\t$criteria = new CDbCriteria();\n\t\t$criteria->condition = \"page_id = :page_id\";\n\t\t$criteria->params = array(\":page_id\"=>$model->id);\n\t\t$criteria->order = \"row_order\";\n\t\t$widgets = Widget::model()->findAll($criteria);\n\t\t\n\t\t// Register javascript file for dynamic widget management\n\t\t$baseUrl = Yii::app()->baseUrl;\n\t\t$cs = Yii::app()->getClientScript();\n\t\t$cs->registerScriptFile($baseUrl.'/js/widgets_admin.js');\n\t\t\n\t\t// Dynamic js parameters to register on the page\n\t\tYii::app()->clientScript->registerScript('widget_variables',\"\n\t\t\tvar changes = false;\n\t \t\tvar saving = false;\n\t \n\t \t\tvar model_id = \".$model->id.\";\n\t \t\tvar current_columns = \".$model->columns.\";\n\t \t\tvar url_create = \\\"\".CHtml::normalizeUrl(array(\"/widget/create\")).\"\\\";\n\t \t\tvar url_update = \\\"\".CHtml::normalizeUrl(array(\"/widget/update\")).\"\\\";\n\t \t\tvar url_delete = \\\"\".CHtml::normalizeUrl(array(\"/widget/delete\")).\"\\\";\n\t \t\tvar url_autocomplete = \\\"\".CHtml::normalizeUrl(array('item/aclist', array('item_type'=>\"\"))).\"\\\";\n\t\t\", CClientScript::POS_END);\n\n\t\t$this->render('update',array(\n\t\t\t'model' => $model,\n\t\t\t'categories' => Category::model()->findAll(),\n\t\t\t'widgets' => $widgets,\n\t\t));\n\t}", "title": "" }, { "docid": "07d09135fc0c87d983f5f90a9efd0a0b", "score": "0.5731615", "text": "public function update_page(Request $request, $id){\n Page::find($id)->update($request->all());\n return redirect()->route('content.index')\n ->with('success','Page Updated Successfully');\n }", "title": "" }, { "docid": "c6b49367defca31db6cae8f86f19678f", "score": "0.5712566", "text": "public function updating(Page $Page)\n {\n //code...\n }", "title": "" }, { "docid": "f393414638a630a7d2f83cf7e3b00a18", "score": "0.5675065", "text": "public function update(Request $request, PartialPayment $PartialPayment)\n {\n //\n }", "title": "" }, { "docid": "e18b6f56fb5a9155abf08889e29b0626", "score": "0.5665672", "text": "public function actionUpdate()\n\t{\n\t\t$model=$this->loadModel();\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Person']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Person'];\n\t\t\tif($model->save())\n\t\t\t{\n\t\t\t\tif(!$this->goBack())\n\t\t\t\t\t$this->redirect(array('admin'));\n\t\t\t\telse\n\t\t\t\t\t$this->goBack();\n\t\t\t}\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "549687ce3ba94650d9e2ed5eee8e003a", "score": "0.56455606", "text": "public function update() {\n\t\t\t//check the owner!!!!!!!\n\n\t\t\t//must set id and the rest too. id is separate.\n\t\t\t//for users especially, i need to be more careful.\n\t\t\t//this is a basic one without permissions.\n\t\t\tif (!isset($_GET['id']) || !lesson::is_owner($_GET['id'], $_SESSION['user']->get_id())){\n\t\t\t\treturn call('pages', 'error');\n\t\t\t}\n\n\t\t\t//if there is post data...\n\t\t\t//todo: i need to check if the model actually exists on post, too!!!!\n\t\t\tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\t\t\t\t$postedToken = filter_input(INPUT_POST, 'token');\n\t\t\t\tif(!empty($postedToken) && isTokenValid($postedToken)){\n\t\t\t\t\t//probably i should do that isset stuff\n\t\t\t\t\t$model = new $this->model_name();\n\t\t\t\t\t\t$model->set_id($_GET['id']); //i should not trust that...\n\t\t\t\t\t\t$model->set_properties($_POST);\n\t\t\t\t\t\t$model->set_properties(array('owner' => $_SESSION['user']->get_id()));\n\t\t\t\t\t\tif($model->is_valid()){\n\t\t\t\t\t\t\t$model->update();\n\t\t\t\t\t\t\tadd_alert('Successfully updated!', Alert_Type::SUCCESS);\n\t\t\t\t\t\t\treturn redirect('lesson', 'index');\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tadd_alert('Please try again.', Alert_Type::DANGER);\n\t\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tadd_alert('Please try again.', Alert_Type::DANGER);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$model = ($this->model_name)::get($_GET['id']);\n\t\t\tif($model == null){\n\t\t\t\treturn call('pages', 'error');\n\t\t\t}else{\n\t\t\t\t// Figure out what is happening here\n\t\t\t\t$properties = $model->get_properties();\n\t\t\t\t$types = $model::get_types();\n\t\t\t\tunset($properties['exercises']);\n\t\t\t\tunset($types['exercises']);\n\t\t\t\tunset($properties['owner']);\n\t\t\t\tunset($types['owner']);\n\t\t\t\t$view_to_show = 'views/shared/update.php';\n\t\t\t\trequire_once('views/shared/layout.php');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9fd7ed5cc83831eb62b64fc1f0f31951", "score": "0.5629542", "text": "public function updated(Page $Page)\n {\n //code...\n }", "title": "" }, { "docid": "f56539b2be6b7985f9274039d7d176b3", "score": "0.56264645", "text": "public function PUpdate()\n {\n if(Auth::user()){\n $user = User::find(Auth::user()->id);\n if($user){\n return view('admin.layouts.update_profile',compact('user'));\n }\n\n }\n }", "title": "" }, { "docid": "ed5f833ec6bc374ac99d369f5d154c1f", "score": "0.56216973", "text": "public function action_update()\n\t{\n\t\t$element = ORM::Factory($this->_orm_model, $_GET['id']);\n\t\t\n\t\t$form = Formo::form()->orm('load',$element);\n\t\t$form->add('update', 'submit', 'Save');\n\t\t\n\t\tif($form->load($_POST)->validate())\n\t\t{\n\t\t\tif($this->_update_passed($form, $element))\n\t\t\t{\n\t\t\t\t$element->save();\n\t\t\t\t$form->orm('save_rel', $element);\n\n\t\t\t\t$this->request->redirect(Route::get($this->_route_name)->uri(array('controller'=> Request::current()->controller())));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_update_failed($form, $element);\n\t\t}\n\n\t\treturn $this->render('update', array('form' => $form));\n\t}", "title": "" }, { "docid": "f0a4358e1097ffe27ee7acfd40259636", "score": "0.5612858", "text": "public function actionUpdate()\n {\n $model=$this->loadComment();\n\n if(isset($_POST['Comment']))\n {\n $model->attributes=$_POST['Comment'];\n \n if(isset($_POST['previewComment']))\n $model->validate();\n else if(isset($_POST['submitComment']) && $model->save())\n $this->redirect(array('post/show','slug'=>$model->post->slug,'#'=>'c'.$model->id));\n }\n \n $this->pageTitle=Yii::t('lan','Update Comment');\n $this->render('update',array('model'=>$model));\n }", "title": "" }, { "docid": "f01592bb0bee834daa1c9cfaa5db5f9b", "score": "0.55955607", "text": "public function updateAction()\r\n {\r\n $this->users->theme->addStylesheet('css/anax-grid/style.php');\r\n $users = new \\Anax\\MVC\\CUserModel();\r\n $users->setDI($this->di);\r\n $user = $this->users->find(1);\r\n $form = new \\Anax\\HTMLForm\\CFormPsWebUpdateUser($user);\r\n $form->setDI($this->di);\r\n $form->check();\r\n\n $this->di->views->add('users/viewtitle', [\r\n 'title' => \"Uppdatera användare\"\r\n ]);\r\n\r\n $this->di->views->add('default/page', [\r\n 'title' => \"\",\r\n 'content' => $form->getHTML()\r\n ]);\r\n\r\n }", "title": "" }, { "docid": "21f4cb059acd225347149b532265cbee", "score": "0.5589028", "text": "public function actionUpdate() {\n $model = $this->loadModel();\n if (isset($_POST['Account'])) {\n $model->attributes = $_POST['Account'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('update', array('model' => $model));\n }", "title": "" }, { "docid": "09c14a908e95ce313ab32c4a03148d26", "score": "0.5583897", "text": "public function actionUpdate()\n\t{\n\t\t$model=$this->loadModel();\n\t\tif(isset($_POST['Comments']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Comments'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "3aab854aacc998e3ad64bddcddd1b051", "score": "0.5581924", "text": "public function actionUpdate()\n\t{\n\t\t$model=$this->loadModel();\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Involved']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Involved'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->involved_oid));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "aeeee34cbb8a95077a3d1d5369cf9e02", "score": "0.55692226", "text": "public function actionUpdate($id)\n {\n \t$model = $this->findModel($id);\n\n \tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n \t\treturn $this->redirect(['view', 'id' => $model->side_id]);\n \t}\n\n \treturn $this->render('update', [\n \t\t'model' => $model,\n \t]);\n }", "title": "" }, { "docid": "46a9699dc70f3ed055e3c2fedba733dd", "score": "0.55691206", "text": "public function updatePage($id){\n // Update the page\n $page_name_input = str_replace('&amp;', '&', $this->chkPageName($this->input->post('page_name', TRUE)));\n ($this->input->post('active')) ? $active = $this->input->post('active', TRUE) : $active = 0;\n $page_url = $this->chkPageName($this->Csz_model->rw_link($page_name_input));\n $content2 = $this->input->post('content', FALSE);\n $content1 = str_replace('&lt;', '<', $content2);\n $content = str_replace('&gt;', '>', $content1);\n $custom_css = str_replace(array('<style type=\"text/css\">',\"<style type='text/css'>\",'<style>','</style>'), '', $this->input->post('custom_css', FALSE));\n $custom_js = str_replace(array('<script type=\"text/javascript\">',\"<script type='text/javascript'>\",'<script>','</script>'), '', $this->input->post('custom_js', FALSE));\n $user_groups_idS = $this->input->post('user_groups_idS');\n $user_groups_id = '';\n if (isset($user_groups_idS)) {\n if (count($user_groups_idS) == 1) {\n $user_groups_id = $user_groups_idS[0];\n } else {\n $user_groups_id = implode(\",\", $user_groups_idS);\n }\n }\n $this->db->set('page_name', $page_name_input, TRUE);\n $this->db->set('page_url', $page_url, TRUE);\n $this->db->set('lang_iso', $this->input->post('lang_iso', TRUE), TRUE);\n $this->db->set('page_title', str_replace('&amp;', '&', $this->input->post('page_title', TRUE)), TRUE);\n $this->db->set('page_keywords', $this->input->post('page_keywords', TRUE), TRUE);\n $this->db->set('page_desc', $this->input->post('page_desc', TRUE), TRUE);\n $this->db->set('content', $content);\n if($this->Csz_auth_model->is_group_allowed('pages cssjs additional', 'backend') !== FALSE){\n $this->db->set('more_metatag', $this->input->post('more_metatag', FALSE), TRUE);\n $this->db->set('custom_css', $custom_css, TRUE);\n $this->db->set('custom_js', $custom_js, TRUE);\n }\n if($id != 1){\n $this->db->set('active', $active, FALSE);\n }\n $this->db->set('user_groups_idS', $user_groups_id);\n $this->db->set('timestamp_update', $this->Csz_model->timeNow(), TRUE);\n $this->db->where('pages_id', $id);\n $this->db->update('pages');\n $this->Csz_model->clear_all_cache();\n }", "title": "" }, { "docid": "a9ecda75a9280c4bebe962a705628bbd", "score": "0.5559589", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Preadmission']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Preadmission'];\n\t\t\tif($file=CUploadedFile::getInstance($model,'photo_data'))\n \t\t {\n $model->photo_file_name=$file->name;\n $model->photo_content_type=$file->type;\n $model->photo_file_size=$file->size;\n $model->photo_data=file_get_contents($file->tempName);\n \t\t }\n\t\t\tif($model->save())\n\t\t\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "ab439801c0c06b2a347220d238eb1ef5", "score": "0.55513054", "text": "public function update(PageRequest $request, Page $page)\n {\n $this->_save($page,$request);\n return redirect('admin/pages');\n }", "title": "" }, { "docid": "5d1f126a0ce054144e171661731aaab1", "score": "0.5512956", "text": "public function UpdatePage($data)\n\t\t{\n\t\t\t$this->db->where('pid',$data['pid']);\n\t\t\t\treturn $this->db->update('InternalPages',$data);\n\t\t}", "title": "" }, { "docid": "a883c34d332014a38f534c3ea6bc7916", "score": "0.5512766", "text": "public function update(UpdateRequest $request, Page $page)\n {\n\n $page->fill($request->only(['path', 'fa_code']));\n $page->save();\n\n PageContent::updateOrCreate(\n ['language' => config('app.default_locale'), 'page_path' => $page->path],\n $request->only(['title', 'description', 'text', 'h1', 'keywords'])\n );\n\n return redirect()->route('admin.page.edit', ['page' => $page->path])->with(['success-message' => trans('page updated')]);\n\n }", "title": "" }, { "docid": "e2796585e3b5cecf9659e7779baf650c", "score": "0.5504928", "text": "public function update(Request $request, Page $page) {\n//\n }", "title": "" }, { "docid": "54bd3d270c14b0dc83d96a630f7464f3", "score": "0.54935104", "text": "public function actionUpdate()\n {\n $model = $this->findModel(Yii::$app->request->post('id'));\n\n if ($model->load(Yii::$app->request->post(),'') && $model->save()) {\n return $this->success();\n }\n\n return $this->fail($model->errors);\n }", "title": "" }, { "docid": "9d90cae400a0532dfa168995fa0309d2", "score": "0.5484708", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n $languages\t\t= Languages::find()->where('status = :status',['status' => 1])->all();\n\t\tif ($model->load(Yii::$app->request->post())) {\n\t\t\t\n\t\t\t$dataPost = Yii::$app->request->post();\n\t\t\t//var_dump($dataPost);exit;\n\t\t\t/** begin transaction **/\n\t\t\t$transaction = \\Yii::$app->db->beginTransaction();\n try{\n\t\t\t\tif($model->save()){\n\t\t\t\t\tforeach($languages as $lang){\n\t\t\t\t\t\t$contentModel = PageMetaContents::find()\n\t\t\t\t\t\t->where('page_meta_id = :page_meta_id AND language_code = :language_code',[\n\t\t\t\t\t\t\t'page_meta_id' \t=> $model->id,\n\t\t\t\t\t\t\t'language_code' \t=> $lang->code\t\n\t\t\t\t\t\t])->one();\n\t\t\t\t\t\tif(empty($contentModel))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$contentModel = new PageMetaContents();\n\t\t\t\t\t\t\t$contentModel->page_meta_id \t= $model->id;\n\t\t\t\t\t\t\t$contentModel->language_code \t= $lang->code;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$contentModel->load($dataPost[$lang->code]);\n\t\t\t\t\t\tif(!$contentModel->save()){\n\t\t\t\t\t\t\tthrow new \\Exception(\" Errors: \".json_encode($contentModel->errors));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tthrow new \\Exception(\" Errors: \".json_encode($model->errors));\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t\tSuccess\n\t\t\t\t**/\n\t\t\t\tYii::$app->session->setFlash('success', \"Cập nhật phần mềm thành công!\");\n\t\t\t\t$transaction->commit();\n\t\t\t}catch(\\Exception $e){\n\t\t\t\tYii::$app->session->setFlash('error',$e->getMessage());\n\t\t\t\t$transaction->rollBack();\n\t\t\t}\n\t\t\t\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "7b8de46d0dceafe0ddbb4e1822dda827", "score": "0.5483754", "text": "public function actionCreate()\n {\n $model = new PagePartial();\n \n // Load all the translations\n $model->loadTranslations(array_keys(Yii::$app->params['languages']));\n \n if (Yii::$app->request->getIsPost()) {\n \n $post = Yii::$app->request->post();\n \n // Ajax request, validate the models\n if (Yii::$app->request->isAjax) {\n \n // Populate the model with the POST data\n $model->load($post);\n \n // Populate the translation model for the primary language\n $translationModel = new PagePartialLang([\n 'language' => Yii::$app->language, \n 'name' => $post['PagePartialLang'][Yii::$app->language]['name'],\n 'content' => $post['PagePartialLang'][Yii::$app->language]['content'],\n ]);\n \n // Validate the translation model\n $translationValidation = ActiveForm::validate($translationModel);\n $correctedTranslationValidation = [];\n \n // Correct the keys of the validation\n foreach($translationValidation as $k => $v) {\n $correctedTranslationValidation[str_replace('pagepartiallang-', \"pagepartiallang-{$translationModel->language}-\", $k)] = $v; \n }\n\n // Validate the model and primary translation model\n $response = array_merge(ActiveForm::validate($model), $correctedTranslationValidation);\n \n // Return validation in JSON format\n Yii::$app->response->format = Response::FORMAT_JSON;\n return $response;\n \n // Normal request, save models\n } else {\n // Wrap the everything in a database transaction\n $transaction = Yii::$app->db->beginTransaction(); \n \n // Save the main model\n if (!$model->load($post) || !$model->save()) {\n return $this->render('create', [\n 'model' => $model\n ]);\n } \n \n // Save the translation models\n foreach (Yii::$app->params['languages'] as $languageId => $languageName) {\n $model->language = $languageId;\n $model->name = $post['PagePartialLang'][$languageId]['name'];\n $model->content = $post['PagePartialLang'][$languageId]['content'];\n \n if (!$model->saveTranslation()) {\n return $this->render('create', [\n 'model' => $model\n ]); \n } \n }\n \n $transaction->commit();\n \n // Set flash message\n $model->language = Yii::$app->language;\n Yii::$app->getSession()->setFlash('partial', Yii::t('app', '{item} has been created', ['item' => $model->name]));\n \n return $this->redirect(['index']); \n } \n }\n\n return $this->render('create', [\n 'model' => $model\n ]);\n }", "title": "" }, { "docid": "a08b758384d70a30e38f5f2779dd694d", "score": "0.5481092", "text": "public function update(Request $request,\n ModelsPage $page,\n PageService $pageService)\n {\n // dump($page);\n $pageService->update($request,$page);\n return redirect('admin/page');\n }", "title": "" }, { "docid": "44c973a3f58a3beb613c0ec4f90d070b", "score": "0.54731536", "text": "public function actionUpdate()\n\t{\n parent::actionUpdate();\n\t\t$this->lookupdata();\n\t\t$id=$_POST['id'];\n\t\t$model=$this->loadModel($id[0]);\nif ($model != null)\n {\n if ($this->CheckDataLock($this->menuname, $id[0]) == false)\n {\n $this->InsertLock($this->menuname, $id[0]);\n echo CJSON::encode(array(\n 'status'=>'success',\n\t\t\t\t'soheaderid'=>$model->soheaderid,\n\t\t\t\t'sodate'=>date(Yii::app()->params['dateviewfromdb'], strtotime($model->sodate)),\n\t\t\t\t'addressbookid'=>$model->addressbookid,\n\t\t\t\t'fullname'=>($model->customer!==null)?$model->customer->fullname:\"\",\n\t\t\t\t'paymentmethodid'=>$model->paymentmethodid,\n\t\t\t\t'paycode'=>($model->paymentmethod!==null)?$model->paymentmethod->paycode:\"\",\n\t\t\t\t'headernote'=>$model->headernote,\n\t\t\t\t'recordstatus'=>$model->recordstatus,\n 'div'=>$this->renderPartial('_form', array('model'=>$model,\n\t\t\t'sodetail'=>$this->sodetail), true)\n\t\t\t\t));\n Yii::app()->end();\n }\n }\n\t}", "title": "" }, { "docid": "56897cfe4100252f465a1f803e79faef", "score": "0.5465755", "text": "public function update($model);", "title": "" }, { "docid": "947d997616b29e4713b0f3683eb32d1a", "score": "0.5455169", "text": "public function actionUpdate()\n\t{\n $id=Yii::app()->user->id;\n\t\t$model=$this->loadModel($id);\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','user_name'=>$model->user_name));\n\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "31d0f1cfa3c7d60dd76e736c77607b7e", "score": "0.5454282", "text": "public function actionUpdate()\n {\n if (!$model = $this->findModel()) {\n Yii::$app->session->setFlash(\"error\", Yii::t('modules/user', \"You are not logged in.\"));\n $this->goHome();\n }\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash(\"success\", Yii::t('modules/user', \"Changes has been saved.\"));\n return $this->refresh();\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "bdc55f3d488aa2e8db904a425e58b0eb", "score": "0.54528326", "text": "public function actionUpdate($id, $id_parent = null)\n {\n $model = $this->findModel($id);\n $model->setLangScenario('update-page-lang');\n if ($model->loadAll(Yii::$app->request->post()) && $model->validateAll()) {\n if ($model->saveAll(false)) {\n Yii::$app->getSession()->setFlash('success', Adm::t('','Data successfully changed!'));\n if (!$id_parent) {\n $id_parent = 0;\n }\n return Adm::redirect(['update', 'id' => $model->id, 'id_parent' => $id_parent]);\n }\n }\n\n return $this->render('update', [\n 'model' => $model,\n 'id_parent' => $id_parent,\n ]);\n }", "title": "" }, { "docid": "95637d07df550eadc870e57ff9d98bda", "score": "0.54501855", "text": "public function update($id, Requests\\Admin\\PagesFormRequest $request)\n {\n $page = Pages::find($id);\n $page->title = trim($request->input('title'));\n $page->url_name = $request->input('url_name');\n $page->page_cols = $request->input('page_cols');\n $page->is_static = $request->input('is_static');\n $page->category_id = $request->input('category_id');\n $page->subcategory_id = $request->input('subcategory_id');\n if ((int) $page->is_static === $this->staticType ){\n $page->category_id = 0;\n $page->subcategory_id = 0;\n\n }\n $page->enable_comments = $request->input('enable_comments');\n $page->is_active = $request->input('is_active');\n $page->google_ads_active = $request->input('google_ads_active');\n $page->facebook_ads_active = $request->input('facebook_ads_active');\n $page->google_analytics = $request->input('google_analytics');\n $page->page_cols = $request->input('page_cols');\n if ($request->input('tags_id')){\n $page->tags_ids = implode(',', $request->input('tags_id'));\n }\n $page->user_id = Auth::id();\n try{\n $page->save();\n $this->log->logMessage(Logger::INFO, 'The page: '. $page->title.' - was updated by the user with the id '.Auth::id());\n $pageContent = PageContent::where('page_id','=',$id)->first();\n $pageContent->short_description = trim($request->input('short_description'));\n $pageContent->description = trim($request->input('description'));\n $pageContent->author_name = trim($request->input('author_name'));\n $pageContent->meta_tags = trim($request->input('meta_tags'));\n $pageContent->feature_image = $request->input('feature-image');\n try{\n $pageContent->save();\n $this->log->logMessage(Logger::INFO, 'Page content for the page: '. $page->title.' - was updated by the user with the id '.Auth::id());\n $message = ['msg' => 'A page was updated!'];\n }catch (Exception $error){\n $message = ['msg_error' => $error->getMessage()];\n $this->log->logMessage(Logger::ERROR, $error->getMessage());\n }\n }catch (Exception $error){\n $message = ['msg_error' => $error->getMessage()];\n $this->log->logMessage(Logger::ERROR, $error->getMessage());\n }\n return redirect()->route('pages')->with($message);\n }", "title": "" }, { "docid": "ac428d12bc74d893cdd338f47f6b9541", "score": "0.5445195", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n // var_dump($model->load(Yii::$app->request->post()) && $model->save(false));die();\n\n if ($model->load(Yii::$app->request->post()) && $model->save(false)) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "02091a81c444ff261dd367fb2c68f39d", "score": "0.5424299", "text": "public function updating($model)\n {\n //\n }", "title": "" }, { "docid": "c2def612e5266dcc45345d7f56de485d", "score": "0.54144764", "text": "public function actionUpdate()\n\t{\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\t\t\n\t\tif(isset($_POST['ConfPurpose']))\n\t\t{\n\t\t\t$m = ConfPurpose::model()->findByPk($_POST['ConfPurpose']['id']);\n\t\t\t$m->value = $_POST['ConfPurpose']['value'];\n\t\t\t$m->save();\n\t\t}\n\n\t\t$aConfPurposeDataProvider = new CActiveDataProvider('ConfPurpose', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'criteria'=>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('condition'=>'conf_gen_id = '.Yii::app()->user->getConfigId()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'pagination'=>false));\n\n\t\t$this->renderPartial('create',array('aConfPurposeDataProvider'=>$aConfPurposeDataProvider));\n\t}", "title": "" }, { "docid": "53444b3ddcf2f8d405c399189d6d3c58", "score": "0.5407215", "text": "public function update() {\n\n\t\tif ($this->authenticated===false || !isset($_POST['save'])) {\n\t\t\t$this->index();\n\t\t}\telse if ( isset($_POST['save']) && $_POST['save']==true) {\n\n\t\t\t\t// Get the model type and id\n\t\t\t\t$this->requestParser();\n\n\t\t\t\t// Create Model, for example 'Article'\n\t\t\t\t$model = new $this->model($this->db);\n\n\t\t\t\t// Update\n\t\t\t\t$model->update($_POST);\n\n\t\t\t\tswitch ($this->model) {\n\t\t\t\t\tcase \"Article\":\n\t\t\t\t\t\t$this->message = \"Artikeln har uppdaterats.\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Object\":\n\t\t\t\t\t\t$this->message = \"Objektet har uppdaterats.\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Reroute to edit View\n\t\t\t\t$this->reroute('edit', $this->model, $this->id);\n\t\t}\n\t}", "title": "" }, { "docid": "8101f4e93587e2d962002d6e2de440bf", "score": "0.53969496", "text": "public function update(Request $request, Page $page)\n {\n //\n }", "title": "" }, { "docid": "8101f4e93587e2d962002d6e2de440bf", "score": "0.53969496", "text": "public function update(Request $request, Page $page)\n {\n //\n }", "title": "" }, { "docid": "26ff904d549a5316315bf911de680682", "score": "0.5395494", "text": "public function actionUpdate()\r\n {\r\n /** @var GuardianProfile $modelProfile */\r\n $modelProfile = Yii::$app->user->identity->guardianProfile;\r\n $modelProfile->scenario = 'update';\r\n\r\n if ($modelProfile->load(Yii::$app->request->post()) && $modelProfile->save() && $modelProfile->upload()) {\r\n return $this->redirect(['index']);\r\n }\r\n\r\n return $this->render('update', [\r\n 'model' => $modelProfile,\r\n ]);\r\n }", "title": "" }, { "docid": "0fed95f697db5aa68d0de6fc89c50a20", "score": "0.53936774", "text": "public function postUpdate($id) {\n $validation = Validator::make(\n Input::all(), array(\n 'name' => 'required',\n )\n );\n\n if ($validation->passes()) {\n $pages = Pages::find($id);\n $pages->name = Input::get('name');\n $pages->link = Input::get('link');\n $pages->status = Input::get('status');\n $pages->update();\n\n if (Input::get('module')) {\n\n PageModules::where('page_id', '=', $id)->delete();\n foreach (Input::get('module') as $key => $value) {\n $adMod = new PageModules;\n $adMod->page_id = $pages->id;\n $adMod->module_id = $value;\n $adMod->save();\n }\n } else {\n PageModules::where('page_id', '=', $id)->delete();\n }\n\n\n\n\n Session::flash('msg_flash', CommonHelper::printMsg('success', trans('messages.update_message')));\n return Redirect::route('backend_page');\n }\n Session::flash('msg_flash', CommonHelper::printErrors($validation->messages()));\n return Redirect::back()->withInput();\n }", "title": "" }, { "docid": "81aada7b6464a066e66079a3673afae5", "score": "0.53747946", "text": "public function actionUpdate()\r\n {\r\n $model = $this->loadUser();\r\n $profile = $model->profile;\r\n if (isset($_REQUEST['ajax']) && $_REQUEST['ajax'] === 'profile-form') {\r\n echo UActiveForm::validate(array($model, $profile));\r\n Yii::app()->end();\r\n }\r\n if (isset($_POST['User']) && isset($_POST['Profile'])) {\r\n $model->attributes = $_POST['User'];\r\n $profile->attributes = $_POST['Profile'];\r\n if ($model->validate() && $profile->validate()) {\r\n $model->save();\r\n $profile->save();\r\n Yii::app()->user->updateSession();\r\n Yii::app()->user->setFlash(\r\n 'profileMessage', UserModule::t('<span class=\"label label-success\">UPDATED</span> Your account is updated successfully.'));\r\n $this->redirect(array('view'));\r\n } else\r\n $profile->validate();\r\n }\r\n $this->render('update', array(\r\n 'model' => $model,\r\n 'profile' => $profile,\r\n ));\r\n }", "title": "" }, { "docid": "6388db3369ed259cf7a20022d5d31330", "score": "0.53700703", "text": "public function actionUpdate($id)\n {\n $model=$this->loadModel($id);\n\n // Uncomment the following line if AJAX validation is needed\n $this->performAjaxValidation($model);\n\n if(isset($_POST['Pago']))\n {\n $model->attributes=$_POST['Pago'];\n if($model->save())\n $this->redirect(array('view','id'=>$model->id));\n }\n\n $this->render('update',array(\n 'model'=>$model,\n ));\n }", "title": "" }, { "docid": "bc3328084299506c83c63d8bbade281c", "score": "0.5362674", "text": "public function update()\n\t{\n\t\t$this->pelanggan->update();\n\t\tredirect('Pelanggan');\n\t}", "title": "" }, { "docid": "7db76ca5ff3a5bebaa67893d4893e176", "score": "0.5362515", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Presupuesto']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Presupuesto'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "7965884afb44bb01156e8f7326df0ff1", "score": "0.5360365", "text": "public function update_page($url) {\r\n unset($_POST['orig_url']);\r\n\t\t$this->db->where('url', $url)->update('mc_content', $this->input->post());\r\n header(\"Location:\" . base_url() . 'admin/edit/' . $this->input->post('url'));\r\n $this->template->_message('Update Successful', 'success');\r\n }", "title": "" }, { "docid": "c6982f18d76f1900062e97963b927210", "score": "0.5357785", "text": "public function edit(PartialPayment $PartialPayment)\n {\n //\n }", "title": "" }, { "docid": "21f0f65aabfd0f58f446071766186f58", "score": "0.5352604", "text": "public function update_page($id, $page_data)\n {\n $this->db->where('IdPage', $id);\n\n return $this->db->update('Pages', $page_data);\n }", "title": "" }, { "docid": "a736d57ac6db52825cfcf14e34cec61c", "score": "0.53381896", "text": "public function update() {\n $this->em->update($_POST, $_GET['page']);\n $this->saveImg($_FILES);\n }", "title": "" }, { "docid": "b87e4e9ac3512965f597a22ae0d32c74", "score": "0.5335461", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update', 'id' => $model->id_block]);\n }\n\n $this->fillDopContent($model);\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "8fadeac91bbbf98f33af4d37f2d64c9c", "score": "0.53324574", "text": "public function update(ValidatePage $request, Page $page)\n {\n if ($request->has('status') )\n $page->status = $request->get('status');\n else {\n $page->name = $request->get('name');\n $page->title = $request->get('title');\n $page->content = $request->get('content');\n }\n $page->save();\n return Redirect(route('page.edit', $page));\n }", "title": "" }, { "docid": "5b512412f6d60a34582ba89d89bae742", "score": "0.5330319", "text": "function EditPage($pageId)\n {\n //Recuperation du contenu\n $page = new CmsPage($this->Core);\n $page->GetById($pageId);\n\n $jbPage = new AjaxFormBlock($this->Core, \"jbPage\");\n $jbPage->App = \"Cms\";\n $jbPage->Action = \"SaveContentPage\";\n\n $jbPage->AddArgument(\"PageId\", $pageId);\n\n $jbPage->AddControls(array(\n array(\"Type\"=>\"Hidden\", \"Name\"=> \"hdContentPage\" , \"Value\" => $pageId),\n array(\"Type\"=>\"TextArea\", \"Name\"=> \"tbContentPage_\".$pageId , \"Value\" => $page->Content->Value),\n // array(\"Type\"=>\"Button\", \"Name\"=> \"BtnSave\" , \"Value\" => $this->Core->GetCode(\"Save\")),\n )\n );\n\n return $jbPage->Show();\n }", "title": "" }, { "docid": "88cbe947604a0431b2b5a566b8c15f8b", "score": "0.5325676", "text": "public function actionUpdate($id)\n {\n\t\t$this->layout='main-admin';\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "5efb502c25ad376ae4f6f11798f8fe45", "score": "0.5316338", "text": "public function actionUpdate()\n\t{\n\t\t$model=$this->loadModel();\n\t\t$profile=$model->profile;\n\t\t$rights = Rights::getAssignedRoles($model->id);\n\t\t$presenterName = Rights::module()->presenterName;\n\n\t\t$isPresenter = false;\n\t\tforeach($rights as $r){\n\t\t\tif($r->name == $presenterName){\n\t\t\t\t$isPresenter = true;\n\t\t\t}\n\n\t\t}\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\tlist($_POST['User']['username']) = @split('@',$_POST['User']['email']);\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\t$profile->attributes=$_POST['Profile'];\n\n\t\t\tif($model->validate()&&$profile->validate()) {\n\t\t\t\t$old_password = User::model()->notsafe()->findByPk($model->id);\n\t\t\t\tif ($old_password->password!=$model->password) {\n\t\t\t\t\t$model->password=Yii::app()->getModule('user')->encrypting($model->password);\n\t\t\t\t\t$model->activkey=Yii::app()->getModule('user')->encrypting(microtime().$model->password);\n\t\t\t\t}\n\n\t\t\t\tif(isset($_POST['presenter'])){\n\t\t\t\t\tRights::assign($presenterName, $model->id);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tRights::revoke($presenterName, $model->id);\n\t\t\t\t}\n\t\t\t\t$model->save();\n\t\t\t\t$profile->save();\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t\t} else $profile->validate();\n\t\t}\n\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t\t'profile'=>$profile,\n\t\t\t'presenter' => $isPresenter\n\n\t\t));\n\t}", "title": "" }, { "docid": "9f8b6edb173e5e9c766e7a9704046bec", "score": "0.5314324", "text": "public function update(UpdatePageRequest $request, $id) {\n // print_r($_POST);exit;\n $inputs = $request->except('counter', 'stitle', 'scontent', 'surl', 'simage');\n $staticDatas = array(\n 'counter' => $request->counter,\n 'uniqueId' => $request->uniqueId,\n 'stitle' => $request->stitle,\n 'scontent' => $request->scontent,\n 'surl' => $request->surl,\n 'simage' => $request->simage,\n 'sposition' => $request->sposition,\n );\n $staticDatas = array_filter($staticDatas);\n\n $inputs = array(\n 'title' => $request->title,\n 'slug' => $request->slug,\n 'content' => $request->content,\n 'meta_desc' => $request->meta_desc,\n 'meta_title' => $request->meta_title,\n 'meta_key' => $request->meta_key,\n 'updated_at' => date(\"Y-m-d H:i:s\")\n );\n InnerPage::where('id', $id)->update($inputs);\n\n if ($request->hasFile('blockPic')) {\n $image = InnerPage::where('id', $id)->first();\n $blockImage = $image->block_image;\n File::delete($blockImage);\n $file = $request->file('blockPic');\n $destination_path = 'images/';\n $filename = rand(11111, 99999) . '.' . $file->getClientOriginalExtension();\n $file->move($destination_path, $filename);\n InnerPage::where('id', $id)->update(array('image' => $filename));\n }\n\n\n /* static_block update */\n if (!empty($staticDatas)) {\n\n $datas = \\DB::table('static_blocks')->where('pid', $id)->where('block_type', 1)->get();\n\n if (empty($datas)) {\n StaticBlock::poststaticblock($staticDatas, $id, $block_type = '1');\n } else {\n\n foreach ($_POST['uniqueId'] as $key => $value) {\n\n $alreadyexist1 = \\DB::table('static_blocks')->where('pid', $id)->where('uniqueid', $value)->get();\n\n if (empty($alreadyexist1)) {\n $newDatas = array(\n 'counter' => $_POST['counter'][$key],\n 'uniqueId' => $_POST['uniqueId'][$key],\n 'stitle' => $_POST['stitle'][$key],\n 'scontent' => $_POST['scontent'][$key],\n 'surl' => $_POST['surl'][$key],\n 'simage' => Input::file('simage')[$key],\n 'sposition' => $_POST['sposition'][$key]\n );\n\n\n StaticBlock::postupdate($newDatas, $id, $block_type = '1');\n } else {\n\n if (empty($_FILES['simage']['name'][$key])) {\n StaticBlock::where('pid', $id)->where('uniqueid', $value)->where('block_type', 1)->update(array('position' => $_POST['sposition'][$key], 'title' => $_POST['stitle'][$key], 'content' => $_POST['scontent'][$key], 'url' => $_POST['surl'][$key]));\n } else {\n $file = Input::file('simage')[$key];\n $destination_path = 'images/staticimages';\n $filename = rand(11111, 99999) . '.' . $file->getClientOriginalExtension();\n $file->move($destination_path, $filename);\n\n StaticBlock::where('pid', $id)->where('uniqueid', $value)->where('block_type', 1)->update(array('position' => $_POST['sposition'][$key], 'title' => $_POST['stitle'][$key], 'content' => $_POST['scontent'][$key], 'url' => $_POST['surl'][$key], 'image' => $filename));\n }\n }\n }\n //exit;\n }\n }\n return redirect()->route('admin.innerpages.index')->withFlashSuccess('Updated Successfully.');\n }", "title": "" }, { "docid": "8954b53f1e6b1ee671f572b0739d2760", "score": "0.5313964", "text": "public function actionUpdate()\n {\n $model = new UpdateArticle();\n $category = $this->viewAll('article_category');\n $article = $this->viewOne('article');\n\n if ($this->update($model,$article)) {\n $this->setFlash('update_article','Article update success');\n return $this->goBack('/article/' . $article->id);\n }\n\n return $this->render('update',['model' => $model,'article' => $article,'category' => $category]);\n }", "title": "" }, { "docid": "582322e7da273f8cef5aa832fd89657d", "score": "0.5310677", "text": "public function actionUpdate($id)\n {\n $id = base64_decode($id);\n $model = $this->findModel($id);\n if ($model->user_id == Yii::$app->user->id) {\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['clean-view', 'id' => base64_encode($model->id)]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "4045682212fa44643fde7e949fb93db2", "score": "0.53043383", "text": "public function update(PageRequest $request, Page $page)\n {\n $page->title = $request['title'];\n $page->content = $request['content'];\n $page->keywords = $request['keywords'];\n $page->category_id = $request['categories_id']+1;\n $page->page_type_id = $request['page_type_id']+1;\n\n $page->url = $request['url'];\n $page->user_id = Auth::id() ;\n\n //Not required\n $page->region = $request['region'];\n $page->email = $request['email'];\n $page->kod = $request['kod'];\n $page->ulica = $request['ulica'];\n $page->miasto = $request['miasto'];\n $page->phone = $request['phone'];\n\n $page->update();\n return redirect()->route('page.addons');\n }", "title": "" }, { "docid": "01cf99f88e5cbd4ecc8da750dde9f0cc", "score": "0.5301474", "text": "public function actionUpdate($id, $page = null) {\n\n $request = Yii::$app->request;\n $model = $this->findModel($id);\n\n $modelsDetail = !empty($model->formPerubahanDataKaryawanDetails) ? $model->formPerubahanDataKaryawanDetails : [new FormPerubahanDataKaryawanDetail()];\n\n if ($model->load($request->post())) {\n\n $oldDetailsID = ArrayHelper::map($modelsDetail, 'id', 'id'); # GET ALL ID\n\n $modelsDetail = Tabular::createMultiple(FormPerubahanDataKaryawanDetail::class, $modelsDetail); # Re-create models, Return as array.\n\n Tabular::loadMultiple($modelsDetail, $request->post()); # Load Post Request into it.\n $deletedDetailsID = array_diff($oldDetailsID, array_filter(ArrayHelper::map($modelsDetail, 'id', 'id'))); # Search ID that will be deleted\n\n $isValid = $model->validate(); # validate model 1\n $isValid = Tabular::validateMultiple($modelsDetail) && $isValid; # validate multiple model\n\n if ($isValid) {\n $transaction = FormPerubahanDataKaryawan::getDb()->beginTransaction();\n try {\n if ($flag = $model->save(false)) {\n if (!empty($deletedDetailsID)) {\n FormPerubahanDataKaryawanDetail::deleteAll(['id' => $deletedDetailsID]);\n }\n foreach ($modelsDetail as $i => $detail) :\n if ($flag === false) {\n break;\n }\n $detail->form_perubahan_data_karyawan_id = $model->id;\n if (!($flag = $detail->save(false))) {\n break;\n }\n endforeach;\n }\n\n if ($flag) {\n $transaction->commit();\n $status = ['code' => 1, 'message' => 'Commit'];\n } else {\n $transaction->rollBack();\n $status = ['code' => 0, 'message' => 'Roll Back'];\n }\n } catch (Exception $e) {\n $transaction->rollBack();\n $status = ['code' => 0, 'message' => 'Roll Back ' . $e->getMessage(),];\n }\n\n if ($status['code']) {\n Yii::$app->session->setFlash('info',\n FAS::icon(FAS::_THUMBS_UP) . \"\n Form Perubahan Data Karyawan : \" . $model->judul . \" berhasil di update. \" . Html::a('Klik link berikut jika ingin melihat detailnya', ['view', 'id' => $model->id, 'page' => $page], ['class' => 'btn btn-link'])\n );\n return $this->redirect(['index', 'page' => $page]);\n }\n\n Yii::$app->session->setFlash('danger', FAS::icon(FAS::_SAD_CRY) . \" Form Perubahan Data Karyawan is failed to updated. Info: \" . $status['message']);\n }\n }\n\n return $this->render('update', [\n 'model' => $model,\n 'modelsDetail' => $modelsDetail\n ]);\n }", "title": "" }, { "docid": "331010fb5654fb68163856add15f20cb", "score": "0.5301318", "text": "public function update($page_id, Request $request)\n\t{\n\t\t$page = Page::find($page_id);\n\t\t// update\n\t\t$page->saveBlocks(json_decode($request->getContent(), true));\n\t}", "title": "" }, { "docid": "54591faa7834e5c1038d003c13aeb8e3", "score": "0.5301139", "text": "public function editpagesAction(){\n /*View::renderTemplate('/corepages/editpages.phtml', [\n 'csrftoken' => CSRF::generatetoken(),\n 'tabTitle' => 'Edit Core Pages',\n 'pageTitle' => 'Edit Core Pages',\n 'breadcrumb_index' => 'Core Pages',\n 'siteName' => $this->siteName,\n 'siteKeywords' => $this->siteKeywords,\n 'indexpage' => Config::APP_CMS_CPANEL_INDEX_PRETTY_URI,\n 'cpanelindexpage' => Config::APP_CMS_CPANEL_INDEX_PRETTY_URI,\n 'pageName' => 'Pages',\n 'processuploadPageContent' => Config::APP_CMS_SAVE_CORE_PAGES_PRETTY_URI,\n 'processPageSelection' => Config::APP_CMS_CORE_PAGES_PRETTY_URI,\n 'pageContent' => $this->getSelectedValue(),\n 'username' => $this->username\n ], 'appcms/views');*/\n\n\n // 1. check if the input data via post or get method exist\n if(Input::exists()){\n\n // 2. get input field csrf_token and check if it exist\n //if(CSRF::check(Input::get('csrf_token'))) {\n\n $validate = new Validation();\n\n $validation = $validate->check($_POST, array(\n 'editcorepages' => array(\n 'required' => true,\n )\n ));\n\n if ($validation->passed()) {\n try {\n $this->getPageContent->update('cor3Pag3s',\n array('corePages_Content' => Input::get('editcorepages')\n ), $this->core_page_number);\n\n Redirect::to('/appcms/corepages/index');\n\n }catch (Exception $e) {\n die($e->getMessage());\n }\n } else { // loop through each validation error that is return\n foreach ($validation->errors() as $error) {\n echo $error, \"<br>\";\n }\n }\n //}\n }\n }", "title": "" }, { "docid": "9ca0a96bf173aaf4b2790b8c90ce8f42", "score": "0.52994615", "text": "public function actionUpdate($id)\n {\n if(Yii::$app->request->isAjax){\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post())) {\n if($model->save()){ \n return \"Exitoso\";\n }else{ \n Yii::$app->response->format = trim(Response::FORMAT_JSON);\n return ActiveForm::validate($model);\n }\n }else {\n return $this->renderPartial('update', [\n 'model' => $model,\n ]);\n }\n }\n }", "title": "" }, { "docid": "7349cdcebc6286e2bacd0dc61304c83b", "score": "0.5299378", "text": "public function actionUpdate($id) {\n $model = $this->loadModel($id);\n\n// Uncomment the following line if AJAX validation is needed\n// $this->performAjaxValidation($model);\n\n if (isset($_POST['Plantel'])) {\n $model->attributes = $_POST['Plantel'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('update', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "0af66bdc6f4e201a359a3e714f33e9d0", "score": "0.5297258", "text": "public function update(UpdatePageRequest $request, Page $page)\n {\n $page->update($request->validated());\n\n return redirect()\n ->route('admin.page.index')\n ->with('success', 'page updated successfully');\n }", "title": "" }, { "docid": "b6e27ee22c652b0ccdf32bf3e6aee064", "score": "0.5293566", "text": "public function actionUpdate($slug = null)\n {\n if (!$slug)\n {\n // Указан ID страницы, редактируем только ее\n $model = $this->loadModel();\n\n if (isset($_POST['Page']))\n {\n $model->attributes = $_POST['Page'];\n\n if ($model->save())\n {\n Yii::app()->user->setFlash(\n YFlashMessages::NOTICE_MESSAGE,\n Yii::t('page', 'Страница обновлена!')\n );\n\n if (!isset($_POST['submit-type']))\n $this->redirect(array('update', 'slug' => $model->slug));\n else\n $this->redirect(array($_POST['submit-type']));\n }\n }\n\n $this->render('update', array(\n 'model' => $model,\n 'pages' => Page::model()->getAllPagesList($model->id),\n ));\n }\n else\n {\n $modelsByLang = array();\n // Указано ключевое слово страницы, ищем все языки\n $yupe = Yii::app()->getModule('yupe');\n $langs = explode(\",\", $yupe->availableLanguages);\n\n $models = Page::model()->findAllByAttributes(array('slug' => $slug));\n if (!$models)\n throw new CHttpException(404, Yii::t('page', 'Указанная страница не найдена!'));\n\n $model = null;\n // Собираем модельки по языкам\n foreach ($models as $m)\n {\n if (!$m->lang)\n $m->lang = Yii::app()->sourceLanguage;\n $modelsByLang[$m->lang] = $m;\n }\n // Выберем модельку для вывода тайтлов и прочего\n $model = isset($modelsByLang[Yii::app()->language])\n ? $modelsByLang[Yii::app()->language]\n : (isset($modelsByLang[Yii::app()->sourceLanguage])\n ? $modelsByLang[Yii::app()->sourceLanguage]\n : reset($models)\n );\n\n // Теперь создадим недостоающие\n foreach ($langs as $l)\n {\n if (!isset($modelsByLang[$l]))\n {\n $page = new Page;\n\n $page->setAttributes(array(\n 'slug' => $slug,\n 'lang' => $l,\n 'parent_Id' => $model->parent_Id,\n 'user_id' => Yii::app()->user->id,\n 'status' => $model->status,\n 'is_protected' => $model->is_protected,\n ));\n\n if ($l != Yii::app()->sourceLanguage)\n $page->scenario = 'altlang';\n\n $modelsByLang[$l] = $page;\n }\n }\n\n // Проверим пост\n if (isset($_POST['Page']))\n {\n $wasError = false;\n\n foreach ($langs as $l)\n {\n if (isset($_POST['Page'][$l]))\n {\n $p = $_POST['Page'][$l];\n\n $modelsByLang[$l]->setAttributes(array(\n 'name' => $p['name'],\n 'title' => $p['title'],\n 'body' => $p['body'],\n 'keywords' => $p['keywords'],\n 'description' => $p['description'],\n 'slug' => $_POST['Page']['slug'],\n 'status' => $_POST['Page']['status'],\n 'is_protected' => $_POST['Page']['is_protected'],\n 'menu_order' => $_POST['Page']['menu_order'],\n ));\n\n if ($l != Yii::app()->sourceLanguage)\n $modelsByLang[$l]->scenario = 'altlang';\n\n if (!$modelsByLang[$l]->save())\n $wasError = true;\n\n $slug = $modelsByLang[$l]->slug;\n }\n }\n\n if (!$wasError)\n {\n Yii::app()->user->setFlash(\n YFlashMessages::NOTICE_MESSAGE,\n Yii::t('page', 'Страница обновлена!')\n );\n\n if (!isset($_POST['submit-type']))\n $this->redirect(array('update', 'slug' => $model->slug));\n else\n $this->redirect(array($_POST['submit-type']));\n }\n else\n Yii::app()->user->setFlash(\n YFlashMessages::NOTICE_MESSAGE,\n Yii::t('page', 'Ошибки при сохранении страницы!')\n );\n }\n $this->render('updateMultilang', array(\n 'model' => $model,\n 'models' => $modelsByLang,\n 'pages' => Page::model()->getAllPagesListBySlug($slug),\n 'langs' => $langs,\n ));\n }\n }", "title": "" }, { "docid": "3bbda1d76e68fa5868e1dabdfb4730b0", "score": "0.52898717", "text": "public function actionUpdate()\n\t{\n\t\t$model=$this->loadModel();\n\t\tif(isset($_POST['Groups']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Groups'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "4bbf6914dfb237a7834a7a0948be019c", "score": "0.52894294", "text": "public function actionUpdate($cid) {\n $model = $this->loadModel($cid);\n\n// Uncomment the following line if AJAX validation is needed\n// $this->performAjaxValidation($model);\n\n if (isset($_POST['Patient'])) {\n $model->attributes = $_POST['Patient'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->cid));\n }\n\n $this->render('update', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "93eef893ecd65d4a8f8b1317fa9e967c", "score": "0.52845764", "text": "public function actionUpdate()\n\t{\n\t\t$model=$this->loadModel();\n\t\t$profile=$model->profile;\n\t\t$this->performAjaxValidation(array($model,$profile));\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\t$profile->attributes=$_POST['Profile'];\n\t\t\t\n\t\t\tif($model->validate()&&$profile->validate()) {\n\t\t\t\t$old_password = User::model()->notsafe()->findByPk($model->id);\n\t\t\t\tif ($old_password->password!=$model->password) {\n\t\t\t\t\t$model->password=Yii::app()->controller->module->encrypting($model->password);\n\t\t\t\t\t$model->activkey=Yii::app()->controller->module->encrypting(microtime().$model->password);\n\t\t\t\t}\n\t\t\t\t$model->save();\n\t\t\t\t$profile->save();\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t\t} else $profile->validate();\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t\t'profile'=>$profile,\n\t\t));\n\t}", "title": "" }, { "docid": "fbdd985069cc50cee2a6bbdb14e230ce", "score": "0.5284364", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Folder']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Folder'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "ad565a88d03d408cde6472921935f003", "score": "0.52808434", "text": "public function update(PageRequest $request, Page $page)\n {\n $page->update($request->all());\n return redirect('/pages');\n }", "title": "" }, { "docid": "1fe3cb1fe0b164bb1fa8bc4946457ecc", "score": "0.5275725", "text": "public function goToUpdatePage()\n {\n include APP_ROOT . '/views/menu.php';\n include APP_ROOT . '/views/changeUserData.php';\n }", "title": "" }, { "docid": "131aa4bee440e06a77ba9c71efa4525c", "score": "0.527272", "text": "public function update($id, Request $request)\n\t{\n\t\t//$this->validate($request, ['name' => 'required']); // Uncomment and modify if you need to validate any input.\n\t\t$page = Page::findOrFail($id);\n\t\t$page->update($request->all());\n\t\treturn redirect('page');\n\t}", "title": "" }, { "docid": "f8f0bdab7196c40b4b728298eb833d51", "score": "0.5266736", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $seo = Seo::findOne(['page_id' => $id]);\n\n if (empty($seo)) {\n $seo = new Seo();\n }\n\n if (Yii::$app->request->isPost) {\n\n $model->load(Yii::$app->request->post());\n $seo->load(Yii::$app->request->post());\n\n $transaction = Yii::$app->db->beginTransaction();\n\n try {\n $valid = $model->validate();\n $valid = $seo->validate() && $valid;\n\n if ($valid) {\n $model->save();\n\n $post = Yii::$app->request->post();\n\n if (!empty($post['Seo']['meta_keywords'])) {\n $keywords = implode(',', $post['Seo']['meta_keywords']);\n }\n $seo->meta_keywords = $keywords;\n\n $seo->meta_image = UploadedFile::getInstance($seo, 'meta_image');\n $seo->og_image = UploadedFile::getInstance($seo, 'og_image');\n $seo->twitter_image = UploadedFile::getInstance($seo, 'twitter_image');\n\n $seo->save(false);\n\n $transaction->commit();\n return $this->redirect(['update', 'id' => $model->id]);\n } else {\n $transaction->rollBack();\n }\n } catch (\\Exception $e) {\n $transaction->rollBack();\n throw new BadRequestHttpException($e->getMessage(), 0, $e);\n }\n }\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('update', [\n 'model' => $model,\n 'seo' => $seo,\n 'skipedNodes' => Pages::skipSelectedNodeChilds($id),\n 'activePages' => Pages::getActivePages(),\n ]);\n }", "title": "" }, { "docid": "a0920148eefde9c8d14332b028c7fece", "score": "0.5263365", "text": "public function actionUpdate()\n\t{\n\t\t$model=$this->loadModel();\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['RR_ReservaRecurso']))\n\t\t{\n\t\t\t$model->attributes=$_POST['RR_ReservaRecurso'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->CDReservaRecurso));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "858eed9879b0fca228038b2ea14cec7d", "score": "0.52613693", "text": "public function actionUpdateProfile()\n {\n $student_session = Yii::$app->session;\n $id = $student_session->get('id');\n $student = $this->findModel($id);\n $student->scenario= 'update-profile';\n\n if ($student->load(Yii::$app->request->post()) && $student->save()) {\n return $this->redirect(['student-projects/create']);\n }\n\n return $this->render('update-profile', [\n 'model' => $student,\n ]);\n }", "title": "" }, { "docid": "54d5487353dfce9522fadc790eca0b59", "score": "0.5259636", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index', 'id' => (string)$model->_id]);\n } else {\n\n if (Yii::$app->request->isAjax) {\n $this->layout = 'clean'; \n return $this->render('update', [\n 'model' => $model,\n ]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }\n }", "title": "" }, { "docid": "07f7fb925f884f43fab840b38c5dca57", "score": "0.5251248", "text": "public function update() {\n\t\t\t//for users especially, i need to be more careful.\n\t\t\t//this is a basic one without permissions.\n\n\t\t\tif (!isset($_GET['id']))\n\t\t\t{\n\t\t\t\treturn call('pages', 'error');\n\t\t\t}\n\n\t\t\t//if there is post data...\n\t\t\t//todo: i need to check if the model actually exists on post, too!!!!\n\t\t\tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\t\t\t\t$postedToken = filter_input(INPUT_POST, 'token');\n\t\t\t\tif(!empty($postedToken) && isTokenValid($postedToken))\n\t\t\t\t{\n\t\t\t\t\t//probably i should do that isset stuff\n\t\t\t\t\t$model = new $this->model_name();\n\t\t\t\t\t$model->set_id($_GET['id']); //i should not trust that...\n\t\t\t\t\t$model->set_properties($_POST);\n\t\t\t\t\t$model->set_properties(array('password' => ''));\n\t\t\t\t\tif($model->is_valid())\n\t\t\t\t\t{\n\t\t\t\t\t\t$is_valid = true;\n\t\t\t\t\t\tif(!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) //i want to check here so i can give an error.\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$is_valid = false;\n\t\t\t\t\t\t\tadd_alert('Please enter a valid email address.', Alert_Type::DANGER);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!$model::email_is_available($_POST['email'], $_GET['id']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$is_valid = false;\n\t\t\t\t\t\t\tadd_alert('An account is already associated with that email address.', Alert_Type::DANGER);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($is_valid)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$model->update(); //do i call validate here, or in the update function?\n\t\t\t\t\t\t\t//layout has already been created. can't add the alerts now\n\t\t\t\t\t\t\t//but redirecting anyway\n\t\t\t\t\t\t\t//could use ajax instead\n\t\t\t\t\t\t\t//for now, i'll stick to a redirect\n\t\t\t\t\t\t\t//add alerts to session or something\n\t\t\t\t\t\t\t//i want to redirect, but it doesn't seem like the php way...\n\t\t\t\t\t\t\t//$_SESSION['alerts'][] = 'Successfully updated!';\n\t\t\t\t\t\t\tadd_alert('Successfully updated!', Alert_Type::SUCCESS);\n\t\t\t\t\t\t\t//session_write_close();\n\t\t\t\t\t\t\treturn redirect($this->model_name, 'index');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//http://getbootstrap.com/components/#alerts\n\t\t\t\t\t\t//exit properly first!\n\t\t\t\t\t\t//redirect header(\"Location: ...\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tadd_alert('Please try again.', Alert_Type::DANGER);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tadd_alert('Please try again.', Alert_Type::DANGER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$model = ($this->model_name)::get($_GET['id']);\n\t\t\tif($model == null)\n\t\t\t{\n\t\t\t\treturn call('pages', 'error');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//require_once('views/shared/update.php');\n\t\t\t\t$view_to_show = 'views/shared/update.php';\n\t\t\t\t$types = $model::get_types();\n\t\t\t\t$properties = $model->get_properties();\n\t\t\t\tunset($properties['password']);\n\t\t\t\tunset($types['password']);\n\t\t\t\trequire_once('views/shared/layout.php');\n\t\t\t}\n\t\t\t//i need to be better about the order of things.\n\n\t\t}", "title": "" }, { "docid": "1b932f64c9d76fe732775fced74246ef", "score": "0.52497333", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $post = Yii::$app->request->post();\n if (isset($post['pos'])) {\n $this->checkPos($model, $post);\n }\n if ($post && $model->load($post) && !$model->hasErrors()) {\n $this->uploadFiles($model);\n if ($model->save()) {\n if (isset($post['pos'])) {\n $this->updatePos($model, $post);\n }\n return $this->redirect(['view', 'id' => $model->template_id]);\n }\n\n }\n return $this->render('update', [\n 'model' => $model,\n ]);\n\n }", "title": "" }, { "docid": "6be641333beb5d68ea8179e88522c970", "score": "0.5246241", "text": "public function actionUpdate($id)\n {\n $this->view->params['no_wrapp'] = true;\n \n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "e36dbc351e05fe53effc3cf4f7b10b96", "score": "0.52442265", "text": "public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->pt_ref]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "598d8b6ee02eae524b343827904d2b28", "score": "0.5243896", "text": "public function actionUpdate()\n\t{ \n $id=isset($_GET['id']) ? (int) ($_GET['id']) : 0 ;\n $this->render('newsletter_update');\n\t}", "title": "" }, { "docid": "090fcd1588d1860b01b985aeeee9a80f", "score": "0.5236816", "text": "function update() {\n $this->model->update();\n }", "title": "" }, { "docid": "fdc3532594303b728987ed212ad57df0", "score": "0.52339536", "text": "public function actionUpdate($id) {\n $model = $this->loadModel($id);\n\n// Uncomment the following line if AJAX validation is needed\n $this->performAjaxValidation($model);\n\n if (isset($_POST['Place'])) {\n $model->attributes = $_POST['Place'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('update', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "5c2d7a15fa2f63e7d62169539eb86136", "score": "0.523395", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->MODUL_ID]);\n } else {\n return $this->renderAjax('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "250e87edcf9fedcdb894fbeab38a6fea", "score": "0.52335477", "text": "public function update($id, PageRequest $request)\n\t{\n\t\t$page = Page::findOrFail($id);\n\n $page->update($request->all());\n\n $page->slug = $this->checkSlug(Str::slug($request->title));\n\n $page->save();\n\n Session::flash('successMessage', 'Halaman statis berhasil diubah.');\n\n return Redirect::route('admin.page.index');\n\t}", "title": "" }, { "docid": "f278cc0dd72011a9835e444830a062d4", "score": "0.523233", "text": "public function update(PageRequest $request, $id)\n {\n $payload = $this->prepareData($request);\n $object = Content::page()->findOrFail($id)->update($payload);\n\n return redirect()->back()->with('status', 'Page successfully updated.');\n }", "title": "" } ]
67c277e80d8a915f9119665f7536cfe7
Retrieve an array iterator
[ { "docid": "652bb3539c88e18d432b5da21c1eafbd", "score": "0.75744265", "text": "public function getIterator()\n {\n $this->loadData(0);\n return new \\ArrayIterator($this->data);\n }", "title": "" } ]
[ { "docid": "881deedf256f616a5b4d2d046a1ef3c1", "score": "0.8058595", "text": "public function getIterator()\n {\n \n return new ArrayIterator($this->arr);\n \n }", "title": "" }, { "docid": "163af09b185c828fb323895a8cd9f37a", "score": "0.79398113", "text": "public function getIterator()\n\t{\n\t\treturn new \\ArrayIterator($this->array);\n\t}", "title": "" }, { "docid": "caf857c76e8a59a06d31c241ab7a1e45", "score": "0.7927851", "text": "public function getIterator()\n {\n return new \\ArrayIterator($this->arr);\n }", "title": "" }, { "docid": "96a41122bc0bfb98a8bb373335c9bd72", "score": "0.78985953", "text": "public function getIterator ()\r\n\t{\r\n\t\treturn new \\ArrayIterator( $this->data );\r\n\t}", "title": "" }, { "docid": "aa3be5a8dcf213825c2bd63a23824049", "score": "0.78824306", "text": "public function getIterator() {\n return new ArrayIterator( $this->item() );\n }", "title": "" }, { "docid": "0d19c7669dd46dbd03084540a2dda708", "score": "0.7834456", "text": "public function getIterator()\n {\n return new ArrayIterator($this->array);\n }", "title": "" }, { "docid": "15e832c5c1aaf04af5f618f526ad87d2", "score": "0.7807447", "text": "public function iterator () {\r\n\t\t#C:\\HaxeToolkit\\haxe\\std/php/_std/Array.hx:95: characters 3-48\r\n\t\treturn new IteratorsArrayIterator($this);\r\n\t}", "title": "" }, { "docid": "43d6461409ab79f1a5cee5d93b252b52", "score": "0.7795379", "text": "public function getIterator()\n {\n return new ArrayIterator($this->_data);\n }", "title": "" }, { "docid": "43d6461409ab79f1a5cee5d93b252b52", "score": "0.7795379", "text": "public function getIterator()\n {\n return new ArrayIterator($this->_data);\n }", "title": "" }, { "docid": "4c570ef5dee6ae729070bebf5f6048c3", "score": "0.77921367", "text": "public function getIterator()\n {\n return new ArrayIterator($this->data);\n }", "title": "" }, { "docid": "4c570ef5dee6ae729070bebf5f6048c3", "score": "0.77921367", "text": "public function getIterator()\n {\n return new ArrayIterator($this->data);\n }", "title": "" }, { "docid": "00e36c7389682f82364c64cdb3c666cc", "score": "0.77753747", "text": "public function getIterator()\n {\n return new ArrayIterator($this->a);\n }", "title": "" }, { "docid": "2f020e2199801dda141f92eb03b81566", "score": "0.77431303", "text": "public function getIterator(): ArrayIterator\n {\n return new ArrayIterator([[1], [2]]);\n }", "title": "" }, { "docid": "5c82f6e6d161684b61ceebeaeef5144a", "score": "0.77084404", "text": "public function getIterator(): Iterator\n {\n return new ArrayIterator([$this]);\n }", "title": "" }, { "docid": "5837ceddef63c7bf1cfb30c8772bf2db", "score": "0.77009475", "text": "public function getIterator()\n {\n return new \\ArrayIterator($this->data);\n }", "title": "" }, { "docid": "5837ceddef63c7bf1cfb30c8772bf2db", "score": "0.77009475", "text": "public function getIterator()\n {\n return new \\ArrayIterator($this->data);\n }", "title": "" }, { "docid": "5837ceddef63c7bf1cfb30c8772bf2db", "score": "0.77009475", "text": "public function getIterator()\n {\n return new \\ArrayIterator($this->data);\n }", "title": "" }, { "docid": "5837ceddef63c7bf1cfb30c8772bf2db", "score": "0.77009475", "text": "public function getIterator()\n {\n return new \\ArrayIterator($this->data);\n }", "title": "" }, { "docid": "5837ceddef63c7bf1cfb30c8772bf2db", "score": "0.77009475", "text": "public function getIterator()\n {\n return new \\ArrayIterator($this->data);\n }", "title": "" }, { "docid": "5837ceddef63c7bf1cfb30c8772bf2db", "score": "0.77009475", "text": "public function getIterator()\n {\n return new \\ArrayIterator($this->data);\n }", "title": "" }, { "docid": "c16e86910cca26d27d4d4a834064ee75", "score": "0.76993567", "text": "public function getIterator();", "title": "" }, { "docid": "c16e86910cca26d27d4d4a834064ee75", "score": "0.76993567", "text": "public function getIterator();", "title": "" }, { "docid": "c16e86910cca26d27d4d4a834064ee75", "score": "0.76993567", "text": "public function getIterator();", "title": "" }, { "docid": "c16e86910cca26d27d4d4a834064ee75", "score": "0.76993567", "text": "public function getIterator();", "title": "" }, { "docid": "c16e86910cca26d27d4d4a834064ee75", "score": "0.76993567", "text": "public function getIterator();", "title": "" }, { "docid": "ef41ed441d85eca2f6d9874670aa2d77", "score": "0.767319", "text": "public function getIterator()\n\t{\n\t\treturn new \\ArrayIterator($this->fetch());\n\t}", "title": "" }, { "docid": "74c4dcf2463b22958471f10c7bee9843", "score": "0.7665523", "text": "public function iterator () {\n\t\treturn new NativeIndexedArrayIterator(\\array_values($this->data));\n\t}", "title": "" }, { "docid": "56f1a7bf541b7cf8671601f9853a0a75", "score": "0.7645809", "text": "public function getIterator()\n\t{\n\t\treturn new ArrayIterator($this);\n\t}", "title": "" }, { "docid": "37d152b7e186132c2e29425c234272ca", "score": "0.76335466", "text": "public function getIterator() {}", "title": "" }, { "docid": "37d152b7e186132c2e29425c234272ca", "score": "0.76330507", "text": "public function getIterator() {}", "title": "" }, { "docid": "e8f14ebe31c91041b96bc5b77deeba36", "score": "0.7617161", "text": "#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n return new \\ArrayIterator($this->data);\n }", "title": "" }, { "docid": "184298a7bc7cc77af5ab62b07ec46d3a", "score": "0.75946337", "text": "public function getIterator()\n\t{\n\t\treturn new ArrayIterator(array_values($this->data));\n\t}", "title": "" }, { "docid": "e91894e9fd1bde4499f8cb757992ae6d", "score": "0.75834334", "text": "public function getIterator()\n {\n return new ArrayIterator($this->resource);\n }", "title": "" }, { "docid": "b75171c6a93d3d56a05477878281f6ed", "score": "0.75618255", "text": "public function getIterator()\n {\n return new ArrayIterator($this->arrCollection);\n }", "title": "" }, { "docid": "74e0150dc7106d87776acedd817c0829", "score": "0.7552674", "text": "public function getIterator()\n\t{\n\t\treturn new \\ArrayIterator($this->arrResults);\n\t}", "title": "" }, { "docid": "0e78f162e006174648f2ebc9e67ffe14", "score": "0.7536817", "text": "public function getIterator(): \\ArrayIterator\n {\n return $this->data->getIterator();\n }", "title": "" }, { "docid": "e0e8d8e9d3a7721a83ea17e3cc24a9de", "score": "0.75346786", "text": "public function getIterator()\n {\n return new \\ArrayIterator($this->spec);\n }", "title": "" }, { "docid": "a53a09eea5df048c6a5c5e7540435f9b", "score": "0.75268143", "text": "public function getIterator()\n {\n return new ArrayIterator($this);\n }", "title": "" }, { "docid": "600145ed4ecfeb94701f226ecc78e416", "score": "0.75015527", "text": "abstract protected function getIterator();", "title": "" }, { "docid": "5fa365751ca7226d1462887f3f66f11f", "score": "0.7485183", "text": "public function getIterator()\n {\n return new ArrayIterator((array)$this->items());\n }", "title": "" }, { "docid": "dad7ff0bb3e04dc8eabf05e722e49ef0", "score": "0.74720824", "text": "public function getIterator(): Iterator\n {\n return new ArrayIterator($this->calls);\n }", "title": "" }, { "docid": "0600b4be0036c21802ad8a727ae1e1f3", "score": "0.7446015", "text": "public function getIterator()\n {\n return new ArrayIterator($this->collectItems());\n }", "title": "" }, { "docid": "d62199f7bc7b3375f55cd07423f6dec0", "score": "0.7430833", "text": "public function getIterator()\n {\n return new ArrayIterator($this->results);\n }", "title": "" }, { "docid": "fdccf02d1d0baff4349449f8b3fc1131", "score": "0.7430406", "text": "public function getIterator()\n\t{\n//\t\treturn $this->ds->getIterator();\n\t\treturn new \\ArrayIterator($this->fetch());\n\t}", "title": "" }, { "docid": "19f0661f7a9dbdde2a87120e356345e4", "score": "0.7428503", "text": "public function getIterator()\n {\n return new ArrayIterator($this->_content);\n }", "title": "" }, { "docid": "8f5d573c6b7abe86bb040eb1c596014d", "score": "0.7400919", "text": "public function getIterator()\n {\n return new \\ArrayIterator($this->encoding);\n }", "title": "" }, { "docid": "56d482c82428bc700650895e1015a79d", "score": "0.73933923", "text": "public function getIterator()\n {\n return new \\ArrayIterator($this);\n }", "title": "" }, { "docid": "56d482c82428bc700650895e1015a79d", "score": "0.73933923", "text": "public function getIterator()\n {\n return new \\ArrayIterator($this);\n }", "title": "" }, { "docid": "9584b1ae752e419701aaa15fe378420e", "score": "0.73851126", "text": "public function getIterator() {\n\t\treturn new \\ArrayIterator($this->_pems);\n\t}", "title": "" }, { "docid": "7f4d4c85e96683ced3303a223fb66d8b", "score": "0.7379886", "text": "public function getIterator()\n\t{\n\t\treturn new \\ArrayIterator($this->toArray());\n\t}", "title": "" }, { "docid": "98d587c3d82f5b5bb28b350a3c4f3ebc", "score": "0.73646754", "text": "protected abstract function get_itr () ;", "title": "" }, { "docid": "bde0cc74d2b33bf72c0d58774c30a35c", "score": "0.73641557", "text": "public function getIterator()\n {\n return new \\ArrayIterator($this->find());\n }", "title": "" }, { "docid": "3522b758dac115dad4c63cd957dde363", "score": "0.7361991", "text": "public function getIterator()\n {\n return new \\ArrayIterator($this->container);\n }", "title": "" }, { "docid": "75e856dd6b99f0e6bd84fb422ea692c8", "score": "0.7351359", "text": "public function getIterator()\n {\n return new \\ArrayIterator($this->_elements);\n }", "title": "" }, { "docid": "023782a308d356298eed4f71451d2bc6", "score": "0.7350681", "text": "public function getIterator() {\n\t\treturn new \\ArrayIterator($this->_store);\n\t}", "title": "" }, { "docid": "04ff197e3efd1993e30cafecb6c33597", "score": "0.734602", "text": "public function getIterator()\n\t{\n\t\treturn new ArrayIterator($this->items);\n\t}", "title": "" }, { "docid": "0b23e7c6edbb62138fe0b4f5bdc7c7e5", "score": "0.73162496", "text": "public function getIterator()\n {\n return new ArrayIterator($this->getWorkableItem());\n }", "title": "" }, { "docid": "86745bc99442562345b22395400319f0", "score": "0.7308491", "text": "public function getIterator()\n {\n return new ArrayIterator($this->toArray());\n }", "title": "" }, { "docid": "86745bc99442562345b22395400319f0", "score": "0.7308491", "text": "public function getIterator()\n {\n return new ArrayIterator($this->toArray());\n }", "title": "" }, { "docid": "38608e56a8b8013f4ed43e16ec952640", "score": "0.72849315", "text": "public function getIterator()\r\n {\r\n return new ArrayIterator($this->items);\r\n }", "title": "" }, { "docid": "ad6c4330827a026b467d2210287d29e3", "score": "0.7283781", "text": "public function getIterator(): Traversable {\n return new \\ArrayIterator($this->arr);\n }", "title": "" }, { "docid": "655db06595268fb1453c290230ea4667", "score": "0.72746783", "text": "public function getIterator() {\n return new \\ArrayIterator($this->getValues());\n }", "title": "" }, { "docid": "da6521a2b489b1fcfae2f8d8327700ab", "score": "0.7269252", "text": "public function getIterator()\n {\n return new ArrayIterator($this->vocations);\n }", "title": "" }, { "docid": "e6e08363ee90f3205d5c8d3a62d56552", "score": "0.7264476", "text": "public function getIterator()\n {\n return new ArrayIterator($this->map);\n }", "title": "" }, { "docid": "1d6e9a99b2371b0e16264243fdb00866", "score": "0.72548795", "text": "public function getIterator()\n {\n return new ArrayIterator($this->flatten());\n }", "title": "" }, { "docid": "1935735666a42494eb2c083580c82b68", "score": "0.7247406", "text": "public function getIterator():\\ArrayIterator\n\t{\n\t\treturn new \\ArrayIterator( $this->params );\n\t}", "title": "" }, { "docid": "6282363a85eceda6d0e2e76e46e9c949", "score": "0.72406584", "text": "public function iterator();", "title": "" }, { "docid": "7b8b2f0a6e5f492330c95841c467430b", "score": "0.7239012", "text": "public function getIterator(): ArrayIterator\n {\n return new ArrayIterator($this->container);\n }", "title": "" }, { "docid": "a07f40af44fff85fce7df80df17a85a5", "score": "0.7232063", "text": "public function getIterator(): \\Traversable {\n return new \\ArrayIterator($this->data);\n }", "title": "" }, { "docid": "ec4eb1c9289825318a9ff81ec0fe89e9", "score": "0.7230385", "text": "public function getIterator(): ArrayIterator\n {\n return new ArrayIterator($this->getItems());\n }", "title": "" }, { "docid": "d42f306f8c92f8df3950e58ca90645f2", "score": "0.7227518", "text": "public function getIterator()\n {\n return new ArrayIterator($this->items);\n }", "title": "" }, { "docid": "d42f306f8c92f8df3950e58ca90645f2", "score": "0.7227518", "text": "public function getIterator()\n {\n return new ArrayIterator($this->items);\n }", "title": "" }, { "docid": "26a5267dcf2e2ff14842c6aa3e861e98", "score": "0.72140557", "text": "public function getIterator()\n {\n return new ArrayIterator($this->rows);\n }", "title": "" }, { "docid": "069b1825a66a45aacb079f5ad844994a", "score": "0.7212292", "text": "public function getIterator() {\n\t\treturn new ArrayIterator($this->getFunctions());\n\t}", "title": "" }, { "docid": "32866abbd320dd306726fae254bdb1f8", "score": "0.7210474", "text": "public function getIterator()\r\n {\r\n\t $temp = new ArrayObject($this);\r\n\t \r\n\t // foreach ([\"a\"=>55,\"b\"=>66] as $name => $value)\r\n\t // {\r\n\t\t // $temp->offsetSet($name, $value);\r\n\t // }\r\n\t $myReflectionClass = new ReflectionClass($this);\r\n\t \r\n\t foreach ($myReflectionClass->getMethods( ReflectionMethod::IS_PUBLIC ) as $method)\r\n\t {\r\n\t\t\tif(substr($method->name, 0, 4) == \"get_\") //perhaps we should also check to confirm that the $method takes no arguments, and that the method name is not identically \"get_\"\r\n\t\t\t{\r\n\t\t\t\t$temp->offsetSet( substr($method->name, 4), call_user_func(array($this,$method->name)));\r\n\t\t\t}\r\n\t }\r\n\t \r\n\t \r\n\t return $temp->getIterator();\r\n }", "title": "" }, { "docid": "0b32eaebd80a2884642212800f6137aa", "score": "0.7201918", "text": "public function getIterator()\n {\n return new ArrayIterator($this->tree);\n }", "title": "" }, { "docid": "aec41b4db165cdadc9f216d04a8ebe2b", "score": "0.7198977", "text": "public function getIterator() {\n\t\t\t///////////////////\n\t\t\t// Member Variables\n\t\t\t///////////////////\n\t\t\t$iArray['DOCUMENTOIdDOCUMENTO'] = $this->intDOCUMENTOIdDOCUMENTO;\n\t\t\t$iArray['PROCESOIdPROCESO'] = $this->intPROCESOIdPROCESO;\n\t\t\t$iArray['FASEIdFASE'] = $this->intFASEIdFASE;\n\t\t\treturn new ArrayIterator($iArray);\n\t\t}", "title": "" }, { "docid": "3eacb8ac781e3a691494482ae6cb0f33", "score": "0.71975356", "text": "public function getIterator()\n {\n return new ArrayIterator($this->collection);\n }", "title": "" }, { "docid": "3eacb8ac781e3a691494482ae6cb0f33", "score": "0.71975356", "text": "public function getIterator()\n {\n return new ArrayIterator($this->collection);\n }", "title": "" }, { "docid": "2ef57af761a0a42e860ce005095369b8", "score": "0.7196391", "text": "#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n return new ArrayIterator($this->values);\n }", "title": "" }, { "docid": "a390b2fb7a2ecfea6354276cf4bd30e8", "score": "0.7190115", "text": "public function getIterator() {\n\t\treturn $this->data->getIterator();\n\t}", "title": "" }, { "docid": "b1ad3dbf344cd37495e1274b4f998931", "score": "0.7179581", "text": "public function getIterator(): ArrayIterator\n {\n return new ArrayIterator($this->items);\n }", "title": "" }, { "docid": "9738d6eb9f04e77af130c494ec4e7dd7", "score": "0.7145637", "text": "public function getIterator()\n {\n return new \\ArrayIterator($this->content);\n }", "title": "" }, { "docid": "fb052f9dfaf70ed587a085ab4665f986", "score": "0.71437293", "text": "public function getIterator()\n {\n return new \\RecursiveArrayIterator($this->data);\n }", "title": "" }, { "docid": "ec711af73d81f7c5a914e0dcfbd046c3", "score": "0.71409935", "text": "#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n return new ArrayIterator($this->_collection);\n }", "title": "" }, { "docid": "0c3889973af642ed43213be6f054a05f", "score": "0.71356654", "text": "public function getIterator()\n\t{\n\t\treturn new ArrayIterator($this->segments());\n\t}", "title": "" }, { "docid": "adcbc9ab16cc0b5ff4d6febb86507e51", "score": "0.71350217", "text": "public function getIterator(): Traversable|ArrayIterator\n {\n // TODO: Implement getIterator() method.\n return new ArrayIterator($this->pointer);\n }", "title": "" }, { "docid": "adcbc9ab16cc0b5ff4d6febb86507e51", "score": "0.71350217", "text": "public function getIterator(): Traversable|ArrayIterator\n {\n // TODO: Implement getIterator() method.\n return new ArrayIterator($this->pointer);\n }", "title": "" }, { "docid": "adcbc9ab16cc0b5ff4d6febb86507e51", "score": "0.71350217", "text": "public function getIterator(): Traversable|ArrayIterator\n {\n // TODO: Implement getIterator() method.\n return new ArrayIterator($this->pointer);\n }", "title": "" }, { "docid": "aec80a09193d6cc388dd9904b35fce6b", "score": "0.71139085", "text": "public function getIterator() {\r\n\t return new \\ArrayIterator($this->_collection);\r\n\t}", "title": "" }, { "docid": "415d9fb99525b05cf313840de1fe7010", "score": "0.7109083", "text": "public function getIterator()\n {\n }", "title": "" }, { "docid": "415d9fb99525b05cf313840de1fe7010", "score": "0.7109083", "text": "public function getIterator()\n {\n }", "title": "" }, { "docid": "415d9fb99525b05cf313840de1fe7010", "score": "0.7109083", "text": "public function getIterator()\n {\n }", "title": "" }, { "docid": "415d9fb99525b05cf313840de1fe7010", "score": "0.7109083", "text": "public function getIterator()\n {\n }", "title": "" }, { "docid": "b0bfb6f62d1a6e6d7af62e7f4d248d8b", "score": "0.7099729", "text": "public function getIterator(): \\ArrayIterator\n {\n return new \\ArrayIterator($this->arrSlots);\n }", "title": "" }, { "docid": "e59bf51d6b5bfdd9738ddc6159a92f9c", "score": "0.7097675", "text": "public function getIterator(): \\ArrayIterator\n {\n return new \\ArrayIterator($this->store->memoized);\n }", "title": "" }, { "docid": "e3934adff731b3d32764407de6a355d8", "score": "0.7092799", "text": "public function getIterator()\n {\n return new ArrayIterator($this->chars);\n }", "title": "" }, { "docid": "026b5642d1e3d14725b7cfffee764d41", "score": "0.708068", "text": "public function getIterator()\n {\n // TODO: Implement getIterator() method.\n $arr=array(\n 'key1'=>'nihao',\n 'key2'=>'jiayou',\n 'key3'=>'qianjin',\n );\n return new ArrayIterator($arr);\n }", "title": "" }, { "docid": "e8b7e9d94500a0364eda34b2a0c40c8d", "score": "0.70800227", "text": "public function getIterator()\n {\n return new ArrayObject($this->attributes);\n }", "title": "" }, { "docid": "6deabf86154434d41bd24f0955ec7445", "score": "0.7079916", "text": "public function getIterator()\n {\n return new \\ArrayIterator($this->items);\n }", "title": "" } ]
59372f348c0f0d58427c14153675c2f0
Get the registered name of the component.
[ { "docid": "5e741e4ffc777e9d3745a4c7649fc60d", "score": "0.0", "text": "protected static function getFacadeAccessor() {\n\t\treturn CacheManager::class;\n\t}", "title": "" } ]
[ { "docid": "97fa3507030e964b6054b48af451e4d5", "score": "0.823001", "text": "public function getName()\n\t{\n\t\treturn $this->component->getName();\n\t}", "title": "" }, { "docid": "9736a7ff3f47b5be46234783a4c8f6d5", "score": "0.795751", "text": "public function getComponentName()\n {\n return $this->name;\n }", "title": "" }, { "docid": "aaa8dd6d33f83840460adb734d00ea97", "score": "0.7806784", "text": "public function getComponentName()\n {\n return new DLabel(self::class, 'componentName');\n }", "title": "" }, { "docid": "3d018439abcd4766d7bc1221ab77c851", "score": "0.7684222", "text": "protected function getComponentName()\n\t{\n\t\tif (empty($this->componentName))\n\t\t{\n\t\t\t$this->componentName = 'com_' . $this->getOption();\n\t\t}\n\n\t\treturn $this->componentName;\n\t}", "title": "" }, { "docid": "be5c607df2436839271e76d4cb5364b0", "score": "0.7542427", "text": "public function getComponentName()\r\n {\r\n if (null === $this->_componentName) {\r\n throw new Xi_Controller_Exception('Component name not set');\r\n }\r\n return $this->_componentName;\r\n }", "title": "" }, { "docid": "9b3a74005b0fee5f64b657cd44bc0a33", "score": "0.73687243", "text": "public function getComponentName()\n {\n return $this->_options['name'];\n }", "title": "" }, { "docid": "4455618df650d2f4384c529cc9b10956", "score": "0.7348619", "text": "public function getComponentName()\n {\n return Str::of(class_basename($this))\n ->replaceLast('Field', '')\n ->kebab()\n ->lower();\n }", "title": "" }, { "docid": "ad790b742bc415ba91fe3b255424c5e9", "score": "0.7242142", "text": "function getName()\n {\n return $this->_impl->getName();\n }", "title": "" }, { "docid": "0a69968d8a8b0bd182a53fb33cb50b81", "score": "0.7205169", "text": "public function __toString()\n\t{\n\t\treturn $this->component->getName();\n\t}", "title": "" }, { "docid": "0bae24ffcc3af4f32acef2cb18833e9b", "score": "0.71633375", "text": "abstract function getComponentName();", "title": "" }, { "docid": "4d5617d232b27b550944d6719a04ec9c", "score": "0.7136912", "text": "function get_plugin_name() {\n\t\t$plugin_name = bw_array_get( $this->plugin_data, 'Name', $this->component);\n\t\treturn $plugin_name;\n\t}", "title": "" }, { "docid": "705fb5629ab14ab1d39ddfa6964f33fc", "score": "0.7086381", "text": "public function obtainName()\n {\n return $this->getName();\n }", "title": "" }, { "docid": "705fb5629ab14ab1d39ddfa6964f33fc", "score": "0.7086381", "text": "public function obtainName()\n {\n return $this->getName();\n }", "title": "" }, { "docid": "de20c6f07bb90daf80ee3822da9330c6", "score": "0.7045866", "text": "public function getName()\n {\n return substr(strrchr(get_class($this), '\\\\'), 1);\n }", "title": "" }, { "docid": "7e85c91283ed5d7e3ee75e09545e7087", "score": "0.69877225", "text": "public function getName() {\n return $this->get(self::NAME);\n }", "title": "" }, { "docid": "b432955cf19cfdd114acde2773edf6f2", "score": "0.69404966", "text": "public function getName() {\n return self::$name;\n }", "title": "" }, { "docid": "d9ec2968dbe3364688a3187ab115ed06", "score": "0.69330394", "text": "public function getName() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->name;\r\n\t}", "title": "" }, { "docid": "46b0b0e8201a835f6efa247fdfa2778f", "score": "0.6909587", "text": "public function getName(): string\n {\n return $this->name ?? static::NAME;\n }", "title": "" }, { "docid": "f563c18d18a3338fa567dc3223431a61", "score": "0.69004744", "text": "public function getName()\n {\n $value = $this->get(self::name);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "f563c18d18a3338fa567dc3223431a61", "score": "0.69004744", "text": "public function getName()\n {\n $value = $this->get(self::name);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "c5bf1db07c433adc39a07611d26d671a", "score": "0.68975276", "text": "public function getName() {\n return self::name();\n }", "title": "" }, { "docid": "0349b7b13e9cbfcef119e387a152ad03", "score": "0.689668", "text": "public function getName()\n {\n return self::$name;\n }", "title": "" }, { "docid": "e82b9df1ad65bb5a654402fd26d7d17e", "score": "0.6868948", "text": "public static function getName() {\n $data = self::getPluginData();\n return $data['Name'];\n }", "title": "" }, { "docid": "ccd2a56b05cf16cda769235dbe2ad3d8", "score": "0.68120587", "text": "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "title": "" }, { "docid": "d0b8aacb7cfb789b8fb061a17ee87c18", "score": "0.6801456", "text": "final public function name(): string\n {\n if ($this->name === null) {\n $constants = self::getMembers();\n $this->name = array_search($this->value, $constants, true);\n }\n\n return $this->name;\n }", "title": "" }, { "docid": "500a31cd94a472016c0127db46278b7c", "score": "0.67916125", "text": "final public function getName()\n {\n return strtolower(str_replace(\"\\\\\", \"\", get_class($this)));\n }", "title": "" }, { "docid": "f59f28581ecfe329856a25bdd6e947c0", "score": "0.6775181", "text": "public function getComponentRealName($name) {\n if (!$this->isEditable() || !isset($this->components[$name]))\n throw new \\Exception(\"Component does not exist or the module is not editable.\");\n return $this->components[$name][\"realName\"];\n }", "title": "" }, { "docid": "e03612823ce1d675b396bc4d0289f3cf", "score": "0.6769992", "text": "public function getName()\n {\n return $this->getData(self::NAME);\n }", "title": "" }, { "docid": "4a3dd09114ddbb582d2b8033a8833a53", "score": "0.6769749", "text": "public function getName()\r\n {\r\n if (empty($this->name)) {\r\n $this->name = strtolower(join('', array_slice(explode('\\\\', get_class($this)), - 1)));\r\n }\r\n \r\n return $this->name;\r\n }", "title": "" }, { "docid": "6739144e6f5520edcadc94f385b2cb7f", "score": "0.67622375", "text": "public function get_name() : string {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "311fe342c3916089acc800c26e8ceeb5", "score": "0.6762167", "text": "function get_name() {\n\t\t\treturn $this->config['prefix'].$this->config['name'];\n\t\t}", "title": "" }, { "docid": "6c17e6db6fd95139f41de772febb8835", "score": "0.6752015", "text": "public function getName()\n\t{\n\t\treturn self::NAME;\n\t}", "title": "" }, { "docid": "16a88ff105a10160c3ba9d395fb258e2", "score": "0.6737932", "text": "public function get_name() {\n\t\treturn parent::get_widget_slug( 'RegistrationForm' );\n\t}", "title": "" }, { "docid": "9fcc8021410fbaed7fe884487cad9cc6", "score": "0.6735065", "text": "public function componentName();", "title": "" }, { "docid": "8fa251523776f3bfe1d37840519fa40a", "score": "0.67278147", "text": "public function getName(): string\n {\n return 'login_' . $this->name . '_' . sha1(static::class);\n }", "title": "" }, { "docid": "ee48e9281a71cd0d55c3d2d249d33a2a", "score": "0.67270815", "text": "public function name(): string\n {\n return $this->props['name'];\n }", "title": "" }, { "docid": "78d44ec1060f087192c7dedd8cc4c518", "score": "0.67172", "text": "public function getName()\n\t{\n\t\treturn $this->getDisplayName() ? $this->getDisplayName() : $this->getFrontendLabel();\n\t}", "title": "" }, { "docid": "e2834805d6f58190a221e13f588919e1", "score": "0.67112744", "text": "public function getName()\n {\n if (empty($this->name)) {\n $this->name = substr(strrchr(get_class($this), '_'), 1);\n }\n return $this->name;\n }", "title": "" }, { "docid": "63b0582894c94dfcce2db3521474af81", "score": "0.670898", "text": "public static function getName()\n {\n return static::NAME;\n }", "title": "" }, { "docid": "499928a06a571006de319fa9abbad7e4", "score": "0.670616", "text": "public static function getName();", "title": "" }, { "docid": "499928a06a571006de319fa9abbad7e4", "score": "0.670616", "text": "public static function getName();", "title": "" }, { "docid": "d055ec9c4e7334941a9ebe15b452c106", "score": "0.67011756", "text": "function get_name()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_NAME);\r\n }", "title": "" }, { "docid": "d055ec9c4e7334941a9ebe15b452c106", "score": "0.67011756", "text": "function get_name()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_NAME);\r\n }", "title": "" }, { "docid": "d055ec9c4e7334941a9ebe15b452c106", "score": "0.67011756", "text": "function get_name()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_NAME);\r\n }", "title": "" }, { "docid": "0b7717416c265089aebf726e0c0b96ef", "score": "0.67002654", "text": "public function getName(): string\n {\n return $this->_name;\n }", "title": "" }, { "docid": "0b7717416c265089aebf726e0c0b96ef", "score": "0.67002654", "text": "public function getName(): string\n {\n return $this->_name;\n }", "title": "" }, { "docid": "ba5e2e557451ed32384ce1f0e1c34089", "score": "0.6699254", "text": "public function getName() {\n return static::NAME;\n }", "title": "" }, { "docid": "f4838dace77091dfbbe6cfd576436899", "score": "0.6692533", "text": "public function getName()\n {\n $class = explode('\\\\', get_class($this));\n return lcfirst($class[count($class) - 1]);\n }", "title": "" }, { "docid": "8f8ebd7e4c498f96f92106f772bb6b84", "score": "0.66881377", "text": "public function name(): string {\n\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "ff782be55650afafc27ce714faef720e", "score": "0.6687429", "text": "public function getName()\n {\n return $this->getName();\n }", "title": "" }, { "docid": "a4943f24f74828e51b3e5feafaf20087", "score": "0.6680446", "text": "public function getName()\n {\n return static::NAME;\n }", "title": "" }, { "docid": "a05948a6d9d2409163eaed93c9012045", "score": "0.66795135", "text": "final public function getName() {\n\t\treturn $this->_name;\n\t}", "title": "" }, { "docid": "8414ec8c642e9c79e04cfc0395351f35", "score": "0.66748387", "text": "public function getName(): string {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "8414ec8c642e9c79e04cfc0395351f35", "score": "0.66748387", "text": "public function getName(): string {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "8414ec8c642e9c79e04cfc0395351f35", "score": "0.66748387", "text": "public function getName(): string {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "8414ec8c642e9c79e04cfc0395351f35", "score": "0.66748387", "text": "public function getName(): string {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "bbb17747a4e15d1a9a0bb51746a005b0", "score": "0.66701704", "text": "public function getName() {\n\t\treturn $this->getState('name');\n\t}", "title": "" }, { "docid": "a9f5c63b86ee424b909ddfb549392d33", "score": "0.6660436", "text": "public function get_name() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "a9f5c63b86ee424b909ddfb549392d33", "score": "0.6660436", "text": "public function get_name() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "a9f5c63b86ee424b909ddfb549392d33", "score": "0.6660436", "text": "public function get_name() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "a9f5c63b86ee424b909ddfb549392d33", "score": "0.6660436", "text": "public function get_name() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "a9f5c63b86ee424b909ddfb549392d33", "score": "0.6660436", "text": "public function get_name() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "a9f5c63b86ee424b909ddfb549392d33", "score": "0.6660436", "text": "public function get_name() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "a9f5c63b86ee424b909ddfb549392d33", "score": "0.6660436", "text": "public function get_name() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "ca718e42fba0145d2e3169ce1d517798", "score": "0.664505", "text": "public function getName() {\n return $this->info->get_value('name')->get_plain();\n }", "title": "" }, { "docid": "1b83c5590461b0a727dc5ea35ae42b2c", "score": "0.6641439", "text": "public function getName()\n {\n $this->scan();\n return $this->name;\n }", "title": "" }, { "docid": "1f7ed24202c9ce4c437143c354a24b8a", "score": "0.66377664", "text": "public function get_name() {\r\n\t\treturn $this->name;\r\n\t}", "title": "" }, { "docid": "abdc1afe18a4ff2d7980d5966ed189ce", "score": "0.66259336", "text": "public function getName()\n {\n $param = $this->getInput('site');\n return $param ? \"$param Bridge\" : self::NAME;\n }", "title": "" }, { "docid": "23ce516d88dfcbf66911eca270b3b963", "score": "0.6624463", "text": "protected function getName() {\n return $this->name;\n }", "title": "" }, { "docid": "cf6704f2ab7cd8742cb7a958e992cc4b", "score": "0.66241413", "text": "public function getName()\n {\n return self::NAME;\n }", "title": "" }, { "docid": "cf6704f2ab7cd8742cb7a958e992cc4b", "score": "0.66241413", "text": "public function getName()\n {\n return self::NAME;\n }", "title": "" }, { "docid": "cf6704f2ab7cd8742cb7a958e992cc4b", "score": "0.66241413", "text": "public function getName()\n {\n return self::NAME;\n }", "title": "" }, { "docid": "cf6704f2ab7cd8742cb7a958e992cc4b", "score": "0.66241413", "text": "public function getName()\n {\n return self::NAME;\n }", "title": "" }, { "docid": "92cc849ea8eb7458a759c37ff4786a96", "score": "0.66237795", "text": "public function get_name(): string\n {\n return $this->_name;\n }", "title": "" }, { "docid": "edce48ddc17c08f3b7e1c609bb037f02", "score": "0.66228193", "text": "public function getName(): string\n {\n return $this->instanceOfType->getName();\n }", "title": "" }, { "docid": "a5102885e78bf2190322993875d9ee1b", "score": "0.6617998", "text": "public function getName(): string {\n return $this->name;\n }", "title": "" }, { "docid": "a5102885e78bf2190322993875d9ee1b", "score": "0.6617998", "text": "public function getName(): string {\n return $this->name;\n }", "title": "" }, { "docid": "a5102885e78bf2190322993875d9ee1b", "score": "0.6617998", "text": "public function getName(): string {\n return $this->name;\n }", "title": "" }, { "docid": "6e2b739d8c1f9f62844ff30dcefbb864", "score": "0.66178477", "text": "public function getName() {\n\t\treturn $this->_name;\n\t}", "title": "" }, { "docid": "6e2b739d8c1f9f62844ff30dcefbb864", "score": "0.66178477", "text": "public function getName() {\n\t\treturn $this->_name;\n\t}", "title": "" }, { "docid": "6e2b739d8c1f9f62844ff30dcefbb864", "score": "0.66178477", "text": "public function getName() {\n\t\treturn $this->_name;\n\t}", "title": "" }, { "docid": "6e2b739d8c1f9f62844ff30dcefbb864", "score": "0.66178477", "text": "public function getName() {\n\t\treturn $this->_name;\n\t}", "title": "" }, { "docid": "ce99993dc94028cfa15ec43017a8fc73", "score": "0.661017", "text": "public function name() {\n\t\treturn $this->_name;\n\t}", "title": "" }, { "docid": "490e2a82f2e40002fea4a13a0e6c9bcc", "score": "0.6609177", "text": "private function getName(): string\n {\n return $this->name;\n }", "title": "" }, { "docid": "8e3a4682ac31b9ac6eb45ee906f289b3", "score": "0.6608117", "text": "public function getName() {\n\t\treturn $this->get('name');\n\t}", "title": "" }, { "docid": "9c7d09720ecbecef159ad1b8f276dc20", "score": "0.66076", "text": "public function getName()\n {\n return $GLOBALS['registry']->get('name', 'whups');\n }", "title": "" }, { "docid": "2d4587f21feef50dc5d3299922db1d98", "score": "0.6607344", "text": "function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "d22ad068768d355f9fdc7e8e478e5a90", "score": "0.66030926", "text": "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "title": "" }, { "docid": "d22ad068768d355f9fdc7e8e478e5a90", "score": "0.66030926", "text": "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "title": "" }, { "docid": "d22ad068768d355f9fdc7e8e478e5a90", "score": "0.66030926", "text": "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "title": "" }, { "docid": "d22ad068768d355f9fdc7e8e478e5a90", "score": "0.66030926", "text": "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "title": "" }, { "docid": "d22ad068768d355f9fdc7e8e478e5a90", "score": "0.66030926", "text": "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "title": "" }, { "docid": "d22ad068768d355f9fdc7e8e478e5a90", "score": "0.66030926", "text": "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "title": "" }, { "docid": "d22ad068768d355f9fdc7e8e478e5a90", "score": "0.66030926", "text": "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "title": "" }, { "docid": "a7cbaa6383b703357c9686c3b616f416", "score": "0.6601943", "text": "public function get_name() {\n\t\treturn $this->_name;\n\t}", "title": "" }, { "docid": "2d527dde6969a5832181b7ea30279e1f", "score": "0.6600711", "text": "public function name()\n {\n return $this->name ?: Str::title(Str::snake(class_basename(get_class($this)), ' '));\n }", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65967", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65967", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65967", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65967", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65967", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" } ]
3d0acf127eed52ac3142b5cc7633c4e4
/ Back end data provider to datagrid.
[ { "docid": "29080836aa0881c94842269192e0b4c4", "score": "0.0", "text": "public function fillgridAction ()\r\n {\r\n self::createModel();\r\n $request = $this->getRequest();\r\n $valid = $request->getParam('nd');\r\n if ($request->isXmlHttpRequest() and $valid) {\r\n $this->grid = $this->_helper->grid();\r\n $this->grid->sql = $this->model->select()->from(\r\n $this->model->info('name'));\r\n $searchOn = $request->getParam('_search');\r\n if ($searchOn != 'false') {\r\n $sarr = $request->getParams();\r\n foreach ($sarr as $key => $value) {\r\n switch ($key) {\r\n case 'subject_code':\r\n case 'abbr':\r\n case 'subject_name':\r\n case 'subject_code':\r\n $this->grid->sql->where(\"$key LIKE ?\", $value . '%');\r\n break;\r\n case 'subject_type_id':\r\n case 'is_optional':\r\n case 'lecture_per_week':\r\n case 'tutorial_per_week':\r\n case 'practical_per_week':\r\n case 'suggested_duration':\r\n $this->grid->sql->where(\"$key = ?\", $value);\r\n break;\r\n }\r\n }\r\n }\r\n self::fillgridfinal();\r\n } else {\r\n header(\"HTTP/1.1 403 Forbidden\");\r\n }\r\n }", "title": "" } ]
[ { "docid": "dc9e2bcbd7101d24f780b600e3ea1bf7", "score": "0.7017512", "text": "public function datagrid()\n {\n $crud = $this->_getGroceryCrudEnterprise();\n\n $crud->setTable('employees');\n $crud->displayAs('officeCode','Office City');\n\n $crud->setSubject('Employee');\n $crud->setFieldUpload('file_url','assets/uploads/files','assets/uploads/files');\n //many to one relation\n $crud->setRelation('officeCode','offices','city');\n\n\n\n $output = $crud->render();\n return $this->_show_output($output);\n\n }", "title": "" }, { "docid": "1e1bdbee645d98331d9d91f901c8a2d4", "score": "0.6936677", "text": "abstract public function bindDataProvider();", "title": "" }, { "docid": "bfa21dce1def334867f47f58407fe3ab", "score": "0.666874", "text": "abstract public function dataProvider(): array;", "title": "" }, { "docid": "6de6dc337a37fa8cf3d432ba1233fe08", "score": "0.66207504", "text": "public function dataCallbackAction() {\n $this->view->headTitle('Data callback example');\n \n /* @var $entityManager Doctrine\\ORM\\EntityManager */\n $entityManager = Zend_Registry::get('doctrine')->getEntityManager();\n $request = $this->getRequest(); \n $view = $this->view;\n $query = $entityManager->createQuery('SELECT p.name AS model, m.name AS manufacturer, pt.name as type ' .\n 'FROM Application\\Entity\\Phone AS p JOIN p.manufacturer AS m JOIN p.phonetype as pt');\n \n $dataSource = new Pike_Grid_DataSource_Doctrine($query);\n $dataSource->excludeColumnsFromEscaping(array('model'));\n \n $grid = new Pike_Grid($dataSource);\n $grid->setColumnAttribute('model', 'data', function($row) use($view) {\n $url = $view->url(array('controller' => 'somecontroller', 'action' => 'someaction', 'name' => $row['model']));\n \n return '<a href=\"' . $url . '\">' . $row['model'] . '</a>';\n });\n \n $this->view->grid = $grid;\n $this->view->headScript()->appendScript($grid->getJavascript(), 'text/javascript');\n $this->view->headScript()->appendScript('Application.bindTooltipsToSimpleDataCallback()', 'text/javascript');\n \n $this->view->source = $this->_highLight(__FUNCTION__);\n \n if ($request->isXmlHttpRequest()) {\n $this->_helper->layout->disableLayout(true);\n $viewRenderer = $this->_helper->ViewRenderer->setNoRender(true);\n \n $dataSource->setParameters($request->getPost());\n echo $dataSource->getJSON();\n }\n }", "title": "" }, { "docid": "cab906edbad1c8ec06618debb01313a5", "score": "0.6612345", "text": "private function _getDataProvider()\n {\n return $this->_dataProvider;\n }", "title": "" }, { "docid": "b18380330bb4129f46ced80d5ee8b4b5", "score": "0.64649755", "text": "public function setDataGrid() {\n\t\t$hotel_id = $this->input->post ( 'hotel_id' );\n\t\t$data = $this->conn->getData ( $hotel_id );\n\t\tdie ( \"{data:\" . json_encode ( $data ) . \"}\" );\n\t}", "title": "" }, { "docid": "85b99992d34e8ce036e43cb029c00791", "score": "0.64152694", "text": "public function grid_data()\n\t{\n\n\t\t\t$this->M_jqxgrid->read();\n\t}", "title": "" }, { "docid": "54cb4a754dacf475b0049a020876e85e", "score": "0.634196", "text": "function get_data_provider()\r\n {\r\n return $this->data_provider;\r\n }", "title": "" }, { "docid": "5463c4ca443271fdcd24c555df8d8eda", "score": "0.5991442", "text": "public function dataProvider()\n {\n return $this->getDataProviderEmpty();\n }", "title": "" }, { "docid": "440abb00d8744063987e556dcbe4472d", "score": "0.5984045", "text": "public function getDataProvider()\n {\n return $this->dataProvider;\n }", "title": "" }, { "docid": "d443a138695cd66558198be4b7948667", "score": "0.59073365", "text": "function onReload()\n {\n $this->datagrid->clear();\n \n // add an regular object to the datagrid\n $item = new StdClass;\n $item->code = '1';\n $item->name = 'Aretha Franklin';\n $item->email = '[email protected]';\n $item->phone = '51 1111-1111';\n $this->datagrid->addItem($item);\n \n // add an regular object to the datagrid\n $item = new StdClass;\n $item->code = '2';\n $item->name = 'Eric Clapton';\n $item->email = '[email protected]';\n $item->phone = '51 2222-2222';\n $this->datagrid->addItem($item);\n \n // add an regular object to the datagrid\n $item = new StdClass;\n $item->code = '3';\n $item->name = 'B.B. King';\n $item->email = '[email protected]';\n $item->phone = '51 3333-3333';\n $this->datagrid->addItem($item);\n \n // add an regular object to the datagrid\n $item = new StdClass;\n $item->code = '4';\n $item->name = 'Janis Joplin';\n $item->email = '[email protected]';\n $item->phone = '51 4444-4444';\n $this->datagrid->addItem($item);\n }", "title": "" }, { "docid": "14bf6a627bd0826532a1f8fc796bd9ef", "score": "0.58967847", "text": "public function providerAfiliados(){\n $provider = new \\yii\\data\\ActiveDataProvider([\n 'query' => $this->sigiSumiDepaQuery(),\n 'pagination' => [\n 'pageSize' => 100,\n ],\n]);\n return $provider;\n}", "title": "" }, { "docid": "4d7b8ff904ed759524042dab468d1fa6", "score": "0.586569", "text": "public function setDataProvider($data_provider = null) {\n\t\t$this->data_provider = $data_provider;\n\t}", "title": "" }, { "docid": "c38cc9c8e24739522b298ffe61e7a2f1", "score": "0.58597887", "text": "public function getDataProviderDeposito()\r\n \t{\r\n \t\t$query = self::findDepositoModel();\r\n\r\n \t\t$dataProvider = New ActiveDataProvider([\r\n \t\t\t'query' => $query,\r\n \t\t]);\r\n\r\n \t\t$query->all();\r\n\r\n \t\treturn $dataProvider;\r\n \t}", "title": "" }, { "docid": "2bce11df30fce09a919513e7ddf62401", "score": "0.58340913", "text": "public function providerParam(){\n return new ActiveDataProvider([\n 'query' =>Parametroscentrosdocu::find()->where(['codocu'=>$this->codocu]),\n 'pagination' => [\n 'pageSize' => 20,\n ],\n ]);\n }", "title": "" }, { "docid": "10afbe42b6f741c0d23f4937312df7eb", "score": "0.5831072", "text": "function onReload()\n {\n $this->datagrid->clear();\n \n // add an regular object to the datagrid\n $item = new StdClass;\n $item->code = '1';\n $item->name = 'Fábio Locatelli';\n $item->address = 'Rua Expedicionario';\n $item->fone = '1111-1111';\n $this->datagrid->addItem($item);\n \n // add an regular object to the datagrid\n $item = new StdClass;\n $item->code = '2';\n $item->name = 'Julia Haubert';\n $item->address = 'Rua Expedicionarios';\n $item->fone = '2222-2222';\n $this->datagrid->addItem($item);\n \n // add an regular object to the datagrid\n $item = new StdClass;\n $item->code = '3';\n $item->name = 'Carlos Ranzi';\n $item->address = 'Rua Oliveira';\n $item->fone = '3333-3333';\n $this->datagrid->addItem($item);\n \n // add an regular object to the datagrid\n $item = new StdClass;\n $item->code = '4';\n $item->name = 'Daline DallOglio';\n $item->address = 'Rua Oliveira';\n $item->fone = '4444-4444';\n $this->datagrid->addItem($item);\n }", "title": "" }, { "docid": "d9a4410274dad30f495bfb9588e8e067", "score": "0.5818052", "text": "public function getDataSource();", "title": "" }, { "docid": "d9a4410274dad30f495bfb9588e8e067", "score": "0.5818052", "text": "public function getDataSource();", "title": "" }, { "docid": "c872599f56f6d09453c069c4dd97eff5", "score": "0.5777578", "text": "function set_data_provider($data_provider)\r\n {\r\n $this->data_provider = $data_provider;\r\n }", "title": "" }, { "docid": "865bdc16c40e49eecc099c69cfeb3c33", "score": "0.5770228", "text": "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t$funciones = 'jQuery(\"#newapi'. $param['grids'][0]['gridname'].'\").jqGrid({ondblClickRow: function(id){ alert(\"id=\"+id); }});';\n\n\t\t$param['listados'] = $this->datasis->listados('CAUB', 'JQ');\n\t\t//$param['otros'] = $this->datasis->otros('CAUB', 'JQ');\n\n\t\t#Set url\n\t\t$grid->setUrlput(site_url($this->url.'setdata/'));\n\n\t\t//Botones Panel Izq\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'));\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t//$param['EastPanel'] = $EastPanel;\n\t\t//$param['LayoutStyle'] = $LayoutStyle;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['funciones'] = $funciones;\n\t\t//$param['bodyscript'] = $bodyscript;\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t//$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\n\t\t$this->load->view('jqgrid/crud2',$param);\n\t}", "title": "" }, { "docid": "92ff155fb226c3a2fa9cf5a6da10bbfb", "score": "0.57663065", "text": "public function getDataProvider($export = false)\r\n\t {\r\n\t \t$query = self::armarConsultaHistoricoLicenciaModel();\r\n\r\n\t \tif ( $export ) {\r\n\t\t \t$dataProvider = New ActiveDataProvider([\r\n\t\t \t\t'query' => $query,\r\n\t\t \t\t'pagination' => false,\r\n\t\t \t]);\r\n\t\t } else {\r\n\t\t \t$dataProvider = New ActiveDataProvider([\r\n\t\t \t\t'query' => $query,\r\n\t\t \t\t'pagination' => [\r\n\t\t \t\t\t'pageSize' => 50,\r\n\t\t \t\t],\r\n\t\t \t]);\r\n\t\t }\r\n\t \t$query->all();\r\n\t \treturn $dataProvider;\r\n \t }", "title": "" }, { "docid": "9ee679d46c5ba84a8de4025f09b11221", "score": "0.5757827", "text": "function wcs3_standard_datagrid_page_callback(){\n \n //Create an instance of our package class...\n $testListTable = new FlightSchedule_ListTable();\n //Fetch, prepare, sort, and filter our data...\n $testListTable->prepare_items();\n \n ?>\n <div class=\"wrap\">\n \n <div id=\"icon-users\" class=\"icon32\"><br/></div>\n <form id=\"data-filter\" method=\"get\">\n <!-- For plugins, we also need to ensure that the form posts back to our current page -->\n <input type=\"hidden\" name=\"page\" value=\"<?php echo $_REQUEST['page'] ?>\" />\n <!-- Now we can render the completed list table -->\n <?php $testListTable->display2() ?>\n </form>\n \n <h2>Flight Schedule Data Table </h2>\n <!-- Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions -->\n <form id=\"movies-filter\" method=\"get\">\n <!-- For plugins, we also need to ensure that the form posts back to our current page -->\n <input type=\"hidden\" name=\"page\" value=\"<?php echo $_REQUEST['page'] ?>\" />\n <!-- Now we can render the completed list table -->\n <?php $testListTable->display() ?>\n </form>\n \n </div>\n <?php\n}", "title": "" }, { "docid": "6c3cb8db80949c1920503ed610a50c01", "score": "0.5755656", "text": "function getData($db)\n{\n global $dataPrivilege, $bolCanEdit, $bolCanDelete, $bolCanApprove, $bolCanCheck;\n global $f;\n global $DataGrid;\n global $myDataGrid;\n global $strKriteriaCompany;\n //global $arrUserInfo\n $arrData = $f->getObjectValues();\n $strKriteria = \"\";\n // GENERATE CRITERIA\n if ($arrData['dataIdItem'] != \"\") {\n $strKriteria .= \"AND a.id_item = '\" . $arrData['dataIdItem'] . \"'\";\n }\n if (validStandardDate($arrData['dataRequestDateFrom']) && validStandardDate($arrData['dataRequestDateThru'])) {\n $strKriteria .= \"AND (a.request_date::date BETWEEN '\" . $arrData['dataRequestDateFrom'] . \"' AND '\" . $arrData['dataRequestDateThru'] . \"') \";\n }\n if ($arrData['dataEmployee'] != \"\") {\n $strKriteria .= \"AND e.employee_id = '\" . $arrData['dataEmployee'] . \"'\";\n }\n if ($arrData['dataDepartment'] != \"\") {\n $strKriteria .= \"AND a.department_code = '\" . $arrData['dataDepartment'] . \"'\";\n }\n $strKriteria .= $strKriteriaCompany;\n if ($db->connect()) {\n $myDataGrid = new cDataGrid(\"formData\", \"DataGrid1\");\n $myDataGrid->caption = getWords(\n strtoupper(vsprintf(getWords(\"list of %s\"), getWords($dataPrivilege['menu_name'])))\n );\n $myDataGrid->setAJAXCallBackScript(basename($_SERVER['PHP_SELF']));\n $myDataGrid->setCriteria($strKriteria);\n $myDataGrid->addColumnCheckbox(\n new DataGrid_Column(\"chkID\", \"id\", ['width' => '30'], ['align' => 'center', 'nowrap' => '']),\n true\n );\n $myDataGrid->addColumnNumbering(new DataGrid_Column(\"No\", \"\", ['width' => '30'], ['nowrap' => '']));\n $myDataGrid->addColumn(\n new DataGrid_Column(getWords(\"No.Req\"), \"consumable_req_no\", ['width' => '100'], ['nowrap' => ''])\n );\n $myDataGrid->addColumn(new DataGrid_Column(getWords(\"Item\"), \"item_name\", ['width' => '100'], ['nowrap' => '']));\n $myDataGrid->addColumn(\n new DataGrid_Column(getWords(\"Employee\"), \"employee_name\", ['width' => '100'], ['nowrap' => ''])\n );\n $myDataGrid->addColumn(\n new DataGrid_Column(\n getWords(\"amount\"), \"item_amount\", ['nowrap' => ''], [\"align\" => \"right\"], false, false,\n \"\", \"formatNumber()\", \"numeric\", true, 15\n )\n );\n $myDataGrid->addColumn(\n new DataGrid_Column(getWords(\"department code\"), \"department_code\", ['width' => '150'], ['nowrap' => ''])\n );\n $myDataGrid->addColumn(\n new DataGrid_Column(getWords(\"request Date\"), \"request_date\", ['width' => '150'], ['nowrap' => ''])\n );\n $myDataGrid->addColumn(new DataGrid_Column(getWords(\"remark\"), \"remark\", ['width' => '100'], ['nowrap' => '']));\n $myDataGrid->addColumn(\n new DataGrid_Column(getWords(\"status\"), \"status\", \"\", \"\", true, true, \"\", \"printRequestStatus()\")\n );\n // Jika punya hal akses edit\n if (!isset($_POST['btnExportXLS']) && $bolCanEdit) {\n $myDataGrid->addColumn(\n new DataGrid_Column(\n \"\", \"\", [\"width\" => \"60\"], ['align' => 'center', 'nowrap' => ''], false, false, \"\",\n \"printEditLink()\", \"\", false /*show in excel*/\n )\n );\n }\n foreach ($arrData AS $key => $value) {\n $myDataGrid->strAdditionalHtml .= generateHidden($key, $value, \"\");\n }\n //tampilkan buttons sesuai dengan otoritas, common_function.php\n generateRoleButtons($bolCanEdit, $bolCanDelete, $bolCanCheck, $bolCanApprove, false, true, $myDataGrid);\n $myDataGrid->addButtonExportExcel(\n \"Export Excel\",\n $dataPrivilege['menu_name'] . \".xls\",\n getWords($dataPrivilege['menu_name'])\n );\n $myDataGrid->getRequest();\n //get Data and set to Datagrid's DataSource by set the data binding (bind method)\n $strSQLCOUNT = \"SELECT COUNT(*) AS total FROM ga_consumable_request AS a LEFT JOIN hrd_employee AS e ON a.id_employee = e.id\";\n $strSQL = \"SELECT i.item_name AS item_name,\n\t \t\t\t\te.employee_name AS employee_name,\n\t\t\t\t e.employee_id AS employee_id,\n\t\t\t\t a.* \n FROM ga_consumable_request as a LEFT JOIN ga_item AS i ON a.id_item=i.id\n\t\t\t\t LEFT JOIN hrd_employee AS e ON a.id_employee=e.id\";\n $myDataGrid->totalData = $myDataGrid->getTotalData($db, $strSQLCOUNT);\n $dataset = $myDataGrid->getData($db, $strSQL);\n //bind Datagrid with array dataset and branchCode\n $myDataGrid->bind($dataset);\n $DataGrid = $myDataGrid->render();\n } else {\n $DataGrid = \"\";\n }\n return $DataGrid;\n}", "title": "" }, { "docid": "bf780d5d8eb2ed64a194aec275fd3bdc", "score": "0.5752173", "text": "public function setDataGrid()\n {\n $dateStart = $this->input->post('dateStart');\n $dateEnd = $this->input->post('dateEnd');\n $hotel = $this->input->post('hotel');\n $province = $this->input->post('province');\n\n $data = $this->conn->getData($dateStart, $dateEnd, $hotel, $province);\n $cant = count($data);\n die(\"{count : \" . $cant . \", data : \" . json_encode($data) . \"}\");\n }", "title": "" }, { "docid": "ca31f7380fd5ae37ca69c37b55e5be95", "score": "0.57452273", "text": "public function retrieveData() {\n\t\tif ($this->data === null) {\n\t\t\t\n\t\t\t$table = $this->getTable();\n\t\t\t$configureMethod = $this->tableConfigureMethod;\n\t\t\tif(method_exists($table, $configureMethod)) {\n\t\t\t\t$table->$configureMethod();\n\t\t\t}\n\t\t\t$this->initFilters($table);\n\t\t\t\n\t\t\tif ($this->displayPagination) {\n\t\t\t\t$this->params['limit'] = $this->nbItemsPerPage;\n\t\t\t\tif(!empty($this->params['page'])) {\n\t\t\t\t\t$this->params['offset'] = ($this->params['page'] - 1) * $this->params['limit'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$defaults = array();\n\t\t\tif(!empty($this->params['defaultCriterias'])) {\n\t\t\t\t$defaults = $this->params['defaultCriterias'];\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\tif(!empty($this->formFilters)) {\n\t\t\t\t// get filter values from form\n\t\t\t\t$this->formFilters->handleCriterias($this->requestParams, array('defaults' => $defaults));\n\t\t\t\t$criteriaSet = $this->formFilters->getCriteriaSet();\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$criteriaSet = new \\rk\\db\\criteriaSet($defaults);\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\tif($criteriaSet->hasCriterias()) {\n\t\t\t\t// we give applied criterias to the pager so that he can build URLs properly \n\t\t\t\t$this->JSParams['oAdvancedCriterias'] = $criteriaSet->getJSONFormatted();\n\t\t\t}\n\t\t\t\n\t\t\tif (!empty($this->forcedCriterias)) {\n\t\t\t\t// forcedCriterias are always applied, but must not appear in the summary\n\t\t\t\tforeach ($this->forcedCriterias as $oneKey => $oneCriteria) {\n\t\t\t\t\t$criteriaSet->add($oneKey, $oneCriteria);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($this->requestParams['orderSort']) && !empty($this->requestParams['orderColumn'])) {\n\t\t\t\t// get the sort order from request\n\t\t\t\t$this->params['orderColumn'] = $this->requestParams['orderColumn'];\n\t\t\t\t$this->params['orderSort'] = $this->requestParams['orderSort'];\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->isSortable()) {\n\t\t\t\t// if pager has a sortable JS widget, we force the sort to its column\n\t\t\t\t$this->params['orderColumn'] = $this->sortableField;\n\t\t\t\t$this->params['orderSort'] = 'asc';\n\t\t\t}\n\n\t\t\t$method = $this->tableRetrieveMethod;\t\n\t\n\t\t\t$this->data = $table->$method($criteriaSet, $this->params);\n\n\t\t\tif ($this->displayPagination) {\n\t\t\t\t$this->nbMatches = $table->getCount($criteriaSet, $this->params);\n\t\t\t}\n\t\t} \n\t\t//data already given via setParam\n\t\telse {\n\t\t\tif ($this->displayPagination) {\n\t\t\t\t$this->nbMatches = count($this->data);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($this->displayPagination) {\n\t\t\t$this->nbPages = ceil($this->nbMatches / $this->nbItemsPerPage);\n\t\t}\t\t\n\t\t\n\t\tif(!empty($this->params['page'])) {\n\t\t\t$this->currentPage = $this->params['page'];\n\t\t}\n\t}", "title": "" }, { "docid": "d0a7c7e062ab6e8f30fb262ecfd4213f", "score": "0.5740918", "text": "public function bindingsData(){\r\n\t\t\t//Estados de un pedido//\r\n\t\t\t$resultado = $this->computeSQL(\"DESCRIBE pedidos estado;\");\r\n\t\t\t$rows = $this->oSystem->getConnection()->getColumnas($resultado);\r\n\t\t\t$row = explode(\",\",preg_replace(\"/^,/\",\"\",preg_replace(\"/,$/\",\"\",preg_replace(\"/PRESUPUESTO/\",\"\",preg_replace(\"/XXX/\",\"\",preg_replace(\"/'/\",\"\",preg_replace(\"/\\)/\",\"\",preg_replace(\"/enum\\(/\",\"\",$rows[Type]))))))));\r\n\t\t\t$this->oSystem->getDataTemplate()->addData('estados',$row);\r\n\r\n\t\t}", "title": "" }, { "docid": "5adaa3eadbc6dfa001cdcf4dcbf0f646", "score": "0.572823", "text": "protected function grid()\n {\n $grid = new Grid(new Customer);\n\n $grid->model()->orderBy('updated_at', 'desc');\n\n $grid->id('ID');\n $grid->email('Email');\n $grid->telephone('手機');\n // $grid->account('帳號/手機');\n // $grid->password('密碼');\n $grid->firstname('名字');\n $grid->lastname('姓氏');\n $grid->status('狀態')->select([\n '0' => '待啟用',\n '1' => '正常',\n '4' => '停用',\n ]);\n $grid->doctor_profile('醫生執照號碼');\n // $grid->doctor_profile_image_id('醫生執照圖檔')->display(function($id) {\n // return '<img style=\"max-height: 45px; max-width: 90px;\" src=\"/api/image/'.$id.'\">';\n // });\n\n $grid->doctor_profile_image_id('醫生執照圖檔')->display(function($id){\n return '/api/image/'.$id;\n })->lightbox([\n 'server' => 'http://'.$_SERVER['SERVER_ADDR'],\n 'height' => 80,\n 'width' => 160,\n ]);\n\n // $grid->doctor_profile_image_id('醫生執照圖檔')->lightbox([\n // 'server' => 'http://'.$_SERVER['SERVER_ADDR'],\n // ])->display(function($id){\n // return '/api/image/'.$id;\n // });\n\n // $grid->doctor_clinic('醫生診所執照號');\n // $grid->doctor_clinic_image_id('醫生診所執照圖檔')->display(function($id) {\n // return '<img style=\"max-height: 45px; max-width: 90px;\" src=\"/api/image/'.$id.'\">';\n // });;\n \n // $grid->created_at('創建時間');\n $grid->updated_at('最後更新')->sortable();\n $grid->created_at('註冊時間')->sortable();\n\n $grid->filter(function($filter){\n\n $filter->like('email', 'Email');\n $filter->like('telephone', '手機');\n $filter->like('firstname', '名字');\n $filter->like('lastname', '姓氏');\n \n });\n\n return $grid;\n }", "title": "" }, { "docid": "ea7b20448b70611c1debedf42ad2cc22", "score": "0.57108337", "text": "public function grid_data()\n\t{\n\t\t\t\n\t\t\t\t$this->db->where('idtingkat',$this->input->get('tingkat'));\n\t\t\t\n\t\t\t\t$this->db->where('idsemester',$this->input->get('semester'));\n\t\t\t\n\t\t\t\t$this->db->where('idpelajaran',$this->input->get('pelajaran'));\n\t\t\t\n\t\t\t$result = $this->db->get(\"rpp\")->result();\n\t\t\t$this->M_API->JSON($result);\n\t\t\t//$this->M_jqxgrid->read();\n\t}", "title": "" }, { "docid": "7dbd92c66fa435610e043c55231553de", "score": "0.5647446", "text": "public function acceptDatasource();", "title": "" }, { "docid": "4274a5f84cb446dce191c99e0ab015e0", "score": "0.562251", "text": "public function dbGrid() {\n\n $view = new View();\n\n $view->setVariable('id', $this->id);\n $view->setVariable('showTitles', $this->dbGridShowHeader);\n $view->setVariable('rowAction', $this->gridRowLink['action']);\n $view->setVariable('rowFieldId', $this->gridRowLink['fieldId']);\n\n if ($this->dbGridAutoHeader) {\n $this->dbGridColumns = array();\n foreach ($this->getRow(0) as $field => $value) {\n $this->addGridColumn(ucwords(String::decamelize($field)), $field);\n }\n }\n\n $view->setVariable('head', $this->dbGridColumns);\n $view->setVariable('gridClass', $this->gridClass);\n $view->setVariable('content', $this->dataset);\n $view->loadTemplate($this->dbGridTemplate);\n\n return $view->render();\n\n }", "title": "" }, { "docid": "d7086991b9d8180309dcd60ce9e83c80", "score": "0.56047887", "text": "public function grid_data()\n\t{\n\t\tif($this->input->post(\"filter\")==\"false\")\n\t\t{\n\n\t\t\t$this->db->where(\"departemen\",$this->input->post(\"departemen\"));\n\t\t\t$this->db->where(\"idtahunajaran\",$this->input->post(\"idtahunajaran\"));\n\t\t\t$this->db->where(\"idkelas\",$this->input->post(\"idkelas\"));\n\t\t\t$result = $this->db->get('v_siswa')->result();\n\t\t}else{\n\t\t\t$result = $this->db->query(\"call v_filtersiswa('{$this->input->post(\"field\")}','{$this->input->post(\"keywords\")}');\")->result();\n\t\t}\n\t\t$this->M_API->JSON($result);\n\t}", "title": "" }, { "docid": "4883fe18a92421f6bf648297830a16d4", "score": "0.5585935", "text": "protected function grid()\n {\n $grid = new Grid(new QueryItem());\n\n $grid->column('id', __('ID'));\n $grid->column('title', __('标题'))->width(160);\n $grid->column('page', __('页面路径'))->width(160);\n $grid->column('argc', __('所需参数'))->display(function ($argc) {\n $argcs = explode(' ', $argc);\n $argcs_show = '';\n\n foreach ($argcs as $item)\n $argcs_show .= $item . '<br>';\n \n return $argcs_show;\n })->width(80);\n // ->editable('textarea')->width(160);\n // $grid->column('argc', __('所需参数'))->width(270);\n $grid->column('example', __('参数示例值'))->display(function ($example) {\n $examples = explode(' ', $example);\n $examples_show = '';\n\n foreach ($examples as $item)\n $examples_show .= $item . '<br>';\n \n return $examples_show;\n })->width(200);\n \n \n $grid->column('origin_price', __('原价'))->editable();\n $grid->column('price', __('价格'))->editable();\n\n $grid->column('service', __('服务名称'))->help('诚数科技的业务服务名称')->width(160);\n\n \n // $grid->column('fee', __('调用费'))->help('有些接口每次调用的费用取决于具体车型!')->width(100);\n // $grid->column('count', __('调用次数'))->width(100);\n $grid->column('consume', __('消费'))->display(function () {\n return $this->fee * $this->count;\n return 0;\n })->width(100);\n $grid->column('pay_title', __('支付标题'))->editable()->help('当用户支付时显示的标题');\n\n return $grid;\n }", "title": "" }, { "docid": "5c030efdd420c40abba5d64118c7eff7", "score": "0.5581484", "text": "protected function grid()\n {\n\n $grid = new Grid(new PointLogs());\n\n $url = app('request')->getRequestUri();\n $url = parse_url($url, PHP_URL_QUERY);\n if(!is_null($url) and $url != '_pjax=%23pjax-container'){\n var_dump($url);\n parse_str($url, $q);\n $grid->model()->getFilter($q);\n }\n\n $grid->disableExport();\n\n $grid->column('id', __('ID'));\n $grid->column('created_at', __('申請日時'))->date('Y-m-d H:i:s');\n $grid->column('updated_at', __('更新日時'))->date('Y-m-d H:i:s');\n $grid->column('categories', __('CATEGORIES'))->display(function () {\n\n if($this->categories == 'deposit'){\n $r = '入金';\n }\n if($this->categories == 'withdrawal'){\n $r = '出金';\n }\n return $r;\n });\n $grid->column('status', __('STATUS'))->display(function () {\n\n if($this->status == 'untreated'){\n $r = '申請中';\n }\n if($this->status == 'processed'){\n $r = '手続き完了';\n }\n return $r;\n });;\n $grid->column('point', __('POINT'));\n\n // ポイントの合計最新行を取得\n $grid->tools(function ($tools) {\n $points_untreated = PointLogs::getTotal();\n $sum_points = Points::getTotal();\n $tools->append('<div style=\"margin-top:30px;\">保有ポイント:'.$sum_points.'</div>'.'<div class=\"untreatedpoint\">申請中のポイント:'.$points_untreated.'</div>');\n });\n\n // filter\n $grid->filter(function ($filter) {\n $filter->column(1/2, function ($filter){\n\n $filter->disableIdFilter();\n $filter->like('id', 'ID');\n $filter->between('created_at', '登録日時')->date('Y-m-d H:i:s');\n });\n });\n\n return $grid;\n }", "title": "" }, { "docid": "e1c1bce55712800d3ff83c7fb0cb6bc4", "score": "0.5568332", "text": "protected function getDataProvider()\n {\n return $this->objectManager->getDataProvider();\n }", "title": "" }, { "docid": "cad33ddacc703f74620e5d5afba35647", "score": "0.5568238", "text": "public function getDataProvider()\n {\n $dataProvider = null;\n $kd_penerimaan_1 = '%';\n $kd_penerimaan_2 = '%';\n IF($this->Kd_Sumber <> NULL){\n list($kd_penerimaan_1, $kd_penerimaan_2) = explode('.', $this->Kd_Sumber);\n IF($kd_penerimaan_1 == 0) $kd_penerimaan_1 = '%';\n IF($kd_penerimaan_2 == 0) $kd_penerimaan_2 = '%';\n }\n \n switch ($this->Kd_Laporan) {\n case 1:\n $totalCount = Yii::$app->db->createCommand(\"\n SELECT\n COUNT(b.id)\n FROM\n ref_unit AS b\n LEFT JOIN (SELECT * FROM ta_rkas_peraturan a WHERE a.tahun = :tahun AND a.perubahan_id LIKE :perubahan_id) AS a ON a.unit_id = b.id\n \", [\n ':tahun' => $this->tahun,\n // ':pendidikan_id' => $this->pendidikan_id,\n ':perubahan_id' => $this->perubahan_id,\n ])->queryScalar();\n\n $data = new SqlDataProvider([\n 'sql' => \"\n SELECT\n a.tahun,\n a.unit_id,\n b.nama_unit,\n a.no_peraturan,\n a.tgl_peraturan,\n a.verifikasi\n FROM\n ref_unit AS b\n LEFT JOIN (SELECT * FROM ta_rkas_peraturan a WHERE a.tahun = :tahun AND a.perubahan_id LIKE :perubahan_id) AS a ON a.unit_id = b.id\n ORDER BY a.unit_id, a.perubahan_id, a.tgl_peraturan ASC\n \",\n 'params' => [\n ':tahun' => $this->tahun,\n // ':pendidikan_id' => $this->pendidikan_id,\n ':perubahan_id' => $this->perubahan_id,\n ],\n 'totalCount' => $totalCount,\n //'sort' =>false, to remove the table header sorting\n 'pagination' => [\n 'pageSize' => 50,\n ],\n ]); \n $render = 'laporan1';\n break;\n case 2:\n $totalCount = Yii::$app->db->createCommand(\"\n SELECT COUNT(a.tahun) FROM\n (\n SELECT\n a.tahun, c.nama_unit, a.unit_id, a.perubahan_id, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5,\n j.Nm_Rek_1, i.Nm_Rek_2, h.Nm_Rek_3, g.Nm_Rek_4, f.Nm_Rek_5, SUM(a.total) AS total\n FROM ta_rkas_history AS a\n INNER JOIN ta_rkas_peraturan AS b ON a.tahun = b.tahun AND a.unit_id = b.unit_id AND a.perubahan_id = b.perubahan_id\n INNER JOIN ref_rek_5 AS f ON a.Kd_Rek_1 = f.Kd_Rek_1 AND a.Kd_Rek_2 = f.Kd_Rek_2 AND a.Kd_Rek_3 = f.Kd_Rek_3 AND a.Kd_Rek_4 = f.Kd_Rek_4 AND a.Kd_Rek_5 = f.Kd_Rek_5\n INNER JOIN ref_rek_4 AS g ON f.Kd_Rek_1 = g.Kd_Rek_1 AND f.Kd_Rek_2 = g.Kd_Rek_2 AND f.Kd_Rek_3 = g.Kd_Rek_3 AND f.Kd_Rek_4 = g.Kd_Rek_4\n INNER JOIN ref_rek_3 AS h ON g.Kd_Rek_1 = h.Kd_Rek_1 AND g.Kd_Rek_2 = h.Kd_Rek_2 AND g.Kd_Rek_3 = h.Kd_Rek_3\n INNER JOIN ref_unit AS c ON b.unit_id = c.id\n INNER JOIN ref_rek_2 AS i ON h.Kd_Rek_1 = i.Kd_Rek_1 AND h.Kd_Rek_2 = i.Kd_Rek_2\n INNER JOIN ref_rek_1 AS j ON i.Kd_Rek_1 = j.Kd_Rek_1\n WHERE a.tahun = :tahun AND a.perubahan_id LIKE :perubahan_id AND a.kd_penerimaan_1 LIKE :kd_penerimaan_1 AND a.kd_penerimaan_2 LIKE :kd_penerimaan_2\n GROUP BY a.tahun, c.nama_unit, a.unit_id, a.perubahan_id, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5,\n j.Nm_Rek_1, i.Nm_Rek_2, h.Nm_Rek_3, g.Nm_Rek_4, f.Nm_Rek_5\n ORDER BY a.unit_id, a.perubahan_id, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5 ASC\n ) a\n \", [\n ':tahun' => $this->tahun,\n ':perubahan_id' => $this->perubahan_id,\n ':kd_penerimaan_1' => $kd_penerimaan_1,\n ':kd_penerimaan_2' => $kd_penerimaan_2,\n // ':pendidikan_id' => $this->pendidikan_id,\n ])->queryScalar();\n\n $data = new SqlDataProvider([\n 'sql' => \"\n SELECT\n a.tahun, c.nama_unit, a.unit_id, a.perubahan_id, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5,\n j.Nm_Rek_1, i.Nm_Rek_2, h.Nm_Rek_3, g.Nm_Rek_4, f.Nm_Rek_5, SUM(a.total) AS total\n FROM ta_rkas_history AS a\n INNER JOIN ta_rkas_peraturan AS b ON a.tahun = b.tahun AND a.unit_id = b.unit_id AND a.perubahan_id = b.perubahan_id\n INNER JOIN ref_rek_5 AS f ON a.Kd_Rek_1 = f.Kd_Rek_1 AND a.Kd_Rek_2 = f.Kd_Rek_2 AND a.Kd_Rek_3 = f.Kd_Rek_3 AND a.Kd_Rek_4 = f.Kd_Rek_4 AND a.Kd_Rek_5 = f.Kd_Rek_5\n INNER JOIN ref_rek_4 AS g ON f.Kd_Rek_1 = g.Kd_Rek_1 AND f.Kd_Rek_2 = g.Kd_Rek_2 AND f.Kd_Rek_3 = g.Kd_Rek_3 AND f.Kd_Rek_4 = g.Kd_Rek_4\n INNER JOIN ref_rek_3 AS h ON g.Kd_Rek_1 = h.Kd_Rek_1 AND g.Kd_Rek_2 = h.Kd_Rek_2 AND g.Kd_Rek_3 = h.Kd_Rek_3\n INNER JOIN ref_unit AS c ON b.unit_id = c.id\n INNER JOIN ref_rek_2 AS i ON h.Kd_Rek_1 = i.Kd_Rek_1 AND h.Kd_Rek_2 = i.Kd_Rek_2\n INNER JOIN ref_rek_1 AS j ON i.Kd_Rek_1 = j.Kd_Rek_1\n WHERE a.tahun = :tahun AND a.perubahan_id LIKE :perubahan_id AND a.kd_penerimaan_1 LIKE :kd_penerimaan_1 AND a.kd_penerimaan_2 LIKE :kd_penerimaan_2\n GROUP BY a.tahun, c.nama_unit, a.unit_id, a.perubahan_id, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5,\n j.Nm_Rek_1, i.Nm_Rek_2, h.Nm_Rek_3, g.Nm_Rek_4, f.Nm_Rek_5\n ORDER BY a.unit_id, a.perubahan_id, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5 ASC\n \",\n 'params' => [\n ':tahun' => $this->tahun,\n ':perubahan_id' => $this->perubahan_id,\n ':kd_penerimaan_1' => $kd_penerimaan_1,\n ':kd_penerimaan_2' => $kd_penerimaan_2,\n // ':pendidikan_id' => $this->pendidikan_id,\n ],\n 'totalCount' => $totalCount,\n //'sort' =>false, to remove the table header sorting\n 'pagination' => [\n 'pageSize' => 50,\n ],\n ]); \n $render = 'laporan2';\n break; \n case 3:\n $totalCount = Yii::$app->db->createCommand(\"\n SELECT COUNT(a.nama_unit) FROM\n (\n SELECT\n b.nama_unit,\n a.tahun,\n a.unit_id,\n a.no_spj,\n a.tgl_spj,\n a.keterangan\n FROM ref_unit AS b\n LEFT JOIN (SELECT * FROM ta_spj WHERE tahun = :tahun AND tgl_spj >= :Tgl_1 AND tgl_spj <= :Tgl_2 AND kd_sah = 2) a ON a.unit_id = b.id\n ) a\n \", [\n ':tahun' => $this->tahun,\n ':Tgl_1' => $this->Tgl_1,\n ':Tgl_2' => $this->Tgl_2,\n // ':pendidikan_id' => $this->pendidikan_id,\n ])->queryScalar();\n\n $data = new SqlDataProvider([\n 'sql' => \"\n SELECT\n b.nama_unit,\n a.tahun,\n a.unit_id,\n a.no_spj,\n a.tgl_spj,\n a.keterangan\n FROM ref_unit AS b\n LEFT JOIN (SELECT * FROM ta_spj WHERE tahun = :tahun AND tgl_spj >= :Tgl_1 AND tgl_spj <= :Tgl_2 AND kd_sah = 2) a ON a.unit_id = b.id\n \",\n 'params' => [\n ':tahun' => $this->tahun,\n ':Tgl_1' => $this->Tgl_1,\n ':Tgl_2' => $this->Tgl_2,\n // ':pendidikan_id' => $this->pendidikan_id,\n ],\n 'totalCount' => $totalCount,\n //'sort' =>false, to remove the table header sorting\n 'pagination' => [\n 'pageSize' => 50,\n ],\n ]); \n $render = 'laporan3';\n break; \n case 4:\n $totalCount = Yii::$app->db->createCommand(\"\n SELECT COUNT(a.tahun) FROM\n ( \n SELECT\n a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, SUM(a.total) AS anggaran\n FROM\n ta_rkas_history a\n WHERE a.tahun = :tahun AND a.unit_id = :unit_id AND a.perubahan_id = :perubahan_id\n AND IFNULL(a.kd_penerimaan_1, '') LIKE :kd_penerimaan_1 AND IFNULL(a.kd_penerimaan_2, '') LIKE :kd_penerimaan_2\n GROUP BY a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1\n ) a\n \", [\n ':tahun' => $this->tahun,\n ':unit_id' => Yii::$app->user->identity->unit_id,\n ':perubahan_id' => $this->perubahan_id,\n ':kd_penerimaan_1' => $kd_penerimaan_1,\n ':kd_penerimaan_2' => $kd_penerimaan_2,\n ])->queryScalar();\n\n $data = new SqlDataProvider([\n 'sql' => \"\n\n SELECT a.tahun, a.unit_id, a.kd_program, c.uraian_program, a.kd_sub_program, d.uraian_sub_program, a.kd_kegiatan, e.uraian_kegiatan, a.Kd_Rek_1, a.anggaran,\n IFNULL(f.nilai,0) AS rutin, IFNULL(g.nilai,0) AS bos_pusat, IFNULL(j.nilai,0) AS bos_provinsi, IFNULL(k.nilai,0) AS bos_lain, IFNULL(h.nilai,0) AS bantuan, IFNULL(i.nilai,0) AS lain\n FROM\n (\n SELECT\n a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, SUM(a.total) AS anggaran\n FROM\n ta_rkas_history a\n WHERE a.tahun = :tahun AND a.unit_id = :unit_id AND a.perubahan_id = :perubahan_id\n AND IFNULL(a.kd_penerimaan_1, '') LIKE :kd_penerimaan_1 AND IFNULL(a.kd_penerimaan_2, '') LIKE :kd_penerimaan_2\n GROUP BY a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1\n ) a \n -- Untuk realisasi Rutin 2\n LEFT JOIN\n (\n SELECT\n a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, SUM(a.nilai) AS nilai\n FROM\n ta_spj_rinc AS a\n LEFT JOIN\n (\n SELECT \n a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5, a.kd_penerimaan_1, a.kd_penerimaan_2\n FROM ta_rkas_history a \n WHERE a.tahun = :tahun AND a.unit_id = :unit_id AND a.perubahan_id = (SELECT MAX(perubahan_id) FROM ta_rkas_peraturan WHERE tahun = :tahun AND unit_id = 1)\n AND a.kd_penerimaan_1 = 2\n GROUP BY a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5, a.kd_penerimaan_1, a.kd_penerimaan_2\n ) b ON a.tahun = b.tahun AND a.unit_id = b.unit_id AND a.kd_program = b.kd_program AND a.kd_sub_program = b.kd_sub_program AND a.kd_kegiatan = b.kd_kegiatan \n AND a.Kd_Rek_1 = b.Kd_Rek_1 AND a.Kd_Rek_2 = b.Kd_Rek_2 AND a.Kd_Rek_3 = b.Kd_Rek_3 AND a.Kd_Rek_4 = b.Kd_Rek_4 AND a.Kd_Rek_5 = b.Kd_Rek_5\n WHERE a.tahun = :tahun AND a.unit_id = :unit_id AND a.tgl_bukti <= :tgl_2 AND a.tgl_bukti >= :tgl_1 AND b.kd_penerimaan_1 = 2\n GROUP BY a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1\n ) f ON a.tahun = f.tahun AND a.unit_id = f.unit_id AND a.kd_program = f.kd_program AND a.kd_sub_program = f.kd_sub_program AND a.kd_kegiatan = f.kd_kegiatan AND a.Kd_Rek_1 = f.Kd_Rek_1\n -- Untuk realisasi BOS pusat 3-1\n LEFT JOIN\n (\n SELECT\n a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, SUM(a.nilai) AS nilai\n FROM\n ta_spj_rinc AS a\n LEFT JOIN\n (\n SELECT \n a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5, a.kd_penerimaan_1, a.kd_penerimaan_2\n FROM ta_rkas_history a \n WHERE a.tahun = :tahun AND a.unit_id = :unit_id AND a.perubahan_id = (SELECT MAX(perubahan_id) FROM ta_rkas_peraturan WHERE tahun = :tahun AND unit_id = 1)\n AND a.kd_penerimaan_1 = 3 AND a.kd_penerimaan_2 = 1\n GROUP BY a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5, a.kd_penerimaan_1, a.kd_penerimaan_2\n ) b ON a.tahun = b.tahun AND a.unit_id = b.unit_id AND a.kd_program = b.kd_program AND a.kd_sub_program = b.kd_sub_program AND a.kd_kegiatan = b.kd_kegiatan \n AND a.Kd_Rek_1 = b.Kd_Rek_1 AND a.Kd_Rek_2 = b.Kd_Rek_2 AND a.Kd_Rek_3 = b.Kd_Rek_3 AND a.Kd_Rek_4 = b.Kd_Rek_4 AND a.Kd_Rek_5 = b.Kd_Rek_5\n WHERE a.tahun = :tahun AND a.unit_id = :unit_id AND a.tgl_bukti <= :tgl_2 AND a.tgl_bukti >= :tgl_1 AND b.kd_penerimaan_1 = 3 AND b.kd_penerimaan_2 = 1\n GROUP BY a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1\n ) g ON a.tahun = g.tahun AND a.unit_id = g.unit_id AND a.kd_program = g.kd_program AND a.kd_sub_program = g.kd_sub_program AND a.kd_kegiatan = g.kd_kegiatan AND a.Kd_Rek_1 = g.Kd_Rek_1\n -- Untuk realisasi bantuan 4\n LEFT JOIN\n (\n SELECT\n a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, SUM(a.nilai) AS nilai\n FROM\n ta_spj_rinc AS a\n LEFT JOIN\n (\n SELECT \n a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5, a.kd_penerimaan_1, a.kd_penerimaan_2\n FROM ta_rkas_history a \n WHERE a.tahun = :tahun AND a.unit_id = :unit_id AND a.perubahan_id = (SELECT MAX(perubahan_id) FROM ta_rkas_peraturan WHERE tahun = :tahun AND unit_id = 1)\n AND a.kd_penerimaan_1 = 4\n GROUP BY a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5, a.kd_penerimaan_1, a.kd_penerimaan_2\n ) b ON a.tahun = b.tahun AND a.unit_id = b.unit_id AND a.kd_program = b.kd_program AND a.kd_sub_program = b.kd_sub_program AND a.kd_kegiatan = b.kd_kegiatan \n AND a.Kd_Rek_1 = b.Kd_Rek_1 AND a.Kd_Rek_2 = b.Kd_Rek_2 AND a.Kd_Rek_3 = b.Kd_Rek_3 AND a.Kd_Rek_4 = b.Kd_Rek_4 AND a.Kd_Rek_5 = b.Kd_Rek_5\n WHERE a.tahun = :tahun AND a.unit_id = :unit_id AND a.tgl_bukti <= :tgl_2 AND a.tgl_bukti >= :tgl_1 AND b.kd_penerimaan_1 = 4\n GROUP BY a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1\n ) h ON a.tahun = h.tahun AND a.unit_id = h.unit_id AND a.kd_program = h.kd_program AND a.kd_sub_program = h.kd_sub_program AND a.kd_kegiatan = h.kd_kegiatan AND a.Kd_Rek_1 = h.Kd_Rek_1\n -- untuk realisasi sumber lainnya 5\n LEFT JOIN\n (\n SELECT\n a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, SUM(a.nilai) AS nilai\n FROM\n ta_spj_rinc AS a\n LEFT JOIN\n (\n SELECT \n a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5, a.kd_penerimaan_1, a.kd_penerimaan_2\n FROM ta_rkas_history a \n WHERE a.tahun = :tahun AND a.unit_id = :unit_id AND a.perubahan_id = (SELECT MAX(perubahan_id) FROM ta_rkas_peraturan WHERE tahun = :tahun AND unit_id = 1)\n AND a.kd_penerimaan_1 NOT IN (1,2,3,4)\n GROUP BY a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5, a.kd_penerimaan_1, a.kd_penerimaan_2\n ) b ON a.tahun = b.tahun AND a.unit_id = b.unit_id AND a.kd_program = b.kd_program AND a.kd_sub_program = b.kd_sub_program AND a.kd_kegiatan = b.kd_kegiatan \n AND a.Kd_Rek_1 = b.Kd_Rek_1 AND a.Kd_Rek_2 = b.Kd_Rek_2 AND a.Kd_Rek_3 = b.Kd_Rek_3 AND a.Kd_Rek_4 = b.Kd_Rek_4 AND a.Kd_Rek_5 = b.Kd_Rek_5\n WHERE a.tahun = :tahun AND a.unit_id = :unit_id AND a.tgl_bukti <= :tgl_2 AND a.tgl_bukti >= :tgl_1 AND b.kd_penerimaan_1 NOT IN (1,2,3,4)\n GROUP BY a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1\n ) i ON a.tahun = i.tahun AND a.unit_id = i.unit_id AND a.kd_program = i.kd_program AND a.kd_sub_program = i.kd_sub_program AND a.kd_kegiatan = i.kd_kegiatan AND a.Kd_Rek_1 = i.Kd_Rek_1\n -- Untuk realisasi BOS provinsi 3-2\n LEFT JOIN\n (\n SELECT\n a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, SUM(a.nilai) AS nilai\n FROM\n ta_spj_rinc AS a\n LEFT JOIN\n (\n SELECT \n a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5, a.kd_penerimaan_1, a.kd_penerimaan_2\n FROM ta_rkas_history a \n WHERE a.tahun = :tahun AND a.unit_id = :unit_id AND a.perubahan_id = (SELECT MAX(perubahan_id) FROM ta_rkas_peraturan WHERE tahun = :tahun AND unit_id = 1)\n AND a.kd_penerimaan_1 = 3 AND a.kd_penerimaan_2 = 2\n GROUP BY a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5, a.kd_penerimaan_1, a.kd_penerimaan_2\n ) b ON a.tahun = b.tahun AND a.unit_id = b.unit_id AND a.kd_program = b.kd_program AND a.kd_sub_program = b.kd_sub_program AND a.kd_kegiatan = b.kd_kegiatan \n AND a.Kd_Rek_1 = b.Kd_Rek_1 AND a.Kd_Rek_2 = b.Kd_Rek_2 AND a.Kd_Rek_3 = b.Kd_Rek_3 AND a.Kd_Rek_4 = b.Kd_Rek_4 AND a.Kd_Rek_5 = b.Kd_Rek_5\n WHERE a.tahun = :tahun AND a.unit_id = :unit_id AND a.tgl_bukti <= :tgl_2 AND a.tgl_bukti >= :tgl_1 AND b.kd_penerimaan_1 = 3 AND b.kd_penerimaan_2 = 2\n GROUP BY a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1\n ) j ON a.tahun = j.tahun AND a.unit_id = j.unit_id AND a.kd_program = j.kd_program AND a.kd_sub_program = j.kd_sub_program AND a.kd_kegiatan = j.kd_kegiatan AND a.Kd_Rek_1 = j.Kd_Rek_1\n -- Untuk realisasi BOS kab/kota 3-x\n LEFT JOIN\n (\n SELECT\n a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, SUM(a.nilai) AS nilai\n FROM\n ta_spj_rinc AS a\n LEFT JOIN\n (\n SELECT \n a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5, a.kd_penerimaan_1, a.kd_penerimaan_2\n FROM ta_rkas_history a \n WHERE a.tahun = :tahun AND a.unit_id = :unit_id AND a.perubahan_id = (SELECT MAX(perubahan_id) FROM ta_rkas_peraturan WHERE tahun = :tahun AND unit_id = 1)\n AND a.kd_penerimaan_1 = 3 AND a.kd_penerimaan_2 > 2\n GROUP BY a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1, a.Kd_Rek_2, a.Kd_Rek_3, a.Kd_Rek_4, a.Kd_Rek_5, a.kd_penerimaan_1, a.kd_penerimaan_2\n ) b ON a.tahun = b.tahun AND a.unit_id = b.unit_id AND a.kd_program = b.kd_program AND a.kd_sub_program = b.kd_sub_program AND a.kd_kegiatan = b.kd_kegiatan \n AND a.Kd_Rek_1 = b.Kd_Rek_1 AND a.Kd_Rek_2 = b.Kd_Rek_2 AND a.Kd_Rek_3 = b.Kd_Rek_3 AND a.Kd_Rek_4 = b.Kd_Rek_4 AND a.Kd_Rek_5 = b.Kd_Rek_5\n WHERE a.tahun = :tahun AND a.unit_id = :unit_id AND a.tgl_bukti <= :tgl_2 AND a.tgl_bukti >= :tgl_1 AND b.kd_penerimaan_1 = 3 AND b.kd_penerimaan_2 > 2\n GROUP BY a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1\n ) k ON a.tahun = k.tahun AND a.unit_id = k.unit_id AND a.kd_program = k.kd_program AND a.kd_sub_program = k.kd_sub_program AND a.kd_kegiatan = k.kd_kegiatan AND a.Kd_Rek_1 = k.Kd_Rek_1\n LEFT JOIN ref_program c ON a.kd_program = c.kd_program\n LEFT JOIN ref_sub_program d ON a.kd_program = d.kd_program AND a.kd_sub_program = d.kd_sub_program\n LEFT JOIN ref_kegiatan e ON a.kd_program = e.kd_program AND a.kd_sub_program = e.kd_sub_program AND a.kd_kegiatan = e.kd_kegiatan\n ORDER BY a.tahun, a.unit_id, a.kd_program, a.kd_sub_program, a.kd_kegiatan, a.Kd_Rek_1 ASC;\n\n \",\n 'params' => [\n ':tahun' => $this->tahun,\n ':unit_id' => Yii::$app->user->identity->unit_id,\n ':perubahan_id' => $this->perubahan_id,\n ':kd_penerimaan_1' => $kd_penerimaan_1,\n ':kd_penerimaan_2' => $kd_penerimaan_2,\n ':tgl_1' => $this->Tgl_1,\n ':tgl_2' => $this->Tgl_2,\n ],\n 'totalCount' => $totalCount,\n //'sort' =>false, to remove the table header sorting\n 'pagination' => [\n 'pageSize' => 50,\n ],\n ]); \n\n $render = 'laporan6';\n break; \n \n case 5:\n $totalCount = Yii::$app->db->createCommand(\"\n SELECT COUNT(a.tahun) AS tahun\n FROM ta_sp3b a\n WHERE a.tahun = :tahun AND a.status = 2 AND a.tgl_sp3b <= :tgl_2 AND a.tgl_sp3b >= :tgl_1\n \", [\n ':tahun' => $this->tahun,\n ':tgl_1' => $this->Tgl_1,\n ':tgl_2' => $this->Tgl_2,\n ])->queryScalar();\n\n $data = new SqlDataProvider([\n 'sql' => \"\n SELECT a.no_sp3b, a.tgl_sp3b, b.no_sp2b, b.tgl_sp2b, a.keterangan\n FROM ta_sp3b a \n LEFT JOIN ta_sp2b b ON a.tahun = b.tahun AND a.no_sp3b = b.no_sp3b\n WHERE a.tahun = :tahun AND a.status = 2 AND a.tgl_sp3b <= :tgl_2 AND a.tgl_sp3b >= :tgl_1 \n \",\n 'params' => [\n ':tahun' => $this->tahun,\n ':tgl_1' => $this->Tgl_1,\n ':tgl_2' => $this->Tgl_2,\n ],\n 'totalCount' => $totalCount,\n //'sort' =>false, to remove the table header sorting\n 'pagination' => [\n 'pageSize' => 50,\n ],\n ]); \n $render = 'laporan5';\n break;\n case 6:\n $totalCount = Yii::$app->db->createCommand(\"\n SELECT COUNT(a.unit_id) FROM(\n SELECT a.unit_id, a.nama_unit, SUM(a.bank) AS bank, SUM(a.tunai) AS tunai\n FROM\n (\n SELECT a.unit_id, b.nama_unit,\n CASE\n WHEN pembayaran = 1 THEN nilai\n ELSE 0\n END AS bank,\n CASE\n WHEN pembayaran = 2 THEN nilai\n ELSE 0\n END AS tunai\n \n FROM ta_saldo_awal a\n INNER JOIN ref_unit b ON a.unit_id = b.id\n WHERE a.tahun = :tahun AND a.kd_penerimaan_1 LIKE :kd_penerimaan_1 AND a.kd_penerimaan_2 LIKE :kd_penerimaan_2\n ) a GROUP BY a.unit_id, a.nama_unit ORDER BY a.nama_unit ASC \n )a\n \", [\n ':tahun' => $this->tahun,\n ':kd_penerimaan_1' => $kd_penerimaan_1,\n ':kd_penerimaan_2' => $kd_penerimaan_2\n ])->queryScalar();\n\n $data = new SqlDataProvider([\n 'sql' => \"\n SELECT a.unit_id, a.nama_unit, SUM(a.bank) AS bank, SUM(a.tunai) AS tunai\n FROM\n (\n SELECT a.unit_id, b.nama_unit,\n CASE\n WHEN pembayaran = 1 THEN nilai\n ELSE 0\n END AS bank,\n CASE\n WHEN pembayaran = 2 THEN nilai\n ELSE 0\n END AS tunai\n \n FROM ta_saldo_awal a\n INNER JOIN ref_unit b ON a.unit_id = b.id\n WHERE a.tahun = :tahun AND a.kd_penerimaan_1 LIKE :kd_penerimaan_1 AND a.kd_penerimaan_2 LIKE :kd_penerimaan_2\n ) a GROUP BY a.unit_id, a.nama_unit ORDER BY a.nama_unit ASC \n \",\n 'params' => [\n ':tahun' => $this->tahun,\n ':kd_penerimaan_1' => $kd_penerimaan_1,\n ':kd_penerimaan_2' => $kd_penerimaan_2\n ],\n 'totalCount' => $totalCount,\n //'sort' =>false, to remove the table header sorting\n 'pagination' => [\n 'pageSize' => 50,\n ],\n ]); \n $render = 'laporan61';\n break;\n case 7:\n $totalCount = Yii::$app->db->createCommand(\"\n SELECT \n COUNT(a.id)\n FROM ref_unit a\n \", [\n // ':pendidikan_id' => $this->pendidikan_id,\n ])->queryScalar();\n\n $data = new SqlDataProvider([\n 'sql' => \"\n SELECT\n a.id, a.nama_unit,\n b.no_peraturan AS perubahan1,\n c.no_peraturan AS perubahan2,\n d.no_peraturan AS perubahan3,\n e.no_peraturan AS perubahan4,\n f.no_peraturan AS perubahan5,\n g.no_peraturan AS perubahan6\n FROM\n (\n SELECT \n a.id, a.nama_unit\n FROM ref_unit a\n ) a \n LEFT JOIN\n (\n SELECT unit_id, perubahan_id, no_peraturan FROM ta_rkas_peraturan WHERE tahun = :tahun AND perubahan_id = 1\n ) b ON a.id = b.unit_id\n LEFT JOIN\n (\n SELECT unit_id, perubahan_id, no_peraturan FROM ta_rkas_peraturan WHERE tahun = :tahun AND perubahan_id = 2\n ) c ON a.id = c.unit_id\n LEFT JOIN\n (\n SELECT unit_id, perubahan_id, no_peraturan FROM ta_rkas_peraturan WHERE tahun = :tahun AND perubahan_id = 3\n ) d ON a.id = d.unit_id\n LEFT JOIN\n (\n SELECT unit_id, perubahan_id, no_peraturan FROM ta_rkas_peraturan WHERE tahun = :tahun AND perubahan_id = 4\n ) e ON a.id = e.unit_id\n LEFT JOIN\n (\n SELECT unit_id, perubahan_id, no_peraturan FROM ta_rkas_peraturan WHERE tahun = :tahun AND perubahan_id = 5\n ) f ON a.id = f.unit_id\n LEFT JOIN\n (\n SELECT unit_id, perubahan_id, no_peraturan FROM ta_rkas_peraturan WHERE tahun = :tahun AND perubahan_id = 6\n ) g ON a.id = g.unit_id\n \",\n 'params' => [\n ':tahun' => $this->tahun,\n // ':pendidikan_id' => $this->pendidikan_id,\n ],\n 'totalCount' => $totalCount,\n //'sort' =>false, to remove the table header sorting\n 'pagination' => [\n 'pageSize' => 50,\n ],\n ]); \n $render = 'laporan7';\n break; \n default:\n # code...\n break;\n }\n\n return $data;\n }", "title": "" }, { "docid": "34a9fe9b85639266e50f5e420f932d3a", "score": "0.5566421", "text": "public function getDataSource()\n {\n }", "title": "" }, { "docid": "027f2b245c0a444c216f4d7a4fc7f240", "score": "0.55635935", "text": "abstract protected function _getDataStore();", "title": "" }, { "docid": "f67d2e746bf571d35863a6b2da14d5e1", "score": "0.5534547", "text": "public function setDataProvider($dataProvider)\n {\n $this->_dataProvider = $dataProvider;\n return $this;\n }", "title": "" }, { "docid": "11a87caaa7caef1c32d3a2e2779aec64", "score": "0.55253226", "text": "private function LlenarGrid() {\r\n $Usuarios = new UsuariosRecord();\r\n $Usuarios = UsuariosRecord::finder()->FindAll();\r\n\r\n $this->ADGUsuarios->DataSource = $Usuarios;\r\n $this->ADGUsuarios->dataBind();\r\n }", "title": "" }, { "docid": "e35c49379c413ace7c2da1979e870a34", "score": "0.55158055", "text": "private function wrapIntoDataProvider($data)\n {\n return new ArrayDataProvider([\n 'allModels' => $data,\n 'pagination' => false\n ]);\n }", "title": "" }, { "docid": "399c2cc4bd6381fd303010f778334a33", "score": "0.5500121", "text": "public function indexData(Provider $provider)\n {\n $ids = Offer::where('provider_id', $provider->id)->pluck('id');\n $payments = Payment::whereIn('offer_id', $ids)->pluck('offer_id')->toArray();\n\n $offers = Offer::with('country', 'city')->where('provider_id', $provider->id);\n\n $url = url('/backend/providers/offers');\n return Datatables::of($offers)\n ->addColumn('action', function ($offer) use($url) {\n return '\n <a href=\"'.$url . '/details/' .$offer->id.'\" class=\"btn btn-success m-btn m-btn--icon\">\n <span>'.trans('lang.details').' </span></span></a>\n <a href=\"\" data-id=\"'.$offer->id.'\" class=\"btn btn-danger delete-button m-btn m-btn--icon\">\n <span><i class=\"flaticon-delete-2\"></i><span> '.trans('lang.remove').' </span></span></a>';\n })\n ->editColumn('category_id', function ($offer) {\n if($offer->category_id == 1){\n return trans('lang.entertainment');\n }elseif($offer->category_id == 2){\n return trans('lang.educational');\n }elseif($offer->category_id == 3){\n return trans('lang.sport');\n }else{\n return trans('lang.medical');\n }\n })\n ->editColumn('country', function ($offer) {\n if(LaravelLocalization::getCurrentLocale() == 'ar'){\n return $offer->country->name_ar;\n }else{\n return $offer->country->name_en;\n }\n })\n ->editColumn('status', function ($offer) use($url,$payments){\n\n if(in_array($offer->id, $payments)){\n return '<span class=\"m-badge m-badge--default m-badge--wide\">'.trans('lang.active').'</span>';\n }else{\n if($offer->status == 0){\n return '<a href=\"'.$url.'/status/'.$offer->id.'\" class=\"btn btn-warning m-btn m-btn--icon\">'.trans('lang.nonactive').'</a>';\n }else{\n return '<a href=\"'.$url.'/status/'.$offer->id.'\" class=\"btn btn-success m-btn m-btn--icon\">'.trans('lang.active').'</a>';\n }\n }\n \n })\n ->editColumn('city_id', function ($offer) {\n if($offer->city != null){\n if(LaravelLocalization::getCurrentLocale() == 'ar'){\n $name = 'name_ar';\n }else{\n $name = 'name_en';\n }\n return $offer->city->$name;\n }\n })\n ->editColumn('currency', function ($offer) {\n return trans(\"lang.$offer->currency\");\n })\n ->rawColumns(['action', 'status'])\n ->make(true);\n }", "title": "" }, { "docid": "6a78f9335c79472694edb440ac210c80", "score": "0.54870325", "text": "function getdata(){\n\t\t$grid = $this->jqdatagrid;\n\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('lcierre');\n\n\t\t$response = $grid->getData('lcierre', array(array()), array(), false, $mWHERE, 'id','desc' );\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "title": "" }, { "docid": "d9bcac986d507173d5955a6edf8034e5", "score": "0.54768676", "text": "public function doData() {\n\t\t\t$dataSet = array();\n\t\t\t$dataSet['attribute:type'] = $this->dataType;\n\t\t\t$dataSet['attribute:action'] = $this->actionType;\n\n\t\t\tif($this->total) {\n\t\t\t\t$dataSet['attribute:total'] = $this->total;\n\n\t\t\t\tif(!is_null($this->offset)) {\n\t\t\t\t\t$dataSet['attribute:offset'] = $this->offset;\n\t\t\t\t}\n\n\t\t\t\tif(!is_null($this->limit)) {\n\t\t\t\t\t$dataSet['attribute:limit'] = $this->limit;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$dataSet = array_merge($dataSet, $this->data);\n\n\t\t\tcmsController::getInstance()->setAdminDataSet($dataSet);\n\t\t}", "title": "" }, { "docid": "e395b39b3af0c187a7ac5203427a218a", "score": "0.54628426", "text": "protected function grid()\n {\n $grid = new Grid(new BalanceDetail);\n $grid->model()->orderBy('id','desc');\n $grid->user()->mobile('用户');\n $grid->type('类型')->display(function ($type){\n return BalanceDetailEnum::getStatusName($type);\n });\n $grid->cash('金额');\n $grid->before_balance('发生前余额');\n $grid->after_balance('发生后余额');\n $grid->remark('备注');\n $grid->created_at('发生时间');\n $grid->filter(function ($filter) {\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n //手机号查询\n $status = [\n BalanceDetailEnum::FIRST_REWARD_TYPE => BalanceDetailEnum::getStatusName(BalanceDetailEnum::FIRST_REWARD_TYPE),\n BalanceDetailEnum::SECONE_REWARD_TYPE => BalanceDetailEnum::getStatusName(BalanceDetailEnum::SECONE_REWARD_TYPE),\n BalanceDetailEnum::WITHDRAW_CASH => BalanceDetailEnum::getStatusName(BalanceDetailEnum::WITHDRAW_CASH),\n BalanceDetailEnum::WITHDRAW_CASH_FAIL => BalanceDetailEnum::getStatusName(BalanceDetailEnum::WITHDRAW_CASH_FAIL),\n ];\n $filter->equal('type','类型')->select($status);\n $filter->where(function ($query) {\n $query->whereHas('user', function ($query) {\n $query->where('mobile', 'like', \"%{$this->input}%\");\n });\n\n }, '手机号');\n // 设置created_at字段的范围查询\n $filter->between('created_at', '发生时间')->datetime();\n });\n //禁用批量删除\n $grid->tools(function ($tools) {\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n //关闭行操作 删除\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->disableView();\n $actions->disableEdit();\n });\n //禁用导出数据按钮\n $grid->disableExport();\n $grid->disableCreateButton();\n $grid->disableRowSelector();\n //设置分页选择器选项\n $grid->perPages([10, 20, 30, 40, 50]);\n return $grid;\n\n return $grid;\n }", "title": "" }, { "docid": "8422fce61a1c5055de0ba2196285083d", "score": "0.5451296", "text": "public function provides()\n {\n return array('datatable');\n }", "title": "" }, { "docid": "1b84f9c8e0cdd0b951e61143528eb750", "score": "0.54467916", "text": "public function render()\n {\n $controller = sfContext::getInstance()->getController();\n\n $p = json_encode(array(\n 'url' => $controller->genUrl($this->grid->getUri().\"?sf_format=json\"),\n 'dataType' => 'json',\n 'method' => 'GET',\n 'colModel' => $this->getColumnModelConfig(),\n// buttons : [\n// {name: 'Add', bclass: 'add', onpress : test},\n// {name: 'Delete', bclass: 'delete', onpress : test},\n// {separator: true}\n// ],\n// searchitems : [\n// {display: 'Id', name : 'id'},\n// {display: 'Country', name : 'name', isdefault: true}\n// ],\n 'sortname' => 'Id', // TODO\n 'sortorder' => 'desc',\n 'usepager' => true,\n 'singleSelect' => true,\n 'title' => $this->grid->getTitle(),\n 'useRp' => false,\n 'rp' => 2,\n 'showTableToggleBtn' => true,\n 'width' => 700,\n 'height' => 200\n ));\n \n \n return \"\n (function($){\n $.fn.\".$this->grid->getName().\"JqFlexiGrid = function() {\n return this.flexigrid(\".$p.\");\n };\n \n })(jQuery);\n \"; \n }", "title": "" }, { "docid": "a68ea340b25daa981d93eeae140befa3", "score": "0.5445723", "text": "public function actionDhtmlxgrid($un=NULL, $posStart=0, $count=0,$search=NULL,$party_id=0){\n $currentPage = 0;\n $pageSize = 100;\n \n if($posStart>0){\n $currentPage = round(($posStart / $pageSize),0);\n }\n\n $query = new Query;\n if(is_Null($search))\n {\n $mainQuery = $query->select('tbl_contact.id AS id, contactName, department, email, phone')\n ->from('tbl_contact')\n ->where('party_id = ' . $party_id)\n ->all(); //just all records\n }\n else\n {\n $mainQuery = $query->select('tbl_contact.id AS id, contactName, department, email, phone')\n ->from('tbl_contact')\n ->where('contactName LIKE \"%' . $search . '%\" AND party_id = ' . $party_id)\n ->all(); \n }\n $provider = new ArrayDataProvider([\n 'allModels' => $mainQuery,\n 'sort' => [\n 'attributes' => ['id', 'contactName'],\n ],\n 'pagination' => [\n 'pageSize' => $pageSize,\n 'page' => $currentPage\n ],\n ]);\n\n //the grid header to pass over total count\n $clean = ['total_count'=>Contact::find()->where(['party_id'=>$party_id])->count(),'pos'=>$posStart];\n foreach($provider->getModels() AS $record){\n if(!is_null($record))\n {\n $record['link'] = Url::to(['/parties/party/window','id'=>$record['id'],'win'=>'contact_update','mainid'=>$party_id]);\n $clean['rows'][]=['id'=>$record['id'],'data'=>array_values($record)];\n }\n }\n\n header('Content-type: application/json');\n echo Json::encode($clean);\n exit();\n }", "title": "" }, { "docid": "a5e216e80fda7a367f4997fba5feb17e", "score": "0.5442867", "text": "public function ajaxListAction() {\n $oTable = new \\Commun\\Grid\\ModeDifficulteGrid($this->getServiceLocator(), $this->getPluginManager());\n $oTable->setAdapter($this->getAdapter())\n ->setSource($this->getTable()->getBaseQuery())\n ->setParamAdapter($this->getRequest()->getPost());\n return $this->htmlResponse($oTable->render());\n }", "title": "" }, { "docid": "703d025fb7c7d616aed8dddf35d49f3f", "score": "0.5437721", "text": "public function spGrid() {\n $query = \"CALL sp_system_informe_grid (:ids,:estado,:iDisplayStart,:iDisplayLength,:pOrder,:pFilterCols,:sExport,:pec,:taller,:rol);\";\n $parms = [\n \":ids\" => @$this->_form->_ids,\n \":estado\" => @$this->_form->_estado,\n \":iDisplayStart\" => @$this->_form->pDisplayStart,\n \":iDisplayLength\" => @$this->_form->pDisplayLength,\n \":pOrder\" => $this->_form->pOrder,\n \":pFilterCols\" => $this->_pFilterCols,\n \":sExport\" => @$this->_form->_sExport,\n \":pec\" => $this->_getPec()['id_pecs'],\n \":taller\" => $this->_idTaller,\n \":rol\" => $this->_idRol\n ];\n $data = $this->getRows($query, $parms);\n\n return $data;\n }", "title": "" }, { "docid": "5e0849763daa39883256fbbfdf1dd1e0", "score": "0.54314625", "text": "public function getDataProvider() {\n\n\t\tif (!empty($this->_dataProvider))\n\t\t\treturn $this->_dataProvider;\n\n\t\t$criteria = new CDbCriteria();\n//\t\t$criteria->join = '';\n\t\t$criteria->select = 't.id, t.name, t.created, t.created_version, t.due_date, t.status, t.new_status_id, t.create_type, progress';\n//\t\t$criteria->with[] = 'allJobs';\n\t\t$criteria->together = true;\n//\t\t$criteria->group = 't.id';\n\n\t\t$criteria->compare('t.created_version', GGLProject::CREATED_VERSION_GOOGLE);\n\n\t\t// Show deleted projects/jobs\n\t\tGGLProject::$showCanceled = true;\n\t\tGGLProjectJob::$showCanceled = true;\n\n\t\t$sort = GGLProject::getDashboardSort();\n\n\t\tif($this->from || $this->to)\n\t\t\t$criteria->mergeWith($this->getPeriodCriteria());\n\n\t\t$initialStatusCriteria = clone $criteria;\n\n\t\tforeach(self::$dashboardStatuses as $key => &$status) {\n\t\t\t$finalStatusCriteria = clone $initialStatusCriteria;\n\t\t\t$finalStatusCriteria->mergeWith(self::dashboardStatusCriteria($key));\n\t\t\t$status['count'] = GGLProject::model()->count($finalStatusCriteria);\n\t\t}\n\n\t\tif ($this->status)\n\t\t\t$criteria->mergeWith(self::dashboardStatusCriteria($this->status));\n\n\t\tif (!empty($this->search)){\n\n\t\t\t$searchCriteria = new CDbCriteria();\n\n\t\t\t$searchCriteria->with = ['allJobs.userJob.user'=>[\n\t\t\t\t'alias'=>'userOfJob'\n\t\t\t]];\n\t\t\t$searchCriteria->compare('t.id',trim($this->search));\n\t\t\t$searchCriteria->compare('t.name',trim($this->search),true,'OR');\n\t\t\t$searchCriteria->compare(\"concat(userOfJob.first_name,' ',userOfJob.last_name)\",trim($this->search),true,'OR');\n\t\t\t$searchCriteria->compare(\"concat(userOfJob.last_name,' ',userOfJob.first_name)\",trim($this->search),true,'OR');\n\n\n\t\t\t$criteria->mergeWith($searchCriteria);\n\t\t}\n\n\t\tif (!empty($this->userId)){\n\n\t\t\t$searchCriteria = new CDbCriteria();\n\n\t\t\t$searchCriteria->with = ['allJobs.userJob.user'=>[\n\t\t\t\t'alias'=>'userOfJob'\n\t\t\t]];\n\n\t\t\t$searchCriteria->compare('userJob.user_id',$this->userId);\n\t\t\t$searchCriteria->addNotInCondition('allJobs.status', ProjectJob::model()->finalStatuses);\n\n\t\t\t$criteria->mergeWith($searchCriteria);\n\t\t}\n\n\t\t// add joins, that's needed for dashboard\n\t\t$criteria->mergeWith(array('with' =>\n\t\t\t\tarray(\n\t\t\t\t\t'managers' => array('select' => false),\n\t\t\t\t\t'video' => array('select' => 'video_lenght, video_lang_id'),\n\t\t\t\t\t'managers.user' => array('select' => 'first_name, last_name'),\n\t\t\t\t\t'contentType' => array('select' => 'content_type'),\n\t\t\t\t\t'client' => array('select' => 'company_name'),\n\t\t\t\t\t'sortingSettings' => array('select' => false),\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\tif(is_array($this->projectManager) && count($this->projectManager)) {\n\t\t\t$criteria->addInCondition('managers.manager_id', $this->projectManager);\n\t\t}\n\n\t\t$dataProvider = new CActiveDataProvider('GGLProject', array(\n\t\t\t'criteria' => $criteria,\n\t\t\t'pagination' => array(\n\t\t\t\t'pageSize' => Yii::app()->user->getState('pageSize', Yii::app()->params['defaultPageSize']),\n\t\t\t),\n\t\t\t'sort' => $sort,\n\t\t));\n\n\t\t$this->_dataProvider = $dataProvider;\n\n\t\t// Return data provider instance\n\t\treturn $this->_dataProvider;\n\t}", "title": "" }, { "docid": "5bcb752985a2e63832586e07556acfd8", "score": "0.5423786", "text": "protected function grid()\n {\n $grid = new Grid(new Category());\n $grid->filter(function($filter){\n $filter->disableIdFilter();\n $filter->equal('categoryname', '分类名称');\n $producer = Producer::pluck('name', 'id');\n $filter->equal('producer_id','厂家')->select($producer);\n $line = Productline::pluck('linename','id');\n $filter->equal('line_id','产品线')->select($line);\n\n });\n $grid->column('id', 'ID');\n $grid->column('categoryname', '分类名称');\n $grid->column('line_id','产品线')->display(function($line_id){\n return Productline::getLineNameById($line_id);\n });\n $grid->column('producer_id', '生产商')->display(function($producer_id){\n return Producer::getProducerNameById($producer_id);\n });\n /* $grid->column('image','图片')->display(function($image){\n if(!empty($image))\n return '<image src=\"/storage/'.$image.'\" width=\"150\" height=\"90\">';\n else \n return '暂无图片';\n }); */\n $grid->column('created_at', '创建时间');\n $grid->column('updated_at', '更新时间');\n\n $grid->disableExport();\n //$grid->disableRowSelector();\n $grid->disableColumnSelector();\n $grid->actions(function($actions){\n $actions->disableView();\n });\n return $grid;\n }", "title": "" }, { "docid": "4a26e6b33ec944fee16401ae4e84dfc1", "score": "0.5422525", "text": "protected function grid()\n {\n $grid = new Grid(new FinancialJobGradeModel);\n\n $grid->id('ID')->sortable();\n //$grid->name('名称')->sortable();\n\n $grid->job_category('类型')->sortable();\n $grid->job_rank('职级')->sortable();\n $grid->column('profession.name', '名称')->sortable();\n\n $grid->column('workplace.name', '地域')->sortable()->display(function ($val) {\n if ($val == \"南昌\") {\n $val .= \"/西安\";\n }\n return $val;\n });\n\n $grid->salary_start('薪资起点')->sortable();\n $grid->salary_end('薪资终点')->sortable();\n\n $grid->performance_salary('绩效工资')->sortable();\n $grid->sale_dividend('销售分红')->sortable()->display(function ($val) {\n if ($val) {\n return \"有\";\n }\n return \"无\";\n });\n $grid->share_dividend('股权分红')->sortable()->display(function ($val) {\n if ($val) {\n return \"有\";\n }\n return \"无\";\n });\n $grid->floating_coefficient('浮动系数')->sortable();\n\n\n $grid->created_at(trans('admin.created_at'));\n//\t\t\t$grid->updated_at(trans('admin.updated_at'));\n\n\n $grid->filter(function (Grid\\Filter $filter) {\n $filter->disableIdFilter();\n $filter->like('name', '名称');\n $filter->in('workplace_id', '地域')->multipleSelect(WorkplaceModel::getAllWithPluck());\n $filter->in('profession_id', '岗位名称')->multipleSelect(ProfessionModel::getAllWithPluck());\n $filter->in('job_category', '岗位类型')->multipleSelect(ProfessionModel::$JOB_CATEGORIES);\n $filter->equal('job_rank', '岗位职级');\n });\n\n\n //授权职级查看区域\n if (!OAPermission::isAdministrator()) {\n $manage_jobgrade_workplace_ids = [0];\n $current_user = UserModel::getUser();\n /** @var Collection $manage_jobgrade_workplaces */\n $manage_jobgrade_workplaces = $current_user->manage_jobgrade_workplaces;\n if ($manage_jobgrade_workplaces) {\n $manage_jobgrade_workplace_ids = $manage_jobgrade_workplaces->pluck('title', 'id')->toArray();\n }\n $grid->model()->whereIn('workplace_id', array_keys($manage_jobgrade_workplace_ids));\n }\n\n $grid->model()->orderBy('id', 'desc');\n return $grid;\n }", "title": "" }, { "docid": "426cbdc0902965d60a5cfa0264bf5f2a", "score": "0.5419017", "text": "public static function getDataProvider()\n {\n $query = self::queryGetServices();\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'sort'=> [\n 'defaultOrder' => ['created_at'=> SORT_DESC]\n ],\n 'pagination' => [\n 'pageSize' => 10,\n ],\n ]);\n\n return $dataProvider;\n }", "title": "" }, { "docid": "4dcc63e25b8000058fb28c029fcd1b30", "score": "0.5414286", "text": "protected function grid()\n {\n return Admin::grid(Service::class, function (Grid $grid) {\n\n $grid->column('id','ID')->sortable();\n $grid->column('name','名称');\n $grid->column('level','等级');\n $grid->column('gid','父级id');\n $grid->column('status','状态')->display(function ($status) {\n return $status ? '正常' : '关闭';\n });\n\n $grid->column('create_time','开服时间')->display(function($time){\n return date('Y-m-d H:i:s',$time);\n });\n $grid->column('deleted_at','删除时间');\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n \n // 在这里添加字段过滤器\n $filter->like('name', 'name');\n });\n });\n }", "title": "" }, { "docid": "fa0062ba368927f84e3495090335eeb5", "score": "0.5401783", "text": "public function render()\n {\n $source = $this->grid->getDataSource();\n $source->seek($this->index);\n \n $data = array();\n\n foreach ($this->grid->getWidgets() as $column => $widget)\n {\n $data[$column] = $source[$column];\n }\n\n return $data;\n }", "title": "" }, { "docid": "b675f84645e52a6bf2098c02a4de5795", "score": "0.539873", "text": "function getdata(){\n\t\t$grid = $this->jqdatagrid;\n\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('rivc');\n\n\t\t$response = $grid->getData('rivc', array(array()), array(), false, $mWHERE, 'id','desc' );\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "title": "" }, { "docid": "3e1b685b2d730924dd8ea096842978db", "score": "0.5381389", "text": "function getdata(){\n\t\t$grid = $this->jqdatagrid;\n\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('estajefe');\n\n\t\t$response = $grid->getData('estajefe', array(array()), array(), false, $mWHERE );\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "title": "" }, { "docid": "d3eb322f1921ea65039b275fc7af63ea", "score": "0.5381256", "text": "public function actionGetGridView() {\r\n /**\r\n * DataProvider for the grid\r\n * create data provider and renderPartial CGridView widget\r\n */\r\n if (isset($_GET[$this->humpback]['search'])) {\r\n $criteria = new CDbCriteria;\r\n $query = $_GET[$this->humpback]['search'];\r\n $criteria->addCondition(\"title ILIKE '%$query%'\");\r\n\r\n $searchDP = new CActiveDataProvider($this->humpback, [\r\n 'criteria' => $criteria,\r\n 'pagination' => $this->userData->paginationParam,\r\n ]);\r\n $this->renderPartial('/_grid', ['gridSearchDP' => $searchDP]);\r\n Yii::app()->end();\r\n } else {\r\n //echo json_encode($_GET[$this->title], JSON_PRETTY_PRINT);\r\n echo $this->humpback;\r\n }\r\n }", "title": "" }, { "docid": "bd3cee89315daa3ac57afb4c787c0ad5", "score": "0.5378853", "text": "protected function grid()\n {\n return Admin::grid(GoodsClass::class, function (Grid $grid) {\n $grid->model()->orderBy('id', 'desc');\n $grid->disableExport();\n $grid->disableCreation();\n $grid->disableActions();\n $grid->disableBatchDeletion();\n// $grid->allowDelete();\n $grid->actions(function ($actions){\n $actions->disableDelete();\n });\n\n\n// $grid->id();\n $grid->class_name_en();\n $grid->class_name_cn();\n\n\n $grid->column('price')->display(function () {\n return '$'.$this->price;\n });\n\n\n\n });\n }", "title": "" }, { "docid": "9772b3a5bd0479d85a341b30715f314b", "score": "0.53732586", "text": "protected function renderDataView()\n {\n $data = [];\n if ( !empty( $this->options['data'] ) ) {\n $data = $this->options['data'];\n }\n $basic_columns = [];\n if ( !empty( $this->options['basic_columns'] ) ) {\n $basic_columns = $this->options['basic_columns'];\n }\n\n if ( empty( $this->options['model'] ) ) {\n throw new HttpException(200, 'Ошибка виджета. Не передана модель для валидации записываемых данных.');\n }\n $model = $this->options['model'];\n\n if ( empty( $this->options['action_write'] ) ) {\n throw new HttpException(200, 'Ошибка виджета. Не передано имя метода записи данных (action).');\n }\n $action_write = $this->options['action_write'];\n\n $provider = new ArrayDataProvider([\n 'allModels' => $data,\n ]);\n\n if ( empty( $data[0] ) ) {\n // если нет первого ряда - это xml custom-файл с вложенными узлами, дерево,\n // такой массив нет возможности вывести с помощью GridView\n // просто выведем его как есть\n echo \"<pre>\";\n return print_r($data);\n }\n\n // создадим динамическую модель на столько реквизитов сколько колонок в отпарсенном файле\n // в ней пользователь произведет свой выбор\n $header_model = $this->createDynamicModel( $data[0] );\n\n return $this->render('data',\n ['model' => $data,\n 'header_model' => $header_model,\n // список колонок для выбора\n 'basic_column' => $basic_columns,\n 'write_model' => $model,\n 'action_write' => $action_write,\n 'dataProvider' => $provider]);\n }", "title": "" }, { "docid": "3c545e6fbbd5049cc2de9989bf07cd90", "score": "0.5366316", "text": "public function getDataModel();", "title": "" }, { "docid": "eddc7329cbe192ce9ced875dfb3afbb7", "score": "0.5364817", "text": "protected function grid()\n {\n $grid = new Grid(new Profile());\n\n// $grid->column('id', __('Id'));\n $grid->column('user.name', __('Пациент'));\n $grid->column('status', __('Статус'));\n $grid->column('age', __('Возраст'));\n $grid->column('weight', __('Вес'));\n $grid->column('rost', __('Рост'));\n $grid->column('davlen', __('Давление'));\n $grid->column('code', __('Код'));\n $grid->column('response', __('Вопрос'));\n $grid->column('info', __('Информация'));\n $grid->column('type', __('Тип'));\n// $grid->column('deleted_at', __('Deleted at'));\n// $grid->column('created_at', __('Created at'));\n// $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "title": "" }, { "docid": "91a9c66fcdb436befe51bc9eedef2e89", "score": "0.5358316", "text": "protected function grid()\n {\n $grid = new Grid(new HuodongLog);\n $model = $grid->model();\n $model->orderBy('id', 'desc');\n\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n // 在这里添加字段过滤器\n $filter->equal('name', '姓名');\n $filter->equal('department', '部门');\n $filter->equal('number', '活动号码');\n\n });\n $grid->expandFilter();\n $grid->disableCreateButton();\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('name', __('姓名'));\n $grid->column('department', __('部门'));\n $grid->column('number', __('活动号码'));\n $grid->column('image', __('图片'))->display(function ($val) {\n return !$val ? '---' : \"<img src='$val' style='max-width: 250px;max-height: 250px'>\";\n });\n $grid->column('created_at', __('创建时间'));\n $grid->column('updated_at', __('修改时间'));\n\n return $grid;\n }", "title": "" }, { "docid": "d12485938be69931313e76a2be39fe38", "score": "0.5356268", "text": "protected function grid()\n {\n $grid = new Grid(new User);\n // $grid->model()->where('id', '>', 10);\n //$grid->model()->whereIn('id',[50,35,45]);\n //$grid->model()->whereBetween('id',[2,15]);\n //$grid->model()->whereColumn('updated_at','>','created_at');\n //$grid->model()->orderBy('id','desc');\n // $grid->model()->take(33);\n //$grid->fixColums(100,5);\n //$grid->column('id')->view('content');\n //数列方法$grid->column('array')->pluck('name')->implode('-');\n \n //列展开\n // $grid->column('name', __('Name'))->expand(function($model){\n // $emails = $model->all()->take(2)->map(function($email){\n // return $email->only(['id','email']);\n\n // });\n // return new Table(['id','email'], $emails->toArray());\n // });\n \n //弹出模态框\n // $grid->column('name','姓名')->modal('最新email',function($model){\n // $emails = $model->all()->take(2)->map(function($email){\n // return $email->only(['id','email']);\n // });\n // return new Table(['id','email'],$emails->toArray());\n // });\n\n // $grid->filter(function($filter){\n // // $filter->disableIdFilter();\n // // $filter->like('name');\n // });\n\n // $grid->expandFilter();\n // // $grid->expand(function(){})\n // // $grid->actions(function ($actions) {\n // $grid->batchActions(function($batch){\n // // // 去掉删除\n // // $actions->disableDelete();\n \n // // // 去掉编辑\n // // $actions->disableEdit();\n \n // // 去掉查看\n // // $actions->disableView();\n // $batch->disableDelete();\n // // $actions->row;//获取行数据\n // // $actions->getKey();//获取当前行主键值\n // });\n \n // // 全部关闭\n // $grid->disableActions();\n //添加自定义按钮\n // $grid->actions(function ($actions) {\n\n // // append一个操作\n // $actions->append('<a href=\"\"><i class=\"fa fa-eye\"></i></a>');\n \n // // prepend一个操作\n // $actions->prepend('<a href=\"\"><i class=\"fa fa-paper-plane\"></i></a>');\n // });\n \n // $grid->header(function ($query) {\n // return 'header';\n // });\n //like查询\n // $grid->quickSearch();//快速搜索\n //插入样式\n // Admin::script('console.log(\"hello world\");');\n // Admin::style('.form-control {margin-top: 10px;}');\n // Admin::html('<template>...</template>');\n\n //快速创建\n // $grid->quickCreate(function (Grid\\Tools\\QuickCreate $create) {\n // $create->text('name', '名称');\n // $create->email('email', '邮箱');\n // $create->ip('ip','ip');\n // $create->url('url','url地址');\n // $create->password('password','密码');\n // $create->mobile('mobile','手机号');\n // $create->integer('int','整数输入框');\n // $create->select('select','单选')->options([1=>'foo',2=>'bar']);\n // $create->multipleSelect('checkbox','复选框')->options([1=>'foo',2=>'bar']);\n // $create->datetime('datetime','日期时间');\n // $create->time('time','时间');\n // $create->date('date','日期');\n // });\n // $model->where('username', 'REGEXP', 'song');\n\n // 数据模型\n // public function show($id, Content $content)\n // {\n // return $content->header('Post')\n // ->description('详情')\n // ->body(Admin::show(Post::findOrFail($id), function (Show $show) {\n\n // $show->id('ID');\n // $show->title('标题');\n // $show->content('内容');\n // $show->rate();\n // $show->created_at();\n // $show->updated_at();\n // $show->release_at();\n // }));\n // }\n //内容转义\n //$show->avatar()->unescape()->as(function ($avatar) {\n\n // return \"<img src='{$avatar}' />\";\n\n // });\n\n //修改样式\n //$show->panel()\n // ->style('danger')\n // ->title('post基本信息...');\n\n //面板工具\n // $show->panel()\n // ->tools(function ($tools) {\n // $tools->disableEdit();\n // $tools->disableList();\n // $tools->disableDelete();\n // });;\n //修改显示内容\n //$show->title()->as(function ($title) {\n // return \"<{$title}>\";\n // });\n\n // $show->contents()->as(function ($content) {\n // return \"<pre>{$content}</pre>\";\n // });\n\n //将图片/文件路径显示为图片/文件;\n //$show->avatar()->image();//->file();\n\n\n //将url链接显示为html链接\n //$show->homepage()->link();\n\n //将tag显示为label\n //$show->tag()->label();\n\n //将rate内容显示为badge\n //$show->rate()->badge();\n\n //将extra内容显示为json\n //$show->extra()->json();\n\n //图片轮播('images'为图片数组)\n //$show->field('images')->carousel();\n // $show->field('images')->carousel($width = 300, int $height = 200, $server);//设置图片大小和服务器\n\n //显示文件尺寸\n //$show->field('file_size')->filesize();\n\n // 检查权限,有create-post权限的用户或者角色可以访问创建文章页面\n // Permission::check('create-post');\n\n // $grid->actions(function ($actions) {\n\n // // 没有`delete-image`权限的角色不显示删除按钮\n // if (!Admin::user()->can('delete-image')) {\n // $actions->disableDelete();\n // }\n // });\n \n // // 只有具有`view-title-column`权限的用户才能显示`title`这一列\n // if (Admin::user()->can('view-title-column')) {\n // $grid->column('title');\n // }\n \n // 获取当前用户对象\n // Admin::user();\n // 获取当前用户id\n // Admin::user()->id;\n // 获取用户角色\n // Admin::user()->roles;\n // 获取用户的权限\n // Admin::user()->permissions;\n // 用户是否某个角色\n // Admin::user()->isRole('developer');\n // 是否有某个权限\n // Admin::user()->can('create-post');\n // 是否没有某个权限\n // Admin::user()->cannot('delete-post');\n // 是否是超级管理员\n // Admin::user()->isAdministrator();\n // 是否是其中的角色\n // Admin::user()->inRoles(['editor', 'developer']);\n\n\n //权限中间件\n // 允许administrator、editor两个角色访问group里面的路由\n // Route::group([\n // 'middleware' => 'admin.permission:allow,administrator,editor',\n // ], function ($router) {\n\n // $router->resource('users', UserController::class);\n // ...\n\n // });\n\n // // 禁止developer、operator两个角色访问group里面的路由\n // Route::group([\n // 'middleware' => 'admin.permission:deny,developer,operator',\n // ], function ($router) {\n\n // $router->resource('users', UserController::class);\n // ...\n\n // });\n\n // // 有edit-post、create-post、delete-post三个权限的用户可以访问group里面的路由\n // Route::group([\n // 'middleware' => 'admin.permission:check,edit-post,create-post,delete-post',\n // ], function ($router) {\n\n // $router->resource('posts', PostController::class);\n // ...\n\n // });\n $states = [\n 'on' => ['text' => 'YES'],\n 'off' => ['text' => 'NO'],\n ];\n $grid->column('id', __('Id'))->totalRow();//->loading([1,2,3]);//->progressBar($style='primary',$size='sm',$max=100);//->link();//->psv('pink')->help('这是ID')->sortable()->qrcode();\n //$grid->column('name', __('Name'));//->setAttributes(['style'=>'color:red;']);\n $grid->column('email', __('Email'))->radio([\n 1 => 'Sed ut perspiciatis unde omni',\n 2 => 'voluptatem accusantium doloremque',\n 3 => 'dicta sunt explicabo',\n 4 => 'laudantium, totam rem aperiam',\n ]);;//->editable('select',[1=>'[email protected]',2=>'optiion2',3=>'optiion3',4=>'optiion4']);//->editable('textarea');\n $grid->column('email_verified_at', __('Email verified at'))->width(200);\n $grid->column('password', __('Password'));\n $grid->column('remember_token', __('Remember token'));\n $grid->column('created_at', __('Created at'))->date('Y-m-d');//->hide();\n $grid->column('updated_at', __('Updated at'))->limit(10);\n $grid->column('is_admin', __('Is admin'))->switchGroup(['hot' => '热门',\n 'new' => '最新',\n 'recommend' => '推荐',], $states);//->display(function($is_admin){return $is_admin?'是':'否';})->icon(['是'=>'toggle-off','否'=>'toggle-on'],$default='');//->label('info');//->copyable();\n $grid->column('activation_token', __('Activation token'));\n $grid->column('activated', __('Activated'));//->gravatar();\n\n return $grid;\n }", "title": "" }, { "docid": "a9693677873e7c3929e949ca0d8cf251", "score": "0.5350651", "text": "protected function grid()\n {\n $grid = new Grid(new Member);\n $info_array=[\n array(\"field\"=>\"nickname\",\"title\"=>\"昵称\",\"type\"=>\"value\"),//展示昵称\n array(\"field\"=>\"realname\",\"title\"=>\"真实姓名\",\"type\"=>\"value\"),//展示真实姓名\n array(\"field\"=>\"head\",\"title\"=>\"头像\",\"type\"=>\"image\"),//展示图片 头像\n array(\"field\"=>\"sex\",\"title\"=>\"性别\",\"type\"=>\"array\",\"array\"=>['0' => '保密', '1' => '男',\"2\"=>\"女\"]),\n array(\"field\"=>\"city\",\"title\"=>\"城市\",\"type\"=>\"value\"),\n array(\"field\"=>\"create_time\",\"title\"=>\"注册时间\",\"type\"=>\"datetime\"),\n array(\"field\"=>\"last_login\",\"title\"=>\"最后登录\",\"type\"=>\"datetime\"),\n array(\"field\"=>\"status\",\"title\"=>\"状态\",\"type\"=>\"array\",\"array\"=>[0=>\"禁用\",1=>\"正常\"]),\n array(\"field\"=>\"invitation\",\"title\"=>\"邀请码\",\"type\"=>\"value\"),\n array(\"field\"=>\"is_tuan\",\"title\"=>\"是否是团长\",\"type\"=>\"boolean\"),\n ];\n\n BaseControllers::setlist_show($grid,$info_array);//拼接列表展示数据\n BaseControllers::set_auth($grid,2);//设置版面权限\n\n $grid->actions(function ($actions) {\n // 去掉删除\n $actions->disableDelete();\n\n // 去掉编辑\n $actions->disableEdit();\n// // 去掉查看\n// $actions->disableView();\n });\n return $grid;\n }", "title": "" }, { "docid": "f5be17ce5d916a4921ac1b121c37cbc4", "score": "0.5342569", "text": "public function getDataProvider()\n {\n if (!$this->_dataProvider instanceof IDataProvider) {\n if ($this->_dataProvider instanceof Closure) {\n $this->_dataProvider = $this->_dataProvider($this);\n } else {\n $this->_dataProvider = Yii::createComponent($this->_dataProvider);\n }\n }\n return $this->_dataProvider;\n }", "title": "" }, { "docid": "2f945bb406eca5498d87b7b985d5a763", "score": "0.53347653", "text": "function createDatagrid($aSource, $aLimit = 10, $aPrefix = \"DG\", $aDefault = array(), $aRenderer = DATAGRID_RENDER_SMARTY, $aBindOptions = array()) \n\t{\n\t\tparent::Structures_DataGrid($aLimit);\n\t\tparent::setDefaultSort($aDefault);\n\t\tparent::setRequestPrefix($aPrefix);\n\t\tparent::setRenderer($aRenderer);\n\t\t\n\t\t// string for XCore only\n\t\tif (defined('XCORE_SEO') && XCORE_SEO) {\n\t\t\t$this->isUserFriendlyURL(XCORE_SEO);\n\t\t}\n\n//\t\tif enable mod_rewrite\t\t\n\t\t/*if ($this->__userFriendlyURL)*/ {\n\t\t\t$path = substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], \"?\"));\n\t\t\t$this->setRendererOption('selfPath',\t$path);\n\t\t\t//only for XCore\n\t\t\t//$this->setRendererOption('excludeVars',\tarray('xcmod', 'xcact', 'xcseo', 'xcurl'));\n\t\t\t\n\t\t}\n\t\t\n\t\tif (is_array($aSource)) {\n\t\t\t//insert params\n\t\t} elseif (is_string($aSource) && preg_match(\"/select/i\", $aSource)) {\n\t\t // replace prefix of tables\n\t\t\t$aSource\t\t\t\t\t= XDatabase::replacePrefix($aSource);\n\t\t\t$aBindOptions[\"dbc\"]\t\t= XDatabase::getObject();\n//\t\t\t$aBindOptions[\"backend\"]\t= \"MDB2\";\n\n\t\t\t// add function for integrate search \n\t\t\tif ($this->__flags[XDATAGRID_SEARCHSHOW]) {\n\t\t\t\t$aSource = $this->_setSearch($aSource);\n\t\t\t}\n\t\t} else {\n\t\t\t//insert params\n\t\t}\n\t\t\n\t\t$bind = parent::bind($aSource, $aBindOptions);\n\n\t\tif (PEAR::isError($bind)) {\n\t\t\t$this->_setError($bind);\n\t\t}\n\t}", "title": "" }, { "docid": "b186aa8621ddea0ca49d895898c61dba", "score": "0.5328473", "text": "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t//Funciones que ejecutan los botones\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname']);\n\n\t\t//Botones Panel Izq\n\t\t//$grid->wbotonadd(array(\"id\"=>\"edocta\", \"img\"=>\"images/pdf_logo.gif\", \"alt\" => \"Formato PDF\", \"label\"=>\"Ejemplo\"));\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita', 'title'=>'Agregar/Editar Registro'),\n\t\t\tarray('id'=>'fshow' , 'title'=>'Mostrar Registro'),\n\t\t\tarray('id'=>'fborra', 'title'=>'Eliminar Registro')\n\t\t);\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t//$param['WestPanel'] = $WestPanel;\n\t\t//$param['EastPanel'] = $EastPanel;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('ESTAJEFE', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('ESTAJEFE', 'JQ');\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$param['tamano'] = $this->datasis->getintramenu( substr($this->url,0,-1) );\n\t\t$this->load->view('jqgrid/crud2',$param);\n\t}", "title": "" }, { "docid": "a820cd2c339bb644a15fd54fc5eb626e", "score": "0.53279674", "text": "public function refresh() {\n // Done automatically by server side datatables\n }", "title": "" }, { "docid": "cceeeeab872e4c5a92a80f0fab9e8ab5", "score": "0.5325347", "text": "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t//Funciones que ejecutan los botones\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname']);\n\n\t\t//Botones Panel Izq\n\t\t//$grid->wbotonadd(array(\"id\"=>\"funcion\", \"img\"=>\"images/engrana.png\", \"alt\" => \"Formato PDF\", \"label\"=>\"Ejemplo\"));\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita', 'title'=>'Agregar/Editar Registro'),\n\t\t\tarray('id'=>'fshow' , 'title'=>'Mostrar Registro'),\n\t\t\tarray('id'=>'fborra', 'title'=>'Eliminar Registro')\n\t\t);\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t//$param['EastPanel'] = $EastPanel;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('FISCALZ', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('FISCALZ', 'JQ');\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$param['tamano'] = $this->datasis->getintramenu( substr($this->url,0,-1) );\n\t\t$this->load->view('jqgrid/crud2',$param);\n\t}", "title": "" }, { "docid": "680c37d2c1e45e3f6c5eacf956e54b4f", "score": "0.5325191", "text": "function getdata(){\n\t\t$grid = $this->jqdatagrid;\n\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('edinmue');\n\n\t\t$response = $grid->getData('edinmue', array(array()), array(), false, $mWHERE, 'codigo' );\n\t\t$rs = $grid->jsonresult( $response);\n\n\t\t//Guarda en la BD el Where para usarlo luego\n\t\t$querydata = array('data1' => $this->session->userdata('dtgQuery'));\n\t\t$emp = strpos($querydata['data1'],'WHERE ');\n\t\tif($emp > 0){\n\t\t\t$querydata['data1'] = substr( $querydata['data1'], $emp );\n\t\t\t$emp = strpos($querydata['data1'],'ORDER BY ');\n\t\t\tif($emp > 0){\n\t\t\t\t$querydata['data1'] = substr( $querydata['data1'], 0, $emp );\n\t\t\t}\n\t\t}else{\n\t\t\t$querydata['data1'] = '';\n\t\t}\n\t\t$ids = $this->datasis->guardasesion($querydata);\n\n\t\techo $rs;\n\t}", "title": "" }, { "docid": "e12f50e9cc70e7c85d40ccd6ce798101", "score": "0.53244877", "text": "protected function grid()\n {\n $grid = new Grid(new Order);\n $grid->model()->orderBy('created_at','desc');\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('no', __('订单号'));\n $grid->column('user.openid', __('用户唯一标识'));\n //$grid->column('address', __('Address'));\n $grid->column('total_amount', __('总金额'))->sortable();\n// $grid->column('ship_status','物流')->radio([\n// 'pending' => '未发货', 'delivered' => '已发货',\n// 'received' => '已收货',\n// 'close' => '取消',\n// ]);\n $grid->column('ship_status','物流')->editable('select', [\n 'pending' => '未发货', 'delivered' => '已发货',\n 'received' => '已收货',\n 'close' => '取消',\n ]);\n\n\n $grid->column('created_at', __('Created at'))->sortable();\n $grid->column('updated_at', __('Updated at'))->sortable();\n // 禁用创建按钮,后台不需要创建订单\n $grid->disableCreateButton();\n $grid->actions(function ($actions) {\n // 禁用删除和编辑按钮\n $actions->disableDelete();\n $actions->disableEdit();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n $grid->batchActions(function ($batch) {\n $batch->add(new BatchReplicate());\n });\n $grid->filter(function ($filter) {\n $filter->expand();\n $filter->column(1/2, function ($filter) {\n $filter->between('created_at', '创建时间')->datetime();\n });\n $filter->column(1/2, function ($filter) {\n $filter->like('no', '订单号');\n $filter->equal('ship_status','物流')->multipleSelect([\n 'pending' => '未发货',\n 'delivered' => '已发货',\n 'received' => '已收货',\n 'close' => '取消'\n ]);\n });\n\n\n });\n\n return $grid;\n }", "title": "" }, { "docid": "e9c74a5f3c332ccc8d4d575037c91868", "score": "0.5306038", "text": "protected function grid()\n {\n $grid = new Grid(new Merchanttable);\n\n// $grid->column('id', __('Id'));\n $grid->column('mtype', __('商户类型'))->display(function($mtype){\n return [0=>'场所类型',1=>'代理商类型',2=>'权利人类型'][$mtype];\n });\n $grid->column('merchantType', __('商户入驻类型'))->display(function($merchantType){\n return [1=>'小微',2=>'个体',3=>'企业'][$merchantType];\n });\n $grid->column('merchantId', __('商户编号'));\n $grid->column('merchantShortName', __('商户简称'));\n $grid->column('merchantName', __('商户全称'));\n /*$grid->column('servicePhone', __('客服电话'));\n $grid->column('mccCode', __('MccCode'));\n $grid->column('legalName', __('LegalName'));\n $grid->column('credentialType', __('CredentialType'));\n $grid->column('idCardno', __('IdCardno'));\n $grid->column('idcardFrontPic', __('IdcardFrontPic'));\n $grid->column('idcardBackPic', __('IdcardBackPic'));\n $grid->column('idcardHandPic', __('IdcardHandPic'));\n $grid->column('idCardStart', __('IdCardStart'));\n $grid->column('idCardEnd', __('IdCardEnd'));\n $grid->column('name', __('Name'));\n $grid->column('mobile', __('Mobile'));\n $grid->column('provinceCode', __('ProvinceCode'));\n $grid->column('cityCode', __('CityCode'));\n $grid->column('areaCode', __('AreaCode'));\n $grid->column('address', __('Address'));\n $grid->column('license', __('License'));\n $grid->column('licenseFullName', __('LicenseFullName'));\n $grid->column('licenseAddress', __('LicenseAddress'));\n $grid->column('licenseStart', __('LicenseStart'));\n $grid->column('licenseEnd', __('LicenseEnd'));\n $grid->column('licensePic', __('LicensePic'));\n $grid->column('type', __('Type'));\n $grid->column('legalFlag', __('LegalFlag'));\n $grid->column('unionpay', __('Unionpay'));\n $grid->column('holder', __('Holder'));\n $grid->column('aidCardNo', __('AidCardNo'));\n $grid->column('aidCardType', __('AidCardType'));\n $grid->column('amobile', __('Amobile'));\n $grid->column('bankCardNo', __('BankCardNo'));\n $grid->column('bankCardFrontPic', __('BankCardFrontPic'));\n $grid->column('nonLegSettleAuthPic', __('NonLegSettleAuthPic'));\n $grid->column('nonLegIdcardFrontPic', __('NonLegIdcardFrontPic'));\n $grid->column('nonLegIdcardBackPic', __('NonLegIdcardBackPic'));\n $grid->column('shopType', __('ShopType'));\n $grid->column('headMerchantId', __('HeadMerchantId'));\n $grid->column('settleTo', __('SettleTo'));\n $grid->column('insidePic', __('InsidePic'));\n $grid->column('doorPic', __('DoorPic'));\n $grid->column('cashierDeskPic', __('CashierDeskPic'));\n $grid->column('userWx', __('UserWx'));\n $grid->column('subAppid', __('SubAppid'));\n $grid->column('jsapiPath', __('JsapiPath'));\n $grid->column('subscribeAppid', __('SubscribeAppid'));\n $grid->column('wxMchName', __('WxMchName'));\n $grid->column('reportConfigId', __('ReportConfigId'));\n $grid->column('notifyAddress', __('NotifyAddress'));\n $grid->column('agreementPic', __('AgreementPic'));*/\n\n $grid->actions(function ($actions) {\n $actions->disableView();\n if (!Admin::user()->can('商户管理删除')) {\n $actions->disableDelete();\n }\n if (!Admin::user()->can('商户管理修改')) {\n $actions->disableEdit();\n }\n });\n if (!Admin::user()->can('商户管理添加')) {\n $grid->disableCreateButton(); //场所添加的权限\n }\n\n return $grid;\n }", "title": "" }, { "docid": "f7c0a9acb64c799df90f93d92225d2ae", "score": "0.53003186", "text": "protected function grid()\n {\n $token = \\request()->session()->get('wxtoken');\n $grid = new Grid(new BindLog());\n $grid->disableCreateButton();\n $grid->disableActions();\n $grid->filter(function ($filter) {\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n $filter->column(1 / 2, function ($filter) {\n $filter->group('rdid', '读者证', function ($group) {\n $group->equal('等于');\n $group->like('包含');\n });\n $filter->equal('openid', 'openid');\n });\n $filter->column(1 / 2, function ($filter) {\n $filter->between('created_at', '操作时间')->datetime();\n });\n });\n\n $grid->model()->where('token', $token)->with('fansInfo')->orderBy('id', 'desc');\n $grid->column('rdid', '证号');\n $grid->column('fansInfo.nickname', '微信昵称');\n $grid->column('fansInfo.headimgurl', '头像')->image('', 48, 48);\n\n $grid->openid()->badge('danger');\n\n $grid->column('type', '绑定状态')->display(function ($type) {\n switch ($type) {\n case 0:\n $text = \"<span class='badge '>解绑</span>\";\n break;\n case 1:\n $text = \"<span class='badge bg-green'>绑定</span>\";\n break;\n default:\n $text = \"<span class='badge bg-yellow'>未知</span>\";\n }\n return $text;\n });\n\n $grid->created_at('操作时间');\n\n return $grid;\n }", "title": "" }, { "docid": "6ad49045b5369fc6b96de3085fe9b739", "score": "0.52991325", "text": "protected function _writeData()\n { \n $firstTimeThrough = true; \n/* \n if($this->_dataProvider instanceof ActiveDataProvider) { \n if($this->exportFull) {\n // set pagination to off\n $this->_dataProvider->setPagination(false);\n }\n if($this->convertActiveDataProvider) {\n $criteria = $this->_dataProvider->getCriteria();\n $model = $this->_dataProvider->model;\n $criteria = $model->getCommandBuilder()\n ->createCriteria($criteria,array());\n $this->_dataProvider = $model->getCommandBuilder()\n ->createFindCommand($model->getTableSchema(), \n $criteria); \n unset($model, $criteria);\n } else {\n // suggested implementation from marcovtwout\t\n $models = $this->_dataProvider->getData();\n $dataReader = array();\n $attributes = $this->_dataProvider->model->getMetaData()->columns;\n \n \n // since we are already looping through results, don't bother\n // passing results to _loopRow, just write it here.\n foreach ($models as &$model) {\n $row = array();\n \n foreach ($attributes as $attribute => $col) {\n $row[$attribute] = $model->{$attribute};\n }\n \n // check model relations\n if(count($this->_modelRelations)) {\n foreach($this->_modelRelations as $relation=>$value) {\n if(is_array($value)) {\n foreach($value as $subvalue) {\n if(isset($model->$relation->$subvalue) && $model->$relation->$subvalue)\n $row[$relation.'['.$subvalue.']'] = $model->$relation->$subvalue;\n }\n } else {\n if(isset($model->$relation->$value) && $model->$relation->$value)\n $row[$relation.'['.$value.']'] = $model->$relation->$value;\n }\n }\n }\n \n if($firstTimeThrough) {\n $this->_writeHeaders($row);\n $firstTimeThrough = false; \n }\n $this->_writeRow($row);\n }\n unset($models, $attributes);\n return;\n } \n }\n \n if($this->_dataProvider instanceof SqlDataProvider) { \n if($this->exportFull) {\n $this->_dataProvider->setId('csvexport');\n $this->_dataProvider->getPagination()->setItemCount($this->_dataProvider->getTotalItemCount()); \n $pageVar = $this->_dataProvider->getPagination()->pageVar;\n $_GET[$pageVar] = 0; \n $totalPages = $this->_dataProvider->getPagination()->getPageCount(); \n $this->setToAppend();\n for($i=1; $i<=$totalPages; $i++) { \n $_GET[$pageVar] = $i;\n $this->_dataProvider->getPagination()->setCurrentPage($i); \n $_getData = $this->_dataProvider->getData(true);\n $this->_loopRows($_getData); \n $this->includeColumnHeaders = !(bool) $i;\n } \n } else {\n $this->_loopRows($this->_dataProvider->getData());\n }\n \n return;\n }\n \n if($this->_dataProvider instanceof Command) {\n $dataReader = $this->_dataProvider->query(); \n $this->_loopRows($dataReader); \n return;\n }\n*/ \n if(is_array($this->_dataProvider)) {\n $this->_loopRows($this->_dataProvider);\n return;\n } \n \n // if program made it this far something happened\n throw new Exception('Data source failed to retrieve data, are you sure you passed something useable?');\n }", "title": "" }, { "docid": "287fa8c7adfd2cc0afba1438533614ae", "score": "0.5294092", "text": "protected function grid()\n {\n Admin::disablePjax();\n\n Permission::check('clients');\n $admin = Admin::user();\n\n //超级管理员可以看到所有信息,销售只能看到自己的\n $grid = new Grid(new Client());\n\n\n $grid->model()->setPerPage(60);\n $isAdmin = Admin::user()->isRole('administrator');\n $isPutong = Admin::user()->isRole('putong');\n if($isAdmin){\n $id = Request()->get('admin_user_id');\n if($id){\n $grid->model()->where('admin_user_id',$id);\n }\n }elseif ($isPutong){\n $grid->model()->where('admin_user_id',$admin->id);\n }\n\n $grid->model()->orderBy('id', 'desc');\n\n\n $grid->column('id','ID')->sortable();\n $grid->column('user_name','姓名');\n $grid->column('phone','手机号码');\n $grid->column('sales','销售列表')->display(function (){\n $id = $this->id;\n $client_users = ClientUser::where([\n ['client_id','=',$id],\n ['status','>',0]\n ])->with('user')->get();\n $html = ' ';\n foreach($client_users as $value){\n $user_id = $value->id;\n $html = $html .\"<a href='/admin/clients-users/$user_id/edit'>\".$value->user->name.\"</a>\";\n $html = $html . ' :';\n $html = $html .ClientUser::$status[$value->status];\n $html = $html . ' :';\n $html = $html . $value->remark;\n $html = $html . '<br>';\n }\n return $html;\n });\n\n $grid->rule()->name('分配策略');\n $grid->column('rule_id','分配策略')->select(Rule::all()->pluck('name','id'));\n\n $grid->column('is_rule_stopped','策略是否停止')->select(Client::$is_rule_stopped);\n\n// $grid->column('is_rule_stopped','策略是否停止')->display(function ($status){\n// return Client::$is_rule_stopped[$status];\n// });\n\n $grid->column('status','最终订单状态')->display(function ($status){\n return Client::$status[$status];\n });\n $grid->user()->name('最终成交销售');\n\n $grid->column('created_at', '创建时间');\n $grid->filter(function($filter){\n\n $filter->disableIdFilter();\n\n // 在这里添加字段过滤器\n $filter->like('user_name', '客户名');\n $filter->equal('phone', '手机号');\n $filter->equal('status', '订单状态')->select(Client::$status);\n\n\n $filter->between('created_at', '创建时间')->datetime();\n\n });\n\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->disableView();\n });\n\n\n $grid->tools(function ($tools) {\n $tools->append(new ClientsUpload());\n\n });\n return $grid;\n\n }", "title": "" }, { "docid": "a258284731d94e446422cf453ab76e8b", "score": "0.5284705", "text": "public function getDataProvider(): DataProviderConnector\n {\n return new DataReaderOneConnector();\n }", "title": "" }, { "docid": "8d1075fb35e89f4044d87e9e7c9fe2bf", "score": "0.5283183", "text": "private function infoGrid()\n {\n return Admin::grid(HouseLevy::class, function (Grid $grid) {\n $project_id = Input::get('project_id');\n $period_id = Input::get('period_id');\n\n $grid->model()\n ->where('project_id', $project_id)\n ->where('period_id', $period_id);\n\n $grid->id('ID')->sortable();\n\n $grid->id_number('身份证号');\n $grid->villages('乡镇');\n $grid->household_name('姓名');\n $grid->gender('性别')->display(function ($gendered) {\n return $gendered === 'm' ? '男性' : '女性';\n })->sortable();\n $grid->contact('联系电话');\n $grid->address('家庭住址');\n\n $grid->created_at('创建时间')->sortable();\n $grid->updated_at('更新时间')->sortable();\n\n $grid->filter(function ($filter) {\n $filter->useModal();\n $filter->like('household_name', '姓名');\n\n /*$filter\n ->is('project_id', '项目')\n ->select(Project::all()->pluck('name', 'id'));*/\n });\n\n // 导出数据\n $custom_exporter = new CustomExporter($grid, HouseLevy::class, 'one_to_many');\n // 整合导出的数据\n $custom_exporter->making(function (CustomExporter $exporter) {\n $exporter->grid()->model()->with(['houseLevyDicSnap']);\n\n $exporter->grid()->model()->collection(function ($model) {\n $model->each(function ($item) {\n $item->houseLevyDicSnap->makeVisible(['full_name', 'subtotal']);\n });\n $model->makeVisible(['project_name', 'period_name']);\n\n $model->groupBy('subject');\n\n return $model;\n });\n\n return $exporter->getData();\n\n });\n $grid->exporter($custom_exporter);\n\n $grid->tools(function ($tools) use ($grid, $project_id, $period_id) {\n $tools->append(new Importer(HouseLevy::class));\n $tools->append(new CustomeCreation(\"house_levies/create?step=3&project_id=$project_id&period_id=$period_id\"));\n });\n\n $grid->actions(function ($actions) use ($project_id, $period_id) {\n $actions->setEditActionResource(\"/admin/house_levies/{$actions->getKey()}/edit?step=3&project_id=$project_id&period_id=$period_id\");\n // $actions->disableEdit();\n\n // $actions->append(new CustomDelete($actions->getKey(), 'periods'));\n });\n $grid->disableCreation();\n });\n }", "title": "" }, { "docid": "699bdbab1eb533193ece18e046eff8ed", "score": "0.52819365", "text": "protected function grid()\n {\n $userModel = config('admin.database.users_model');\n\n $grid = new Grid(new $userModel());\n\t\t$grid->model()->where('type', 1)->orderBy('id', 'desc');\n\n\t\t$grid->filter(function($filter) {\n\t\t\t$filter->disableIdFilter();\n\t\t\t$filter->equal('station_id', '站点')->select(Station::all()->pluck('station_name', 'id'));\n\t\t});\n\n $grid->column('id', '编号')->sortable();\n $grid->column('username', trans('admin.username'));\n $grid->column('name', '姓名');\n\t\t$grid->column('station_id', '所属场站')->display(function($v) {\n\t\t\t$st = Station::find($v);\n\t\t\treturn $st->station_name ?? '';\n\t\t});\n\t\t$grid->column('gender', '性别')->display(function($v) {\n\t\t\t$arr = ['女', '男'];\n\t\t\treturn $arr[$v];\n\t\t});\n $grid->column('mobile', '联系方式');\n\t\t$grid->column('roles', '职务')->display(function($v) {\n\t\t\treturn $v[0]['name'] ?? '';\n\t\t});\n $grid->column('job_desc', '工作职责');\n\n $grid->actions(function (Grid\\Displayers\\Actions $actions) {\n if ($actions->getKey() == 1) {\n $actions->disableDelete();\n }\n });\n\n $grid->tools(function (Grid\\Tools $tools) {\n $tools->batch(function (Grid\\Tools\\BatchActions $actions) {\n $actions->disableDelete();\n });\n\n\t\t\t$tools->append(new Refresh);\n });\n\n return $grid;\n }", "title": "" }, { "docid": "e5adbd16d7412bdfb2d934653af65b5c", "score": "0.5274837", "text": "public function show()\n {\n // check if the datagrid is already loaded\n if (!$this->loaded AND (!isset($_GET['method']) OR !(in_array($_GET['method'], array('onReload', 'onSearch')))) )\n {\n if (func_num_args() > 0)\n {\n $this->onReload( func_get_arg(0) );\n }\n else\n {\n $this->onReload();\n }\n }\n parent::show();\n }", "title": "" }, { "docid": "e5adbd16d7412bdfb2d934653af65b5c", "score": "0.5274837", "text": "public function show()\n {\n // check if the datagrid is already loaded\n if (!$this->loaded AND (!isset($_GET['method']) OR !(in_array($_GET['method'], array('onReload', 'onSearch')))) )\n {\n if (func_num_args() > 0)\n {\n $this->onReload( func_get_arg(0) );\n }\n else\n {\n $this->onReload();\n }\n }\n parent::show();\n }", "title": "" }, { "docid": "c0f693219f0cac2416162cd057f2ca6a", "score": "0.5258111", "text": "public function setData();", "title": "" }, { "docid": "06ffab76c76a0784bd7e5a14bdcb53c6", "score": "0.5253249", "text": "public function actionIndexGrid()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => BookingCphV2Hotel::find(),\n ]);\n\n return $this->render('index-grid', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "e98e5975ac5445211ae904bb479dc8bc", "score": "0.5252672", "text": "function getdata(){\n\t\t$grid = $this->jqdatagrid;\n\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('fiscalz');\n\n\t\t$response = $grid->getData('fiscalz', array(array()), array(), false, $mWHERE );\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "title": "" }, { "docid": "233e1ae95aa509085cc5e978b59b2d4f", "score": "0.52516073", "text": "protected function grid()\n {\n return Admin::grid(Store::class, function (Grid $grid) {\n // 設定條件\n $grid->model()->whereRaw('id = head_store_id');\n\n // 禁止功能\n //$grid->disableCreation();//創建\n //$grid->disablePagination();//分頁\n $grid->disableFilter();//查詢\n $grid->disableExport();//匯出\n $grid->disableRowSelector();//多選\n //$grid->disableActions();//操作\n\n $grid->id('ID')->sortable();\n\n $grid->column('brand', 'VIP');\n $grid->column('company.name', trans('idelivery.company.name'));\n $grid->column('name', trans('idelivery.store.name'));\n $grid->column('business_registration', '營業登記名稱');\n $grid->column('uniform_numbers', '統編');\n $grid->column('address', '店面地址');\n $grid->column('supervisor_name', '加盟主/店長');\n $grid->column('model_account', '分店管理帳號')->display(function ($title) {\n $admin_user = Admin_users::getStoeeAdminUser($this->id);\n if (empty($admin_user)) {\n return '<a href=\"/admin/management/set_company_store_user/' . $this->id . '/user/create\"><i class=\"fa fa-plus-circle fa-lg\" aria-hidden=\"true\"></i> 新增帳號 <i class=\"fa fa-user-plus\" aria-hidden=\"true\"></i></a>';\n } else {\n return $admin_user->username;\n }\n });\n $grid->column('status', '狀態')->switch($this->status_arr);\n\n //$grid->created_at();\n //$grid->updated_at();\n\n //$grid->actions(function ($actions) {\n //var_dump($actions->row->id);\n //$store_id = $actions->row->id;\n //$actions->append('<a href=\"/admin/management/set_company_store_user/' . $store_id . '/user/create\" class=\"fa fa-user-plus\"></a>');\n //});\n });\n }", "title": "" }, { "docid": "1d204ed50477f7e806d42b0a17685adb", "score": "0.52491874", "text": "protected function getViewData() {\r\n\t}", "title": "" }, { "docid": "52aabcc9ce5336010c8d482b3579d138", "score": "0.5248344", "text": "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$grid->setHeight('185');\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t$grid1 = $this->defgridit();\n\t\t$grid1->setHeight('190');\n\t\t$param['grids'][] = $grid1->deploy();\n\n\t\t// Configura los Paneles\n\t\t$readyLayout = $grid->readyLayout2( 212, 220, $param['grids'][0]['gridname'],$param['grids'][1]['gridname']);\n\n\t\t//Funciones que ejecutan los botones\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t//Botones Panel Izq\n\t\t$grid->wbotonadd(array('id'=>'imprime' ,'img'=>'assets/default/images/print.png','alt' => 'Reimprimir' ,'label'=>'Reimprimir Documento'));\n\t\t$grid->wbotonadd(array('id'=>'bconsolida','img'=>'images/candado.png' ,'alt' => 'Consolidar cierre','label'=>'Consolidar' ));\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t//Panel Central\n\t\t$centerpanel = $grid->centerpanel( $id = \"radicional\", $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita' , 'title'=>'Agregar/Editar cierre de producci&oacute;n'),\n\t\t\tarray('id'=>'fshow' , 'title'=>'Ver cierre de producci&oacute;n')\n\t\t);\n\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t$param['script'] = script('plugins/jquery.ui.autocomplete.autoSelectOne.js');\n\t\t$param['readyLayout'] = $readyLayout;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('LCIERRE', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('LCIERRE', 'JQ');\n\t\t$param['centerpanel'] = $centerpanel;\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$param['tamano'] = $this->datasis->getintramenu( substr($this->url,0,-1) );\n\t\t$this->load->view('jqgrid/crud2',$param);\n\n\t}", "title": "" }, { "docid": "6d685a897376dc17a7f43e2369ee439a", "score": "0.5248274", "text": "protected function grid()\n {\n return Admin::grid(Product::class, function (Grid $grid) {\n $grid->disableCreateButton();\n $grid->column(\"id\",\"ID\")->sortable();\n $grid->column('product_id',\"产品Id\")->sortable();\n $grid->column(\"name\",\"产品名称\");\n $grid->column(\"gallery_images\",\"产品主图\")->display(function ($galleryImages){\n if (isset($galleryImages[0])){\n return \"<img src='{$galleryImages[0]}' height='80'/>\";\n }\n return \"\";\n });\n $grid->column(\"origin_price\",\"原价\");\n $grid->column(\"shop_id\",\"店铺ID\");\n $grid->column(\"shop_name\",\"店铺名称\");\n $grid->column(\"product_link\",\"产品连接\")->display(function ($productLink){\n return \"<a href='{$productLink}' class='btn btn-success btn-sm'>查看产品</a>\";\n });\n $grid->column(\"shop_link\",\"店铺连接\")->display(function ($shopLink){\n return \"<a href='{$shopLink}' class='btn btn-primary btn-sm'>查看店铺</a>\";\n });\n $grid->created_at(\"创建时间\");\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->disableEdit();\n $editProductUrl = route(\"catalog.publish.product\",$actions->getKey());\n $actions->append(\"<a href='{$editProductUrl}' class='btn btn-sm btn-warning'>编辑发布</a>\");\n });\n /* $grid->tools(function ($tools) {\n $tools->append(new ImportDataSourceButton(TaobaoShopConfig::PLATFORM_TAOBAO));\n });*/\n });\n }", "title": "" }, { "docid": "d98109a2089579bdb5772ccb831f70ed", "score": "0.52382755", "text": "function getGridData(){\n\t\t$result_data\t\t=\t$this->getUsers();\n\t\t$response[\"error\"] \t= \tFALSE;\n\t\t$response[\"data\"] \t= \t$result_data;\n\t\techo json_encode($response);\n\t}", "title": "" }, { "docid": "515587baa0f5622fce2d3533954d010f", "score": "0.52365917", "text": "protected function grid()\n {\n return Admin::grid(Success::class, function (Grid $grid) {\n\n $grid->id('案例ID')->sortable();\n $grid->sm_image_url('图片缩略图')->display(function ($path) {\n \n // 记得带上端口号\n return 'http://127.0.0.1:83/uploads/'. $path;\n \n })->image(294,220);\n $grid->lg_image_url('案例正文图')->display(function ($path) {\n \n // 记得带上端口号\n return 'http://127.0.0.1:83/uploads/'. $path;\n \n })->image(200,200);\n $grid->category_id('所属类别')->editable('select',[1 => '室内除甲醛', 2 => '车内除甲醛', 3 => '新风系统', 4 => '空气检测']);\n $grid->column('title','案例名称')->editable();\n $grid->serve_time('服务时间')->editable('date');\n $grid->area('面积/型号等')->editable();\n $grid->serve_content('服务内容')->substr(1, 20)->editable('textarea');\n $grid->created_at()->sortable();\n $grid->updated_at();\n });\n }", "title": "" }, { "docid": "58bbe3dde942b28258451f762ffb02ad", "score": "0.52310807", "text": "public function __toString() {\n $uriParams='';\n $a=explode(\"?\",$_SERVER['REQUEST_URI']);\n if(isset($a[1])) {\n $a=explode(\"&\", $a[1]);\n $c=array();\n foreach($a as $d) {\n $b=explode(\"=\", $d);\n if($b[0]=='start' || $b[0]=='sort' || $b[0]=='desc' || $b[0]=='start') {\n continue;\n }\n $c[]=$d;\n }\n $uriParams=implode(\"&amp;\", $c).'&amp;';\n }\n\n if(is_null($this->sql->columns)) {\n $this->sql->columns=array_keys($this->columns);\n }\n $this->paginator->setItemCount($this->sql->getItemsCount());\n $this->sql->limit($this->paginator->getItemsPerPage());\n $this->sql->offset($this->paginator->getOffset());\n\n $this->setDefaultSort(@reset(array_keys($this->columns)), 'ASC');\n\n $this->sql->orderBy(array($this->sortBy => $this->sortOrder));\n\n \n \n $this->data=$this->sql->fetchData()->fetchAll();\n $this->template->registerHelper('plural', function($n, $one, $four, $more) {\n if (!is_int($n))\n throw new InvalidArgumentException(\"Argument \\$n must be integer, \" . (is_object($n) ? get_class($n) : gettype($n)) . \" given.\");\n if ($n == 0 || $n > 4)\n return $more;\n if ($n > 1 && $n < 5)\n return $four;\n if ($n == 1)\n return $one;\n }\n );\n\n \n $this->template->setFile(dirname(__FILE__).'/template/datagrid.latte');\n\n $this->template->showHeader=$this->showHeader;\n $this->template->uriParams=$uriParams;\n $this->template->paginator=$this->paginator;\n $this->template->sortBy=$this->sortBy;\n $this->template->sortOrder=$this->sortOrder;\n $this->template->columns=$this->columns;\n $this->template->enableSort=$this->enableSort;\n $this->template->data=$this->data;\n $this->template->grid=$this;\n \n return $this->template->__toString(TRUE);\n }", "title": "" }, { "docid": "14dc503119ebccef95730b6e0dfea38a", "score": "0.5230271", "text": "function getdata()\n\t{\n\t\t$grid = $this->jqdatagrid;\n\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('tiket');\n\t\t$mWHERE[] = array( '','padre','S','' );\n\n\t\t$response = $grid->getData('tiket', array(array()), array(), false, $mWHERE, 'tiket.id desc, tiket.estampa ', 'desc' );\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "title": "" }, { "docid": "4595cd578f21fa3983a54f2049838bc3", "score": "0.5228992", "text": "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$grid->setHeight('185');\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t$grid1 = $this->defgridit();\n\t\t$grid1->setHeight('190');\n\t\t$param['grids'][] = $grid1->deploy();\n\n\t\t// Configura los Paneles\n\t\t$readyLayout = $grid->readyLayout2( 212, 220, $param['grids'][0]['gridname'],$param['grids'][1]['gridname']);\n\n\t\t//Funciones que ejecutan los botones\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t//Botones Panel Izq\n\t\t$grid->wbotonadd(array('id'=>'imprime', 'img'=>'assets/default/images/print.png','alt' => 'Reimprimir', 'label'=>'Reimprimir Documento'));\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t//Panel Central\n\t\t$centerpanel = $grid->centerpanel( $id = 'radicional', $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita', 'title'=>'Agregar/Editar registro'),\n\t\t\tarray('id'=>'fborra', 'title'=>'Eliminar registro'),\n\t\t\tarray('id'=>'fshow' , 'title'=>'Mostrar registro')\n\t\t);\n\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t$funciones = '\n\t\tfunction ltransac(el, val, opts){\n\t\t\tvar link=\\'<div><a href=\"#\" onclick=\"tconsulta(\\'+\"\\'\"+el+\"\\'\"+\\');\">\\' +el+ \\'</a></div>\\';\n\t\t\treturn link;\n\t\t};';\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t//$param['script'] = script('plugins/jquery.ui.autocomplete.autoSelectOne.js');\n\t\t$param['readyLayout'] = $readyLayout;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('RIVC', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('RIVC', 'JQ');\n\t\t$param['centerpanel'] = $centerpanel;\n\t\t$param['funciones'] = $funciones;\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$param['tamano'] = $this->datasis->getintramenu( substr($this->url,0,-1) );\n\t\t$this->load->view('jqgrid/crud2',$param);\n\n\t}", "title": "" }, { "docid": "e38916c122432b25505fce940855fba6", "score": "0.52224", "text": "public function dataProvider(): array\n {\n return [\n [[new \\stdClass()],new \\stdClass()],\n ];\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.521498", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.521498", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.5213284", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.5213284", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "ffa7bf176cfe1f90b84c78e702286457", "score": "0.5211523", "text": "public function claimproviderAction() {\n $db_billingcompany = new Application_Model_DbTable_Billingcompany();\n $db = $db_billingcompany->getAdapter();\n $where = $db->quoteInto('id = ?', $this->billingcompany_id());\n $billingcompanyList = $db_billingcompany->fetchAll($where);\n\n $this->view->billingcompanyList = $billingcompanyList;\n\n $db_options = new Application_Model_DbTable_Options();\n $db = $db_options->getAdapter();\n $optionsList = $db_options->fetchAll(null, 'option_name ASC');\n $this->view->optionsList = $optionsList;\n\n $db_provider = new Application_Model_DbTable_Provider();\n $db = $db_provider->getAdapter();\n $where = $db->quoteInto('billingcompany_id = ?', $this->billingcompany_id());\n $providerList = $db_provider->fetchAll($where, 'provider_name ASC');\n $this->view->providerList = $providerList;\n }", "title": "" }, { "docid": "529a217be052c11d44337571d3e2e94f", "score": "0.5206399", "text": "protected function prepareDataProvider()\n {\n $requestParams = Yii::$app->getRequest()->getBodyParams();\n if (empty($requestParams)) {\n $requestParams = Yii::$app->getRequest()->getQueryParams();\n }\n $dataProvider = Yii::createObject([\n 'class' => ActiveDataProvider::class,\n 'pagination' => [\n 'params' => $requestParams,\n ],\n 'sort' => [\n 'params' => $requestParams,\n ],\n ]);\n if ($this->model->hasMethod('initDataProvider')) {\n $this->model->initDataProvider($dataProvider);\n } else {\n $modelClass = $this->modelClass;\n $dataProvider->query = $modelClass::find();\n }\n return $dataProvider;\n }", "title": "" }, { "docid": "6953b2f7d345609af0481a9c1faa0eec", "score": "0.5205811", "text": "public function servicesAction() {\n $billingcompany_id = $this->billingcompany_id();\n $db_provider = new Application_Model_DbTable_Provider();\n $db = $db_provider->getAdapter();\n $where = $db->quoteInto('billingcompany_id = ?', $this->billingcompany_id()); //\n $provider_data = $db_provider->fetchAll($where, \"provider_name ASC\");\n $this->view->providerList = $provider_data;\n }", "title": "" } ]
6b9d16bc4f5e23ff509973b91e219cb3
Returns the SESSION \Bonder\Collections\Map params.
[ { "docid": "51e8b9d544a3d207c8d8b2eee30b8528", "score": "0.0", "text": "public function getSession();", "title": "" } ]
[ { "docid": "b230f7cb1bf66d8e9f799f7756ea2e39", "score": "0.71772194", "text": "protected function getParameterMap()\n {\n return $this->_parameterMap;\n }", "title": "" }, { "docid": "dbe89d6c4f6e83664e91da7a11ccfda3", "score": "0.7167993", "text": "protected function getParameterMap() {\n return $this->_parameterMap;\n }", "title": "" }, { "docid": "dbe89d6c4f6e83664e91da7a11ccfda3", "score": "0.7167993", "text": "protected function getParameterMap() {\n return $this->_parameterMap;\n }", "title": "" }, { "docid": "dbe89d6c4f6e83664e91da7a11ccfda3", "score": "0.7167993", "text": "protected function getParameterMap() {\n return $this->_parameterMap;\n }", "title": "" }, { "docid": "dbe89d6c4f6e83664e91da7a11ccfda3", "score": "0.7167993", "text": "protected function getParameterMap() {\n return $this->_parameterMap;\n }", "title": "" }, { "docid": "dbe89d6c4f6e83664e91da7a11ccfda3", "score": "0.7167993", "text": "protected function getParameterMap() {\n return $this->_parameterMap;\n }", "title": "" }, { "docid": "dbe89d6c4f6e83664e91da7a11ccfda3", "score": "0.7167993", "text": "protected function getParameterMap() {\n return $this->_parameterMap;\n }", "title": "" }, { "docid": "dbe89d6c4f6e83664e91da7a11ccfda3", "score": "0.7167993", "text": "protected function getParameterMap() {\n return $this->_parameterMap;\n }", "title": "" }, { "docid": "11d6dd38aec65f560b97dc0995ce0e7c", "score": "0.6742826", "text": "protected function _getMapParams()\n {\n return array(\n 'album' => 'search_in',\n 'terms' => 'terms',\n 'is_color' => 'color',\n 'with_flash' => 'flash',\n 'aperture_value' => 'aperture',\n 'exposuretime' => 'exp_time',\n 'exposuremode' => 'exp_mode',\n 'exposureprogram' => 'exp_prod',\n 'lightsource' => 'light',\n 'whitebalance' => 'white',\n 'iso_speed_rating' => 'iso'\n );\n }", "title": "" }, { "docid": "ab5aba27b5794de31962cf98e1e305aa", "score": "0.66448057", "text": "public function getParams() {\r\n\t\t\r\n\t\t\r\n\t\t$ns = new Zend_Session_Namespace( $this->sesName );\r\n\t\t\r\n\t\t$result = array();\r\n\t\t\r\n\t\tif ( isset ( $ns->params ) )\r\n\t\t\t\r\n\t\t\t\t$result = $ns->params;\r\n\t\t\t\t\r\n\t\t\t \r\n\t\treturn $result;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "dd6fadd922eff2c259101aff23e9bc5c", "score": "0.6356762", "text": "public static function params(): array\n {\n $currentSessionData = [];\n if ('' !== session_id()) {\n $currentSessionData = session_get_cookie_params();\n }\n if (empty($currentSessionData)) {\n return [];\n }\n return $currentSessionData;\n }", "title": "" }, { "docid": "30f5da42a7da9c243203ae70686e92df", "score": "0.62274927", "text": "protected function getArgumentMap()\n {\n $argMap = array();\n\n $this->addParameterToMap($argMap, \"requestID\", $this->parameter->getSessionId() );\n $this->addParameterToMap($argMap, \"shopID\", $this->parameter->getShopId() );\n $this->addParameterToMap($argMap, \"sysLang\", \"XML\" );\n $this->addParameterToMap($argMap, \"clientLib\", self::LIBRARY_NAME );\n $this->addParameterToMap($argMap, \"apiVersion\", self::API_VERSION );\n $this->addParameterToMap($argMap, \"variantID\", $this->parameter->getVariantId() );\n \n return $argMap;\n }", "title": "" }, { "docid": "42ad552ab358d1926b7ca597c97e769a", "score": "0.6181868", "text": "public function getSearchParams()\n {\n return $this->session->read('search_params');\n }", "title": "" }, { "docid": "46304d69496d09551f2d5d718cf8117a", "score": "0.61770445", "text": "function getSessionParameters() {\n $user = \"\";\n if(isset($_SESSION[\"user\"]))\n $user = $_SESSION[\"user\"];\n $ip = \"127.0.0.1\";\n if(isset($_SERVER[\"REMOTE_ADDR\"]))\n $ip = $_SERVER[\"REMOTE_ADDR\"];\n $cookie = \"\";\n if(isset($_COOKIE[\"cookie\"]))\n $cookie = $_COOKIE[\"cookie\"];\n\n return array('user'=>$user, 'ip'=>$ip, 'cookie'=>$cookie);\n }", "title": "" }, { "docid": "1dcc236af3def01e1845a85d6f7420cd", "score": "0.60156125", "text": "public function params() : array\n {\n return [\n 'k' => $this->k,\n 'contamination' => $this->contamination,\n 'tree' => $this->tree,\n ];\n }", "title": "" }, { "docid": "694a80ae23237010c9ac88bf928d86ba", "score": "0.5976807", "text": "public function params()\n {\n return $this->params;\n }", "title": "" }, { "docid": "da8a11fcf6c1e45284bdf9e4f81c5be1", "score": "0.5973826", "text": "public function getServerParams()\n {\n return $this->serverParams->all();\n }", "title": "" }, { "docid": "4f134dfea045ca58bab067c13dfa1364", "score": "0.5968452", "text": "public static function getParams()\n {\n return self::$_params;\n }", "title": "" }, { "docid": "cfabbf057a8b81311ba2ad6e03fddfb3", "score": "0.59298486", "text": "public function getParams()\n {\n $params = array();\n $params['timestamp'] = time();\n return $params;\n }", "title": "" }, { "docid": "88de13296a3491e478896d70ea292ff0", "score": "0.59049195", "text": "public function getParams()\n\t{\n\t\treturn array( 'app' => $this->app, 'location' => $this->templateLocation, 'group' => $this->templateName );\n\t}", "title": "" }, { "docid": "c0c07d3d23fd2813c4df6cde4b6b8c6d", "score": "0.5899681", "text": "public function get_collection_params() {\n\t\t$params = array();\n\t\t$params['context'] = $this->get_context_param( array( 'default' => 'view' ) );\n\t\treturn $params;\n\t}", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.58194846", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.58194846", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.58194846", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.58194846", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.58194846", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.58194846", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.58194846", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.58194846", "text": "public function getParams();", "title": "" }, { "docid": "aaaab3c94be15f1a219e048d7533eade", "score": "0.58078617", "text": "public function GetParams() { \r\n return $this->params; \r\n }", "title": "" }, { "docid": "5ed24e0910575562506424dd558a4088", "score": "0.5800763", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('MESSAGE_PARAM_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'MESSAGE_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('MESSAGE_PARAM_ENTITY_MESSAGE_ID_FIELD'),\n\t\t\t),\n\t\t\t'PARAM_NAME' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateParamName'),\n\t\t\t\t'title' => Loc::getMessage('MESSAGE_PARAM_ENTITY_PARAM_NAME_FIELD'),\n\t\t\t),\n\t\t\t'PARAM_VALUE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateParamValue'),\n\t\t\t\t'title' => Loc::getMessage('MESSAGE_PARAM_ENTITY_PARAM_VALUE_FIELD'),\n\t\t\t),\n\t\t\t'PARAM_JSON' => array(\n\t\t\t\t'data_type' => 'text',\n\t\t\t\t'title' => Loc::getMessage('MESSAGE_PARAM_ENTITY_PARAM_JSON_FIELD'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "1dee09f141185895d52c397945734c64", "score": "0.5796154", "text": "public function getParameters()\n {\n return $this->getParameterBag()->all();\n }", "title": "" }, { "docid": "815597d5d5ded104c6fcd472abe8f4b8", "score": "0.57878035", "text": "public function getParams()\n {\n $params = $this->params;\n\n return $params;\n }", "title": "" }, { "docid": "4dfecc18044c1c220ef2ef60f8c7a85e", "score": "0.57819283", "text": "public function params();", "title": "" }, { "docid": "6e4866efdba79177e1fe0ef8b6c78490", "score": "0.5777239", "text": "public function getParameterBag()\n {\n return $this->parameterBag;\n }", "title": "" }, { "docid": "0d4a720dce0b7435d237ad9e2fa29482", "score": "0.5776908", "text": "public function getParameterKeys(): array;", "title": "" }, { "docid": "d95c8b1eb8a566534dc62c1ca805a7a6", "score": "0.57548875", "text": "public function getParams() {\n \treturn $this->_params;\n }", "title": "" }, { "docid": "7223cd1610e21d80e2971cd6ee7fe08e", "score": "0.5747497", "text": "public function getParams()\n {\n\treturn $this->params;\n }", "title": "" }, { "docid": "06e3fe338a62ef39742ef827a063844c", "score": "0.5741476", "text": "public function getParams() {\r\n\t\treturn $this->params;\r\n\t}", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "67bf7dc13ac6047baa9f7a7466c9b944", "score": "0.57407665", "text": "public function getParams()\n {\n return $this->params;\n }", "title": "" }, { "docid": "60f44688c9e42a8ebcabd645acd3a637", "score": "0.5737492", "text": "public function getParams()\n\t\t{\n\t\t\treturn $this->params;\n\t\t}", "title": "" }, { "docid": "b601eafee5031335f9aec8851bc43c40", "score": "0.5733918", "text": "public function getParams(){\n return $this->params;\n }", "title": "" }, { "docid": "9baf77d9d147705a4a2537e6e25abc7d", "score": "0.57248396", "text": "public function getParams()\n\t{\n\t return $this->params;\n\t}", "title": "" }, { "docid": "dee0a8b1fb05a78dab6e973831f4fb26", "score": "0.5723075", "text": "public function getParams() {\n return $this->params;\n }", "title": "" }, { "docid": "04ad0721e6f831f9b4fd9f5cf3697f31", "score": "0.57083267", "text": "public function getParameters()\n {\n $paramArray = array(\"adminId\" => $this->adminId,\n \"userName\" => $this->userName,\n \"password\" => $this->password\n );\n return $paramArray;\n }", "title": "" }, { "docid": "95b1d9aadb150c1d5f0d6b3ffe604e1c", "score": "0.57042676", "text": "public function getParameterKeys()\n\t{\n\t\treturn $this->compile()->getVariables();\n\t}", "title": "" }, { "docid": "bf330badbbe78cd7261a34cbb9674983", "score": "0.5698358", "text": "public static function getParams() {\n \treturn self::getParameters();\n }", "title": "" }, { "docid": "d064c5cf24cc2db9728eac6842d7a216", "score": "0.56967115", "text": "public function getParameters() {\r\n\t\t$paramArray = array(\"userID\" => $this->userID,\r\n\t\t\t\t \"username\" => $this->username,\r\n\t\t\t\t \"password\" => $this->password,\r\n\t\t\t\t \"userDateCreated\" => $this->userDateCreated,\r\n\t\t\t\t \"isAuthenticated\" => $this->isAuthenticated\r\n\t\t );\r\n\t\treturn $paramArray;\r\n\t}", "title": "" }, { "docid": "9dd5c94c74c679db6ecc9661cc6e981e", "score": "0.56964326", "text": "public function getParams()\n {\n return $this->_params;\n }", "title": "" }, { "docid": "731cd70bedd14b40ff5225efa11d32d7", "score": "0.5682188", "text": "public function getImageMapParams($image_map = null) {\n\n //TODO: Support having custom-maps defined via the EM config\n $image_maps = $this->getConfig()['default-image-maps'];\n if ($image_map !== null && isset($image_maps[$image_map])) {\n return $image_maps[$image_map];\n } else {\n return $image_maps;\n }\n\n }", "title": "" }, { "docid": "6fb9ec681a12c48c238d7798b16b56ae", "score": "0.5679423", "text": "public function getParamsList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "773f58b814f9097708d610cf312524f7", "score": "0.56706464", "text": "public function getParams()\n {\n return json_decode($this->parameters, true);\n }", "title": "" }, { "docid": "720dcb5bee33cf8aaff6d2ff5ca67ed5", "score": "0.5668282", "text": "protected function getParams() {\r\n $params = array();\r\n $get = $this->getRequest()->getGet();\r\n\r\n $params[HttpKeys::MEASURE_ID] = $get->has(HttpKeys::MEASURE_ID) ? $get->get(HttpKeys::MEASURE_ID) : uniqid();\r\n\r\n if ($get->has(HttpKeys::REQUEST_ID)) {\r\n $params[HttpKeys::REQUEST_ID] = $get->get(HttpKeys::REQUEST_ID);\r\n }\r\n\r\n return $params;\r\n }", "title": "" }, { "docid": "fa021e1bfcfd0df9deba437730948f3a", "score": "0.56680787", "text": "public function getParams() {\n return $this->params;\n }", "title": "" }, { "docid": "352aaaf1d3b0110e49898b994bd80da1", "score": "0.56633073", "text": "public final function getRequestParams()\r\n {\r\n \treturn $this->getRequestData();\r\n }", "title": "" }, { "docid": "fe9ddafbbe521512dc46a36ea73618e1", "score": "0.5656736", "text": "public function getParams()\n {\n return array_merge($this->_default, $this->_params);\n }", "title": "" }, { "docid": "9241e703009888e1d496a59199b028bc", "score": "0.56470966", "text": "public function getServerParams()\n {\n return $this->serverParams;\n }", "title": "" }, { "docid": "9241e703009888e1d496a59199b028bc", "score": "0.56470966", "text": "public function getServerParams()\n {\n return $this->serverParams;\n }", "title": "" }, { "docid": "74249e2ea61afb740ca1bb3e8e09b5b8", "score": "0.5644382", "text": "public function get_collection_params() {\n\t\treturn array(\n\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t);\n\t}", "title": "" }, { "docid": "74249e2ea61afb740ca1bb3e8e09b5b8", "score": "0.5644382", "text": "public function get_collection_params() {\n\t\treturn array(\n\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t);\n\t}", "title": "" }, { "docid": "a96db61fc6dc2b7778057b3c981a852c", "score": "0.5639031", "text": "public function appParams()\n {\n return [];\n }", "title": "" }, { "docid": "5a20d3f7dc41834228d73c1c7359304d", "score": "0.5637311", "text": "public static function getParams() {\r\n\t}", "title": "" }, { "docid": "a50e24c505c12b0546c2e798b1144c30", "score": "0.56316286", "text": "public function getServerParams() {\n\n\t\treturn $this->http_message->getServerParams();\n\t}", "title": "" }, { "docid": "9557fb4868300a66bbf223313b577a6a", "score": "0.5627917", "text": "public function getParams() {\n return $this->_params;\n }", "title": "" }, { "docid": "9557fb4868300a66bbf223313b577a6a", "score": "0.5627917", "text": "public function getParams() {\n return $this->_params;\n }", "title": "" }, { "docid": "9557fb4868300a66bbf223313b577a6a", "score": "0.5627917", "text": "public function getParams() {\n return $this->_params;\n }", "title": "" }, { "docid": "9557fb4868300a66bbf223313b577a6a", "score": "0.5627917", "text": "public function getParams() {\n return $this->_params;\n }", "title": "" }, { "docid": "6a93985665e4940d785e3cb4af8b7eb2", "score": "0.5596211", "text": "public function getParameters() {\n return $this->_params;\n }", "title": "" }, { "docid": "f8ae87c87739e6efc7d416392b3a1063", "score": "0.5593718", "text": "public function get_collection_params() {\n\t\treturn $this->collection_params;\n\t}", "title": "" }, { "docid": "5756234c945e0e261743f80a343321f4", "score": "0.55907", "text": "public function getParams()\n {\n if (empty($this->request)) { return array(); }\n return $this->request->getParams();\n }", "title": "" }, { "docid": "276f1f6158e6b98018793bf2e6ed1f7d", "score": "0.55851257", "text": "public function getRequestParams()\n {\n return $this->getCustomParams();\n }", "title": "" }, { "docid": "3b7ad1635d1037511a47c25d5e45c2e4", "score": "0.5577693", "text": "public static function getParameters(){\n\t\treturn self::$_parameters;\n\t}", "title": "" }, { "docid": "72bcd31af4badfd8db1d899262f3b1f2", "score": "0.55738735", "text": "public static function getParameters(){\n return array(\n 'longitude' => array(\n 'required' => false,\n 'description' => 'Longitude'\n ),\n 'latitude' => array(\n 'required' => false,\n 'description' => 'Latitude'\n ),\n 'name' => array(\n 'required' => false,\n 'description' => 'Name'\n ),\n 'id' => array(\n 'required' => false,\n 'description' => 'Id'\n ),\n 'offset' => array(\n 'required' => false,\n 'description' => 'Offset'\n ),\n 'rowcount' => array(\n 'required' => false,\n 'description' => 'Rowcount'\n )\n );\n }", "title": "" }, { "docid": "d45c49d7562e898e247b326182d16a5b", "score": "0.5558766", "text": "public static function get_parameters() {\n $retVal = array_merge(\n iform_map_get_map_parameters(),\n array(array(\n 'name' => 'interface',\n 'caption' => 'Interface Style Option',\n 'description' => 'Choose the style of user interface, either dividing the form up onto separate tabs, ' .\n 'wizard pages or having all controls on a single page.',\n 'type' => 'select',\n 'options' => array(\n 'tabs' => 'Tabs',\n 'wizard' => 'Wizard',\n 'one_page' => 'All One Page',\n ),\n 'default' => 'one_page',\n 'group' => 'User Interface',\n ),\n // List of fields to hide in the Species Details section.\n array(\n 'name' => 'fields',\n 'caption' => 'Fields to include or exclude',\n 'description' => 'List of data fields to hide, one per line.' .\n 'Type in the field name as seen exactly in the Species Details section. For custom attributes you should use the system function values ' .\n 'to filter instead of the caption if defined below.',\n 'type' => 'textarea',\n 'required' => FALSE,\n 'default' => '',\n 'group' => 'Fields for Species details',\n ),\n array(\n 'name' => 'operator',\n 'caption' => 'Include or exclude',\n 'description' => \"Do you want to include only the list of fields you've defined, or exclude them?\",\n 'type' => 'select',\n 'options' => array(\n 'in' => 'Include',\n 'not in' => 'Exclude',\n ),\n 'default' => 'not in',\n 'group' => 'Fields for Species details',\n ),\n array(\n 'name' => 'testagainst',\n 'caption' => 'Test attributes against',\n 'description' => 'For custom attributes, do you want to filter the list to show using the caption or the system function? If the latter, then '.\n 'any custom attributes referred to in the fields list above should be referred to by their system function which might be one of: email, '.\n 'cms_user_id, cms_username, first_name, last_name, full_name, biotope, behaviour, reproductive_condition, sex_stage, sex_stage_count, ' .\n 'certainty, det_first_name, det_last_name.',\n 'type' =>'select',\n 'options' => array(\n 'caption' => 'Caption',\n 'system_function' => 'System Function',\n ),\n 'default' => 'caption',\n 'group' => 'Fields for Species details',\n ),\n //Allows the user to define how the page will be displayed.\n array(\n 'name' => 'structure',\n 'caption' => 'Form Structure',\n 'description' => 'Define the structure of the form. Each component must be placed on a new line. <br/>'.\n \"The following types of component can be specified. <br/>\".\n \"<strong>[control name]</strong> indicates a predefined control is to be added to the form with the following predefined controls available: <br/>\".\n \"&nbsp;&nbsp;<strong>[speciesdetails]</strong> - displays information relating to the occurrence and its sample<br/>\".\n \"&nbsp;&nbsp;<strong>[explore]</strong> - a button “Explore this species' records” which takes you to explore all records, filtered to the species.<br/>\".\n \"&nbsp;&nbsp;<strong>[photos]</strong> - photos associated with the occurrence<br/>\".\n \"&nbsp;&nbsp;<strong>[map]</strong> - a map that links to the spatial reference and location<br/>\".\n \"&nbsp;&nbsp;<strong>[occurrenceassociations]</strong> - a list of associated species, drawn from the occurrence associations data.<br/>\".\n \"<strong>=tab/page name=</strong> is used to specify the name of a tab or wizard page (alpha-numeric characters only). \".\n \"If the page interface type is set to one page, then each tab/page name is displayed as a seperate section on the page. \".\n \"Note that in one page mode, the tab/page names are not displayed on the screen.<br/>\".\n \"<strong>|</strong> is used to split a tab/page/section into two columns, place a [control name] on the previous line and following line to split.<br/>\",\n 'type' => 'textarea',\n 'default' => '\n=General=\n[speciesdetails]\n[photos]\n[explore]\n|\n[map]',\n 'group' => 'User Interface'\n ),\n array(\n 'name' => 'explore_url',\n 'caption' => 'Explore URL',\n 'description' => 'When you click on the Explore this species\\' records button you are taken to this URL. Use {rootfolder} as a replacement '.\n 'token for the site\\'s root URL.',\n 'type' => 'string',\n 'required' => FALSE,\n 'default' => '',\n 'group' => 'User Interface'\n ),\n array(\n 'name' => 'explore_param_name',\n 'caption' => 'Explore Parameter Name',\n 'description' => 'Name of the parameter added to the Explore URL to pass through the taxon_meaning_id of the species being explored. '.\n 'The default provided (filter-taxon_meaning_list) is correct if your report uses the standard parameters configuration.',\n 'type' => 'string',\n 'required' => FALSE,\n 'default' => 'filter-taxon_meaning_list',\n 'group' => 'User Interface'\n ),\n array(\n 'name' => 'include_layer_list',\n 'caption' => 'Include Legend',\n 'description' => 'Should a legend be shown on the page?',\n 'type' => 'boolean',\n 'required' => FALSE,\n 'default' => FALSE,\n 'group' => 'Other Map Settings'\n ),\n array(\n 'name' => 'include_layer_list_switchers',\n 'caption' => 'Include Layer switchers',\n 'description' => 'Should the legend include checkboxes and/or radio buttons for controlling layer visibility?',\n 'type' => 'boolean',\n 'required' => FALSE,\n 'default' => FALSE,\n 'group' => 'Other Map Settings'\n ),\n array(\n 'name' => 'include_layer_list_types',\n 'caption' => 'Types of layer to include in legend',\n 'description' => 'Select which types of layer to include in the legend.',\n 'type' => 'select',\n 'options' => array(\n 'base,overlay' => 'All',\n 'base' => 'Base layers only',\n 'overlay' => 'Overlays only'\n ),\n 'default' => 'base,overlay',\n 'group' => 'Other Map Settings'\n ),\n array(\n 'name' => 'layer_title',\n 'caption' => 'Layer Caption',\n 'description' => 'Caption to display for the species distribution map layer. Can contain replacement strings {species} or {survey}.',\n 'type' => 'textfield',\n 'group' => 'Distribution Layer'\n ),\n array(\n 'name' => 'wms_feature_type',\n 'caption' => 'Feature Type',\n 'description' => 'Name of the feature type (layer) exposed in GeoServer to contain the occurrences. This must expose a taxon_meaning_id and a website_id attribute. '.\n 'for the filtering. The detail_occurrences view is suitable for this purpose, though make sure you include the namespace, e.g. indicia:detail_occurrences. '.\n 'The list of feature type names can be viewed by clicking on the Layer Preview link in the GeoServer installation.',\n 'type' => 'textfield',\n 'group' => 'Distribution Layer'\n ),\n array(\n 'name' => 'wms_style',\n 'caption' => 'Style',\n 'description' => 'Name of the SLD style file that describes how the distribution points are shown. Leave blank if not sure.',\n 'type' => 'textfield',\n 'required' => FALSE,\n 'group' => 'Distribution Layer'\n ),\n array(\n 'name' => 'cql_filter',\n 'caption' => 'Distribution layer filter.',\n 'description' => 'Any additional filter to apply to the loaded data, using the CQL format. For example \"record_status<>\\'R\\'\"',\n 'type' => 'textarea',\n 'group' => 'Distribution Layer',\n 'required' => FALSE\n ),\n array(\n 'name' => 'refresh_timer',\n 'caption' => 'Automatic reload seconds',\n 'description' => 'Set this value to the number of seconds you want to elapse before the report will be automatically reloaded, useful for '.\n 'displaying live data updates at BioBlitzes. Combine this with Page to reload to define a sequence of pages that load in turn.',\n 'type' => 'int',\n 'required' => FALSE\n ),\n array(\n 'name' => 'load_on_refresh',\n 'caption' => 'Page to reload',\n 'description' => 'Provide the full URL of a page to reload after the number of seconds indicated above.',\n 'type' => 'string',\n 'required' => FALSE\n ))\n );\n return $retVal;\n }", "title": "" }, { "docid": "4e7db4122cf8c2c03d1f52684fc93263", "score": "0.5555863", "text": "private function getRequestParams()\n {\n $params = $_REQUEST;\n if (0 === count($params)) {\n foreach ($this->constructorParams as $key => $value) {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }", "title": "" }, { "docid": "44d7d10d22f2dc568f1c1696a73185ae", "score": "0.5548176", "text": "private function __allParameters() {\n\t\t$query = $this->__queryString();\n\t\tif (substr($query, 0, 1) == '?') {\n\t\t\t$query = substr($query, 1);\n\t\t}\n\t\t$requestParams = HttpSocket::parseQuery($query);\n\t\tforeach($requestParams as $k => $v) {\n\t\t\tif (!is_array($requestParams[$k])) {\n\t\t\t\t$requestParams[$k] = array($requestParams[$k]);\n\t\t\t}\n\t\t}\n\t\tif (isset($this->options['parameters'])) {\n\t\t\tforeach($this->options['parameters'] as $k => $v) {\n\t\t\t\tif (isset($requestParams[$k])) {\n\t\t\t\t\tif (is_array($requestParams[$k])) {\n\t\t\t\t\t\t$requestParams[$k][] = $v;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$requestParams[$k] = Set::flatten(array($requestParams[$k], $v));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (!is_array($v)) {\n\t\t\t\t\t\t$v = array($v);\n\t\t\t\t\t}\n\t\t\t\t\t$requestParams[$k] = Set::flatten($v);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $requestParams;\n\t}", "title": "" }, { "docid": "5b010c87e6175562aea73041e6cd162a", "score": "0.55386764", "text": "public function getParameters(): array\n\t{\n\t\treturn $this->params;\n\t}", "title": "" }, { "docid": "d799a2ccc0e22453d13254ee58eea3bd", "score": "0.5536025", "text": "public function getParameterKeys()\r\n\t{\r\n\t\treturn array_keys($this->aParameterMap);\r\n\t}", "title": "" }, { "docid": "d17e138bb94f0dfcbeddf626b65309ef", "score": "0.5535013", "text": "public function getAsMap() {\n\t\t$infomap = array();\n\t\t$keys = array('scannerid','scannername','server','protocol','username','password','ssltype','sslmethod','connecturl','searchfor','markas','isvalid','rules');\n\t\tforeach ($keys as $key) {\n\t\t\t$infomap[$key] = $this->$key;\n\t\t}\n\t\t$infomap['requireRescan'] = $this->checkRescan();\n\t\treturn $infomap;\n\t}", "title": "" }, { "docid": "6ccfc48422b07a36332f2ccb47ea38dc", "score": "0.553164", "text": "function getParams() { }", "title": "" }, { "docid": "9807cfa455634fd4910db6d7fad31154", "score": "0.5531093", "text": "public function getParameters(): array\n {\n return $this->params;\n }", "title": "" } ]
35ea838bcaf640ddf84fb231b8c72ad1
get equipment lighting list for equipment
[ { "docid": "eb3ca73d3b41bd23b1643cf344c6bcef", "score": "0.6952422", "text": "public function getEquipmentLightingList($equipmentId)\n {\n\n $lightings = array();\n\n $sql = \"SELECT * FROM \" . TB_EQUIPMENT_LIGHTING . \"\n\t\t\t\tWHERE equipment_id={$this->db->sqltext($equipmentId)}\";\n $this->db->query($sql);\n $rows = $this->db->fetch_all_array();\n\n if ($this->db->num_rows() == 0) {\n return false;\n }\n foreach ($rows as $row) {\n $lighting = new EquipmentLighting($this->db);\n foreach ($row as $key => $value) {\n if (property_exists($lighting, $key)) {\n $lighting->$key = $value;\n }\n }\n $lightings[] = $lighting;\n }\n return $lightings;\n }", "title": "" } ]
[ { "docid": "3efe59d36b6af03ce0feb4290dae3452", "score": "0.6339698", "text": "function getLightIdsList() {\n\t\n\t\tglobal $bridge, $key;\n\t\t$pest = new Pest(\"http://$bridge/api/$key/\");\n\n\t\t$result = json_decode($pest->get('lights'), true);\n\t\t$targets = array_keys($result);\n\t\treturn $targets;\n}", "title": "" }, { "docid": "cc2685aaf9c64e40fd2d92eb59dcb41a", "score": "0.63201916", "text": "public function index()\n {\n return $this->hue->getLights();\n }", "title": "" }, { "docid": "ebfcd8d40c364ba1ebb2da1d0e37f1a9", "score": "0.600442", "text": "public function getEquipList(){\r\n return $this->_get(5);\r\n }", "title": "" }, { "docid": "11f1756759e7789fecc33df689d58b81", "score": "0.566342", "text": "public function getUnlockhairList(){\n return $this->_get(3);\n }", "title": "" }, { "docid": "5a76e38d7f28b2174b5360eecead98bc", "score": "0.563451", "text": "public function getAllArmor(): array{\r\n return $this->getConfig()->getAll();\r\n }", "title": "" }, { "docid": "891f682c6afc39198605f87066c02d2e", "score": "0.56092304", "text": "public function light() { return $this->_m_light; }", "title": "" }, { "docid": "871c4c42d86e2d5d63d363268ee38fbb", "score": "0.55756295", "text": "private static function getArmor(): array\n {\n return [\n PlayerEquipment::create('No armor', 0, 0, 0),\n\n PlayerEquipment::create('Leather', 13, 0, 1),\n PlayerEquipment::create('Chainmail', 31, 0, 2),\n PlayerEquipment::create('Splintmail', 53, 0, 3),\n PlayerEquipment::create('Bandedmail', 75, 0, 4),\n PlayerEquipment::create('Platemail', 102, 0, 5),\n\n ];\n }", "title": "" }, { "docid": "b0e78163ac6e3091555e0ea364630d13", "score": "0.557375", "text": "private function ImportEquipment()\n {\n\t\tDebug::log('<hr><h3>Common Equipment</h3>', LEVEL_NORMAL);\n\n global $mysql;\n\n $equipment = simplexml_load_file($this->vehicles_path . '/common/optional_devices.xml');\n\n foreach($equipment->children() as $node => $item) {\n $icon = (string)$item->icon;\n $icon = explode(' ', $icon);\n $icon = $icon[0];\n $icon = str_replace('../maps/icons/artefact/', '', $icon);\n \n $price = 0;\n $price_gold = 0;\n if (isset($item->price->gold))\n {\n $price_gold = (int)$item->price;\n }else{\n $price = (int)$item->price;\n }\n \n $weight = 0;\n if (isset($item->script->weight))\n $weight = (int)$item->script->weight;\n \n $include = '';\n $exclude = '';\n \n $inc = 'include';\n if (isset($item->vehicleFilter->$inc->vehicle->tags)){\n $include = (string)$item->vehicleFilter->$inc->vehicle->tags;\n }\n if (isset($item->vehicleFilter->exclude->vehicle->tags)){\n $exclude = (string)$item->vehicleFilter->exclude->vehicle->tags;\n }\n \n //remove tabs\n $include = preg_replace('/\\s+/', ' ', $include);\n $exclude = preg_replace('/\\s+/', ' ', $exclude);\n \n $data = array(\n 'wot_version_id' => $this->versionId,\n 'name' => $this->TranslateToLocal((string)$item->userString),\n 'name_node' => $node,\n 'description' => $this->TranslateToLocal((string)$item->description),\n 'icon' => $icon,\n 'price' => $price,\n 'price_gold' => $price_gold,\n 'removable' => (mb_strtolower(((string)$item->removable)) == mb_strtolower('true') ? 1 : 0),\n 'weight' => $weight,\n 'vehicle_tags_include' => $mysql->quoteString($include),\n 'vehicle_tags_exclude' => $mysql->quoteString($exclude)\n );\n \n $this->InsertData('wot_equipment',$node,\"name_node = '$node' AND wot_version_id = '$this->versionId'\",$data);\n\n $equipment_id = $mysql->query(\"SELECT wot_equipment_id FROM wot_equipment WHERE name_node = '$node' AND wot_version_id = '$this->versionId'\");\n $equipment_id = $mysql->row($equipment_id);\n $equipment_id = $equipment_id['wot_equipment_id'];\n\n $break = false;\n \n foreach($item->script->children() as $param_node => $param_value) {\n if ($param_node == 'weight'){\n continue;\n }\n if ($param_node == 'attribute' || $param_node == 'value' || $param_node == 'factor') {\n $data = array(\n 'wot_equipment_id' => $equipment_id,\n 'param' => (string)$item->script->attribute,\n 'value' => isset($item->script->value) ? (string)$item->script->value : (string)$item->script->factor\n );\n $break = true;\n } else {\n $data = array(\n 'wot_equipment_id' => $equipment_id,\n 'param' => (string)$param_node,\n 'value' => (string)$param_value\n );\n }\n if (strpos($data['param'], '/'))\n {\n $data['param'] = substr($data['param'], strpos($data['param'], '/')+1);\n }\n \n $this->InsertData('wot_equipment_params',$node,\"wot_equipment_id = '$equipment_id' AND param = '{$data['param']}'\",$data);\n\n if ($break)\n {\n break;\n }\n }\n \n }\n }", "title": "" }, { "docid": "19c8f21349d00f06bf9919fefb2c66e9", "score": "0.5560968", "text": "public function getWholinemeList(){\n return $this->_get(2);\n }", "title": "" }, { "docid": "123843cc66cf6576e913fdfc5a087225", "score": "0.55407083", "text": "public function getEquipment()\n\t{\n\t\treturn $this->equipment;\n\t}", "title": "" }, { "docid": "af8930a7591519eb04669c1361887bc0", "score": "0.55187887", "text": "public function equipment_type(){\n\t\t\t$equip_type_qry = $this->db->prepare(\"SELECT * FROM truck_type WHERE status = '1'\");\n\t\t\t$equip_type_qry->execute();\n\t\t\t$fetch= array();\n\t\t\twhile($equip_type_row = $equip_type_qry->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$fetch[]=$equip_type_row;\n\t\t\t}\n\t\t\treturn $fetch;\n\t\t}", "title": "" }, { "docid": "ca459f5c57a26657c96e89b776211d98", "score": "0.5492648", "text": "public static function getListLugar()\n\t{\n\t\treturn CHtml ::listData(ExpLugar::model()->findAll(),'id_exp_lugar',\n\t\t\t'exp_lugar');\n\t}", "title": "" }, { "docid": "7d01588b21d04c5277e7aa1da7b301b9", "score": "0.5477828", "text": "public function getAllLightAttributes(){\n\t\treturn $this->dev_attributes;\n\t}", "title": "" }, { "docid": "187269a6932b1261a873eaad79162853", "score": "0.54512197", "text": "public function show($id)\n {\n return $this->hue->findLight($id)->toArray();\n }", "title": "" }, { "docid": "6878473de92255cea64d4a873e2774c1", "score": "0.5442473", "text": "public function get_low()\n\t{\n\t\t$out = array();\n\t\t$sql = \"SELECT bluetooth.serial_number, machine.computer_name,\n\t\t\t\t\t\t\tbluetooth.keyboard_battery, bluetooth.mouse_battery,\n\t\t\t\t\t\t\tbluetooth.trackpad_battery\n\t\t\t\t\t\tFROM bluetooth\n\t\t\t\t\t\tLEFT JOIN reportdata USING (serial_number)\n\t\t\t\t\t\tLEFT JOIN machine USING (serial_number)\n\t\t\t\t\t\tWHERE ((bluetooth.keyboard_battery BETWEEN 0 AND 14)\n\t\t\t\t\t\t\tOR (bluetooth.mouse_battery BETWEEN 0 AND 14)\n\t\t\t\t\t\t\tOR (bluetooth.trackpad_battery BETWEEN 0 AND 14))\n\t\t\t\t\t\t\".get_machine_group_filter('AND');\n\t\tforeach($this->query($sql) as $obj)\n\t\t{\n\t\t\t$out[] = $obj;\n\t\t}\n\t\t\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "d9d7263373a47032734ea3345e766cb5", "score": "0.54404086", "text": "function get_list() {\n $this->db->select('mech_name, mech_desc_short, mech_thumb')->from('machines')->order_by(\"mech_name\", \"asc\");\n $query = $this->db->get();\n return $query->result_array();\n }", "title": "" }, { "docid": "7e1e9814eb35762b1b8d7a0a316ca29b", "score": "0.5433464", "text": "public function getTaskLightValues() {\n // initialize a new ArrayList\n $list = new TechDivision_Collections_ArrayList();\n // load the Collection with all available tasks\n $collection = TDProject_Project_Model_Utils_TaskUtil::getHome($this->getContainer())\n ->findAll();\n // assemble the entities\n foreach ($collection as $task) {\n $list->add($task->getLightValue());\n }\n // return the ArrayList with the TaskLightValue's\n return $list;\n }", "title": "" }, { "docid": "0a19635c04020a0378ffe4b61162caab", "score": "0.5429448", "text": "public function get_equipment_info($equipment){\n\t\tforeach($equipment as $glpi_id){\n\n\t\t\tif($parts=self::get_GLPI($glpi_id['glpi_id'])){\n\t\t\t\t$parts[$glpi_id['glpi_id']]['reservation_equipment_idx']=$glpi_id['reservation_equipment_idx'];\n\t\t\t\t$equipment_info[]= $parts;\n\n\t\t\t}else{\n\t\t\t\t$parts=array(\n\t\t\t\t\t\t$glpi_id['glpi_id'] => array(\n\t\t\t\t\t\t\t\t\t\t\"model\" => \"N/A\", \n\t\t\t\t\t\t\t\t\t\t\"type\" => \"N/A\", \n\t\t\t\t\t\t\t\t\t\t\"reservation_equipment_idx\" => $glpi_id['reservation_equipment_idx']\n\t\t\t\t));\n\t\t\t\t$equipment_info[]=$parts;\n\n\t\t\t}\n\t\t}\n\treturn $equipment_info;\n\n\t}", "title": "" }, { "docid": "258b3664a40e2118954e11a6e7e75e2f", "score": "0.5408916", "text": "public function getElectricDevices()\n {\n return $this->hasMany(ElectricDevice::className(), ['check_status_id' => 'check_status_id']);\n }", "title": "" }, { "docid": "72fb37bcf2c80bed7d046e787216c2c3", "score": "0.5355578", "text": "private function fleets(){\n\t\t\tif($this->get_request_method() != \"GET\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t$sql = mysql_query(\"SELECT device_id, device_label, last_reported, if(TIMESTAMPDIFF(HOUR, last_reported, now()) < 24,'OK','OFFLINE') AS status FROM fleets\", $this->db);\n\t\t\tif(mysql_num_rows($sql) > 0){\n\t\t\t\t$result = array();\n\t\t\t\twhile($rlt = mysql_fetch_array($sql,MYSQL_ASSOC)){\n\t\t\t\t\t$result[] = $rlt;\n\t\t\t\t}\n\t\t\t\t// Return list in JSON format\n\t\t\t\t$this->response($this->json($result), 200);\n\t\t\t}\n\t\t\t$this->response('',204);\t\n\t\t}", "title": "" }, { "docid": "70371e7bb8346840c078839db9276a15", "score": "0.53188014", "text": "function equipment()\n {\n global $db;\n\n $arrEquip = array(array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'N', 0),\n array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'N', 0),\n array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'N', 0),\n array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'N', 0),\n array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'N', 0),\n array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'N', 0),\n array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'N', 0),\n array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'N', 0),\n array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'N', 0),\n array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'N', 0),\n array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'N', 0),\n\t\t\t array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'N', 0),\n\t\t\t array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'N', 0));\n $arrEquiptype = array('W', 'B', 'H', 'A', 'L', 'S', 'R', 'T', 'C', 'I', 'E');\n $objEquip = $db -> Execute(\"SELECT `id`, `name`, `power`, `type`, `minlev`, `zr`, `wt`, `szyb`, `poison`, `ptype`, `maxwt`, `magic`, `repair` FROM `equipment` WHERE `owner`=\".$this -> id.\" AND status='E'\");\n while (!$objEquip -> EOF)\n\t {\n $intKey = array_search($objEquip -> fields['type'], $arrEquiptype);\n if ($arrEquip[9][0] && $objEquip -> fields['id'] != $arrEquip[9][0] && $objEquip -> fields['type'] == 'I')\n {\n $intKey = 10;\n }\n\t elseif ($arrEquip[0][0] && $objEquip -> fields['id'] != $arrEquip[0][0] && $objEquip -> fields['type'] == 'W')\n\t {\n\t\t$intKey = 11;\n\t }\n\t elseif ($objEquip->fields['type'] == 'E')\n\t {\n\t\t$intKey = 12;\n\t }\n $arrEquip[$intKey][0] = $objEquip -> fields['id'];\n $arrEquip[$intKey][1] = $objEquip -> fields['name'];\n $arrEquip[$intKey][2] = $objEquip -> fields['power'];\n $arrEquip[$intKey][3] = $objEquip -> fields['ptype'];\n $arrEquip[$intKey][4] = $objEquip -> fields['minlev'];\n $arrEquip[$intKey][5] = $objEquip -> fields['zr'];\n $arrEquip[$intKey][6] = $objEquip -> fields['wt'];\n $arrEquip[$intKey][7] = $objEquip -> fields['szyb'];\n $arrEquip[$intKey][8] = $objEquip -> fields['poison'];\n $arrEquip[$intKey][9] = $objEquip -> fields['maxwt'];\n\t $arrEquip[$intKey][10] = $objEquip->fields['magic'];\n\t $arrEquip[$intKey][11] = $objEquip->fields['repair'];\n $objEquip -> MoveNext();\n }\n $objEquip -> Close();\n return $arrEquip;\n }", "title": "" }, { "docid": "eda81f3697bb0ef78b26878945e1db8f", "score": "0.52935565", "text": "public function getLegs()\n {\n return $this->legs;\n }", "title": "" }, { "docid": "42fc04b5f4b02fa475d1f7596951d2ff", "score": "0.5230535", "text": "function geMaterial() {\n $this->autoRender = false;\n $sql = \"SELECT DISTINCT material FROM inventory;\";\n $datas = $this->Cabinet->query($sql);\n\n App::uses(\"Material\", \"Inventory.Model\");\n foreach( $datas as $data ) {\n $material = new Material();\n if( !empty($data['inventory']['material']) ) {\n $m['Material']['name'] = $data['inventory']['material'];\n $m['Material']['code'] = $data['inventory']['material'];\n $m['Material']['material_group_id'] = 9;\n $material->save($m);\n }\n }\n }", "title": "" }, { "docid": "7ad62793f329368068be710fca1159cd", "score": "0.5211178", "text": "public function getLight()\n {\n return $this->pathImagesLight . $this->filename;\n }", "title": "" }, { "docid": "602bd77189f4f5d79a2d29acb14b2ea0", "score": "0.5193117", "text": "public function readEquippedWeapons() {\r\n include('connect.php');\r\n\r\n $query = \"SELECT *\r\n FROM EquippedWeapons\r\n WHERE CharWeapon_id = ?\";\r\n $myquery = $db->prepare($query);\r\n $myquery->bindValue(1, $this->charStats->Char_id);\r\n $myquery->execute();\r\n while ($result = $myquery->fetchObject()) {\r\n $this->equippedWeapons[] = new EquippedWeapon($result->EquippedWeapon_id, $result->WeaponName, $result->DamageType, $result->DamageAmount, $result->WeaponNotes);\r\n }\r\n }", "title": "" }, { "docid": "42a55e95d961576b97e57ab304fdb04e", "score": "0.51846635", "text": "public function getSpeffectdataList(){\n return $this->_get(15);\n }", "title": "" }, { "docid": "f7811d93f1619f6f7c2b5609a252548c", "score": "0.518419", "text": "function itineraryList_wetu(){\n $IL = curlGet(\"https://wetu.com/API/Itinerary/4PLEDRIUFRIAMOAM/V8/List?type=Sample&results=1&sort=LastModifiedAsc\");\n $jsonIL = json_decode($IL); //a json object containing all the itineraries \n $jsonIL = $jsonIL->itineraries; //removing a useless wrapping\n\n $identifierList = array(); //initialize the list\n\n for ($a = 0; $a < count($jsonIL); $a++){\n array_push($identifierList, $jsonIL[$a]->identifier); //push just the identifier onto the list\n }\n \n return $identifierList;\n}", "title": "" }, { "docid": "edd3507ae5e695a66435eaf9456ad84c", "score": "0.5179243", "text": "public function getList()\r\n\t{\r\n $deviceModel = $this->getServiceLocator()->get('DeviceModel');\r\n $devicess = $deviceModel->getDevices();\r\n\r\n\t\treturn $devicess;\r\n\t}", "title": "" }, { "docid": "1fe7f2ca111dee488baf4b253670dd0a", "score": "0.51732934", "text": "function get_hotel_list()\n\t{\n\t\t$this->db->select('sb_hotel_name, sb_hotel_id');\n\t\t// $this->db->where('hotel_id',$hotel_id);\n\t\t$query=$this->db->get('sb_hotels');\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "8c35edc7120f48b5453c498a8b6e5a4d", "score": "0.51564145", "text": "public static function getAllLands(){\n $db = Zend_Registry::get('dbAdapter');\n $query = $db->select()->distinct()\n ->from(array('o' => 'orte'), array(\n 'o.landid',\n 'o.land'\n ))\n ->where( \"LENGTH(o.land)>0\")\n ->order('o.land');\n return $db->fetchAll($query);\n }", "title": "" }, { "docid": "1bc843311b2dc346134d6c1cc49459b0", "score": "0.5154701", "text": "public function getShopCatalogWaresWithWareIdMany()\r\n {\r\n return $this->getMany(ShopCatalogWare::class, [\r\n 'ware_id' => 'id',\r\n ]); \r\n }", "title": "" }, { "docid": "c6a1f97e21ad5f53f847cc56f97eaa14", "score": "0.5145028", "text": "public function getClothcoloridsList(){\n return $this->_get(39);\n }", "title": "" }, { "docid": "dad60a439be55e46cfd6fc4e76df53f9", "score": "0.51264286", "text": "public static function ARMOR_EQUIP_LEATHER(): SoundImpl\n {\n return new SoundImpl(SoundIds::ARMOR_EQUIP_LEATHER);\n }", "title": "" }, { "docid": "d623baa94c2ed2669d4dafabc07a67ba", "score": "0.51169324", "text": "public function homeListeLivrables(){\n $listactions = $this->Livrable->find('all',array('conditions'=>array('utilisateur_id'=>userAuth('id'),'ETAT IN (\"à faire\",\"en cours\",\"refusé\")'),'order'=>array('ECHEANCE'=>'ASC'),'limit' => 5,'recursive'=>-1));\n return $listactions;\n }", "title": "" }, { "docid": "529b8c1c0a73e45e75bd1d2fada239fd", "score": "0.50959224", "text": "function get_laser_labs($conn, $laser_report_id) {\n\t$query_labs = \"SELECT building, room FROM laser_labs WHERE laser_report_id = \" . $laser_report_id;\n\treturn exec_query($conn, $query_labs);\n}", "title": "" }, { "docid": "3abed8f297f70d9c408504bc7a929acc", "score": "0.508558", "text": "public function getDuns();", "title": "" }, { "docid": "c04528dfb04f4d59ac3548637ad651aa", "score": "0.5071454", "text": "abstract function getListTransportation();", "title": "" }, { "docid": "a4d3cf474fe9f6d7ccf5baa4609d9a4d", "score": "0.5063465", "text": "function readStrengths($id){\n $query = \"SELECT\n strength_id,strength_name\n FROM\n strengths JOIN hero_strengths\n ON\n strength_id=strength and hero_id=?\";\n \n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n \n // bind id of product to be updated\n $stmt->bindParam(1, $id);\n \n \n // execute query\n $stmt->execute();\n \n // get retrieved row\n $num = $stmt->rowCount();\n $result=array();\n // check if more than 0 record found\n if($num>0){\n // heros array\n \n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n // extract row\n // this will make $row['name'] to\n // just $name only\n extract($row);\n $hero_strength=array(\n \"id\" => $strength_id,\n \"name\" => $strength_name,\n );\n \n \n array_push($result, $hero_strength);\n }\n \n }\n\n return $result;\n \n }", "title": "" }, { "docid": "ba7f1f0d0da1e32446b11c889bb6b63a", "score": "0.5046062", "text": "public static function getWeapons()\n {\n return Cache::remember('r6stats_weapons', static::CACHE_TIME, function() {\n return static::fetchJson(static::URL . \"/database/weapons\");\n });\n }", "title": "" }, { "docid": "717951ef7c2384dd47fd7e9737550f1c", "score": "0.50379807", "text": "function getLightInfo($id){\n global $getLightUrl;\n $result = cUrl($getLightUrl.$id);\n if ($result[0] == \"200\"){\n $values = $result[1];\n $lightInfo = array(\n \"on\" => $values['state']['on'],\n \"bri\" => $values['state']['bri'],\n \"hue\" => $values['state']['hue'],\n \"sat\" => $values['state']['sat'],\n \"effect\" => $values['state']['effect'],\n \"x\" => $values['state']['xy'][0],\n \"y\" => $values['state']['xy'][1],\n \"rgb\" => xyBriToRgb($values['state']['xy'][0],$values['state']['xy'][1],$values['state']['bri']),\n \"swupdate_state\" => $values['swupdate']['state'],\n \"name\" => $values['name']\n );\n return $lightInfo;\n } else {\n return $result[0];\n }\n}", "title": "" }, { "docid": "4400835d7dffb353b235c104b5c1a90f", "score": "0.5034409", "text": "public function getRoomList() {\n $db = new PDOData();\n $data = $db->doQuery(\"\n select *\n from room\n order by room_id asc;\n \");\n\n return $data;\n }", "title": "" }, { "docid": "8f2fbaa828de1a3b9d7ca7c2d01d5a30", "score": "0.5030857", "text": "public function get_availability_meters ()\n\t{\n\t\t$this->db->select('*');\n\t\t\n\t\t$types = parent::get();\n\t\t\n\t\t// Return key => value pair array\n\t\t$array = array(\n\t\t\t'' => 'Select Action'\n\t\t);\n\t\tif (count($types)) {\n\t\t\tforeach ($types as $type) {\n\t\t\t\t$array[$type->availability_meter_id] = $type->availability_meter_name;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "7ea95abfa9bab072504548655ceaac8e", "score": "0.50305897", "text": "public function loadModelsListAction()\n {\n $paramColor = $this->getRequest()->getParam('color');\n $categoryId = $this->getRequest()->getParam('category');\n $category = Mage::getModel('catalog/category')->load($categoryId);\n\n $sliderProductCollection = $category->getProductCollection()\n ->addAttributeToSelect('name')\n ->addAttributeToSelect('sku')\n ->addAttributeToFilter('status', 1)\n ->addAttributeToFilter('visibility', 4);\n\n $productList = Array();\n foreach ($sliderProductCollection as $product) {\n $galleryImage = $product->load('media_gallery')->getMediaGalleryImages();\n $image = $galleryImage->getItemByColumnValue('label', $paramColor);\n if (!$image) {\n continue;\n } else {\n $image = $image->getUrl();\n }\n\n $productList[$product->getId()] = Array(\n 'id' => $product->getId(),\n 'imageUrl' => $image,\n 'name' => $product->getName()\n );\n }\n\n $this->getResponse()->setBody(Zend_Json::encode($productList));\n }", "title": "" }, { "docid": "fd8b537fe4dc210532b20f1cd739ada5", "score": "0.50284463", "text": "public function getWarehouseList()\n {\n return Warehouse::select(DB::raw(\"CONCAT(id, ':', whsName) as value\"), 'whsName as text')->get()->pluck('text', 'value');\n }", "title": "" }, { "docid": "bb60d0477416f6066a5aa411a8c82bcd", "score": "0.50159216", "text": "public function warehousesList()\n {\n if(Auth::user()->activities != '')\n {\n $warehouses = Auth::user()->warehouseList;\n\n return ($warehouses);\n }\n }", "title": "" }, { "docid": "cbdd32c5e9c7eaf5b68028a7623b4638", "score": "0.501444", "text": "public function index()\n {\n $rawMaterials = RawMaterial::all();\n return $rawMaterials;\n }", "title": "" }, { "docid": "3944e8986a27601fea1e8adef7b34b79", "score": "0.50134265", "text": "function getAllLeaflets(){\n\t\t//$queryEbsLeaflets = db_select('ebs_leaflets_final_static', 'elf')\n\t\t$queryEbsLeaflets = db_select('ebs_leaflets_final', 'elf')\n\t\t->fields('elf');\n\t\t//->condition('leaflet_code', 'L16302');//Plastering\n\t\t//->range(0,10);\n\t\t$results = $queryEbsLeaflets->execute();\n\t\t//dsm($results->rowCount());\n\t\t\n\t\tforeach ($results as $row) :\n\t\t\t$this->leaflets[$row->leaflet_code] = $row;\n\t\tendforeach;\n\t\t\n\t}", "title": "" }, { "docid": "08c96708dcaca4aae05ecfe8f24a9ae1", "score": "0.50053114", "text": "protected function getLight(): Light\n {\n return $this->light;\n }", "title": "" }, { "docid": "16e69cef32455897e9ed09c8050c7fa7", "score": "0.49974778", "text": "public function getAgentList()\n {\n }", "title": "" }, { "docid": "e8f40d72e2ac0d61616544bc0efd9559", "score": "0.49968687", "text": "public function getJobEquipmentList(int $jobId): Collection;", "title": "" }, { "docid": "4666264338d099a9665b1a1cb4ff2810", "score": "0.49968046", "text": "public function list()\n {\n return Recipe::all()->load('ingredients');\n }", "title": "" }, { "docid": "f664970ff4439167974de82f3ae5a4da", "score": "0.49835858", "text": "public function getEarlyMedievalRulersList() {\n $key = md5('earlymedievalListRulers');\n if (!$data = $this->_cache->load($key)) {\n $rulers = $this->getAdapter();\n $select = $rulers->select()\n ->from($this->_name)\n ->where('period = ?',(int)29)\n ->order('id');\n $data = $rulers->fetchAll($select);\n $this->_cache->save($data, $key);\n }\n return $data;\n }", "title": "" }, { "docid": "d324f8dfd217cc5496c5f0d719e1d13b", "score": "0.4980328", "text": "public function getIronAgeRulersListed() {\n $rulers = $this->getAdapter();\n $select = $rulers->select()\n ->from($this->_name, array('id','issuer','region'))\n ->where('period = ?', (int)16)\n ->where('valid = ?', (int)1)\n ->order('issuer ASC');\n return $rulers->fetchAll($select);\n }", "title": "" }, { "docid": "f609efda621820c5c90b28a2d0f95b84", "score": "0.4976911", "text": "function getAllHardware()\r\n {\r\n global $dbh;\r\n\r\n $dbh = $this->connect();\r\n //1. define the query\r\n $sql = \"SELECT * FROM hardware ORDER BY type\";\r\n\r\n //2. prepare the statement\r\n $statement = $dbh->prepare($sql);\r\n\r\n //3. bind parameters\r\n\r\n //4. execute the statement\r\n $statement->execute();\r\n\r\n //5. return the result\r\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n //print_r($result);\r\n return $result;\r\n }", "title": "" }, { "docid": "c683de2f5de265f4b84fde3aafff4853", "score": "0.49754018", "text": "private static function getRings(): array\n {\n return [\n PlayerEquipment::create('No ring', 0, 0, 0),\n\n PlayerEquipment::create('Ring of Damage +1', 25, 1, 0),\n PlayerEquipment::create('Ring of Damage +2', 50, 2, 0),\n PlayerEquipment::create('Ring of Damage +3', 100, 3, 0),\n\n PlayerEquipment::create('Ring of Defense +1', 20, 0, 1),\n PlayerEquipment::create('Ring of Defense +2', 40, 0, 2),\n PlayerEquipment::create('Ring of Defense +3', 80, 0, 3),\n\n ];\n }", "title": "" }, { "docid": "dd86511c223f28fb5c48c15c6b1b502e", "score": "0.49695867", "text": "public function getMaterials()\n {\n return $this->materials;\n }", "title": "" }, { "docid": "2b6a961465ba94cf6fc7edae69dbbc76", "score": "0.4948675", "text": "public function list()\n {\n $query = \"SELECT * FROM vehicles\";\n $result = $this->con->query($query);\n if ($result->num_rows > 0) {\n $data = array();\n while ($row = $result->fetch_assoc()) {\n $data[] = $row;\n }\n return $data;\n }else{\n return [];\n }\n }", "title": "" }, { "docid": "0edf392606cbe179464019d956a2bf8b", "score": "0.4948478", "text": "function getBuildingList() {\n return getAll(\"SELECT * FROM building\");\n}", "title": "" }, { "docid": "7be6ab622e8be108369fa24aed06eb29", "score": "0.4943973", "text": "public function getTheSupports();", "title": "" }, { "docid": "62132ded9b70f258f7092b7f19f68985", "score": "0.49292627", "text": "public function getTailles(){\n return $this->db->get($this->taille)->result();\n }", "title": "" }, { "docid": "cd0d0c58f80c54981671111507dd58f2", "score": "0.49277362", "text": "public function listAction()\n {\n // specify required fields\n $requirements = array(\n 'entityType',\n 'fromDate',\n 'toDate',\n 'singleRooms',\n 'doubleRooms',\n 'adultCount',\n 'childCount'\n );\n\n // fetch post json data\n $requestData = $this->fetchRequestData($requirements);\n\n $requestData['from_mobile'] = true;\n if (isset($requestData['stars']) && !empty($requestData['stars'])) {\n $requestData['nbrStars'] = [$requestData['stars']];\n } elseif (!isset($requestData['nbrStars'])) {\n $requestData['nbrStars'] = [];\n }\n\n if (isset($requestData['currencyCode'])) {\n $requestData['selectedCurrency'] = $requestData['currencyCode'];\n }\n\n $childAge = array();\n $childBed = array();\n\n $minIdx = (isset($requestData['childAge']) && !empty($requestData['childAge'])) ? min(array_keys($requestData['childAge'])) : 0;\n for ($i = 1; $i <= $this->container->getParameter('hotels')['max_child_count']; $i++) {\n $childIdx = ($minIdx == 0) ? ($i - 1) : $i;\n\n $childAge[$i] = (isset($requestData['childAge'][$childIdx]) && !empty($requestData['childAge'][$childIdx])) ? $requestData['childAge'][$childIdx] : 0;\n $childBed[$i] = (isset($requestData['childBed'][$childIdx]) && !empty($requestData['childBed'][$childIdx])) ? $requestData['childBed'][$childIdx] : \"parentsBed\";\n }\n\n $requestData['childAge'] = $childAge;\n $requestData['childBed'] = $childBed;\n\n $hotelSC = $this->get('HRSServices')->getHotelSearchCriteria($requestData);\n\n $hotelServiceConfig = $this->getHotelServiceConfig();\n\n return $this->get('HRSServices')->hotelsAvailability($hotelServiceConfig, $hotelSC);\n }", "title": "" }, { "docid": "bacdaa14972e7f2c9caf4c624f9c7676", "score": "0.49256873", "text": "public function getManufacturers()\n\t{\n if (isset(self::$_cache['manufacturers'])) {\n return self::$_cache['manufacturers'];\n }\n $sql = new SqlStatement();\n $sql->select(array('id' => 'm.manufacturer_id', 'm.name'))\n ->distinct()\n ->from(array('m' => 'manufacturer'))\n ->innerJoin(array('p' => 'product'), 'm.manufacturer_id = p.manufacturer_id')\n ->innerJoin(array('m2s' => 'manufacturer_to_store'), 'm.manufacturer_id = m2s.manufacturer_id')\n ->where('p.status = 1')\n ->where('p.date_available <= NOW()')\n ->where('m2s.store_id = ?', (int) $this->config->get('config_store_id'))\n ->order(array('m.sort_order', 'm.name')); \n \n if ($this->subCategory) \n {\n $sql->innerJoin(array('p2c' => 'product_to_category'), 'p.product_id = p2c.product_id')\n ->innerJoin(array('cp' => 'category_path'), 'cp.category_id = p2c.category_id')\n ->where('cp.path_id = ?', array($this->subCategory));\n }\n elseif ($this->topCategory) \n {\n $sql->innerJoin(array('p2c' => 'product_to_category'), 'p.product_id = p2c.product_id')\n ->where('p2c.category_id = ?', array($this->topCategory));\n }\n\n\t\t$query = $this->db->query($sql);\n self::$_cache['manufacturers'] = $query->rows;\n \n return $query->rows;\n\t}", "title": "" }, { "docid": "b7eaf78522f32eeefa5170aa420a5b73", "score": "0.4918861", "text": "public function getEquipmentRef()\n {\n return $this->equipmentRef;\n }", "title": "" }, { "docid": "c833e6b62ec6027b8767dc16f45ff0ab", "score": "0.4914915", "text": "function get_all_ids() {\n\n\t\t$hyperv_discovery_list = array();\n\t\t$query = \"select hyperv_ad_mac from $this->_db_table\";\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute($query);\n\t\tif (!$rs)\n\t\t\t$this->event->log(\"get_list\", $_SERVER['REQUEST_TIME'], 2, \"hyperv-discovery.class.php\", $db->ErrorMsg(), \"\", \"\", 0, 0, 0);\n\t\telse\n\t\twhile (!$rs->EOF) {\n\t\t\t$hyperv_discovery_list[] = $rs->fields;\n\t\t\t$rs->MoveNext();\n\t\t}\n\t\treturn $hyperv_discovery_list;\n\n\t}", "title": "" }, { "docid": "2d5d118495b2130e746342069ed2123d", "score": "0.49134687", "text": "public function getItemListList(){\r\n return $this->_get(4);\r\n }", "title": "" }, { "docid": "f418f7263f7b3cf191d8710b328e5e24", "score": "0.49112204", "text": "public function getLokasiItems() {\n return LookupM::model()->findAllByAttributes(array('lookup_type' => 'ruangan_lokasi', 'lookup_aktif' => true), array('order' => 'lookup_urutan'));\n }", "title": "" }, { "docid": "73bae7f1deb4400cc9a99f083f60118c", "score": "0.49099043", "text": "public function getListings()\n {\n return $this->_listings;\n }", "title": "" }, { "docid": "633ab6c3e2e3aac2c53598e89cc01fc1", "score": "0.49065197", "text": "public function color_list() {\t\n\t\t$this -> db -> select('\n\t\t\tc.id , c.colorname , s.statustitle , c.createdby , c.created_at , c.updatedby , c.updated_at , a.admincode, a.adminname\n\t\t');\n\t\t$this -> db -> from('item_color AS c');\n\t\t$this -> db -> join('admin_login AS a', 'c.createdby = a.id');\n\t\t$this -> db -> join('status_info AS s', 'c.status = s.id');\n\t\t$query = $this->db->get();\n\t\tif ($query->num_rows() > 0) {\n return $query->result();\n }else{\n\t\t\treturn false;\n\t\t}\n }", "title": "" }, { "docid": "c7bb34ef8518736fdfa1135a6b182622", "score": "0.49049854", "text": "function getAllRent_list()\n\t{\n\t\t$query=\"SELECT * FROM list_items ORDER BY item_id DESC\";\n\t\t$result = $this->db->query($query);\n\t\t$rent_list=\"\";\n\t\t\n\t\tforeach ($result->result_array() as $row) {\n\t\t\t$extra=array(\n\t\t\t\t'item_id'\t=>\t$row['item_id'],\n\t\t\t\t'user_id'\t=>\t$row['user_id'],\n\t\t\t\t'item_name'\t=>\t$row['item_name'],\n\t\t\t\t'item_description'\t=>\t$row['item_description'],\n\t\t\t\t'posted_date'\t=>\t$row['posted_date'],\n\t\t\t\t'expiry_period'\t=>\t$row['expiry_period'],\n\t\t\t\t'total_views'\t=>\t$row['total_views'],\n\t\t\t\t'isLive'\t=>\t$row['isLive']\n\t\t\t);\n\t\t\t$rent_list[]=$extra;\n\t\t}\n\n\t\treturn json_encode($rent_list);\n\t}", "title": "" }, { "docid": "a49713db3509ffcaa5d84a804f661d5c", "score": "0.4903391", "text": "public function getAllManufactures(){\r\n\t\t//viet cau sql\r\n\t\t$sql =\"SELECT * FROM manufactures\";\r\n\t\t//thuc thi cau truy van\r\n\t\t$obj = self::$conn->query($sql);\r\n\t\treturn $this->getData($obj);\r\n\t}", "title": "" }, { "docid": "0aeb380bce11600681411cd1876dbafe", "score": "0.4896311", "text": "public function listing()\n {\n\t$weapons = Weapon::all()->sortBy('name');\n\t\n return view('weapons.list', ['weapons' => $weapons, 'damage_types' => $this->damage_types, 'renow_levels' => $this->renow_levels, 'classes' => $this->classes]);\n }", "title": "" }, { "docid": "d71802efaca547bc8794293df25cd443", "score": "0.48941782", "text": "public function getCharacterEquipment() {\n return $this->characterEquipment;\n }", "title": "" }, { "docid": "d71802efaca547bc8794293df25cd443", "score": "0.48941782", "text": "public function getCharacterEquipment() {\n return $this->characterEquipment;\n }", "title": "" }, { "docid": "82e7a6451b3804d0ccd19f9f3bc4fe40", "score": "0.48920342", "text": "public function getItemListList(){\r\n return $this->_get(5);\r\n }", "title": "" }, { "docid": "70c474231f3e10a454f6517dc8a46167", "score": "0.4879055", "text": "public function allMaterial()\n {\n $entries = \\DB::table('lessonmaterial')->orderBy('id', 'desc')->limit(null)->get();\n return view('admin/allmaterial', ['entries' => $entries]);\n }", "title": "" }, { "docid": "a8d92eef6c57511f28f0e4ad6ffb193d", "score": "0.48755255", "text": "public function getActivityList(){\r\n\t\t$result = $this->where(['is_show' => 1])->order(\"list_order desc\")->select();\r\n\t\t\r\n $model = model(\"MaterialLibrary\");\r\n foreach ($result as $key => $value) {\r\n $now = time();\r\n $sign_start = $value['sign_start_time'];\r\n $sign_end = $value['sign_end_time'];\r\n if($sign_start>$now){\r\n $result[$key]['icon_name'] = \"未开始\";\r\n }else{\r\n if($sign_end>=$now){\r\n $result[$key]['icon_name'] = \"进行中\";\r\n }else{\r\n $result[$key]['icon_name'] = \"停止报名\";\r\n }\r\n }\r\n $top_img = $model->getMaterialInfoById($value['top_img']);\r\n \r\n $result[$key]['top_img_url'] = $top_img['url'];\r\n }\r\n return $result;\r\n }", "title": "" }, { "docid": "1878f23f5dabe9c2180abc1f02a94885", "score": "0.48717293", "text": "public function getWaterbodies()\n {\n /*** Get All Waterbodies ***/\n $items = $this->model->all('Waterbody');\n\n /*** Formats an array to work with a select list ***/\n /*** Format: Array(Value, Display) ***/\n for ($i = 0; $i < count($items); $i++) {\n $list[$i] = array($items[$i]['ID'], $items[$i]['name']);\n }\n\n return $list;\n }", "title": "" }, { "docid": "75353596a93ea6e89548cf6330bada8a", "score": "0.48713502", "text": "public function getArtifactitemsList(){\n return $this->_get(16);\n }", "title": "" }, { "docid": "ad7e8fb86c82cf8864d438cf2aa6a400", "score": "0.4866834", "text": "public function getMouseList(Request $request)\n\t{\n\n\t\tif($request->ajax())\n\t\t{\n\t\t\t$systemunit = $this->sanitizeString($request->get('term'));\n\t\t\treturn json_encode(\n\t\t\t\tApp\\Item::unassembled()\n\t\t\t\t\t\t\t->whereHas('inventory',function($query){\n\t\t\t\t\t\t\t\t$query->whereHas('itemtype',function($query){\n\t\t\t\t\t\t\t\t\t$query->where('name','=','Mouse');\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->where('local_id','like','%'.$systemunit.'%')\n\t\t\t\t\t\t\t->pluck('local_id')\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "a23fb0b281a8dccee920d88078df78cc", "score": "0.48599163", "text": "public function index()\n {\n //\n return Material::all();\n }", "title": "" }, { "docid": "da68e814bf02cf3db33653dd78bb51d1", "score": "0.48590788", "text": "public function getAdditionalMaterials()\n {\n return $this->additionalMaterials;\n }", "title": "" }, { "docid": "409970d4bfe4755b06547a40eecf39c8", "score": "0.48582447", "text": "function getAdminListingInfo()\n {\n $sql = 'SELECT\n resourceID,\n service.service AS Resource_ServiceType,\n theraFname,\n theraLname,\n office,\n officePhone,\n officeEmail,\n city, \n statusBrand.statusLabel AS Listing_Status\n FROM\n resources\n INNER JOIN service ON resources.serviceID = service.serviceID\n INNER JOIN statusBrand ON resources.statusID = statusBrand.statusID\n ';\n\n // prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n // Execute the statement\n $statement->execute();\n\n //Return the results\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n }", "title": "" }, { "docid": "4b0cfce883211edfe612525fee876574", "score": "0.48484483", "text": "function get_leads()\n\t{\n\t\t// First, get the list of IDs.\n\t\t$query = \"SELECT id from leads where contact_id='$this->id' AND deleted=0\";\n\n\t\treturn $this->build_related_list($query, new Lead());\n\t}", "title": "" }, { "docid": "efb2ec6013614ab685742b7cd49d7a65", "score": "0.4843675", "text": "public function GetList()\n {\n $key1 = [\n 'items' => [\n '0' => [\n 'attribute_id',\n 'attribute_code',\n 'attribute_label',\n 'attribute_label',\n 'swatches',\n ]\n ]\n ];\n $key2 = [\n 'items' => [\n '0' => [\n 'swatches' => [\n '49' => [\n 'swatch_id',\n 'option_id',\n 'store_id',\n 'type',\n 'value',\n ]\n ],\n ]\n ]\n ];\n return [\n 'key1' => $key1,\n 'key2' => $key2,\n ];\n }", "title": "" }, { "docid": "68dc9f3fde0c290e5df971bc0312ca34", "score": "0.48314035", "text": "public function getWarehouseSelectList()\n {\n return Warehouse::all()->pluck('whsName', 'id');\n }", "title": "" }, { "docid": "089c356344203f0ad4708680c46e86a8", "score": "0.4820562", "text": "public function getAirplanes() {\n return json_decode(\n file_get_contents('https://wacky.jlparry.com/info/airplanes/'\n ,false\n ,$this->ctx)\n , true);\n }", "title": "" }, { "docid": "fda95ec3e46846485a50beb6f6ca13df", "score": "0.48175126", "text": "static function getLightData($profile_id)\n\t{\n\n\t\t$lights = ORM::for_table('PROFILE_Lights_archetype')\n\t\t\t->select('PROFILE_Lights_instance.count')\n\t\t\t->select('PROFILE_Lights_instance.lights_instance_id', 'id')\n\t\t\t->select('PROFILE_Lights_archetype.type')\n\t\t\t->select('PROFILE_Lights_archetype.lights_archetype_id', 'archetype_id')\n\t\t\t->select('PROFILE_Lights_archetype.consumption')\n\t\t\t->select('PROFILE_Light_equivalence_map.equivalent_power')\n\t\t\t->left_outer_join('PROFILE_Lights_instance', array('PROFILE_Lights_instance.lights_archetype_id', '=', 'PROFILE_Lights_archetype.lights_archetype_id'))\n\t\t\t->join('PROFILE_Light_equivalence_map', array('PROFILE_Lights_instance.lights_archetype_id', '=', 'PROFILE_Light_equivalence_map.archetype_id'))\n\t\t\t->where('PROFILE_Lights_instance.profile_id', $profile_id)\n\t\t\t->find_array();\n\n\t\tif(!empty($lights))\n\t\t\treturn $lights;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "4a5fbfe340708a7dc03f58f98a2f8a79", "score": "0.4817446", "text": "public function getWavesList(){\n return $this->_get(2);\n }", "title": "" }, { "docid": "05c3be476cdc4aae7d247a9a615f0cdf", "score": "0.48136", "text": "function get_items_skinhotspot(){\n\tglobal $d, $skinitems, $paging;\t\n\t\n\t#-------------------------------------------------------------------------------\n\t$sql = \"select * from #_krpano_skinhotspot\";\t\n\n\t$sql.=\" order by id desc\";\n\t\n\t\n\t$d->query($sql);\n\t$skinitems = $d->result_array();\n\t$curPage = isset($_GET['curPage']) ? $_GET['curPage'] : 1;\n\t$url=\"index.php?com=krpano&act=man_skinhotspot\";\n\t$maxR=20;\n\t$maxP=20;\n\t$paging=paging($skinitems, $url, $curPage, $maxR, $maxP);\n\t$skinitems=$paging['source'];\n}", "title": "" }, { "docid": "d2d353f9f4b8b7089ab114985f18167d", "score": "0.48113456", "text": "public function action_lending()\n\t{\n\t\t$endpoint = $this->request->param('endpoint');\n\t\t\n\t\tswitch ($endpoint)\n\t\t{\n\t\t\tcase 'assistance' :\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$db = new Model_Api_Property_Lending();\n\t\t\t\t\techo json_encode($db->get_records('assistance', $_GET['limit']));\t\t\n\t\t\t\t}\n\t\t\t\tcatch ( Database_Exception $e )\n\t\t\t\t{\n\t\t\t\t\techo $e->getMessage();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault :\n\t\t\t\techo 'nothing here, try assistance as an endpoint';\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "c561df764902c9656cec1df732cb9ced", "score": "0.48107436", "text": "public function getArticulationListAttribute()\n {\n return $this->allarticulations->pluck('id')->all();\n }", "title": "" }, { "docid": "87e2552713a271ccc85f3fa1f51ff6cf", "score": "0.48090842", "text": "public function listar(){\n $db = new Database();\n \n $sqlEquipos = $db->consulta(\"SELECT * FROM Equipo\");\n $arrayEquipos = array();\n while ($row = mysqli_fetch_assoc($sqlEquipos)) {\n $arrayEquipos[] = $row;\n }\n \n $db->desconectar();\n return $arrayEquipos;\n }", "title": "" }, { "docid": "c2d34c66f304587300bda55981c3ddc5", "score": "0.48063532", "text": "public function getOnlineDeviceList(){\n $query = \"select * from $this->onlineDevice_tableName\";\n $result = $this->dbh->query($query);\n if($result->rowCount() > 0 ){\n return $result->fetchAll();\n }\n return null;\n }", "title": "" }, { "docid": "84f39eff32dbe2cdadaf481ec1e3978b", "score": "0.480524", "text": "public static function getWingList(): array\n {\n $wingModelObj = new WingModel();\n return $wingModelObj->getWingListWithNameAndId();\n }", "title": "" }, { "docid": "2eb808d6a3757cbfe62211259767d823", "score": "0.48024416", "text": "public function roomList()\n\t{\n\t\techo json_encode($this->room_list->fetchData());\n\t}", "title": "" }, { "docid": "cc1b8adbbdf99ba7c1e00b6e29198344", "score": "0.4801627", "text": "function retrieve_all_guest_lists(){\n\t\t\n\t\t$this->CI->load->model('model_guest_lists', 'guest_lists', true);\n\t\treturn $this->CI->guest_lists->retrieve_day_guest_lists($this->promoter->up_id, false, $this->promoter->t_fan_page_id);\n\t\t\n\t}", "title": "" }, { "docid": "51697de5a1e2df8c9afd643afc817e3d", "score": "0.47977415", "text": "function get_all_get(){\n $result = $this->lecturers_model->get_all();\n $this->response($result); \n\n }", "title": "" }, { "docid": "f2ab4643078f713639ca7fa56552a6c6", "score": "0.47959098", "text": "function getLightState($lightid = false) { \n\tglobal $bridge, $key;\n\t$targets = array();\n\t$result = array();\n\n\tif ($lightid === false) {\t\n\t\t$targets = getLightIdsList();\n\t} else {\n\t\tif (! is_array($lightid)) {\n\t\t\t$targets[] = $lightid;\n\t\t} else {\n\t\t\t$targets = $lightid;\n\t\t}\n\t}\n\n\tforeach ($targets as $id) {\n\n\t\t$pest = new PEST(\"http://$bridge/api/$key/\");\n\t\t$deets = json_decode($pest->get(\"lights/$id\"), true);\n\t\t$state = $deets['state'];\n\t\t\n\t\t$result[$id] = $state;\n\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "a01b5722cf8ac60bfe9c09eb394ecd1d", "score": "0.47951588", "text": "public static function getAll() {\n\t\t\t//list\n\t\t\t$list = array();\n\t\t\t//get connection\n\t\t\t$connection = MySqlConnection::getConnection();\n\t\t\t//query\n\t\t\t$query = 'select m.id, m.model, m.description,m.status, mt.id, mt.name, a.id, a.name\n\t\t\t\t\t\t from machine as m join machineType as mt on m.type = bt.id join area as a on m.area = a.id order by m.id';\n\t\t\t//command\n\t\t\t$command = $connection->prepare($query);\n\t\t\t//execute\n\t\t\t$command->execute();\n\t\t\t//bind results\n\t\t\t$command->bind_result($id, $model, $description, $status, $typeid,$typename,$areaid, $areaname);\n\t\t\t//fetch data\n\t\t\twhile ($command->fetch()) {\n\t\t\t\t$type = new MachineType($typeid,$typename);\n\t\t\t\t$area = new Area($areaid,$areaname);\n\t\t\t\tarray_push($list, new Building($id, $model, $description, $status,$type,$area));\n\t\t\t}\n\t\t\t//close command\n\t\t\tmysqli_stmt_close($command);\n\t\t\t//close connection\n\t\t\t$connection->close();\n\t\t\t//return list\n\t\t\treturn $list;\n\t\t}", "title": "" }, { "docid": "d05cf63b6d078262b30847661e9d6ef5", "score": "0.47914457", "text": "public function getSpeedRamping()\n {\n $result = array();\n\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_SPEED_RAMPING, $payload);\n\n $payload = unpack('v1acceleration/v1deacceleration', $data);\n\n $result['acceleration'] = $payload['acceleration'];\n $result['deacceleration'] = $payload['deacceleration'];\n\n return $result;\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "54e9ce14245cde11472db4f01494f618", "score": "0.0", "text": "public function destroy($id)\n\t{\n\t\tBankAccount::destroy($id);\n\n\t\treturn Redirect::route('credit-cards.index');\n\t}", "title": "" } ]
[ { "docid": "dcc1d6b4440ac73f55e995eb411296ea", "score": "0.6932749", "text": "public function destroy($id)\n {\n dd('Remove the specified resource from storage.');\n }", "title": "" }, { "docid": "dcc1d6b4440ac73f55e995eb411296ea", "score": "0.6932749", "text": "public function destroy($id)\n {\n dd('Remove the specified resource from storage.');\n }", "title": "" }, { "docid": "6ffd51684d27200dd20bb77ae5392465", "score": "0.65282005", "text": "public function dispatchOnPostRemoveResource($resource);", "title": "" }, { "docid": "20340ae69f46965449dc508b639c84e9", "score": "0.6511765", "text": "public function remove_storage()\n\t{\n\t\t$this->_storage->destroy_storage();\n\t}", "title": "" }, { "docid": "052edc379f178da3bc9936ef223b6ef8", "score": "0.64856714", "text": "public function remove() {\n Storage::disk('public')->delete($this->getPath());\n $this->delete(); //Remove db record\n }", "title": "" }, { "docid": "8566de5772ba8f11471da580f8907d09", "score": "0.64848197", "text": "public static function remove(string $resourcePath): void\n {\n $file = self::generatePath(\n self::generateHash($resourcePath)\n );\n\n if (\\is_file($file)) {\n \\unlink($file);\n }\n }", "title": "" }, { "docid": "b9b85ab47af2f085664ea4fb3f54b26d", "score": "0.6444909", "text": "public function dispatchOnPreRemoveResource($resource);", "title": "" }, { "docid": "7c8424d31eaa624067dc5241abfb9372", "score": "0.6257354", "text": "public function deleteStorage($storageId);", "title": "" }, { "docid": "5881486a94aded91c41895b5d1b51444", "score": "0.6238561", "text": "public function delete($resource) {\r\n\t\t\t\r\n\t\t$url = $this->_path . '/api/v2' . $resource;\r\n\t\t\r\n\t\t$curl = curl_init();\r\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\r\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $this->_headers);\r\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n\t\tcurl_setopt($curl, CURLOPT_VERBOSE, 1);\r\n\t\tcurl_setopt($curl, CURLOPT_HEADER, 1);\r\n\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\r\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\r\n\t\t$response = curl_exec($curl);\r\n\t\t$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\r\n\t\t$header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\r\n\t\t$headers = substr($response, 0, $header_size);\r\n\t\t$body = substr($response, $header_size);\r\n\t\tself::http_parse_headers($headers);\t \r\n\t\tcurl_close ($curl);\r\n\t\tif ($http_status == 204) {\r\n\t \treturn $http_status . ' DELETED';\r\n\t\t } else {\r\n\t\t \t$this->error($body, $url, null, 'DELETE');\r\n\t\t }\r\n\t}", "title": "" }, { "docid": "71cdf2c8771b0884ed0346cbff1672a0", "score": "0.62021154", "text": "abstract protected function destroyResource(): void;", "title": "" }, { "docid": "8c0ed41f8673fd843b7ffdb22bce5eb0", "score": "0.611688", "text": "public function afterDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "77d39170a9748d8eca11f292068832c6", "score": "0.6077847", "text": "public function delete($storageName, $key);", "title": "" }, { "docid": "ece2955e505228c5979763b54ea0ee46", "score": "0.6066214", "text": "public function remove(\n int $right,\n $resource,\n IUser $user,\n ?IResource $parentResource = null\n ): void\n {\n $hash = $this->hash($right, $resource, $user, $parentResource);\n $this->storage->remove($hash);\n }", "title": "" }, { "docid": "43dc6df10818b4435103bc0ee31fc8d1", "score": "0.6045101", "text": "public function destroy($id)\n {\n $record = Resource::where('id', $id)->get();\n\n if (!empty($record[0])) {\n DB::beginTransaction();\n\n $isRemoved = self::remove($record);\n }\n }", "title": "" }, { "docid": "db4382353b96e87cb5a70c801383930a", "score": "0.603214", "text": "public function delete($resourceId = null, $options = []);", "title": "" }, { "docid": "1a7799a3edae94b9a12c008d1d703c57", "score": "0.59831214", "text": "public function deleteStorageService($name);", "title": "" }, { "docid": "a2014b07fec4eb27432905d903e64664", "score": "0.59784347", "text": "public function destroy($id)\n {\n $storage = Storage::find($id);\n if($storage->item())\n {\n $storage->item()->detach();\n if( $storage->delete() )\n {\n return response('Deleted.',200);\n }\n }\n return response('Error.',400);\n }", "title": "" }, { "docid": "f23ad90184663348cc9db3cf44d0b0a5", "score": "0.595982", "text": "public function destroy(Resource $resource)\n {\n //\n\t\t\t\treturn response()->json([\n\t\t\t\t\t'destroyed'=>$resource->delete()\n\t\t\t\t]);\n }", "title": "" }, { "docid": "462a710c39c75c675bfe433bce80e2fe", "score": "0.5951811", "text": "public function destroy()\n {\n if ($this->instance instanceof Storage) {\n $this->instance->destroy();\n }\n $this->instance = null;\n }", "title": "" }, { "docid": "c39bd1cfb71eb924026011c0e976a9d4", "score": "0.5933563", "text": "public function delete(string $resourceType, $modelOrResourceId): void;", "title": "" }, { "docid": "31f350f911a74d37fb3a78e6981becb5", "score": "0.5921418", "text": "public function removeStorage()\n\t{\n\t\t$this->taskExec('docker rm chrome-print-storage')->run();\n\t}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "e03265a289855852afd2372dcb1d8daa", "score": "0.58933157", "text": "public function remove($path, $hard = false);", "title": "" }, { "docid": "7a7d76b4d53301e7ae6922b772849358", "score": "0.5886972", "text": "public function destroy($file)\n {\n $file = File::where('id', $file)->first();\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n $file->delete();\n return redirect()->route('files.index')->with('eliminar', 'ok');\n }", "title": "" }, { "docid": "3f6a8794d81fc01347d2f3307ac44d78", "score": "0.58504206", "text": "public function destroy($id)\n {\n //\n\n $contratista= contratistas::findOrFail($id);\n\n if (Storage::delete('public/'.$contratista->Foto)){\n Contratistas::destroy($id);\n\n }\n\n \n \n return redirect('contratistas')->with('Mensaje','Contratista eliminado');\n }", "title": "" }, { "docid": "a85763dd50ac74b8d2b8124b1c0e3e7b", "score": "0.5850285", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return back()->with('info', 'Resource deleted');\n }", "title": "" }, { "docid": "02a5bc50f3aa8ecd04834387832bc77c", "score": "0.5844418", "text": "public function destroy($id)\n {\n // $this->authorize('haveaccess','producto.destroy');\n $producto= Producto::findOrFail($id);\n\n if(Storage::delete('public/'.$producto->imagen)){\n\n Producto::destroy($id); \n }\n\n return redirect('producto');\n }", "title": "" }, { "docid": "8f406917023a0110d93d6350033a3ab5", "score": "0.58313775", "text": "public function removeItem($id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "title": "" }, { "docid": "a193f7ebf258b5fb63b8919a07678081", "score": "0.5821789", "text": "public function removeAll ($storage) {}", "title": "" }, { "docid": "dc36a581460d40a22ac889b4e61a4ab9", "score": "0.58165264", "text": "public function removeResource($resourceID)\n {\n $resourceID = db::escapechars($resourceID);\n $sql = \"DELETE FROM kidschurchresources WHERE resourceID='$resourceID' LIMIT 1\";\n $result = db::execute($sql);\n if($result){\n return true;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "83da6d00e9ec003d7115d52e8eaed9e7", "score": "0.5812055", "text": "public function del($path);", "title": "" }, { "docid": "c603e0ea04551111c5de9c6585b2815e", "score": "0.5802033", "text": "public function delete()\n {\n $this->repository->git('rm %s', escapeshellarg($this->getRelativePathname())\n );\n }", "title": "" }, { "docid": "f35aaf17008b130a60b3962b50777f92", "score": "0.5800284", "text": "public function unlink();", "title": "" }, { "docid": "818914cdd28df643181e6a2330bc11c4", "score": "0.5789049", "text": "public function destroy($id)\n {\n $supplier=Supplier::find($id);\n $photo=$supplier->photo;\n if($photo){\n unlink($photo);\n }\n $supplier->delete();\n }", "title": "" }, { "docid": "8f1b5736b25701e2b67e4f655f581689", "score": "0.57634306", "text": "public function testResourceRemoveOne()\n {\n $resourceArea = new Zend_Acl_Resource('area');\n $this->_acl->add($resourceArea)\n ->remove($resourceArea);\n $this->assertFalse($this->_acl->has($resourceArea));\n }", "title": "" }, { "docid": "5cc9f2ec9efb9c5303b848052688e6c4", "score": "0.5744329", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n $filename = $product->image;\n $product->delete();\n Storage::delete($filename);\n }", "title": "" }, { "docid": "d1f7c96fed94f01bef33d5bc03b96940", "score": "0.5735748", "text": "public function hardDelete();", "title": "" }, { "docid": "fec8d4881ffc82e41c0642f366a1a75a", "score": "0.5726655", "text": "public function delete($resource)\n {\n return DB::transaction(function () use ($resource) {\n $resource = $this->beforeDelete($resource);\n\n $resource->delete();\n\n return $this->afterDelete($resource);\n });\n }", "title": "" }, { "docid": "7b06ca498cebb34097bee47d0def61eb", "score": "0.5718601", "text": "public function delete() {\n if (unlink($this->fullPath)) {\n $this->fullPath = '';\n $this->mimeType = '';\n $this->simpleName = '';\n $this->size = 0;\n } else {\n throw new Exception('Check write Access to delete file!');\n }\n }", "title": "" }, { "docid": "8c0c11de31899ddf1bbfd6c29f1c19a7", "score": "0.571522", "text": "public function deleteImage(){\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "40f1e1a14810f5eceacb200ffe7aeb20", "score": "0.5696079", "text": "public function destroy(Request $request)\n {\n $slider=Slider::where('id', '=', $request->id)->first();\n if($slider!=null){\n $mi_imagen = public_path().'/'.$slider->url;\n unlink($mi_imagen);\n $slider->delete();\n return 1;\n }else{\n return 0;\n }\n// Lo eliminamos de la base de datos\n\n\n\n }", "title": "" }, { "docid": "60a2181c36b7592447d90a90fcadbe74", "score": "0.5695835", "text": "public function delete($record) {\n $this->fileDataSource->delete($this->resourceName, $record->id);\n $this->afterDelete($record);\n }", "title": "" }, { "docid": "7ef5024136aac86c4c004ee1e7edea43", "score": "0.56815386", "text": "public function drop(): void {\n $disk = Storage::disk($this->scope);\n if ($disk->exists($this->filepath)) {\n $disk->delete($this->filepath);\n }\n }", "title": "" }, { "docid": "c4f845a8d7bbb2425211bda284218817", "score": "0.56762695", "text": "function destroy() {\n\t\tunlink($this->get_file_name());\n\t\tself::remove_from_cache($this);\n\t}", "title": "" }, { "docid": "af7a37a01e344ca75b406caaaa916b45", "score": "0.56741655", "text": "private function removeOldIcon($resource)\n {\n $icon = $resource->getIcon();\n\n if ($icon->getIconType()->getIconType() == IconType::CUSTOM_ICON) {\n $pathName = $this->container->getParameter('claroline.param.thumbnails_directory')\n . DIRECTORY_SEPARATOR . $icon->getIconLocation();\n if (file_exists($pathName)) {\n unlink($pathName);\n }\n }\n }", "title": "" }, { "docid": "cb1740d372b49263432bcc5cf39f97d8", "score": "0.56595594", "text": "public function destroy($id)\n {\n $emp = Employee::where('id',$id)->first();\n $photo = $emp->image;\n if($photo){\n unlink($photo);\n $emp->delete();\n }else{\n $emp->delete();\n }\n\n }", "title": "" }, { "docid": "7567af40a4901dd5dd42113b0bbccb95", "score": "0.56567484", "text": "public function removeResource($name)\n {\n unset($this->resources[$name]);\n if ($name === 'file') {\n $this->resources['file'] = array(\n 'class' => 'Dwoo\\Template\\File',\n 'compiler' => null\n );\n }\n }", "title": "" }, { "docid": "d261281fcf3d7ca08f9b610eb6c3b1f0", "score": "0.56346554", "text": "public function destroy($id)\n {\n $photo = Photo::findOrFail($id);\n unlink(public_path() . $photo->image_url);\n $photo->delete();\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "5e46d09ef2d1d9f143d6831260992e3f", "score": "0.56248415", "text": "public function destroy($id)\n {\n $pres=Prescription::find($id);\n $fileName=$pres->item;\n unlink(storage_path().'/'.'app'.'/'.'public' .'/'.'prescriptions'.'/'. $fileName);\n $pres->delete();\n }", "title": "" }, { "docid": "0428848b8d6110c6be21d9479ece2192", "score": "0.56237406", "text": "public function removeImage()\n {\n if (!empty($this->image) && !empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "title": "" }, { "docid": "81b2a149b82ad070a8fc5640c23cb4c5", "score": "0.56235874", "text": "public function deleteResource($resourceId)\n {\n $req = new RESTRequest();\n $data = $req->adminGet('LearningObject/delete/' . $resourceId)->getData();\n return $data;\n }", "title": "" }, { "docid": "1ed1ac142686a23f0827e755ecbc86db", "score": "0.5618705", "text": "public function delete($resource, array $args = [], array $options = []) {\n return $this->do('DELETE', $resource, $args, $options);\n\n }", "title": "" }, { "docid": "c0ac500c5b367ee589c3c33143eb832b", "score": "0.5617002", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return response()->json(['success' => 'borrado correctamente']);\n }", "title": "" }, { "docid": "a9c212129736f6a4e7fd4eddbccc6f2f", "score": "0.56163317", "text": "public function destroy($id)\n {\n $delete = Supplier::where(\"id\", $id)->first();\n $img = $delete->photo;\n if($img){\n unlink('backend/assets/images/supplier/'.$img);\n $delete->delete();\n toast('Supplier Information Delete Successfully','success');\n return redirect()->route('index.supplier');\n }else{\n toast('Supplier Not Deleted','success');\n return redirect()->route('index.supplier');\n }\n }", "title": "" }, { "docid": "6b5dbac631e37705e1c7cf319db2d7e6", "score": "0.56112254", "text": "public function deleteFromDisk()\n {\n return Storage::disk($this->getLocalDiskName())->delete($this->getStoragePath(true));\n }", "title": "" }, { "docid": "14d4df02668a2d07f51666ab31e093b8", "score": "0.5609148", "text": "public function destroy($id)\n {\n $store = Store::findorFail($id);\n $product = Product::firstorfail()->where('store_id', $id);\n // unlink(public_path() . '/img/' . $product->image);\n $product->delete();\n unlink(public_path() . '/str_img/' . $store->image);\n $store->delete();\n return redirect()->back()->withDelete(\"Store Deleted Succesfully\");\n\n\n \n }", "title": "" }, { "docid": "ea306158775b698c5435960d49c257ab", "score": "0.56042147", "text": "public function delete()\n {\n $this->remote->delete($this->file);\n }", "title": "" }, { "docid": "f7e25a0f3411ba82d9ef10dbdff68bb4", "score": "0.5600532", "text": "public function beforeDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "6fbcf9a59c7f34ed85fd172cdf3d3c38", "score": "0.5595493", "text": "public function remove(){}", "title": "" }, { "docid": "5f7b880d9042e6af83f1343c11f66a8e", "score": "0.5595085", "text": "public function destroy($record);", "title": "" }, { "docid": "eb90c146961dd680727f52741dd87d78", "score": "0.55930966", "text": "public function delete($key) {\n $this->assertKey($key);\n \n unset($this->storage[$key]);\n }", "title": "" }, { "docid": "13866f5828119bb8aae429440b86e949", "score": "0.55884856", "text": "public function destroy($id)\n {\n\n $imga = Image::find($id);\n Storage::disk('public')->delete('img/' . $imga->src);\n $imga->delete();\n\n\n return redirect()->back();\n }", "title": "" }, { "docid": "24ef05d1335abf0bd48387e294875133", "score": "0.5576293", "text": "public function delete($fireStorageEvents = true);", "title": "" }, { "docid": "0d6640f36c0ca88fbe56977a74dad5f1", "score": "0.55737436", "text": "public function remove(MediaInterface $media);", "title": "" }, { "docid": "268c30c6782025503083fc7ba52c1d0a", "score": "0.557298", "text": "public function delete() {\n $this->dataStoreAdapter->deleteObject($this->getUuid());\n }", "title": "" }, { "docid": "2d72bcdac1bcdd14301b9a6ad301fae7", "score": "0.5572793", "text": "public function actionPatientremove() {\n\n $id = $_POST['id'];\n $name = $_POST['name'];\n\n $root_path = Yii::$app->basePath . '/../uploads/patient';\n $path = $root_path . '/' . $id . '/' . $name;\n\n\n if (file_exists($path)) {\n\n if (unlink($path)) {\n\n }\n }\n }", "title": "" }, { "docid": "65ec7f8ef3c165ae2d123008792c4d10", "score": "0.55707175", "text": "public function delete()\n {\n \\File::delete([\n $this->path,\n $this->thumbnail_path,\n\n ]);\n\n parent::delete();\n }", "title": "" }, { "docid": "8179dc9b6bd99410fef7c74e3b56208a", "score": "0.5570384", "text": "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n @unlink($file); \n \n }", "title": "" }, { "docid": "ead6a9412215d17945f8769860e1b262", "score": "0.5569038", "text": "public function remove($file) {\n\t\t$this->emitCache('put', $file);\n\t\tparent::remove($file);\n\t}", "title": "" }, { "docid": "4aff284263b8a4a2b80b972accc89eb6", "score": "0.55585116", "text": "public function removeFile($file_obj)\n\t{\n\t\t$fs = new Filesystem();\n\t\tif($fs->exists($file_obj->getUrlStorage()))\n\t\t{\n\t\t\t$fs->remove($file_obj->getUrlStorage());\n\t\t}\n\t}", "title": "" }, { "docid": "ec1b691c67eb4c9111f82f370bc46ab2", "score": "0.55521524", "text": "public function removeAction ()\n { \n if (!empty ($this->params ['file']) AND file_exists (UPLOAD_PATH.$this->params ['file']))\n unlink (UPLOAD_PATH.$this->params ['file']); \n if (!empty ($this->params ['media_id']))\n {\n $model = new Model_DbTable_MediaData ();\n $model->delete_media ($this->params ['media_id']);\n } \n }", "title": "" }, { "docid": "cf67810bc53f9cd6c02a127c0ee780e0", "score": "0.55445576", "text": "public function remove()\n\t{\n\t\tFile::remove($this->tempName);\n\t}", "title": "" }, { "docid": "94cb51fff63ea161e1d8f04215cfe7bf", "score": "0.55422723", "text": "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "9ac57f5d74d74f050136ae1e642ec949", "score": "0.5532133", "text": "public function delete($path) {\n $absPath = $this->_getAbsPath($path);\n $status = @unlink($absPath);\n\n if (!$status) {\n if (file_exists($absPath)) {\n throw new Scalar_Storage_Exception('Unable to delete file.');\n } else {\n $this->_log(\"Scalar_Storage_Adapter_Filesystem: Tried to delete missing file '$path'.\");\n }\n }\n }", "title": "" }, { "docid": "584dea86c95ee49398418c499126a231", "score": "0.55317944", "text": "public function forgetUsed()\n {\n if ($this->app['files']->exists($this->getUsedStoragePath())) {\n $this->app['files']->delete($this->getUsedStoragePath());\n }\n }", "title": "" }, { "docid": "52c48eff326d035cdfe9e0df0c79a23f", "score": "0.55300117", "text": "public function removeFromStorage()\n {\n if ( ! $this->is_raw ) {\n return MediaStorage::adapterByDisk($this->disk)->delete($this->path);\n }\n\n return true;\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
15a29e2499cbd7fa5e2a14da2c85f933
Data provider with invalid input.
[ { "docid": "532f14cd6045ac8a6d9f8fb353a6cc33", "score": "0.0", "text": "public function getInvalidInputData(): array\n {\n return [\n [\n 'row_id' => 1,\n 'data' =>\n [\n 'SKU' => \"111111\",\n 'description' => \"this is product with non float normalPrice\",\n 'normalPrice' => \"10\",\n 'specialPrice' => \"8.50\",\n ]\n ], [\n 'row_id' => 2,\n 'data' =>\n [\n 'SKU' => \"222222\",\n 'description' => \"this is product with specialPrice higher than normalPrice\",\n 'normalPrice' => \"10.50\",\n 'specialPrice' => \"11.00\",\n ]\n ], [\n 'row_id' => 3,\n 'data' =>\n [\n 'SKU' => \"333333\",\n 'description' => \"this is product with non float specialPrice\",\n 'normalPrice' => \"10.50\",\n 'specialPrice' => \"5\",\n ]\n ], [\n 'row_id' => 4,\n 'data' => [\n 'SKU' => \"444\",\n 'description' => \"this is product with sku that doesn't match min value of symbols (5)\",\n 'normalPrice' => \"10.50\",\n 'specialPrice' => \"5.00\",\n ]\n ], [\n 'row_id' => 5,\n 'data' => [\n 'SKU' => \"555555\",\n 'description' => \"this is product with null value for normalPrice\",\n 'normalPrice' => null,\n 'specialPrice' => null,\n ]\n ], [\n 'row_id' => 6,\n 'data' => [\n //null value for description\n 'SKU' => \"666666\",\n 'description' => null,\n 'normalPrice' => \"40.5\",\n 'specialPrice' => null,\n ]\n ], [\n 'row_id' => 7,\n 'data' => [\n 'SKU' => null,\n 'description' => \"this is product with null value for sku\",\n 'normalPrice' => \"40.5\",\n 'specialPrice' => null,\n ]\n ], [\n 'row_id' => 8,\n 'data' => [\n 'SKU' => \"888888\",\n 'description' => \"<script>alert('hello from XSS!!!');</script>\",\n 'normalPrice' => \"40.5\",\n 'specialPrice' => \"20.00\",\n ],\n ]\n ];\n }", "title": "" } ]
[ { "docid": "de21df181b2a81a8d720fac14791b89f", "score": "0.7258117", "text": "public function executeValueModifierInvalidDataProvider() {}", "title": "" }, { "docid": "e5c4a68694169d30a75851fd87347db7", "score": "0.692736", "text": "public function callUserFunctionInvalidParameterDataprovider() {}", "title": "" }, { "docid": "2c42cba6581f5924758ee3d6ff13ab5b", "score": "0.6860247", "text": "public function invalidInputDataProvider()\n {\n return array(\n array(null),\n array(false),\n array(true),\n array(0),\n array(1),\n array(array()),\n );\n }", "title": "" }, { "docid": "99e2654dd9d89a51a44475c9adc36bf1", "score": "0.68593675", "text": "public function invalid_data_provider () {\n\t\treturn array(\n\t\t\tarray(\"foobar\", \"'string' is not valid for int 'int'\"),\n\t\t\tarray(array(), \"'array' is not valid for int 'int'\"),\n\t\t\tarray((object)array(), \"'object' is not valid for int 'int'\"),\n\t\t);\n\t}", "title": "" }, { "docid": "87bc2600478aeb46a8148086f0a1ad6f", "score": "0.66984415", "text": "public function validEmailInvalidDataProvider() {}", "title": "" }, { "docid": "823142395d23a0a5b84f4bc0ecf9bec8", "score": "0.66596615", "text": "public function dataProviderWithInvalidName()\n {\n return \n [\n 'negative test data one' => [\"12345678945-6786%8\"],\n 'negative test data two' => [\"testing.Sample_!@#%\"],\n 'negative test data three' => [\"!@#$%^&**\"],\n 'negative test data four' => [\"GT%&*976123829253256\"],\n 'negative test data five' => [\"^%(ERTYUIOSdfghgshkshiweyowhsjkbxl\"],\n 'negative test data six' => [\"dfghjklzxcvbnertyuixcvbertyu(^#\"],\n 'negative test data seven' => [\"12345678@34*945678\"]\n ];\n }", "title": "" }, { "docid": "63b73cf47e6a32e67e28cd36da5f0bd1", "score": "0.6597944", "text": "public function dataProviderWithInvalidName()\n {\n return \n [\n 'negative test data one' => [\"12345678945-6786%8\"],\n 'negative test data two' => [\"testing.Sample_!@#%\"],\n 'negative test data three' => [\"!@#$%^&**\"],\n 'negative test data four' => [\"GT%&*976123829253256\"],\n 'negative test data five' => [\"^%(ERTYUIOSdfghgshkshiweyowhsjkbxl\"],\n 'negative test data six' => [\"dfghjklzxcvbnertyuixcvbertyu(^#\"],\n 'negative test data seven' => [\"12345678@34*945678\"],\n ];\n }", "title": "" }, { "docid": "7c6e0acf2d6bc828dd63b59016a29ef2", "score": "0.6512477", "text": "public function invalidParameterTypesPassedToBindValueThrowsExceptionDataProvider() {}", "title": "" }, { "docid": "31cfed59652a674f52d0eede9973e498", "score": "0.62793624", "text": "public function dataProviderWithInvalidPassword()\n {\n return \n [\n 'negative test data one' => [\"@Ghu\"],\n 'negative test data two' => [\"&res\"],\n 'negative test data three' => [\"@123\"],\n 'negative test data four' => [\"TjIY\"],\n 'negative test data five' => [\"JTREW\"],\n 'negative test data six' => [\"T\"],\n 'negative test data seven' => [\"b\"],\n 'negative test data eight' => [\"96\"],\n 'negative test data nine' => [\"!^%h\"],\n 'negative test data ten' => [\"18654\"]\n ];\n }", "title": "" }, { "docid": "229f3d7c68403636f1fd1e788ae84c48", "score": "0.6249749", "text": "public function invalid_parameters_provider() {\n $data = array(\n array(0),\n array(-1),\n array(-11),\n array('asdf123'),\n array('-asdf123'),\n array('-11'),\n array('111asdf'),\n array('-111asdf'),\n array('asdf')\n );\n\n return $data;\n }", "title": "" }, { "docid": "958c6ba4ed64abd6ea957810ad298d9d", "score": "0.6188936", "text": "abstract protected function validateData();", "title": "" }, { "docid": "d049eac9a8377f2d96ae713cadd686e2", "score": "0.61628133", "text": "abstract public function validateProvider();", "title": "" }, { "docid": "411557cded9f001ddfc055c25472b868", "score": "0.61184794", "text": "public function getValueByPathInvalidPathDataProvider() {}", "title": "" }, { "docid": "ecfc39c3e3bc4c76361957405e1001b2", "score": "0.60994214", "text": "public function invalidInput()\n {\n $this->error('invalid_input');\n }", "title": "" }, { "docid": "ab56fe947ad85cdbd7caf101064ffdd8", "score": "0.6092948", "text": "public function beginsWithReturnsInvalidArgumentDataProvider() {}", "title": "" }, { "docid": "f0b98838c45a0113fc08f573beb4dbc8", "score": "0.60703266", "text": "public function invalidValueProvider() {\n return array(\n \"string\" => array('test'),\n \"int\" => array(1234),\n );\n }", "title": "" }, { "docid": "858cde904e03250448b07f2c92de5025", "score": "0.6061418", "text": "public static function cmpFqdnInvalidDataProvider() {}", "title": "" }, { "docid": "47aaed9b09ac0e996345aee699a6829a", "score": "0.60596526", "text": "function validateData() {}", "title": "" }, { "docid": "4b871960c8ca6475ad4bdf60cd6db173", "score": "0.6054634", "text": "protected function simpleInputFieldsDataProvider() {}", "title": "" }, { "docid": "d3f39e0d243312ae1d81e9b5f25b8af2", "score": "0.601801", "text": "public function functionCanBeInterpretedAsIntegerInvalidDataProvider() {}", "title": "" }, { "docid": "44803aeeadb42ba1ab04d555d0f75071", "score": "0.59584886", "text": "public function invalidVersionNumberDataProvider() {}", "title": "" }, { "docid": "ace3f5dd5d41725815736927ef86ce6a", "score": "0.5941016", "text": "public function dataParseExceptionDataProvider(): array\n {\n return array_merge(\n $this->prepareNonUniqueNameTestData()\n );\n }", "title": "" }, { "docid": "c151a89c0030ccd24dc685549e22ecf4", "score": "0.5933922", "text": "public static function dataProviderInvalidPropertyData()\n\t{\n\t\treturn array(\n\t\t\t// No data at all\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t),\n\t\t\t),\n\t\t\t\n\t\t\t// Only username\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'username' => 'test',\n\t\t\t\t),\n\t\t\t),\n\t\t\t\n\t\t\t// Only password\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'password' => 'test',\n\t\t\t\t),\n\t\t\t),\n\t\t\t\n\t\t\t// Empty username\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'username' => '',\n\t\t\t\t\t'password' => 'test',\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "11f3f144559dbf43bb08e396e27967e8", "score": "0.59112823", "text": "public static function invalidIpDataProvider() {}", "title": "" }, { "docid": "cfddd663eb804c7727a9bac02176444a", "score": "0.5878104", "text": "public function provideInvalidData() {\n $result = [\n ['a', false],\n ['a', 123],\n ['a', 'foo'],\n ['a', ['bar' => 'baz']],\n ['o', false],\n ['o', 123],\n ['o', 'foo'],\n ['o', [1, 2, 3]],\n ['i', false],\n ['i', 'foo'],\n ['i', [1, 2, 3]],\n ['s', false],\n ['s', [1, 2, 3]],\n ['f', false],\n ['f', 'foo'],\n ['f', [1, 2, 3]],\n ['b', 123],\n ['b', 'foo'],\n ['b', [1, 2, 3]],\n ['ts', false],\n ['ts', 'foo'],\n ['ts', [1, 2, 3]],\n ['dt', (string)time()],\n ['dt', 'foo'],\n ['dt', [1, 2, 3]]\n ];\n\n return $result;\n }", "title": "" }, { "docid": "64a62b73e01a5587ee5989f5fc8dfb11", "score": "0.58496165", "text": "public function testGetDataInvalidSpecificDataField()\n\t{\n\t\t$testData = array(\n\t\t\t'test' => array('a', 'b', 'c')\n\t\t);\n\t\t\n\t\t// set data\n\t\t$this->data->setData($testData);\n\t\t\n\t\t// set data field\n\t\t$this->data->dataField = 'randomDataField';\n\t\t\n\t\t$this->assertEquals([], $this->data->getData(false));\n\t}", "title": "" }, { "docid": "bff27f9309fef9e18585e7e9594a3f80", "score": "0.584687", "text": "public function testCreateInvalidDataSetReturnsAtLeastOneInvalidData(): void\n {\n $dataSet = CVQualifierSequenceProvider::createInvalidDataSet();\n self::assertTrue(\\count($dataSet) > 0);\n }", "title": "" }, { "docid": "085e9e6152052220014a6a4717cdc2d1", "score": "0.5836493", "text": "public function providerInvalidFields()\n {\n return [\n [\n ['titles' => 'test field']\n ]\n ];\n }", "title": "" }, { "docid": "5f68a3992e81de3edf193d80de82bb71", "score": "0.5830101", "text": "public function badParameterProvider() {\n return [\n [[['lorem']]],\n [''],\n ];\n }", "title": "" }, { "docid": "9649d0776f9a972832c4b8e9654674cb", "score": "0.57698816", "text": "function getInvalidData () \n {\n $badDataEntries = array();\n\n if ($this->id == null || $this->id <= 0) { \n array_push ($badDataEntries, \"'id' is zero\"); \n }\n\n // nothing may be a valid answer, don't check the demo\n return $badDataEntries;\n }", "title": "" }, { "docid": "3aeb3115bb2311b5da5b1da5eee8fc9b", "score": "0.5760791", "text": "public function ValidateData();", "title": "" }, { "docid": "3aeb3115bb2311b5da5b1da5eee8fc9b", "score": "0.5760791", "text": "public function ValidateData();", "title": "" }, { "docid": "3aeb3115bb2311b5da5b1da5eee8fc9b", "score": "0.5760791", "text": "public function ValidateData();", "title": "" }, { "docid": "10ee3021addbae023c42c873b404c5a2", "score": "0.5760667", "text": "public function invalidKeyDataProvider()\n {\n return [\n [\"Thing's stuff\"],\n [\"1st Thing's thingamajig\"],\n ];\n }", "title": "" }, { "docid": "fbd52a051ea9fd01d085b37089e883d8", "score": "0.5745632", "text": "public function testInvalidDataOnEmptyException():void{\n\t\t$this->expectException(QRCodeDataException::class);\n\t\t$this->expectExceptionMessage('invalid data');\n\n\t\t$this->QRData->setData([new $this->FQN('')]);\n\t}", "title": "" }, { "docid": "94a9dca5e7f3879be6e1790f7377dfb6", "score": "0.57356584", "text": "public function aroundValidateDataProvider()\n {\n return [[2, 0], [1, 1]];\n }", "title": "" }, { "docid": "8240d8f3f0cbe5664fc92201e415a49a", "score": "0.57197636", "text": "public static function dataProviderInvalidPageSource(): array\n {\n return [\n 'Empty' => [''],\n 'Invalid HTML' => ['<html><body></html>'],\n 'Not HTML' => ['This is not HTML']\n ];\n }", "title": "" }, { "docid": "4f3d07b34973ed021079a5dba93d7348", "score": "0.57179844", "text": "public function dataProviderWithValidName()\n {\n return \n [\n 'positve test data one' => [\"Test467\"],\n 'positve test data two' => [\"Sample1\"],\n 'positve test data three' => [\"testsample4\"],\n 'positve test data four' => [\"Test66sample\"],\n 'positve test data five' => [\"testingSample7\"],\n 'positve test data six' => [\"TestSample\"],\n 'positve test data seven' => [\"Sample2Testing\"],\n 'positve test data eight' => [\"Sample3test\"],\n 'positve test data nine' => [\"testsample66\"],\n 'positve test data ten' => [\"Test1Sample398\"]\n ];\n }", "title": "" }, { "docid": "6262515e48ba3129135bdec8875991b1", "score": "0.5699031", "text": "public function isValidUrlInvalidRessourceDataProvider() {}", "title": "" }, { "docid": "1914d2cfcee9cfc4425bff5b94d85b50", "score": "0.5694", "text": "public function testGetProviderWithInvalidProvider(): void\n {\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('ArrayObject is not a valid provider');\n\n $provider = ProviderSimpleFactory::getProvider(ArrayObject::class);\n }", "title": "" }, { "docid": "574c279e5ffbe4275389c0ecc555f8d8", "score": "0.56823975", "text": "public function testInvalidDataException():void{\n\t\t$this->expectException(QRCodeDataException::class);\n\t\t$this->expectExceptionMessage('invalid data');\n\n\t\t$this->QRData->setData([new $this->FQN('##')]);\n\t}", "title": "" }, { "docid": "2d8bb4499995904d788065f68ac675cf", "score": "0.56768155", "text": "public function dataProviderWithValidName()\n {\n return \n [\n 'positve test data one' => [\"Test467\"],\n 'positve test data two' => [\"Sample1\"],\n 'positve test data three' => [\"testsample4\"],\n 'positve test data four' => [\"Test66sample\"],\n 'positve test data five' => [\"testingSample7\"],\n 'positve test data six' => [\"TestSample\"],\n 'positve test data seven' => [\"Sample2Testing\"],\n 'positve test data eight' => [\"Sample3test\"],\n 'positve test data nine' => [\"testsample66\"],\n 'positve test data ten' => [\"Test1Sample398\"]\n ];\n }", "title": "" }, { "docid": "452fd5ef16a5dd857b5bb0f8e351f43b", "score": "0.5658685", "text": "public static function invalidValueProvider(): array\n {\n return [\n 'string' => ['test'],\n 'int' => [1234],\n ];\n }", "title": "" }, { "docid": "10ea0e65701f60e0788709ec2b85db7a", "score": "0.5620489", "text": "public function testInstantiationFailInvalidDataHandler()\n {\n new CSV(array(\n 'map' => array(\n 'name' => 0,\n 'surname' => 1,\n ),\n 'handler' => true\n ));\n }", "title": "" }, { "docid": "47662bff2431991ac300e9184dff321f", "score": "0.55946505", "text": "public function badArgumentProvider()\n {\n return [\n [0, 'add'],\n [1.0, 'add'],\n [[], 0],\n [[], null],\n [[], 'unknown'],\n ];\n }", "title": "" }, { "docid": "63a721605075dc714f614a6b5fc6f874", "score": "0.5592149", "text": "public static function InvalidValueProvider(): array {\n return [\n [[]],\n [[1]],\n [(object)[]],\n [(object)[1]]\n ];\n }", "title": "" }, { "docid": "077a6820abf0348e4207b24d1c4a346f", "score": "0.5583461", "text": "public function BadFactoryCreateArgumentProvider()\n {\n return [\n [\n 'this-dsn-will-fail',\n 'username',\n 'putastrongpasswordhere'\n ],\n ];\n }", "title": "" }, { "docid": "a8c3fbbd5ae5bb5175004ea2813b33ac", "score": "0.555812", "text": "public function testGetDataWhenFieldDoesNotExist()\n\t{\n\t\t$testData = array(\n\t\t\t'test' => array('a', 'b', 'c')\n\t\t);\n\t\t\n\t\t// set data\n\t\t$this->data->setData($testData);\n\t\t\n\t\t// set data field\n\t\t$this->data->dataField = 'invalidDataField';\n\t\t\n\t\t$this->assertEquals([], $this->data->getData(false));\n\t}", "title": "" }, { "docid": "ec4b592b330731cf5eafd12a0929a094", "score": "0.5552284", "text": "protected function dataCheck() {\n\t\tif( FALSE === isset( $this->data['egResult'] ) ) {\n\t\t\t$this->data['egResult'] = array();\n\t\t}\n\t\tif( FALSE === isset( $this->data['fields'] ) ) {\n\t\t\t$this->data['fields'] = self::DEFAULT_FIELDS;\n\t\t}\n\t}", "title": "" }, { "docid": "2f22040be91d32ea22dbb407ccae1d71", "score": "0.5544911", "text": "public function functionCanBeInterpretedAsFloatInvalidDataProvider() {}", "title": "" }, { "docid": "eef4ee7f8276877bdbdcbe67fb7d8958", "score": "0.55376345", "text": "public static function dataProvider()\n\t{\n\t\t$exceptionClass = 'Opt_Expression_Exception';\n\t\treturn array(\n\t\t\tarray(false, '\\'foo\\'', '\\'foo\\'', 0),\n\t\t\tarray(false, '42', '42', 0),\n\t\t\tarray(false, '$foo', '$ctx->_data[\\'foo\\']', 0),\n\t\t\tarray(false, '$2foo', '', $exceptionClass),\n\t\t\tarray(false, '@foo', '$ctx->_vars[\\'foo\\']', 0),\n\t\t\tarray(false, '$foo@bar', '$this->_tf->_(\\'foo\\',\\'bar\\')', 0),\n\t\t\tarray(false, '$foo[\\'bar\\']', '$ctx->_data[\\'foo\\'][\\'bar\\']', 0),\n\t\t\tarray(false, '$foo.bar', '$ctx->_data[\\'foo\\'][\\'bar\\']', 0),\n\t\t\tarray(false, '$foo.bar.joe', '$ctx->_data[\\'foo\\'][\\'bar\\'][\\'joe\\']', 0),\n\t\t\tarray(false, '$foo.bar[\\'joe\\']', '$ctx->_data[\\'foo\\'][\\'bar\\'][\\'joe\\']', 0),\n\t\t\tarray(false, '$foo[\\'bar\\'].joe', '', $exceptionClass),\n\t\t\tarray(false, '$foo[1]', '$ctx->_data[\\'foo\\'][1]', 0),\n\t\t\tarray(false, '$foo[$i]', '$ctx->_data[\\'foo\\'][$ctx->_data[\\'i\\']]', 0),\n\t\t\tarray(false, '$foo[$i][\\'bar\\']', '$ctx->_data[\\'foo\\'][$ctx->_data[\\'i\\']][\\'bar\\']', 0),\n\t\t\tarray(false, '@foo.bar', '$ctx->_vars[\\'foo\\'][\\'bar\\']', 0),\n\t\t\tarray(false, '$foo + $bar', '$ctx->_data[\\'foo\\']+$ctx->_data[\\'bar\\']', 0),\n\t\t\tarray(false, '$foo - $bar', '$ctx->_data[\\'foo\\']-$ctx->_data[\\'bar\\']', 0),\n\t\t\tarray(false, '-$bar', '-$ctx->_data[\\'bar\\']', 0),\n\t\t\tarray(false, '$foo == $bar', '$ctx->_data[\\'foo\\']==$ctx->_data[\\'bar\\']', 0),\n\t\t\tarray(false, '$foo + 5', '$ctx->_data[\\'foo\\']+5', 0),\n\t\t\tarray(false, '$foo == 5', '$ctx->_data[\\'foo\\']==5', 0),\n\t\t\tarray(false, '$foo~\\'bar\\'', '(string)$ctx->_data[\\'foo\\'].(string)\\'bar\\'', 0),\n\t\t\tarray(false, '$foo == \\'bar\\'', '$ctx->_data[\\'foo\\']==\\'bar\\'', 0),\n\t\t\tarray(false, '$foo gt 3', '$ctx->_data[\\'foo\\']>3', 0),\n\t\t\tarray(true, '$foo is $bar + $joe', '$ctx->_data[\\'foo\\']=$ctx->_data[\\'bar\\']+$ctx->_data[\\'joe\\']', 0),\n\t\t\tarray(false, '($foo + $bar) * $joe', '($ctx->_data[\\'foo\\']+$ctx->_data[\\'bar\\'])*$ctx->_data[\\'joe\\']', 0),\n\t\t\tarray(false, '$joe * ($foo + $bar)', '$ctx->_data[\\'joe\\']*($ctx->_data[\\'foo\\']+$ctx->_data[\\'bar\\'])', 0),\n\t\t\tarray(false, 'funct($foo + $bar)', 'funct($ctx->_data[\\'foo\\']+$ctx->_data[\\'bar\\'])', 0),\n\t\t\tarray(false, 'funct($foo + $bar, 5, \\'joe\\')', 'funct($ctx->_data[\\'foo\\']+$ctx->_data[\\'bar\\'],5,\\'joe\\')', 0),\n\t\t\tarray(false, 'foo($a, funct($foo + $bar, 5, \\'joe\\'), $c)', 'foo($ctx->_data[\\'a\\'],funct($ctx->_data[\\'foo\\']+$ctx->_data[\\'bar\\'],5,\\'joe\\'),$ctx->_data[\\'c\\'])', 0),\n\t\t\tarray(false, 'foo(,,)', '', $exceptionClass),\n\t\t\tarray(false, 'foo($a,)', '', $exceptionClass),\n\t\t\tarray(false, '$object::funct($foo + $bar, 5, \\'joe\\')', '$ctx->_data[\\'object\\']->funct($ctx->_data[\\'foo\\']+$ctx->_data[\\'bar\\'],5,\\'joe\\')', 0),\n\t\t\tarray(false, 'class::funct($foo + $bar, 5, \\'joe\\')', '_class::funct($ctx->_data[\\'foo\\']+$ctx->_data[\\'bar\\'],5,\\'joe\\')', 0),\n\t\t\tarray(true, '$object is new class', '$ctx->_data[\\'object\\']=new _class', 0),\n\t\t\tarray(false, 'funct(new class)', 'funct(new _class)', 0),\n\t\t\tarray(true, '$object is new class($foo)', '$ctx->_data[\\'object\\']=new _class($ctx->_data[\\'foo\\'])', 0),\n\t\t\tarray(false, 'funct(new class($foo))', 'funct(new _class($ctx->_data[\\'foo\\']))', 0),\n\t\t\tarray(false, 'foo(bar(joe(1)))', 'foo(bar(joe(1)))', 0),\n\t\t\tarray(false, 'foo()', 'foo()', 0),\n\t\t\tarray(false, 'foo()::bar', 'foo()->bar', 0),\n\t\t\tarray(false, 'foo()::bar()', 'foo()->bar()', 0),\n\t\t\tarray(false, 'foo()::bar()::joe', 'foo()->bar()->joe', 0),\n\t\t\tarray(false, '($a + $b))::bar()', '', $exceptionClass),\n\t\t\tarray(false, 'foo(bar(joe(1))', '', $exceptionClass),\n\t\t\tarray(false, 'foo()::', '', $exceptionClass),\n\t\t\tarray(false, '$foo add $bar', '$ctx->_data[\\'foo\\']+$ctx->_data[\\'bar\\']', 0),\n\t\t\tarray(false, '$foo sub $bar', '$ctx->_data[\\'foo\\']-$ctx->_data[\\'bar\\']', 0),\n\t\t\tarray(false, '$foo mul $bar', '$ctx->_data[\\'foo\\']*$ctx->_data[\\'bar\\']', 0),\n\t\t\tarray(false, '$foo div $bar', '$ctx->_data[\\'foo\\']/$ctx->_data[\\'bar\\']', 0),\n\t\t\tarray(false, '$foo mod $bar', '$ctx->_data[\\'foo\\']%$ctx->_data[\\'bar\\']', 0),\n\t//\t\tarray(false, 'add ~ sub', '\\'add\\'.\\'sub\\'', 0),\n\t//\t\tarray(false, 'mul', '\\'mul\\'', 0),\n\t//\t\tarray(false, 'mul ~ div ~ mod', '\\'mul\\'.\\'div\\'.\\'mod\\'', 0),\n\t\t//\tarray(false, 'add $bar', '', $exceptionClass),\n\t\t\tarray(false, '++$bar', '++$ctx->_data[\\'bar\\']', 0),\n\t\t\tarray(false, '$bar++', '$ctx->_data[\\'bar\\']++', 0),\n\t\t\tarray(false, '--$bar', '--$ctx->_data[\\'bar\\']', 0),\n\t\t\tarray(false, '$bar--', '$ctx->_data[\\'bar\\']--', 0),\n\t\t\tarray(false, 'foo(++$bar)', 'foo(++$ctx->_data[\\'bar\\'])', 0),\n\t\t\tarray(false, 'foo($bar++)', 'foo($ctx->_data[\\'bar\\']++)', 0),\n\t\t\tarray(false, 'foo($bar++)++', '', $exceptionClass),\n\t\t\tarray(false, '++$obj::foo', '++$ctx->_data[\\'obj\\']->foo', 0),\n\t\t\tarray(false, '$obj::foo++', '$ctx->_data[\\'obj\\']->foo++', 0),\n\t\t\tarray(false, '++$obj::foo()', '', $exceptionClass),\n\t\t\tarray(false, '$obj::foo()++', '', $exceptionClass),\n\t\t\tarray(false, 'not($foo lt $bar)', '!($ctx->_data[\\'foo\\']<$ctx->_data[\\'bar\\'])', 0),\n\t\t\tarray(false, 'not($foo lt $bar and $foo gt 6)', '!($ctx->_data[\\'foo\\']<$ctx->_data[\\'bar\\']&&$ctx->_data[\\'foo\\']>6)', 0),\n\t\t\tarray(false, '$foo lt $bar and $foo gt 6', '$ctx->_data[\\'foo\\']<$ctx->_data[\\'bar\\']&&$ctx->_data[\\'foo\\']>6', 0),\n\t\t\tarray(false, '$a + () + $c', '', $exceptionClass),\n\t\t\tarray(false, '$x + (++foo() - 5) * 2', '', $exceptionClass),\n\t\t\tarray(false, '--$obj::foo()', '', $exceptionClass),\n\t\t\tarray(false, '++($a + $b)', '', $exceptionClass),\n\t\t\tarray(false, '($a + $b)++', '', $exceptionClass),\n\t\t\tarray(false, 'null', 'null', 0),\n\t\t\tarray(false, 'false', 'false', 0),\n\t\t\tarray(false, 'true', 'true', 0),\n\t\t\tarray(false, 'true add false', 'true+false', 0),\n\t\t\tarray(false, 'foo(null)', 'foo(null)', 0),\n\t\t\tarray(false, '5 true 5', '', $exceptionClass),\n\t\t\tarray(false, '5 false 5', '', $exceptionClass),\n\t\t\tarray(false, '5 null 5', '', $exceptionClass),\n\t\t\tarray(false, '$foo[null]', '$ctx->_data[\\'foo\\'][null]', 0),\n\t\t\tarray(false, 'rotfl()', 'rotfl()', 0),\n\t\t\tarray(false, 'rotfl($a)', 'rotfl($ctx->_data[\\'a\\'])', 0),\n\t\t\tarray(false, 'rotfl($a, $b)', 'rotfl($ctx->_data[\\'a\\'],$ctx->_data[\\'b\\'])', 0),\n\t\t\tarray(false, 'lmao1()', 'lmao()', 'Opt_Expression_Exception'),\n\t\t\tarray(false, 'lmao1($a)', 'lmao($ctx->_data[\\'a\\'])', 0),\n\t\t\tarray(false, 'lmao2($a, $b)', 'lmao($ctx->_data[\\'b\\'],$ctx->_data[\\'a\\'])', 0),\n\t\t\tarray(false, 'lmao3($a, $b, $c)', 'lmao($ctx->_data[\\'b\\'],$ctx->_data[\\'c\\'],$ctx->_data[\\'a\\'])', 0),\n\t\t\tarray(false, 'lmao3($a, $b)', 'lmao($ctx->_data[\\'b\\'],null,$ctx->_data[\\'a\\'])', 0),\n\t\t\tarray(false, 'lol()', 'lol()', 0),\n\t\t\tarray(false, 'lol($a)', 'lol($ctx->_data[\\'a\\'])', 0),\n\t\t\tarray(false, 'lol($a, $b)', 'lol($ctx->_data[\\'a\\'],$ctx->_data[\\'b\\'])', 0),\n\t\t\tarray(false, 'lol($a, $b, $c)', 'lol($ctx->_data[\\'a\\'],$ctx->_data[\\'b\\'],$ctx->_data[\\'c\\'])', 0),\n\t\t\tarray(false, 'assign($foo@bar, 5)', '$this->_tf->assign(\\'foo\\',\\'bar\\',5)', 0),\n\t\t\tarray(true, '$foo@bar is 5', '', $exceptionClass),\n\n\t\t\t// Container and compound operator stuff\n\t\t\tarray(true, '$foo contains 1', 'Opt_Function::contains($ctx->_data[\\'foo\\'], 1)', 0),\n\t\t\tarray(true, '$foo contains both 1 and 2', 'Opt_Function::contains($ctx->_data[\\'foo\\'], 1)&&Opt_Function::contains($ctx->_data[\\'foo\\'], 2)', 0),\n\t\t\tarray(true, '$foo contains either 1 or 2', 'Opt_Function::contains($ctx->_data[\\'foo\\'], 1)||Opt_Function::contains($ctx->_data[\\'foo\\'], 2)', 0),\n\t\t\tarray(true, '$foo contains neither 1 nor 2', '!Opt_Function::contains($ctx->_data[\\'foo\\'], 1)&&!Opt_Function::contains($ctx->_data[\\'foo\\'], 2)', 0),\n\n\t\t\tarray(true, '$foo is between 1 and 5', '1 < $ctx->_data[\\'foo\\'] && $ctx->_data[\\'foo\\'] < 5', 0),\n\t\t\tarray(true, '$foo is not between 1 and 5', '1 >= $ctx->_data[\\'foo\\'] || $ctx->_data[\\'foo\\'] >= 5', 0),\n\t\t\tarray(true, '$foo is either 1 or 5', '1 == $ctx->_data[\\'foo\\'] || $ctx->_data[\\'foo\\'] == 5', 0),\n\t\t\tarray(true, '$foo is neither 1 nor 5', '1 !== $ctx->_data[\\'foo\\'] && $ctx->_data[\\'foo\\'] !== 5', 0),\n\n\t\t\tarray(true, '1 is in $foo', 'Opt_Function::contains($ctx->_data[\\'foo\\'], 1)', 0),\n\t\t\tarray(true, '1 is not in $foo', '!Opt_Function::contains($ctx->_data[\\'foo\\'], 1)', 0),\n\t\t\tarray(true, '1 is either in $foo or $bar', 'Opt_Function::contains($ctx->_data[\\'foo\\'], 1) || Opt_Function::contains($ctx->_data[\\'bar\\'], 1)', 0),\n\t\t\tarray(true, '1 is both in $foo and $bar', 'Opt_Function::contains($ctx->_data[\\'foo\\'], 1) && Opt_Function::contains($ctx->_data[\\'bar\\'], 1)', 0),\n\t\t\tarray(true, '1 is neither in $foo nor $bar', '!Opt_Function::contains($ctx->_data[\\'foo\\'], 1) && !Opt_Function::contains($ctx->_data[\\'bar\\'], 1)', 0),\n\n\t\t\t// Assignment stuff\n\t\t\tarray(true, '$a = 5', '$ctx->_data[\\'a\\']=5', 0),\n\t\t\tarray(true, '@a = 5', '$ctx->_vars[\\'a\\']=5', 0),\n\t\t\tarray(true, '$a = $b = 5', '$ctx->_data[\\'a\\']=$ctx->_data[\\'b\\']=5', 0),\n\t\t\tarray(true, '++$a is 5', '', $exceptionClass),\n\t\t\tarray(true, '$a + $b is $c + $d', '$ctx->_data[\\'a\\']+$ctx->_data[\\'b\\']=$ctx->_data[\\'c\\']+$ctx->_data[\\'d\\']', 0),\n\t\t\tarray(true, 'foo() is $c + $d', '', $exceptionClass),\n\t\t\tarray(true, '5 is 2', '', $exceptionClass),\n\t\t\tarray(true, '$foo is', '', $exceptionClass),\n\t\t\tarray(true, '$foo is ($bar is 3 * (5 + 3))', '$ctx->_data[\\'foo\\']=($ctx->_data[\\'bar\\']=3*(5+3))', 0),\n\t\t\tarray(true, '$a = (((($b = 5))))', '$ctx->_data[\\'a\\']=(((($ctx->_data[\\'b\\']=5))))', 0),\n\t\t\tarray(true, 'rotfl($a = 5)', 'rotfl($ctx->_data[\\'a\\']=5)', 0),\n\t\t\tarray(true, 'rotfl($a = 5, $b = 10)', 'rotfl($ctx->_data[\\'a\\']=5,$ctx->_data[\\'b\\']=10)', 0),\n\t\t\tarray(true, 'is', '\\'is\\'', $exceptionClass),\n\t\t\tarray(true, 'is eq is', '\\'is\\'==\\'is\\'', $exceptionClass),\n\t\t\tarray(true, '$foo is is', '$ctx->_data[\\'foo\\']=\\'is\\'', $exceptionClass),\n\t\t\t// Stupid syntax misuses\n\t\t\tarray(false, '\\'Text body\\'~{$brackettedVariable}', '', $exceptionClass),\n\t\t\tarray(false, 'Text body {$variable}', '', $exceptionClass),\n\t\t\tarray(false, 'foo(\\'text\\'~$foo\\')', '', $exceptionClass),\n\t\t\tarray(false, 'foo(\\'text\\'~$foo\\\")', '', $exceptionClass),\n\t\t\tarray(false, 'foo bar', '', $exceptionClass),\n\n\t\t\t// Other issues\n\t\t\tarray(false, '_()', '_()', 0),\n\t\t\tarray(false, '_(\\'foo\\')', '_(\\'foo\\')', 0),\n\n\t\t\t// Expression modifiers\n\t\t\tarray(false, 'u:\\'foo\\'', '\\'foo\\'', 0),\n\t\t\tarray(false, 'e:\\'foo\\'', 'htmlspecialchars(\\'foo\\')', 0),\n\t\t\tarray(false, 'a:\\'foo\\'', '', 'htmlspecialchars(\\'foo\\')'),\n\t\t\tarray(false, '\\':\\'', '\\':\\'', 0),\n\t\t\tarray(false, 'e::method()', 'e::method()', 0),\n\t\t\tarray(false, 'u::method()', 'u::method()', 0),\n\t\t\tarray(false, 'a::method()', 'a::method()', 0),\n\t\t);\n\t}", "title": "" }, { "docid": "7e9b3a7de631b20fb94a20a2e362bbe6", "score": "0.55367243", "text": "public function inputValuesStringsDataProvider() {}", "title": "" }, { "docid": "e005bd592e2db9b1d38d070d5864023a", "score": "0.55142856", "text": "public function dataProviderWithInvalidEmail()\n {\n return \n [\n 'negative test data one' => [\"TestSample_a@@.com\"],\n 'negative test data two' => [\"testingsample [email protected]\"],\n 'negative test data three' => [\"[email protected]\"],\n 'negative test data four' => [\"[email protected]\"],\n 'negative test data five' => [\"[email protected]\"],\n 'negative test data six' => [\"sampleTEST_example..-@yp_mail.com\"],\n 'negative test data seven' => [\"[email protected]\"],\n 'negative test data eight' => [\"[email protected]\"],\n 'negative test data nine' => [\"[email protected]\"],\n 'negative test data ten' => [\"Sample.442test@_pmail.org\"]\n ];\n }", "title": "" }, { "docid": "bed7fa31174d1aa68469cfc9c0b9d149", "score": "0.5503606", "text": "private function validateData(): void\n {\n if (is_null($this->username) || is_null($this->email) || is_null($this->firstName)\n || is_null($this->lastName) || is_null($this->dob) || is_null($this->roleId)) {\n throw new InvalidArgumentException(\"User operation could not be executed due to invalid fields\");\n }\n }", "title": "" }, { "docid": "aebcd2d7cbdfe65516737694d0cf4880", "score": "0.54902786", "text": "public function invalidFilterDataProvider()\n {\n return [\n [' '],\n [null],\n ['customer(email)'],\n [' customer[email]'],\n ['-'],\n ['customer[id,email],addresses[city,postcode,region[region_code,region]'] //Missing last parentheses\n ];\n }", "title": "" }, { "docid": "3e0c67b0e451e97d5c80d08eb2f39b09", "score": "0.5489297", "text": "public function stdWrap_dataDataProvider() {}", "title": "" }, { "docid": "7062828b9ad29431ef064d87107fe91c", "score": "0.548189", "text": "public function validEmailValidDataProvider() {}", "title": "" }, { "docid": "3a96cdffccc36811f4181df82801318c", "score": "0.54715425", "text": "public function endsWithReturnsThrowsExceptionWithInvalidArgumentsDataProvider() {}", "title": "" }, { "docid": "26c059bba4db11dd765a8e386bb2f231", "score": "0.5466611", "text": "public function providerForTestConstructWithInvalidValues(): array\n {\n return [\n [\n 'something',\n ],\n [\n 'something@',\n ],\n [\n 'something@something',\n ],\n ];\n }", "title": "" }, { "docid": "2e5cc94f682cc4d206c43573fa97f15f", "score": "0.5466426", "text": "public function invalidAttributeSetDataProvider()\n {\n return [\n ['', 'The attribute set name is empty. Enter the name and try again.'],\n ['existing_name', 'A \"existing_name\" attribute set name already exists. Create a new name and try again.']\n ];\n }", "title": "" }, { "docid": "ff9ea5deeb47ff33a11982dcfa03b10f", "score": "0.5459443", "text": "public function dataProviderInvalidConfiguration()\n {\n $data = array();\n $plugin = $this->getMockPlugin();\n\n $data[] = array(\n array(\n 'plugins' => 'foo',\n ),\n Plugin::ERR_PLUGINS_NONARRAY,\n );\n\n $data[] = array(\n array(\n 'plugins' => array(new \\stdClass),\n ),\n Plugin::ERR_PLUGINS_NONPLUGINS,\n );\n\n $data[] = array(\n array(\n 'plugins' => array($plugin, new \\stdClass),\n ),\n Plugin::ERR_PLUGINS_NONPLUGINS,\n );\n\n return $data;\n }", "title": "" }, { "docid": "2ada30e2faa15a906d0968b74eebf346", "score": "0.54573125", "text": "public function stdWrap_requiredDataProvider() {}", "title": "" }, { "docid": "26a8f1c505c3845d99000d786333405c", "score": "0.54287136", "text": "public function dataProviderWithInvalidEmail()\n {\n return \n [\n 'negative test data one' => [\"TestSample_a@@.com\"],\n 'negative test data two' => [\"testingsample [email protected]\"],\n 'negative test data three' => [\"[email protected]\"],\n 'negative test data four' => [\"[email protected]\"],\n 'negative test data five' => [\"[email protected]\"],\n 'negative test data six' => [\"sampleTEST_example..-@yp_mail.com\"],\n 'negative test data seven' => [\"SampleTest67_02ih@@yopmail.com1233@\"],\n 'negative test data eight' => [\"[email protected]\"],\n 'negative test data nine' => [\"[email protected]\"],\n 'negative test data ten' => [\"Sample.442test@_pmail..org\"],\n ];\n }", "title": "" }, { "docid": "5c7833dd02b3375711ad9c0c2cc6b9b2", "score": "0.54258513", "text": "public function ajaxSaveActionDataInvalidDataProvider()\n {\n $expectedData = [\n 'success' => false,\n 'error_message' => 'The required information is invalid. Verify the information and try again.',\n ];\n return [\n [\n // Zip as range but no range values provided\n [\n 'rate' => rand(1, 10000),\n 'tax_country_id' => 'US',\n 'tax_region_id' => '0',\n 'code' => 'Rate ' . uniqid(),\n 'zip_is_range' => '1',\n 'zip_from' => '',\n 'zip_to' => '',\n 'tax_postcode' => '*'\n ],\n $expectedData,\n ],\n // Code is empty\n [\n [\n 'rate' => rand(1, 10000),\n 'tax_country_id' => 'US',\n 'tax_region_id' => '0',\n 'code' => '',\n 'zip_is_range' => '0',\n 'zip_from' => '10000',\n 'zip_to' => '20000',\n 'tax_postcode' => '*',\n ],\n $expectedData\n ],\n // Country ID empty\n [\n [\n 'rate' => rand(1, 10000),\n 'tax_country_id' => '',\n 'tax_region_id' => '0',\n 'code' => 'Rate ' . uniqid(),\n 'zip_is_range' => '0',\n 'zip_from' => '10000',\n 'zip_to' => '20000',\n 'tax_postcode' => '*',\n ],\n $expectedData\n ],\n // Tax zip code is empty\n [\n [\n 'rate' => rand(1, 10000),\n 'tax_country_id' => 'US',\n 'tax_region_id' => '0',\n 'code' => 'Rate ' . uniqid(),\n 'zip_is_range' => '0',\n 'zip_from' => '10000',\n 'zip_to' => '20000',\n 'tax_postcode' => '',\n ],\n $expectedData\n ],\n // All params empty\n [\n [\n 'rate' => '',\n 'tax_country_id' => '',\n 'tax_region_id' => '1',\n 'code' => '',\n 'zip_is_range' => '0',\n 'zip_from' => '',\n 'zip_to' => '',\n 'tax_postcode' => '',\n ],\n $expectedData\n ]\n ];\n }", "title": "" }, { "docid": "232691b85329ef7f005d717ece9179a4", "score": "0.5422112", "text": "public function sanitizeLocalUrlInvalidDataProvider() {}", "title": "" }, { "docid": "658a945097b25fb941356074a01adec4", "score": "0.5413657", "text": "protected function initDataProvider() {}", "title": "" }, { "docid": "d99782f3c6ccc9c47f562826c039f008", "score": "0.54129004", "text": "public function testFilterDataInvalid()\n {\n $factory = $this->create([\n 'columns' => [\n 'title' => [\n 'type' => 'property',\n ],\n ],\n 'filters' => [\n 'title' => [\n 'type' => 'string',\n ],\n ],\n ]);\n $grid = $factory->createGrid(Article::class, [\n 'filter' => [\n 'title' => new \\stdClass(),\n ],\n ]);\n $grid->createView();\n }", "title": "" }, { "docid": "207f50ec252b026895dd6fbd2e01e269", "score": "0.5408689", "text": "public function invalidDescriptionProvider()\n {\n return array(\n array(false),\n array(null),\n array(12),\n array(new \\stdClass())\n );\n }", "title": "" }, { "docid": "ef75c47c58260b0489a55d39829f0b52", "score": "0.5398209", "text": "public function stdWrap_fieldRequiredDataProvider() {}", "title": "" }, { "docid": "118250f1d0b65da1ef7644093149d5b6", "score": "0.53886706", "text": "public function setStockInvalidDataProvider()\n {\n return [\n 'prueba_11_camino_x' => [\n [],\n 3,\n 3,\n 1,\n [1 => null],\n null,\n ],\n 'prueba_12_camino_x' => [\n [5],\n 3,\n 1,\n 1,\n [1 => 5],\n null,\n ],\n 'prueba_14_camino_x' => [\n [5],\n 2,\n 3,\n 1,\n [1 => 5],\n null,\n ],\n 'prueba_15_camino_x' => [\n [5],\n 1,\n 3,\n 1,\n [1 => 5],\n null,\n ],\n ];\n }", "title": "" }, { "docid": "1287b4188191f6f9b531376f62431670", "score": "0.53746915", "text": "public function valid($data);", "title": "" }, { "docid": "b23509e23a22e96c05246e4cc18fec22", "score": "0.5373543", "text": "public function validDataSourceInstance();", "title": "" }, { "docid": "0e61c38837f06d85289228cda30a00ad", "score": "0.5348001", "text": "public function provider_get_migration_throws_exception_on_invalid_input()\n\t{\n\t\treturn array(\n\t\t\tarray(NULL, NULL),\n\t\t\tarray('app', NULL),\n\t\t);\n\t}", "title": "" }, { "docid": "7fc061c0e8f52a242fd03ea1556385e9", "score": "0.5335038", "text": "public function injectWithInvalidProviderClassThrowsException()\n {\n $binder = new stubBinder();\n $binder->bind('stubInjectorProviderTestCase_Answer')->toProviderClass('stdClass');\n $binder->getInjector()->getInstance('stubInjectorProviderTestCase_Question');\n }", "title": "" }, { "docid": "0e7807d38240b6e6610ada6ba482b060", "score": "0.5333585", "text": "public function validateData($data);", "title": "" }, { "docid": "a5913b20e880bb1cdf84e72542e8caa4", "score": "0.53314096", "text": "public function wrongNamesDataProvider() {}", "title": "" }, { "docid": "b933b1a26e2ceca0d33b4dff15a72b18", "score": "0.5330182", "text": "public function isInvalid();", "title": "" }, { "docid": "077b7bc246e5969a1ff17026bee499a1", "score": "0.53246367", "text": "public function valid_parameters_provider() {\n $data = array(\n array(1),\n array(22),\n array(333),\n array(1.5),\n array('111'),\n array('1.5'),\n );\n\n return $data;\n }", "title": "" }, { "docid": "610838f92180122eea5d73b1f000eb26", "score": "0.53228444", "text": "public function storeFailedProvider()\n {\n return [\n 'Empty POST data' => [\n [],\n ['owner_id', 'reporter_id', 'title', 'description'],\n ],\n\n 'Incorrect all POST data' => [\n ['owner_id' => 0, 'reporter_id' => 0, 'title' => '', 'description' => ''],\n ['owner_id', 'reporter_id', 'title', 'description'],\n ],\n\n 'Incorrect user data' => [\n ['owner_id' => 0, 'reporter_id' => 0, 'title' => 'Foo', 'description' => 'Bar'],\n ['owner_id', 'reporter_id'],\n ]\n ];\n }", "title": "" }, { "docid": "c39a4d1d12c51942ab06a09de07c0a07", "score": "0.5310404", "text": "public function provideValidationData() {\n return [\n ['DE', ['DE\\d{9}'], 'DE123456789', TRUE],\n ['DE', ['DE\\d{9}'], 'DE12345', FALSE],\n ['DE', ['DE\\d{9}'], 'DE1234567890', FALSE],\n ['DE', ['DE\\d{9}'], 'DE100', FALSE],\n ];\n }", "title": "" }, { "docid": "39bf72386f2549c6179a62bb4a273575", "score": "0.53096646", "text": "public function testEmptyServiceProviderInputData()\n {\n $this->expectException(MetadataNotFoundException::class);\n\n $dataTransformer = new ServiceProviderInputDataTransformer();\n\n //Empty input obct.\n $sp_input_dto = new \\App\\Dto\\ServiceProviderInput();\n\n $sp = $dataTransformer->transform($sp_input_dto, \"\");\n }", "title": "" }, { "docid": "7d73a5d7e1fdce581f2dbb967527bf84", "score": "0.5308752", "text": "public function providerTestInvalidCalculatedContext() {\n return [\n ['baz'],\n ['baz:'],\n ];\n }", "title": "" }, { "docid": "cf8f5b8b9ed5fb2b2bd7f7a15d7f3e4e", "score": "0.5299673", "text": "public function invalid($item)\n {\n\n }", "title": "" }, { "docid": "460a09cb19f7e7e7e6c2b1c943765e1b", "score": "0.52966326", "text": "public function providerValidateFieldInvalid() : array\n {\n return [\n ['ABC DEF'],\n ['ABC.DEF'],\n [''],\n ];\n }", "title": "" }, { "docid": "3538710cfacca3ca01f6d17fb9b1f088", "score": "0.5293517", "text": "public function optionProviderException()\n {\n return array(\n 'empty_data' => array(\n null,\n array()\n ),\n 'not_found' => array(\n 123,\n array()\n ),\n 'not_title' => array(\n 1,\n array(\n 'position' => 1\n )\n )\n );\n }", "title": "" }, { "docid": "f77a63f9699737f45287006399e505ea", "score": "0.5285033", "text": "public function createData() {\n\t\t\tthrow new \\Exception('Not supported yet.'); \n\t\t}", "title": "" }, { "docid": "ed7fe4f10e2d95defd1600db72800984", "score": "0.52834636", "text": "public function inexistentSearchParamsProvider()\n {\n return [\n ['Inexistent', 'name'],\n ['wrong!', 'status'],\n ['foo', 'wrong'],\n ['bar', ''],\n ];\n }", "title": "" }, { "docid": "67862303081deaae10cd616738fa3b77", "score": "0.52817255", "text": "public function createData() \n\t\t{\n\t\t\tthrow new \\Exception('Not supported yet.'); \n\t\t}", "title": "" }, { "docid": "67862303081deaae10cd616738fa3b77", "score": "0.52817255", "text": "public function createData() \n\t\t{\n\t\t\tthrow new \\Exception('Not supported yet.'); \n\t\t}", "title": "" }, { "docid": "fc70f92775790e95c96fc2b1e244f8a1", "score": "0.52796376", "text": "public function invalidCasesDataProvider(): array\n {\n return [\n [\n '/catalog/[i:some_id]',\n '/catalog/1/a/'\n ],\n [\n '/existing/[i:bar]/',\n '/unexisting/1/'\n ]\n ];\n }", "title": "" }, { "docid": "de04540a083664e1198915667afc6205", "score": "0.5276976", "text": "public function getValueByPathValidDataProvider() {}", "title": "" }, { "docid": "fec0de367aa65736a5517611eaf7e485", "score": "0.52722776", "text": "public function isPlaceholderDataProvider() {}", "title": "" }, { "docid": "40ad54fd664729f15816ed01a2fdb0f9", "score": "0.52680093", "text": "public function createWrongAddressesDataProvider(): array\n {\n return [\n 'required_field_empty_telephone' => [\n array_replace(self::STATIC_CUSTOMER_ADDRESS_DATA, [AddressInterface::TELEPHONE => '']),\n InputException::requiredField('telephone'),\n ],\n 'required_field_empty_postcode_for_us' => [\n array_replace(self::STATIC_CUSTOMER_ADDRESS_DATA, [AddressInterface::POSTCODE => '']),\n InputException::requiredField('postcode'),\n ],\n// TODO: Uncomment this variation after fix issue https://jira.corp.magento.com/browse/MC-31031\n// 'required_field_empty_region_id_for_us' => [\n// array_replace(self::STATIC_CUSTOMER_ADDRESS_DATA, [AddressInterface::REGION_ID => '']),\n// InputException::requiredField('regionId'),\n// ],\n 'required_field_empty_firstname' => [\n array_replace(self::STATIC_CUSTOMER_ADDRESS_DATA, [AddressInterface::FIRSTNAME => '']),\n InputException::requiredField('firstname'),\n ],\n 'required_field_empty_lastname' => [\n array_replace(self::STATIC_CUSTOMER_ADDRESS_DATA, [AddressInterface::LASTNAME => '']),\n InputException::requiredField('lastname'),\n ],\n 'required_field_empty_street_as_array' => [\n array_replace(self::STATIC_CUSTOMER_ADDRESS_DATA, [AddressInterface::STREET => []]),\n InputException::requiredField('street'),\n ],\n 'required_field_empty_city' => [\n array_replace(self::STATIC_CUSTOMER_ADDRESS_DATA, [AddressInterface::CITY => '']),\n InputException::requiredField('city'),\n ],\n// TODO: Uncomment this variation after fix issue https://jira.corp.magento.com/browse/MC-31031\n// 'field_invalid_vat_number' => [\n// array_merge(self::STATIC_CUSTOMER_ADDRESS_DATA, [AddressInterface::VAT_ID => '/>.<*']),\n// null// It need to create some error but currently magento doesn't has validation for this field.,\n// ],\n ];\n }", "title": "" }, { "docid": "4294d6bb93088d6d2e8ba88c8b0fff6c", "score": "0.526304", "text": "public function validateDataDataProvider()\n {\n return [\n [\n [\n 'simple_action' => 'by_fixed',\n 'discount_amount' => '123',\n ],\n true\n ],\n [\n [\n 'simple_action' => 'by_percent',\n 'discount_amount' => '9,99',\n ],\n true\n ],\n [\n [\n 'simple_action' => 'by_percent',\n 'discount_amount' => '123.12',\n ],\n [\n 'Percentage discount should be between 0 and 100.',\n ]\n ],\n [\n [\n 'simple_action' => 'to_percent',\n 'discount_amount' => '-12',\n ],\n [\n 'Percentage discount should be between 0 and 100.',\n ]\n ],\n [\n [\n 'simple_action' => 'to_fixed',\n 'discount_amount' => '-1234567890',\n ],\n [\n 'Discount value should be 0 or greater.',\n ]\n ],\n [\n [\n 'simple_action' => 'invalid action',\n 'discount_amount' => '12',\n ],\n [\n 'Unknown action.',\n ]\n ],\n ];\n }", "title": "" }, { "docid": "eceda1f0634d5d32ca637e9b135f803d", "score": "0.52604103", "text": "public function providerNotValidFiles()\n {\n return [['invalid.csv']]; //File does not exist\n }", "title": "" }, { "docid": "a11736a2ccd38c3fafed802bfa1571d0", "score": "0.52603793", "text": "public function dataProviderWithValidPassword()\n {\n return \n [\n 'positive test data one' => [\"@#$%1Hjo\"],\n 'positive test data two' => [\"j%42@#Hy\"],\n 'positive test data three' => [\"Hy6)(#%@\"],\n 'positive test data four' => [\"gTy@6i$3\"],\n 'positive test data five' => [\"Ut9j8@#%\"]\n ];\n }", "title": "" }, { "docid": "3ad4b97464ece8d18f806cbde6ad1da9", "score": "0.5260368", "text": "public function testConstructorWithInvalidData()\n {\n new Field(array('Henk' => 'type'));\n }", "title": "" }, { "docid": "9920cd4af1f0c21752f97eed653abbb2", "score": "0.52558094", "text": "protected function beforeOnInputFailed()\n {\n\n }", "title": "" }, { "docid": "532a5db61e0d2a567bc35480992be20c", "score": "0.5238372", "text": "public function getFieldValDataProvider() {}", "title": "" }, { "docid": "4885e6a36a8faea63b587da4fd95bd9c", "score": "0.52334654", "text": "private function get_Data_Source(){\n try {\n return new PDO($this->dsn,$this->username,$this->password);\n }\n catch(Exception $ex){\n echo $ex->getMessage();\n return null;\n }\n \n}", "title": "" }, { "docid": "948dd76e363c2f9fa6c49db0949d022d", "score": "0.522804", "text": "protected function validateTemplateData()\n {\n collect($this->toArray())->map(function($value, $key) {\n if(! $value) {\n throw new \\Exception(sprintf(\n 'The `%s` property can not be empty in %s',\n $key,\n static::class\n ));\n }\n });\n }", "title": "" } ]
b049d9541b0937996f78ee5a42825fdc
/ Displaying the footer file:
[ { "docid": "3d2ec207fc7976f510900adf2a002b03", "score": "0.81630516", "text": "protected function _displayFooter() {\r\n\t\tinclude('theme/_footer.php');\r\n\t}", "title": "" } ]
[ { "docid": "7dfb48052860a48f24e3f9b8146f9ede", "score": "0.81669945", "text": "public static function displayFooter()\r\n {\r\n require_once 'includes/footer.php';\r\n ?>\r\n </body>\r\n </html>\r\n <?php\r\n }", "title": "" }, { "docid": "7d4133b66a45dd4cad2083637197d9d1", "score": "0.809259", "text": "function display_footer()\r\n {\r\n echo $this->settings[ 'footer' ];\r\n }", "title": "" }, { "docid": "253f660e7f1a51c5a18fd80be9771792", "score": "0.8076894", "text": "public function writeFooter()\n {\n }", "title": "" }, { "docid": "c6f765e9f3f5d42b83dffe45e6fa6fb6", "score": "0.8060885", "text": "protected function do_footer() {}", "title": "" }, { "docid": "2bd9651506c9f5851b9591e6f567bf7b", "score": "0.8046294", "text": "public function footer() {\n\n print('<h2>Footer</h2>');\n }", "title": "" }, { "docid": "4995f8cbef7280c6699e6bb053298213", "score": "0.7962221", "text": "public static function displayFooter() {\n echo \"<div id=\\\"footer\\\">\n <p>minding your business, inc. &emsp; 7 tee drive &emsp; portland, me 04103</p>\n <span><p>&copy; 2013 <a href=\\\"http://karaebrahim.com\\\" target=\\\"_blank\\\">Kara Ebrahim</a></p></span>\n </div>\";\n }", "title": "" }, { "docid": "1f4b23fc027a272e73855b6b0d41932d", "score": "0.7938556", "text": "public function show_footer()\n\t{\n\t\tif(!$this->headerShown)\n\t\t{\n\t\t\t// no header, no footer. :)\n\t\t\treturn;\n\t\t}\n\n\t\tprint '</div>';\n\t\tprint '\t<footer>';\n\t\tprint '\t\t&copy;' . date('Y') . ' <a href=\"https://cback.net\" target=\"_blank\"><b>CBACK Software</b></a> &mdash; AppLoader is licensed under the MIT License.';\n\t\tprint '\t</footer>';\n\t\tprint '<script> function cal_btn_click(elm){ elm.innerHTML=\\'please wait ...\\'; elm.style.opacity=0.5; } </script>';\n\t\tprint '</body>';\n\t\tprint '</html>';\n\t}", "title": "" }, { "docid": "d7cbfe7064271de249581567cd777c0b", "score": "0.79293275", "text": "public function footer()\n\t{\n\t\tinclude('views/page_footer.php');\n\n\t}", "title": "" }, { "docid": "a6edfe6f1abccdaf1bdd1412c9de2282", "score": "0.7922061", "text": "function display_footer(string $filename) {\n // attempt to get the last modified time of $filename\n try {\n $last_modified = date(\"d M Y H:i:s\", filemtime($filename));\n }\n catch (Exception $e) {\n echo 'Caught exception: ', $e->getMessage(), \"\\n\";\n }\n // display last modified time in footer\n echo '<hr />';\n echo '<p><a href=\"https://twitter.com/OrangeNinjaPro2\"><img style=\"border:1px;width:40px;height:40px\" src=\"../images/twitter.png\" alt=\"Follow us on Twitter\" /></a>';\n echo '<a href=\"https://facebook.com\"><img style=\"border:1px;width:40px;height:40px\" src=\"../images/fb.png\" alt=\"Follow us on Facebook\" /></a></p>';\n echo \"<p>$filename was last Modified on $last_modified</p>\";\n // display validation icons/links\n print \" <p>\n <a href=\\\"http://validator.w3.org/check?uri=referer\\\"><img\n src=\\\"http://www.w3.org/Icons/valid-xhtml10\\\" alt=\\\"Valid XHTML 1.0 Strict\\\" height=\\\"31\\\" width=\\\"88\\\" /></a>\n <a href=\\\"http://jigsaw.w3.org/css-validator/check/referer\\\">\n <img style=\\\"border:0;width:88px;height:31px\\\"\n src=\\\"http://jigsaw.w3.org/css-validator/images/vcss-blue\\\"\n alt=\\\"Valid CSS!\\\" />\n </a>\n </p>\";\n }", "title": "" }, { "docid": "ed1a65b718e9647bb6252c59cadcf6c1", "score": "0.7890106", "text": "public function renderFooter()\n\t{\n\t\tinclude 'view/templates/footer.inc.php';\n\t}", "title": "" }, { "docid": "b2424b7c4728f2eee5eef8a79a560549", "score": "0.7853791", "text": "function showFooter(){\r\n\t\techo '<footer>';\r\n//echo \"<p>We are \" . (isLoggedIn() ? \"ingelogged\" : \"uitgelogged\") . \"</p>\";\r\n\r\n\t\techo '<p>&copy; 2019 Jeffrey van der Kruit</p>\r\n\t\t</footer>';\r\n\t}", "title": "" }, { "docid": "c43fc5abf9cc0e986be7b4ffa28f9f16", "score": "0.78336495", "text": "public function view_perfil_footer()\n {\n }", "title": "" }, { "docid": "955019fc594d88fc2030e8ca203b8afc", "score": "0.7824363", "text": "function view_footer() {\n print_footer($this->course);\n }", "title": "" }, { "docid": "1c6fc533f12e20c4073b4db0123a294b", "score": "0.78026664", "text": "function Footer() {\n $this->PreFooter();\n //Text color in gray\n $this->SetTextColor(128);\n $this->SetFont('Arial', '', 5);\n $this->Cell(0, 0, date(\"d/m/Y g:i:s A\", time() + (15 * 60)), 0, 1, 'L');\n $this->Cell(0, 0, \"Designed and Developed By National Informatics Centre, Paschim Medinipur\", 0, 1, 'C');\n //Arial italic 8\n $this->SetFont('Arial', 'I', 6);\n //Page number\n $this->Cell(0, 0, 'Page: ' . $this->PageNo() . ' of {nb}', 0, 1, 'R');\n }", "title": "" }, { "docid": "032f10b5ad68740071d2d53392ce6b35", "score": "0.77441454", "text": "public function showFooter() {\r\n echo '\r\n </div>\r\n </div>\r\n <div id=\"footer\">\r\n <!--&copy; Copyright 2012 - <a href=\"http://www.jsm.co.id\" target=\"_blank\">Jaring Synergi Mandiri</a>-->\r\n </div>\r\n</body>\r\n</html>\r\n ';\r\n }", "title": "" }, { "docid": "03e450e110a07f4ed82ea24c482e37e4", "score": "0.7737514", "text": "public function get_footer() {\n\t\t$output = '';\n\t\techo $output;\n\t}", "title": "" }, { "docid": "7f0ee46e405ba510e4f175ba952c39ee", "score": "0.7733634", "text": "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t//Arial kursiv 8\n\t\t$this->SetFont('Arial','I',8);\n\t\t//Seitenzahl\n\t\t$this->Cell(0,10,$this->filename,0,0,'L');\n\t\t$this->Cell(0,10,$this->PageNo(),0,0,'R');\n\t}", "title": "" }, { "docid": "7517510a1dc93e03b6a35bd69c1d539e", "score": "0.7723504", "text": "public static function footer () {\n\t\t$conf = self::conf ();\n\t\tif ($conf['App Settings']['footer']) {\n\t\t\treturn self::$controller->run ($conf['App Settings']['footer']);\n\t\t}\n\t\treturn '';\n\t}", "title": "" }, { "docid": "4e99f2cabfaa0634c317bccc1024db8d", "score": "0.7703044", "text": "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Select Arial italic B\n\t\t$this->setfont('Arial','I',14);\n\t\t$this->cell(250,8,\"Proyecto Final, copyright &copy; 2019\",0,0,'c');\n\t\t// Print centered page numbre\n\t\t$this->Cell(0,10,'Pag.'.$this->PageNo(),0,0,'c');\n\t}", "title": "" }, { "docid": "f83a19b44c582463f519f507d4bc9f97", "score": "0.76860374", "text": "function Page_Exported() {\n\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\n\t\t//echo $this->ExportDoc->Text;\n\n\t}", "title": "" }, { "docid": "f83a19b44c582463f519f507d4bc9f97", "score": "0.76860374", "text": "function Page_Exported() {\n\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\n\t\t//echo $this->ExportDoc->Text;\n\n\t}", "title": "" }, { "docid": "f83a19b44c582463f519f507d4bc9f97", "score": "0.76860374", "text": "function Page_Exported() {\n\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\n\t\t//echo $this->ExportDoc->Text;\n\n\t}", "title": "" }, { "docid": "be04347b7d7d83fea43c404556d0f07b", "score": "0.76836836", "text": "function Page_Exported() {\r\n\r\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\r\n\t\t//echo $this->ExportDoc->Text;\r\n\r\n\t}", "title": "" }, { "docid": "be04347b7d7d83fea43c404556d0f07b", "score": "0.76836836", "text": "function Page_Exported() {\r\n\r\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\r\n\t\t//echo $this->ExportDoc->Text;\r\n\r\n\t}", "title": "" }, { "docid": "506edb8f569a21f7ab1d833d6ed8cf6f", "score": "0.7676481", "text": "function createPageFooter(){\n\t\t\techo $this->displayPageFooter = \"</body></html>\";\n\t\t}", "title": "" }, { "docid": "3768d3db9c55bf322c61a6acf5b1b497", "score": "0.76533735", "text": "public function Footer() {\n $this->SetY(-15);\n // Set font\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages().' '.'*** '.date (\"d-m-Y\").' ***', 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "title": "" }, { "docid": "35b7a7678b43c8d7255d3fdfe42929f9", "score": "0.76441026", "text": "function makeFooter() { ?>\n\t<div>\n\t\t<p>\n\t\t\tThis page is for single nerds to meet and date each other! Type in your personal information and wait for the nerdly luv to begin! Thank you for using our site.\n\t\t</p>\n\t\t\n\t\t<p>\n\t\t\tResults and page (C) Copyright NerdLuv Inc.\n\t\t</p>\n\t\t\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href=\"index.php\">\n\t\t\t\t\t<img src=\"https://webster.cs.washington.edu/images/nerdluv/back.gif\" alt=\"icon\" />\n\t\t\t\t\tBack to front page\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n<?php }", "title": "" }, { "docid": "297a0f77fec69b1002275b2b957a6966", "score": "0.7642128", "text": "public function footer () {\n echo '<footer class=\"footer fixed-bottom bg-dark\">\n <div class=\"container text-white \">Footer content.</div><!-- div .container-fluid text-white -->\n </footer>';\n }", "title": "" }, { "docid": "5380ee2f7b05e8bda2ff00dcd5f86013", "score": "0.7630935", "text": "public static function printFooter()\n { \n echo ' \n </div>';\n Navi::printFooNavi();\n \n echo '\n </div> \n </body>\n</html>';\n }", "title": "" }, { "docid": "fcb53655ab5710c1d408678b88f7bf8d", "score": "0.7629017", "text": "public function Footer()\r\n {\r\n $this->SetY(-15);\r\n // Arial italic 8\r\n $this->SetFont('Arial', 'I', 8);\r\n // Page number\r\n $this->Cell(0, 10, $this->languageCode == 0 ? 'Side: ' : 'Page: ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\r\n }", "title": "" }, { "docid": "852c9d70941f0c56ed33b9f8bb61b84d", "score": "0.7624384", "text": "public function Footer()\n\t{\n\t\t$this -> SetLineStyle(array(\n\t\t\t'width' => 0.2,\n\t\t\t'color' => array(\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t0\n\t\t\t)\n\t\t));\n\t\t$this -> Line(15, $this -> getPageHeight() - 0.5 * 15 - 2, $this -> getPageWidth() - 15, $this -> getPageHeight() - 0.5 * 15 - 2);\n\t\t$this -> SetFont('times', '', 8);\n\t\t$this -> SetY(-0.5 * 15, true);\n\t\t$this -> Cell(15, 0, 'Created by GaiaEHR (Electronic Health Record) ');\n\t\t$this -> Cell(333, 0, 'Page ' . $this -> getAliasNumPage() . '/' . $this -> getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n\t}", "title": "" }, { "docid": "3d2b9bdd1b78b4877d90d9239a074ec2", "score": "0.7621127", "text": "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print current and total page numbers\n $this->Cell(0, 10, utf8_decode('Página ' . $this->PageNo()), 0, 0, 'C');\n }", "title": "" }, { "docid": "8c7c1b7fc0f66e37890ba20cbe7ebfb6", "score": "0.76204485", "text": "function print_footer() {\n\n\t\t// Print header lagged CSS\n\t\t$this->_print( $this->head_css, 'style', __( 'BetterFramework Header Lagged Inline CSS', 'publisher' ) );\n\n\t\t// Print footer CSS\n\t\t$this->_print( $this->footer_css, 'style', __( 'BetterFramework Footer Inline CSS', 'publisher' ) );\n\n\t\t// Print header lagged JS\n\t\t$this->_print( $this->head_js, 'script', __( 'BetterFramework Header Lagged Inline JS', 'publisher' ) );\n\n\t\t// Print header lagged jQuery JS\n\t\t$this->_print( $this->head_jquery_js, 'script', __( 'BetterFramework Header Lagged Inline jQuery JS', 'publisher' ), 'jQuery(function($){', '});' );\n\n\t\t// Print footer JS\n\t\t$this->_print( $this->footer_js, 'script', __( 'BetterFramework Footer Inline JS', 'publisher' ) );\n\n\t\t// Print footer jQuery JS\n\t\t$this->_print( $this->footer_jquery_js, 'script', __( 'BetterFramework Footer Inline jQuery JS', 'publisher' ), 'jQuery(function($){', '});' );\n\n\t}", "title": "" }, { "docid": "ca695137611a456e22e9c3af43ec8832", "score": "0.76203334", "text": "public function printFooter() {\n echo \"</body></html>\\n\";\n }", "title": "" }, { "docid": "8e29949192e4147ef67393ef34bae321", "score": "0.76134163", "text": "public function Footer()\n\t{\n\t\t$this->SetXY(170,278);\n\t\t//Imprime a imagem do rodapé\n\t\t$this->Image($_SERVER['DOCUMENT_ROOT'].\"/Imagens/rodape_atual.jpg\",15,278,180,18,'JPG'); \n\t\t//Imprime o número da página centralizado\n\t\t$this->setXY(200,290);\n\t\t$this->SetFont('arial','',7);\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(0,10,'Pag. '.$this->PageNo().' de {nb}',0,0,'C');\n\t}", "title": "" }, { "docid": "2bf53560224400f72d42487b8923667f", "score": "0.76025945", "text": "function Footer()\n\t\t{\n\t\t\t// Go to 1.5 cm from bottom\n\t\t\t$this->SetY(-15);\n\t\t\t// Select Arial italic 8\n\t\t\t$this->SetFont('Arial','',5);\n\t\t\t// Print centered page number\n\t\t\t$this->Cell(0,10,'DGR ',0,0,'L');\n\t\t\t$this->Cell(0,10,utf8_decode('REPORTE TRIMESTRAL DE LOS PLIEGOS DE OBSERVACIONES NOTIFICADOS DE LA CUENTA PÚBLICA 2012 - Página ').$this->PageNo(),0,0,'R');\n\t\t}", "title": "" }, { "docid": "4345390f5d9a1752d6aa8c655d6ec70d", "score": "0.7600899", "text": "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t//buat garis horizontal\n\t\t$this->Line(10,$this->GetY(),210,$this->GetY());\n\t\t//Arial italic 9\n\t\t$this->SetFont('Arial','I',9);\n $this->Cell(0,10,'copyright Strada ' . date('Y'),0,0,'L');\n\t\t//nomor halaman\n\t\t$this->Cell(0,10,'Halaman '.$this->PageNo().' dari {nb}',0,0,'R');\n\t}", "title": "" }, { "docid": "f00e7c1c523808caee4f5e23c7e9ea66", "score": "0.75976336", "text": "public function Footer() {\r\n\t}", "title": "" }, { "docid": "0c244801d57390bdc75e5d46ebd7f704", "score": "0.75789165", "text": "function Footer()\n {\n $this->SetY(-12);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(335,10,'copyright @ 2RA Technology Limited',0,0,'C');\n }", "title": "" }, { "docid": "2db3be3d2bcefc2c84bb904535490a2b", "score": "0.7578195", "text": "function outputFooter(){\r\n echo'<footer>';\r\n echo'<p>Liam &copy; 2018 Highway Car </p>';\r\n echo \"Today is \" . date(\"l\");\r\n echo'</footer>';\r\n echo'</body>';\r\n echo'</html>';\r\n}", "title": "" }, { "docid": "ea05f5b8ba364ba4bbbb58a12bc9880b", "score": "0.756406", "text": "function load_footer() {\n echo '<footer>\n <div class=\"pull-right\">\n CMS New Template V1 by <a href=\"#\">Leo Masta Kusuma</a>\n </div>\n <div class=\"clearfix\"></div>\n </footer>\n <!-- /footer content -->\n </div>\n </div>\n ';\n }", "title": "" }, { "docid": "d8bf241fb910f57eb9e1401cc9ce0041", "score": "0.7564038", "text": "function print_footer(){\r\n\r\n // Print header lagged CSS\r\n $this->_print( $this->head_css, 'style', 'BetterFramework Header Lagged Inline CSS' );\r\n\r\n // Print footer CSS\r\n $this->_print( $this->footer_css, 'style', 'BetterFramework Footer Inline CSS' );\r\n\r\n // Print header lagged JS\r\n $this->_print( $this->head_js, 'script', 'BetterFramework Header Lagged Inline JS' );\r\n\r\n // Print header lagged jQuery JS\r\n $this->_print( $this->head_jquery_js, 'script', 'BetterFramework Header Lagged Inline jQuery JS', 'jQuery(function($){', '});' );\r\n\r\n // Print footer JS\r\n $this->_print( $this->footer_js, 'script', 'BetterFramework Footer Inline JS' );\r\n\r\n // Print footer jQuery JS\r\n $this->_print( $this->footer_jquery_js, 'script', 'BetterFramework Footer Inline jQuery JS', 'jQuery(function($){', '});' );\r\n\r\n }", "title": "" }, { "docid": "54d78553740077e530e8dc9133da7469", "score": "0.75604326", "text": "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print centered page number\n $this->Cell(0, 10, utf8_decode(\"Pág: \") . $this->PageNo(), 0, 0, 'C');\n }", "title": "" }, { "docid": "55c1d0f2536bc332d89626d1230acea4", "score": "0.7557626", "text": "function footer() {\n $this->SetY(-35);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n $this->Cell(90, 10, \"Prepared By:\", 0, 0, 'L');\n $this->Cell(90, 10, \"Approved By:\", 0, 1, 'L');\n $this->Cell(90, 10, \"Checked By:\", 0, 0, 'L');\n $this->Cell(90, 10, \"Date: \".date('d/m/Y'), 0, 1, 'L');\n $this->Cell(270,10,'Page '.$this->PageNo(),0,0,'R');\n\n }", "title": "" }, { "docid": "0b19279e0cc6ebc207d2abd082c0bd17", "score": "0.7546354", "text": "function Footer()\n\t\t{\n\t\t\t$this->SetY(-15);\n\t\t\t// Select Arial italic 8\n\t\t\t$this->SetFont('Arial','I',8);\n\t\t\t// Print centered page number\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().' /{nb}',0,0,'C');\n\t\t}", "title": "" }, { "docid": "13cbd919fe360eb34aec2172ae3d51db", "score": "0.7543673", "text": "function Footer() {\n\t\t\t$this->SetY( -15 );\n\t\t\t\n\t\t\t//set font to Arial, Bold, size 10\n\t\t\t$this->SetFont( 'Arial', 'B', 10 );\n\t\t\t\n\t\t\t//set font color to blue\n\t\t\t$this->SetTextColor( 52, 98, 185 );\n\t\t\t\n\t\t\t$this->Cell( 0, 10, 'www.cybera.in', 0, 0, 'L' );\n\t\t\t\n\t\t\t//set font color to gray\n\t\t\t$this->SetTextColor( 150, 150, 150 );\n\t\t\t\n\t\t\t//write Page No\n\t\t\t$this->Cell( 0, 10, 'Page No: ' . $this->PageNo(), 0, 0, 'R' );\n\t\t}", "title": "" }, { "docid": "0014f7d098c656d89d6adf3bcae58fab", "score": "0.7541672", "text": "function file_footer() {\n\t\treturn \"\\n</Items>\\n\";\n\t}", "title": "" }, { "docid": "aff234e985e3ef68e25b063e994f8108", "score": "0.7540981", "text": "function Footer()\n\t{\n\t $this->SetY(-15);\n\t // Select Arial italic 8\n\t $this->SetFont('Arial','I',8);\n\n\t // Print centered page number\n\t $this->Cell(0,10,'Market Management Report/user name/date',0,0,'R');//user here<------------------------------------------------\n\t}", "title": "" }, { "docid": "54b34561ecd0d57fa4364bb835185b6e", "score": "0.75397784", "text": "static function footer() {\n echo '</body>\n </html>';\n }", "title": "" }, { "docid": "a8664b4e5714ef033b7a66edacb813cd", "score": "0.7535483", "text": "function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }", "title": "" }, { "docid": "191dd8fc7d3ff91eb617b2cd35f31393", "score": "0.7534045", "text": "protected function renderFooter()\n\t{\n\t\t// Close out body & html tags\n\t\techo '<div id=\"warningtag\">Remove when not in use</div>';\n\t\techo '<div id=\"nametag\">sbulen/sjrbTools</div>';\n\t\techo '</body>\n\t\t</html>';\n\t}", "title": "" }, { "docid": "bb8c0e8a6326508b66829de87d63a6a0", "score": "0.752087", "text": "function showFooter()\n {\n }", "title": "" }, { "docid": "05c0ee2b4a1b45eb69b88d17d2c53a11", "score": "0.7516738", "text": "function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Page number\n $this->Cell(0, 10, '~Page ' . $this->PageNo() . '~', 0, 0, 'C');\n }", "title": "" }, { "docid": "4b9bb21bcf52db2b3d2cb2d69e8dd7a3", "score": "0.75129384", "text": "public function Footer(){\n\t $this->SetY(-20);\n\t // Arial italic 9\n\t $this->SetFont('Arial','I',9);\n\t $this->Cell(20);\n\t $this->Cell(20,20,'for any correction please contact [email protected]',0,0);\n\t // Page number\n\t $this->Cell(150);\n\t $this->Cell(0,20,'Page '.$this->PageNo(),0,0);\n\t $this->SetY(-25);\n\t $this->Cell(95);\n\t $this->Cell(20,20,'FOR INTERNAL USE',0,0); \n\t}", "title": "" }, { "docid": "166b3e4dc069ea39aa35c52b8909807e", "score": "0.7499882", "text": "private function displayFooter() {\r\n\t\t$html = '<footer>' . \"\\n\";\r\n\t\t$html .= '<ul>' . \"\\n\";\r\n\t\t$html .= '<li><a href=\"index.php?page=help\">help</a></li>' . \"\\n\";\r\n\t\t$html .= '<li><a href=\"index.php?page=contact\">contact</a></li>' . \"\\n\";\r\n\t\t$html .= '<li><a href=\"http://www.facebook.com\"><i class=\"fa fa-facebook\"></i></a></li>' . \"\\n\";\r\n\t\t$html .= '<li><a href=\"http://www.twitter.com\"><i class=\"fa fa-twitter\"></i></a></li>' . \"\\n\";\r\n\t\t$html .= '<li><a href=\"http://www.instagram.com\"><i class=\"fa fa-instagram\"></i></a></li>' . \"\\n\";\r\n\t\t$html .= '</ul>' . \"\\n\";\r\n\t\t$html .= '</footer>' . \"\\n\";\r\n\t\t$html .= '<script src=\"http://code.jquery.com/jquery-1.11.0.min.js\"></script>' . \"\\n\";\r\n\t\t$html .= '<script src=\"js/burger.js\"></script>' . \"\\n\";\r\n\t\t$html .= '</body>' . \"\\n\";\r\n\t\t$html .= '</html>' . \"\\n\";\r\n\t\treturn $html;\r\n\t}", "title": "" }, { "docid": "20bac754582189a4211111948b251821", "score": "0.74950415", "text": "public function projectFooter() {\n // return project footer\n echo '</div>\n </body> \n <script src=\"/trivia/js/emailClass.js?' . time(). '\"></script>\n <script src=\"/trivia/js/inputClass.js?' . time(). '\"></script>\n </html>' . PHP_EOL;\n // endregion\n }", "title": "" }, { "docid": "e945a2493d01edc4d3cbac9d94c270f9", "score": "0.74830955", "text": "protected function _setFooter()\n {\n $this->_contents[] = $this->_stringTemplate->format('footer', ['footer'=>$this->footer]);\n }", "title": "" }, { "docid": "53cedc86793879ccf86168b55134797e", "score": "0.74830556", "text": "function Footer()\n\t\t\t{\n\t\t\t$this->SetY(-25);\n\t\t\t//Arial italic 8\n\t\t\t$this->SetFont('Arial','I',8);\n\t\t\t//N�mero de p�gina\n\t\t\t//$this->Cell(170,3,'T�lefonos: 02128754561/78/78 Email [email protected]',0,0,'C');\n\t\t\t$this->Ln(10);\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(65,3,'Pagina '.$this->PageNo().'/{nb}',0,0,'L');\n\t\t\t//$this->Cell(62,3,'Impreso por: '.str_replace('<br />',' ',$_SESSION[usuario]),0,0,'C');\n\t\t\t$this->Cell(120,3,date(\"d/m/Y H:i:s\"),0,0,'R');\t\t\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFillColor(0);\n\t\t\t//$this->Code128(88,285,strtoupper($_SESSION['usuario']),40,6);\n\t\t\t}", "title": "" }, { "docid": "f860f3dd9119a1a26f49989d0f697207", "score": "0.7474287", "text": "public function pageFooter(){\n\t\ttry{\n\t\t\t\tglobal $config;\n\t\t\t\tinclude SRV_ROOT.'views/home/footer.tpl.php';\n\t\t}\n\t\tcatch ( Exception $e ) {\n\t\t\techo 'Message: ' .$e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "9bc21d7fcae1c4551d07cabeb3ea2e90", "score": "0.7472264", "text": "public function footer() {\n global $CFG, $DB, $USER;\n\n $output = $this->container_end_all(true);\n\n $footer = $this->opencontainers->pop('header/footer');\n\n if (debugging() and $DB and $DB->is_transaction_started()) {\n // TODO: MDL-20625 print warning - transaction will be rolled back\n }\n\n // Provide some performance info if required\n $performanceinfo = '';\n if (defined('MDL_PERF') || (!empty($CFG->perfdebug) and $CFG->perfdebug > 7)) {\n $perf = get_performance_info();\n if (defined('MDL_PERFTOLOG') && !function_exists('register_shutdown_function')) {\n error_log(\"PERF: \" . $perf['txt']);\n }\n if (defined('MDL_PERFTOFOOT') || debugging() || $CFG->perfdebug > 7) {\n $performanceinfo = nephila_performance_output($perf);\n }\n }\n\n $footer = str_replace($this->unique_performance_info_token, $performanceinfo, $footer);\n\n $footer = str_replace($this->unique_end_html_token, $this->page->requires->get_end_code(), $footer);\n\n $this->page->set_state(moodle_page::STATE_DONE);\n\n if(!empty($this->page->theme->settings->persistentedit) && property_exists($USER, 'editing') && $USER->editing && !$this->really_editing) {\n $USER->editing = false;\n }\n\n return $output . $footer;\n }", "title": "" }, { "docid": "2824102eb389e9cd4d62ebe43f50469f", "score": "0.7470316", "text": "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Arial Italic 8\n\t\t$this->SetFont('Arial','I',8);\n\t\t// Color del texto en gris\n\t\t$this->SetTextColor(128);\n\t\t// Numero de pagina\n\t\t$this->Cell(0,10,'Pagina '.$this->PageNo(),0,0,'C');\n\t}", "title": "" }, { "docid": "8a175b6de5a92b42472cf005523bb469", "score": "0.7460203", "text": "public function loadFooter()\n {\n }", "title": "" }, { "docid": "7a724b06d1507b4b1080fa61a10a305b", "score": "0.7459904", "text": "public function footer(){\r\n $this->foot = true;\r\n }", "title": "" }, { "docid": "b1b74bf808948e631ab518b9b3f28cc5", "score": "0.7452563", "text": "private static function include_footer() {\n require_once(HTML . 'footer.php');\n }", "title": "" }, { "docid": "7b416f3e9078654cff230acc831365eb", "score": "0.74463", "text": "public function Footer() {\r\n $this->SetY(-15);\r\n $this->SetFont('helvetica', 'I', 8);\r\n $footer_text = 'Page '.$this->getAliasNumPage().' of '.$this->getAliasNbPages();\r\n $this->writeHTMLCell(0, 0, '', '', $footer_text, 0, 0, false, \"L\", true);\r\n }", "title": "" }, { "docid": "4f4a8063333986313fca60725a44c49c", "score": "0.7444883", "text": "function Footer()\n {\n $this->SetY(-15);\n $this->SetFont('Arial','I',8);\n $this->Cell(0,10,'Halaman '.$this->PageNo().'/{nb}',0,0,'C');\n }", "title": "" }, { "docid": "422751f9bab9e0e2e0566cebc610ac8c", "score": "0.74390364", "text": "function displayFooter()\r\n{\r\n\techo \"<div id='footer'> <span id='cctext'>&copy; Krzysztof Stepien 2019</span></div>\";\r\n}", "title": "" }, { "docid": "37ca72d5e1db60ab84b0e0088b20f613", "score": "0.743701", "text": "public function Footer() {\n $this->SetY(-15);\n // Set font\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "title": "" }, { "docid": "c4ccdd2c4855c6f6267f7fefeccf5f6a", "score": "0.7436619", "text": "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// //buat garis horizontal\n\t\t// $this->Line(10,$this->GetY(),215,$this->GetY());\n\t\t\n\t\t//Arial italic 9\n\t\t// $this->SetFont('Arial','I',9);\n // $this->Cell(0,10,'GA And Insurance ' . date('Y'),0,0,'P');\n\t\t// //nomor halaman\n\t\t// $this->Cell(0,10,'Halaman '.$this->PageNo().' dari {nb}',0,0,'R');\n\t}", "title": "" }, { "docid": "6508544926206f4d6fcf61b5ca89c676", "score": "0.74339396", "text": "function themefooter() {\n\tif (defined('INDEX_FILE') && INDEX_FILE===true) {\n\t\t$ThemeSel = get_theme();\n\t\techo '</td><td><img src=\"themes/Kaput/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\" /></td><td valign=\"top\" width=\"180\">'.\"\\n\";\n\t\tblocks('r');\n\t}\n\techo '</td></tr></table>'.\"\\n\";\n\techo '<br />';\n\tOpenTable();\n\techo '<center>';\n\tfootmsg();\n\techo '</center>';\n\tCloseTable();\n}", "title": "" }, { "docid": "8f55720c6ab394100773b27b4f9cb324", "score": "0.7430415", "text": "function Footer(){\r\n\t\t$this->SetY(-15);\r\n\t\t//Select Arial italic 8\r\n\t\t$this->SetFont('Arial','I',8);\r\n\t\t//Print centered page number\r\n\t\t$this->Cell(0,10,'Pagexxx '.$this->PageNo(),0,0,'C');\r\n }", "title": "" }, { "docid": "cf85f63d10f84c92b684c4863cf67573", "score": "0.74260956", "text": "function Footer()\n {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "title": "" }, { "docid": "da716268111a2236c3334cc9e4014d2c", "score": "0.7425679", "text": "function adminFooter()\n { \t\n if ($this->getView()==\"active\")\n {\n $link = \"dispatch.php?view=archive\";\n return \"Only active records are displayed. Click \" . href($link, \"here\") . \" to view the archive\";\n }\n else\n {\n $link = \"dispatch.php?view=active\";\n return \"You ar viewing the archive. Click \" . href($link, \"here\") . \" to go back to normal view\";\n }\n }", "title": "" }, { "docid": "3fba55ac342fa14b98e387ad0ed7cd12", "score": "0.74185956", "text": "function Footer() {\r\n $this->SetY(-15);\r\n //courier italic 8\r\n $this->SetFont('courier', 'I', 8);\r\n //Page number\r\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\r\n $this->SetX(5);\r\n $this->SetFont('courier', 'I', 6);\r\n\r\n $this->Cell(0, 10, 'Tanggal Cetak : ' . date(\"d/m/Y\"), 0, 0, 'L');\r\n $this->SetY($this->GetY() + 3);\r\n $this->Cell(0, 10, 'Cetak Oleh : ' . $this->printby, 0, 0, 'L');\r\n }", "title": "" }, { "docid": "a7245e41ce44e8e18f84e7d3301b3a60", "score": "0.74173075", "text": "function print_footer(){\n\t\techo '</div></div><div id=\"skudo-footer\"><div id=\"follow-upper\"> \n\t\t\t <p>Follow us</p><ul>\n\t\t\t <li><a href=\"http://facebook.com/UpperInc\" title=\"Upper on Facebook\"><img src=\"'.esc_url($this->skudo_images_url).'facebook.png\" /></a></li>\n\t\t\t <li><a href=\"http://twitter.com/UpperInc\" title=\"Upper on Twitter\"><img src=\"'.esc_url($this->skudo_images_url).'twitter.png\" /></a></li>\n\t\t\t \n\t\t\t \n\t\t\t </ul></div><input type=\"hidden\" name=\"action\" value=\"save\" />\n\t\t\t <input type=\"submit\" value=\"Save Changes\" class=\"save-button\" />\n\t\t\t </div>\t\n\t\t\t</form></div>';\n\t}", "title": "" }, { "docid": "fecaee589089b131baf843c8ea5f64ba", "score": "0.74153763", "text": "public function footer(){\n return view(\"includes/footer\");\n }", "title": "" }, { "docid": "3ac4d4b79533633e7f65942aeecd31f1", "score": "0.74152386", "text": "function Footer()\n {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "title": "" }, { "docid": "f3497a222a40ee43e2acc0528be1ee13", "score": "0.74149054", "text": "function my_admin_footer() {\n \n \techo 'Designed and Developed by <a href=\"http://www.ennovatenigeria.com\" target=\"_blank\">ennovateNIGERIA</a>';\n \n }", "title": "" }, { "docid": "c87e0fb1d450ef8a71cad99ec970fee4", "score": "0.741054", "text": "function footer()\n {\n $this->SetY(-15);\n $this->SetFont('Arial','',9);\n $this->Cell(0,10,'P '.$this->PageNo().'/{nb}',0,0,'C');\n }", "title": "" }, { "docid": "f3f393254477a2ba0d979161e5bd82db", "score": "0.74066603", "text": "function bottom() {\n $this->footer();\n echo \"</body>\\n</html>\";\n }", "title": "" }, { "docid": "a2e03bf7fe072a068dadf54b10949c13", "score": "0.74064815", "text": "protected function generatePageFooter()\n {\n // to do: output common end of HTML code\n echo <<<HTML\n </body>\n</html>\nHTML;\n }", "title": "" }, { "docid": "1f2a2d9dd7d7649a7f77df5e9e41e45a", "score": "0.74015653", "text": "public function Footer()\n {\n $this->SetY(-10);\n\n $style2 = array('width' => 0.3, 'cap' => 'butt', 'join' => 'bevel', 'dash' => 0, 'color' => array(0, 0, 0));\n $this->Line(15, $this->GetY(), 195, $this->GetY(), $style2);\n\n // Set font\n $this->SetFont('times', 'I', 9);\n\n $this->Cell(90, 0, $this->footer_title, 0, false, 'L', 0, '', 0, false, 'T', 'T');\n $this->Cell(90, 0, $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, 1, 'R', 0, '', 0, false, 'T', 'T');\n }", "title": "" }, { "docid": "c3af24de0a77e48585ab6df2d32e4c0c", "score": "0.7400468", "text": "public function Footer() {\r\n $this->SetTextColor(0,0,0);\r\n /* insertamos numero de pagina y total de paginas*/\r\n $this->Cell(520, 10, 'Pág. '.$this->getAliasNumPage().\r\n '/'.\r\n $this-> getAliasNbPages(),\r\n 0, false, 'C', 0, '', 1, false, 'R', 'R');\r\n \r\n\r\n }", "title": "" }, { "docid": "252165fd52abeb2cd896b5ed57a68cbe", "score": "0.7399504", "text": "public function footer(): void\n {\n }", "title": "" }, { "docid": "3fc9f98e2151a07a49f92e219f87c343", "score": "0.7394217", "text": "function vw__page__createFooter() {\n\n\t\t//include global variables\n\t\t//\tsee: http://stackoverflow.com/a/6100395\n\t\tglobal $vw__page__createPostBackAlert;\n\t\tglobal $vw__page__setupLoginButton;\n\t\tglobal $vw__page__setupExpandViewButton;\n\n\t\t//ES 2017-01-25 (b_patch01): add global var for toggling\n\t\t//\tterms and conditions page\n\t\tglobal $vw__page__toggleTermsAndConditions;\n\n\t\t//ES 2017-01-25 (b_patch01): add global var for setting up\n\t\t//\tclick handler for logging user out\n\t\tglobal $vw__page__jsFuncLogOut;\n\n\t\t//end toolbar\n\t\tnc__toolbar__end();\n\n\t\t//ES 2017-01-25 (b_patch01): get current year for copyright label\n\t\t$tmpCurYear = date(\"Y\");\n\n\t\t//compose and output html string\n\t\t//\tsee: http://stackoverflow.com/a/23147015\necho <<<\"__EOF_4\"\n\t\t\t<!-- start tail -->\n\t\t\t<footer class=\"pageFooter\" style=\"height: 5%;\">\n\n\t\t\t\t<!-- company information -->\n\t\t\t\t<p class=\"bs-glyphicons\">\n\n\t\t\t\t\t<!-- company name -->\n\t\t\t\t\t<span \n\t\t\t\t\t\tclass=\"glyphicon glyphicon-copyright-mark\" \n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t></span> Developed by Eduard Sedakov, 2016-{$tmpCurYear}\n\n\t\t\t\t\t<!-- button for contacting me back -->\n\t\t\t\t\t<!-- see: http://stackoverflow.com/a/6722667 -->\n\t\t\t\t\t<a href=\"mailto:[email protected]\" style=\"color: inherit;\">\n\t\t\t\t\t\t<span \n\t\t\t\t\t\t\tclass=\"glyphicon glyphicon-envelope\" \n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\tdata-toggle=\"tooltip\"\n\t\t\t\t\t\t\tdata-placement=\"top\"\n\t\t\t\t\t\t\ttitle=\"Contact me ([email protected])\"\n\t\t\t\t\t\t\tstyle=\"padding: 0 10px;\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</a>\n\n\t\t\t\t\t<!-- button for showing terms of usage and privacy information -->\n\t\t\t\t\t<span \n\t\t\t\t\t\tclass=\"glyphicon glyphicon-sunglasses\" \n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tdata-toggle=\"tooltip\"\n\t\t\t\t\t\tdata-placement=\"top\"\n\t\t\t\t\t\ttitle=\"Privacy & Terms\"\n\t\t\t\t\t></span>\n\n\t\t\t\t</p>\t<!-- end company information -->\n\n\t\t\t</footer>\t<!-- end tail -->\n\n\t\t</div>\t<!-- end page container -->\n\n\t\t<script>\n\n\t\t\t$(document).ready(function(){\n\n\t\t\t\t{$vw__page__createPostBackAlert()}\n\n\t\t\t\t// script for showing tooltip messages\n\t\t\t\t//\tsee: http://www.w3schools.com/bootstrap/bootstrap_tooltip.asp\n\t\t\t $('[data-toggle=\"tooltip\"]').tooltip();\n\n\t\t\t {$vw__page__setupLoginButton()}\n\n\t\t\t {$vw__page__setupExpandViewButton()}\n\n\t\t\t {$vw__page__toggleTermsAndConditions()}\n\n\t\t\t {$vw__page__jsFuncLogOut()}\n\n\t\t\t});\n\t\t</script>\n__EOF_4;\n\n\t\t//ES 2017-01-30: include google analytics to track page visits\n\t\trequire_once 'analyticstracking.php';\n\n\t\t//include JS script intended to format typed user code\n\t\t//require 'js__codeview.php';\n\n\t\t//include JS script for dialog\n\t\trequire_once 'js__login.php';\n\n\t\t//show debug information\n\t\t//\tTODO: remove at production\n\t\t//require 'test__showInfo.php';\n\n\t\t//compose and output html string\n\t\t//\tsee: http://stackoverflow.com/a/23147015\necho <<<\"__EOF_5\"\n\n\t</body>\t<!-- end body -->\n\n</html>\t<!-- end html -->\n__EOF_5;\n\n\t}", "title": "" }, { "docid": "b1fd0bd873f1c2af686584ea240b7a79", "score": "0.7391767", "text": "function Footer()\n\t{\n\t\t//$this->Image('../imagenes/pie.jpg',15,250,170);\n\t\t$this->AliasNbPages();\n\t\t$this->SetY(-20);\n\t\t\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->MultiCell(180,5,utf8_decode(''),'0','C');\n\t\t\n\t $this->SetFont('Arial','I',8);\n\t $this->Cell(0,7,'Pag. '.$this->PageNo().' / {nb}',0,1,'C');\n\t}", "title": "" }, { "docid": "33269b95e7ba824ff2487b08cc08e76c", "score": "0.7391369", "text": "function Footer(){\r\n $this->Cell(190,0,'','T',1,'',true);\r\n \r\n //Go to 1.5 cm from bottom\r\n $this->SetY(-15);\r\n \r\n $this->SetFont('Arial','',10);\r\n \r\n //width = 0 means the cell is extended up to the right margin\r\n $this->Cell(0,8,'Note: This is a system generated report. No signatures required.',0,1,'');\r\n $this->Cell(0,0,'Date generated: '.date( 'F d,Y h:i A').'. (Page '.$this->PageNo().\" / {pages})\",0,0,'');\r\n //$this->Cell(0,10,'Page '.$this->PageNo().\" / {pages}\",0,1,'C');\r\n }", "title": "" }, { "docid": "e4f4ea503776e66a7ba03f1c8ab29b0c", "score": "0.7388337", "text": "function footer(){\n\n?>\n\t<p id=\"footer\">\n\t\t&copy; 1876 -\n\t\t<?php echo date('Y'); ?> University of Colorado Denver, Student Commons Building, Suite 4000. <br>\n\t\t1201 Larimer Street, Denver, CO 80204 (303)315-1700\n\n\t</p>\n<?php\n}", "title": "" }, { "docid": "8250c2f06ee96deec9da01778e408b1b", "score": "0.7382944", "text": "public function Footer() {\n\t\t$cur_y = $this->y;\n\t\t$this->SetTextColorArray($this->footer_text_color);\n\t\t//set style for cell border\n\t\t$line_width = (0.85 / $this->k);\n\t\t$this->SetLineStyle(array('width' => $line_width, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $this->footer_line_color));\n\t\t//print document barcode\n\t\t$barcode = $this->getBarcode();\n\t\tif (!empty($barcode)) {\n\t\t\t$this->Ln($line_width);\n\t\t\t$barcode_width = round(($this->w - $this->original_lMargin - $this->original_rMargin) / 3);\n\t\t\t$style = array(\n\t\t\t\t'position' => $this->rtl?'R':'L',\n\t\t\t\t'align' => $this->rtl?'R':'L',\n\t\t\t\t'stretch' => false,\n\t\t\t\t'fitwidth' => true,\n\t\t\t\t'cellfitalign' => '',\n\t\t\t\t'border' => false,\n\t\t\t\t'padding' => 0,\n\t\t\t\t'fgcolor' => array(0,0,0),\n\t\t\t\t'bgcolor' => false,\n\t\t\t\t'text' => false\n\t\t\t);\n\t\t\t$this->write1DBarcode($barcode, 'C128', '', $cur_y + $line_width, '', (($this->footer_margin / 3) - $line_width), 0.3, $style, '');\n\t\t}\n\t\t$footer ='';\n\t\tif (!empty($this->HTMLfooter)) {\n\t\t//@page { margin: 180px 50px; }\n\t\t\t$footer .= '<div id=\"HTMLfooter\">'.$this->HTMLfooter.'</div>' ;\n\t\t} else {\n\t\t\t$siteUrl = JURI::getInstance()->toString();\n\t\t\t$siteUrl = str_replace(\"format=pdf\", \"\", $siteUrl);\n\t\t\t$app = JFactory::getApplication();\n\t\t\t$title = $app->getCfg('sitename').' - '.$this->title;\n\t\t\t$footer .= '<div id=\"HTMLfooter\"><p class=\"page\"><a href=\"'.$siteUrl.'\">'.$title.'</p></div>' ;\n\t\t\n\t\t}\n\t\t$w_page = isset($this->l['w_page']) ? $this->l['w_page'].' ' : '';\n\t\tif (empty($this->pagegroups)) {\n\t\t\t$pagenumtxt = $w_page.$this->getAliasNumPage().' / '.$this->getAliasNbPages();\n\t\t} else {\n\t\t\t$pagenumtxt = $w_page.$this->getPageNumGroupAlias().' / '.$this->getPageGroupAlias();\n\t\t}\n\t\t$this->SetY($cur_y-$this->jdoc->_margin_footer);\n\t\t$this->writeHTMLCell($w=0, $h=0, $x='', $y='', $footer, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);\n\t\t//Print page number\n\t\t$this->SetY($cur_y);\n\t\tif ($this->getRTL()) {\n\t\t\t$this->SetX($this->original_rMargin);\n\t\t\t$this->Cell(0, 0, $pagenumtxt, 'T', 0, 'L');\n\t\t} else {\n\t\t\t$this->SetX($this->original_lMargin);\n\t\t\t$this->Cell(0, 0, $this->getAliasRightShift().$pagenumtxt, 'T', 0, 'R');\n\t\t}\n\t}", "title": "" }, { "docid": "0d2380714f6e79d25dc0d0089712c5d9", "score": "0.73779947", "text": "function Footer(){\r\n $this->SetY(-15);\r\n \r\n $this->SetFont('Arial','',9);\r\n \r\n //width = 0 means the cell is extended up to the right margin\r\n $this->Cell(0,5,'Note: This is a system generated report. No signatures required.',0,1,'C');\r\n $this->Cell(0,5,'Date generated: '.date( 'F d,Y h:i A'),0,0,'C');\r\n //$this->Cell(0,10,'Page '.$this->PageNo().\" / {pages}\",0,1,'C');\r\n }", "title": "" }, { "docid": "c5cc540e54e133dacf5b66f7e2ca06de", "score": "0.7376889", "text": "protected function displayPage()\n {\n $this->page .= file_get_contents('template/footer.html');\n echo $this->page;\n }", "title": "" }, { "docid": "987d96a4d7a456bea19299793d73d32b", "score": "0.73742896", "text": "function Footer()\n{\n\t$this->SetY(-20);\n\t// Arial italic 8\n\t$this->SetFont('Arial','I',9);\n\t// Text color in gray\n\t$this->SetTextColor(128);\n\t// Page number\n#\t$this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n//\t$this->Cell(0,10,'1800 Century Park East, 2nd Floor - Los Angeles, California 90067 ','','','C');\n//\t$this->Ln(3);\n//\t$this->Cell(0,10,'877-515-4712 Main - 310.861.9051 Fax - www.InitiativeLegal.com ','','','C');\n//\t$this->Ln(4);\n//\t$this->Cell(0,10,'CLIENT INITIALS _______','','','R');\n//\t$this->Ln(9);\n}", "title": "" }, { "docid": "a963d6838d4b1bfd83750c8caf24b237", "score": "0.7373659", "text": "private function getFooter() {\n\t\treturn '?>' . \"\\n\";\n\t}", "title": "" }, { "docid": "f7c69a0797a8cd18540d0adc92ab2441", "score": "0.73731685", "text": "function Footer()\r\n\t{\r\n\t\t$this->SetY(-15);\r\n\t\t$this->SetFont('Arial','I',8);\r\n\t\t$this->SetTextColor(128);\r\n\t\t$this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\r\n\t}", "title": "" }, { "docid": "5ecdfa063bc4d51e5528a450eda7ad99", "score": "0.7367956", "text": "function Footer() {\r\n $this->SetY(-15);\r\n //Arial italic 8\r\n $this->SetFont('Arial','I',8);\r\n //Page number\r\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\r\n }", "title": "" }, { "docid": "e323f4fe605813283aac39f03453407b", "score": "0.7358102", "text": "function Footer()\n {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "title": "" }, { "docid": "5f099f7e0a222efd97bbeebc6731da91", "score": "0.7355767", "text": "function Footer() { \r\n\t\t\t$this->SetY(-15);\r\n\t\t\t$this->SetFont('Arial','I',8);\r\n\t\t\t$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\r\n\t\t}", "title": "" }, { "docid": "8152aee0f3372a8720ca0fa103d28548", "score": "0.73548424", "text": "function hs_render_footer() {\n global $config;\n\n if (strpos($config['cacti_version'], \"0.\") === 0) {\n include_once(\"./include/bottom_footer.php\");\n return;\n }\n\n bottom_footer();\n}", "title": "" }, { "docid": "db31d54f2200cd757f3ed2e8030fc690", "score": "0.73546225", "text": "function Footer()\n {\n $this->SetY(-15);\n $this->SetFont('Times','',8);\n\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "title": "" }, { "docid": "8feaea081d7cec9c7354308a534883ca", "score": "0.7348262", "text": "function Footer()\n{\n\t$this->SetY(-25);\n\t// Arial italic 8\n\t$this->SetFont('Arial','',9);\n\t// Text color in gray\n\t$this->SetTextColor(128);\n\t// Page number\n#\t$this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n\t$this->Cell(0,10,'1800 Century Park East, 2nd Floor - Los Angeles, California 90067 ','','','C');\n\t$this->Ln(3);\n\t$this->Cell(0,10,'888.792.2293 Main - 310.734.1665 Fax - www.MacysLawsuit.com ','','','C');\n\t$this->Ln(1);\n\t#$this->Cell(0,10,'CLIENT INITIALS _______','','','R');\n\t$this->Ln(9);\n}", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "12ba88c3669fa37e8b28433d90af740f", "score": "0.0", "text": "public function edit($id)\n {\n $user = User::find($id);\n $userRole = $user->roles()->first();\n $user['rol'] = $userRole;\n $roles = Role::all()->pluck('slug','id');\n return view('users.edit', array('user' => $user, 'roles' => $roles ));\n }", "title": "" } ]
[ { "docid": "eaff1ff5ad75e879908bb065beeea534", "score": "0.789207", "text": "public function edit(Resource $resource)\n {\n return view('actions.resource.edit', compact('resource'));\n }", "title": "" }, { "docid": "f3bc4ff0e0f2cc54bf914d77670e405e", "score": "0.78099495", "text": "public function edit(Resource $resource)\n {\n return view('resource.edit',['resource'=>$resource]);\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "4bdbe4ff8aec98fee963bdf4dbf6da91", "score": "0.7512742", "text": "public function edit(FormBuilder $formBuilder, $course, Resource $resource)\n {\n //\n $edit = $formBuilder->create(\\App\\Forms\\Resource::class, [\n 'method' => 'PATCH',\n 'url' => route('resource.update', [$course, $resource->id]),\n 'model' => $resource,\n ]);\n //\n $delete = $formBuilder->create(\\App\\Forms\\DeleteForm::class, [\n 'method' => 'DELETE',\n 'url' => route('resource.destroy', [$course, $resource->id]),\n ]);\n $pageTitle = 'Edit Resource';\n return view('resources.formEdit', compact('edit','delete', 'pageTitle'));\n\n }", "title": "" }, { "docid": "93f7e624d9e32a9fbf006f4f83dae8a8", "score": "0.7485166", "text": "public function edit($id)\n {\n /*show edit form*/\n }", "title": "" }, { "docid": "1404e57fbb5774c03bfe25411f8fe287", "score": "0.7329009", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n \n $data = [\n 'resource' => $resource,\n ];\n\n return view('resources.edit-resource')->with($data);\n }", "title": "" }, { "docid": "ed0028dbd1fbb47ee337d77b8a651d9a", "score": "0.7300998", "text": "public function edit($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\t\treturn View::make('resource/edit', compact('resource'));\n\t}", "title": "" }, { "docid": "4753e80c2af19bb37f8b9df0bf10829e", "score": "0.72601366", "text": "public function edit( )\n\t{\n\t\t// show\n\t}", "title": "" }, { "docid": "2d0354bc64da2d977cfd60754017882b", "score": "0.7256488", "text": "public function edit($id)\n {\n $userdata = Resources::findOrFail($id);\n return view('admin.resource.edit', compact('userdata'));\n }", "title": "" }, { "docid": "8c5ec66a768a8406204fdc19e3dec141", "score": "0.7236764", "text": "public function edit($id)\n\t{\n\t\t// Get the resource if it has not been provided by the child class\n\t\tif( ! $this->resource->getKey())\n\t\t\t$this->resource = $this->resource->findOrFail($id);\n\n\t\t$this->layout->subtitle = _('Edit');\n\n\t\treturn $this->loadView(__FUNCTION__, $this->resource->getFillableLabels());\n\t}", "title": "" }, { "docid": "f486aa2dad1b98a29b575e9dba22938d", "score": "0.7131576", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n\n return view('resources.edit')->with(compact('resource'));\n }", "title": "" }, { "docid": "654b96e5d414d66677bf1e3d1695b1d8", "score": "0.7118867", "text": "public function edit_form()\n {\n return View::make(\"app.edit\");\n }", "title": "" }, { "docid": "ecbdcecae7d17f5fd47a1b3471865b07", "score": "0.71140355", "text": "public function edit($resourceId)\n {\n $resource = $this->resource->find($resourceId);\n\n return view('laramanager::resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "8640b0c244bf00ab3b420106f09d5eb1", "score": "0.71136826", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BWBlogBundle:Resource')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Resource entity.');\n }\n\n $form = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BWBlogBundle:Resource:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "ab1c5f00384bd443c0312a8cedd635d9", "score": "0.709417", "text": "function edit() {\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t$productId = KRequest::getInt('productId');\n\t\t$matrixId = KRequest::getInt('id');\n\n\t\t$view = $this->getDefaultViewForm();\n\t\t$view->setProductId($productId);\n\t\t$view->setMatrixId($matrixId);\n\t\t$view->display();\n\n\t}", "title": "" }, { "docid": "5df52742ed05bd924198604d4236743d", "score": "0.7058229", "text": "public function edit($id)\n {\n //$resource = Resource::findOrFail($id);\n $query = '\"select\":\"*\",\"where\":\"id=' . $id . '\"';\n $data = ResourcesService::getResourcesTableRow($query);\n $resource = $data[\"Result\"][0];\n SyncService::SyncResourcesTable();\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "6c1e231bfb659c518730d45c158fa402", "score": "0.7040291", "text": "public function edit($id)\n\t{\n\t\t$resource = $this->repository->getResource($id);\n\t\t$menuTab = $this->menuTab;\n\t\treturn response()->view('admin.resources.edit', compact(['resource', 'menuTab']));\n\t}", "title": "" }, { "docid": "9c8836b3e3aa143dfa78083f839f6e60", "score": "0.7036434", "text": "public function editAction()\n {\n $request = $this->getRequest();\n\t\t$id = $request->getParam(\"id\");\n\n $form = new Application_Form_Book();\n $book = new Application_Model_Book();\n\t\t$mapper = new Application_Model_BookMapper();\n $mapper->find($id, $book);\n\t\t\n\t\t$form->populate($book);\n\t\t\n\t\t$this->view->form=$form;\n\n }", "title": "" }, { "docid": "96884a0d55f36349b743e3d913248156", "score": "0.70006657", "text": "function edit()\n {\n $this->_view_edit('edit');\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "0aee08a6c8d208457326de0c63ab1d93", "score": "0.69405466", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->revision->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['revision' => $this->revision]);\n\t}", "title": "" }, { "docid": "13550b89e98e00015a895299bc148377", "score": "0.69336295", "text": "public function editAction()\n {\n $assign_id = $this->_getParam('assign');\n $this->_includeForm($assign_id);\n }", "title": "" }, { "docid": "44db8e15fc1352a7c519823621a72cc9", "score": "0.69331795", "text": "public function edit()\n {\n return view('coreplanification::edit');\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.69117606", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "6acf67aab48fd2b396026c0eeb096874", "score": "0.69115764", "text": "public function edit()\n {\n return view('prappo::edit');\n }", "title": "" }, { "docid": "291ee83a27f023635ff2c99d1e9ea7a6", "score": "0.69041586", "text": "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'em' => $this->getDoctrine()->getManager(),\n 'action' => $this->generateUrl('resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array(\n 'label' => 'Update',\n 'attr' => array(\n 'class' => 'btn btn-primary',\n ),\n ));\n\n return $form;\n }", "title": "" }, { "docid": "53a8dd3945e8d394e8af0378fcb0759a", "score": "0.68744934", "text": "public function edit($id)\n\t{\n // get\n $resident = Resident::find($id);\n\n // show the edit form and pass\n return View::make('residents.edit')\n ->with('resident', $resident);\n\t}", "title": "" }, { "docid": "b1f8a3dd503a02e69fbec578be1ee9d1", "score": "0.686333", "text": "public function editForm($id)\n\t{\n\t\t$job = Job::find($id);\n\t\tif(!$job)\n\t\t{\n\t\t\tApp::abort(404);\n\t\t}\n\n\t\treturn View::make('admin.jobs.edit')->with(array(\n\t\t\t'title' => 'Edition de '.$job->name,\n\t\t\t'job' => $job\n\t\t));\n\t}", "title": "" }, { "docid": "6fe32e6f0c7ebd96d516ccbe60770da8", "score": "0.686321", "text": "public function edit()\n\t{\n\t\t$jInput = JFactory::getApplication()->input;\n\t\t$jInput->set('view', 'field');\n\t\t$jInput->set('layout', 'default');\n\t\t$jInput->set('hidemainmenu', 1);\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "766ad0e46f9488ff1bb3e99bffd9b013", "score": "0.68585783", "text": "public function edit($id)\n {\n return view('formbuilder::edit');\n }", "title": "" }, { "docid": "3adf6e4a4db6770a78d161ea39e0d09a", "score": "0.68573624", "text": "public function editAction ( )\n {\n $model = $this->getModel($this->_modelName);\n $request = $this->getRequest();\n $form = $model->getForm();\n $params = $request->getParams();\n\n $model->load($request->getParam('id'));\n\n $form->injectDependencies($model, $params);\n\n if (! $model->id) {\n $message = sprintf(self::MSG_LOAD_FAILURE, $this->_modelName);\n $this->flashAndRedirect($message, 'error', array(\n 'module' => $request->getModuleName(),\n 'controller' => $request->getControllerName(),\n 'action' => 'index',\n ));\n }\n\n if ($request->isPost()) {\n try {\n $this->_edit($model, $request);\n } catch (Zend_Exception $exception) {\n $get = $this->_getGetRequest();\n $this->flashAndRedirect($exception->getMessage(), 'error', $get);\n }\n }\n\n $this->view->form = $form;\n $this->view->model = $model;\n\n }", "title": "" }, { "docid": "d56e1574f0c5378fe3811673b7df8b42", "score": "0.6851044", "text": "public function edit($id)\n\t{\n\t\t$this->page_title = 'Edit Associate';\n\t\t$data = $this->rendarEdit($id);\n\t\treturn view('admin.crud.form',$data);\n\t}", "title": "" }, { "docid": "489dd9e64fb4a5c656aedbd3e14c8922", "score": "0.6848005", "text": "public function edit($id)\n\t{\n\t\t$question = Question::findOrFail($id);\n return view('admin.question.form', compact('question'));\n\t}", "title": "" }, { "docid": "9f631e40538fb44577d89db78f7348d8", "score": "0.684799", "text": "public function edit($id)\n {\n\t\t$user = $this->repository->findOneById($id);\n\n return view($this->base . 'form',compact('user'));\n }", "title": "" }, { "docid": "ebdfabd30fdb198a4595764f3e45e18f", "score": "0.6832047", "text": "public function actionEdit()\n {\n $this->view->article = Article::findById((int)$_GET['id']);\n $this->view->display(__DIR__ . '/../../../templates/admin/edit.php');\n }", "title": "" }, { "docid": "8f4207c19a0c7a6f7e5ad8a14497a90f", "score": "0.6824207", "text": "public function edit($id)\n\t{\n\t\treturn \"Shows a form for editing a specific post\";\n\t}", "title": "" }, { "docid": "3968d721d2d6a0540f1d6feba20cef0c", "score": "0.68226755", "text": "public function edit($id)\n {\n return view('controllers.resource-controllers.edit', compact('id'));\n }", "title": "" }, { "docid": "43a06ccc90a0e604ffd06cacb786b0ff", "score": "0.6820547", "text": "public function edit($id)\n\t{\n\t\t$student = $this->students->findById($id);\n return View::make('students._form', array('student' => $student, 'exists' => true));\n\n\t}", "title": "" }, { "docid": "dd6567bb75ad8b2f5dcd4461b639f0e6", "score": "0.6819833", "text": "public function edit($id)\n {\n $form = Form::find($id);\n return view('formbuilder::form.edit',compact('form'));\n }", "title": "" }, { "docid": "ca5f52bec4884c7fcd8605fda797f2e0", "score": "0.681206", "text": "public function edit($id)\n {\n $form =\\App\\Form::find($id);\n return view('form.edit',compact('form'));\n }", "title": "" }, { "docid": "07993cef1b04896170dffd4d46ed96aa", "score": "0.68106216", "text": "public function edit($class_id, $resource)\n {\n //\n }", "title": "" }, { "docid": "42fefa0bb00f6a35ff461a006d5fb4fe", "score": "0.6809563", "text": "public function editForm()\n {\n $data = [\n 'question' => App::get('database')->select('questions', 'id', $_GET['id']),\n 'answers' => App::get('database')->select('answers', 'answer_id', $_GET['id'])\n ];\n\n return view('questions.edit', compact('data'));\n }", "title": "" }, { "docid": "5dbf6a424144f5f1ea70f7e2584cb814", "score": "0.68048286", "text": "public function edit()\r\n {\r\n return view('admin::edit');\r\n }", "title": "" }, { "docid": "b2548057b424e6a5cacb6db19ee658ae", "score": "0.68022823", "text": "public function edit()\n {\n return view('api::edit');\n }", "title": "" }, { "docid": "62c2bf22604789e0fe0631318bc4da7e", "score": "0.6793394", "text": "public function edit() {\n\t\t/* CHANGED - switched to url(\"id\") as $this->param(\"id\") is deprecated */\n\t $this->id = WaxUrl::get(\"id\");\n\t\tif(!$this->id) $this->id = $this->route_array[0];\n $this->model = new $this->model_class($this->id);\n \n\t\t$this->form = $this->render_partial(\"form\");\n\t\tif($_POST['cancel']) $this->redirect_to(Session::get(\"list_refer\"));\n\t\tif($_POST['save']) $this->save($this->model, \"edit\");\n\t\telse $this->save($this->model, Session::get(\"list_refer\"));\n\t}", "title": "" }, { "docid": "4d4b5c8d6ba885d863626bf0f1e99725", "score": "0.67909837", "text": "public function edit($id)\n\t{\n\t\t$this->resources = array('car' => $this->resource,\n \t\t\t\t\t\t\t\t 'categories' => Category::ClassListSelectInput(),\n \t\t\t\t\t\t\t\t 'carList' => Car::carListSelectOptions()\n \t\t\t\t\t\t);\n\t\treturn $this->respondTo(\n\t\t\tarray('html'=> function()\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t $this->layout->nest('content', $this->view, $this->resources);\n\t\t\t\t \t\t\t},\n\t\t\t\t 'js' => function()\n\t\t\t\t \t\t {\n\t\t\t\t \t\t \t $form = View::make($this->form, $this->resources)->render();\n\t\t\t\t \t\t \t return View::make('admin.shared.modal', array('body' => $form))->render();\n\t\t\t\t \t\t }\n\t\t\t\t )\n\t\t\t);\n\t}", "title": "" }, { "docid": "86d596efe1714c0e50410fc7134cd9e3", "score": "0.67899823", "text": "public function edit()\n {\n return view('berating::edit');\n }", "title": "" }, { "docid": "2147ded57d317abac917ded7bf4c5589", "score": "0.678895", "text": "public function edit($id)\n {\n $record = $this->model->findOrFail($id);\n\n $this->viewData['record'] = $record;\n\n $this->viewData['formMethod'] = 'PUT';\n $this->viewData['formAction'] = 'user.update';\n\n return view($this->defaultFormView, $this->viewData);\n }", "title": "" }, { "docid": "b475fc8e937568a510257d6507f3a6e2", "score": "0.67683", "text": "public function edit($id)\n {\n $product = Product::find($id);\n return view('admin.product.form',[ 'product' => $product ]);\n }", "title": "" }, { "docid": "cadf80168cda3fc14631174ff8ec05e6", "score": "0.6767456", "text": "public function editAction()\n {\n $model = $this->_initModel();\n\n // make sure that the model exists before continuing\n if ($this->_getRequestedId() && !$model && !$model->getId()) {\n Mage::getSingleton('adminhtml/session')->addError($this->__('This ' . $this->_getObjectLabel() . ' no longer exist or is corrupt.'));\n $this->_redirect('*/*/');\n } else {\n $this->_initAction()->renderLayout();\n }\n }", "title": "" }, { "docid": "5bf37156a011a54f8d1f89ba96911864", "score": "0.67593914", "text": "public function edit(Form $form)\n {\n return view('forms.edit',compact('form'));\n }", "title": "" }, { "docid": "ac62d8f04a855af96ee81ddcc7f43f6a", "score": "0.674935", "text": "public function edit(): void\n {\n $this->showEditPage($this->getItem());\n }", "title": "" }, { "docid": "e87e608ddadfa3687caa6cc9477425cf", "score": "0.6745892", "text": "public function edit($id)\n {\n $is_edit = true;\n $product = Product::find($id);\n\n return view('products.form', compact('product', 'is_edit'));\n }", "title": "" }, { "docid": "f317696c87c55af5bdb2c774e7855698", "score": "0.67415434", "text": "public function edit(Resource $resource)\n {\n //\n // $this->authorize('update',Resource::class);\n // $page=Page::all();\n // return view('resource.edit',compact('page','resource'));\n return response()->json($resource);\n }", "title": "" }, { "docid": "2a0de8686ce09f7bacd45838296d3aac", "score": "0.6740148", "text": "public function edit($id)\n {\n if(Gate::denies('familia-edit')){\n abort(403,\"Não autorizado!\");\n }\n\n $familia = Familia::find($id);\n\n return view('familias.form',compact('familia'));\n }", "title": "" }, { "docid": "6d0cd677e592e2179223532437971edd", "score": "0.67277086", "text": "public function edit($id)\n\t{\n return view($this->path . 'edit', ['record' => Record::find($id)] );\n\t}", "title": "" }, { "docid": "8ecab6633b0244e83acc1262c8f70524", "score": "0.6724784", "text": "public function edit($id)\n\t{\n\t\t$famoso = Famoso::find($id);\n\n\t\t// show the edit form and pass the object\n\t\treturn View::make('famoso.edit')\n\t\t\t->with('famoso', $famoso);\n\t}", "title": "" }, { "docid": "5e95479074ff3a4269a77c41326ace59", "score": "0.67221993", "text": "public function editing(){\n\t\t/// Send the user to this view\n\t\t$this->render(\"editing\");\n\t}", "title": "" }, { "docid": "e9232910411eba7ae6c98603663c9453", "score": "0.6719594", "text": "public function edit($id)\n {\n $company = Company::find($id);\n $company->form_action = $this->getRoute() . '.update';\n $company->page_title = 'Company Edit Page';\n // Add page type here to indicate that the form.blade.php is in 'edit' mode\n $company->page_type = 'edit';\n return view('backend.companies.form', [\n 'company' => $company\n ]);\n }", "title": "" }, { "docid": "73c3c8ef8ccb5ebffbd7c9d1617e5de2", "score": "0.6716718", "text": "public function editForm() {\n\t\t$layout = $this->input->get('layout', null, 'string');\n\t\t$nameModelForm = (empty($layout)) ? $this->nameKey.'form' : $layout.'form';\n\t\t$layout = (empty($layout)) ? 'edit' : 'edit_'.$layout; //BmDebug::log($layout, __method__);\n\t\t$view = $this->getView($this->default_view,\n\t\t\tJFactory::getDocument()->getType(), '', array('layout' => $layout));\n\t\t$view->setModel($this->getModel($this->nameKey));\n\t\t$view->setModel($this->getModel($nameModelForm));\n\t\t$view->editForm();\n\t}", "title": "" }, { "docid": "1d24319a1462677632ee7717aa20a61d", "score": "0.6715344", "text": "public function edit($id)\n { \n \treturn view(\"gestion.formularios.edit\",[\"formulario\"=>Formulario::findOrFail($id)]); \n }", "title": "" }, { "docid": "2a667f76d35f0224dbbf223e12e110af", "score": "0.6706635", "text": "public function actionEdit($id)\n\t{\n\t\t$form = $this->getComponent('rightResourceForm');\n\t\t/* @var $form Form */\n\n\t\t$submit = $form->addSubmit(FormBuilder::SUBMIT_EDIT, 'upravit zdroj oprávnění');\n\t\t$submit->onClick[] = callback($this,'edit');\n\n\t\t$form->addSubmit('stortno', \"storno\")->setValidationScope(false)->onClick[] = callback($this,'formStorno');\n\t}", "title": "" }, { "docid": "a7dded643ee65e6b9cf08ef89ee539b6", "score": "0.6699572", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->presentation->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['presentation' => $this->presentation]);\n\t}", "title": "" }, { "docid": "4e3f60120231c9e9fb4516dda6cad799", "score": "0.6698769", "text": "public function edit($id)\n {\n $entity = Entity::query()->find($id);\n return view('crudgenerator::entities.edit', compact('entity'));\n }", "title": "" }, { "docid": "b3e1f1e6d5549bd781053c989eb1e847", "score": "0.66949964", "text": "public function edit($id)\n {\n $author = Author::find($id);\n return view('admin.author.form',['author' => $author]); \n }", "title": "" }, { "docid": "fe08627e9afbe6ed7f13f71f273030a1", "score": "0.6693402", "text": "public function edit($id)\n\t{\n $employee = Employee::find($id);\n return View::make('system.Employee.edit',compact(\"employee\"));\n\t}", "title": "" }, { "docid": "b8547be61d1a0bb98b26ec7de01610cd", "score": "0.668619", "text": "public function edit($id, FormBuilder $form_builder): Renderable\n {\n $existing_product = $this->product_repository->getById($id);\n\n $form = $form_builder->create('App\\Forms\\Product\\EditForm', [\n 'method' => 'PUT',\n 'url' => route('product.update'),\n 'model' => $existing_product\n ]);\n\n return view('product.modify', compact('form'));\n }", "title": "" }, { "docid": "bf49bc8226e13e2862c2259d16e93588", "score": "0.6680715", "text": "public function edit($id)\n {\n $product = Product::find($id);\n return view('products.edit_form')->with('product', $product)->with('manufacturers', Manufacturer::all());\n }", "title": "" }, { "docid": "6c0376e096733d3b0fa90503eef2434b", "score": "0.6677822", "text": "public function edit()\n {\n return view('bangunan::edit');\n }", "title": "" }, { "docid": "44ff363bc16fe7311c23454456531dbc", "score": "0.66771793", "text": "public function edit_item()\n {\n $this->check_authorization();\n \n $id = $this->get_arg('id', 0);\n $item = Item::find($id); \n $data['item'] = $item;\n $data['breadcrumbs'] = $this->generate_breadcrumbs(\n $item->category_id,\n array('/show_item?id='.$item->id => $item->name)\n );\n\n return new View('item_form', $data); \n }", "title": "" }, { "docid": "41567083a127c71ff96104505b7b5dec", "score": "0.66739434", "text": "public static function edit()\n {\n $record = todos::findOne($_REQUEST['id']);\n self::getTemplate('edit_task', $record);\n\n }", "title": "" }, { "docid": "98c3057a696eb14943e7e5fea5851c0b", "score": "0.6665287", "text": "public function edit($id)\n {\n return $this->showForm($id);\n }", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.6664993", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "adb01bd13a4dfbf550016516570e7b60", "score": "0.6664392", "text": "public function edit($id)\n\t{\n\t\t$this->resources = array('station' => $this->resource\n \t\t\t\t\t\t);\n\t\treturn $this->respondTo(\n\t\t\tarray('html'=> function()\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t $this->layout->nest('content', $this->view, $this->resources);\n\t\t\t\t \t\t\t},\n\t\t\t\t 'js' => function()\n\t\t\t\t \t\t {\n\t\t\t\t \t\t \t $form = View::make($this->form, $this->resources)->render();\n\t\t\t\t \t\t \t return View::make('admin.shared.modal', array('body' => $form))->render();\n\t\t\t\t \t\t }\n\t\t\t\t )\n\t\t\t);\n\t}", "title": "" }, { "docid": "5fa4968110c48bd9bdcff5495b19f29a", "score": "0.66524285", "text": "public function edit()\n {\n return view('task::edit');\n }", "title": "" }, { "docid": "c13dfacb9aed13d70a670ff15ea907b6", "score": "0.664798", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EmpleadoBundle:Empleado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Empleado entity.');\n }\n\n $editForm = $this->createForm(new EmpleadoType(), $entity);\n \n\n return $this->render('PanelBundle:Empleado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }", "title": "" }, { "docid": "58f55c0117c1a36e605cb5c2aabc68e3", "score": "0.66402805", "text": "public function edit() {\n\t\t$author = pick_arg(Author::class) ?: new Author;\n\t\treturn $this->viewEdit(compact('author'));\n\t}", "title": "" }, { "docid": "221efc99f3dd40c0f971d42862c5b218", "score": "0.66357946", "text": "public function edit($id)\n\t{\n\t\tif(!$this->autorizado) return Redirect::to('/login');\n\t\t$modelo = Modelo::find($id);\n\t\tif (is_null ($modelo))\n\t\t{\n\t\t\tApp::abort(404);\n\t\t}\n\t\treturn View::make('models.form')->with('modelo', $modelo);\n\t}", "title": "" }, { "docid": "b912d383bf373377209a233f3ceefe90", "score": "0.66283524", "text": "public function editAction($id) {\r\n $em = $this->getDoctrine()->getEntityManager();\r\n\r\n $entity = $em->getRepository('MedicinaKernelBundle:Oficina')->find($id);\r\n\r\n if (!$entity) {\r\n throw $this->createNotFoundException('No se ha encontrado la oficina solicitada');\r\n }\r\n\r\n $editForm = $this->createForm(new OficinaType(), $entity);\r\n\r\n return $this->render('BackendBundle:Oficina:edit.html.twig', array(\r\n 'entity' => $entity,\r\n 'form' => $editForm->createView(),\r\n ));\r\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "e69682a60ea811251468072e63bf80cb", "score": "0.6626088", "text": "public function showEditForm($id)\n\t{\n\t\t$post = Post::where('id', $id)->first();\n\t\treturn view('admin.post.edit', ['post' => $post]);\n\t}", "title": "" }, { "docid": "bb154b1db81c97b24dc305b03e48e156", "score": "0.6624101", "text": "function edit() {\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "4ba7055b2304ab3f588267e488d1cfb9", "score": "0.6620297", "text": "function viewedit(){\n $id=Request::read('id');\n \n $nota = $this->getModel()->getNota($id);\n $this->getModel()->addData('titulo', $nota->getTitulo());\n $this->getModel()->addData('contenido', $nota->getContenido());\n $this->getModel()->addData('favorito', $nota->getFavorito());\n $this->getModel()->addData('idNotas', $nota->getId());\n $this->getModel()->addData('idUsuario', $nota->getIdUsuario());\n $this->getModel()->addFile('form', 'sections/nota/formEdit.html');\n }", "title": "" }, { "docid": "c9ce59f5b770500a9924cc8e0f97bf72", "score": "0.66186434", "text": "public function edit($id)\n {\n $resident = Resident::where('id','=',$id)->with('relatives')->first();\n return view('survey.family-member-form.edit', compact('resident'));\n }", "title": "" }, { "docid": "afb09dad84e30958b4252ef05c35ffd3", "score": "0.66183454", "text": "public function editView() {\n $this->edit = true;\n $this->addView();\n }", "title": "" }, { "docid": "63720603ef56686d63e3133a9a3ec385", "score": "0.6612739", "text": "public function edit()\n {\n return view('mgdestino::edit');\n }", "title": "" }, { "docid": "09ca9097e9f59afd7ab61c2fa4368b57", "score": "0.66118366", "text": "public function showEditForm($id)\r\r\n {\r\r\n $userinfo = User::findOrFail($id);\r\r\n return view('/auth/edituser', compact('userinfo'));\r\r\n }", "title": "" }, { "docid": "f77eec10d5891a2545e2b33ab8d59228", "score": "0.66089296", "text": "public function edit()\n {\n $company = Company::first();\n return view('company.edit',compact('company'));\n }", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.66086483", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.66086483", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "9ec66c39b4a9570023bc9493ee748e0e", "score": "0.66041213", "text": "protected function editAction()\n {\n $this->editAction\n ->setAccess($this, Access::CAN_EDIT)\n ->setOwnerAccess($this)\n ->execute($this, UserEntity::class, UserActionEvent::class, NULL, __METHOD__, [], ['user_id' => $this->thisRouteID()])\n ->render()\n ->with(\n [\n 'user' => $this->toArray($this->findOr404()),\n 'check_icon' => '<li><ion-icon name=\"checkmark-outline\"></ion-icon></li>',\n 'close_icon' => '<ion-icon name=\"close-outline\"></ion-icon>'\n ]\n )\n ->form($this->formUser)\n ->end();\n }", "title": "" }, { "docid": "f1396c5dcd191e30f534693231be69da", "score": "0.66018045", "text": "public function edit()\n {\n return view('usersupplier::edit');\n }", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.6596694", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "5f22addb2b8cf9ad635b7e8fa77bb71c", "score": "0.6594983", "text": "public function edit()\n {\n return view('mgcatalogos::edit');\n }", "title": "" }, { "docid": "751bc10498bcb4f6f6569034693a7061", "score": "0.6590733", "text": "public function edit($id)\n {\n $template = (object) $this->template;\n $form = $this->form();\n $data = SPM::find($id);\n return view('admin.master.edit',compact('template','form','data'));\n }", "title": "" }, { "docid": "bdaf931446dd96d9ab719a5b26c06691", "score": "0.65898085", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $form = $formBuilder->create(\\App\\Forms\\BookForm::class, [\n 'method' => 'PUT',\n 'url' => route('book.update',$id),\n ]);\n $books = Book::find($id);\n return view($this->folder.'.edit',compact('books','form'));\n }", "title": "" }, { "docid": "fbf7adc2631fd986ff97047f975f7733", "score": "0.6589644", "text": "public function formEdit($id)\n {\n //data poli berdasarkan id poli\n $poli = Poli::find($id);\n\n return view('poli.edit', compact('poli'));\n }", "title": "" }, { "docid": "300b72dd1771af8bcd33044e19ed0e2d", "score": "0.6585872", "text": "public function edit($id)\n\t{\n\t\t// get the nerd\n\t\t$user = Cliente::find($id);\n\n\t\t// show the edit form and pass the nerd\n\t\treturn View::make('preinscrito.editar')\n\t\t\t->with('user', $user);\n\t}", "title": "" }, { "docid": "f39615b9da8997b13628876a6e82ad26", "score": "0.65829885", "text": "public function edit()\n {\n return view('bill::edit');\n }", "title": "" }, { "docid": "48a8ca09ce387a26578ef11260681196", "score": "0.65802926", "text": "public function editform($id){\n $cultivo = Cultivo::findOrFail($id);\n\n return view(\"editform\", compact(\"cultivo\"));\n }", "title": "" } ]
530c74ac10f4b9eb1c18d4b6a50c5dcd
If a label needs to be customized, then that can be done by overriding this function
[ { "docid": "944112e4440ac1835302f7f5ced7af4d", "score": "0.6535819", "text": "public function getCustomLabel($column,$label){\n\t\treturn $label;\n\t}", "title": "" } ]
[ { "docid": "99677c06f08d4f32929956d6233cb8dc", "score": "0.76812214", "text": "abstract public function get_label();", "title": "" }, { "docid": "d3fa826a664b52127141b017450afb0d", "score": "0.767041", "text": "public function setLabel() {\n }", "title": "" }, { "docid": "4b2799c4cee1674301ee307b5027b3c0", "score": "0.7486976", "text": "abstract public function getLabel();", "title": "" }, { "docid": "3435c4b39cd08ad85a0b7090a5e7e559", "score": "0.74325645", "text": "public function setLabel( $label );", "title": "" }, { "docid": "5ba2e5948ed33bb7ea2491211c6ee3c3", "score": "0.73968095", "text": "public function get_label();", "title": "" }, { "docid": "2299b977682a34a9c435acc3f1185d46", "score": "0.73808914", "text": "abstract public function label();", "title": "" }, { "docid": "d52ae3e0033add179a6dbf4a7739a615", "score": "0.7267642", "text": "public function get_label(){ return $this->label; }", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cdbdb2680d877b615a4802a810b574a5", "score": "0.7207731", "text": "public function getLabel();", "title": "" }, { "docid": "cfcf989a12470702b1a474268b16517a", "score": "0.71870315", "text": "function label()\n {\n return '';\n }", "title": "" }, { "docid": "4bebb6360238534496c9845e02dadf24", "score": "0.7175002", "text": "public function setLabel($label);", "title": "" }, { "docid": "4bebb6360238534496c9845e02dadf24", "score": "0.7175002", "text": "public function setLabel($label);", "title": "" }, { "docid": "4bebb6360238534496c9845e02dadf24", "score": "0.7175002", "text": "public function setLabel($label);", "title": "" }, { "docid": "169a867bc62adc01e72c252311cb4a36", "score": "0.7132952", "text": "public function setLabel(string $label){$this->label = $label; return $this;}", "title": "" }, { "docid": "0595238f22c2f7d8f62197fbc0be6bc2", "score": "0.70720726", "text": "function setLabel($value){\n\t\t$this->label = $value;\n\t}", "title": "" }, { "docid": "680035d876a8d74917b6a6f1893dd4ab", "score": "0.7048787", "text": "public function __construct($label) {\n parent::__construct('label', $label);\n }", "title": "" }, { "docid": "602135fa6c7fd4a400efffb9b931dfd3", "score": "0.7039267", "text": "public function decorateLabel(string $label): string;", "title": "" }, { "docid": "4b01ddf325a6c6348d9949bb2769d31a", "score": "0.70311654", "text": "public function label();", "title": "" }, { "docid": "4b01ddf325a6c6348d9949bb2769d31a", "score": "0.70311654", "text": "public function label();", "title": "" }, { "docid": "4b01ddf325a6c6348d9949bb2769d31a", "score": "0.70311654", "text": "public function label();", "title": "" }, { "docid": "4b01ddf325a6c6348d9949bb2769d31a", "score": "0.70311654", "text": "public function label();", "title": "" }, { "docid": "4b01ddf325a6c6348d9949bb2769d31a", "score": "0.70311654", "text": "public function label();", "title": "" }, { "docid": "4b01ddf325a6c6348d9949bb2769d31a", "score": "0.70311654", "text": "public function label();", "title": "" }, { "docid": "4b01ddf325a6c6348d9949bb2769d31a", "score": "0.70311654", "text": "public function label();", "title": "" }, { "docid": "701f8bf814b56f15828b5989f0528643", "score": "0.70240587", "text": "function getLabel();", "title": "" }, { "docid": "cb72f7e9a6a54514528dbf4825dfb722", "score": "0.69940037", "text": "public function setLabel($name);", "title": "" }, { "docid": "4f45637a2030ced711208447e2714e4e", "score": "0.69229376", "text": "protected function _setLabel($label)\n {\n \t$this->_label = $label;\n }", "title": "" }, { "docid": "ea3d609545ca6706787fdca7e8f1c510", "score": "0.6875075", "text": "function setLabel($label) {\n $this->label = $label;\n }", "title": "" }, { "docid": "5ffac6ecfa041c579e94f168571de83a", "score": "0.6827628", "text": "function label():string {return $this->v();}", "title": "" }, { "docid": "a214d924d840b5dc0b505e2694693559", "score": "0.68223625", "text": "function label() {\n if (!empty($this->view->style_plugin) && $this->view->style_plugin instanceof views_plugin_style_table) {\n return '<!--views-form-attendance-activity-create-select-all-->';\n }\n else {\n return parent::label();\n }\n }", "title": "" }, { "docid": "b6a1fa99a00a4b710bf4a3122d9d017f", "score": "0.682166", "text": "public function updatedLabel()\n {\n $this->label = strtoupper($this->label);\n }", "title": "" }, { "docid": "dce2b9b0811cb15e30096bab936cee65", "score": "0.6763217", "text": "function makeLabel($what) {\n\t\tif(isset($this->$what)) {\n\t\t\t$colors = $this->getLabelColors($what);\n\t\t\t$color = in_array($this->$what, array_keys($colors)) ? $colors[$this->$what] : 'default';\n\t\t\treturn '<span class=\"label label-'.$color.'\">'.Yii::t('gip', $this->$what).'</span>';\n\t\t}\n\t\treturn '<span class=\"label label-default\">'.Yii::t('gip', 'Property {0} not found for {1}.', [$what, $this::className()]).'</span>';\n\t}", "title": "" }, { "docid": "98884a357e5b307d95df85dca8072a4d", "score": "0.67591816", "text": "public function label() { return $this->label; }", "title": "" }, { "docid": "b0e3836f396330950977f1c8835ad203", "score": "0.67478895", "text": "public function setLabel($label)\n {\n $this->label = \"<label for='\".$this->position[\"name\"].\"'>\".$this->recupValeur($label).\"</label>\";\n }", "title": "" }, { "docid": "248d1f76308bd2af016f6c64a17d532e", "score": "0.6660615", "text": "Function get_label($label) {\r\n\treturn ($label!='') ? $label:'';\r\n}", "title": "" }, { "docid": "ecb2b5e62867653c55977f60e68e0309", "score": "0.6648169", "text": "private function _buildLabel() {\n $href = $this->getOption('href');\n //------------------------\n $element = $this->getElement();\n $label = $element->getLabel();\n $label = '<a href=\"'. $href .'\" id=\"' . $this->getElement()->getName() . '_label\">' . $label . '</a>';\n return $label;\n }", "title": "" }, { "docid": "9cda77ccf9b273eb26a33e31233e410c", "score": "0.66416717", "text": "function label($text, $for='', $customAttrs=array()) {\n $attrs = array();\n if (!empty($for)) {\n $attrs = array('for' => $for);\n }\n if (count($customAttrs)) {\n foreach ($customAttrs as $key=>$value) {\n $attrs[$key] = $value;\n }\n }\n echo HtmlUtils::tag(\n 'label',\n $attrs,\n $text\n );\n }", "title": "" }, { "docid": "c297badf05734418ad78a8073d92abc1", "score": "0.66369236", "text": "public function getDefaultFrontendLabel();", "title": "" }, { "docid": "026acb038c96b7f62e72e724bbf1ce86", "score": "0.6622645", "text": "abstract public function getLabelSingluar(): string;", "title": "" }, { "docid": "859b34a4de97d43866a360d2a5fba0c8", "score": "0.66200405", "text": "function setLabel($label) {\n\t\t$this->label = is_string($label) ? trim($label) : NULL;\n\t}", "title": "" }, { "docid": "b941b25e293394c3a9c5644f024cf08c", "score": "0.66184545", "text": "function label ($testo, $tipo = 'default') {\r\n\t\treturn '<span class=\"label label-'.$tipo.'\">'.$testo.'</span>';\r\n\t}", "title": "" }, { "docid": "8882057afa2fb689e70e732d71a026fd", "score": "0.6605727", "text": "protected function createLabel()\n\t{\n\t\t$attribute = $this->params->attribute;\n\t\t$model = $this->params->model;\n\t\tif ($this->labelToPlaceholder === true\n\t\t\t&& !isset($this->params->htmlOptions['placeholder']))\n\t\t{\n\t\t\t$attributeLabels = $model->attributeLabels();\n\t\t\tif(isset($attributeLabels[$attribute]))\n\t\t\t{\n\t\t\t\t$this->params->htmlOptions['placeholder'] = $attributeLabels[$attribute];\n\t\t\t}\n\t\t}\n\t\tif ($this->showLabels !== false && !isset($this->params->labelHtmlOptions['hide']))\n\t\t{\n\t\t\treturn $this->labelEx($model, $attribute, $this->params->labelHtmlOptions);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t}", "title": "" }, { "docid": "feb8c358732ddab4bfc9e8f6e248e29d", "score": "0.66038924", "text": "public function setLabel($label){\n\t\t$this->label = $label;\n\t}", "title": "" }, { "docid": "d3396f8aec4cbcec85977cee588cc8ec", "score": "0.6565033", "text": "public function label() {\n if($this->getBlockContent()) {\n return $this->getBlockContent()->label();\n }\n return parent::label();\n }", "title": "" }, { "docid": "f343ebdc658587425f10dca88ea9de12", "score": "0.65483785", "text": "public function getLabel()\n {\n return '';\n }", "title": "" }, { "docid": "26dc22fe4e190273e8b1f4d17355570d", "score": "0.6542977", "text": "function getLabel($datakolom,$isedit=true) {\n return $datakolom['label'].(($isedit and !empty($datakolom['required'])) ? ' <span style=\"color:red\">*</span>' : '');\n}", "title": "" }, { "docid": "98493a9d57e9a284650229f02f8cb84a", "score": "0.6525097", "text": "public function set_label($value)\r\n\t{\r\n\t\treturn $this->set_attr('label', $value);\r\n\t}", "title": "" }, { "docid": "652274fe7d645a661867c58da767de1d", "score": "0.65198296", "text": "function getLabel(){\n\t\treturn $this->label;\n\t}", "title": "" }, { "docid": "8c8182c916cb8634d4b33e2870750a89", "score": "0.6517116", "text": "public function setLabel($label){\n\t\t$this->label=$label;\n\t}", "title": "" }, { "docid": "6ddbdd4b48c6504bd7de4022cb6d0e4d", "score": "0.650303", "text": "function make_a_label($name, $label) {\n return '<label for=\"'.$name.'\">'.$label.'</label>&nbsp;&nbsp;&nbsp;';\n }", "title": "" }, { "docid": "c94904ea76b52dd8c2f763d302c28120", "score": "0.65009475", "text": "function getLabelField() \n {\n return \"No Field Label Marked\";\n }", "title": "" }, { "docid": "f78dfcf6e95be569a360d32a1661ab8d", "score": "0.64998585", "text": "function label($fieldName = null, $text = null, $attributes = array()) {\n\t\t$return = parent::label($fieldName, $text, $attributes);\n\t\tif (isset($attributes['for']) && $attributes['for'] === false) {\n\t\t\treturn str_replace(' for=\"\"', \"\", $return);\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "8957e625b8391fe4eb8115e4f74e8bbf", "score": "0.64986306", "text": "function handleGetAxisLabel($sender, $args)\n {\n $args[0]->getLabels()->labelText = \"$\".$args[2];\n }", "title": "" }, { "docid": "fea1345fe02551ff556d6db8b19375c3", "score": "0.6486478", "text": "public function label()\n {\n return $this->label;\n }", "title": "" }, { "docid": "d6b69152f06f482b4fc1f3839f3a3e40", "score": "0.64810395", "text": "abstract function labels();", "title": "" }, { "docid": "099d080b89299b222c837d3957dfa4c2", "score": "0.64779276", "text": "abstract protected function getLabelFromValue($value);", "title": "" }, { "docid": "6b1e1d5fc35b817fbe784103c2bee05c", "score": "0.6474663", "text": "static function label($text,$type='default'){\n \t\n \treturn \"<span class='label label-$type'>$text</span>\";\n }", "title": "" }, { "docid": "ba07123d9b2b3a008c71ebb974ae9a30", "score": "0.6474201", "text": "public function GetFieldsLabelSideDefault ();", "title": "" }, { "docid": "679b819b74dfe917b488c7a466e5f8ff", "score": "0.64686245", "text": "function getLabel() {\n return $this->label;\n }", "title": "" }, { "docid": "807ae12191df928c28fd6693a3fa0a34", "score": "0.6468591", "text": "public function set_label($label) {\n\t\t$this->label = $label;\n\t}", "title": "" }, { "docid": "118840c9bca59e2bb1406b7448abddee", "score": "0.644685", "text": "public function label()\n {\n if ($this->label === false && $this->custom) {\n return sprintf($this->form->label($this->input_attributes->id, '%s', $this->label_attributes->toArray(), false), '');\n }\n\n if ($this->label === false) {\n return '';\n }\n\n return $this->form->label($this->input_attributes->id, $this->label, $this->label_attributes->toArray(), false)->toHtml();\n }", "title": "" }, { "docid": "4b81b87ab22ef1e72b439374247f3c2a", "score": "0.644095", "text": "public function label(): string\n {\n return $this->stringTemplate($this->label ?? Str::ucfirst($this->name()));\n }", "title": "" }, { "docid": "8274edf10e70d24709b58463332bc916", "score": "0.6433947", "text": "function metaboxRender($label) {\n\t\techo \"Layout : Text\";\n\t}", "title": "" }, { "docid": "e1b89faa9a615b0556e7daa7b9112c3c", "score": "0.64308155", "text": "function Label($text, $for, $class = -1)\n {\n $options = \"\" ;\n if ($class != -1)\n $options = \" CLASS =\\\"$class\\\"\" ;\n\n echo \"<LABEL FOR=\\\"$for\\\" \" . $options . \">$text</LABEL>\\n\" ;\n }", "title": "" }, { "docid": "b153d9fbe1aa6a233ad465dbd7654199", "score": "0.639786", "text": "public function setLabel($label) {\n\t\t$this->label = $label;\n\t}", "title": "" }, { "docid": "b153d9fbe1aa6a233ad465dbd7654199", "score": "0.639786", "text": "public function setLabel($label) {\n\t\t$this->label = $label;\n\t}", "title": "" }, { "docid": "c371a74dfb3e04a7a02d371d86349ca4", "score": "0.63891757", "text": "protected function preLabel($node) { }", "title": "" }, { "docid": "bf63ea5b830a26343b4beedbe8b43043", "score": "0.63662523", "text": "function learndash_get_custom_label( $field = '' ) {\n\treturn LearnDash_Custom_Label::get_label( $field );\n}", "title": "" }, { "docid": "b3af3016bfbddc9fc2e09fc011ecd6f7", "score": "0.63572645", "text": "public function setLabel($label)\n {\n $this->label = $label;\n $this->setAttributes(\"Label\");\n }", "title": "" }, { "docid": "20438d784be887f0af0442062cb29c4e", "score": "0.63522315", "text": "private function ofLabel()\n {\n return '<span class=\"label\">of ' . $this->pagination->numberOfPages() . '</span>';\n }", "title": "" }, { "docid": "04cf0145aee97d3cdfb117ad297d1608", "score": "0.63503265", "text": "function label( $vContent = NULL, $aAttrs = array() )\n\t{\n\t\t$bHasEnd = TRUE;\n\t\treturn $this->_create_tag( __FUNCTION__, $aAttrs, $bHasEnd, $vContent );\n\t}", "title": "" }, { "docid": "82934880c399223878949ab133895cdc", "score": "0.63498664", "text": "public function setLabel($label)\n {\n $this->label = $label;\n }", "title": "" }, { "docid": "82934880c399223878949ab133895cdc", "score": "0.63498664", "text": "public function setLabel($label)\n {\n $this->label = $label;\n }", "title": "" }, { "docid": "82934880c399223878949ab133895cdc", "score": "0.63498664", "text": "public function setLabel($label)\n {\n $this->label = $label;\n }", "title": "" }, { "docid": "2cb3403a2274f0f9e8367589b5c1b190", "score": "0.632962", "text": "function erp_html_form_label( $label, $field_id = '', $required = false ) {\n $req = $required ? ' <span class=\"required\">*</span>' : '';\n echo '<label for=\"' . esc_attr( $field_id ) . '\">' . wp_kses_post( $label ) . $req . '</label>';\n}", "title": "" }, { "docid": "77d96292e9e3d3ac12b8d5444058aa63", "score": "0.63284266", "text": "protected function renderLabelAttributes()\n {\n $objStyler = new TagStyler();\n $attributes = $this->getHtmlAttributes(null, null, ['title']); // copy tooltip to wrapping label\n $objStyler->setAttributes($attributes);\n $objStyler->override($this->getCheckLabelStyler());\n\n if (!$this->Enabled) {\n $objStyler->addCssClass('disabled'); // add the disabled class to the label for styling\n }\n if (!$this->Display) {\n $objStyler->Display = false;\n }\n return $objStyler->renderHtmlAttributes();\n }", "title": "" }, { "docid": "96cfd0029ee13223e21693b8cb448983", "score": "0.63220584", "text": "public function label()\n {\n return $this->label;\n }", "title": "" }, { "docid": "96cfd0029ee13223e21693b8cb448983", "score": "0.63220584", "text": "public function label()\n {\n return $this->label;\n }", "title": "" }, { "docid": "648c681c7c5ad3ce42fcaf44c45c1781", "score": "0.6318712", "text": "public function getNewConditionLabel();", "title": "" }, { "docid": "92352218d42a59a3be3ccdc6f3187ed1", "score": "0.6306343", "text": "function Label(&$page, $label, $description = \"\") {\n // superclass constructor\n $this->HtmlComponent($page);\n\n $this->setLabel($label);\n $this->setDescription($description);\n }", "title": "" }, { "docid": "b477bd0bb09f7d2b6434f456a5f29a51", "score": "0.62989634", "text": "protected function getLabel()\n\t{\n\t\t$label = '';\n\n\t\tif ($this->hidden)\n\t\t{\n\t\t\treturn $label;\n\t\t}\n\n\t\t// Get the label text from the XML element, defaulting to the element name.\n\t\t$text = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name'];\n\t\t$text = $this->translateLabel ? JText::_($text) : $text;\n\n\t\t// Set required to true as this field is not displayed at all if not required.\n\t\t$this->required = true;\n\n\t\t// Add CSS and JS for the TOS field\n\t\t$doc = JFactory::getDocument();\n\t\t$css = \"#jform_profile_tos {width: 18em; margin: 0 !important; padding: 0 2px !important;}\n\t\t\t\t#jform_profile_tos input {margin:0 5px 0 0 !important; width:10px !important;}\n\t\t\t\t#jform_profile_tos label {margin:0 15px 0 0 !important; width:auto;}\n\t\t\t\t\";\n\t\t$doc->addStyleDeclaration($css);\n\t\tJHtml::_('behavior.modal');\n\n\t\t// Build the class for the label.\n\t\t$class = !empty($this->description) ? 'hasTip' : '';\n\t\t$class = $class . ' required';\n\t\t$class = !empty($this->labelClass) ? $class . ' ' . $this->labelClass : $class;\n\n\t\t// Add the opening label tag and main attributes attributes.\n\t\t$label .= '<label id=\"' . $this->id . '-lbl\" for=\"' . $this->id . '\" class=\"' . $class . '\"';\n\n\t\t// If a description is specified, use it to build a tooltip.\n\t\tif (!empty($this->description))\n\t\t{\n\t\t\t$label .= ' title=\"'\n\t\t\t\t. htmlspecialchars(\n\t\t\t\ttrim($text, ':') . '::' . ($this->translateDescription ? JText::_($this->description) : $this->description),\n\t\t\t\tENT_COMPAT, 'UTF-8'\n\t\t\t) . '\"';\n\t\t}\n\n\t\t$tosarticle = $this->element['article'] ? (int) $this->element['article'] : 1;\n\t\t$link = '<a class=\"modal\" title=\"\" href=\"index.php?option=com_content&amp;view=article&amp;layout=modal&amp;id=' . $tosarticle . '&amp;tmpl=component\" rel=\"{handler: \\'iframe\\', size: {x:800, y:500}}\">' . $text . '</a>';\n\n\t\t// Add the label text and closing tag.\n\t\t$label .= '>' . $link . '<span class=\"star\">&#160;*</span></label>';\n\n\t\treturn $label;\n\t}", "title": "" }, { "docid": "33ae3b4504cfa20f3dd871cc7d512f5f", "score": "0.62927055", "text": "function getLabel() {\r\n return $this->label;\r\n }", "title": "" }, { "docid": "c9873c4fd051bdc82da5abb2e1f606cb", "score": "0.62894154", "text": "function addLabel( $seed,$text,$attributes = array())\n\t{\n\t\tif(!empty($attributes))\n\t\t{\n\t\t\t$options = $this->innerTags($attributes);\n\t\t}else{\n\t\t\t$options = \"\";\n\t\t}\n\t\t\n\t\t\t//$this->tag[$seed] = \"<label$options>$text</label>\";\n\t\t\t$build_string = \"<label$options>$text</label>\";\n\t\t\t$this->createTag('tag',$seed,$build_string);\n\t}", "title": "" } ]
c56c53140a4a9872b1d82599b32a9341
Set the initially selected channels.
[ { "docid": "29450295164f2cbf171c798e875c4cb8", "score": "0.59531426", "text": "public function setInitialChannels(array $initialChannels)\n {\n $this->clearInitialChannels();\n\n foreach ($initialChannels as $initialChannel) {\n $this->addInitialChannel($initialChannel);\n }\n\n return $this;\n }", "title": "" } ]
[ { "docid": "711e79bc5f96dbdc98d7d03dd0d2c5da", "score": "0.63317484", "text": "public function clearInitialChannels()\n {\n $this->initial_channels = [];\n\n return $this;\n }", "title": "" }, { "docid": "4a64a7652feecef0a6ff707bb3e6c347", "score": "0.6087296", "text": "public function setActiveChannels($channels)\n {\n $this->activeChannels = $channels;\n }", "title": "" }, { "docid": "aa5dab7f8a779ef9b7a28f7398506651", "score": "0.5869465", "text": "public function getInitialChannels()\n {\n return $this->initial_channels;\n }", "title": "" }, { "docid": "4938d71bb6047a69eb5bc6bfe97cff39", "score": "0.58367765", "text": "public function channels()\n {\n if (func_num_args() == 0) {\n return $this->getChannels();\n }\n\n $this->setChannels(func_get_arg(0));\n\n return $this;\n }", "title": "" }, { "docid": "363054a36dc02f281ab397ea62aa9f2e", "score": "0.5793333", "text": "public function restoreDefaultChannels()\n {\n return $this->replaceChannels(\n $this->getDefaultChannels()\n );\n }", "title": "" }, { "docid": "831f37e5269738295dc766009dc7c802", "score": "0.5790508", "text": "public function set_suggested_channels()\n{\n\t\t$restrict=50;\n\t\t$status='normal';\n\t\t$counter=0;\n\t\t$limit=20;\n\t\t$authid = $this->Session->read('Auth.User.id');\n\t\t//Repeat it to get data\n\t\t$listofmine=$this->Subscription->find('list',array('conditions'=>array('Subscription.subscriber_id'=>$authid),'fields'=>array('Subscription.subscriber_to_id')));\n\t\tdo{\n\t\t$suggestdata=$this->User->find('all',array('limit' => $limit,'order'=>'rand()','conditions'=>array('User.id'=>$this->get_suggestions($restrict),'NOT' => array('User.id' => $listofmine))));\n if($suggestdata==NULL)\n\t\t {\n $status='empty';\n\t\t $restrict+=10;\n\t\t $counter++;\n\t\t }else{\n\t\t $status='normal';\n\t\t }\n\t\t if($counter==3)\n\t\t break;\n\t\t}while($status=='empty');\n\t\t$category = $this->Category->find('all');\n\t\t$this->set('category',$category);\n\t \t$this->set('channels',$suggestdata);\n\t\t\n\t\t$this->Common->get_last_activities();\n\t\t$this->set_notify_count();\n\t\t$this->set_notify();\n}", "title": "" }, { "docid": "c9d08ce4ad321462a808675de0ed056e", "score": "0.57217675", "text": "public function setChannel(int $channel): void\n {\n }", "title": "" }, { "docid": "6cc953211388ac62774420be1c4c7881", "score": "0.55724347", "text": "public function setChannel( $channel ) {\n $this->channel = (array) $channel;\n }", "title": "" }, { "docid": "f6e77b8db0a1a2764c2ed4f8d5fb2203", "score": "0.5459026", "text": "public function channelsFromString()\n {\n if (func_num_args() == 0) {\n return $this->getChannelsFromString();\n }\n\n $this->setChannelsFromString(func_get_arg(0));\n\n return $this;\n }", "title": "" }, { "docid": "dd5f8a9900c72ee5b10c77d5a0a8ab26", "score": "0.54495907", "text": "public function getDefaultChannels()\n {\n return Cache::remember('default-channels-ids', 60 * 60 * 24, function () {\n return \\App\\Suggested::groupBy('channel_id')->select('id', 'channel_id')->pluck('channel_id');\n });\n }", "title": "" }, { "docid": "63ae29840577b832b9767048432a83cf", "score": "0.53739285", "text": "public function setChannels($channels)\n {\n $this->channels = $channels;\n\n return $this;\n }", "title": "" }, { "docid": "ad1e6066d6b346b93912bf8f4d88f26b", "score": "0.534326", "text": "function channelGlobalSet($cinfo) {\n global $_global_channel;\n $_global_channel = $cinfo;\n}", "title": "" }, { "docid": "9296d4289049d503440fd4b44694ec75", "score": "0.51870406", "text": "function channels(){\r\n $channels = Array();\r\n \r\n //Pointer for mixer finding\r\n $pointer = null;\r\n \r\n //Ask amixer for its content\r\n foreach(amixer(\"\", \"-e control -e channels\") AS $idx => $row){\r\n// error_log(\"\\n channels row: \".$row.\"\\n\");\r\n $prfxid = trim(substr($row,0,2));\r\n \r\n if($prfxid != \"\"){\r\n \r\n preg_match_all(\"/\\'(.*?)\\'/\", $row, $matches);\r\n $description = $matches[1][0];\r\n// error_log(\"\\n channels descr: \".$description.\"\\n\");\r\n $pointer = &$channels[$description];\r\n $pointer = Array();\r\n \r\n } else {\r\n \r\n if(isset($pointer)){\r\n \r\n $name = explode(\": \",$row)[1];\r\n \r\n foreach(explode(\"-\", $name) AS $idx => $val){\r\n $pointer[$idx] = trim($val);\r\n//\t\t\t\t\t\terror_log(\"\\n channels pointer: \".$pointer[$idx].\"\\n\");\r\n }\r\n }\r\n \r\n }\r\n\r\n }\r\n// error_log(\"\\n channels \\n\");\r\n \r\n return $channels;\r\n \r\n }", "title": "" }, { "docid": "cac3441bfbf56c678724a1e94f71e7fe", "score": "0.51735425", "text": "public function channels(): array;", "title": "" }, { "docid": "1a980f666477a7630de0c804b91a54c8", "score": "0.5067388", "text": "public function getStartingChannels(): array\n {\n return $this->startingChannels;\n }", "title": "" }, { "docid": "f7d26280576e567fa4760fc5641749b8", "score": "0.5066983", "text": "public function setDefaultChannel($channel)\n {\n $this->channel = $channel;\n }", "title": "" }, { "docid": "86e8af924c59f669b1bf5981ed9670ce", "score": "0.50599074", "text": "public function getUserChannels()\n {\n }", "title": "" }, { "docid": "10f125c95e1ffe0ef073bd1cf2e14e0b", "score": "0.5028395", "text": "public function setChannels($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->channels = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "9d49cd67f720666546a5d52e68e76817", "score": "0.5009848", "text": "function you_can_build_a_set_of_new_channels_by_using_an_array()\n {\n $client = $this->buildMockClient('new_channels');\n $this->setClient($client);\n\n $channels = $this->buildChannel(['my_chan1', 'my_chan2']);\n $channels->shouldBeArray();\n $channels->shouldHaveCount(2);\n }", "title": "" }, { "docid": "960229ec5979c6770d52898ffcda5499", "score": "0.4991661", "text": "protected function set_choices() {\n\t\tif ( ! is_array( $this->choices ) ) {\n\t\t\t$this->choices = [];\n\t\t}\n\n\t\t$this->choices = wp_parse_args(\n\t\t\t$this->choices,\n\t\t\t[\n\t\t\t\t'on' => esc_html__( 'On', 'kirki' ),\n\t\t\t\t'off' => esc_html__( 'Off', 'kirki' ),\n\t\t\t\t'round' => false,\n\t\t\t]\n\t\t);\n\t}", "title": "" }, { "docid": "bfc8f943796daf3266329774b038a7f0", "score": "0.49345952", "text": "private function setAvailableCategories()\n {\n $this->availableCategories = Category::orderBy('name')->get(['id', 'name']);\n }", "title": "" }, { "docid": "ba51029342585b4063b5472c883d4870", "score": "0.49118733", "text": "public function getChannels()\n {\n return $this->channels;\n }", "title": "" }, { "docid": "ba51029342585b4063b5472c883d4870", "score": "0.49118733", "text": "public function getChannels()\n {\n return $this->channels;\n }", "title": "" }, { "docid": "16040121d3b86a0aac0473cad4c512b3", "score": "0.4893841", "text": "public function setChannel($channel) {\n $this->channel = $channel;\n }", "title": "" }, { "docid": "50919eae5e112dee44ec2d9757776a47", "score": "0.48390538", "text": "private function join_channels() {\n $wait = $this->client['join_delay'];\n $all_chans = array_keys($this->settings);\n for ($x = 0; $chan = $all_chans[$x]; $x++) {\n $this->timer(null, 'cmd_join(\"' . $chan . '\")', $wait);\n $wait += $this->client['join_delay'];\n }\n }", "title": "" }, { "docid": "bd2c43be18034b16b4984b6432f64ffc", "score": "0.48218188", "text": "public function setChannelElements($elements) {\n if ( ! is_array($elements))\n return $this;\n\n foreach ($elements as $name => $content)\n $this->setChannelElement($name, $content);\n\n return $this;\n }", "title": "" }, { "docid": "0010e8bde79e07dd72b926afba2bda8d", "score": "0.48202786", "text": "public function setDefaultChannel($channel) {\n Framework::setCache(self::DEFAULT_CHANNEL_KEY, $channel, true);\n }", "title": "" }, { "docid": "de41be348d6ec74829d8cc7dbad97899", "score": "0.48107296", "text": "public function getChannels() {\n\t\treturn $this->aI_channels;\n\t}", "title": "" }, { "docid": "3111bd4e178ec3ae4a9007a2a3ed0c18", "score": "0.47659177", "text": "public function setChannel(ChannelInterface $channel = null);", "title": "" }, { "docid": "bf8f607e41d967240e91bf28878b22ae", "score": "0.47561452", "text": "public function resetAdapterSelection ()\n\t\t {\n\t\t\t\t$this->adapter[ $this->page ] = array_map (function ($pro) {\n\t\t\t\t\t $pro['selected'] = false;\n\n\t\t\t\t\t return $pro;\n\t\t\t\t}, $this->adapter[ $this->$page ]);\n\t\t }", "title": "" }, { "docid": "3ff428fe7e00f43fc873432078bb2239", "score": "0.4748422", "text": "public function setChanel(string $chanel): void\n {\n $this->chanel = $chanel;\n }", "title": "" }, { "docid": "f04b0faf9b932cedded9828040413bc3", "score": "0.47029564", "text": "public function setChannelId($value)\n\t{\n\t\treturn $this->set(self::CHANNELID, $value);\n\t}", "title": "" }, { "docid": "c3fe6d3b1485c34dd6a22942cbc2c96e", "score": "0.4702375", "text": "public function channels( $view = null, $page = 1 ) {\n\t\tif( $view == 'newest' || $view == 'popular' ) {\n\t\t\t$channels = MyChannel::$view( $this->portal->person );\n\t\t} else {\n\t\t\t$channels = MyChannel::fetchAll( $this->portal->person );\n\t\t}\n\n\t\t$data = array();\n\n\t\tforeach( $channels as $channel ) {\n\t\t\tif( ChannelAuthZ::_authz( $channel->slug )) {\n\t\t\t\t$data[] = $channel;\n\t\t\t} \n\t\t}//end foreach\n\n\t\t$per_page = 20;\n\n\t\t$num_records = count($data);\n\t\t$data = array_slice( $data, ($page - 1) * $per_page, $per_page );\n\t\t\n\t\t$overrides = array(\n\t\t\t'last_page' => ceil($num_records / $per_page),\n\t\t\t'total_records' => $num_records,\n\t\t\t'num_rows' => count($data),\n\t\t\t'rows_per_page' => $per_page,\n\t\t\t'current_page' => $page,\n\t\t);\n\n\t\t$pagination = PSU::paginationResults( PSU::paginationInfo( $_GET, $results, $overrides ), $data );\n\t\t$this->tpl->assign('channels', $pagination['items']);\n\t\t$this->tpl->assign('pages', $pagination);\n\t\t$this->tpl->assign('user_channels', MyChannel::fetchAll($this->person));\n\t\t$this->tpl->display('channels.tpl');\n\t}", "title": "" }, { "docid": "10ff6d44ab026cafe874f3bed9b7bdc8", "score": "0.4686039", "text": "public function setChannel($channel)\n {\n $this->channel = $channel;\n }", "title": "" }, { "docid": "32155bd910c39480e17b53c18ea34e68", "score": "0.46735263", "text": "public function getSupplyChannels();", "title": "" }, { "docid": "290af4e6a4e46784ed552ff4540aca93", "score": "0.46700132", "text": "abstract public function getChannelList();", "title": "" }, { "docid": "fd71fd38492c7a9e80da81ea45cb810c", "score": "0.4637023", "text": "abstract public function isSelectedPvChannel();", "title": "" }, { "docid": "f689357ea1c8c4ee5757bd18eb5764ae", "score": "0.45922667", "text": "private function SetOpeners()\n {\n $this->strikerId = 1;\n $this->nonStrikerId = 2;\n }", "title": "" }, { "docid": "a00921df9850d373b2b895800916d3eb", "score": "0.45794293", "text": "public function channels()\n {\n return new Channels($this->token);\n }", "title": "" }, { "docid": "6aca4873b8398760bb62a84828fdb112", "score": "0.45663017", "text": "public function setCurrentUser($name) {\n\t\t$this->channel_name = $name;\n\t}", "title": "" }, { "docid": "18f7642918a7b8cc0e0e807c4e9cede3", "score": "0.45657906", "text": "public function setChannel(string $channel)\n {\n $this->channel = $channel;\n }", "title": "" }, { "docid": "9d5314f4850c90193ed2e328d68c9441", "score": "0.45515552", "text": "public function getDefaultChannel()\n {\n return $this->channel;\n }", "title": "" }, { "docid": "44ab9c410f9fd30dea51fa8af6731597", "score": "0.4548963", "text": "function setSelectable($selectable){\r\n\t\t$this->selectable = $selectable;\r\n\t}", "title": "" }, { "docid": "1aeb78ac8449b62ccd2951f798c26299", "score": "0.45454347", "text": "public function get_channel_select() {\n\t\t$data = array('data' => 0);\n\n\t\t$archiveModelId = intval(ARequest::get('archive_model_id'));\n\t\t$_ACL = M('ArchiveChannel')->get_myChannelList($archiveModelId);\n\n\t\t$archiveChannelId = intval(ARequest::get('archive_channel_id'));\n\t\t$selectType = 'current' == ARequest::get('select_type') ? 'current' : 'sub';\n\n\t\t$channelSelect = M('ArchiveChannel')->get_channelSelect($_ACL, $archiveChannelId, $selectType);\n\t\t$data = array('data' => 1, 'info' => $channelSelect);\n\t\t$this->ajax_return($data);\n\t}", "title": "" }, { "docid": "41ce66d32dbcae6b2e0df4a11990d13f", "score": "0.45216793", "text": "function it_should_return_an_array_of_channels()\n {\n $client = $this->buildMockClient('channels');\n $this->setClient($client);\n\n $channelTest = $this->channels();\n $channelTest->shouldBeArray();\n $channelTest->shouldHaveCount(2);\n }", "title": "" }, { "docid": "6a9fb97bceeb69dbafcbe2e79cc886e9", "score": "0.45018613", "text": "public function setInitGroups(bool $initGroups): void\n {\n $this->initGroups = $initGroups;\n }", "title": "" }, { "docid": "d2c1127db1825b567d64da0776b93ec7", "score": "0.44907883", "text": "function select() {\n $this->_selected = 1;\n }", "title": "" }, { "docid": "29976f7962a67e74ed8990913b3b6228", "score": "0.44652182", "text": "public function all($channel='');", "title": "" }, { "docid": "50aa7b35642c6d812cd42ff90a34b7f1", "score": "0.4462613", "text": "function select()\n {\n $this->selected = 1;\n }", "title": "" }, { "docid": "f995b363e95620009a6cc6254a31831b", "score": "0.44466463", "text": "public function coreShowChannels($params = array())\n {\n $result = $this->asm->Command(\"core show channels\");\n $result = explode(\"\\n\", $result['data']);\n\n return array(\n 'active_channels' => (int) $result[2],\n 'active_calls' => (int) $result[3],\n 'calls_processed' => (int) $result[4]\n );\n }", "title": "" }, { "docid": "7f5f93e84ffd242813f3f44f414e3724", "score": "0.4434388", "text": "function updateDropdowns(){\n\n showRecentChats(1);\n}", "title": "" }, { "docid": "f06dd6070e10e037997ead5d46e531c9", "score": "0.44198644", "text": "function keep_channels_open($channels,$user_id){\r\n global $wpdb,$bp;\r\n if(empty($channels))\r\n return;\r\n $channel_list=\"(\".join(\",\", $channels).\")\";\r\n $query=\"UPDATE {$bp->chat->table_channel_users} SET status='open' WHERE channel_id IN {$channel_list} AND user_id=%d\";\r\n $wpdb->query($wpdb->prepare($query,$user_id));\r\n\r\n }", "title": "" }, { "docid": "dd765fe0d519c18c48252aa0d615d398", "score": "0.44117194", "text": "public function setModules()\n {\n //Zend_Registry::set('modules', $modules->getList());\n }", "title": "" }, { "docid": "c2931eba04e55fbe83a0ef4d0f4df787", "score": "0.4410944", "text": "public function getChannelIds(): array\n {\n return $this->channelIds;\n }", "title": "" }, { "docid": "282a3d008c354b653a85856f687513a4", "score": "0.4408403", "text": "public function getDistributionChannels();", "title": "" }, { "docid": "2add2b4cbb03312b078da80d67be2fcf", "score": "0.4404608", "text": "private function setAvailableBrands()\n {\n $this->availableBrands = Brand::orderBy('name')->get(['id', 'name']);\n }", "title": "" }, { "docid": "5e1657583e5517dad3109099e12c9cb0", "score": "0.44025904", "text": "public function channelNames();", "title": "" }, { "docid": "bd4ab295db935cd1041baeb32d1d11ca", "score": "0.43991306", "text": "public function get_all($site_id = NULL)\n\t{\n\t\tee()->load->library('api');\n\t\tee()->api->instantiate('channel_structure');\n $qry = ee()->api_channel_structure->get_channels($site_id);\n\n if ( !$qry || !$qry->num_rows())\n {\n show_error('Looks like you need to add some channels before configuring Publisher.');\n }\n\n $channels = array();\n\n foreach ($qry->result_array() as $row)\n {\n \t$channels[$row['channel_id']] = $row;\n }\n\n return $channels;\n\t}", "title": "" }, { "docid": "832fe346c70a3c3011626aa9562e5e75", "score": "0.4395214", "text": "public function setIsChannel($isChannel)\n {\n $this->isChannel = $isChannel;\n\n return $this;\n }", "title": "" }, { "docid": "601a704b8d847859890ad065a749b47a", "score": "0.43868113", "text": "public function select()\n {\n $this->selected = 1;\n }", "title": "" }, { "docid": "a5d37da788d4f02dcdcd99c9dd63ae03", "score": "0.43597317", "text": "public function init()\n {\n $this->options = get_option( self::GROUP );\n }", "title": "" }, { "docid": "f0be1b7ed8b22a50944b2724ce59b087", "score": "0.43452644", "text": "public function setSubscriptions(?array $subscriptions): void\n {\n $this->subscriptions = $subscriptions;\n }", "title": "" }, { "docid": "c879d9f3d61410857890474729eea636", "score": "0.43368596", "text": "public function availableChannel($value)\n {\n $this->setProperty('availableChannel', $value);\n return $this;\n }", "title": "" }, { "docid": "0f2b93321e68ef14faeb7b907490280c", "score": "0.43340293", "text": "public function setChoices(array $choices)\n\t{\n\t\t$this->_choices = $choices;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "33aededdf82e5a10376bc3e346d0cbe1", "score": "0.4330393", "text": "public function ircList($channels = null, $server = null);", "title": "" }, { "docid": "fcb8ed4b56c8ec31ed543c9cdf3f2e76", "score": "0.43163928", "text": "public function channels()\n {\n return $this->hasMany(Channel::class);\n }", "title": "" }, { "docid": "a725ae272cea10bbecb8ec62a267e412", "score": "0.43050584", "text": "public function getDefaultChannel() {\n return Framework::checkCache(self::DEFAULT_CHANNEL_KEY);\n }", "title": "" }, { "docid": "4a56c879380c53d03fd07ed641d10cdd", "score": "0.42985663", "text": "public function getChannelsProperty()\n {\n return Channel::get();\n }", "title": "" }, { "docid": "ce61530bb26e5d9a2d9690f64e6f4995", "score": "0.42935362", "text": "public function setChannel($var)\n {\n GPBUtil::checkString($var, True);\n $this->channel = $var;\n\n return $this;\n }", "title": "" }, { "docid": "e66565301bfa8111e2a3c40d1439157d", "score": "0.42850035", "text": "public function setChannel($serviceArray = null) {\n\t\t$service = new Models\\Service((object)$serviceArray);\n\n\t\treturn $this->map(array($service));\n\t}", "title": "" }, { "docid": "77e06c5c18d87da3febd29ac6f3921eb", "score": "0.42736998", "text": "function setRawChannel($channel) {\n\t\t$this->_packageInfo ['channel'] = $channel;\n\t}", "title": "" }, { "docid": "235f4e0f52382d9b4de61b4b2bd5375f", "score": "0.4258247", "text": "public function getSupplyChannels()\n {\n return $this->supplyChannels;\n }", "title": "" }, { "docid": "55e5a4fea913e198aeabf66488da8316", "score": "0.42543304", "text": "public function setChannelElement($name, $content, $attributes = null) {\n $this->channels[$name]['name'] = $name;\n $this->channels[$name]['content'] = $content;\n $this->channels[$name]['attributes'] = $attributes;\n return $this;\n }", "title": "" }, { "docid": "c6fdc6823d303364362985995e6446c3", "score": "0.42425734", "text": "public function channelsList($limit = 25, $offset = 0)\n {\n return $this->auth->request(\n 'GET',\n '/channels.json',\n array('query' => array('limit' => (int) $limit, 'offset' => (int) $offset))\n );\n }", "title": "" }, { "docid": "52127b44eaff3620d006d767dedfa1f9", "score": "0.42397124", "text": "function setColors($colors) {\n\t\t//Array count should be at least one greater than $this->num_images\n\t\t$this->colors\t\t\t\t= $colors;\n\t}", "title": "" }, { "docid": "608e4cc2d52a7d0ba80f7c96e1133c5a", "score": "0.4236781", "text": "public function ircJoin($channels, $keys = null);", "title": "" }, { "docid": "3f4f87d762581296658a1310a9fd3699", "score": "0.4233668", "text": "public function ircPart($channels);", "title": "" }, { "docid": "ee649ee402c9875ee62ad4099ae6f024", "score": "0.42314646", "text": "public function getChannel();", "title": "" }, { "docid": "ee649ee402c9875ee62ad4099ae6f024", "score": "0.42314646", "text": "public function getChannel();", "title": "" }, { "docid": "ee649ee402c9875ee62ad4099ae6f024", "score": "0.42314646", "text": "public function getChannel();", "title": "" }, { "docid": "ee649ee402c9875ee62ad4099ae6f024", "score": "0.42314646", "text": "public function getChannel();", "title": "" }, { "docid": "ee649ee402c9875ee62ad4099ae6f024", "score": "0.42314646", "text": "public function getChannel();", "title": "" }, { "docid": "ff2702565886d20cab9c1261f656b940", "score": "0.42286724", "text": "public function disableChannel()\n {\n $this->withChannel = false;\n }", "title": "" }, { "docid": "e0d93e54316c1a8083e37259e25d3889", "score": "0.42259425", "text": "public function set_all_sites() {\n\t\t$defaults = $this->default_sites;\n\t\t$this->all_sites = apply_filters( 'smsc_shortcodes', $defaults );\n\t}", "title": "" }, { "docid": "1fa36a3d2ff0d25e653de80b4f9959cf", "score": "0.42188603", "text": "public function channels()\n {\n return $this->hasMany('App\\Channel');\n }", "title": "" }, { "docid": "ef079b75e51be8c681d31a37dba374c6", "score": "0.42131203", "text": "function setSelection($first_row,$first_column,$last_row,$last_column)\n {\n $this->_selection = array($first_row,$first_column,$last_row,$last_column);\n }", "title": "" }, { "docid": "05049818e36ca0cdfa463642f10d1fbd", "score": "0.41935965", "text": "public function channels() {\n\t\treturn $this->belongsToMany('t2t2\\LiveHub\\Models\\Channel')->withPivot('rules')->withTimestamps();\n\t}", "title": "" }, { "docid": "114d3dba1d5ca90eb951d4b734a9fb20", "score": "0.41930443", "text": "public function getChannels(): array\n {\n // array_keys, because $this->channels is a flipped array\n return array_keys($this->channels);\n }", "title": "" }, { "docid": "de7b337d26f2ef6a05b136f96e71f630", "score": "0.41874188", "text": "public function setAllowedSelections(?array $allowedSelections): void\n {\n $this->allowedSelections['value'] = $allowedSelections;\n }", "title": "" }, { "docid": "f29d3d3a1e32dfa5bdd72ec9585224ca", "score": "0.41839823", "text": "private function setGroups()\n {\n $groups = $this->conf->get('acf.groups') ?: [];\n\n collect($groups)->each(function ($group) {\n (new $group())->boot();\n });\n }", "title": "" }, { "docid": "6c78f5eae342afaf07c43aa73113bd42", "score": "0.4181319", "text": "public function setChannelId( string $channelId );", "title": "" }, { "docid": "a86b37791934f3702b0e84e2f00d9498", "score": "0.41726935", "text": "public function getAudioChannels();", "title": "" }, { "docid": "457bb1bdd1bb2f1b5d64b20afb87cfc5", "score": "0.41714296", "text": "public function onPlayerSelect(){\n\t\tSkyWarsPE::getInstance()->kit->setPlayerKit($this->player, $this->types[$this->count]);\n\t}", "title": "" }, { "docid": "e7cc07b1bbe07222e7badd7b3de59929", "score": "0.416886", "text": "public function getChannelIds() {\n $result = array_keys($this->ioChannels);\n return $result;\n }", "title": "" }, { "docid": "aaf59b06d461962e7b20ab8a25077525", "score": "0.41663235", "text": "public function loadChannels() {\n $this->initCurl($this->config['channelsUrl'])->runCurl();\n if ($this->curlError) {\n $error = $this->curlError . \"\\n Url: \" . $this->curlInfo['url'] . \";\";\n if (isset($this->curlOptions[CURLOPT_PROXY])) {\n $error .= \"\\n Proxy: \" . $this->curlOptions[CURLOPT_PROXY];\n }\n $this->setError($error);\n return false;\n }\n if ($this->curlInfo['http_code'] != '200') {\n $this->setError(\"http code is not OK or content is invalid \" . $this->curlInfo['http_code'] . \"/\" . $this->curlInfo['content_type']);\n return false;\n }\n $this->channelsPage = $this->curlResult;\n return $this->channelsPage;\n }", "title": "" }, { "docid": "8234fb7b00cd981521017111e24c22a2", "score": "0.41662726", "text": "public function setChannel(?string $channel = null): self\n {\n $this->channel = $channel;\n\n return $this;\n }", "title": "" }, { "docid": "e52ec7094c0790582a39e47bb4be4ad0", "score": "0.41635227", "text": "function setCombineChapters() {\n\t\t$this->maximumDivergenceLevel = 2;\n\t}", "title": "" }, { "docid": "65a9e1bdc786b1e7085be232d9276962", "score": "0.41598132", "text": "public static function set_active( $modules )\n\t{\n\t\tself::$active_modules = $modules;\n\t\tself::commit_active();\n\t}", "title": "" }, { "docid": "78b0f2da5413b995c2254c524b6d77aa", "score": "0.41569176", "text": "function bpchat_channel($id=null){\r\n if(!empty($id))\r\n $this->populate($id);\r\n }", "title": "" }, { "docid": "2b2a22f45a054fdc3b33798eeff43b15", "score": "0.41463143", "text": "public function channels($id, $data=array()) {\n if (!is_numeric($id)) { throw new CrowdFlower_Exception(\"id must be numeric\", __METHOD__, __LINE__); }\n\n $c_data = array();\n $method=\"GET\";\n if (count($data)) {\n $method=\"PUT\";\n $c_data['raw']=\"\";\n foreach ($data as $c) {\n $c_data['raw'].=\"channels[]=$c&\";\n }\n //$c_data['raw']=urlencode($c_data['raw']);\n $c_data['raw'].='key='.$this->getApiKey();\n }\n\n $c_data['id'] = $id;\n\n return $this->sendRequest($this->_channelsURL($id), $method, $c_data);\n\n }", "title": "" } ]
8ff5631137e4a45114cd0113a2d369e7
Validate an array of data against the validation rules.
[ { "docid": "e51defcbc1b70c72f4789e56d68d1ad4", "score": "0.6219629", "text": "protected function _validate($data)\n\t{\n\t\t$rules = $this->validation();\n\t\tforeach ($data as $key => $value)\n\t\t{\n\t\t\tif (array_key_exists($key, $rules) AND ! preg_match($rules[$key], $value))\n\t\t\t{\n\t\t\t\tthrow new Exception('Given \\''.$key.'\\' is not valid');\n\t\t\t}\n\t\t}\n\n\t\treturn TRUE;\n\t}", "title": "" } ]
[ { "docid": "3cc408d46db7ed894054cd7cd9ed3e28", "score": "0.8539983", "text": "public function validate(array $data);", "title": "" }, { "docid": "2a472dbaf94b8614d1bc9db04e41d590", "score": "0.82874095", "text": "public function validateInputs(Array $data);", "title": "" }, { "docid": "3422bbff5de0e6ec8582131b0c83895a", "score": "0.8268486", "text": "abstract public function validate(array $data);", "title": "" }, { "docid": "228611aaff0c009680c1fafe5e3bcd68", "score": "0.8246249", "text": "public function validateData(array $data)\n {\n foreach ($data as $value) {\n $this->validateValue($value);\n }\n }", "title": "" }, { "docid": "15fd36ec4fd556a8c9049f73473ac260", "score": "0.7586497", "text": "public function validate(array $input);", "title": "" }, { "docid": "3ff80ee6e84de1db8a3f2ce78fe09861", "score": "0.749375", "text": "public function validate($array) {\n foreach ($array as $field => $rules) {\n $this->validateField($field, $rules);\n }\n }", "title": "" }, { "docid": "7405c434e754b70632dcbbd3e3df6756", "score": "0.73486763", "text": "private static function doValidation(array $data)\n {\n $column = $data['column'];\n foreach($data['rules'] as $index => $rule)\n {\n $valid = call_user_func_array([self::class, $index], [$column, $data['value'], $rule]);\n if(!$valid)\n {\n self::setError(\n str_replace(\n [':attribute', ':rule', '_'],\n [$column, $rule, ' '],\n self::$error_messages[$index]), $column\n );\n }\n }\n }", "title": "" }, { "docid": "65e27584eadf8bd06320aec88cd759ce", "score": "0.7307301", "text": "public function validateData(array $data)\n {\n $errors = array();\n foreach ($this->getAttributes() as $attribute) {\n if ($this->_isAttributeOmitted($attribute)) {\n continue;\n }\n $dataModel = $this->_getAttributeDataModel($attribute);\n $dataModel->setExtractedData($data);\n if (!isset($data[$attribute->getAttributeCode()])) {\n $data[$attribute->getAttributeCode()] = null;\n }\n $result = $dataModel->validateValue($data[$attribute->getAttributeCode()]);\n if ($result !== true) {\n $errors = array_merge($errors, $result);\n }\n }\n\n if (count($errors) == 0) {\n return true;\n }\n\n return $errors;\n }", "title": "" }, { "docid": "2446410ef09f8ae0f6199e0b3833ada7", "score": "0.72942495", "text": "public function validate(array $data, array $rules): bool;", "title": "" }, { "docid": "bd81c845f332e6f20154864d1a3fbb5f", "score": "0.71501803", "text": "public function validateData(array $data)\n {\n $errors = [];\n foreach ($this->getAttributes() as $attribute) {\n if ($attribute->getAttributeCode() == 'reason_other') {\n continue;\n }\n if ($this->_isAttributeOmitted($attribute)) {\n continue;\n }\n $dataModel = $this->_getAttributeDataModel($attribute);\n $dataModel->setExtractedData($data);\n if (!isset($data[$attribute->getAttributeCode()])) {\n $data[$attribute->getAttributeCode()] = null;\n }\n $result = $dataModel->validateValue($data[$attribute->getAttributeCode()]);\n if ($result !== true) {\n $errors = array_merge($errors, $result);\n }\n }\n\n if (count($errors) == 0) {\n return true;\n }\n\n return $errors;\n }", "title": "" }, { "docid": "2b18f32bbb554b0804457aa2d5309759", "score": "0.7029053", "text": "protected function _validate_data($data = array()) {\n if (!is_array($data)) {\n $error = array(\n 'code' => 'NO_POSTED_DATA',\n 'description' => 'There was a problem receiving the posted data'\n );\n $res = JsonResHandler::render(array($error), 400);\n }\n\n // now, iterate through each field - validating that it is a valid attribute\n // that can be modified\n $model = $this->get_model_object();\n foreach ($data as $field => $value) {\n // make sure the field exists\n if (!$model->is_valid_attribute($field)) {\n $error = array(\n 'code' => 'INVALID_FIELD',\n 'detail' => 'This endpoint does not support the \"' .\n $field . '\" field'\n );\n $res = JsonResHandler::render(array($error), 400);\n }\n }\n }", "title": "" }, { "docid": "1cbbcba567c2126f782bad3abbc2411c", "score": "0.693209", "text": "public function runValidationChecks(array $data)\n {\n foreach($this->validators as $validator)\n {\n if($validator instanceof Validable)\n {\n if(! $validator->with($data)->passes())\n {\n $this->errors->merge($validator->errors());\n }\n }\n\n else\n {\n throw new Exception(\"{$validator} is not an instance of Dude\\Validiators\\Validable\");\n }\n }\n\n if($this->errors->isEmpty())\n {\n return true;\n }\n }", "title": "" }, { "docid": "232b57ff1a9f744f79e7d3f682d092d6", "score": "0.69079214", "text": "private function validate(array $data)\n {\n\n $this->paymentService->validate($data);\n\n $validator = Validator::make($data, [\n 'order.entry' => 'nullable|string|max:25',\n 'order.type' => 'nullable|integer|between:0,65535|exists:order_types,id',\n 'order.name' => 'nullable|string|max:100',\n 'order.email' => 'nullable|email|max:100',\n 'order.paypal_name' => 'nullable|string|max:100',\n 'order.clicks' => 'nullable|integer|between:0,65535',\n 'order.put_on_top' => 'boolean',\n 'order.date_submitted' => 'nullable|date_format:Y-m-d H:i:s',\n 'order.url' => 'nullable|url|max:250',\n 'order.stats' => 'nullable|url|max:250',\n 'order.in_rotator' => 'boolean',\n 'order.clicks_sent' => 'nullable|integer|between:0,65535',\n 'order.optins' => 'nullable|integer|between:0,65535',\n 'order.followup_sent' => 'boolean',\n 'order.screenshot' => 'nullable|url|max:250',\n 'order.priority' => 'integer|between:0,'.config('custom.priority_level'),\n 'order.status' => 'integer|between:0,65535|exists:order_statuses,id'\n ]);\n\n if ($validator->fails()) {\n throw new ValidationException($validator->errors());\n }\n\n if (array_key_exists('note', $data) && !is_null($data['note'])) {\n $this->noteService->validate($data);\n }\n\n }", "title": "" }, { "docid": "624e9186d07556597a0b3689ac3fa3ec", "score": "0.67686194", "text": "public function validator($listing, array $data);", "title": "" }, { "docid": "624e9186d07556597a0b3689ac3fa3ec", "score": "0.67686194", "text": "public function validator($listing, array $data);", "title": "" }, { "docid": "78afbd159b41bf392475469e380dd30e", "score": "0.67642325", "text": "function validatesMultiple($array) {\n\t\t\t$status = array();\n\t\t\tforeach($array as $modelName => $dataSets) {\n\t\t\t\tforeach($dataSets as $dataSet) {\n\t\t\t\t\t$data[$modelName] = $dataSet;\n\t\t\t\t\t$this->set($data);\n\t\t\t\t\t$this->validates();\n\t\t\t\t\tif(!empty($this->validationErrors)) $status[] = $this->validationErrors;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $status;\n\t\t}", "title": "" }, { "docid": "ea93d9dc6fb1d68e1e9e0947b9f1285f", "score": "0.6712497", "text": "public function check(array $data = NULL)\n\t{\n\t\tif ($data === NULL)\n\t\t{\n\t\t\t// Use the current data set\n\t\t\t$data = $this->changed();\n\t\t}\n\n\t\t$data = Validate::factory($data);\n\n\t\tforeach ($this->_fields as $name => $field)\n\t\t{\n\t\t\tif ($field->editable AND $data->offsetExists($name))\n\t\t\t{\n\t\t\t\t$data->label($name, $field->label);\n\n\t\t\t\tif ($field->filters)\n\t\t\t\t{\n\t\t\t\t\t$data->filters($name, $field->filters);\n\t\t\t\t}\n\n\t\t\t\tif ($field->rules)\n\t\t\t\t{\n\t\t\t\t\t$data->rules($name, $field->rules);\n\t\t\t\t}\n\n\t\t\t\tif ($field->callbacks)\n\t\t\t\t{\n\t\t\t\t\t$data->callbacks($name, $field->callbacks);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( ! $data->check())\n\t\t{\n\t\t\tthrow new Validate_Exception($data);\n\t\t}\n\n\t\treturn $data->as_array();\n\t}", "title": "" }, { "docid": "0e7807d38240b6e6610ada6ba482b060", "score": "0.6646074", "text": "public function validateData($data);", "title": "" }, { "docid": "dbc52c5c5ea1c810e21484882cae6cca", "score": "0.66026545", "text": "public function validateArray()\n\t{\n\t\treturn (is_array($this->data));\n\t}", "title": "" }, { "docid": "9385bb0106a9a3e18f443756b216ddb3", "score": "0.65476197", "text": "private function ___validate_data( $data ) {\n\n\t\t\t/* Validates a dataset by its number of columns\n\t\t\t*\n\t\t\t* @param $dataset array of arrays, each one containig a row of data.\n\t\t\t* @param $min_cols Mixed integer min number of columns count in the $dataset\n\t\t\t* \tto be valid, or Boolean false if there is no column limitations. Default: false.\n\t\t\t* @param $max_cols Mixed integer max number of columns count in the $dataset\n\t\t\t* \tto be valid, or Boolean false if this number should be equal to $min_cols. Default: false.\n\t\t\t*\n\t\t\t* @return Boolean true if the dataset is valid for the given number of columns, false otherwise.\n\t\t\t*\n\t\t\t*/\n\t\t\t$validate = function ( $dataset, $min_cols = false, $max_cols = false ) {\n\t\t\t\tif ( !$max_cols ) { $max_cols = $min_cols; }\n\t\t\t\t$cols_count = array_map(function( $row ) { return count($row); }, $dataset);\n\t\t\t\tif ( 1 < count(array_unique($cols_count)) ) { return false; }\n\t\t\t\t$cols_count = array_shift($cols_count);\n\t\t\t\treturn ( (!$min_cols && !$max_cols) || ($min_cols <= $cols_count && $cols_count <= $max_cols) );\n\t\t\t};\n\n\t\t\tswitch ( $this->plotstyle ) {\n\t\t\t\tcase self::PLOTSTYLE_BOXERRORBARS:\n\t\t\t\t\treturn $validate($data, 3, 5);\n\t\t\t\tcase self::PLOTSTYLE_BOXES:\n\t\t\t\tcase self::PLOTSTYLE_FILLEDCURVES:\n\t\t\t\t\treturn $validate($data, 2, 3);\n\t\t\t\tcase self::PLOTSTYLE_BOXXYERRORBARS:\n\t\t\t\tcase self::PLOTSTYLE_XYERRORBARS:\n\t\t\t\tcase self::PLOTSTYLE_XYERRORLINES:\n\t\t\t\t\treturn $validate($data, 4) && $validate($data, 6);\n\t\t\t\tcase self::PLOTSTYLE_CANDLESTICKS:\n\t\t\t\tcase self::PLOTSTYLE_FINANCEBARS:\n\t\t\t\tcase self::PLOTSTYLE_RGBIMAGE:\n\t\t\t\t\treturn $validate($data, 5);\n\t\t\t\tcase self::PLOTSTYLE_CIRCLES:\n\t\t\t\tcase self::PLOTSTYLE_ELLIPSES:\n\t\t\t\t\treturn $validate($data, 2, 5);\n\t\t\t\tcase self::PLOTSTYLE_DOTS:\n\t\t\t\t\treturn $validate($data, 2);\n\t\t\t\tcase self::PLOTSTYLE_FILLSTEPS:\n\t\t\t\tcase self::PLOTSTYLE_FSTEPS:\n\t\t\t\tcase self::PLOTSTYLE_HISTEPS:\n\t\t\t\tcase self::PLOTSTYLE_IMPULSES:\n\t\t\t\tcase self::PLOTSTYLE_LINES:\n\t\t\t\tcase self::PLOTSTYLE_LINESPOINTS:\n\t\t\t\tcase self::PLOTSTYLE_POINTS:\n\t\t\t\tcase self::PLOTSTYLE_STEPS:\n\t\t\t\t\treturn $validate($data, 1, 2);\n\t\t\t\tcase self::PLOTSTYLE_HISTOGRAM:\n\t\t\t\t\treturn $validate($data, 1);\n\t\t\t\tcase self::PLOTSTYLE_IMAGE:\n\t\t\t\tcase self::PLOTSTYLE_LABELS:\n\t\t\t\t\treturn $validate($data, 3);\n\t\t\t\tcase self::PLOTSTYLE_PARALLELAXES:\n\t\t\t\t\treturn $validate($data);\n\t\t\t\tcase self::PLOTSTYLE_RGBALPHA:\n\t\t\t\t\treturn $validate($data, 6);\n\t\t\t\tcase self::PLOTSTYLE_VECTORS:\n\t\t\t\t\treturn $validate($data, 4);\n\t\t\t\tcase self::PLOTSTYLE_XERRORBARS:\n\t\t\t\tcase self::PLOTSTYLE_XERRORLINES:\n\t\t\t\tcase self::PLOTSTYLE_YERRORLINES:\n\t\t\t\t\treturn $validate($data, 3, 4);\n\t\t\t\tcase self::PLOTSTYLE_YERRORBARS:\n\t\t\t\t\treturn $validate($data, 2, 4);\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "f562e0e9d4664707cbb3995f85ae5ea5", "score": "0.65192", "text": "public static function multiple(array $data, array $keys, Closure $failCallback): void\n {\n if (empty($rules)) return;\n $checker = self::createChecker();\n if (empty($data)) {\n $checker->error('data is empty for check');\n }\n foreach ($keys as $k => $setting) {\n $val = Arr::get($data, $k);\n foreach ($setting as $act => $req) {\n switch ($act) {\n case 'required':\n if ($req) {\n if (!Arr::get($data, $k)) {\n $checker->error(\"{$k} unset\");\n }\n }\n break;\n case 'type':\n switch ($req) {\n case 'numeric':\n case 'number':\n case 'float':\n $min = $req['min'] ?? 0;\n $max = $req['max'] ?? 99999;\n if (!is_numeric($val)) {\n $checker->error(\"{$k} is not a numeric\");\n } else if ($val < $min) {\n $checker->error(\"{$k} is less than {$min}\");\n } else if ($val > $max) {\n $checker->error(\"{$k} is greater than {$max}\");\n }\n break;\n case 'integer':\n case 'int':\n $val2 = floor($val);\n $min = $req['min'] ?? 0;\n $max = $req['max'] ?? 99999;\n if ($val2 != $val) {\n $checker->error(\"{$k} is not integer\");\n } else if ($val2 < $min) {\n $checker->error(\"{$k} is less than {$min}\");\n } else if ($val2 > $max) {\n $checker->error(\"{$k} is greater than {$max}\");\n }\n break;\n case 'array':\n if (!is_array($val)) {\n $checker->error(\"{$k} is not a array\");\n }\n break;\n default:\n break;\n }\n break;\n default:\n break;\n }\n }\n }\n $checker->callback($failCallback);\n }", "title": "" }, { "docid": "9bfe13561f7b100f7f86f7156ba858b1", "score": "0.64979386", "text": "public function validate(array $post_data = []): ValidateResult\n {\n //return $this->getValidator()->validate($post_data);\n $this->data = $post_data;\n return $this->getValidator()->validate($this);\n }", "title": "" }, { "docid": "828f8b1fcd17ea0f508c5a1362a72a52", "score": "0.64835954", "text": "function validate($data, $validation) {\n\t\t$error = [];\n\n\t\tforeach ($validation as $key => $value) {\n\t\t\t\n\t\t\t$valid = isset($data[$key]);\n\t\t\t// check if this data value is set = valid\n\t\t\tif ($valid) {\n\t\t\t\t// if it's valid, then base on type, check what kind of validation it's required\n\t\t\t\tif (isset($value['type'])) {\n\t\t\t\t\t$function = \"validate_{$value['type']}\";\n\t\t\t\t\t// find the function with equal name of the type validation\n\t\t\t\t\tif (function_exists($function)) {\n\t\t\t\t\t\t// call the function for that type\n\t\t\t\t\t\t$valid = $function($data[$key], $value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!$valid) {\n\t\t\t\t// the data isn't sets, so display an error for each value\n\t\t\t\t$error[$key] = isset($value['msg']) ? $value['msg'] : 'Please enter a value';\n\t\t\t}\n\t\t}\n\t\treturn $error;\n\t}", "title": "" }, { "docid": "cb641653951264af4bc20020cf5ca3aa", "score": "0.6482955", "text": "public static function validate(&$arr) {\n\n $errors = array();\n $data = array();\n\n // Using the filter_input function introduced in PHP 5.2.0\n\n /* if (!($data['email'] = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL))) {\n $errors['email'] = 'Please enter a valid Email.';\n } */\n\n if (!($data['url'] = filter_input(INPUT_POST, 'url', FILTER_VALIDATE_URL))) {\n // If the URL field was not populated with a valid URL,\n // act as if no URL was entered at all:\n\n $url = '';\n }\n\n // Using the filter with a custom callback function:\n\n if (!($data['comment'] = filter_input(INPUT_POST, 'comment', FILTER_CALLBACK, array('options' => 'Comment::validate_text')))) {\n $errors['comment'] = 'Please enter a comment body.';\n }\n\n if (!($data['name'] = filter_input(INPUT_POST, 'name', FILTER_CALLBACK, array('options' => 'Comment::validate_text')))) {\n //$errors['name'] = 'Please enter a name.';\n } \n\n if (!empty($errors)) {\n\n // If there are errors, copy the $errors array to $arr:\n\n $arr = $errors;\n return false;\n }\n\n // If the data is valid, sanitize all the data and copy it to $arr:\n\n foreach ($data as $k => $v) {\n $arr[$k] = mysql_real_escape_string($v);\n }\n\n // Ensure that the email is lower case:\n// $arr['email'] = strtolower(trim($arr['email']));\n\n return true;\n }", "title": "" }, { "docid": "9b856a02f6ea2436815d56280b69e8c2", "score": "0.6430992", "text": "public function isValid($data)\n {\n $valid = true;\n $error = array();\n if (!empty($data)) {\n $dataArray = json_decode($data);\n if ($dataArray) {\n // Check required elements\n foreach($this->required as $required) {\n if (empty($dataArray->$required)) {\n $valid = false;\n $error[] = \"$required is required.\";\n }\n }\n // Check element values\n foreach ($dataArray as $key => $value) {\n if (isset($this->schema->$key)) {\n // Validate type\n $type = $this->schema->$key->type;\n switch ($type) {\n case 'string':\n if (!$this->isString($value)) {\n $valid = false;\n $error[] = \"$key is invalid. Must be a string.\";\n }\n break;\n case 'int':\n if (!$this->isInt($value)) {\n $valid = false;\n $error[] = \"$key is invalid. Must be an integer.\";\n }\n break;\n case 'email':\n if (!$this->isEmail($value)) {\n $valid = false;\n $error[] = \"$key is invalid. Must be an email in format [email protected].\";\n }\n break;\n case 'date':\n if (!$this->isDate($value)) {\n $valid = false;\n $error[] = \"$key is invalid. Must be a date in format 2014-11-22.\";\n }\n break;\n }\n // Validate minimum\n if (isset($this->schema->$key->min)) {\n $min = $this->schema->$key->min;\n if (!$this->checkMin($value, $min)) {\n $valid = false;\n $error[] = \"$key is invalid. Value must be greater than or equal to the minimum: $min\";\n }\n }\n // Validate maximum\n if (isset($this->schema->$key->max)) {\n $max = $this->schema->$key->max;\n if (!$this->checkMax($value, $max)) {\n $valid = false;\n $error[] = \"$key is invalid. Value must be less than or equal to the maximum: $max\";\n }\n }\n }\n }\n } else {\n $valid = false;\n $error[] = \"Data invalid: $data\";\n }\n } else {\n $valid = false;\n $error[] = \"Data is empty.\";\n }\n return json_encode(array('valid' => $valid, 'error' => $error));\n }", "title": "" }, { "docid": "74e7788e97a4c30f476e42afd25d0840", "score": "0.6430332", "text": "function invalid(array $data = [], array $rules = [], array $messages = [])\n{\n $errors = [];\n\n foreach ($rules as $field => $validations) {\n $validationIndex = -1;\n\n // See: http://php.net/manual/en/types.comparisons.php\n // only false for: null, undefined variable, '', []\n $filled = isset($data[$field]) && $data[$field] !== '' && $data[$field] !== [];\n $message = $messages[$field] ?? $field;\n\n // True if there is an error message for each validation method.\n $messageArray = is_array($message);\n\n foreach ($validations as $method => $options) {\n if (is_numeric($method) === true) {\n $method = $options;\n }\n\n $validationIndex++;\n\n if ($method === 'required') {\n if ($filled) {\n // Field is required and filled.\n continue;\n }\n } elseif ($filled) {\n if (is_array($options) === false) {\n $options = [$options];\n }\n\n array_unshift($options, $data[$field] ?? null);\n\n if (V::$method(...$options) === true) {\n // Field is filled and passes validation method.\n continue;\n }\n } else {\n // If a field is not required and not filled, no validation should be done.\n continue;\n }\n\n // If no continue was called we have a failed validation.\n if ($messageArray) {\n $errors[$field][] = $message[$validationIndex] ?? $field;\n } else {\n $errors[$field] = $message;\n }\n }\n }\n\n return $errors;\n}", "title": "" }, { "docid": "d0af7efd6ec771c49d4dfe92c58d00ae", "score": "0.6425208", "text": "public function validateData($data) { }", "title": "" }, { "docid": "be6cf359fe413cbb7e204df9d474c63b", "score": "0.6374581", "text": "public function validation($data, $files) {\n $errors = parent::validation($data, $files);\n\n $answers = $data['answer'];\n $answercount = 0;\n $numberofcorrectanswers = 0;\n foreach ($answers as $key => $answer) {\n $trimmedanswer = trim($answer['text']);\n if (empty($trimmedanswer)) {\n continue;\n }\n\n $answercount++;\n if (!empty($data['correctanswer'][$key])) {\n $numberofcorrectanswers++;\n }\n }\n\n // Perform sanity checks on number of correct answers.\n if ($numberofcorrectanswers == 0) {\n $errors['answer[0]'] = get_string('errnocorrect', 'qtype_multichoiceset');\n }\n\n // Perform sanity checks on number of answers.\n if ($answercount == 0) {\n $errors['answer[0]'] = get_string('notenoughanswers', 'qtype_multichoice', 2);\n $errors['answer[1]'] = get_string('notenoughanswers', 'qtype_multichoice', 2);\n } else if ($answercount == 1) {\n $errors['answer[1]'] = get_string('notenoughanswers', 'qtype_multichoice', 2);\n }\n\n return $errors;\n }", "title": "" }, { "docid": "7c285d47f2f453cf318d072c66f06ab1", "score": "0.6371005", "text": "public function validateData()\n {\n try {\n $this->rows = $this->getData();\n $rows = $this->rows;\n $this->getHeader();\n\n foreach ($rows as $rowData) {\n $fieldErrors = [];\n\n if (empty($rowData['first_name']) === true || ctype_alpha($rowData['first_name']) === false) {\n $fieldErrors[] = $rowData['first_name'];\n }\n\n if (empty($rowData['last_name']) === true || ctype_alpha($rowData['last_name']) === false) {\n $fieldErrors[] = $rowData['last_name'];\n }\n if (empty($rowData['email']) === true || !filter_var($rowData['email'], FILTER_VALIDATE_EMAIL)) {\n $fieldErrors[] = $rowData['email'];\n }\n\n if (empty($rowData['password']) === true || strlen($rowData['password']) < 8) {\n $fieldErrors[] = $rowData['password'];\n }\n\n if (empty($rowData['platforms']) === true) {\n $fieldErrors[] = $rowData['platforms'];\n } else {\n // divide the platforms in the csv by the (,) Delimiter and check if there are any\n // errors in the platform.\n $platformsArray = explode(',', $rowData['platforms']);\n foreach ($platformsArray as $platform) {\n if (!in_array(trim($platform), $this->requiredPlatforms)) {\n $fieldErrors[] = $rowData['platforms'];\n }\n }\n }\n\n // if there are no field errors, we regard as valid otherwise invalid.\n if (empty($fieldErrors) === true) {\n $this->validRows[] = $rowData;\n } else {\n $this->invalidRows[] = $rowData;\n }\n }// end rows\n } catch (\\Exception $exception) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "65e40334f90453e51ad774b0a104396a", "score": "0.6343015", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'name' => 'required|max:255',\n 'game_id' => 'required',\n 'start_date' => 'required',\n 'end_date' => 'required',\n 'venue' => 'required|max:100',\n 'max_players' => 'integer'\n ]);\n }", "title": "" }, { "docid": "e5e8913772c8b6786425df0eec77732f", "score": "0.63390934", "text": "protected function validator(array $data)\n {\n //variable tipo arreglo en donde se haga el arreglo de validación final\n $out = [];\n $out['persona_id'] = 'required';\n $out['nombres'] = 'required | max:50';\n $out['apellidos'] = 'required | max:50';\n $out['genero'] = 'required';\n $out['fecha_nac'] = 'required';\n $out['direccion'] = 'max:255';\n $out['tipo_doc'] = 'required';\n $out['num_doc'] = 'required';\n $out['foto_ced'] = 'image|max:1000';\n $out['foto'] = 'image|max:150';\n\n\n\n //Hacer validación condicional dependiendo del tipo de documento a utilizar.\n switch($data['tipo_doc']){\n case 'CEDULA':\n $out['num_doc'] = 'required|digits:10 | unique:personas';\n break;\n case 'PASAPORTE':\n $out['num_doc'] = 'required|alpha_num |max:10 |min:5| unique:personas';\n break;\n }\n\n //Retornar la variable $out auxiliar\n return Validator::make($data, $out);\n }", "title": "" }, { "docid": "70da62037b12741945ea7bf0c876d6c7", "score": "0.633287", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'heure_debut' => ['required', 'datetime'],\n 'heure_fin' => ['required', 'datetime', 'after:heure_debut'],\n 'horaire_id' => ['required', 'integer'],\n 'cours_id' => ['required', 'integer'],\n 'description' => ['required', ]\n ]);\n }", "title": "" }, { "docid": "2a0336111aa34194e9d5c33dba78fbf3", "score": "0.6322725", "text": "function array_validate_items( $callback, $array ) {\n\t$is_valid = true;\n\n\t// Loop through each array item that needs to be validated.\n\tforeach ( $array as $item ) {\n\n\t\t// Validates the array item with the provided callback.\n\t\tif ( ! call_user_func( $callback, $item ) ) {\n\t\t\t$is_valid = false;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn $is_valid;\n}", "title": "" }, { "docid": "bf2099548bc3425198a0eeeb1878dbf7", "score": "0.6322456", "text": "public function rules(Array $data)\n {\n $rightAnswers = $this->getRightAnswers();\n\n $rules = [];\n\n foreach ($rightAnswers as $key => $answer) {\n $rules['answers.'.$key] = ['required', 'in:'.$answer];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "f4882bef5d0f4a00d8095e28087fe357", "score": "0.63205665", "text": "public static function validate(&$arr)\n {\n\n $errors = array();\n $data = array();\n\n // Using the filter_input function introduced in PHP 5.2.0\n\n if(!($data['email'] = filter_input(INPUT_POST,'email',FILTER_VALIDATE_EMAIL)))\n {\n $errors['email'] = 'Please enter a valid Email.';\n }\n\n if(!($data['url'] = filter_input(INPUT_POST,'url',FILTER_VALIDATE_URL)))\n {\n // If the URL field was not populated with a valid URL,\n // act as if no URL was entered at all:\n\n $url = '';\n }\n\n // Using the filter with a custom callback function:\n\n if(!($data['body'] = filter_input(INPUT_POST,'body',FILTER_CALLBACK,\n array('options'=>'Comment::validate_text'))))\n {\n $errors['body'] = 'Please enter a comment body.';\n }\n\n if(!($data['name'] = filter_input(INPUT_POST,'name',FILTER_CALLBACK,\n array('options'=>'Comment::validate_text'))))\n {\n $errors['name'] = 'Please enter a name.';\n }\n\n if(!empty($errors)){\n\n // If there are errors, copy the $errors array to $arr:\n\n $arr = $errors;\n return false;\n }\n\n // If the data is valid, sanitize all the data and copy it to $arr:\n\n foreach($data as $k=>$v){\n $arr[$k] = mysql_real_escape_string($v);\n }\n\n // Ensure that the email is in lower case (for a correct gravatar hash):\n $arr['email'] = strtolower(trim($arr['email']));\n\n return true;\n\n }", "title": "" }, { "docid": "e413782578f337c8c70bf411931bffc0", "score": "0.63114965", "text": "private function validateEmployeeInput($dataArray)\n {\n $this->validate($dataArray,[\n 'name'=>'required',\n 'phone'=>'required',\n 'email'=>'required|email',\n 'role'=>'required'\n ]);\n }", "title": "" }, { "docid": "a38c6f56491588032273e235117a5bd8", "score": "0.62909174", "text": "protected function validator(array $data)\n {\n\n return Validator::make($data, [\n 'rating' => 'required|numeric',\n 'body' => 'required'\n ]);\n }", "title": "" }, { "docid": "385f055acb5f3edcb8007e983c511828", "score": "0.62887675", "text": "protected function _validateUserData(array $userData)\n {\n $userRules = [\n 'firstName' => 'required|string',\n 'lastName' => 'required|string',\n 'email' => 'required|email',\n 'password' => 'required|string',\n 'fbUserId' => 'sometimes',\n 'metadata' => 'sometimes|array',\n 'referrer' => 'sometimes|string',\n ];\n \\ValidationHelper::validate($userData, $userRules);\n\n if (isset($userData['metadata'])) {\n $metadataRules = [\n 'subscriptionId' => 'required|integer',\n 'paymentPlanId' => 'required|integer',\n 'profile' => 'required|array',\n ];\n \\ValidationHelper::validate($userData['metadata'], $metadataRules);\n\n $metadataProfileRules = [\n 'name' => 'required|alpha_space_dash',\n 'gender' => 'required|in:male,female',\n 'shirtSize' => 'required|integer',\n ];\n \\ValidationHelper::validate($userData['metadata']['profile'], $metadataProfileRules);\n }\n }", "title": "" }, { "docid": "490c429bde8019ee93cdb87e2032097d", "score": "0.6275141", "text": "function checkValidInput($array)\n{\n\n}", "title": "" }, { "docid": "0c7eae9a6dc8acca718df25806704789", "score": "0.62678635", "text": "function validate($data) {\n\t\t$errors = array();\n\t\t\n\t\tforeach (array_keys($this->_columns) as $key) {\n\t\t\t$name = $this->_columns[$key]->getName();\n\t\t\tif (isset($data[$name])) {\n\t\t\t\tif (null !== ($error = $this->_columns[$key]->validate($data[$name])))\n\t\t\t\t\t$errors[$name] = $error;\n\t\t\t}\n\t\t\telse if ($this->_columns[$key]->isRequired())\n\t\t\t\t$errors[$name] = SyndLib::translate(\"Field '%s' is required\", SyndLib::translate($name));\n\t\t}\n\t\t\n\t\treturn $errors;\n\t}", "title": "" }, { "docid": "34e227c41a7bce7563c4b72d29663294", "score": "0.6258838", "text": "public function validate(array $data)\n {\n $rules = $this->rules($data);\n $validator = $this->validator->make($data, $rules);\n\n if ($validator->fails()) {\n throw new WrongQuizAnswersException($validator);\n }\n\n return true;\n }", "title": "" }, { "docid": "f511e8092e8b3bd371cbb1d7e7649659", "score": "0.6253869", "text": "protected function validator(array $data) {\n return Validator::make($data, [\n 'name' => ['required', 'string', 'max:255'],\n 'program_id' => ['required'],\n 'county_id' => ['required'],\n 'age' => ['required', 'numeric', 'max:40', 'min:16'],\n 'gender' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'phoneNumber' => ['required', 'numeric', 'digits_between:10,10', 'unique:users'],\n 'password' => ['required', 'string', 'min:8', 'confirmed'],\n ]);\n }", "title": "" }, { "docid": "01f1cf609336ce00aaeea52904378115", "score": "0.6244848", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'ach_pseudo' => 'required|string|max:255',\n 'ach_mel' => 'required|string|email|max:255|unique:t_e_acheteur_ach',\n 'ach_motpasse' => 'required|string|min:6|confirmed',\n 'ach_telportable' =>\n array(\n 'required', 'regex:/(06|07)[0-9]{8}/'),\n 'ach_telfixe' => 'nullable|min:10|max:10',\n 'ach_codePostal' => \n array(\n 'required', 'regex:/^[0-9]{5}$/')\n ]);\n }", "title": "" }, { "docid": "9f7ab88606f07ef858148e9d67c61c97", "score": "0.6242531", "text": "private function check_fields ( array $data ) {\n $ruleset = $this->validation_rules ();\n $mismatch = array_diff_key ( $data , $ruleset );\n $fields = array_keys ( $mismatch );\n\n foreach ( $fields as $field ) {\n $this->errors[] = array (\n 'field' => $field ,\n 'value' => $data[$field] ,\n 'rule' => 'mismatch' ,\n 'param' => null ,\n );\n }\n }", "title": "" }, { "docid": "37038900912382354c252fb001f75286", "score": "0.62413913", "text": "public function validation($data, $files) {\n $errors = parent::validation($data, $files);\n\n if (!array_key_exists('data', $data) or count($data['data']) < 2) {\n return $errors;\n }\n\n $possibles = 0;\n $ratings = $data['data'];\n foreach ($ratings as $rating) {\n if ($rating['rating'] > 0) {\n $possibles++;\n }\n }\n if ($possibles < 2) {\n foreach ($ratings as $gid => $rating) {\n if ($rating['rating'] == 0) {\n $errors['data[' . $gid . '][rating]'] = get_string('at_least_two', 'groupdistribution');\n }\n }\n }\n return $errors;\n }", "title": "" }, { "docid": "cba75f82fec8b44e05f773a975cbfd72", "score": "0.6239545", "text": "function validation($data, $files) {\n global $CFG, $DB, $USER;\n \n return array();\n }", "title": "" }, { "docid": "cba75f82fec8b44e05f773a975cbfd72", "score": "0.6239545", "text": "function validation($data, $files) {\n global $CFG, $DB, $USER;\n \n return array();\n }", "title": "" }, { "docid": "cba75f82fec8b44e05f773a975cbfd72", "score": "0.6239545", "text": "function validation($data, $files) {\n global $CFG, $DB, $USER;\n \n return array();\n }", "title": "" }, { "docid": "10f46fd4c8875aa6f111f6f28e2019e7", "score": "0.6236019", "text": "public function validate($input, $data)\n {\n foreach ($data as $field => $requirements) {\n foreach ($requirements as $requirement => $value) {\n\n if ( ! empty($input)) {\n switch ($requirement) {\n case 'required':\n if (empty($input[$field]) & $value !== false) {\n $this->addError($field, $field . ' is required');\n }\n break;\n case 'max':\n if (strlen($input[$field]) >= $value) {\n $this->addError($field, $field . ' has to be less than ' . $value . ' characters');\n }\n break;\n case 'min':\n if (strlen($input[$field]) <= $value) {\n $this->addError($field, $field . ' has to be more than ' . $value . ' characters');\n }\n break;\n case 'unique':\n $data = DB::getInstance()->select($value, [$field])->where([\n [\n $field,\n '=',\n $input[$field]\n ]\n ])\n ->get();\n\n if ( ! empty($data) && $data[0]->$field == $input[$field]) {\n $this->addError($field, $field . ' already exists');\n }\n }\n }\n }\n }\n\n if (empty($this->errors())) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "124fb3302dbfb7111efa0fd8676cfaa2", "score": "0.6218987", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'name' => 'required|string|max:255',\n 'description' => 'required|string',\n 'release_date' => 'required|date',\n 'ticket_price' => 'required|numeric',\n 'country' => 'required|string',\n 'photo' => 'required|string',\n 'rating' => 'required|numeric|max:5',\n 'genre' => 'required|json',\n ]);\n }", "title": "" }, { "docid": "d75c00c5ba1afb6fafe5d465ad40a3a2", "score": "0.6212156", "text": "public function validator(array $data)\n {\n return Validator::make($data, [\n 'uid' => 'required|unique:users',\n 'first_name' => 'required|max:100',\n 'last_name' => 'required|max:100',\n 'email' => 'required|email|max:255|unique:users',\n 'batch' => 'required',\n 'birth_date' => 'required',\n 'gender' => 'required',\n 'image' => 'required|mimes:png,jpg,jpeg',\n 'password' => 'required|confirmed|min:5',\n ]);\n }", "title": "" }, { "docid": "5ab61332c2db8f5b3f4d34fccfc9f273", "score": "0.6206907", "text": "public static function validator(array $data)\n {\n return Validator::make($data, array(\n 'social_network_id' => 'required',\n //'order' => 'required',\n 'url' => 'required'\n ));\n }", "title": "" }, { "docid": "554440917ba2860df35475ecc274c00b", "score": "0.6196615", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'name' => 'required',\n 'start_date' => 'required|date',\n 'end_date' => 'required|date|after_or_equal:start_date',\n 'final_close_date' => 'required|date|after_or_equal:end_date',\n ]);\n }", "title": "" }, { "docid": "0161a407df706ddeb108a4d3d91ab425", "score": "0.6190409", "text": "protected function validator(array $data)\n {\n return Validator::make($data,\n [\n 'lastname' => ['required', 'string', 'max:10'],\n 'firstname' => ['required', 'string', 'max:10'],\n 'gender' => 'required',\n ]);\n\n }", "title": "" }, { "docid": "0503061e28e56d4f1eecb6ac5b75c6a1", "score": "0.61850333", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'password' => ['required', 'string', 'min:8', 'confirmed'],\n 'dob' => ['required','date_format:d/m/Y'],\n 'datejoin' => ['required','date_format:d/m/Y']\n\n ]);\n }", "title": "" }, { "docid": "f48cfd328f82bd4294db615df6ee6223", "score": "0.61763805", "text": "protected function validateData($data) {\r\n\t\t$fieldsRules = $this->rules;\r\n\t\tforeach ($data as $field => $value) {\r\n\t\t\tif (empty($fieldsRules[$field])) throw new \\Exception(\"{$field} not exist in {$this->name} table\");\r\n\t\t\t$rules = $fieldsRules[$field];\r\n\t\t\tif (empty($rules)) { continue; }\r\n\t\t\t$value = trim($value);\r\n\r\n\t\t\tforeach ($rules as $rule => $cond) {\r\n\t\t\t\tif (!is_string($rule)) { $rule = $cond; }\r\n\t\t\t\tif ($rule === 'default') { continue; }\r\n\t\t\t\tif ($rule === \"type\") {\r\n\t\t\t\t\tif (!$this->validateValue($value, $cond)) {\r\n\t\t\t\t\t\treturn \"Invalid form data - $field is not $cond\";\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if ($rule === \"length\") {\r\n\t\t\t\t\t$len = strlen($value);\r\n\t\t\t\t\tif ($len < $cond[0] || $len > $cond[1]) {\r\n\t\t\t\t\t\treturn \"Invalid form data \".$field;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if ($rule === \"isUnique\" && $cond) {\r\n\t\t\t\t\tif ($this->count(\"{$field} = '{$value}'\")) {\r\n\t\t\t\t\t\treturn ucfirst($field).\" already exist!\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "795ef317a0db0c26bd2c021fd1bc311a", "score": "0.6170602", "text": "public static function validatePerson_Web_Address_DataForArrayConstraintsFromSetPerson_Web_Address_Data(array $values = array())\n {\n $message = '';\n $invalidValues = [];\n foreach ($values as $person_Web_Address_Information_DataTypePerson_Web_Address_DataItem) {\n // validation for constraint: itemType\n if (!$person_Web_Address_Information_DataTypePerson_Web_Address_DataItem instanceof \\WorkdayWsdl\\\\StructType\\Person_Web_Address_DataType) {\n $invalidValues[] = is_object($person_Web_Address_Information_DataTypePerson_Web_Address_DataItem) ? get_class($person_Web_Address_Information_DataTypePerson_Web_Address_DataItem) : sprintf('%s(%s)', gettype($person_Web_Address_Information_DataTypePerson_Web_Address_DataItem), var_export($person_Web_Address_Information_DataTypePerson_Web_Address_DataItem, true));\n }\n }\n if (!empty($invalidValues)) {\n $message = sprintf('The Person_Web_Address_Data property can only contain items of type \\WorkdayWsdl\\\\StructType\\Person_Web_Address_DataType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));\n }\n unset($invalidValues);\n return $message;\n }", "title": "" }, { "docid": "f3b63f33f054b5084027d45a10cc4456", "score": "0.61601543", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'first_name' => ['required', 'string', 'max:255'],\n 'last_name' => ['required', 'string'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users,email,' . Auth::user()->id],\n 'phone' => ['required', 'max:14', 'regex:/^([0-9\\s\\-\\+\\(\\)]*)$/', 'unique:users,phone,' . Auth::user()->id],\n 'address' => ['required', 'string'],\n 'dob' => ['required', 'before_or_equal:' . date('Y-m-d')]\n ]);\n }", "title": "" }, { "docid": "4924637743368eec5ef09961c7584b82", "score": "0.61566633", "text": "public static function validate($data = [])\n {\n // Prepare the validation rules & messages.\n list($rules, $messages) = static::validations();\n\n // Make validator instance.\n $validator = FluentValidator::make($data, $rules, $messages);\n\n // Add conditional validations if there's any.\n $validator = static::conditionalValidations($validator);\n\n // Validate and process response.\n if ($validator->validate()->fails()) {\n wp_send_json_error(['errors' => $validator->errors()], 422);\n }\n\n return true;\n }", "title": "" }, { "docid": "71dd3373e9d3c4afe6aecbb8c37f5204", "score": "0.6133338", "text": "protected function validator(array $data)\n {\n $message = [\n 'numeric' => '数据不能为空',\n 'required' => '数据不合法',\n ];\n\n return Validator::make($data, [\n 'endTime' => 'required|numeric',\n 'startTime' => 'required|numeric',\n\n ], $message);\n }", "title": "" }, { "docid": "9c3f5f6a5c391292c9a6c99a16855a1c", "score": "0.6128547", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'descricao' => 'required|string|max:255',\n 'hash' => 'required|string|max:255',\n 'preco' => 'required|integer|min:0',\n ]);\n }", "title": "" }, { "docid": "c82ac99d83b4ef35486eaf582e736f22", "score": "0.6128459", "text": "public function validateInput() \n\t{\n\t\t$notFiltered = array();\n\t\t//Get names of all fields that have been validated\n\t\t$tested = array_keys($this->_filterArgs);\n\t\t// Loop through the required fields\n\t\t// Add any missing ones to the $notFiltered array\n\t\tforeach($this->_required as $field) {\n\t\t\tif (!in_array($field, $tested)) {\n\t\t\t\t$notFiltered[] = $field;\n\t\t\t}\n\t\t}\n\t\t//If any items have been added to the $notFiltered array, it means a \n\t\t// required item hasn't been validated, so throw an exception\n\t\tif ($notFiltered) {\n\t\t\tthrow new Exception('No filter has been set for the following required item(s): ' . implode(',', $notFiltered));\n\t\t}\n\t\t// Apply the validation tests using filter_input_array()\n\t\t$this->_filtered = filter_input_array($this->_inputType, $this->_filterArgs);\n\t\t\n\t\t//Now find items that failed validation\n\t\tforeach($this->_filtered as $key => $value) {\n\t\t\t//skip items that used the isBool() method\n\t\t\t//Also skip any that either missing or not required\n\t\t\tif(in_array($key, $this->_booleans) || in_array($key, $this->_missing) || !in_array($key, $this->_required)) \n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t//If the filtered value is false, it failed validation,\n\t\t\t\t//so add it to the $errors array\n\t\t\t\telseif($value === false) {\n\t\t\t\t\t$this->_errors[$key] = ucfirst($key) . ': invalid data supplied';\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Return validated input as array\n\t\t\treturn $this->_filtered;\n\t}", "title": "" }, { "docid": "c85f93c1f3ea07de79244a190c26abe9", "score": "0.6126931", "text": "public function validateData() {\n\t\tif( !$this->__items ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tforeach($this->__items as $d) {\n\t\t\tif( !$d->_validateItem() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "de3bfe3395a9a26307824621154edc24", "score": "0.6120812", "text": "function validate(&$arrFieldList, &$arrData, &$valid, &$fatal) {\r\t\r\t\tinclude_once(\"iep_function_validate.inc\");\r\r\t\twhile (list($fieldName, $value) = each($arrFieldList)) {\r\t\t\tif ($func = $arrFieldList[$fieldName][0]) {\r\t\t\t\tif (method_exists($this, \"$func\")) {\r\t\t\t\t\t$this->$func($fieldName, $arrData[$fieldName], $arrFieldList[$fieldName][1], $arrFieldList[$fieldName][2], $arrFieldList[$fieldName][3], $arrData);\r\t\t\t\t} else {\r\t\t\t\t\t$func($fieldName, $arrData[$fieldName], $arrFieldList[$fieldName][1], $arrFieldList[$fieldName][2], $arrFieldList[$fieldName][3], $arrData, $this->arrIssues, $this->arrIssuesFatal);\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\t\r\t\t$valid = true;\r\t\t$fatal = false;\r\t\t\r\t\tif (count($this->arrIssues) || count($this->arrIssuesFatal)) {\r\t\t\t$valid = false;\r\t\t\tif (count($this->arrIssuesFatal)) {\r\t\t\t\t$fatal = true;\r\t\t\t}\r\t\t}\r\t}", "title": "" }, { "docid": "aa2a7b313df5f158b857ca6301fa0348", "score": "0.6120452", "text": "protected function ensureAllInRules(array $data)\n {\n $rules = $this->rules();\n\n $invalid = array_diff_key($data, $rules);\n\n if (!empty($invalid)) {\n throw new ValidationFailed(new MessageBag([\n 'Invalid keys found in request.',\n ]));\n }\n\n return $this;\n }", "title": "" }, { "docid": "7539563a196f77941278b09ecab1e2c9", "score": "0.6114302", "text": "public static function validate(&$arr)\n\t{\n\t\t\n\t\t$errors = array();\n\t\t$data\t= array();\n\t\t\n\t\t// Using the filter_input function introduced in PHP 5.2.0\n\t\t// Using the filter with a custom callback function:\n\t\t\n\t\tif(!($data['comment'] = filter_input(INPUT_POST,'comment',FILTER_CALLBACK,array('options'=>'Comment::validate_text'))))\n\t\t{\n\t\t\t$errors['comment'] = 'Please enter a comment body.';\n\t\t}\n\t\t\n\t\tif(!empty($errors)){\n\t\t\t\n\t\t\t// If there are errors, copy the $errors array to $arr:\n\t\t\t\n\t\t\t$arr = $errors;\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// If the data is valid, sanitize all the data and copy it to $arr:\n\t\t\n\t\tforeach($data as $k=>$v){\n\t\t\t$arr[$k] = mysql_real_escape_string($v);\n\t\t}\n\t\t\n\t\treturn true;\n\t\t\n\t}", "title": "" }, { "docid": "8b8fd23cf1a638415fc6e7ba79507cef", "score": "0.6103855", "text": "public function validate($arrayRules){\n\n\t\t\t$response = array(\n\t\t\t\t\t\t\t\"errors\" => 0,\n\t\t\t\t\t\t\t\"msg\" => array()\n\t\t\t\t\t\t);\n\n\t\t\tforeach ($arrayRules as $key => $rule) {\n\n\t\t\t\tif(empty($rule[3])){\n\t\t\t\t\t$rule[3] = null;\n\t\t\t\t}\n\n\t\t\t\tif(empty($rule[4])){\n\t\t\t\t\t$rule[4] = null;\n\t\t\t\t}\n\n\n\t\t\t\tforeach ($rule[1] as $keyValue => $value) {\n\t\t\t\t\n\t\t\t\t\tif(!$this->validateRules($rule[0], $value, $rule[3])){\n\n\t\t\t\t\t\t$response[\"errors\"] = $response[\"errors\"] + 1;\n\t\t\t\t\t\tarray_push($response[\"msg\"], $this->errorMsg($key, $rule[2][$keyValue], $rule[4]));\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn $response;\n\n\t\t}", "title": "" }, { "docid": "e01d967b1c496eedb127935185779063", "score": "0.6096277", "text": "protected function validator(array $data) {\n return Validator::make($data, [\n 'title' => ['required', 'string', 'max:255'],\n 'slug' => ['required', 'string', 'max:255'],\n 'image' => ['required', 'string', 'url', 'max:255'],\n 'content' => ['required', 'string'],\n 'published' => [],\n ]);\n }", "title": "" }, { "docid": "8da1d899f98adbad5354b4412b63591b", "score": "0.6094944", "text": "function validates ($data=null) {\n\t\t$errors = count($this->invalidFields($data? $data: $this->data));\n\n\t\treturn $errors == 0;\n\t}", "title": "" }, { "docid": "05993ec86736b51bd3ed4c1c71287370", "score": "0.60812175", "text": "public function validate($data)\n {\n }", "title": "" }, { "docid": "07d0d318f93d59dd7979c8b02c1c76e1", "score": "0.6080526", "text": "public function validFields(array $data)\n {\n $allow = $this->model->getFillable();\n $data = array_filter($data, function ($key) use($allow) {\n return in_array($key, $allow);\n }, ARRAY_FILTER_USE_KEY);\n\n return $data;\n }", "title": "" }, { "docid": "70de8fb07cf88e29ee4e7cb2e8f2f133", "score": "0.60799736", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'member_id' => ['required'],\n //'sponsor_id' => ['exclude_if:upline_id,false|required'],\n 'sponsor_id' => ['required_if:upline_id,false'],\n 'upline_id' => ['required_if:sponsor_id,false'],\n ]);\n }", "title": "" }, { "docid": "dd00c5dc051d0c67b19ccc0890cfb4e2", "score": "0.6075595", "text": "protected static function validateAdvisoryData(array $data): void {\n $not_blank_constraints = [\n new Type(['type' => 'string']),\n new NotBlank(),\n ];\n $collection_constraint = new Collection([\n 'fields' => [\n 'title' => $not_blank_constraints,\n 'project' => $not_blank_constraints,\n 'type' => $not_blank_constraints,\n 'link' => $not_blank_constraints,\n 'is_psa' => new Choice(['choices' => [1, '1', 0, '0', TRUE, FALSE]]),\n 'insecure' => new Type(['type' => 'array']),\n ],\n // Allow unknown fields, in the case that new fields are added to JSON\n // feed validation should still pass.\n 'allowExtraFields' => TRUE,\n ]);\n $violations = Validation::createValidator()->validate($data, $collection_constraint);\n if ($violations->count()) {\n foreach ($violations as $violation) {\n $violation_messages[] = \"Field \" . $violation->getPropertyPath() . \": \" . $violation->getMessage();\n }\n throw new \\UnexpectedValueException('Malformed security advisory: ' . implode(\",\\n\", $violation_messages));\n }\n }", "title": "" }, { "docid": "cf0ad18f48a76b2fa9e4e741b216d8ef", "score": "0.60754395", "text": "public function validate($array){\n $validator = Validator::make($array, [\n 'type' => \"required|in:text_content,image_content,table_content\",\n 'width' => \"sometimes|required|numeric\",\n 'height' => \"sometimes|required|numeric\",\n 'left' => \"sometimes|required|numeric\",\n 'top' => \"sometimes|required|numeric\",\n ]);\n if($validator->fails()){\n throw new \\RuntimeException(\"validation error\");\n } \n }", "title": "" }, { "docid": "cd0df19d5957a05791336b474d7078b6", "score": "0.60728645", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'contact_number' => ['required', 'max:10','min:10','unique:users'],\n 'office_location' => ['required'],\n 'salary' => ['required'],\n 'password' => ['required', 'string', 'min:8', 'confirmed'],\n ]);\n }", "title": "" }, { "docid": "6f03e0a5e7dc8d2711bc150d6c226427", "score": "0.6064774", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'firstname' => 'required|string|max:255',\n 'lastname' => 'required|string|max:255',\n 'gender' => 'required|string|max:255',\n 'phonenumber' => 'required|string|max:255',\n 'description' => 'required|string|max:255',\n 'qualifications' => 'required|string|max:255',\n ]);\n }", "title": "" }, { "docid": "3d97210e7182b179f8c693cfe97f9139", "score": "0.6064284", "text": "protected function validate()\n {\n //before need to ensure that the array is empty! so\n //if by mistake is not empty, it resets itself to being\n //empty once this function is run.\n $this->errors = [];\n if(is_blank($this->brand)){\n $this->errors[] = \"Brand cannot be blank.\";\n }\n if(is_blank($this->model)){\n $this->errors[] = \"Model cannot be blank.\";\n }\n //add custom validations\n return $this->errors;\n\n }", "title": "" }, { "docid": "69b594858ce0f7218668e0a41d7668c1", "score": "0.6060714", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n \n 'str_titulo' => 'required|max:255',\n 'str_video' => 'required',\n 'blb_img1' => 'required', \n 'str_post' => 'required', \n 'str_src' => 'required', \n ]);\n }", "title": "" }, { "docid": "41644282e53f2521eff5795e52eee766", "score": "0.60572", "text": "public function validate(array $raw=null)\n\t{\n\t\t/* Filter data if need exists */\n\t\tif (empty($this->_alldata))\n\t\t\t$this->filter($raw);\n\t\n\t\t/* Validate data */\n\t\tforeach ($this->_validators as $type => $validator) {\n\t\t\t// Use $this->_alldata and not $this->_data\n\t\t\t// Zend_Filter_Input validation needs to know all fields including empty ones\n\t\t\t$validated_input = new Zend_Filter_Input(null, $validator, $this->_alldata, $this->_options);\n\t\t\t// Get errors or warnings\n\t\t\tswitch ($type) {\n\t\t\t\tcase self::VALIDATOR_ERROR_RULES:\n\t\t\t\t\t$this->_errors = array_merge_recursive((array) $this->_errors, $this->_getErrorMessages($validated_input));\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::VALIDATOR_WARNING_RULES:\n\t\t\t\t\t$this->_warnings = array_merge_recursive((array) $this->_warnings, $this->_getWarningMessages($validated_input));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Exception(\"Unidentified field ({$type}) in \\$validators. Parameter \\$validators must have either/both 'errors' or 'warnings' as keys with their values being an array of validators for Zend_Filter_Input\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "3e52afeef01a3859c66751ef91cbf3dd", "score": "0.6055699", "text": "public function validate($rules, $data)\n {\n foreach ($rules as $key => $rule) {\n if (array_key_exists($key, $data)) {\n $this->requests[$key] = trim($data[$key]);\n\n $this->validateIndividual($rule, $key, $data[$key]);\n }\n }\n }", "title": "" }, { "docid": "61a7f9ed94ac8509f30cc50ef8195be3", "score": "0.60543025", "text": "protected function validator(array $data)\n { \n\n return Validator::make($data, [\n 'title'=>['required'],\n 'first_name' => ['required', 'string', 'max:255'],\n 'last_name' => ['required', 'string', 'max:255'],\n 'buisness_name' => ['required', 'string', 'max:191'],\n 'address' => ['required', 'string', 'min:20','max:191'],\n 'phone'=>['required', 'string','max:15'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'login.*' => ['required', 'string', 'min:8'],\n 'agree'=>['required'],\n 'role'=>['required'],\n 'city'=>['required'],\n 'zip_code'=>['required'],\n 'website_link'=>['required'],\n 'day'=>['required'],\n 'time'=>['required'],\n 'size'=>['required'],\n 'm_type'=>['required'],\n ]);\n\n }", "title": "" }, { "docid": "2dbfde9bb6cef47c7fbf9176a7000903", "score": "0.6051444", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'author' => ['required', 'string'],\n 'text' => ['required'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:reviews']\n ],\n [\n 'author.required' => 'Напишите свое имя',\n 'author.string' => 'Поле Телефон должно быть строчного типа',\n 'text.required' => 'Заполните свой отзыв',\n 'email.required' => 'Поле Email должно быть заполнено',\n 'email.string' => 'Поле Email должно быть строчного типа',\n 'email.unique' => 'Отзыв с таким email уже есть',\n ]);\n }", "title": "" }, { "docid": "409fed7c0d696fd7658807cf4adef1ce", "score": "0.60510635", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'staff_id' => 'required|unique:users',\n 'post' => 'required|string|max:191',\n 'scale' => 'required|string|max:1',\n 'first_name' => 'required|string|max:255',\n 'last_name' => 'required|string|max:255',\n 'gender' => 'required|string|max:6',\n 'dob' => 'required|date',\n 'department' => 'required|string|max:255',\n 'address' => 'required|string|max:255',\n 'contacts' => 'required',\n 'email' => 'required|string|email|max:255|unique:users',\n 'password' => 'required|string|min:6|confirmed',\n ]);\n }", "title": "" }, { "docid": "9613b94e0eefe93bad3fb8fb309bde75", "score": "0.6049263", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'name' => 'required|max:255',\n 'email' => 'email|max:255|unique:students',\n 'admission_number' => 'required|integer|unique:students',\n 'level' => 'required',\n 'dorm' => 'required'\n ]);\n }", "title": "" }, { "docid": "b1de0e0d11592131f3a0a1e64f7afa6a", "score": "0.60458875", "text": "public static function validateChange_Passports_and_Visas_DataForArrayConstraintsFromSetChange_Passports_and_Visas_Data(array $values = array())\n {\n $message = '';\n $invalidValues = [];\n foreach ($values as $change_Passports_and_Visas_Response_WrapperTypeChange_Passports_and_Visas_DataItem) {\n // validation for constraint: itemType\n if (!$change_Passports_and_Visas_Response_WrapperTypeChange_Passports_and_Visas_DataItem instanceof \\WorkdayWsdl\\\\StructType\\Change_Passports_and_Visas_Business_Process_DataType) {\n $invalidValues[] = is_object($change_Passports_and_Visas_Response_WrapperTypeChange_Passports_and_Visas_DataItem) ? get_class($change_Passports_and_Visas_Response_WrapperTypeChange_Passports_and_Visas_DataItem) : sprintf('%s(%s)', gettype($change_Passports_and_Visas_Response_WrapperTypeChange_Passports_and_Visas_DataItem), var_export($change_Passports_and_Visas_Response_WrapperTypeChange_Passports_and_Visas_DataItem, true));\n }\n }\n if (!empty($invalidValues)) {\n $message = sprintf('The Change_Passports_and_Visas_Data property can only contain items of type \\WorkdayWsdl\\\\StructType\\Change_Passports_and_Visas_Business_Process_DataType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));\n }\n unset($invalidValues);\n return $message;\n }", "title": "" }, { "docid": "14824d12e956ce2c6513c6fa31dfea93", "score": "0.6043347", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'vacosa_id' => 'required|exists:vacosa.id',\n 'participante_id' => 'required|exists:user.id',\n 'valor' => 'required|numeric|min:10',\n ]);\n }", "title": "" }, { "docid": "9f984c3bb6faa36316b6b4cf25288332", "score": "0.6037982", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'name' => 'required|between:1,50|regex:/^[a-zA-Z0-9\\s-]+$/'\n ]);\n }", "title": "" }, { "docid": "754a878937e6287373d0e8eb5014c659", "score": "0.60374427", "text": "public function validateSave(array $input);", "title": "" }, { "docid": "bb7bb8792e55d4b46bbc4d50c353b162", "score": "0.60365325", "text": "protected function validator(array $data)\n {\n return \\Validator::make($data, [\n 'job_number' => 'required|string',\n ]);\n }", "title": "" }, { "docid": "fd66128648a36960a2947af0a9a6bc12", "score": "0.6028079", "text": "protected function validator(array $data)\n {\n return $validated = Validator::make($data, [\n 'name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'blood_group' => [\n Rule::requiredIf(function () use ($data) {\n return $data['type'] == User::TYPE_CONSUMER ? true : false;\n }),\n 'string', 'min:2', 'max:3'\n ],\n 'password' => ['required', 'string', 'min:8', 'confirmed'],\n 'type' => ['required', 'numeric'],\n ]);\n }", "title": "" }, { "docid": "448f7a974da79c04595619f0a6b12f54", "score": "0.60274506", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'first_name' => ['required', 'string', 'max:255'],\n 'last_name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:experts'],\n 'phone' => ['required', 'regex:/(0)[0-9]{10}/', 'unique:experts'],\n 'password' => ['required', 'string', 'min:6', 'confirmed'],\n 'gender' =>['required','string'],\n 'birthday' => ['required','date'],\n 'profession'=>['required','string','max:50'],\n 'employer'=>['required','string','max:50'],\n 'designation'=>['required','string','max:50'],\n \n ]);\n }", "title": "" }, { "docid": "60460f45fe9d78c3d0e121017dd369c6", "score": "0.6025351", "text": "public static function validate(&$arr){\t\t\n\t\t$errors = array();\n\t\t$data\t= array();\n\t\t$count = filter_input(INPUT_POST,'count',FILTER_DEFAULT);\n\t\t// Using the filter_input function introduced in PHP 5.2.0\n\t\t//this is used to create the database.\n\t\t$data['count'] = $count;\n\t\t$data['URI'] = filter_input(INPUT_POST,'URI',FILTER_DEFAULT);\n\t\t$data['r'] = filter_input(INPUT_POST,'r',FILTER_DEFAULT);\n\t\t$data['t'] = filter_input(INPUT_POST,'t',FILTER_DEFAULT);\n\t\t$data['o'] = filter_input(INPUT_POST,'o',FILTER_DEFAULT);\n\t\t$data['time'] = filter_input(INPUT_POST,'time',FILTER_DEFAULT);\n\n\t\tif($data['o']==6){\n\t\t\t$data['gender'] = filter_input(INPUT_POST,'q1',FILTER_DEFAULT);\n\t\t\t$data['education'] = filter_input(INPUT_POST,'q2',FILTER_DEFAULT);\n\t\t\t$data['age'] = filter_input(INPUT_POST,'age',FILTER_DEFAULT);\t\t\t\n\t\t\t$data['language'] = filter_input(INPUT_POST,'language',FILTER_DEFAULT);\n\t\t\t$data['residency'] = filter_input(INPUT_POST,'residency',FILTER_DEFAULT);\n\t\t\t$data['citizenship'] = filter_input(INPUT_POST,'citizenship',FILTER_DEFAULT);\n\t\t\t$data['ethnicity'] = filter_input(INPUT_POST,'q7',FILTER_DEFAULT);\n\n\t\t\t// $data['occupation'] = filter_input(INPUT_POST,'occupation',FILTER_DEFAULT);\n\t\t\t// debug($data['gender']);\t\t\t\n\t\t\t\n\t\t\tif($data['gender']==false){\n\t\t\t\t$errors['gender'] = 'Please select a gender.';\n\t\t\t}else{\n\t\t\t\tif($data['gender']==Other && !($data['occupation'] = filter_input(INPUT_POST,'gender-other',FILTER_CALLBACK,array('options'=>'Comment::validate_text')))){\n\t\t\t\t\t$errors['gender'] = 'Please specify your gender.';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($data['education']==false){\n\t\t\t\t$errors['education'] = '<br/>Please select your education.';\n\t\t\t}\n\t\t\t\n\t\t\tif(!($data['age'] = filter_input(INPUT_POST,'age',FILTER_CALLBACK,array('options'=>'Comment::validate_text'))))\n\t\t\t{\n\t\t\t\t$errors['age'] = 'Please enter your age.';\n\t\t\t}\n\n\n\t\t\tif(!($data['language'] = filter_input(INPUT_POST,'language',FILTER_CALLBACK,array('options'=>'Comment::validate_text'))))\n\t\t\t{\n\t\t\t\t$errors['language'] = 'Please enter your language.';\n\t\t\t}\n\t\t\t// Using the filter with a custom callback function:\n\t\t\tif(!($data['residency'] = filter_input(INPUT_POST,'residency',FILTER_CALLBACK,array('options'=>'Comment::validate_text'))))\n\t\t\t{\n\t\t\t\t$errors['residency'] = 'Please enter your residency.';\n\t\t\t}\n\n\t\t\tif(!($data['citizenship'] = filter_input(INPUT_POST,'citizenship',FILTER_CALLBACK,array('options'=>'Comment::validate_text'))))\n\t\t\t{\n\t\t\t\t$errors['citizenship'] = 'Please enter your citizenship.';\n\t\t\t}\n\n\t\t\tif($data['ethnicity']==false){\n\t\t\t\t$errors['ethnicity'] = 'Please select an ethnicity.';\n\t\t\t}else{\n\t\t\t\tif($data['ethnicity']==7 && !($data['ethnicity'] = filter_input(INPUT_POST,'ethnicity-other',FILTER_CALLBACK,array('options'=>'Comment::validate_text')))){\n\t\t\t\t\t$errors['ethnicity'] = 'Please specify your ethnicity.';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}else if($data['o']==2){\n\t\t\t$data['q1'] = filter_input(INPUT_POST,'q1',FILTER_DEFAULT);\n\t\t\t$data['q2'] = filter_input(INPUT_POST,'q2',FILTER_DEFAULT);\n\t\t\t$data['reward'] = filter_input(INPUT_POST,'reward',FILTER_DEFAULT);\n\t\t\tif($data['q1']==false){\n\t\t\t\t$errors['q1'] = 'Please select.';\n\t\t\t}\n\t\t\tif($data['q2']==false){\n\t\t\t\t$errors['q2'] = 'Please select.';\n\t\t\t}else if($data['q2']==true){\n\t\t\t\tif($data['q2']==2 && !($data['q2'] = filter_input(INPUT_POST,'reward',FILTER_CALLBACK,array('options'=>'Comment::validate_text')))){\n\t\t\t\t\t$errors['q2'] = 'Please specify your reward.';\n\t\t\t\t}\n\t\t\t}\n\t\t}else if($data['o']==3){\n\t\t\tfor($i=1;$i<22;$i++){\n\t\t\t\t$index = 'q'.$i;\n\t\t\t\t$data[$index] = filter_input(INPUT_POST,$index,FILTER_DEFAULT);\n\t\t\t\tif($data[$index]==false){\n\t\t\t\t\t$errors['part2'] = '<br/>Please finish all the questions.';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}else if($data['o']==4){\n\t\t\tfor($i=1;$i<14;$i++){\n\t\t\t\t$index = 'q'.$i;\n\t\t\t\t$data[$index] = filter_input(INPUT_POST,$index,FILTER_DEFAULT);\n\t\t\t\tif($data[$index]==false){\n\t\t\t\t\t$errors['part3'] = '<br/>Please finish all the questions.';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}else if($data['o']==5){\n\t\t\tfor($i=1;$i<17;$i++){\n\t\t\t\t$index = 'q'.$i;\n\t\t\t\t$data[$index] = filter_input(INPUT_POST,$index,FILTER_DEFAULT);\n\t\t\t\tif($data[$index]==false){\n\t\t\t\t\t$errors['part4'] = '<br/>Please finish all the questions.';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\n\t\tif($count>0){\n\t\t\t$i = 1;\n\t\t\t$index = 'dynamic'.$i;\n\t\t\t$data['dynamic'] = filter_input(INPUT_POST,$index,FILTER_CALLBACK,array('options'=>'Comment::validate_text'));\n\t\t}\n\t\tfor($i=2;$i<=$count;$i++){\n\t\t\t$index = 'dynamic'.$i;\n\t\t\t$data['dynamic'] .= '_'.filter_input(INPUT_POST,$index,FILTER_CALLBACK,array('options'=>'Comment::validate_text'));\n\t\t\t/*if(!($data['dynamic'] .= ','.filter_input(INPUT_POST,$index,FILTER_CALLBACK,array('options'=>'Comment::validate_text'))))\n\t\t\t{\n\t\t\t\t$errors['idea'] = 'Please enter ideas you added.';\n\t\t\t}*/\n\t\t}\n\t\t// debug($data['dynamic']);\t\n\t\tif(!empty($errors)){\n\t\t\t// If there are errors, copy the $errors array to $arr:\n\t\t\t$arr = $errors;\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// If the data is valid, sanitize all the data and copy it to $arr:\n\t\t\n\t\tforeach($data as $k=>$v){\n\t\t\t$arr[$k] = mysql_real_escape_string($v);\n\t\t}\n\t\t// Ensure that the email is lower case:\n\t\t// $arr['email'] = strtolower(trim($arr['email']));\n\t\t\n\t\treturn true;\n\t\t\n\t}", "title": "" }, { "docid": "f3bc7152deac6052678cbfc72da7be21", "score": "0.60228646", "text": "protected function validator(array $data)\n {\n return Validator::make($data, [\n 'title' => ['required', 'string', 'max:255', Rule::in(['Apotheker/Apothekerin', 'Arzt/Ärztin'])],\n 'username' => ['required', 'string', 'max:255', 'unique:users'],\n 'password' => ['required', 'string', 'min:8'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n\n 'honorific' => ['required', 'string', 'max:255', Rule::in(['Herr', 'Frau'])],\n 'titles' => ['nullable', 'string', 'max:255',\n Rule::in([\n 'Dipl.-Med.', 'Dr.', 'Dr. med.', 'Dr. rer. nat.', 'Dr. mult.', 'Drs.', 'Dr. Dr.',\n 'Dr. Dr. med.', 'Dipl. Ing.', 'Mag.', 'MBA', 'Ph.D.', 'Primar', 'Assoc. Prof.',\n 'Prof.', 'Prof. Dr.', 'Prof. Dr. h. c.', 'Prof. Dr. mult.', 'Prof. Dr. med.',\n 'Prof. Dr. Dr.', 'Prof. Dr. Dr. h. c.', 'Prof. Dr. Dr. h. c. mult.',\n 'Prof. Dr. Dr. med.',\n ])\n ],\n 'first_name' => ['required', 'string', 'max:255'],\n 'last_name' => ['required', 'string', 'max:255'],\n 'pharmacy' => ['required', 'string', 'max:255'],\n 'street' => ['required', 'string', 'max:255'],\n 'address' => ['nullable', 'string', 'max:255'],\n 'postal' => ['required', 'string', 'max:255'],\n 'city' => ['required', 'string', 'max:255'],\n 'phone' => ['required', 'string', 'max:255'],\n 'fax' => ['required', 'string', 'max:255'],\n\n 'file1' => ['file', 'max:6144', 'mimetypes:application/pdf,image/jpeg,image/png'],\n 'file2' => ['file', 'max:6144', 'mimetypes:application/pdf,image/jpeg,image/png'],\n 'file3' => ['file', 'max:6144', 'mimetypes:application/pdf,image/jpeg,image/png'],\n\n 'agree' => ['required'],\n 'subscribe' => ['nullable'],\n ]);\n }", "title": "" }, { "docid": "1fe3e589ee540e89c3d7996a5ceb25d9", "score": "0.6018948", "text": "protected function BaseValidator(array $data)\n {\n return Validator::make($data, [\n\n ]);\n }", "title": "" }, { "docid": "1fe3e589ee540e89c3d7996a5ceb25d9", "score": "0.6018948", "text": "protected function BaseValidator(array $data)\n {\n return Validator::make($data, [\n\n ]);\n }", "title": "" }, { "docid": "6cf4264deb2083e25102df7c6ef22290", "score": "0.60164076", "text": "public static function validateAppointment_DataForArrayConstraintsFromSetAppointment_Data(array $values = array())\n {\n $message = '';\n $invalidValues = [];\n foreach ($values as $academic_Appointee_DataTypeAppointment_DataItem) {\n // validation for constraint: itemType\n if (!$academic_Appointee_DataTypeAppointment_DataItem instanceof \\WorkdayWsdl\\\\StructType\\Academic_Appointment_Snapshot_DataType) {\n $invalidValues[] = is_object($academic_Appointee_DataTypeAppointment_DataItem) ? get_class($academic_Appointee_DataTypeAppointment_DataItem) : sprintf('%s(%s)', gettype($academic_Appointee_DataTypeAppointment_DataItem), var_export($academic_Appointee_DataTypeAppointment_DataItem, true));\n }\n }\n if (!empty($invalidValues)) {\n $message = sprintf('The Appointment_Data property can only contain items of type \\WorkdayWsdl\\\\StructType\\Academic_Appointment_Snapshot_DataType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));\n }\n unset($invalidValues);\n return $message;\n }", "title": "" }, { "docid": "85dd4f2fee9482abba94962eadccc4a0", "score": "0.6012201", "text": "public function validate_data() {\n\t\t// Check for empty required fields.\n\t\treturn $this->required_fields_set( $this->clean );\n\t}", "title": "" }, { "docid": "1b1bc2823bf6d2f5b963f0ed8fba69ba", "score": "0.60097283", "text": "protected function validator(array $data)\n {\n\n\n $validator = Validator::make($data,\n [\n 'first_name' => 'required|string|max:190',\n 'last_name' => 'required|string|max:190',\n 'email' => 'required|string|email|max:190|unique:users',\n 'password' => 'required|string|min:6|confirmed',\n 'user_type' => 'required',\n 'g-recaptcha-response'=>'required|captcha',\n ],\n [\n 'first_name.required' => 'Name required',\n 'last_name.required' => 'Name required',\n 'email.required' => 'Email is required',\n 'email.email' => 'Email is invalid',\n 'user_type.required' => 'User type is required',\n 'password.required' => 'Password is required',\n 'password.min' => 'Password needs to have at least 6 characters',\n 'password.max' => 'Password maximum length is 20 characters',\n 'g-recaptcha-response.required' => 'Captcha is required',\n ]\n );\n\n return $validator;\n\n \n }", "title": "" }, { "docid": "fc396b65679de335508426936d7d78e8", "score": "0.60090196", "text": "protected function validator(array $data)\n {\n $message = array(\n \"name.required\"=> \":attribute : 不能为空\",\n \"name.min\"=> \":attribute : 不能小于2个字\",\n \"name.max\"=> \":attribute : 不能超过50个字\",\n \"email.required\"=>\":attribute : 不能为空\",\n \"email.unique\"=>\":attribute : 已被注册\",\n \"email.max\"=>\":attribute : 不能超过255个字\",\n \"password.required\"=>\":attribute : 不能为空\",\n \"password.confirmed\"=>\":attribute : 两次输入的密码不一致\",\n \"password.min\"=> \":attribute : 不能小于6位\",\n );\n\n $attributes = array(\n \"name\" => '名字',\n 'email' => '邮箱',\n 'password' => '密码'\n );\n\n return Validator::make($data, [\n 'name' => 'required|min:2|max:50',\n 'email' => 'required|email|max:255|unique:entry_users',\n 'password' => 'required|confirmed|min:6',\n ], $message, $attributes);\n }", "title": "" }, { "docid": "f9ff00c08414b88d3772ef0a90928c6a", "score": "0.59939003", "text": "protected function validator(array $data) {\n return Validator::make($data, [\n 'firstname' => ['required', 'string', 'max:255'],\n 'lastname' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'password' => ['required', 'string', 'min:8', 'confirmed'],\n 'address1' => ['required', 'string'],\n 'address2' => ['string'],\n 'city' => ['required', 'string'],\n 'province' => ['required', 'string'],\n 'postal' => ['required', 'string'],\n 'phone' => ['required', 'string'],\n ]);\n }", "title": "" } ]
652df806cc7938468c3d27379b2cf535
Sends HTML emails with optional shortcodes.
[ { "docid": "0c108d44f3ee30fe67fbeb26829788a8", "score": "0.0", "text": "public function sendEmail($to, $subj, $msg, $shortcodes = '', $bcc = false) {\n\n\t\tif ( !empty($shortcodes) && is_array($shortcodes) ) :\n\n\t\t\tforeach ($shortcodes as $code => $value)\n\t\t\t\t$msg = str_replace('{{'.$code.'}}', $value, $msg);\n\n\t\tendif;\n\n\t\t/* Multiple recepients? */\n\t\tif ( is_array( $to ) )\n\t\t\t$to = implode(', ', $to);\n\n\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\t\t$headers .= 'From: ' . address . \"\\r\\n\";\n\n\t\t/* BCC address. */\n\t\tif ( $bcc ) {\n\t\t\t$headers .= 'Bcc: ' . $to . \"\\r\\n\";\n\t\t\t$to = null;\n\t\t}\n\n\t\t$headers .= 'Reply-To: ' . address . \"\\r\\n\";\n\t\t$headers .= 'Return-Path: ' . address . \"\\r\\n\";\n\n\t\t/*\n\t\t * If running postfix, need a fifth parameter since Return-Path doesn't always work.\n\t\t */\n\t\t// $optionalParams = '-r' . address;\n\t\t$optionalParams = '';\n\n\t\treturn mail($to, $subj, nl2br(html_entity_decode($msg)), $headers, $optionalParams);\n\n\t}", "title": "" } ]
[ { "docid": "87ffbd2ff0a06dcfc77c5cfa8fbf5f70", "score": "0.64260435", "text": "function via_make_notice_mail_html($a, $muser) {\n global $CFG, $DB;\n\n if ($muser->mailformat != 1) {// Needs to be HTML.\n return '';\n }\n\n $posthtml = '<head></head>';\n $posthtml .= \"\\n<body>\\n\\n\";\n\n $posthtml .= '<div style=\"font-family: Calibri,sans-serif;\">';\n $posthtml .= '<a target=\"_blank\" href=\"'.$CFG->wwwroot.'/course/view.php?id='.$a->courseid.'\">'.$a->coursename.'</a>';\n $posthtml .= ' &raquo; <a target=\"_blank\"\n href=\"'.$CFG->wwwroot.'/mod/via/index.php?id='.$a->courseid.'\">'.$a->activitytitle.'</a> &raquo; ';\n $posthtml .= '<a target=\"_blank\" href=\"'.$CFG->wwwroot.'/mod/via/view.php?id='.$a->cmid.'\">'.$a->activitytitle.'</a>';\n $posthtml .= '</div>';\n $posthtml .= '<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" style=\"font-family: Calibri,sans-serif; color:#505050\">';\n $posthtml .= '<tr><td>'. get_string(\"noticeemailsubject\", \"via\") .'</td></tr>';\n $posthtml .= '<tr><td>'. get_string(\"noticeemailhtml\", \"via\", $a) .'</td></tr>';\n $posthtml .= '<tr><td><br/>'. get_string(\"noticeclicktoaccesshtml\", \"via\") .'</td></tr>';\n $posthtml .= '<tr><td>';\n $posthtml .= \"<a style='color:#fff; text-decoration:none; background:#6ab605; padding:8px;'\n href='\".$CFG->wwwroot.\"/mod/via/view.php?id=\".$a->cmid.\"' >\n <img style='vertical-align:middle'\n src='\" . $CFG->wwwroot .\"/mod/via/pix/access_small.png' hspace='5' height='14px' width='15px'>\".\n get_string(\"gotorecording\", \"via\").\"</a>\";\n $posthtml .= '</td></tr>';\n\n $posthtml .= '<tr><td>'.$CFG->wwwroot.\"/mod/via/view.php?id=\".$a->cmid .'</td></tr>';\n\n $posthtml .= '</table>'.\"\\n\\n\";\n\n $posthtml .= '</body>';\n\n return $posthtml;\n}", "title": "" }, { "docid": "b00292f1a9f00f1feba814d309392f6a", "score": "0.63241446", "text": "function nc_emaillink_shortcode() {\n\t\tob_start();\n\t\techo '<a rel=\"nofollow\" href=\"mailto:'.get_theme_mod('main_email').'\">'.get_theme_mod('main_email').'</a>';\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "07bcc897a1b0ae255ae64e2b3f47b7f9", "score": "0.6310517", "text": "function nc_main_email_shortcode() {\n\t\tob_start();\n\t\techo get_theme_mod('main_email');\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "2cae7ae6a9bfe3728def99b09bb9da57", "score": "0.62059", "text": "function sendHTMLMail($HTMLContent, $PLAINContent, $recipient, $dummy, $fromEmail, $fromName, $replyTo = '', $fileAttachment = '') {\n\t\t// HTML\n\t\tif (trim($recipient)) {\n\t\t\t$parts = spliti('<title>|</title>', $HTMLContent, 3);\n\t\t\t$subject = trim($parts[1]) ? strip_tags(trim($parts[1])) :\n\t\t\t'Front end user registration message';\n\t\t\t \n\t\t\t$Typo3_htmlmail = t3lib_div::makeInstance('tx_srfeuserregister_pi1_t3lib_htmlmail');\n\t\t\t$Typo3_htmlmail->charset = 'iso-8859-1';\n\t\t\t$Typo3_htmlmail->start();\n\t\t\t$Typo3_htmlmail->messageid = md5(microtime());\n\t\t\t$Typo3_htmlmail->mailer = 'Typo3 HTMLMail';\t\t \n\t\t\t$Typo3_htmlmail->subject = $Typo3_htmlmail->convertName($subject);\n\t\t\t$Typo3_htmlmail->from_email = $fromEmail;\n\t\t\t$Typo3_htmlmail->from_name = $fromName;\n\t\t\t$Typo3_htmlmail->from_name = implode(' ' , t3lib_div::trimExplode(',', $Typo3_htmlmail->from_name));\n\t\t\t$Typo3_htmlmail->replyto_email = $replyTo ? $replyTo :$fromEmail;\n\t\t\t$Typo3_htmlmail->replyto_name = $replyTo ? '' : $fromName;\n\t\t\t$Typo3_htmlmail->replyto_name = implode(' ' , t3lib_div::trimExplode(',', $Typo3_htmlmail->replyto_name));\n\t\t\t$Typo3_htmlmail->organisation = '';\n\t\t\t$Typo3_htmlmail->priority = 3;\n\t\t\t \n\t\t\t// ATTACHMENT\n\t\t\tif ($fileAttachment && file_exists($fileAttachment)) {\n\t\t\t\t$Typo3_htmlmail->addAttachment($fileAttachment);\n\t\t\t}\n\t\t\t \n\t\t\t// HTML\n\t\t\tif (trim($HTMLContent)) {\n\t\t\t\t$Typo3_htmlmail->theParts['html']['content'] = $HTMLContent;\n\t\t\t\t$Typo3_htmlmail->theParts['html']['path'] = '';\n\t\t\t\t// MLC don't include media in HTML emails\n\t\t\t\t// $Typo3_htmlmail->extractMediaLinks();\n\t\t\t\t// $Typo3_htmlmail->extractHyperLinks();\n\t\t\t\t// $Typo3_htmlmail->fetchHTMLMedia();\n\t\t\t\t$Typo3_htmlmail->substMediaNamesInHTML(0); // 0 = relative\n\t\t\t\t$Typo3_htmlmail->substHREFsInHTML();\n\t\t\t\t \n\t\t\t\t$Typo3_htmlmail->setHTML($Typo3_htmlmail->encodeMsg($Typo3_htmlmail->theParts['html']['content']));\n\t\t\t}\n\t\t\t \n\t\t\t// PLAIN\n\t\t\t$Typo3_htmlmail->addPlain($PLAINContent);\n\t\t\t \n\t\t\t// SET Headers and Content\n\t\t\t$Typo3_htmlmail->setHeaders();\n\t\t\t$Typo3_htmlmail->setContent();\n\t\t\t$Typo3_htmlmail->setRecipient($recipient);\n\t\t\t$Typo3_htmlmail->sendTheMail();\n\t\t}\n\t}", "title": "" }, { "docid": "1d7a69a2fe26316cd53e80d456abc5ff", "score": "0.61860037", "text": "function CreateHTMLMail($e){\n\t\t$administrator = $this->administrator;\n\t\t$host=$this->Kernel->Settings->GetItem(\"Module\", \"Host\");\n\t\t$url=$this->Kernel->Settings->GetItem(\"Module\", \"SiteURL\");\n\t\t$tpl=$this->tpl[\"template_text_\".$this->Kernel->Language];\n\t\t$tpl_team=$this->tpl_team[\"template_text_\".$this->Kernel->Language];\n\n\t\t$template_data[\"url\"] = $url.$this->entry.\"?event=UnSubscribeTheme&uni_id=\".$e[\"uni_id\"];\n\t\t$template_data[\"email\"]=$e[\"email\"];\n\t\t$e[\"content\"]=str_replace(\"href=\\\"/\", \"href=\\\"\".$host, $e[\"content\"]);\n\t\t$template_data[\"content\"]=str_replace(\"src=\\\"/\", \"src=\\\"\".$host, $e[\"content\"]);\n\t\t$template_data[\"date\"] = substr($e[\"date\"], 0, 10);\n\t\t$template_data[\"theme\"]=$e[\"theme_title\"];\n\t\t$template_data[\"title\"]=$e[\"content_title\"];\n\t\t$emailSender = new EmailTemplate(null, $administrator, null, \"text/html\");\n\t\t$_message_team = $emailSender->Render_Tag($tpl_team, $template_data, true);\n\n\t\t$_message = $emailSender->Render_Tag($tpl, $template_data, true);\n\n\t\t$emailSender->sendEmail($template_data[\"email\"], $_message_team, $_message);\n\t}", "title": "" }, { "docid": "ae890e0e4c7e3a21c4881c7a04f56cc8", "score": "0.6181734", "text": "function wp_email_capture_set_email_to_html() {\n\n\tif ( 1 == get_option( 'wp_email_capture_send_email_html' ) ) {\n\t\tadd_filter( 'wp_mail_content_type', 'wp_email_capture_set_html_mail_content_type' );\n\t}\n\t\n}", "title": "" }, { "docid": "d81e046e2ab1a279cfdf722038c4214e", "score": "0.617377", "text": "function handleNewsletterHTMLPrintShortCode()\n {\n ob_start();\n\n // registration form sent => add email address to newsletteraspirants and send email to confirm registration for user\n if($this->newsletterFormPrinterAndReader->formToSubscribeForNewsletterSent())\n {\n\tif($this->captcha->isCaptchaPluginActive() && !$this->newsletterFormPrinterAndReader->isCaptchaValid())\n {\n echo 'Invalid captcha';\n return; //no more actions because of security\n }\n\n $emailAddressToSubscribe = $this->newsletterFormPrinterAndReader->getNewSubscribedMailAdressForNewsletter(); //entered email address in input field\n\n if($this->databaseManager->isEmailAddressAlreadyRecipient($emailAddressToSubscribe)) //entered email address is already a recipient\n {\n $this->newsletterFormPrinterAndReader->printEmailAddressIsAlreadyRecipientHTML();\n }\n // new confirmation email and new random number in db if entered email address is already an aspirant (aspirant != recipient!!!!)\n else if($this->databaseManager->isEmailAddressAlreadyAspirant($emailAddressToSubscribe))\n {\n $newRandomNumber = $this->getRandomNumber(); // random number to identify email address when link in confirmation email was clicked\n $this->databaseManager->updateAspirant($emailAddressToSubscribe, $newRandomNumber); // update random number of email address in newsletter-aspirants-table in database\n $this->emailSender->sendRegistrationConfirmationEmail($emailAddressToSubscribe, $newRandomNumber); // send registration email to entered email address, user has to click link in email to complete registration\n $this->newsletterFormPrinterAndReader->printEmailIsAlreadyAspirantHTML();\n }\n // email not known yet, standard process for registration\n else\n {\n $randomNumber = $this->getRandomNumber(); // random number to identify email address when link in confirmation email was clicked\n $this->databaseManager->insertNewAspirant($emailAddressToSubscribe, $randomNumber); // write entered email address with random number in newsletter-aspirants-table in database\n $registrationMailSuccess = $this->emailSender->sendRegistrationConfirmationEmail($emailAddressToSubscribe, $randomNumber); // send registration email to entered email address, user has to click link in email to complete registration\n if($registrationMailSuccess == true)\n {\n $this->newsletterFormPrinterAndReader->printEmailToConfirmNewsletterRegistrationSentHTML();\n }\n else\n {\n $this->databaseManager->deleteAspirant($emailAddressToSubscribe); // delete entered email address from aspriantstable again because registration mail failed\n $this->newsletterFormPrinterAndReader->printUnsuccessfullRegistrationHTML();\n }\n }\n }\n // confirmation link in confirmation email clicked => add email address to newsletterrecipients\n else if($this->newsletterFormPrinterAndReader->confirmationLinkFromEmailClicked())\n {\n $randomNumberFromConfirmationEmailLink = $this->newsletterFormPrinterAndReader->getRandomNumberFromConfirmationLinkFromEmail(); // get random number from get parameter from link in registration email\n\n if($this->databaseManager->isRandomNumberFromConfirmationEmailInAspirantTable($randomNumberFromConfirmationEmailLink)) // check if the random number is in newsletter-aspirants-table\n {\n $recipientEmailAddress = $this->databaseManager->getEmailAddressForRandomNumberFromConfirmationEmail($randomNumberFromConfirmationEmailLink); // get the email address to the random number out of the newsletter-aspirants-table in database\n $this->databaseManager->insertNewRecipient($recipientEmailAddress); // add email address to recipients-table\n $this->databaseManager->deleteAspirant($recipientEmailAddress); // delete email address from aspirants-table\n $this->newsletterFormPrinterAndReader->printSuccessfullySubscribedForNewsletterHTML();\n }\n else\n {\n $this->newsletterFormPrinterAndReader->printUnsuccessfullNewsletterConfirmationHTML();\n }\n }\n else\n {\n $this->newsletterFormPrinterAndReader->printSubscribeForNewsletterHTML();\n }\n\n return ob_get_clean();\n }", "title": "" }, { "docid": "30fbfe7881dcf36806186d9e69fe1084", "score": "0.5952597", "text": "function send() {\n\t\t$id = getRequest('emailID', 'integer');\n\t\t$email = new email($id);\n\t\tif ($email->exists()) {\n\t\t\t$address = getPost('email', 'email');\n\t\t\tif (validEmail($address)) {\n\t\t\t\t// retrieve smarty tags\n\t\t\t\t$subject = $email->get('subject');\n\t\t\t\t$html = $email->get('html');\n\t\t\t\t$text = $email->get('text');\n\t\t\t\tpreg_match_all('/{\\$([\\w\\d_\\-\\.]+)}/', $subject, $subjectTagsA);\n\t\t\t\tpreg_match_all('/{\\$([\\w\\d_\\-\\.]+)}/', $html, $htmlTagsA);\n\t\t\t\tpreg_match_all('/{\\$([\\w\\d_\\-\\.]+)}/', $text, $textTagsA);\n\t\t\t\t$headerID = $email->get('headerID');\n\t\t\t\tif ($headerID) {\n\t\t\t\t\t$emailHeader = new emailSection($headerID);\n\t\t\t\t\t$headerhtml = $emailHeader->get('html');\n\t\t\t\t\t$headertext = $emailHeader->get('text');\n\t\t\t\t\tpreg_match_all('/{\\$([\\w\\d_\\-\\.]+)}/', $headerhtml, $htmlHeaderTags);\n\t\t\t\t\tpreg_match_all('/{\\$([\\w\\d_\\-\\.]+)}/', $headertext, $textHeaderTags);\n\t\t\t\t} else {\n\t\t\t\t\t$htmlHeaderTags = array(1 => array());\n\t\t\t\t\t$textHeaderTags = array(1 => array());\n\t\t\t\t}\n\t\t\t\t$footerID = $email->get('footerID');\n\t\t\t\tif ($footerID) {\n\t\t\t\t\t$emailFooter = new emailSection($footerID);\n\t\t\t\t\t$footerhtml = $emailFooter->get('html');\n\t\t\t\t\t$footertext = $emailFooter->get('text');\n\t\t\t\t\tpreg_match_all('/{\\$([\\w\\d_\\-\\.]+)}/', $footerhtml, $htmlFooterTags);\n\t\t\t\t\tpreg_match_all('/{\\$([\\w\\d_\\-\\.]+)}/', $footertext, $textFooterTags);\n\t\t\t\t} else {\n\t\t\t\t\t$htmlFooterTags = array(1 => array());\n\t\t\t\t\t$textFooterTags = array(1 => array());\n\t\t\t\t}\n\t\t\t\t$smartyTags = array_unique(array_merge($subjectTagsA[1], $htmlTagsA[1], $textTagsA[1], $htmlHeaderTags[1], $textHeaderTags[1], $htmlFooterTags[1], $textFooterTags[1]));\n\t\t\t\t$template = new template;\n\t\t\t\t// retrieve mailer tags\n\t\t\t\t$mailer = $template->getMailer($email->get('name'));\n\t\t\t\t$subject = $mailer->get('subject');\n\t\t\t\t$html = $mailer->get('html');\n\t\t\t\t$text = $mailer->get('text');\n\t\t\t\tpreg_match_all('/{([\\w\\d_\\-\\.]+)}/', $subject, $subjectTagsB);\n\t\t\t\tpreg_match_all('/{([\\w\\d_\\-\\.]+)}/', $html, $htmlTagsB);\n\t\t\t\tpreg_match_all('/{([\\w\\d_\\-\\.]+)}/', $text, $textTagsB);\n\t\t\t\t$mailerTags = array_unique(array_merge($subjectTagsB[1], $htmlTagsB[1], $textTagsB[1]));\n\t\t\t\t// assign smarty tags\n\t\t\t\t$arrays = array();\n\t\t\t\tforeach ($smartyTags as $tag) {\n\t\t\t\t\tif (!preg_match('/\\./', $tag)) {\n\t\t\t\t\t\t$template->assign($tag, getPost('#'.$tag));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$vars = explode('.', $tag);\n\t\t\t\t\t\tif (!isset($arrays[$vars[0]])) {\n\t\t\t\t\t\t\t$arrays[$vars[0]] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$arrays[$vars[0]][$vars[1]] = getPost('#'.preg_replace('/\\./', '#', $tag));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!empty($arrays)) {\n\t\t\t\t\tforeach ($arrays as $key => $val) {\n\t\t\t\t\t\t$template->assign($key, $val);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$mailer = $template->getMailer($email->get('name'));\n\t\t\t\tif ($mailer->composeMessage()) {\n\t\t\t\t\t$mailer->addRecipient($address);\n\t\t\t\t\t// assign mailer tags\n\t\t\t\t\tforeach ($mailerTags as $tag) {\n\t\t\t\t\t\t$mailer->assignTag($address, $tag, getPost('#'.preg_replace('/\\./', '#', $tag)));\n\t\t\t\t\t}\n\t\t\t\t\tif ($mailer->send()) {\n\t\t\t\t\t\taddSuccess('Email sent');\n\t\t\t\t\t} else {\n\t\t\t\t\t\taddError('An error occurred while sending the email');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\taddError('An error occurred while sending the email');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddError('Invalid email address');\n\t\t\t\taddErrorField('email');\n\t\t\t}\n\t\t\tredirect('/admin/emailsManagement/action/sendEmail/emailID/'.$email->get('emailID'));\n\t\t} else {\n\t\t\taddError('Email not found');\n\t\t\temailsAdmin();\n\t\t}\n\t}", "title": "" }, { "docid": "94c8d648dd4e51be5a8fa600fd47fa8c", "score": "0.5885247", "text": "function bum_send_email( $options = array() )\n{\n\t//initializing variables\n\t$domain_parts = bum_parse_url(get_bloginfo('url'));\n\t$defaults = array(\n\t\t'to' => '',\n\t\t'cc' => '',\n\t\t'bcc' => '',\n\t\t'from' => \"info@{$domain_parts['domain']}\",\n\t\t'subject' => get_bloginfo('name'),\n\t\t'message' => '',\n\t\t'headers' => false,\n\t\t'attachments' => array(),\n\t\t'args' => false,\n\t);\n\t$options = wp_parse_args($options, $defaults);\n\n\tif (is_array($options['to']))\n\t{\n\t\t$options['to'] = implode( ',',$options['to'] );\n\t}\n\tif (is_array($options['cc']))\n\t{\n\t\t$options['cc'] = implode( ',',$options['cc'] );\n\t}\n\tif (is_array($options['bcc']))\n\t{\n\t\t$options['bcc'] = implode( ',',$options['bcc'] );\n\t}\n\t\n\t// To send HTML mail, the Content-type header must be set\n\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\t\t\n\t// Additional headers\n\t$headers .= 'From: '.get_bloginfo('site').' <'.$options['from'].'>' . \"\\r\\n\";\n\t$headers .= 'Reply-To: ' .get_bloginfo('admin_email'). \"\\r\\n\";\n\t$headers .= 'Return-Path: ' .get_bloginfo('admin_email'). \"\\r\\n\";\n\t$headers .= 'CC: ' .$options['cc']. \"\\r\\n\";\n\t$headers .= 'BCC: ' .$options['bcc']. \"\\r\\n\";\n\t$headers .= 'X-Mailer: PHP/' . phpversion();\n\t\n\t//use these headers if they haven't been overridden.\n\tif (!$options['headers'])\n\t{\n\t\t$options['headers'] = $headers;\n\t}\n\t\n\t//check for the template\n\tif ($temp = bum_get_show_view($options['message'], $options['args']))\n\t{\n\t\t$options['message'] = $temp;\n\t}\n\t\n\t$options = apply_filters('bum_send_mail_options', $options);\n\textract($options);\n\t\n\t//reasons to fail\n\tif (!$to || !$message) return false;\n\t\t\n\t//preparing for html\n\tadd_filter('wp_mail_content_type', 'bum_filter_sendmail_contenttype');\n\t\n\t//send the email\n\tif (wp_mail( $to, $subject, $message, $headers, $attachments ))\n\t{\n\t\tif (function_exists('set_notification'))\n\t\t\tset_notification('Email notification has been sent.');\n\t\t\n\t\tdo_action('bum_email_sent', $to, $subject, $message, $headers, $attachments);\n\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "8a124f3bf46a5010851af36fff68fae9", "score": "0.5878503", "text": "function learndash_notifications_send_email( $emails, $title, $content, $bcc = array(), $notification_id = null ) {\n\n\t//Tableau assignation Shortcodes français vers Shortcodes anglais\n\n\t\n\n\t$tableauShortcode = [\n\t\t'[learnx_notifications affiche=\"Identifiant\"]' => '[ld_notifications field=\"user\" show=\"username\"]',\n\t\t'[learnx_notifications affiche=\"Email\"]' => '[ld_notifications field=\"user\" show=\"email\"]',\n\t\t'[learnx_notifications affiche=\"Nom_Affichage_Utilisateur\"]' => '[ld_notifications field=\"user\" show=\"display_name\"]',\n\t\t'[learnx_notifications affiche=\"Prénom_Utilisateur\"]' => '[ld_notifications field=\"user\" show=\"first_name\"]',\n\t\t'[learnx_notifications affiche=\"Nom_Utilisateur\"]' => '[ld_notifications field=\"user\" show=\"last_name\"]',\n\t\t'[learnx_notifications affiche=\"Titre_Groupe\"]'=> '[ld_notifications field=\"group\" show=\"title\"]',\n\t\t'[learnx_notifications affiche=\"Titre_Formation\"]' => '[ld_notifications field=\"course\" show=\"title\"]',\n\t\t'[learnx_notifications affiche=\"URL_Formation\"]' => '[ld_notifications field=\"course\" show=\"url\"]',\n\t\t'[learnx_notifications affiche=\"Temps_Formation_Terminer\"]' => '[ld_notifications field=\"course\" show=\"completed_on\" format=\"\"]',\n\t\t'[learnx_notifications affiche=\"Moyenne_Score_Quiz\"]' => '[ld_notifications field=\"course\" show=\"cumulative_score\"]',\n\t\t'[learnx_notifications affiche=\"Moyenne_Points_Quiz\"]' => '[ld_notifications field=\"course\" show=\"cumulative_points\"]',\n\t\t'[learnx_notifications affiche=\"Total_Moyenne_Points_Quiz\"]' => '[ld_notifications field=\"course\" show=\"cumulative_total_points\"]',\n\t\t'[learnx_notifications affiche=\"Pourcentage_Moyenne_Bonnes_Reponses_Quiz\"]' => '[ld_notifications field=\"course\" show=\"cumulative_percentage\"]',\n\t\t'[learnx_notifications affiche=\"Temps_Moyen_Passé_Quiz\"]' => '[ld_notifications field=\"course\" show=\"cumulative_timespent\"]',\n\t\t'[learnx_notifications affiche=\"Moyenne_Bonnes_Réponses_Comptés_Quiz\"]' => '[ld_notifications field=\"course\" show=\"cumulative_count\"]',\n\t\t'[learnx_notifications affiche=\"Pourcentage_Somme_Bonnes_Réponses_Quiz\"]' => '[ld_notifications field=\"course\" show=\"aggregate_percentage\"]',\n\t\t'[learnx_notifications affiche=\"Somme_Points_Marqués_Quiz\"]' => '[ld_notifications field=\"course\" show=\"aggregate_score\"]',\n\t\t'[learnx_notifications affiche=\"Somme_Points_Obtenus_Quiz\"]' => '[ld_notifications field=\"course\" show=\"aggregate_points\"]',\n\t\t'[learnx_notifications affiche=\"Somme_Points_Totaux_Quiz\"]' => '[ld_notifications field=\"course\" show=\"aggregate_total_points\"]',\n\t\t'[learnx_notifications affiche=\"Somme_Temps_Passé_Quiz\"]' => '[ld_notifications field=\"course\" show=\"aggregate_timespent\"]',\n\t\t'[learnx_notifications affiche=\"Somme_Bonnes_Réponses_Comptés_Quiz\"]' => '[ld_notifications field=\"course\" show=\"aggregate_count\"]',\n\t\t'[learnx_notifications affiche=\"Titre_Module\"]' => '[ld_notifications field=\"lesson\" show=\"title\"]',\n\t\t'[learnx_notifications affiche=\"URL_Module\"]' => '[ld_notifications field=\"lesson\" show=\"url\"]',\n\t\t'[learnx_notifications affiche=\"Titre_Etape\"]' => '[ld_notifications field=\"topic\" show=\"title\"]',\n\t\t'[learnx_notifications affiche=\"URL_Etape\"]' => '[ld_notifications field=\"topic\" show=\"url\"]',\n\t\t'[learnx_notifications affiche=\"URL_Quiz\"]' => '[ld_notifications field=\"quiz\" show=\"url\"]',\n\t\t'[learnx_notifications affiche=\"Temps_Quiz\"]' => '[ld_notifications field=\"quiz\" show=\"timestamp\" format=\"\"]',\n\t\t'[learnx_notifications affiche=\"Pourcentage_Correcte_Quiz\"]' => '[ld_notifications field=\"quiz\" show=\"percentage\"]',\n\t\t'[learnx_notifications affiche=\"Autorisation_Passage_Quiz\"]' => '[ld_notifications field=\"quiz\" show=\"pass\"]',\n\t\t'[learnx_notifications affiche=\"Titre_Quiz\"]' => '[ld_notifications field=\"quiz\" show=\"quiz_title\"]',\n\t\t'[learnx_notifications affiche=\"Titre_Formation_Quiz\"]' => '[ld_notifications field=\"quiz\" show=\"course_title\"]',\n\t\t'[learnx_notifications affiche=\"Temps_Passé_Quiz\"]' => '[ld_notifications field=\"quiz\" show=\"timespent\"]',\n\t\t'[learnx_notifications affiche=\"Résultat_Catégories_Quiz\"]' => '[ld_notifications field=\"quiz\" show=\"categories\"]',\n\t\t'[learnx_notifications affiche=\"Total_Points_Gagnés\"]' => '[ld_notifications field=\"essay\" show=\"points_earned\"]',\n\t\t'[learnx_notifications affiche=\"Total_Points_Possible\"]' => '[ld_notifications field=\"essay\" show=\"points_total\"]',\n\t\t'[learnx_notifications affiche=\"Titre_Devoir\"]' => '[ld_notifications field=\"assignment\" show=\"title\"]',\n\t\t'[learnx_notifications affiche=\"Nom_Fichier_Devoir\"]' => '[ld_notifications field=\"assignment\" show=\"file_name\"]',\n\t\t'[learnx_notifications affiche=\"Lien_Fichier_Devoir\"]' => '[ld_notifications field=\"assignment\" show=\"file_link\"]',\n\t\t'[learnx_notifications affiche=\"Titre_Module_Devoir\"]' => '[ld_notifications field=\"assignment\" show=\"lesson_title\"]',\n\t\t'[learnx_notifications affiche=\"Type_Module_Devoir\"]' => '[ld_notifications field=\"assignment\" show=\"lesson_type\"]'\n ];\n\n\t$content = str_replace(array_keys($tableauShortcode), array_values($tableauShortcode), $content);\n\n $content = do_shortcode( $content );\n\n //var_dump($content);exit; // a retirer\n\tif ( ! strstr( $content, '<!DOCTYPE' ) && ! strstr( $content, '<p' ) && ! strstr( $content, '<div' ) ) {\n\t\t$content = wpautop( $content );\n\t}\n\n\t$title = apply_filters( 'learndash_notifications_email_subject', do_shortcode( $title ), $notification_id );\n\t$content = apply_filters( 'learndash_notifications_email_content', $content, $notification_id );\n\n\t$emails = array_merge( $emails, $bcc );\n\t$emails = array_unique( $emails );\n\n\t// Send email to each address separately to prevent recipient\n\t// knowing other recipient's email addresses\n\tforeach ( $emails as $email ) {\n\t\t// Continue if $email is blank\n\t\t$email = trim( $email );\n\t\tif ( empty( $email ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ( apply_filters( 'learndash_notifications_send_email', true, $email, $notification_id ) ) {\n\t\t\t// Change mail content type to HTML\n\t\t\tadd_filter( 'wp_mail_content_type', 'learndash_notifications_set_html_mail_content_type' );\n\n\t\t\t$send = wp_mail( $email, $title, $content );\n\n\t\t\t// Reset mail content type back to plain\n\t\t\tremove_filter( 'wp_mail_content_type', 'learndash_notifications_set_html_mail_content_type' );\n\t\t}\n\t\t//insert \n\t\tlearnx_notification_add_log($title, $email);\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "306db22da82bd434e5d7007ae7698be5", "score": "0.5829473", "text": "function sendHtmlEmail($text, $html, $from, $to, $title){\n\t\t include('../common/htmlMimeMail.php');\n\t\t \n\t\t $mail = new htmlMimeMail();\n\t\t \n\t\t $mail->setHtml($html, $text);\n\t\t \n\t\t $mail->setReturnPath($from);\n\t\t \n\t\t $mail->setFrom($from);\n\t\t \n\t\t $mail->setSubject($title);\n\t\t \n\t\t $mail->setHeader('X-Mailer', 'HTML Mime mail class (http://www.phpguru.org)');\n\t\t \n\t\t $result = $mail->send(array($to), 'smtp');\n\t}", "title": "" }, { "docid": "c6de230f16e518ed3bbdc857e630487b", "score": "0.5824702", "text": "function sendEmail() {\n\t\t$id = getRequest('emailID', 'integer');\n\t\t$email = new email($id);\n\t\tif ($email->exists()) {\n\t\t\t// retrieve smarty tags\n\t\t\t$subject = $email->get('subject');\n\t\t\t$html = $email->get('html');\n\t\t\t$text = $email->get('text');\n\t\t\tpreg_match_all('/{\\$([\\w\\d_\\-\\.]+)}/', $subject, $subjectTagsA);\n\t\t\tpreg_match_all('/{\\$([\\w\\d_\\-\\.]+)}/', $html, $htmlTagsA);\n\t\t\tpreg_match_all('/{\\$([\\w\\d_\\-\\.]+)}/', $text, $textTagsA);\n\t\t\t$headerID = $email->get('headerID');\n\t\t\tif ($headerID) {\n\t\t\t\t$emailHeader = new emailSection($headerID);\n\t\t\t\t$headerhtml = $emailHeader->get('html');\n\t\t\t\t$headertext = $emailHeader->get('text');\n\t\t\t\tpreg_match_all('/{\\$([\\w\\d_\\-\\.]+)}/', $headerhtml, $htmlHeaderTags);\n\t\t\t\tpreg_match_all('/{\\$([\\w\\d_\\-\\.]+)}/', $headertext, $textHeaderTags);\n\t\t\t} else {\n\t\t\t\t$htmlHeaderTags = array(1 => array());\n\t\t\t\t$textHeaderTags = array(1 => array());\n\t\t\t}\n\t\t\t$footerID = $email->get('footerID');\n\t\t\tif ($footerID) {\n\t\t\t\t$emailFooter = new emailSection($footerID);\n\t\t\t\t$footerhtml = $emailFooter->get('html');\n\t\t\t\t$footertext = $emailFooter->get('text');\n\t\t\t\tpreg_match_all('/{\\$([\\w\\d_\\-\\.]+)}/', $footerhtml, $htmlFooterTags);\n\t\t\t\tpreg_match_all('/{\\$([\\w\\d_\\-\\.]+)}/', $footertext, $textFooterTags);\n\t\t\t} else {\n\t\t\t\t$htmlFooterTags = array(1 => array());\n\t\t\t\t$textFooterTags = array(1 => array());\n\t\t\t}\n\t\t\t$template = new template;\n\t\t\t// retrieve mailer tags\n\t\t\t$mailer = $template->getMailer($email->get('name'));\n\t\t\t$subject = $mailer->get('subject');\n\t\t\t$html = $mailer->get('html');\n\t\t\t$text = $mailer->get('text');\n\t\t\tpreg_match_all('/{([\\w\\d_\\-\\.]+)}/', $subject, $subjectTagsB);\n\t\t\tpreg_match_all('/{([\\w\\d_\\-\\.]+)}/', $html, $htmlTagsB);\n\t\t\tpreg_match_all('/{([\\w\\d_\\-\\.]+)}/', $text, $textTagsB);\n\t\t\t$emailTags = array_unique(array_merge($subjectTagsA[1], $htmlTagsA[1], $textTagsA[1], $subjectTagsB[1], $htmlTagsB[1], $textTagsB[1], $htmlHeaderTags[1], $textHeaderTags[1], $htmlFooterTags[1], $textFooterTags[1]));\n\t\t\tsort($emailTags);\n\t\t\t$template->assignClean('_TITLE', systemSettings::get('SITENAME').' Send Email: '.$email->get('name'));\n\t\t\t$template->assignClean('email', $email->fetchArray());\n\t\t\t$template->assignClean('emailTags', $emailTags);\n\t\t\t$template->assignClean('admin', adminCore::getAdminUser());\n\t\t\t$template->setSystemDataGateway();\n\t\t\t$template->getSystemMessages();\n\t\t\t$template->display('admin/emailSend.htm');\n\t\t} else {\n\t\t\taddError('Email not found');\n\t\t\temailsAdmin();\n\t\t}\n\t}", "title": "" }, { "docid": "fa831e787dfd3c20549b7e41c412dd18", "score": "0.58200526", "text": "function mailHTML($recipient, $subject, $from, $message){\n\n $headers = \"From: \" . $from . \"\\r\\n\";\n $headers .= \"Reply-To: \". $from . \"\\r\\n\";\n $headers .= \"MIME-Version: 1.0\\r\\n\";\n $headers .= \"Content-Type: text/html; charset=ISO-8859-1\\r\\n\";\n \n if (strpos($message, \"<html>\")==false){\n #add the html tags\n $head = \"<html>\";\n $head .= \"<head>\";\n $head .= \"<style>\";\n $head .= \"body{font-family: verdana,helvetica,arial,sans-serif; font-size:10px;}\";\n $head .= \"pre{font-family: 'Courier New', Courier, monospace; font-size:10px;}\";\n $head .= \"</style>\";\n $head .= \"<head>\";\n $head .= \"<body>\";\n \n $message = $head . $message;\n $message .= \"</body>\";\n $message .= \"</html>\";\n }\n mail($recipient, $subject, $message, $headers);\n \n}", "title": "" }, { "docid": "f91b568064fd4ec7295d138f4604b0e8", "score": "0.580968", "text": "function cf_shortcode() {\n\tob_start();\n\tdeliver_mail();\n\thtml_form_code();\n\n\treturn ob_get_clean();\n}", "title": "" }, { "docid": "2de71ad17f8fa95a1b5e5b73db4ab2a2", "score": "0.5767209", "text": "private function sendUsingPHP ()\n {\n\n // Construct Headers\n\n $headers\t= $this->constructHeaders ();\n\n // Get template resource\n\n $tpl\t= \\Sonic\\Sonic::getResource ('tpl');\n\n // Set smarty template status\n\n $smarty\t= $tpl instanceof \\Smarty;\n\n // If we have a smarty template object\n\n if ($smarty)\n {\n\n // Get caching status\n\n $smartyPrevCache\t= $tpl->caching;\n\n // Disable caching\n\n $tpl->setCaching (FALSE);\n\n }\n\n // For each recipient\n\n foreach ($this->_recipients as $recipient)\n {\n\n // Send email\n\n try\n {\n\n // Check to make sure the recipients email address is valid\n\n Parser::_validateEmail ($recipient['email']);\n\n // Set recipient\n\n if (isset($recipient['name'])) {\n $recipientTo = $recipient['name'] . '<' . $recipient['email'] . '>';\n } else {\n $recipientTo = $recipient['email'];\n }\n\n // Add recipient header to original headers\n\n $emailHeaders\t= $headers . 'To: ' . $recipientTo . $this->_nl;\n\n // If we're using smarty\n\n if ($smarty)\n {\n\n // Clear variables\n\n $tpl->clearAllAssign ();\n\n // Assign variables\n\n $tpl->assign ('recipient', $recipient);\n\n // Fetch\n\n $emailMessage\t= $tpl->fetch ('string:' . $this->_message);\n\n }\n\n // Else we're not using smarty\n\n else\n {\n\n // Just leave the message as it is\n\n $emailMessage\t= $this->_message;\n\n }\n\n // Send Message\n\n if (!mail ($recipientTo, $this->_subject, $emailMessage, $emailHeaders))\n {\n\n // Add error and return FALSE\n\n new \\Sonic\\Message ('error', 'Cannot send message to: ' . $recipient['email']);\n\n // return FALSE\n\n return FALSE;\n\n }\n\n if (is_callable($this->_callbackMethod))\n {\n call_user_func ($this->_callbackMethod, $this->_subject, $recipientTo, $this->_fromAddress, $emailMessage);\n }\n\n\n // If we're logging the email\n\n if ($this->logFlag)\n {\n\n // Log\n\n $this->Log ($recipient['email'], $emailHeaders, $emailMessage, 'phpmail');\n\n }\n\n }\n\n // Else the email address is not valid\n\n catch (Parser\\Exception $e)\n {\n\n // Add error\n\n new \\Sonic\\Message ('error', 'Invalid recipient email address: ' . $recipient['email']);\n\n // Skip to next recipient\n\n continue;\n\n }\n\n }\n\n // If we're using smarty\n\n if ($smarty)\n {\n\n // Set caching status\n\n $tpl->caching\t= $smartyPrevCache;\n\n }\n\n // Return TRUE\n\n return TRUE;\n\n }", "title": "" }, { "docid": "18171b309e34f5b587ee594f679a7357", "score": "0.5730914", "text": "static public function mailIssue(array $array): string {\n return ' <html lang=\"fr\"> ' .\n '<body> ' .\n '<link href=\"https://fonts.googleapis.com/css2?family=Dosis:wght@300;500&family=Montserrat:wght@300;400;500;600&display=swap\" rel=\"stylesheet\">' .\n '<div style=\"background-color: #fff; width: 100%; height: auto;padding: 50px 0 0 0;font-family: \\'Montserrat\\', sans-serif; color : #fff;\">\n <div style=\"background-color: #111C30; width: 80%;max-width: 700px; height: auto; margin:50px auto; \">\n <img alt=\"Hungry Nuggets\" src=\"' . $array['imgTop'] . '\" style=\"width: 100%;\">\n <br>\n <img style=\"width: 80%;margin: 0 auto; text-align: center; display: flex;\" src=\"'. $array['imgText'] .'\" alt=\"new admin\">\n \n <div style=\"margin: 0 auto;width: 68%; text-align: center;\">\n <a href=\"https://monitoring.hungrynuggets.com/?issue\" style=\"text-decoration: none;\"><button style=\" border-radius: 40px; border: 1px solid #F4CA34; background-color: rgb(244, 202, 52) !important; color: #fff; font-size: 1.1em; font-weight: 400; padding: 8px 45px; letter-spacing: 1px; text-transform: uppercase; margin-top:25px; font-family: \\'Dosis\\', \\'Montserrat\\',sans-serif;\">GO</button></a>\n </div>\n <img alt=\"Hungry Nuggets\" src=\"' . $array['imgBottom'] . '\" style=\"width: 40%; margin : 85px auto 100px auto;padding-bottom:100px;text-align: center; display: flex;\">\n </div>\n <p style=\"font-size: 0.6em; letter-spacing: 1px; text-align: center; color : #111\">HUNGRY NUGGETS © 2021 Hungry Nuggets, All rights reserved.</p>\n </div>\n </body>\n </html>';\n }", "title": "" }, { "docid": "7497a76d200c5ee7a56e63d7b840009e", "score": "0.57130456", "text": "function mailprovider_form1_shortcode() {\n\tob_start(); ?>\n\n <!--Insert your mail provider's HTML and JS form code here-->\n\n\t<?php\n\treturn ob_get_clean();\n}", "title": "" }, { "docid": "7b2c9e1b82a6cee5539d8c837ed11663", "score": "0.5693351", "text": "function via_make_invitation_reminder_mail_html($courseid, $via, $muser, $reminder=false) {\n global $CFG, $DB;\n\n if ($muser->mailformat != 1) {// Needs to be HTML.\n return '';\n }\n\n $strvia = get_string('modulename', 'via');\n\n $posthtml = '<head></head>';\n $posthtml .= \"\\n<body>\\n\\n\";\n\n $coursename = $DB->get_record('course', array('id' => $courseid));\n\n if (! $cm = get_coursemodule_from_instance(\"via\", $via->activityid, $courseid)) {\n $cm->id = 0;\n }\n $a = new stdClass();\n $a->username = fullname($muser);\n $a->title = $via->name;\n $a->datebegin = userdate($via->datebegin, '%A %d %B %Y');\n $a->hourbegin = userdate($via->datebegin, '%H:%M');\n $a->hourend = userdate($via->datebegin + ($via->duration * 60), '%H:%M');\n\n if (!empty($via->invitemsg) && !$reminder) {\n $a->invitemsg = nl2br($via->invitemsg);\n } else {\n $a->invitemsg = \"\";\n }\n\n $posthtml .= '<div style=\"font-family: Calibri,sans-serif;\">';\n $posthtml .= '<a target=\"_blank\" href=\"'.$CFG->wwwroot.'/course/view.php?id='.$courseid.'\">'.$coursename->shortname.'</a>';\n $posthtml .= ' &raquo; <a target=\"_blank\" href=\"'.$CFG->wwwroot.'/mod/via/index.php?id='.$courseid.'\">'.$strvia.'</a> &raquo; ';\n $posthtml .= '<a target=\"_blank\" href=\"'.$CFG->wwwroot.'/mod/via/view.php?id='.$cm->id.'\">'.$via->name.'</a>';\n $posthtml .= '</div>';\n $posthtml .= '<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\">';\n $posthtml .= '<tr><td></td>';\n $posthtml .= '<td>';\n\n $b = new stdClass();\n $b->title = $a->title;\n\n if (!$reminder) {\n $posthtml .= '<div>'.get_string(\"inviteemailsubject\", \"via\", $b).'</div>';\n } else {\n $posthtml .= '<div>'.get_string(\"reminderemailsubject\", \"via\", $b).'</div>';\n }\n\n $posthtml .= '<div>'.userdate(time()).'</div>';\n\n $posthtml .= '</td></tr>';\n\n $posthtml .= '<tr><td valign=\"top\">';\n $posthtml .= '&nbsp;';\n\n $posthtml .= '</td><td>';\n\n if ($via->activitytype == 2) {\n $posthtml .= get_string(\"inviteemailhtmlpermanent\", \"via\", $a);\n } else {\n $posthtml .= get_string(\"inviteemailhtml\", \"via\", $a);\n }\n\n $posthtml .= \"<div style='margin:20px;'>\";\n\n $posthtml .= \"<div style='border:1px solid #999; margin-top:10px; padding:10px;'>\";\n\n $posthtml .= \"<span style='font-size:1.2em; font-weight:bold;'>\".get_string(\"invitepreparationhtml\", \"via\").\"</span>\";\n\n $posthtml .= \"<div style='text-align:center'>\";\n\n $posthtml .= \"<a href='\" . $CFG->wwwroot .\"/mod/via/view.assistant.php?redirect=7&viaid=\". $via->activityid .\n \"&courseid=\". $via->course .\"' style='background:#5c707c; padding:8px 10px; color:#fff;\n text-decoration:none; margin-right:20px' ><img src='\" . $CFG->wwwroot .\"/mod/via/pix/config.png' align='absmiddle'\n hspace='5' height='27px' width='27px'>\". get_string(\"configassist\", \"via\").\"</a>\";\n\n $posthtml .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\";\n\n if (get_config('via', 'via_technicalassist_url') == null) {\n $posthtml .= \"<a href='\" . $CFG->wwwroot .\"/mod/via/view.assistant.php?redirect=6&viaid=\". $via->activityid .\n \"&courseid=\". $via->course .\"' style='background:#5c707c; padding:8px 10px;\n color:#fff; text-decoration:none; font-family: Calibri,sans-serif;' >\n <img src='\" . $CFG->wwwroot . \"/mod/via/pix/assistance.png' align='absmiddle' hspace='5' height='27px' width='27px'>\".\n get_string(\"technicalassist\", \"via\").\"</a>\";\n } else {\n $posthtml .= \"<a href='\" . get_config('via', 'via_technicalassist_url').\"?redirect=6&viaid=\". $via->activityid .\n \"&courseid=\". $via->course .\"' style='background:#5c707c; padding:8px 10px;\n color:#fff; text-decoration:none; font-family: Calibri,sans-serif;' >\n <img src='\" . $CFG->wwwroot . \"/mod/via/pix/assistance.png' align='absmiddle' hspace='5' height='27px' width='27px'>\".\n get_string(\"technicalassist\", \"via\").\"</a>\";\n }\n\n $posthtml .= \"</div>\";\n\n $posthtml .= \"</div>\";\n\n $posthtml .= \"<div style='border:1px solid #999; margin-top:10px; padding:10px;'>\";\n\n $posthtml .= \"<span style='font-size:1.2em; font-weight:bold;'>\".get_string(\"invitewebaccesshtml\", \"via\").\"</span>\n <br/><br/>\".get_string(\"inviteclicktoaccesshtml\", \"via\").\"\";\n\n $posthtml .= \"<div style='text-align:center'>\";\n\n $posthtml .= \"<a style='background:#6ab605; padding:8px 10px; color:#fff; text-decoration:none;'\n href='\".$CFG->wwwroot.\"/mod/via/view.php?id=\".$cm->id.\"' >\n <img src='\" . $CFG->wwwroot .\"/mod/via/pix/access.png' align='absmiddle' hspace='5' height='27px' width='27px'>\".\n get_string(\"gotoactivity\", \"via\").\"</a>\";\n\n $posthtml .= \"<p><br/>\". $CFG->wwwroot.\"/mod/via/view.php?id=\".$cm->id .\"</p>\";\n\n $posthtml .= \"</div>\";\n\n $posthtml .= \"</div>\";\n\n $posthtml .= \"<div style='border:1px solid #999; margin-top:10px; font-size:0.9em; padding:10px;'>\";\n\n $posthtml .= get_string(\"invitewarninghtml\", \"via\");\n\n $posthtml .= \"</div>\";\n\n $posthtml .= \"</div>\";\n\n $posthtml .= '</td></tr></table>'.\"\\n\\n\";\n\n $posthtml .= '</body>';\n\n return $posthtml;\n}", "title": "" }, { "docid": "8e01be3627f332b917f4744bc587c719", "score": "0.56902945", "text": "public function sendShortMessage(ShortMessage $shortMessage);", "title": "" }, { "docid": "3662a9f642b63cc9fcbffe85f0032b7c", "score": "0.5679998", "text": "function SendMailForApprovals($ToMail,$subject,$htmlContent)\r\n{\r\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\r\n $headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\";\r\n\r\n // Additional headers\r\n $headers .= 'From: TFM ERP Mail Notification <[email protected]>' . \"\\r\\n\";\r\n\r\n\r\n //mail($ToMail,$subject,$htmlContent,$headers);\r\n\r\n}", "title": "" }, { "docid": "a6d58d95a1cd6ec1bcb3ef24530095ec", "score": "0.5656272", "text": "function send_notification($evt, $p1 = \"\", $p2 = \"\", $p3 = \"\", $p4 = \"\", $preview_test = false)\n{\n global $db;\n global $_POST;\n global $_SESSION;\n global $_POST;\n global $_REQUEST;\n global $site_name;\n global $site_admin_email;\n global $global_settings;\n $dp = new TMySQLQuery;\n $dp->connection = $db;\n $dt = new TMySQLQuery;\n $dt->connection = $db;\n $dw = new TMySQLQuery;\n $dw->connection = $db;\n $dz = new TMySQLQuery;\n $dz->connection = $db;\n $dx = new TMySQLQuery;\n $dx->connection = $db;\n\n $sql = \"select subject,message,html,events,title from notifications where events='\" . $evt . \"' and enabled=1\";\n $dp->open($sql);\n if (!$dp->eof) {\n $from_email = from_email;\n $to_email = $site_admin_email;\n $subject = $dp->row[\"subject\"];\n if ($dp->row[\"html\"] == 1) {\n if (file_exists($_SERVER[\"DOCUMENT_ROOT\"] . site_root . \"/templates/emails/\" . $dp->row[\"events\"] . \".tpl\")) {\n $textsend = file_get_contents($_SERVER[\"DOCUMENT_ROOT\"] . site_root . \"/templates/emails/\" . $dp->row[\"events\"] . \".tpl\");\n } else {\n $textsend = $dp->row[\"message\"];\n }\n } else {\n $textsend = $dp->row[\"message\"];\n }\n\n if ($evt == \"contacts_to_admin\") {\n $textsend = str_replace(\"{WORD_NAME}\", word_lang(\"full name\"), $textsend);\n $textsend = str_replace(\"{NAME}\", $_POST[\"name\"], $textsend);\n $textsend = str_replace(\"{WORD_EMAIL}\", word_lang(\"e-mail\"), $textsend);\n $textsend = str_replace(\"{EMAIL}\", $_POST[\"email\"], $textsend);\n $textsend = str_replace(\"{WORD_TELEPHONE}\", word_lang(\"telephone\"), $textsend);\n $textsend = str_replace(\"{TELEPHONE}\", $_POST[\"telephone\"], $textsend);\n $textsend = str_replace(\"{WORD_METHOD}\", word_lang(\"contact method\"), $textsend);\n $textsend = str_replace(\"{METHOD}\", $_POST[\"method\"], $textsend);\n $textsend = str_replace(\"{WORD_QUESTION}\", word_lang(\"question\"), $textsend);\n $textsend = str_replace(\"{QUESTION}\", $_POST[\"question\"], $textsend);\n $textsend = str_replace(\"{WORD_DATE}\", word_lang(\"date\"), $textsend);\n $textsend = str_replace(\"{DATE}\", date(datetime_format), $textsend);\n }\n\n\n if ($evt == \"contacts_to_user\") {\n $to_email = $_POST[\"email\"];\n $textsend = str_replace(\"{NAME}\", $_POST[\"name\"], $textsend);\n }\n\n\n if ($evt == \"fraud_to_user\") {\n $to_email = $p2;\n $textsend = str_replace(\"{NEWPASSWORD}\", $p1, $textsend);\n $textsend = str_replace(\"{NAME}\", $p3, $textsend);\n }\n\n\n if ($evt == \"neworder_to_user\") {\n $subject = str_replace(\"{ORDER_ID}\", $p1, $subject);\n\n $sql = \"select * from orders where id=\" . (int)$p1;\n $dt->open($sql);\n if (!$dt->eof) {\n $textsend = str_replace(\"{WORD_ORDER}\", word_lang(\"order\"), $textsend);\n $textsend = str_replace(\"{WORD_SUBTOTAL}\", word_lang(\"subtotal\"), $textsend);\n $textsend = str_replace(\"{WORD_DISCOUNT}\", word_lang(\"discount\"), $textsend);\n $textsend = str_replace(\"{WORD_SHIPPING}\", word_lang(\"shipping\"), $textsend);\n $textsend = str_replace(\"{WORD_TAXES}\", word_lang(\"taxes\"), $textsend);\n $textsend = str_replace(\"{WORD_TOTAL}\", word_lang(\"total\"), $textsend);\n $textsend = str_replace(\"{WORD_DATE}\", word_lang(\"date\"), $textsend);\n $textsend = str_replace(\"{WORD_LOGIN}\", word_lang(\"login\"), $textsend);\n $textsend = str_replace(\"{WORD_NAME}\", word_lang(\"full name\"), $textsend);\n $textsend = str_replace(\"{WORD_EMAIL}\", word_lang(\"email\"), $textsend);\n $textsend = str_replace(\"{WORD_TELEPHONE}\", word_lang(\"telephone\"), $textsend);\n $textsend = str_replace(\"{WORD_BILLING_INFO}\", word_lang(\"billing address\"), $textsend);\n $textsend = str_replace(\"{WORD_SHIPPING_INFO}\", word_lang(\"shipping address\"), $textsend);\n\n $textsend = str_replace(\"{ORDER}\", strval($dt->row[\"id\"]), $textsend);\n $textsend = str_replace(\"{DATE}\", date(datetime_format), $textsend);\n $textsend = str_replace(\"{SUBTOTAL}\", currency(1) . strval(float_opt($dt->row[\"subtotal\"], 2)) . \" \" . currency(2), $textsend);\n $textsend = str_replace(\"{DISCOUNT}\", currency(1) . strval(float_opt($dt->row[\"discount\"], 2)) . \" \" . currency(2), $textsend);\n $textsend = str_replace(\"{SHIPPING}\", currency(1) . strval(float_opt($dt->row[\"shipping\"], 2)) . \" \" . currency(2), $textsend);\n $textsend = str_replace(\"{TAXES}\", currency(1) . strval(float_opt($dt->row[\"tax\"], 2)) . \" \" . currency(2), $textsend);\n $textsend = str_replace(\"{TOTAL}\", currency(1) . strval(float_opt($dt->row[\"total\"], 2)) . \" \" . currency(2), $textsend);\n\n $textsend = str_replace(\"{BILLING_FIRSTNAME}\", $dt->row[\"billing_firstname\"], $textsend);\n $textsend = str_replace(\"{BILLING_LASTNAME}\", $dt->row[\"billing_lastname\"], $textsend);\n $textsend = str_replace(\"{BILLING_ADDRESS}\", $dt->row[\"billing_address\"], $textsend);\n $textsend = str_replace(\"{BILLING_CITY}\", $dt->row[\"billing_city\"], $textsend);\n $textsend = str_replace(\"{BILLING_ZIP}\", $dt->row[\"billing_zip\"], $textsend);\n $textsend = str_replace(\"{BILLING_COUNTRY}\", $dt->row[\"billing_country\"], $textsend);\n\n $textsend = str_replace(\"{SHIPPING_FIRSTNAME}\", $dt->row[\"shipping_firstname\"], $textsend);\n $textsend = str_replace(\"{SHIPPING_LASTNAME}\", $dt->row[\"shipping_lastname\"], $textsend);\n $textsend = str_replace(\"{SHIPPING_ADDRESS}\", $dt->row[\"shipping_address\"], $textsend);\n $textsend = str_replace(\"{SHIPPING_CITY}\", $dt->row[\"shipping_city\"], $textsend);\n $textsend = str_replace(\"{SHIPPING_ZIP}\", $dt->row[\"shipping_zip\"], $textsend);\n $textsend = str_replace(\"{SHIPPING_COUNTRY}\", $dt->row[\"shipping_country\"], $textsend);\n\n $sql = \"select id_parent,login,name,email,telephone,address,country from users where id_parent=\" . $dt->row[\"user\"];\n $dw->open($sql);\n if (!$dw->eof) {\n $textsend = str_replace(\"{NAME}\", $dw->row[\"name\"], $textsend);\n $to_email = $dw->row[\"email\"];\n }\n\n $item_list = \"\";\n $i = 1;\n $sql = \"select price,item,quantity,prints,option1_id,option1_value,option2_id,option2_value,option3_id,option3_value from orders_content where id_parent=\" . (int)$p1;;\n $dz->open($sql);\n while (!$dz->eof) {\n if ($dz->row[\"prints\"] != 1) {\n $sql = \"select id,id_parent,name,shipped from items where id=\" . $dz->row[\"item\"];\n $dw->open($sql);\n if (!$dw->eof) {\n $item_list .= $i . \". ID=\" . $dw->row[\"id_parent\"] . \" - \" . $dw->row[\"name\"] . \" - \" . currency(1) . float_opt($dz->row[\"price\"], 2) . \" \" . currency(2) . \" - \" . $dz->row[\"quantity\"];\n\n\n if ($dw->row[\"shipped\"] != 1) {\n $sql = \"select link from downloads where id_parent=\" . $dw->row[\"id\"] . \" and order_id=\" . (int)$p1;\n $dx->open($sql);\n if (!$dx->eof) {\n if ($dp->row[\"html\"] == 1) {\n $item_list .= \"<br><a href='\" . surl . site_root . \"/members/download.php?f=\" . $dx->row[\"link\"] . \"'>\" . surl . site_root . \"/members/download.php?f=\" . $dx->row[\"link\"] . \"</a>\";\n } else {\n $item_list .= \"\\n\" . surl . site_root . \"/members/download.php?f=\" . $dx->row[\"link\"];\n }\n }\n }\n\n if ($dp->row[\"html\"] == 1) {\n $item_list .= \"<br><br>\";\n } else {\n $item_list .= \"\\n\\n\";\n }\n\n }\n } else {\n $sql = \"select id_parent,price,title,itemid from prints_items where id_parent=\" . $dz->row[\"item\"];\n $dw->open($sql);\n if (!$dw->eof) {\n $item_list .= $i . \". ID=\" . $dw->row[\"itemid\"] . \" - \" . $dw->row[\"title\"] . \" - \" . currency(1) . float_opt($dz->row[\"price\"], 2) . \" \" . currency(2) . \" - \" . $dz->row[\"quantity\"] . \"\";\n\n if ($dp->row[\"html\"] == 1) {\n $item_list .= \"<br>\";\n } else {\n $item_list .= \"\\n\";\n }\n\n for ($j = 1; $j < 4; $j++) {\n if ($dz->row[\"option\" . $j . \"_id\"] != 0 and $dz->row[\"option\" . $j . \"_value\"] != \"\") {\n $sql = \"select title from products_options where id=\" . $dz->row[\"option\" . $j . \"_id\"];\n $dx->open($sql);\n if (!$dx->eof) {\n $item_list .= $dx->row[\"title\"] . \": \" . $dz->row[\"option\" . $j . \"_value\"] . \". \";\n }\n }\n }\n }\n\n if ($dp->row[\"html\"] == 1) {\n $item_list .= \"<br><br>\";\n } else {\n $item_list .= \"\\n\\n\";\n }\n }\n $i++;\n $dz->movenext();\n }\n $textsend = str_replace(\"{ITEM_LIST}\", $item_list, $textsend);\n }\n }\n\n\n if ($evt == \"neworder_to_admin\") {\n $subject = str_replace(\"{ORDER_ID}\", $p1, $subject);\n\n $sql = \"select * from orders where id=\" . (int)$p1;\n $dt->open($sql);\n if (!$dt->eof) {\n $textsend = str_replace(\"{WORD_ORDER}\", word_lang(\"order\"), $textsend);\n $textsend = str_replace(\"{WORD_SUBTOTAL}\", word_lang(\"subtotal\"), $textsend);\n $textsend = str_replace(\"{WORD_DISCOUNT}\", word_lang(\"discount\"), $textsend);\n $textsend = str_replace(\"{WORD_SHIPPING}\", word_lang(\"shipping\"), $textsend);\n $textsend = str_replace(\"{WORD_TAXES}\", word_lang(\"taxes\"), $textsend);\n $textsend = str_replace(\"{WORD_TOTAL}\", word_lang(\"total\"), $textsend);\n $textsend = str_replace(\"{WORD_DATE}\", word_lang(\"date\"), $textsend);\n $textsend = str_replace(\"{WORD_LOGIN}\", word_lang(\"login\"), $textsend);\n $textsend = str_replace(\"{WORD_NAME}\", word_lang(\"full name\"), $textsend);\n $textsend = str_replace(\"{WORD_EMAIL}\", word_lang(\"email\"), $textsend);\n $textsend = str_replace(\"{WORD_TELEPHONE}\", word_lang(\"telephone\"), $textsend);\n $textsend = str_replace(\"{WORD_ADDRESS}\", word_lang(\"address\"), $textsend);\n $textsend = str_replace(\"{WORD_COUNTRY}\", word_lang(\"country\"), $textsend);\n $textsend = str_replace(\"{WORD_BILLING_INFO}\", word_lang(\"billing address\"), $textsend);\n $textsend = str_replace(\"{WORD_SHIPPING_INFO}\", word_lang(\"shipping address\"), $textsend);\n $textsend = str_replace(\"{WORD_CUSTOMER_ID}\", word_lang(\"customer\") . \" ID\", $textsend);\n\n $textsend = str_replace(\"{ORDER}\", strval($dt->row[\"id\"]), $textsend);\n $textsend = str_replace(\"{DATE}\", date(datetime_format), $textsend);\n $textsend = str_replace(\"{SUBTOTAL}\", currency(1) . strval(float_opt($dt->row[\"subtotal\"], 2)) . \" \" . currency(2), $textsend);\n $textsend = str_replace(\"{DISCOUNT}\", currency(1) . strval(float_opt($dt->row[\"discount\"], 2)) . \" \" . currency(2), $textsend);\n $textsend = str_replace(\"{SHIPPING}\", currency(1) . strval(float_opt($dt->row[\"shipping\"], 2)) . \" \" . currency(2), $textsend);\n $textsend = str_replace(\"{TAXES}\", currency(1) . strval(float_opt($dt->row[\"tax\"], 2)) . \" \" . currency(2), $textsend);\n $textsend = str_replace(\"{TOTAL}\", currency(1) . strval(float_opt($dt->row[\"total\"], 2)) . \" \" . currency(2), $textsend);\n\n $textsend = str_replace(\"{BILLING_FIRSTNAME}\", $dt->row[\"billing_firstname\"], $textsend);\n $textsend = str_replace(\"{BILLING_LASTNAME}\", $dt->row[\"billing_lastname\"], $textsend);\n $textsend = str_replace(\"{BILLING_ADDRESS}\", $dt->row[\"billing_address\"], $textsend);\n $textsend = str_replace(\"{BILLING_CITY}\", $dt->row[\"billing_city\"], $textsend);\n $textsend = str_replace(\"{BILLING_ZIP}\", $dt->row[\"billing_zip\"], $textsend);\n $textsend = str_replace(\"{BILLING_COUNTRY}\", $dt->row[\"billing_country\"], $textsend);\n\n $textsend = str_replace(\"{SHIPPING_FIRSTNAME}\", $dt->row[\"shipping_firstname\"], $textsend);\n $textsend = str_replace(\"{SHIPPING_LASTNAME}\", $dt->row[\"shipping_lastname\"], $textsend);\n $textsend = str_replace(\"{SHIPPING_ADDRESS}\", $dt->row[\"shipping_address\"], $textsend);\n $textsend = str_replace(\"{SHIPPING_CITY}\", $dt->row[\"shipping_city\"], $textsend);\n $textsend = str_replace(\"{SHIPPING_ZIP}\", $dt->row[\"shipping_zip\"], $textsend);\n $textsend = str_replace(\"{SHIPPING_COUNTRY}\", $dt->row[\"shipping_country\"], $textsend);\n\n\n $sql = \"select id_parent,login,name,email,telephone,address,country from users where id_parent=\" . $dt->row[\"user\"];\n $dw->open($sql);\n if (!$dw->eof) {\n $textsend = str_replace(\"{CUSTOMERID}\", $dw->row[\"id_parent\"], $textsend);\n $textsend = str_replace(\"{LOGIN}\", $dw->row[\"login\"], $textsend);\n $textsend = str_replace(\"{NAME}\", $dw->row[\"name\"], $textsend);\n if ($dp->row[\"html\"] == 1) {\n $textsend = str_replace(\"{EMAIL}\", \"<a href='mailto:\" . $dw->row[\"email\"] . \"'>\" . $dw->row[\"email\"] . \"</a>\", $textsend);\n } else {\n $textsend = str_replace(\"{EMAIL}\", $dw->row[\"email\"], $textsend);\n }\n $textsend = str_replace(\"{TELEPHONE}\", $dw->row[\"telephone\"], $textsend);\n }\n\n $item_list = \"\";\n $i = 1;\n $sql = \"select price,item,quantity,prints,option1_id,option1_value,option2_id,option2_value,option3_id,option3_value from orders_content where id_parent=\" . (int)$p1;;\n $dz->open($sql);\n while (!$dz->eof) {\n if ($dz->row[\"prints\"] != 1) {\n $sql = \"select id,id_parent,name,shipped from items where id=\" . $dz->row[\"item\"];\n $dw->open($sql);\n if (!$dw->eof) {\n $item_list .= $i . \". ID=\" . $dw->row[\"id_parent\"] . \" - \" . $dw->row[\"name\"] . \" - \" . currency(1) . float_opt($dz->row[\"price\"], 2) . \" \" . currency(2) . \" - \" . $dz->row[\"quantity\"];\n\n\n if ($dw->row[\"shipped\"] != 1) {\n $sql = \"select link from downloads where id_parent=\" . $dw->row[\"id\"] . \" and order_id=\" . (int)$p1;\n $dx->open($sql);\n if (!$dx->eof) {\n if ($dp->row[\"html\"] == 1) {\n $item_list .= \"<br><a href='\" . surl . site_root . \"/members/download.php?f=\" . $dx->row[\"link\"] . \"'>\" . surl . site_root . \"/members/download.php?f=\" . $dx->row[\"link\"] . \"</a>\";\n } else {\n $item_list .= \"\\n\" . surl . site_root . \"/members/download.php?f=\" . $dx->row[\"link\"];\n }\n }\n }\n\n if ($dp->row[\"html\"] == 1) {\n $item_list .= \"<br><br>\";\n } else {\n $item_list .= \"\\n\\n\";\n }\n\n }\n } else {\n $sql = \"select id_parent,price,title,itemid from prints_items where id_parent=\" . $dz->row[\"item\"];\n $dw->open($sql);\n if (!$dw->eof) {\n $item_list .= $i . \". ID=\" . $dw->row[\"itemid\"] . \" - \" . $dw->row[\"title\"] . \" - \" . currency(1) . float_opt($dz->row[\"price\"], 2) . \" \" . currency(2) . \" - \" . $dz->row[\"quantity\"] . \"\";\n\n if ($dp->row[\"html\"] == 1) {\n $item_list .= \"<br>\";\n } else {\n $item_list .= \"\\n\";\n }\n\n for ($j = 1; $j < 4; $j++) {\n if ($dz->row[\"option\" . $j . \"_id\"] != 0 and $dz->row[\"option\" . $j . \"_value\"] != \"\") {\n $sql = \"select title from products_options where id=\" . $dz->row[\"option\" . $j . \"_id\"];\n $dx->open($sql);\n if (!$dx->eof) {\n $item_list .= $dx->row[\"title\"] . \": \" . $dz->row[\"option\" . $j . \"_value\"] . \". \";\n }\n }\n }\n }\n\n if ($dp->row[\"html\"] == 1) {\n $item_list .= \"<br><br>\";\n } else {\n $item_list .= \"\\n\\n\";\n }\n }\n $i++;\n $dz->movenext();\n }\n $textsend = str_replace(\"{ITEM_LIST}\", $item_list, $textsend);\n }\n }\n\n\n if ($evt == \"signup_to_admin\") {\n $sql = \"select login,name,email,city,country,address,telephone from users where id_parent=\" . (int)$p1;\n $dt->open($sql);\n if (!$dt->eof) {\n $textsend = str_replace(\"{WORD_DATE}\", word_lang(\"date\"), $textsend);\n $textsend = str_replace(\"{DATE}\", date(datetime_format), $textsend);\n $textsend = str_replace(\"{WORD_LOGIN}\", word_lang(\"login\"), $textsend);\n $textsend = str_replace(\"{WORD_NAME}\", word_lang(\"full name\"), $textsend);\n $textsend = str_replace(\"{WORD_EMAIL}\", word_lang(\"e-mail\"), $textsend);\n $textsend = str_replace(\"{WORD_TELEPHONE}\", word_lang(\"telephone\"), $textsend);\n $textsend = str_replace(\"{WORD_ADDRESS}\", word_lang(\"address\"), $textsend);\n $textsend = str_replace(\"{WORD_COUNTRY}\", word_lang(\"country\"), $textsend);\n $textsend = str_replace(\"{WORD_CITY}\", word_lang(\"city\"), $textsend);\n\n $textsend = str_replace(\"{LOGIN}\", $dt->row[\"login\"], $textsend);\n $textsend = str_replace(\"{NAME}\", $dt->row[\"name\"], $textsend);\n if ($dp->row[\"html\"] == 1) {\n $textsend = str_replace(\"{EMAIL}\", \"<a href='mailto:\" . $dt->row[\"email\"] . \"'>\" . $dt->row[\"email\"] . \"</a>\", $textsend);\n } else {\n $textsend = str_replace(\"{EMAIL}\", $dt->row[\"email\"], $textsend);\n }\n $textsend = str_replace(\"{TELEPHONE}\", $dt->row[\"telephone\"], $textsend);\n $textsend = str_replace(\"{ADDRESS}\", $dt->row[\"address\"], $textsend);\n $textsend = str_replace(\"{COUNTRY}\", $dt->row[\"country\"], $textsend);\n $textsend = str_replace(\"{CITY}\", $dt->row[\"city\"], $textsend);\n }\n }\n\n\n if ($evt == \"signup_to_user\") {\n $to_email = $_POST[\"email\"];\n if ($dp->row[\"html\"] == 1) {\n $textsend = str_replace(\"{CONFIRMATION_LINK}\", \"<a href='\" . $p1 . \"'>\" . $p1 . \"</a>\", $textsend);\n } else {\n $textsend = str_replace(\"{CONFIRMATION_LINK}\", $p1, $textsend);\n }\n $textsend = str_replace(\"{NAME}\", $_POST[\"name\"], $textsend);\n }\n\n if ($evt == \"signup_guest\") {\n $to_email = result($_POST[\"guest_email\"]);\n $textsend = str_replace(\"{LOGIN}\", $p1, $textsend);\n $textsend = str_replace(\"{PASSWORD}\", $p2, $textsend);\n }\n\n\n if ($evt == \"forgot_password\") {\n $sql = \"select name,email,password,login from users where email='\" . result2($_POST[\"email\"]) . \"'\";\n $dt->open($sql);\n if (!$dt->eof) {\n $newpassword = create_password();\n\n $to_email = $dt->row[\"email\"];\n $textsend = str_replace(\"{PASSWORD}\", $newpassword, $textsend);\n $textsend = str_replace(\"{NAME}\", $dt->row[\"name\"], $textsend);\n $textsend = str_replace(\"{LOGIN}\", $dt->row[\"login\"], $textsend);\n\n if ($preview_test == false) {\n $sql = \"update users set password='\" . md5($newpassword) . \"' where email='\" . result2($_POST[\"email\"]) . \"'\";\n $db->execute($sql);\n }\n }\n }\n\n if ($evt == \"tell_a_friend\") {\n $to_email = $_REQUEST[\"email2\"];\n $from_email = from_email;\n $textsend = str_replace(\"{NAME2}\", $_REQUEST[\"name2\"], $textsend);\n $textsend = str_replace(\"{NAME}\", $_REQUEST[\"name\"], $textsend);\n $textsend = str_replace(\"{EMAIL}\", $_REQUEST[\"email\"], $textsend);\n if ($dp->row[\"html\"] == 1) {\n $textsend = str_replace(\"{URL}\", \"<a href='\" . $p1 . \"'>\" . $p1 . \"</a>\", $textsend);\n } else {\n $textsend = str_replace(\"{URL}\", $p1, $textsend);\n }\n }\n\n if ($evt == \"subscription_to_admin\") {\n $sql = \"select user,data1,data2,title,subscription from subscription_list where id_parent=\" . (int)$p1;\n $dt->open($sql);\n if (!$dt->eof) {\n $details = $dt->row[\"title\"];\n\n $sql = \"select price from subscription where id_parent=\" . $dt->row[\"subscription\"];\n $dw->open($sql);\n if (!$dw->eof) {\n $details .= \" (\" . currency(1, false) . strval(float_opt($dw->row[\"price\"], 2)) . currency(2, false) . \")\";\n }\n\n $subject = str_replace(\"{SUBSCRIPTION}\", strval($p1), $subject);\n $textsend = str_replace(\"{SUBSCRIPTION_DETAILS}\", $details, $textsend);\n $textsend = str_replace(\"{WORD_DATE}\", word_lang(\"date\"), $textsend);\n $textsend = str_replace(\"{DATE}\", date(datetime_format), $textsend);\n $textsend = str_replace(\"{WORD_LOGIN}\", word_lang(\"login\"), $textsend);\n $textsend = str_replace(\"{WORD_NAME}\", word_lang(\"full name\"), $textsend);\n $textsend = str_replace(\"{WORD_EMAIL}\", word_lang(\"email\"), $textsend);\n $textsend = str_replace(\"{WORD_TELEPHONE}\", word_lang(\"telephone\"), $textsend);\n $textsend = str_replace(\"{WORD_ADDRESS}\", word_lang(\"address\"), $textsend);\n $textsend = str_replace(\"{WORD_COUNTRY}\", word_lang(\"country\"), $textsend);\n\n $sql = \"select name,email,login,telephone,address,country from users where login='\" . $dt->row[\"user\"] . \"'\";\n $dw->open($sql);\n if (!$dw->eof) {\n $textsend = str_replace(\"{LOGIN}\", $dw->row[\"login\"], $textsend);\n $textsend = str_replace(\"{NAME}\", $dw->row[\"name\"], $textsend);\n if ($dp->row[\"html\"] == 1) {\n $textsend = str_replace(\"{EMAIL}\", \"<a href='mailto:\" . $dw->row[\"email\"] . \"'>\" . $dw->row[\"email\"] . \"</a>\", $textsend);\n } else {\n $textsend = str_replace(\"{EMAIL}\", $dw->row[\"email\"], $textsend);\n }\n $textsend = str_replace(\"{TELEPHONE}\", $dw->row[\"telephone\"], $textsend);\n $textsend = str_replace(\"{ADDRESS}\", $dw->row[\"address\"], $textsend);\n $textsend = str_replace(\"{COUNTRY}\", $dw->row[\"country\"], $textsend);\n }\n }\n }\n\n if ($evt == \"subscription_to_user\") {\n $sql = \"select user,data1,data2,title,subscription from subscription_list where id_parent=\" . (int)$p1;\n $dt->open($sql);\n if (!$dt->eof) {\n $details = $dt->row[\"title\"];\n\n $sql = \"select price from subscription where id_parent=\" . $dt->row[\"subscription\"];\n $dw->open($sql);\n if (!$dw->eof) {\n $details .= \" (\" . currency(1, false) . strval(float_opt($dw->row[\"price\"], 2)) . currency(2, false) . \")\";\n }\n\n $subject = str_replace(\"{SUBSCRIPTION}\", strval($p1), $subject);\n $textsend = str_replace(\"{SUBSCRIPTION_DETAILS}\", $details, $textsend);\n $textsend = str_replace(\"{WORD_DATE}\", word_lang(\"date\"), $textsend);\n $textsend = str_replace(\"{DATE}\", date(datetime_format), $textsend);\n\n $sql = \"select name,email from users where login='\" . $dt->row[\"user\"] . \"'\";\n $dw->open($sql);\n if (!$dw->eof) {\n $textsend = str_replace(\"{NAME}\", $dw->row[\"name\"], $textsend);\n $to_email = $dw->row[\"email\"];\n }\n }\n }\n\n if ($evt == \"credits_to_admin\") {\n $sql = \"select user,data,title,credits from credits_list where id_parent=\" . (int)$p1;\n $dt->open($sql);\n if (!$dt->eof) {\n $details = $dt->row[\"title\"];\n\n $sql = \"select price from credits where id_parent=\" . $dt->row[\"credits\"];\n $dw->open($sql);\n if (!$dw->eof) {\n $details .= \" (\" . currency(1, false) . strval(float_opt($dw->row[\"price\"], 2)) . currency(2, false) . \")\";\n }\n\n $subject = str_replace(\"{CREDITS}\", strval($p1), $subject);\n $textsend = str_replace(\"{CREDITS_DETAILS}\", $details, $textsend);\n $textsend = str_replace(\"{WORD_DATE}\", word_lang(\"date\"), $textsend);\n $textsend = str_replace(\"{DATE}\", date(datetime_format), $textsend);\n $textsend = str_replace(\"{WORD_LOGIN}\", word_lang(\"login\"), $textsend);\n $textsend = str_replace(\"{WORD_NAME}\", word_lang(\"full name\"), $textsend);\n $textsend = str_replace(\"{WORD_EMAIL}\", word_lang(\"email\"), $textsend);\n $textsend = str_replace(\"{WORD_TELEPHONE}\", word_lang(\"telephone\"), $textsend);\n $textsend = str_replace(\"{WORD_ADDRESS}\", word_lang(\"address\"), $textsend);\n $textsend = str_replace(\"{WORD_COUNTRY}\", word_lang(\"country\"), $textsend);\n\n $sql = \"select name,email,login,telephone,address,country from users where login='\" . $dt->row[\"user\"] . \"'\";\n $dw->open($sql);\n if (!$dw->eof) {\n $textsend = str_replace(\"{LOGIN}\", $dw->row[\"login\"], $textsend);\n $textsend = str_replace(\"{NAME}\", $dw->row[\"name\"], $textsend);\n if ($dp->row[\"html\"] == 1) {\n $textsend = str_replace(\"{EMAIL}\", \"<a href='mailto:\" . $dw->row[\"email\"] . \"'>\" . $dw->row[\"email\"] . \"</a>\", $textsend);\n } else {\n $textsend = str_replace(\"{EMAIL}\", $dw->row[\"email\"], $textsend);\n }\n $textsend = str_replace(\"{TELEPHONE}\", $dw->row[\"telephone\"], $textsend);\n $textsend = str_replace(\"{ADDRESS}\", $dw->row[\"address\"], $textsend);\n $textsend = str_replace(\"{COUNTRY}\", $dw->row[\"country\"], $textsend);\n }\n }\n }\n\n if ($evt == \"credits_to_user\") {\n $sql = \"select user,data,title,credits from credits_list where id_parent=\" . (int)$p1;\n $dt->open($sql);\n if (!$dt->eof) {\n $details = $dt->row[\"title\"];\n\n $sql = \"select price from credits where id_parent=\" . $dt->row[\"credits\"];\n $dw->open($sql);\n if (!$dp->eof) {\n $details .= \" (\" . currency(1, false) . strval(float_opt($dw->row[\"price\"], 2)) . currency(2, false) . \")\";\n }\n\n $subject = str_replace(\"{CREDITS}\", strval($p1), $subject);\n $textsend = str_replace(\"{CREDITS_DETAILS}\", $details, $textsend);\n $textsend = str_replace(\"{WORD_DATE}\", word_lang(\"date\"), $textsend);\n $textsend = str_replace(\"{DATE}\", date(datetime_format), $textsend);\n\n $sql = \"select name,email from users where login='\" . $dt->row[\"user\"] . \"'\";\n $dw->open($sql);\n if (!$dw->eof) {\n $textsend = str_replace(\"{NAME}\", $dw->row[\"name\"], $textsend);\n $to_email = $dw->row[\"email\"];\n }\n }\n }\n\n if ($evt == \"commission_to_affiliate\" or $evt == \"commission_to_seller\") {\n $sql = \"select name,email from users where id_parent=\" . (int)$p1;\n $dw->open($sql);\n if (!$dw->eof) {\n $textsend = str_replace(\"{NAME}\", $dw->row[\"name\"], $textsend);\n $to_email = $dw->row[\"email\"];\n }\n\n $sql = \"select name from structure where id=\" . (int)$p3;\n $dw->open($sql);\n if (!$dw->eof) {\n $textsend = str_replace(\"{FILE}\", \"ID=\" . $p3 . \" - \" . $dw->row[\"name\"], $textsend);\n }\n\n $textsend = str_replace(\"{ORDER_ID}\", $p2, $textsend);\n\n $sql = \"select price from payout_price\";\n $dw->open($sql);\n if (!$dw->eof) {\n $textsend = str_replace(\"{EARNING}\", currency(1, false) . float_opt($dw->row[\"price\"] * $p4, 2) . \" \" . currency(2, false), $textsend);\n }\n }\n\n if ($evt == \"exam_to_admin\" or $evt == \"exam_to_seller\") {\n $sql = \"select name,email,login from users where id_parent=\" . (int)$p1;\n $dw->open($sql);\n if (!$dw->eof) {\n $textsend = str_replace(\"{NAME}\", $dw->row[\"name\"], $textsend);\n $textsend = str_replace(\"{LOGIN}\", $dw->row[\"login\"], $textsend);\n $to_email = $dw->row[\"email\"];\n }\n\n $sql = \"select id,user,data,status,comments from examinations where id=\" . (int)$p2;\n $dw->open($sql);\n if (!$dw->eof) {\n $textsend = str_replace(\"{ID}\", $dw->row[\"id\"], $textsend);\n $textsend = str_replace(\"{DATE}\", date(date_format, $dw->row[\"data\"]), $textsend);\n $textsend = str_replace(\"{COMMENTS}\", $dw->row[\"comments\"], $textsend);\n if ($dw->row[\"status\"] == 0) {\n $textsend = str_replace(\"{RESULT}\", word_lang(\"pending\"), $textsend);\n }\n if ($dw->row[\"status\"] == 1) {\n $textsend = str_replace(\"{RESULT}\", word_lang(\"approved\"), $textsend);\n }\n if ($dw->row[\"status\"] == 2) {\n $textsend = str_replace(\"{RESULT}\", word_lang(\"declined\"), $textsend);\n }\n }\n }\n\n\n if ($preview_test == true and $dp->row[\"html\"] != 1) {\n $textsend = \"<div class='header_preview'>\" . $dp->row[\"title\"] . \"</div>\" . $textsend;\n }\n\n if ($dp->row[\"html\"] == 1) {\n if (file_exists($_SERVER[\"DOCUMENT_ROOT\"] . site_root . \"/templates/emails/header.tpl\")) {\n $textsend = str_replace(\"{SITE_ROOT}\", surl . site_root, file_get_contents($_SERVER[\"DOCUMENT_ROOT\"] . site_root . \"/templates/emails/header.tpl\")) . $textsend;\n }\n if (file_exists($_SERVER[\"DOCUMENT_ROOT\"] . site_root . \"/templates/emails/footer.tpl\")) {\n $textsend .= str_replace(\"{SITE_ROOT}\", surl . site_root, file_get_contents($_SERVER[\"DOCUMENT_ROOT\"] . site_root . \"/templates/emails/footer.tpl\"));\n }\n }\n\n $subject = str_replace(\"{SITE_NAME}\", $site_name, $subject);\n $textsend = str_replace(\"{SITE_NAME}\", $site_name, $textsend);\n $textsend = str_replace(\"{ADDRESS}\", $global_settings[\"company_address\"], $textsend);\n\n $textsend = translate_text($textsend);\n\n if (!$preview_test) {\n $m = new Mail;\n $m->From($from_email);\n $m->To($to_email);\n $m->Subject($subject);\n $m->Body($textsend);\n $m->Send($dp->row[\"html\"]);\n }\n\n return $textsend;\n }\n}", "title": "" }, { "docid": "e23d8a87b9b278fe11c4c150011b5b2c", "score": "0.56558186", "text": "function email($source_path, $from, $to, $subject, $sendcopyto = \"\", $bounceto = \"\", $plain_text_version = \"\"){\n\t\t// capture output of this template\n\t\t\t$body = $this->show($source_path, false, true);\n\t\t// capture output of plain text template\n\t\t\t$plain_text_version = $this->show($plain_text_version, false, true);\n\t\t// load email library\n\t\t\t//$this->zajlib->load->library('email');\n\t\t\t// todo: it is probably a good idea to add a warning on a failed email send attempt\n\t\t\treturn $this->zajlib->email->send_html($from, $to, $subject, $body, $sendcopyto, $bounceto, $plain_text_version);\n\t}", "title": "" }, { "docid": "194dce117ee731b6dd51d3644596a9dc", "score": "0.5652426", "text": "protected function _sendMail()\n {}", "title": "" }, { "docid": "ef03e8f381a40ce7740e12a78441e094", "score": "0.5621794", "text": "function rex_newsletter_sendmail($userinfo, $mail_from_email, $mail_from_name, $mail_subject, $mail_body_text, $mail_body_html)\n{\n\n global $REX;\n\n\n if(trim($userinfo[\"email\"]) == \"\")\n return FALSE;\n\n $mail = new rex_mailer();\n $mail->AddAddress($userinfo[\"email\"]);\n $mail->From = $mail_from_email;\n $mail->FromName = $mail_from_name;\n\n $mail->Subject = $mail_subject;\n\n if(trim($mail_body_html) != \"\")\n {\n $mail->Body = $mail_body_html;\n $mail->AltBody = $mail_body_text;\n foreach($userinfo as $k => $v)\n {\n $mail->Body = str_replace( \"###\".$k.\"###\",$v,$mail->Body);\n $mail->Body = str_replace( \"###\".strtoupper($k).\"###\",$v,$mail->Body);\n $mail->Body = str_replace( \"+++\".$k.\"+++\",urlencode($v),$mail->Body);\n $mail->Body = str_replace( \"+++\".strtoupper($k).\"+++\",urlencode($v),$mail->Body);\n $mail->Subject = str_replace( \"###\".$k.\"###\",$v,$mail->Subject);\n $mail->Subject = str_replace( \"###\".strtoupper($k).\"###\",$v,$mail->Subject);\n $mail->Subject = str_replace( \"+++\".$k.\"+++\",urlencode($v),$mail->Subject);\n $mail->Subject = str_replace( \"+++\".strtoupper($k).\"+++\",urlencode($v),$mail->Subject);\n $mail->AltBody = str_replace( \"###\".$k.\"###\",$v,$mail->AltBody);\n $mail->AltBody = str_replace( \"###\".strtoupper($k).\"###\",$v,$mail->AltBody);\n $mail->AltBody = str_replace( \"+++\".$k.\"+++\",urlencode($v),$mail->AltBody);\n $mail->AltBody = str_replace( \"+++\".strtoupper($k).\"+++\",urlencode($v),$mail->AltBody);\n }\n }else\n {\n $mail->Body = $mail_body_text;\n foreach($userinfo as $k => $v)\n {\n $mail->Body = str_replace( \"###\".$k.\"###\",$v,$mail->Body);\n $mail->Body = str_replace( \"###\".strtoupper($k).\"###\",$v,$mail->Body);\n $mail->Body = str_replace( \"+++\".$k.\"+++\",urlencode($v),$mail->Body);\n $mail->Body = str_replace( \"+++\".strtoupper($k).\"+++\",urlencode($v),$mail->Body);\n $mail->Subject = str_replace( \"###\".$k.\"###\",$v,$mail->Subject);\n $mail->Subject = str_replace( \"###\".strtoupper($k).\"###\",$v,$mail->Subject);\n $mail->Subject = str_replace( \"+++\".$k.\"+++\",urlencode($v),$mail->Subject);\n $mail->Subject = str_replace( \"+++\".strtoupper($k).\"+++\",urlencode($v),$mail->Subject);\n }\n \n \n } \n\n return $mail->Send();\n\n}", "title": "" }, { "docid": "723ada7efd89915878a5350112ff2a78", "score": "0.5609459", "text": "public function setSendHTML($value)\n\t{\n\t\t$this->_sendHTML = $value;\n\t}", "title": "" }, { "docid": "1067364f38dfa7ef2df416ef75a8b21d", "score": "0.5591029", "text": "function email_send( $p_recipient, $p_subject, $p_message, $p_header='' ) {\r\n\t\tglobal $g_from_email, $g_enable_email_notification,\r\n\t\t\t\t$g_return_path_email, $g_use_x_priority,\r\n\t\t\t\t$g_phpWebNotes_version;\r\n\r\n\t\t# short-circuit if no emails should be sent\r\n\t\tif ( OFF == $g_enable_email_notification ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$t_recipient = trim( $p_recipient );\r\n\t\t$t_subject = trim( $p_subject );\r\n\t\t$t_message = trim( $p_message );\r\n\r\n\t\t# Visit http://www.php.net/manual/function.mail.php\r\n\t\t# if you have problems with mailing\r\n\t\t\t\r\n\t\t$t_headers = \"From: $g_from_email\\n\";\r\n\r\n\t\t$t_headers .= \"X-Sender: <$g_from_email>\\n\";\r\n\t\t$t_headers .= \"X-Mailer: phpWebNotes $g_phpWebNotes_version\\n\";\r\n\t\tif ( ON == $g_use_x_priority ) {\r\n\t\t\t$t_headers .= \"X-Priority: 0\\n\"; # Urgent = 1, Not Urgent = 5, Disable = 0\r\n\t\t}\r\n\t\t$t_headers .= \"Return-Path: <$g_return_path_email>\\n\"; # return email if error\r\n\r\n\t\t# If you want to send foreign charsets\r\n\t\t# $t_headers .= \"Content-Type: text/html; charset=iso-8859-1\\n\";\r\n\r\n\t\t$t_headers .= $p_header;\r\n\r\n\t\t$t_recipient = email_make_lf_crlf( $t_recipient );\r\n\t\t$t_subject = email_make_lf_crlf( $t_subject );\r\n\t\t$t_message = email_make_lf_crlf( $t_message );\r\n\t\t$t_headers = email_make_lf_crlf( $t_headers );\r\n\t\t$result = mail( $t_recipient, $t_subject, $t_message, $t_headers );\r\n\t\tif ( false === $result ) {\r\n\t\t\techo \"PROBLEMS SENDING MAIL TO: $t_recipient<br />\";\r\n\t\t\techo htmlspecialchars($t_recipient).'<br />';\r\n\t\t\techo htmlspecialchars($t_subject).'<br />';\r\n\t\t\techo nl2br(htmlspecialchars($t_headers)).'<br />';\r\n\t\t\t#echo nl2br(htmlspecialchars($t_message)).'<br />';\r\n\t\t\texit;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "73fe80d8d2399e4e77c03e8df5986a10", "score": "0.55848575", "text": "function sf_email_encode_function( $atts, $content ){\n\t return '<a href=\"'.antispambot(\"mailto:\".$content).'\">'.antispambot($content).'</a>';\n\t}", "title": "" }, { "docid": "b4bc6fca9c8c82b9550c6c913bb5dc6f", "score": "0.5577855", "text": "public function sendEmail(): void\n {\n $message = (new \\Swift_Message(getenv('MAIL_SUBJECT')))\n ->setFrom(getenv('MAIL_FROM'))\n ->setTo(getenv('MAIL_RECEIVER'))\n ->setBody(\n $this->templating->render(\n 'emails/notification_email.html.twig'\n\n ),\n 'text/html'\n )\n ;\n $this->mailer->send($message);\n }", "title": "" }, { "docid": "81ddf7be517fe270ff4df8918b5aa376", "score": "0.55703723", "text": "function pemi_email_content_type() {\n return 'text/html';\n}", "title": "" }, { "docid": "3f9cc44a8ad235ba0c046d157634afb8", "score": "0.552805", "text": "function email_html($from, $to, $subject, $msg){\r\n\t$headers .= \"MIME-Version: 1.0\\r\\n\";\r\n\t$headers .= \"Content-Type: text/html; charset=ISO-8859-1\\r\\n\";\r\n\tmail($to, $subject, $msg, $headers,'-f'.$from);\r\n}", "title": "" }, { "docid": "a0fe33ab3f1f6233c52bbaa1a87b89da", "score": "0.5526712", "text": "public function display_contemail($pe = true) {\n\t\tif (!$pe || strlen($this->Contactemail) == 0)\n\t\t\treturn \"-\";\n\t\treturn \"<a href=\\\"sendmail.php?via=club&{$this->urlof()}\\\" target=\\\"_blank\\\">Send email</a>\";\n\t}", "title": "" }, { "docid": "83b561cd2884d09288a482ade73b69d6", "score": "0.5521577", "text": "function set_html_mail_content_type() {\n return 'text/html';\n }", "title": "" }, { "docid": "c8dcd44f343370b1248fd25fd894c7d1", "score": "0.5518456", "text": "function bum_filter_sendmail_contenttype()\n{\n\treturn \"text/html\";\n}", "title": "" }, { "docid": "f90a6a38e6ee04d1a6ab06df10ce564c", "score": "0.550759", "text": "function phptemplate_forward_email($vars) {\r\n\r\n $style = \"<style>\r\n <!--\r\n html, body {margin:0; padding:0; background-color:#fff;}\r\n #container {margin:0 auto; width:670px; font:normal 10pt arial,helvetica,sans-serif;}\r\n #header {width:670px; margin:0; text-align:center;}\r\n #body {width:630px; margin:0; padding:5px 20px; text-align:left; background-color:#fff;}\r\n #footer {width:670px; height:35px; margin:0; padding:5px 0 0 0; font-size:9pt; text-align:center; color:#fff;}\r\n .ad_footer, .message, .article {font-size:10pt; padding:0;}\r\n .frm_title, .frm_txt {font-size:12pt;}\r\n .frm_txt {padding-bottom:15px;}\r\n .links {font-size:10pt; font-style:italic;}\r\n .article_title {font-size:12pt;}\r\n .dyn_content { padding-top:10px;}\r\n -->\r\n </style>\";\r\n\r\n $output = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">\r\n <head>\r\n '.$style.'\r\n <base href=\"'.url('',array('absolute' => TRUE)).'\" />\r\n </head>\r\n <body>\r\n <div id=\"container\">\r\n <div id=\"header\">'.l('<img src=\"'.$vars['forward_header_image'].'\" border=\"0\" alt=\"'.$vars['site_name'].'\">', '',array('absolute' => TRUE,'html' => TRUE)).'</div>\r\n <div id=\"body\">\r\n <div class=\"frm_txt\">'.$vars['forward_message'].'</div>';\r\n if ($vars['message']) { $output .= '\r\n <div class=\"frm_title\">'.t('Message from Sender').':</div>\r\n <div class=\"frm_txt\"><p><b>'.$vars['message'].'</b></p></div>';}\r\n $output .= '\r\n <div><b>'.l($vars['content']->title, 'forward/emailref',array('absolute' => TRUE, 'query' => 'path='.$vars['path'])).'</b>';\r\n if (!empty($vars['content']->type) && (theme_get_setting('toggle_node_info_'.$vars['content']->type))) { $output .= '\r\n <br /><i>'.t('by %author', array('%author' => $vars['content']->name)).'</i>';}\r\n $output .= '\r\n </div>\r\n <div class=\"article\">'.$vars['content']->teaser.'</div>\r\n <div class=\"links\">'.l(t('Click here to read more on our site'), 'forward/emailref',array('absolute' => TRUE, 'query' => 'path='.$vars['path'])).'</div>\r\n <div class=\"dyn_content\"><br />'.$vars['dynamic_content'].'</div>\r\n <div class=\"ad_footer\"><br />'.$vars['forward_ad_footer'].'<br></div>\r\n </div>\r\n <div id=\"footer\">'.$vars['forward_footer'].'</div>\r\n </div>\r\n </body>\r\n</html>';\r\n\r\n return $output;\r\n}", "title": "" }, { "docid": "4b52589e30acde2e86fee61a50b4a927", "score": "0.5495169", "text": "private function sendToAdmins(): void\n {\n $template = $this->submission->form->mail_template ?: Settings::getMailTemplate();\n if (empty($template)) {\n return;\n }\n\n $emails = array_merge(Settings::getEmails(), $this->submission->form->getExtraEmailAddresses());\n\n if (count($emails) === 0) {\n return;\n }\n\n try {\n $appUrl = config('app.url');\n $backendUri = Backend::uri();\n\n $data = [\n 'title' => $this->submission->form->name,\n 'date' => $this->submission->created_at->format('d.m.Y H:i'),\n 'hasFiles' => $this->submission->uploaded_files()->exists(),\n 'url' => \"{$appUrl}/{$backendUri}/gromit/forms/submissions/preview/7\",\n 'data' => $this->submission->getSubmissionData(),\n ];\n\n Mail::send($template, $data, function (Message $message) use ($emails) {\n $message->to($emails);\n });\n } catch (Exception $ex) {\n Log::error('Notify error');\n Log::error($ex);\n }\n }", "title": "" }, { "docid": "725a2faeee6d2239732efd17ee15eafc", "score": "0.54909354", "text": "function dog__send_form_mail_standard($params = null) {\n\t$main_domain = dog__site_domain(true);\n\t$full_domain = dog__site_domain();\n\t$site_title = get_bloginfo('name');\n\t$site_title_safe = str_replace(',', '', $site_title);\n\n\t$post_data = $params['post'] ? $params['post'] : Dog_Form::get_post_data();\n\t$default_template_vars = array_merge($post_data, array(\n\t\t'website_domain' => $full_domain,\n\t\t'website_url' \t => site_url(),\n\t\t'website_title' => $site_title,\n\t));\n\n\t$confirmation = $params['confirmation'];\n\t$confirmation_email_field = dog__value_or_default($confirmation['email_field'], 'contact_email');\n\t$confirmation_email = $post_data[$confirmation_email_field];\n\n\t$custom_template_vars = dog__value_or_default($params['template_vars'], array());\n\t$template_vars = array_merge($default_template_vars, $custom_template_vars);\n\n\t$custom_headers = dog__value_or_default($params['headers'], array());\n\t$headers = array_merge(array(\n\t\t'sender' => 'noreply@' . $main_domain,\n\t\t'from' => array(\n\t\t\t'name' => $site_title_safe,\n\t\t\t'email' => 'noreply@' . $main_domain,\n\t\t),\n\t\t'reply' => array(\n\t\t\t'email' => $confirmation_email,\n\t\t),\n\t), $custom_headers);\n\n\tif (!$confirmation_email) {\n\t\tunset($headers['reply']);\n\t}\n\n\t$recipient = dog__value_or_default($params['email'], dog__config('contact_email') ?: get_option('admin_email'));\n\t$cc = isset($params['cc']) && is_array($params['cc']) ? $params['cc'] : array($params['cc']);\n\t$recipients = array_merge(array($recipient), $cc);\n\n\t$template_name = $params['template'] ? $params['template'] : 'contact-receiver';\n\t$language = dog__value_or_default($params['language'], dog__default_language());\n\tif (class_exists('Dog_Email_Templates')) {\n\t\t$tpl = Dog_Email_Templates::get($template_name, $template_vars, $language);\n\t\tif (!$tpl) {\n\t\t\treturn array('read_template' => dog__txt(\"Șablonul ({$template_name}) pentru limba ({$language}) nu a fost găsit\"));\n\t\t}\n\t\t$subject = $tpl->subject;\n\t\t$template = $tpl->message;\n\t} else {\n\t\t$subject = dog__value_or_default($params['subject'], dog__txt('Ai primit un mesaj de contact', null, $language));\n\t\t$template = dog__get_theme_email_template($template_name, $template_vars, $language);\n\t\tif ($template === false) {\n\t\t\treturn array('read_template' => dog__txt(\"Șablonul ({$template_name}) pentru limba ({$language}) nu există sau nu poate fi citit\"));\n\t\t}\n\t}\n\n\t$result = dog__send_mail($recipients, $subject, $template, $headers, $params['attachments']);\n\tif (is_array($result)) {\n\t\treturn $result;\n\t}\n\n\tif ((!$params || $confirmation) && $confirmation_email) {\n\t\t$custom_template_vars = dog__value_or_default($confirmation['template_vars'], array());\n\t\t$template_vars = array_merge($default_template_vars, $custom_template_vars);\n\n\t\t$custom_headers = dog__value_or_default($confirmation['headers'], array());\n\t\t$headers['reply'] = array(\n\t\t\t'name' => $site_title_safe,\n\t\t\t'email' => $recipient,\n\t\t);\n\t\t$headers = array_merge($headers, $custom_headers);\n\n\t\t$template_name = $confirmation['template'] ? $confirmation['template'] : 'contact-sender';\n\t\t$language = dog__value_or_default($confirmation['language'], dog__active_language());\n\t\tif (class_exists('Dog_Email_Templates')) {\n\t\t\t$tpl = Dog_Email_Templates::get($template_name, $template_vars, $language);\n\t\t\tif (!$tpl) {\n\t\t\t\treturn array('read_template' => dog__txt(\"Șablonul ({$template_name}) pentru limba ({$language}) nu a fost găsit\"));\n\t\t\t}\n\t\t\t$subject = $tpl->subject;\n\t\t\t$template = $tpl->message;\n\t\t} else {\n\t\t\t$subject = dog__value_or_default($confirmation['subject'], dog__txt('Ai trimis un mesaj de contact', null, $language));\n\t\t\t$template = dog__get_theme_email_template($template_name, $template_vars, $language);\n\t\t\tif ($template === false) {\n\t\t\t\treturn array('read_template' => dog__txt(\"Șablonul ({$template_name}) pentru limba ({$language}) nu există sau nu poate fi citit\"));\n\t\t\t}\n\t\t}\n\n\t\t$cc = isset($confirmation['cc']) && is_array($confirmation['cc']) ? $confirmation['cc'] : array($confirmation['cc']);\n\t\t$recipients = array_merge(array($confirmation_email), $cc);\n\n\t\t$result = dog__send_mail($recipients, $subject, $template, $headers, $confirmation['attachments']);\n\t\tif (is_array($result)) {\n\t\t\treturn $result;\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "3ec6fc3b5c0da6647652756eb8a83226", "score": "0.5488368", "text": "public function test_email_template()\n\t{\n\t\t$data_mail['name'] = 'Test';\n\t\t$data_mail['code'] = '1234';\n\t\t/*Sintana Rochanasmita\n\t\t30681*/\n\n\n\t\t$data['data'] = $data_mail;\n\n\t\t$subject = $this->event['title'];\n\t\techo $this->load->view('mail/bkp_74th_anniversary', $data, TRUE);\n\t\t// $body = $this->load->view('mail/bkp_74th_anniversary', $data, TRUE);\n\t\t// $return = send_email('[email protected]', $subject, $body);\n\t}", "title": "" }, { "docid": "60bb53e8d4e56af8f30565ba1bc87b16", "score": "0.5487489", "text": "public function sendSimpleMail($data)\n {\n\n\n $mail = new PHPMailer(true);\n\n $mail->IsSMTP();\n $mail->Host = Linker::mail(\"HOST\");\n\n $mail->SMTPAuth = true;\n $mail->Username = Linker::mail(\"USER\");\n $mail->Password = Linker::mail(\"PASS\");\n\n $mail->From = Linker::mail(\"FROM\");\n $mail->FromName = Linker::mail(\"FROM_NAME\");\n $mail->Sender = Linker::mail(\"FROM\");\n\n //$mail->AddReplyTo(Linker::mail(\"REPLAY_TO\"));\n $mail->AddAddress($data[\"to\"]);\n\n $mail->Subject = $data[\"subject\"];\n $mail->IsHTML(true);\n\n $template = file_get_contents(Linker::route(\"EMAIL\") . \"normal.html\");\n\n $template = str_replace(\"#title#\", $data[\"title\"], $template);\n $template = str_replace(\"#header#\", $data[\"header\"], $template);\n $template = str_replace(\"#msg#\", $data[\"msg\"], $template);\n $template = str_replace(\"#footer#\", $data[\"footer\"], $template);\n $template = str_replace(\"#greetings#\", $data[\"greetings\"], $template);\n $template = str_replace(\"#infoLink#\", $data[\"infoLink\"], $template);\n $template = str_replace(\"#company#\", $data[\"company\"], $template);\n\n $mail->Body = $template;\n\n return (!$mail->Send()) ? 0 : 1;\n\n }", "title": "" }, { "docid": "431085b577157ac791e1903bd6a77267", "score": "0.548748", "text": "private function sendMail()\n {\n Mail::send($this->resource['view'], [], function ($message) {\n $fromAddress = array_get($this->resource, 'config.from.address');\n\n $message->returnPath($fromAddress);\n\n $message->cc($fromAddress);\n\n $message->bcc($fromAddress);\n\n $message->replyTo($fromAddress);\n\n $message->to($this->resource['to']);\n\n $message->subject($this->resource['subject']);\n });\n }", "title": "" }, { "docid": "205e4571896a3f5561d4f6fe0245d317", "score": "0.54835635", "text": "static public function mailGeneric(array $array): string {\n return ' <html lang=\"fr\"> ' .\n '<body> ' .\n '<link href=\"https://fonts.googleapis.com/css2?family=Dosis:wght@300;500&family=Montserrat:wght@300;400;500;600&display=swap\" rel=\"stylesheet\">' .\n '<div style=\"background-color: #fff; width: 100%; height: auto;padding: 50px 0 0 0;font-family: \\'Montserrat\\', sans-serif; color : #fff;\">\n <div style=\"background-color: #111C30; width: 80%;max-width: 700px; height: auto; margin:50px auto; \">\n <img alt=\"Hungry Nuggets\" src=\"' . $array['imgTop'] . '\" style=\"width: 100%;\">\n <br>\n <img style=\"width: 80%;margin: 0 auto; text-align: center; display: flex;\" src=\"'. $array['imgText'] .'\" alt=\"new admin\">\n \n <img alt=\"Hungry Nuggets\" src=\"' . $array['imgBottom'] . '\" style=\"width: 40%; margin : 85px auto 100px auto;padding-bottom:100px;text-align: center; display: flex;\">\n </div>\n <p style=\"font-size: 0.6em; letter-spacing: 1px; text-align: center; color : #111\">HUNGRY NUGGETS © 2021 Hungry Nuggets, All rights reserved.</p>\n </div>\n </body>\n </html>';\n }", "title": "" }, { "docid": "dc2f2a781042761c221e333a9ef16ff7", "score": "0.5482812", "text": "function test_Html() {\n \n $this->Mail->IsHTML(true);\n $this->Mail->Subject .= \": HTML only\";\n \n $this->Mail->Body = \"This is a <b>test message</b> written in HTML. </br>\" .\n \"Go to <a href=\\\"http://phpmailer.sourceforge.net/\\\">\" .\n \"http://phpmailer.sourceforge.net/</a> for new versions of \" .\n \"phpmailer. <p/> Thank you!\";\n\n $this->BuildBody();\n $this->assert($this->Mail->Send(), $this->Mail->ErrorInfo);\n }", "title": "" }, { "docid": "55f5ffa57c37f14a1bc62c0b76dffc70", "score": "0.547846", "text": "function frame_hook_email_content_type()\n{\n return \"text/html\";\n}", "title": "" }, { "docid": "a2adef7a410a785e366d45e91f669542", "score": "0.5470201", "text": "function send( $send = true ) {\n\t\tglobal $wgOut, $wgUser, $wgParser, $wgServer, $wgScript, $wgArticlePath, $wgScriptPath, $wgEmergencyContact,\n\t\t\t$wgEmailPageCss, $wgEmailPageGroup, $wgEmailPageAllowRemoteAddr, $wgEmailPageAllowAllUsers, $wgEmailPageSepPattern,\n\t\t\t$wgEmailPageNoLinks;\n\n\t\t// Set error and bail if user not in postmaster group, and request not from trusted address\n\t\tif( $wgEmailPageGroup && !in_array( $wgEmailPageGroup, $wgUser->getGroups() )\n\t\t&& !in_array( $_SERVER['REMOTE_ADDR'], $wgEmailPageAllowRemoteAddr ) ) {\n\t\t\t$denied = wfMessage( 'ea-denied' )->text();\n\t\t\t$wgOut->addWikiText( wfMessage( 'ea-error', $this->title, $denied )->text() );\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get email addresses from users in selected group\n\t\t$db = $this->db;\n\t\tif( $this->group && ( $wgEmailPageAllowAllUsers || $this->group != 'user' ) ) {\n\t\t\t$group = $db->addQuotes( $this->group );\n\t\t\t$res = $this->group == 'user'\n\t\t\t\t? $db->select( 'user', 'user_email', 'user_email != \\'\\'', __METHOD__ )\n\t\t\t\t: $db->select( array( 'user', 'user_groups' ), 'user_email', \"ug_user = user_id AND ug_group = $group\", __METHOD__ );\n\t\t\tforeach( $res as $row ) $this->addRecipient( $row->user_email );\n\t\t}\n\n\t\t// Recipients from the \"to\" and \"cc\" fields\n\t\tforeach( preg_split( $wgEmailPageSepPattern, $this->to ) as $item ) $this->addRecipient( $item );\n\t\tforeach( preg_split( $wgEmailPageSepPattern, $this->cc ) as $item ) $this->addRecipient( $item );\n\n\t\t// Compose the wikitext content of the page to send\n\t\t$title = Title::newFromText( $this->title );\n\t\t$opt = new ParserOptions;\n\t\t$page = new Article( $title );\n\t\t$message = $page->getContent();\n\t\tif( $this->message ) $message = \"{$this->message}\\n\\n$message\";\n\n\t\t// Convert the message text to html unless textonly\n\t\tif( $this->textonly == '' ) {\n\n\t\t\t// Parse the wikitext using absolute URL's for local page links\n\t\t\t$tmp = array( $wgArticlePath, $wgScriptPath, $wgScript );\n\t\t\t$wgArticlePath = $wgServer . $wgArticlePath;\n\t\t\t$wgScriptPath = $wgServer . $wgScriptPath;\n\t\t\t$wgScript = $wgServer . $wgScript;\n\t\t\t$message = $wgParser->parse( $message, $title, $opt, true, true )->getText();\n\t\t\tlist( $wgArticlePath, $wgScriptPath, $wgScript ) = $tmp;\n\n\t\t\t// If add comments is set append them to the message now\n\t\t\tif( $this->addcomments ) {\n\t\t\t\tglobal $wgAjaxComments;\n\t\t\t\t$article = new Article( Title::newFromText( $this->title ) );\n\t\t\t\t$message .= $wgAjaxComments->onUnknownAction( 'ajaxcommentsinternal', $article );\n\t\t\t}\n\n\t\t\t// If no links allowed in message, change them all to spans\n\t\t\tif( $wgEmailPageNoLinks ) $message = preg_replace( \"|(</?)a([^>]*)|i\", \"$1u\", $message );\n\n\t\t\t// Get CSS content if any\n\t\t\tif( $this->css ) {\n\t\t\t\t$page = new Article( Title::newFromText( $this->css ) );\n\t\t\t\t$css = \"<style type='text/css'>\" . $page->getContent() . \"</style>\";\n\t\t\t} else $css = '';\n\n\t\t\t// Create a html wrapper for the message\n\t\t\t$doctype = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">';\n\t\t\t$head = \"<head>$css</head>\";\n\t\t\t$message = \"$doctype\\n<html>$head<body style=\\\"margin:10px\\\"><div id=\\\"bodyContent\\\">$message</div></body></html>\";\n\t\t}\n\n\t\t// Send message or list recipients\n\t\t$count = count( $this->recipients );\n\t\tif( $count > 0 ) {\n\n\t\t\t// Set up new mailer instance if sending\n\t\t\tif( $send ) {\n\t\t\t\t$mail = new PHPMailer();\n\t\t\t\t$mail->From = $this->from;\n\t\t\t\t$mail->FromName = User::whoIsReal( $wgUser->getId() );\n\t\t\t\t$mail->Subject = $this->subject;\n\t\t\t\t$mail->Body = $message;\n\t\t\t\t$mail->IsHTML( !$this->textonly );\n\t\t\t}\n\t\t\telse $msg = \"===\" . wfMessage( 'ea-listrecipients', $count )->text() . \"===\";\n\n\t\t\t// Loop through recipients sending or adding to list\n\t\t\tforeach( $this->recipients as $recipient ) {\n\t\t\t\t$error = '';\n\t\t\t\tif( $send ) {\n\t\t\t\t\tif( $this->record ) $mail->Body = $this->replaceFields( $message, $recipient );\n\t\t\t\t\t$mail->AddAddress( $recipient );\n\t\t\t\t\tif( $state = $mail->Send() ) $msg = wfMessage( 'ea-sent', $this->title, $count, $wgUser->getName() )->text();\n\t\t\t\t\telse $error .= \"Couldn't send to $recipient: {$mail->ErrorInfo}<br />\\n\";\n\t\t\t\t\t$mail->ClearAddresses();\n\t\t\t\t} else $msg .= \"\\n*[mailto:$recipient $recipient]\";\n\t\t\t\tif( $error ) $msg = wfMessage( 'ea-error', $this->title, $error )->text();\n\t\t\t}\n\t\t}\n\t\telse $msg = wfMessage( 'ea-error', $this->title, wfMessage( 'ea-norecipients' ) )->text();\n\n\t\t$wgOut->addWikiText( $msg );\n\t\treturn $send ? $state : $count;\n\t}", "title": "" }, { "docid": "6a302870888f02b0070230957f055401", "score": "0.5448823", "text": "function sendHTMLemail($HTML,$from,$to,$subject)\r\n{\r\n// Set out \"from\" address\r\n\r\n $headers = \"From: $from\\r\\n\"; \r\n\r\n// Now we specify our MIME version\r\n\r\n $headers .= \"MIME-Version: 1.0\\r\\n\"; \r\n\r\n// Create a boundary so we know where to look for\r\n// the start of the data\r\n\r\n $boundary = uniqid(\"HTMLEMAIL\"); \r\n \r\n// First we be nice and send a non-html version of our email\r\n \r\n $headers .= \"Content-Type: multipart/alternative;\".\r\n \"boundary = $boundary\\r\\n\\r\\n\"; \r\n\r\n $headers .= \"This is a MIME encoded message.\\r\\n\\r\\n\"; \r\n\r\n $headers .= \"--$boundary\\r\\n\".\r\n \"Content-Type: text/plain; charset=ISO-8859-1\\r\\n\".\r\n \"Content-Transfer-Encoding: base64\\r\\n\\r\\n\"; \r\n \r\n $headers .= chunk_split(base64_encode(strip_tags($HTML))); \r\n\r\n// Now we attach the HTML version\r\n\r\n $headers .= \"--$boundary\\r\\n\".\r\n \"Content-Type: text/html; charset=ISO-8859-1\\r\\n\".\r\n \"Content-Transfer-Encoding: base64\\r\\n\\r\\n\"; \r\n \r\n $headers .= chunk_split(base64_encode($HTML)); \r\n\r\n// And then send the email ....\r\n\r\n mail($to,$subject,\"\",$headers);\r\n \r\n}", "title": "" }, { "docid": "04ea75fad23d7d303e020db1faae20b6", "score": "0.5445055", "text": "public function send()\n {\n if ($toEmail = $this->getData('email')) {\n /** @var $mailer Mage_Core_Model_Email_Template_Mailer */\n $mailer = Mage::getModel('core/email_template_mailer');\n /** @var $emailInfo Mage_Core_Model_Email_Info */\n $emailInfo = Mage::getModel('core/email_info');\n\n $emailInfo->addTo($toEmail);\n $mailer->addEmailInfo($emailInfo);\n\n // Set all required params and send emails\n $mailer->setSender('general');\n $mailer->setStoreId(self::DEFAULT_STORE_ID);\n $mailer->setTemplateId(self::SLI_FEED_EMAIL_TEMPLATE);\n $mailer->setTemplateParams(\n array(\n 'subject' => $this->getData('subject'),\n 'messages' => (array)$this->getData('msg'),\n )\n );\n $mailer->send();\n }\n }", "title": "" }, { "docid": "40723dd5c8168f4e2dbf1f42786e1304", "score": "0.5444064", "text": "function runner_mail($params) {\n\t$customSMTP = \"1\";\n\tif (! GetGlobalData ( \"useBuiltInMailer\", false )) {\n\t\tinclude_once (getabspath ( 'libs/phpmailer/class.phpmailer.php' ));\n\t\tinclude_once (getabspath ( 'libs/phpmailer/class.smtp.php' ));\n\t\treturn runner_mail_smtp ( $params );\n\t}\n\t\n\t$from = isset ( $params ['from'] ) ? $params ['from'] : \"\";\n\tif (! $from) {\n\t\t$from = \"[email protected]\";\n\t}\n\t$to = isset ( $params ['to'] ) ? $params ['to'] : \"\";\n\t$body = isset ( $params ['body'] ) ? $params ['body'] : \"\";\n\t$cc = isset ( $params ['cc'] ) ? $params ['cc'] : \"\";\n\t$bcc = isset ( $params ['bcc'] ) ? $params ['bcc'] : \"\";\n\t$replyTo = isset ( $params ['replyTo'] ) ? $params ['replyTo'] : \"\";\n\t$priority = isset ( $params ['priority'] ) ? $params ['priority'] : \"\";\n\t$charset = \"\";\n\t$isHtml = false;\n\tif (! $body) {\n\t\t$body = isset ( $params ['htmlbody'] ) ? $params ['htmlbody'] : \"\";\n\t\t$charset = isset ( $params ['charset'] ) ? $params ['charset'] : \"\";\n\t\tif (! $charset)\n\t\t\t$charset = \"utf-8\";\n\t\t$isHtml = true;\n\t}\n\t$subject = $params ['subject'];\n\t\n\t//\n\t$header = \"\";\n\tif ($isHtml) {\n\t\t$header .= \"MIME-Version: 1.0\\r\\n\";\n\t\t$header .= 'Content-Type: text/html;' . ($charset ? ' charset=' . $charset . ';' : '') . \"\\r\\n\";\n\t}\n\t\n\tif ($from) {\n\t\tif (strpos ( $from, '<' ) !== false)\n\t\t\t$header .= 'From: ' . $from . \"\\r\\n\";\n\t\telse\n\t\t\t$header .= 'From: <' . $from . \">\\r\\n\";\n\t\t\n\t\t@ini_set ( \"sendmail_from\", $from );\n\t}\n\tif ($cc)\n\t\t$header .= 'Cc: ' . $cc . \"\\r\\n\";\n\tif ($bcc)\n\t\t$header .= 'Bcc: ' . $bcc . \"\\r\\n\";\n\t\n\tif ($priority)\n\t\t$header .= 'X-Priority: ' . $priority . \"\\r\\n\";\n\t\n\tif ($replyTo) {\n\t\tif (strpos ( $replyTo, '<' ) !== false)\n\t\t\t$header .= 'Reply-to: ' . $replyTo . \"\\r\\n\";\n\t\telse\n\t\t\t$header .= 'Reply-to: <' . $replyTo . \">\\r\\n\";\n\t}\n\t\n\t$eh = new ErrorHandler ();\n\tset_error_handler ( array (\n\t\t\t$eh,\n\t\t\t\"handle_mail_error\" \n\t) );\n\t\n\t$res = false;\n\tif (! $header) {\n\t\t$res = mail ( $to, $subject, $body );\n\t} else {\n\t\t$res = mail ( $to, $subject, $body, $header );\n\t}\n\t\n\trestore_error_handler ();\n\treturn array (\n\t\t\t'mailed' => $res,\n\t\t\t'errors' => $eh->errorstack,\n\t\t\t\"message\" => nl2br ( $eh->getErrorMessage () ) \n\t);\n}", "title": "" }, { "docid": "2f2a2c66da1c492a6e3006b012c70544", "score": "0.544023", "text": "function bum_send_notifications( $form, $post )\n\t{\n\t\t//send email\n\t\tif (!$form['send_email']) return false;\n\t\t\n\t\t//send a single email\n\t\tif ($form['send_email']['to'])\n\t\t{\n\t\t\tbum_send_email( $form['send_email'] );\n\t\t}\n\t\t\n\t\t//send out all emails\n\t\telse foreach ((array)$form['send_email'] as $options)\n\t\t{\n\t\t\tbum_send_email( $options );\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "f26d14caa33f039eb70eb64e79b39dfd", "score": "0.5413252", "text": "public function emailAction () {\n \t$this->_helper->layout->disableLayout();\n\t\t$this->_helper->viewRenderer->setNoRender(true);\n\t\t$this->getResponse()->setHeader('Content-Type', 'text/plain');\n\t\t\n\t\ttry {\n\t\t\tif (!$this->emailEnabled()) {\n\t\t\t\tthrow new Exception(\"Emailing of schedules is not enabled in frontend_config.ini.\");\n\t\t\t}\n\t\t\t$this->verifyChangeRequest();\n\t\t\t\n\t\t\t$this->initializeSchedule();\n\t\t\t$this->view->messageBody = $this->_getParam('message');\n\t\t\t\n\t\t\t// Generate the text version of the email.\n\t\t\t$this->render('email-text');\n\t\t\t$text = $this->getResponse()->getBody();\n\t\t\t$this->getResponse()->setBody('');\n\t\t\t\n\t\t\t// Generate the html version of the email.\n\t\t\t$this->render('email-html');\n\t\t\t$html = $this->getResponse()->getBody();\n\t\t\t$this->getResponse()->setBody('');\n\t\t\t\n\t\t\t// Generate the Schedule image.\n\t\t\t$this->initializeScheduleImage();\n\t\t\t$this->render('generate-image');\n\t\t\tob_start();\n\t\t\timagepng($this->view->image, null, 5);\n\t\t\timagedestroy($this->view->image);\n\t\t\t$imageData = ob_get_clean();\n\t\t\t\n\t\t\t// To\n\t\t\t$to = $this->_helper->auth()->getUserEmail();\n\t\t\tif (strlen(trim($this->_getParam('to'))) && trim($this->_getParam('to')) != $to) {\n\t\t\t\t$to .= ', '.trim($this->_getParam('to'));\n\t\t\t}\n\t\t\t\n\t\t\t// Build the email\n\t\t\t$mime = new Mail_mime();\n\t\t\t$headers = array(\n\t\t\t\t'From'\t\t=> $this->getFromEmail(),\n\t\t\t\t'Reply-To'\t=> $this->_helper->auth()->getUserEmail(),\n\t\t\t\t'CC'\t\t=> $this->_helper->auth()->getUserEmail(),\n\t\t\t\t'Subject'\t=> preg_replace('/[^\\w \\'\"&-_.,\\/*%#$@!()=+:;<>?]/', '', $this->_getParam('subject')),\n\t\t\t);\n\t\t\t$mime->setTXTBody($text);\n\t\t\t$mime->setHTMLBody($html);\n\t\t\t$mime->addHTMLImage($imageData, 'image/png', 'schedule_image.png', false);\n\t\t\t$mime->addAttachment($imageData, 'image/png', 'schedule_image.png', false);\n\t\t\t\n\t\t\t\n\t\t\t// Send the email\n\t\t\t$body = $mime->get();\n\t\t\t$headers = $mime->headers($headers);\n\t\t\t\n\t\t\t$mail = Mail::factory('mail');\n\t\t\t$result = $mail->send($to, $headers, $body);\n\t\t\t\n\t\t\tif ($result === true) {\n\t\t\t\tprint \"Email sent.\";\n\t\t\t} else {\n\t\t\t\tthrow $result;\n\t\t\t}\n\t } catch (Exception $e) {\n\t \terror_log($e->getMessage());\n\t \t\n\t \t$this->getResponse()->setHttpResponseCode(500);\n\t \t$this->getResponse()->setBody($e->getMessage());\n\t }\n }", "title": "" }, { "docid": "99670ce87847888ab4f0f508c281ff62", "score": "0.54018795", "text": "function gfs_send_email_notification($post) {\n\tglobal $group_obj;\n\tglobal $bp;\n\t\n\tif ( function_exists ( 'bp_forums_get_forum_topics' ) )\n\t\t$group_obj = $bp->groups->current_group; // for bp 1.1+\n\t\n\t$topic_id = $post['topic_id'];\n\t$topic = bp_forums_get_topic_details( $topic_id );\n\t$text = $post['post_text'];\n\t\n\tif ( !function_exists ( 'bp_forums_get_forum_topics' ) ) { // For BP < 1.1\n\t\t$forum_id = $topic['forum_id'];\n\t\t$last_poster = $topic['topic_last_poster_display_name'];\n\t\t$last_poster_id = $topic['topic_last_poster'];\n\t\t$topic_uri = $topic['topic_uri'];\t\t\n\t} else {\n\t\t$forum_id = $topic->forum_id;\n\t\t$last_poster_id = $topic->topic_last_poster;\n\t\t$last_poster = bp_core_get_user_displayname( $last_poster_id );\n\t\t$topic_uri = bp_get_forum_permalink() . '/topic/' . $topic->topic_slug;\t\t\n\t}\n\n\t$text = preg_replace('/^p/', '', $text);\n\t$text = preg_replace('|\\/pp|', ' ', $text);\n\t$text = preg_replace('|\\/p|', ' ', $text);\t\n\n\t$group_link = bp_get_group_permalink( $group_obj );\n\n\t$gfs_sender_email = get_option( 'gfs-sender-email' );\n\n\t$group_id = $group_obj->id;\n\tif ( bp_group_has_members( \n\t\tarray(\n\t\t'per_page' => 1000,\n\t\t'max' => false,\n\t\t'exclude_admins_mods' => 0,\n\t\t)\n\t) ) {\n\t\twhile ( bp_group_members() ) {\n\t\t\tbp_group_the_member();\n\t\t\t$user_id = bp_get_group_member_id();\n\t\t\t\n\tif ( $gfs_sender_email == 'on' || $user_id != $last_poster_id ) {\n\t\t\t\n\t\t\t$user_url = bp_get_group_member_url();\n\t\t\t$user_faves = get_usermeta( $user_id, 'bb_favorites' );\n\t\t\t\t\n\t\t\t\n\t\t\t$user_faves = explode(',', $user_faves);\n\t\t\t\n\t\t\tif (in_array( $topic_id, $user_faves )) {\n\t\t\t\t$member = get_userdata($user_id);\n\t\t\t\t$settings_link = $user_url . 'settings/notifications';\n\t\t\t\t//$settings_link = site_url() . '/' . BP_MEMBERS_SLUG . '/' . $member->user_login . '/settings/notifications';\n\t\t\t\t$invited_link = site_url() . '/' . BP_MEMBERS_SLUG . '/' . $member->user_login;\n\t\t\t\t$invites_link = $invited_link . '/' . $bp->groups->slug . '/invites';\n\n\t\t\t\t// Set up and send the message\n\t\t\t\t$to = $member->user_email;\n\n\t\t\t\t$subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . sprintf( __( 'New discussion activity in the group: \"%s\"', 'group_forum_subscription' ), stripslashes($group_obj->name) );\n\n\t\t\t\t$message = sprintf( __( \n'A new message has been posted in the group \"%s\".\nAuthor: %s\n\n%s\n\nTo view the entire discussion, visit: %s\nTo view the group visit: %s\n\n\n---------------------\n', 'group_forum_subscription' ), stripslashes($group_obj->name), $last_poster, $text, $topic_uri, $group_link );\n\n\t\t$message .= sprintf( __( 'To unsubscribe from this discussion, visit %s. To manage your email notification preferences, visit %s.', 'group_forum_subscription' ), $topic_uri, $settings_link );\n\n\t\n\t\t// Send it\n\t\t\n\t\twp_mail( $to, $subject, $message );\n\t\t}\n\t\t\t}\n\t\t}\t\n\t}\n}", "title": "" }, { "docid": "a2e5bbe2f086f7892bf0379b95d46e09", "score": "0.5393203", "text": "public function sendmail()\n\t{\n\t}", "title": "" }, { "docid": "87274252f209562ecff461ae3dad1e1c", "score": "0.5390256", "text": "function send_comic_email($user_email, $unsubscribe_hash, $comics_data)\n{\n $to = $user_email;\n $subject = 'Amazing Comics';\n $message = '\n <!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Amazing Comics</title>\n</head>\n<body> \n <h1>' . $comics_data['image_title'] . '</h1>\n <img src=' . $comics_data['img_url'] . ' alt=' . $comics_data['img_alt'] . '>\n</body>\n</html>';\n}", "title": "" }, { "docid": "705399b8793175f9797064b5e935fa99", "score": "0.5389455", "text": "function send_email($b,&$reason)\r\n\r\n\t{\r\n\r\n\t\tglobal $wpdb;\r\n\r\n\r\n\r\n\t\t$notification = $wpdb->get_row($wpdb->prepare(\"SELECT * FROM {$this->table_notifications} WHERE tour_uid=%d\", $b['tour_uid']) );\r\n\r\n\t\tif(!$notification or empty($notification->subject)) {\r\n\r\n\t\t\t$reason = __('Notification is not defined or subject is empty', $this->text_domain);\r\n\r\n\t\t\treturn false;\r\n\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\t\t$from_email= get_option('rezgo_from_email');\r\n\r\n\t\tif(!$from_email) {\r\n\r\n\t\t\t$reason = __('From Email is not defined in Settings', $this->text_domain);\r\n\r\n\t\t\treturn false;\r\n\r\n\t\t}\r\n\r\n\t\t$from_name= get_option('rezgo_from_name');\r\n\r\n\t\tif(!$from_name) {\r\n\r\n\t\t\t$reason = __('From Name is not defined in Settings', $this->text_domain);\r\n\r\n\t\t\treturn false;\r\n\r\n\t\t}\r\n\r\n\r\n\r\n\t\t// make subst map\r\n\r\n\t\t$subst=array();\r\n\r\n\t\tforeach($b as $k=>$v)\r\n\r\n\t\t\t$subst['{'.$k.'}']=$v;\r\n\r\n\t\t$subst['{booking_date}']= date_i18n(get_option('date_format'),$b['booking_timestamp']);\r\n\r\n\t\t\r\n\r\n\t\t$subject = strtr($notification->subject,$subst);\r\n\r\n\t\t$message_html = strtr($notification->message_html,$subst);\r\n\r\n\t\t//will send as html \r\n\r\n\t\tadd_filter('wp_mail_content_type',create_function('', 'return \"text/html\"; '));\r\n\r\n\t\t// we remember plain version and set it in hook!\r\n\r\n\t\t$this->message_text = strtr($notification->message_text,$subst);\r\n\r\n\t\t$result = wp_mail($b['email'], $subject, $message_html, \"From: $from_name<$from_email>\\r\\n\" );\r\n\r\n\t\tif(!$result )\r\n\r\n\t\t\t$reason = __(\"WP_mail failed!\", $this->text_domain);\r\n\r\n\t\telse \r\n\r\n\t\t\t$wpdb->query($wpdb->prepare(\"UPDATE {$this->table_notifications} SET emails_sent=emails_sent+1 WHERE tour_uid=%d\", $b['tour_uid']) );\r\n\r\n\t\t\r\n\r\n\t\tunset($this->message_text);\r\n\r\n\t\treturn $result;\r\n\r\n\t}", "title": "" }, { "docid": "dba596c681391ee3d81af0ca53c94439", "score": "0.5382037", "text": "public function sendShortMessages(ShortMessageCollection $shortMessageCollection);", "title": "" }, { "docid": "6f0995d377bd904f7125357937d2ae7b", "score": "0.5377327", "text": "public function sendMail();", "title": "" }, { "docid": "8f1caae8e27156349c700d9d52e57e99", "score": "0.53757936", "text": "function wp_email_capture_set_html_mail_content_type() {\n\treturn 'text/html';\n}", "title": "" }, { "docid": "4701334c6f1a9f8caa89ae3eccad6d02", "score": "0.53752476", "text": "function set_html_email_text($module = '', $data = array()){\n\t//1. test for data\n\tif(count($data) < 1){\n\t\treturn false;\n\t}\n\tif($module == ''){\n\t\t$module = HTML_EMAIL_DEFAULT_MODULE;\n\t}\n\t//2. read template module\n\tif(!$handle = @fopen($module, \"rb\")){\n\t\treturn false;\n\t}\n\t$buffer = fread($handle, filesize($module));\n\tfclose($handle);\n\t//3. strip tabs\n\t$buffer = str_replace(array(\"\\t\"), ' ', $buffer);\n\t//4. replace template items with data\n\tforeach($data as $key => $value){\n\t\t$buffer = str_replace('$'.$key, $value, $buffer);\n\t}\n\treturn $buffer;\n}", "title": "" }, { "docid": "afeaad23d4631ee2ace3e3bf8f578544", "score": "0.53664565", "text": "function email() {\n\n\t\t\t//pre-process some settings\n\t\t\t$settings['theme']['favicon'] = !empty($_SESSION['theme']['favicon']['text']) ? $_SESSION['theme']['favicon']['text'] : PROJECT_PATH.'/themes/default/favicon.ico';\n\t\t\t$settings['login']['destination'] = !empty($_SESSION['login']['destination']['text']) ? $_SESSION['login']['destination']['text'] : '';\n\t\t\t$settings['users']['unique'] = !empty($_SESSION['users']['unique']['text']) ? $_SESSION['users']['unique']['text'] : '';\n\t\t\t$settings['theme']['logo'] = !empty($_SESSION['theme']['logo']['text']) ? $_SESSION['theme']['logo']['text'] : PROJECT_PATH.'/themes/default/images/logo_login.png';\n\t\t\t$settings['theme']['login_logo_width'] = !empty($_SESSION['theme']['login_logo_width']['text']) ? $_SESSION['theme']['login_logo_width']['text'] : 'auto; max-width: 300px';\n\t\t\t$settings['theme']['login_logo_height'] = !empty($_SESSION['theme']['login_logo_height']['text']) ? $_SESSION['theme']['login_logo_height']['text'] : 'auto; max-height: 300px';\n\t\t\t$settings['theme']['message_delay'] = isset($_SESSION['theme']['message_delay']) ? 1000 * (float) $_SESSION['theme']['message_delay'] : 3000;\n\n\t\t\t//set a default template\n\t\t\t$_SESSION['domain']['template']['name'] = 'default';\n\t\t\t$_SESSION['theme']['menu_brand_image']['text'] = PROJECT_PATH.'/themes/default/images/logo.png';\n\t\t\t$_SESSION['theme']['menu_brand_type']['text'] = 'image';\n\n\t\t\t//get the domain\n\t\t\t$domain_array = explode(\":\", $_SERVER[\"HTTP_HOST\"]);\n\t\t\t$domain_name = $domain_array[0];\n\n\t\t\t//temp directory\n\t\t\t$_SESSION['server']['temp']['dir'] = '/tmp';\n\n\t\t\t//use the session username\n\t\t\tif (isset($_SESSION['username'])) {\n\t\t\t\t$_POST['username'] = $_SESSION['username'];\n\t\t\t\t$_REQUEST['username'] = $_SESSION['username'];\n\t\t\t}\n\n\t\t//request the username\n\t\t\tif (!isset($_POST['username']) && !isset($_POST['authentication_code'])) {\n\n\t\t\t\t//add multi-lingual support\n\t\t\t\t$language = new text;\n\t\t\t\t$text = $language->get(null, '/core/authentication');\n\n\t\t\t\t//initialize a template object\n\t\t\t\t$view = new template();\n\t\t\t\t$view->engine = 'smarty';\n\t\t\t\t$view->template_dir = $_SERVER[\"DOCUMENT_ROOT\"].PROJECT_PATH.'/core/authentication/resources/views/';\n\t\t\t\t$view->cache_dir = $_SESSION['server']['temp']['dir'];\n\t\t\t\t$view->init();\n\n\t\t\t\t//assign default values to the template\n\t\t\t\t$view->assign(\"project_path\", PROJECT_PATH);\n\t\t\t\t$view->assign(\"login_destination_url\", $settings['login']['destination']);\n\t\t\t\t$view->assign(\"favicon\", $settings['theme']['favicon']);\n\t\t\t\t$view->assign(\"login_title\", $text['label-username']);\n\t\t\t\t$view->assign(\"login_username\", $text['label-username']);\n\t\t\t\t$view->assign(\"login_logo_width\", $settings['theme']['login_logo_width']);\n\t\t\t\t$view->assign(\"login_logo_height\", $settings['theme']['login_logo_height']);\n\t\t\t\t$view->assign(\"login_logo_source\", $settings['theme']['logo']);\n\t\t\t\t$view->assign(\"button_login\", $text['button-login']);\n\t\t\t\t$view->assign(\"message_delay\", $settings['theme']['message_delay']);\n\n\t\t\t\t//messages\n\t\t\t\t$view->assign('messages', message::html(true, '\t\t'));\n\n\t\t\t\t//show the views\n\t\t\t\t$content = $view->render('username.htm');\n\t\t\t\techo $content;\n\t\t\t\texit;\n\n\t\t\t}\n\n\t\t//show the authentication code view\n\t\t\tif (!isset($_POST['authentication_code'])) {\n\n\t\t\t\t//get the username\n\t\t\t\t//if (!isset($this->username) && isset($_REQUEST['username'])) {\n\t\t\t\t//\t$this->username = $_REQUEST['username'];\n\t\t\t\t//}\n\n\t\t\t\t//get the user details\n\t\t\t\t$sql = \"select user_uuid, username, user_email, contact_uuid \\n\";\n\t\t\t\t$sql .= \"from v_users\\n\";\n\t\t\t\t$sql .= \"where (\\n\";\n\t\t\t\t$sql .= \"\tusername = :username\\n\";\n\t\t\t\t$sql .= \"\tor user_email = :username\\n\";\n\t\t\t\t$sql .= \")\\n\";\n\t\t\t\tif ($settings['users']['unique'] != \"global\") {\n\t\t\t\t\t//unique username per domain (not globally unique across system - example: email address)\n\t\t\t\t\t$sql .= \"and domain_uuid = :domain_uuid \";\n\t\t\t\t\t$parameters['domain_uuid'] = $_SESSION[\"domain_uuid\"];\n\t\t\t\t}\n\t\t\t\t$sql .= \"and (user_type = 'default' or user_type is null) \";\n\t\t\t\t$parameters['username'] = $_REQUEST['username'];\n\t\t\t\t$database = new database;\n\t\t\t\t$row = $database->select($sql, $parameters, 'row');\n\t\t\t\tunset($parameters);\n\n\t\t\t\t//set class variables\n\t\t\t\t//if (!empty($row[\"user_email\"])) {\n\t\t\t\t//\t$this->user_uuid = $row['user_uuid'];\n\t\t\t\t//\t$this->user_email = $row['user_email'];\n\t\t\t\t//\t$this->contact_uuid = $row['contact_uuid'];\n\t\t\t\t//}\n\n\t\t\t\t//set a few session variables\n\t\t\t\t$_SESSION[\"user_uuid\"] = $row['user_uuid'];\n\t\t\t\t$_SESSION[\"username\"] = $row['username'];\n\t\t\t\t$_SESSION[\"user_email\"] = $row['user_email'];\n\t\t\t\t$_SESSION[\"contact_uuid\"] = $row[\"contact_uuid\"];\n\n\t\t\t\t//user not found\n\t\t\t\tif (empty($row) || !is_array($row) || @sizeof($row) == 0) {\n\t\t\t\t\t//clear submitted usernames\n\t\t\t\t\tunset($this->username, $_SESSION['username'], $_REQUEST['username'], $_POST['username']);\n\n\t\t\t\t\t//clear authentication session\n\t\t\t\t\tunset($_SESSION['authentication']);\n\n\t\t\t\t\t//build the result array\n\t\t\t\t\t$result[\"plugin\"] = \"email\";\n\t\t\t\t\t$result[\"domain_uuid\"] = $_SESSION[\"domain_uuid\"];\n\t\t\t\t\t$result[\"domain_name\"] = $_SESSION[\"domain_name\"];\n\t\t\t\t\t$result[\"authorized\"] = false;\n\n\t\t\t\t\t//retun the array\n\t\t\t\t\treturn $result;\n\t\t\t\t}\n\n\t\t\t\t//user email not found\n\t\t\t\telse if (empty($row[\"user_email\"])) {\n\t\t\t\t\t//clear submitted usernames\n\t\t\t\t\tunset($this->username, $_SESSION['username'], $_REQUEST['username'], $_POST['username']);\n\n\t\t\t\t\t//clear authentication session\n\t\t\t\t\tunset($_SESSION['authentication']);\n\n\t\t\t\t\t//build the result array\n\t\t\t\t\t$result[\"plugin\"] = \"email\";\n\t\t\t\t\t$result[\"domain_name\"] = $_SESSION[\"domain_name\"];\n\t\t\t\t\t$result[\"username\"] = $_REQUEST['username'];\n\t\t\t\t\t$result[\"user_uuid\"] = $_SESSION[\"user_uuid\"];\n\t\t\t\t\t$result[\"domain_uuid\"] = $_SESSION[\"domain_uuid\"];\n\t\t\t\t\t$result[\"contact_uuid\"] = $_SESSION[\"contact_uuid\"];\n\t\t\t\t\t$result[\"authorized\"] = false;\n\n\t\t\t\t\t//add the failed login to user logs\n\t\t\t\t\tuser_logs::add($result);\n\n\t\t\t\t\t//return the array\n\t\t\t\t\treturn $result;\n\t\t\t\t}\n\n\t\t\t\t//authentication code\n\t\t\t\t$_SESSION[\"user\"][\"authentication\"][\"email\"][\"code\"] = generate_password(6, 1);\n\t\t\t\t$_SESSION[\"user\"][\"authentication\"][\"email\"][\"epoch\"] = time();\n\n\t\t\t\t//$_SESSION[\"authentication_address\"] = $_SERVER['REMOTE_ADDR'];\n\t\t\t\t//$_SESSION[\"authentication_date\"] = 'now()';\n\n\t\t\t\t//set the authentication code\n\t\t\t\t//$sql = \"update v_users \\n\";\n\t\t\t\t//$sql .= \"set auth_code = :auth_code \\n\";\n\t\t\t\t//$sql .= \"where user_uuid = :user_uuid;\";\n\t\t\t\t//$parameters['auth_code'] = $auth_code_hash;\n\t\t\t\t//$parameters['user_uuid'] = $this->user_uuid;\n\t\t\t\t//$database->execute($sql, $parameters);\n\t\t\t\t//unset($sql);\n\n\t\t\t\t//email settings\n\t\t\t\t//$email_address = $this->user_email;\n\t\t\t\t//$email_subject = 'Validation Code';\n\t\t\t\t//$email_body = 'Validation Code: '.$authentication_code;\n\n\t\t\t\t//send email with the authentication_code\n\t\t\t\t//ob_start();\n\t\t\t\t//$sent = !send_email($email_address, $email_subject, $email_body, $email_error, null, null, 3, 3) ? false : true;\n\t\t\t\t//$response = ob_get_clean();\n\n\t\t\t\t//get the language code\n\t\t\t\t$language_code = $_SESSION['domain']['language']['code'];\n\n\t\t\t\t//get the email template from the database\n\t\t\t\t$sql = \"select template_subject, template_body \";\n\t\t\t\t$sql .= \"from v_email_templates \";\n\t\t\t\t$sql .= \"where (domain_uuid = :domain_uuid or domain_uuid is null) \";\n\t\t\t\t$sql .= \"and template_language = :template_language \";\n\t\t\t\t$sql .= \"and template_category = :template_category \";\n\t\t\t\t$sql .= \"and template_subcategory = :template_subcategory \";\n\t\t\t\t$sql .= \"and template_type = :template_type \";\n\t\t\t\t$sql .= \"and template_enabled = 'true' \";\n\t\t\t\t$parameters['domain_uuid'] = $_SESSION[\"domain_uuid\"];\n\t\t\t\t$parameters['template_language'] = $language_code;\n\t\t\t\t$parameters['template_category'] = 'authentication';\n\t\t\t\t$parameters['template_subcategory'] = 'email';\n\t\t\t\t$parameters['template_type'] = 'html';\n\t\t\t\t$database = new database;\n\t\t\t\t$row = $database->select($sql, $parameters, 'row');\n\t\t\t\t$email_subject = $row['template_subject'];\n\t\t\t\t$email_body = $row['template_body'];\n\t\t\t\tunset($sql, $parameters, $row);\n\n\t\t\t\t//replace variables in email subject\n\t\t\t\t$email_subject = str_replace('${domain_name}', $_SESSION[\"domain_name\"], $email_subject);\n\n\t\t\t\t//replace variables in email body\n\t\t\t\t$email_body = str_replace('${domain_name}', $_SESSION[\"domain_name\"], $email_body);\n\t\t\t\t$email_body = str_replace('${auth_code}', $_SESSION[\"user\"][\"authentication\"][\"email\"][\"code\"], $email_body);\n\n\t\t\t\t//get the email from name and address\n\t\t\t\t$email_from_address = $_SESSION['email']['smtp_from']['text'];\n\t\t\t\t$email_from_name = $_SESSION['email']['smtp_from_name']['text'];\n\n\t\t\t\t//get the email send mode options: direct or email_queue\n\t\t\t\t$email_send_mode = $_SESSION['authentication']['email_send_mode']['text'] ?? 'email_queue';\n\n\t\t\t\t//send the email\n\t\t\t\tif ($email_send_mode == 'email_queue') {\n\t\t\t\t\t//set the variables\n\t\t\t\t\t$email_queue_uuid = uuid();\n\t\t\t\t\t$email_uuid = uuid();\n\t\t\t\t\t$hostname = gethostname();\n\n\t\t\t\t\t//add the temporary permissions\n\t\t\t\t\t$p = new permissions;\n\t\t\t\t\t$p->add(\"email_queue_add\", 'temp');\n\t\t\t\t\t$p->add(\"email_queue_edit\", 'temp');\n\n\t\t\t\t\t$array['email_queue'][0][\"email_queue_uuid\"] = $email_queue_uuid;\n\t\t\t\t\t$array['email_queue'][0][\"domain_uuid\"] = $_SESSION[\"domain_uuid\"];\n\t\t\t\t\t$array['email_queue'][0][\"hostname\"] = $hostname;\n\t\t\t\t\t$array['email_queue'][0][\"email_date\"] = 'now()';\n\t\t\t\t\t$array['email_queue'][0][\"email_from\"] = $email_from_address;\n\t\t\t\t\t$array['email_queue'][0][\"email_to\"] = $_SESSION[\"user_email\"];\n\t\t\t\t\t$array['email_queue'][0][\"email_subject\"] = $email_subject;\n\t\t\t\t\t$array['email_queue'][0][\"email_body\"] = $email_body;\n\t\t\t\t\t$array['email_queue'][0][\"email_status\"] = 'waiting';\n\t\t\t\t\t$array['email_queue'][0][\"email_retry_count\"] = 3;\n\t\t\t\t\t$array['email_queue'][0][\"email_uuid\"] = $email_uuid;\n\t\t\t\t\t$array['email_queue'][0][\"email_action_before\"] = null;\n\t\t\t\t\t$array['email_queue'][0][\"email_action_after\"] = null;\n\t\t\t\t\t$database = new database;\n\t\t\t\t\t$database->app_name = 'email queue';\n\t\t\t\t\t$database->app_uuid = '5befdf60-a242-445f-91b3-2e9ee3e0ddf7';\n\t\t\t\t\t$database->save($array);\n\t\t\t\t\t$err = $database->message;\n\t\t\t\t\tunset($array);\n\n\t\t\t\t\t//remove the temporary permission\n\t\t\t\t\t$p->delete(\"email_queue_add\", 'temp');\n\t\t\t\t\t$p->delete(\"email_queue_edit\", 'temp');\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//send email - direct\n\t\t\t\t\t$email = new email;\n\t\t\t\t\t$email->recipients = $_SESSION[\"user_email\"];\n\t\t\t\t\t$email->subject = $email_subject;\n\t\t\t\t\t$email->body = $email_body;\n\t\t\t\t\t$email->from_address = $email_from_address;\n\t\t\t\t\t$email->from_name = $email_from_name;\n\t\t\t\t\t//$email->attachments = $email_attachments;\n\t\t\t\t\t$email->debug_level = 0;\n\t\t\t\t\t$email->method = 'direct';\n\t\t\t\t\t$sent = $email->send();\n\t\t\t\t}\n\n\t\t\t\t//debug informations\n\t\t\t\t//$email_response = $email->response;\n\t\t\t\t//$email_error = $email->email_error;\n\t\t\t\t//echo $email_response.\"<br />\\n\";\n\t\t\t\t//echo $email_error.\"<br />\\n\";\n\n\t\t\t\t//set a default template\n\t\t\t\t$_SESSION['domain']['template']['name'] = 'default';\n\t\t\t\t$_SESSION['theme']['menu_brand_image']['text'] = PROJECT_PATH.'/themes/default/images/logo.png';\n\t\t\t\t$_SESSION['theme']['menu_brand_type']['text'] = 'image';\n\n\t\t\t\t//get the domain\n\t\t\t\t$domain_array = explode(\":\", $_SERVER[\"HTTP_HOST\"]);\n\t\t\t\t$domain_name = $domain_array[0];\n\n\t\t\t\t//temp directory\n\t\t\t\t$_SESSION['server']['temp']['dir'] = '/tmp';\n\n\t\t\t\t//create token\n\t\t\t\t//$object = new token;\n\t\t\t\t//$token = $object->create('login');\n\n\t\t\t\t//add multi-lingual support\n\t\t\t\t$language = new text;\n\t\t\t\t$text = $language->get(null, '/core/authentication');\n\n\t\t\t\t//initialize a template object\n\t\t\t\t$view = new template();\n\t\t\t\t$view->engine = 'smarty';\n\t\t\t\t$view->template_dir = $_SERVER[\"DOCUMENT_ROOT\"].PROJECT_PATH.'/core/authentication/resources/views/';\n\t\t\t\t$view->cache_dir = $_SESSION['server']['temp']['dir'];\n\t\t\t\t$view->init();\n\n\t\t\t\t//assign default values to the template\n\t\t\t\t$view->assign(\"project_path\", PROJECT_PATH);\n\t\t\t\t$view->assign(\"login_destination_url\", $settings['login']['destination']);\n\t\t\t\t$view->assign(\"favicon\", $settings['theme']['favicon']);\n\t\t\t\t$view->assign(\"login_title\", $text['label-verify']);\n\t\t\t\t$view->assign(\"login_email_description\", $text['label-email_description']);\n\t\t\t\t$view->assign(\"login_authentication_code\", $text['label-authentication_code']);\n\t\t\t\t$view->assign(\"login_logo_width\", $settings['theme']['login_logo_width']);\n\t\t\t\t$view->assign(\"login_logo_height\", $settings['theme']['login_logo_height']);\n\t\t\t\t$view->assign(\"login_logo_source\", $settings['theme']['logo']);\n\t\t\t\t$view->assign(\"button_verify\", $text['label-verify']);\n\t\t\t\t$view->assign(\"message_delay\", $settings['theme']['message_delay']);\n\t\t\t\tif (!empty($_SESSION['username'])) {\n\t\t\t\t\t$view->assign(\"username\", $_SESSION['username']);\n\t\t\t\t\t$view->assign(\"button_cancel\", $text['button-cancel']);\n\t\t\t\t}\n\n\t\t\t\t//messages\n\t\t\t\t$view->assign('messages', message::html(true, '\t\t'));\n\n\t\t\t\t//show the views\n\t\t\t\t$content = $view->render('email.htm');\n\t\t\t\techo $content;\n\t\t\t\texit;\n\t\t\t}\n\n\t\t//if authorized then verify\n\t\t\tif (isset($_POST['authentication_code'])) {\n\n\t\t\t\t//check if the authentication code has expired. if expired return false\n\t\t\t\tif (!empty($_SESSION[\"user\"]) && $_SESSION[\"user\"][\"authentication\"][\"email\"][\"epoch\"] + 3 > time()) {\n\t\t\t\t\t//authentication code expired\n\t\t\t\t\t$result[\"plugin\"] = \"email\";\n\t\t\t\t\t$result[\"domain_name\"] = $_SESSION[\"domain_name\"];\n\t\t\t\t\t$result[\"username\"] = $_SESSION[\"username\"];\n\t\t\t\t\t$result[\"error_message\"] = 'code expired';\n\t\t\t\t\t$result[\"authorized\"] = false;\n\t\t\t\t\tprint_r($result);\n\t\t\t\t\treturn $result;\n\t\t\t\t\texit;\n\t\t\t\t}\n\n\t\t\t\t//get the user details\n\t\t\t\t$sql = \"select user_uuid, user_email, contact_uuid\\n\";\n\t\t\t\t$sql .= \"from v_users\\n\";\n\t\t\t\t$sql .= \"where (\\n\";\n\t\t\t\t$sql .= \"\tusername = :username\\n\";\n\t\t\t\t$sql .= \"\tor user_email = :username\\n\";\n\t\t\t\t$sql .= \")\\n\";\n\t\t\t\tif ($settings['users']['unique'] != \"global\") {\n\t\t\t\t\t//unique username per domain (not globally unique across system - example: email address)\n\t\t\t\t\t$sql .= \"and domain_uuid = :domain_uuid \";\n\t\t\t\t\t$parameters['domain_uuid'] = $_SESSION[\"domain_uuid\"];\n\t\t\t\t}\n\t\t\t\t$parameters['username'] = $_SESSION[\"username\"];\n\t\t\t\t$database = new database;\n\t\t\t\t$row = $database->select($sql, $parameters, 'row');\n\t\t\t\t$this->user_uuid = $row['user_uuid'];\n\t\t\t\t$this->user_email = $row['user_email'];\n\t\t\t\t$this->contact_uuid = $row['contact_uuid'];\n\t\t\t\tunset($parameters);\n\t\t\t\t/*\n\t\t\t\techo 'session code = '.$_SESSION[\"user\"][\"authentication\"][\"email\"][\"code\"].'<br>';\n\t\t\t\techo 'post code = '.$_POST['authentication_code'].'<br>';\n\t\t\t\texit;\n\t\t\t\t*/\n\n\t\t\t\t//validate the code\n\t\t\t\tif (!empty($_SESSION[\"user\"]) && $_SESSION[\"user\"][\"authentication\"][\"email\"][\"code\"] === $_POST['authentication_code']) {\n\t\t\t\t\t$auth_valid = true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$auth_valid = false;\n\t\t\t\t}\n\n\t\t\t\t//clear posted authentication code\n\t\t\t\tunset($_POST['authentication_code']);\n\n\t\t\t\t//get the user details\n\t\t\t\tif ($auth_valid) {\n\t\t\t\t\t//get user data from the database\n\t\t\t\t\t$sql = \"select user_uuid, username, user_email, contact_uuid from v_users \";\n\t\t\t\t\t$sql .= \"where user_uuid = :user_uuid \";\n\t\t\t\t\tif ($settings['users']['unique'] != \"global\") {\n\t\t\t\t\t\t//unique username per domain (not globally unique across system - example: email address)\n\t\t\t\t\t\t$sql .= \"and domain_uuid = :domain_uuid \";\n\t\t\t\t\t\t$parameters['domain_uuid'] = $_SESSION[\"domain_uuid\"];\n\t\t\t\t\t}\n\t\t\t\t\t$parameters['user_uuid'] = $_SESSION[\"user_uuid\"];\n\t\t\t\t\t$database = new database;\n\t\t\t\t\t$row = $database->select($sql, $parameters, 'row');\n\t\t\t\t\tunset($parameters);\n\n\t\t\t\t\t//set a few session variables\n\t\t\t\t\t//$_SESSION[\"username\"] = $row['username']; //setting the username makes it skip the rest of the authentication\n\t\t\t\t\t//$_SESSION[\"user_email\"] = $row['user_email'];\n\t\t\t\t\t//$_SESSION[\"contact_uuid\"] = $row[\"contact_uuid\"];\n\t\t\t\t}\n\t\t\t\telse {\n// \t\t\t\t\t//destroy session\n// \t\t\t\t\tsession_unset();\n// \t\t\t\t\tsession_destroy();\n// \t\t\t\t\t//$_SESSION['authentication']['plugin']\n// \t\t\t\t\t//send http 403\n// \t\t\t\t\theader('HTTP/1.0 403 Forbidden', true, 403);\n//\n// \t\t\t\t\t//redirect to the root of the website\n// \t\t\t\t\theader(\"Location: \".PROJECT_PATH.\"/\");\n//\n// \t\t\t\t\t//exit the code\n// \t\t\t\t\texit();\n\n\t\t\t\t\t//clear submitted usernames\n\t\t\t\t\tunset($this->username, $_SESSION['username'], $_REQUEST['username'], $_POST['username']);\n\n\t\t\t\t\t//clear authentication session\n\t\t\t\t\tunset($_SESSION['authentication']);\n\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t//check if user successfully logged in during the interval\n\t\t\t\t\t//$sql = \"select user_log_uuid, timestamp, user_name, user_agent, remote_address \";\n\t\t\t\t\t$sql = \"select count(*) as count \";\n\t\t\t\t\t$sql .= \"from v_user_logs \";\n\t\t\t\t\t$sql .= \"where domain_uuid = :domain_uuid \";\n\t\t\t\t\t$sql .= \"and user_uuid = :user_uuid \";\n\t\t\t\t\t$sql .= \"and user_agent = :user_agent \";\n\t\t\t\t\t$sql .= \"and type = 'login' \";\n\t\t\t\t\t$sql .= \"and result = 'success' \";\n\t\t\t\t\t$sql .= \"and floor(extract(epoch from now()) - extract(epoch from timestamp)) > 3 \";\n\t\t\t\t\t$sql .= \"and floor(extract(epoch from now()) - extract(epoch from timestamp)) < 300 \";\n\t\t\t\t\t$parameters['domain_uuid'] = $this->domain_uuid;\n\t\t\t\t\t$parameters['user_uuid'] = $this->user_uuid;\n\t\t\t\t\t$parameters['user_agent'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t\t\t\t$database = new database;\n\t\t\t\t\t$user_log_count = $database->select($sql, $parameters, 'all');\n\t\t\t\t\t//view_array($user_log_count);\n\t\t\t\t\tunset($sql, $parameters);\n\t\t\t\t*/\n\n\t\t\t\t//result array\n\t\t\t\t$result[\"plugin\"] = \"email\";\n\t\t\t\t$result[\"domain_name\"] = $_SESSION[\"domain_name\"];\n\t\t\t\t$result[\"username\"] = $_SESSION[\"username\"];\n\t\t\t\t$result[\"user_uuid\"] = $_SESSION[\"user_uuid\"];\n\t\t\t\t$result[\"domain_uuid\"] = $_SESSION[\"domain_uuid\"];\n\t\t\t\t$result[\"contact_uuid\"] = $_SESSION[\"contact_uuid\"];\n\t\t\t\t$result[\"authorized\"] = $auth_valid ? true : false;\n\n\t\t\t\t//add the failed login to user logs\n\t\t\t\tif (!$auth_valid) {\n\t\t\t\t\tuser_logs::add($result);\n\t\t\t\t}\n\n\t\t\t\t//retun the array\n\t\t\t\treturn $result;\n\n\t\t\t\t//$_SESSION['authentication']['plugin']['email']['plugin'] = \"email\";\n\t\t\t\t//$_SESSION['authentication']['plugin']['email']['domain_name'] = $_SESSION[\"domain_name\"];\n\t\t\t\t//$_SESSION['authentication']['plugin']['email']['username'] = $row['username'];\n\t\t\t\t//$_SESSION['authentication']['plugin']['email']['user_uuid'] = $_SESSION[\"user_uuid\"];\n\t\t\t\t//$_SESSION['authentication']['plugin']['email']['contact_uuid'] = $_SESSION[\"contact_uuid\"];\n\t\t\t\t//$_SESSION['authentication']['plugin']['email']['domain_uuid'] = $_SESSION[\"domain_uuid\"];\n\t\t\t\t//$_SESSION['authentication']['plugin']['email']['authorized'] = $auth_valid ? true : false;\n\t\t\t}\n\n\t}", "title": "" }, { "docid": "c27cc9043b5faefd33235286ebb8c5a7", "score": "0.5360544", "text": "function mailShutterbugVerificationCode($name='User',$toEmail, $vc) {\n $strMessage = 'Hi ';\n if ($toEmail != '') {\n $strMessage .= ucwords($name).'!';\n }\n \n $url = SITEPATH.'/shutterbug_activation.php?code='.$vc.'&unm='.$toEmail;\n\n $strMessage .= ' <br/><br/>You are only one step away before you can begin to participate in ShutterBug. You are required to click on the verification link below. '; \n $strMessage .= '<br/><a href=\"' . $url . '\"'; \n $strMessage .= ' target=\"_blank\" >' . $url . '</a>';\n $strMessage .= '<br/>(If clicking on the above link doesn\\'t work, try copy and pasting it into your browser)';\n $strMessage .= '<br/><br/><b>Please remember that all future communication with respect to your participation in ShutterBug would be communicated to you via email, to this address.</b>';\n $strMessage .= '<br/><br/>For any query, reach out to us at [email protected]';\n $strMessage .= '<br/><br/>Regards,<br/><br/>Team ShutterBug';\n \n $subject = 'Verification for Indiatimes ShutterBug ';\n $fromEmail = 'ShutterBug <[email protected]>';\n sendHTMLMail($toEmail, $subject, $strMessage, $fromEmail, $fromEmail);\n}", "title": "" }, { "docid": "2bbf9eeb7a4cd851608ccfab9bd36758", "score": "0.5359078", "text": "public function run()\n {\n if (!addon_installed('newsletter')) {\n return;\n }\n\n $minutes_between_sends = intval(get_option('minutes_between_sends'));\n $mails_per_send = intval(get_option('mails_per_send'));\n\n $time = time();\n $last_time = intval(get_value('last_newsletter_drip_send', null, true));\n if (($last_time > time() - $minutes_between_sends * 60) && (!/*we do allow an admin to force it by CRON URL*/$GLOBALS['FORUM_DRIVER']->is_super_admin(get_member()))) {\n return;\n }\n set_value('last_newsletter_drip_send', strval($time), true);\n\n require_lang('newsletter');\n\n $to_send = $GLOBALS['SITE_DB']->query_select('newsletter_drip_send', array('*'), null, 'ORDER BY d_inject_time DESC', $mails_per_send);\n if (count($to_send) != 0) {\n // Quick cleanup for maximum performance\n $id_list = '';\n foreach ($to_send as $mail) {\n if ($id_list != '') {\n $id_list .= ' OR ';\n }\n $id_list .= 'id=' . strval($mail['id']);\n }\n $GLOBALS['SITE_DB']->query('DELETE FROM ' . get_table_prefix() . 'newsletter_drip_send WHERE ' . $id_list, null, null, false, true);\n\n // Send\n require_code('mail');\n foreach ($to_send as $mail) {\n mail_wrap($mail['d_subject'], $mail['d_message'], array($mail['d_to_email']), array($mail['d_to_name']), $mail['d_from_email'], $mail['d_from_name'], $mail['d_priority'], null, true, null, true, $mail['d_html_only'] == 1, false, $mail['d_template'], true);\n }\n }\n }", "title": "" }, { "docid": "c69a4c1e9a3af46b65db4b3b5a6cdce7", "score": "0.5356992", "text": "function SendMailing($clean_only = false)\n{\n\tglobal $txt, $sourcedir, $context, $smcFunc;\n\tglobal $scripturl, $modSettings, $user_info;\n\n\t// How many to send at once? Quantity depends on whether we are queueing or not.\n\t$num_at_once = empty($modSettings['mail_queue']) ? 60 : 1000;\n\n\t// If by PM's I suggest we half the above number.\n\tif (!empty($_POST['send_pm']))\n\t\t$num_at_once /= 2;\n\n\tcheckSession();\n\n\t// Where are we actually to?\n\t$context['start'] = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;\n\t$context['email_force'] = !empty($_POST['email_force']) ? 1 : 0;\n\t$context['send_pm'] = !empty($_POST['send_pm']) ? 1 : 0;\n\t$context['total_emails'] = !empty($_POST['total_emails']) ? (int) $_POST['total_emails'] : 0;\n\t$context['max_id_member'] = !empty($_POST['max_id_member']) ? (int) $_POST['max_id_member'] : 0;\n\t$context['send_html'] = !empty($_POST['send_html']) ? '1' : '0';\n\t$context['parse_html'] = !empty($_POST['parse_html']) ? '1' : '0';\n\n\t// Create our main context.\n\t$context['recipients'] = array(\n\t\t'groups' => array(),\n\t\t'exclude_groups' => array(),\n\t\t'members' => array(),\n\t\t'exclude_members' => array(),\n\t\t'emails' => array(),\n\t);\n\n\t// Have we any excluded members?\n\tif (!empty($_POST['exclude_members']))\n\t{\n\t\t$members = explode(',', $_POST['exclude_members']);\n\t\tforeach ($members as $member)\n\t\t\tif ($member >= $context['start'])\n\t\t\t\t$context['recipients']['exclude_members'][] = (int) $member;\n\t}\n\n\t// What about members we *must* do?\n\tif (!empty($_POST['members']))\n\t{\n\t\t$members = explode(',', $_POST['members']);\n\t\tforeach ($members as $member)\n\t\t\tif ($member >= $context['start'])\n\t\t\t\t$context['recipients']['members'][] = (int) $member;\n\t}\n\t// Cleaning groups is simple - although deal with both checkbox and commas.\n\tif (!empty($_POST['groups']))\n\t{\n\t\tif (is_array($_POST['groups']))\n\t\t{\n\t\t\tforeach ($_POST['groups'] as $group => $dummy)\n\t\t\t\t$context['recipients']['groups'][] = (int) $group;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$groups = explode(',', $_POST['groups']);\n\t\t\tforeach ($groups as $group)\n\t\t\t\t$context['recipients']['groups'][] = (int) $group;\n\t\t}\n\t}\n\t// Same for excluded groups\n\tif (!empty($_POST['exclude_groups']))\n\t{\n\t\tif (is_array($_POST['exclude_groups']))\n\t\t{\n\t\t\tforeach ($_POST['exclude_groups'] as $group => $dummy)\n\t\t\t\t$context['recipients']['exclude_groups'][] = (int) $group;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$groups = explode(',', $_POST['exclude_groups']);\n\t\t\tforeach ($groups as $group)\n\t\t\t\t$context['recipients']['exclude_groups'][] = (int) $group;\n\t\t}\n\t}\n\t// Finally - emails!\n\tif (!empty($_POST['emails']))\n\t{\n\t\t$addressed = array_unique(explode(';', strtr($_POST['emails'], array(\"\\n\" => ';', \"\\r\" => ';', ',' => ';'))));\n\t\tforeach ($addressed as $curmem)\n\t\t{\n\t\t\t$curmem = trim($curmem);\n\t\t\tif ($curmem != '')\n\t\t\t\t$context['recipients']['emails'][$curmem] = $curmem;\n\t\t}\n\t}\n\n\t// If we're only cleaning drop out here.\n\tif ($clean_only)\n\t\treturn;\n\n\trequire_once($sourcedir . '/lib/Subs-Post.php');\n\n\t// Save the message and its subject in $context\n\t$context['subject'] = htmlspecialchars($_POST['subject']);\n\t$context['message'] = htmlspecialchars($_POST['message']);\n\n\t// Prepare the message for sending it as HTML\n\tif (!$context['send_pm'] && !empty($_POST['send_html']))\n\t{\n\t\t// Prepare the message for HTML.\n\t\tif (!empty($_POST['parse_html']))\n\t\t\t$_POST['message'] = str_replace(array(\"\\n\", ' '), array('<br />' . \"\\n\", '&nbsp; '), $_POST['message']);\n\n\t\t// This is here to prevent spam filters from tagging this as spam.\n\t\tif (preg_match('~\\<html~i', $_POST['message']) == 0)\n\t\t{\n\t\t\tif (preg_match('~\\<body~i', $_POST['message']) == 0)\n\t\t\t\t$_POST['message'] = '<html><head><title>' . $_POST['subject'] . '</title></head>' . \"\\n\" . '<body>' . $_POST['message'] . '</body></html>';\n\t\t\telse\n\t\t\t\t$_POST['message'] = '<html>' . $_POST['message'] . '</html>';\n\t\t}\n\t}\n\n\t// Use the default time format.\n\t$user_info['time_format'] = $modSettings['time_format'];\n\n\t$variables = array(\n\t\t'{$board_url}',\n\t\t'{$current_time}',\n\t\t'{$latest_member.link}',\n\t\t'{$latest_member.id}',\n\t\t'{$latest_member.name}'\n\t);\n\n\t// We might need this in a bit\n\t$cleanLatestMember = empty($_POST['send_html']) || $context['send_pm'] ? un_htmlspecialchars($modSettings['latestRealName']) : $modSettings['latestRealName'];\n\n\t// Replace in all the standard things.\n\t$_POST['message'] = str_replace($variables,\n\t\tarray(\n\t\t\t!empty($_POST['send_html']) ? '<a href=\"' . $scripturl . '\">' . $scripturl . '</a>' : $scripturl,\n\t\t\ttimeformat(forum_time(), false),\n\t\t\t!empty($_POST['send_html']) ? '<a href=\"' . $scripturl . '?action=profile;u=' . $modSettings['latestMember'] . '\">' . $cleanLatestMember . '</a>' : ($context['send_pm'] ? '[url=' . $scripturl . '?action=profile;u=' . $modSettings['latestMember'] . ']' . $cleanLatestMember . '[/url]' : $cleanLatestMember),\n\t\t\t$modSettings['latestMember'],\n\t\t\t$cleanLatestMember\n\t\t), $_POST['message']);\n\t$_POST['subject'] = str_replace($variables,\n\t\tarray(\n\t\t\t$scripturl,\n\t\t\ttimeformat(forum_time(), false),\n\t\t\t$modSettings['latestRealName'],\n\t\t\t$modSettings['latestMember'],\n\t\t\t$modSettings['latestRealName']\n\t\t), $_POST['subject']);\n\n\t$from_member = array(\n\t\t'{$member.email}',\n\t\t'{$member.link}',\n\t\t'{$member.id}',\n\t\t'{$member.name}'\n\t);\n\n\t// If we still have emails, do them first!\n\t$i = 0;\n\tforeach ($context['recipients']['emails'] as $k => $email)\n\t{\n\t\t// Done as many as we can?\n\t\tif ($i >= $num_at_once)\n\t\t\tbreak;\n\n\t\t// Don't sent it twice!\n\t\tunset($context['recipients']['emails'][$k]);\n\n\t\t// Dammit - can't PM emails!\n\t\tif ($context['send_pm'])\n\t\t\tcontinue;\n\n\t\t$to_member = array(\n\t\t\t$email,\n\t\t\t!empty($_POST['send_html']) ? '<a href=\"mailto:' . $email . '\">' . $email . '</a>' : $email,\n\t\t\t'??',\n\t\t\t$email\n\t\t);\n\n\t\tsendmail($email, str_replace($from_member, $to_member, $_POST['subject']), str_replace($from_member, $to_member, $_POST['message']), null, null, !empty($_POST['send_html']), 5);\n\n\t\t// Done another...\n\t\t$i++;\n\t}\n\n\t// Got some more to send this batch?\n\t$last_id_member = 0;\n\tif ($i < $num_at_once)\n\t{\n\t\t// Need to build quite a query!\n\t\t$sendQuery = '(';\n\t\t$sendParams = array();\n\t\tif (!empty($context['recipients']['groups']))\n\t\t{\n\t\t\t// Take the long route...\n\t\t\t$queryBuild = array();\n\t\t\tforeach ($context['recipients']['groups'] as $group)\n\t\t\t{\n\t\t\t\t$sendParams['group_' . $group] = $group;\n\t\t\t\t$queryBuild[] = 'mem.id_group = {int:group_' . $group . '}';\n\t\t\t\tif (!empty($group))\n\t\t\t\t{\n\t\t\t\t\t$queryBuild[] = 'FIND_IN_SET({int:group_' . $group . '}, mem.additional_groups) != 0';\n\t\t\t\t\t$queryBuild[] = 'mem.id_post_group = {int:group_' . $group . '}';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($queryBuild))\n\t\t\t$sendQuery .= implode(' OR ', $queryBuild);\n\t\t}\n\t\tif (!empty($context['recipients']['members']))\n\t\t{\n\t\t\t$sendQuery .= ($sendQuery == '(' ? '' : ' OR ') . 'mem.id_member IN ({array_int:members})';\n\t\t\t$sendParams['members'] = $context['recipients']['members'];\n\t\t}\n\n\t\t$sendQuery .= ')';\n\n\t\t// If we've not got a query then we must be done!\n\t\tif ($sendQuery == '()')\n\t\t\tredirectexit('action=admin');\n\n\t\t// Anything to exclude?\n\t\tif (!empty($context['recipients']['exclude_groups']) && in_array(0, $context['recipients']['exclude_groups']))\n\t\t\t$sendQuery .= ' AND mem.id_group != {int:regular_group}';\n\t\tif (!empty($context['recipients']['exclude_members']))\n\t\t{\n\t\t\t$sendQuery .= ' AND mem.id_member NOT IN ({array_int:exclude_members})';\n\t\t\t$sendParams['exclude_members'] = $context['recipients']['exclude_members'];\n\t\t}\n\n\t\t// Force them to have it?\n\t\tif (empty($context['email_force']))\n\t\t\t$sendQuery .= ' AND mem.notify_announcements = {int:notify_announcements}';\n\n\t\t// Get the smelly people - note we respect the id_member range as it gives us a quicker query.\n\t\t$result = smf_db_query( '\n\t\t\tSELECT mem.id_member, mem.email_address, mem.real_name, mem.id_group, mem.additional_groups, mem.id_post_group\n\t\t\tFROM {db_prefix}members AS mem\n\t\t\tWHERE mem.id_member > {int:min_id_member}\n\t\t\t\tAND mem.id_member < {int:max_id_member}\n\t\t\t\tAND ' . $sendQuery . '\n\t\t\t\tAND mem.is_activated = {int:is_activated}\n\t\t\tORDER BY mem.id_member ASC\n\t\t\tLIMIT {int:atonce}',\n\t\t\tarray_merge($sendParams, array(\n\t\t\t\t'min_id_member' => $context['start'],\n\t\t\t\t'max_id_member' => $context['start'] + $num_at_once - $i,\n\t\t\t\t'atonce' => $num_at_once - $i,\n\t\t\t\t'regular_group' => 0,\n\t\t\t\t'notify_announcements' => 1,\n\t\t\t\t'is_activated' => 1,\n\t\t\t))\n\t\t);\n\n\t\twhile ($row = mysql_fetch_assoc($result))\n\t\t{\n\t\t\t$last_id_member = $row['id_member'];\n\n\t\t\t// What groups are we looking at here?\n\t\t\tif (empty($row['additional_groups']))\n\t\t\t\t$groups = array($row['id_group'], $row['id_post_group']);\n\t\t\telse\n\t\t\t\t$groups = array_merge(\n\t\t\t\t\tarray($row['id_group'], $row['id_post_group']),\n\t\t\t\t\texplode(',', $row['additional_groups'])\n\t\t\t\t);\n\n\t\t\t// Excluded groups?\n\t\t\tif (array_intersect($groups, $context['recipients']['exclude_groups']))\n\t\t\t\tcontinue;\n\n\t\t\t// We might need this\n\t\t\t$cleanMemberName = empty($_POST['send_html']) || $context['send_pm'] ? un_htmlspecialchars($row['real_name']) : $row['real_name'];\n\n\t\t\t// Replace the member-dependant variables\n\t\t\t$message = str_replace($from_member,\n\t\t\t\tarray(\n\t\t\t\t\t$row['email_address'],\n\t\t\t\t\t!empty($_POST['send_html']) ? '<a href=\"' . $scripturl . '?action=profile;u=' . $row['id_member'] . '\">' . $cleanMemberName . '</a>' : ($context['send_pm'] ? '[url=' . $scripturl . '?action=profile;u=' . $row['id_member'] . ']' . $cleanMemberName . '[/url]' : $cleanMemberName),\n\t\t\t\t\t$row['id_member'],\n\t\t\t\t\t$cleanMemberName,\n\t\t\t\t), $_POST['message']);\n\n\t\t\t$subject = str_replace($from_member,\n\t\t\t\tarray(\n\t\t\t\t\t$row['email_address'],\n\t\t\t\t\t$row['real_name'],\n\t\t\t\t\t$row['id_member'],\n\t\t\t\t\t$row['real_name'],\n\t\t\t\t), $_POST['subject']);\n\n\t\t\t// Send the actual email - or a PM!\n\t\t\tif (!$context['send_pm'])\n\t\t\t\tsendmail($row['email_address'], $subject, $message, null, null, !empty($_POST['send_html']), 5);\n\t\t\telse\n\t\t\t\tsendpm(array('to' => array($row['id_member']), 'bcc' => array()), $subject, $message);\n\t\t}\n\t\tmysql_free_result($result);\n\t}\n\n\t// If used our batch assume we still have a member.\n\tif ($i >= $num_at_once)\n\t\t$last_id_member = $context['start'];\n\t// Or we didn't have one in range?\n\telseif (empty($last_id_member) && $context['start'] + $num_at_once < $context['max_id_member'])\n\t\t$last_id_member = $context['start'] + $num_at_once;\n\t// If we have no id_member then we're done.\n\telseif (empty($last_id_member) && empty($context['recipients']['emails']))\n\t{\n\t\t// Log this into the admin log.\n\t\tlogAction('newsletter', array(), 'admin');\n\n\t\tredirectexit('action=admin');\n\t}\n\n\t$context['start'] = $last_id_member;\n\n\t// Working out progress is a black art of sorts.\n\t$percentEmails = $context['total_emails'] == 0 ? 0 : ((count($context['recipients']['emails']) / $context['total_emails']) * ($context['total_emails'] / ($context['total_emails'] + $context['max_id_member'])));\n\t$percentMembers = ($context['start'] / $context['max_id_member']) * ($context['max_id_member'] / ($context['total_emails'] + $context['max_id_member']));\n\t$context['percentage_done'] = round(($percentEmails + $percentMembers) * 100, 2);\n\n\t$context['page_title'] = $txt['admin_newsletters'];\n\t$context['sub_template'] = 'email_members_send';\n}", "title": "" }, { "docid": "0693c1bb9dda932846e0ab0dc2f13fe2", "score": "0.535431", "text": "function onTP_GetHTML($vars)\n\t{\n\t\t$plgPaymentPayfastHelper = new plgPaymentPayfastHelper();\n\t\t$vars->action_url = $plgPaymentPayfastHelper->buildPayfastUrl();\n\t\t//Take this receiver email address from plugin if component not provided it\n\n\t\t\t$vars->merchant_id = $this->params->get('merchant_id','');\n\t\t\t$vars->merchant_key = $this->params->get('merchant_key','');\n\t\t\t//$this->preFormatingData($vars);\t // fomating on data\n\t\t\t$html = $this->buildLayout($vars);\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "2a052c3f1a00aa35b1047e372af8f042", "score": "0.5353317", "text": "function bodyHTML() {\n ob_start();\n $temp_layout = $this->controller->layout;\n $this->controller->layout = 'email'; // HTML wrapper for my html email in /app/views/layouts\n $this->controller->render($this->template . '_html'); \n $mail = ob_get_clean();\n $this->controller->layout = $temp_layout; // Turn on layout wrapping again\n return $mail;\n }", "title": "" }, { "docid": "3dfbc4d9a47a0a971f68c4cd6f3d6208", "score": "0.5344832", "text": "public function SendAdminEmail()\n\t{\tob_start();\n\t\techo '<p>Name: ', $this->InputSafeString($this->details['subname']), '</p><p>Email: ', $this->InputSafeString($this->details['subemail']), '</p>';\n\t\tif ($this->details['student'] && ($student = new Student($this->details['student'])) && $student->id)\n\t\t{\techo '<p>Existing student: <a href=\"', SITE_URL, 'iiadmin/member.php?id=', $student->id, '\">', $this->InputSafeString($student->GetName()), ' (', $this->InputSafeString($student->details['username']), ')</a></p>';\n\t\t}\n\t\techo '<p>Their question ...</p><p style=\"padding-left: 10px;\">', nl2br($this->InputSafeString($this->details['asktext'])), '</p><p>View it <a href=\"', $link = SITE_URL . 'iiadmin/askimamsubmission.php?id=' . $this->id, '\">here</a></p>';\n\t\t$htmlbody = ob_get_clean();\n\t\t\n\t\tob_start();\n\t\t$nl = \"\\n\";\n\t\techo 'Name: ', $this->InputSafeString($this->details['subname']), $nl, 'Email: ', $this->details['subemail'], $nl;\n\t\tif ($student && $student->id)\n\t\t{\techo 'Existing student: ', SITE_URL, 'iiadmin/member.php?id=', $student->id, ' - ', $student->GetName(), ' (', $student->details['username'], ')', $nl;\n\t\t}\n\t\techo 'Their question ...', $nl, $this->details['asktext'], $nl, 'View it here - ', $link, $nl;\n\t\t$plainbody = ob_get_clean();\n\t\t\n\t\t$mail = new HTMLMail();\n\t\t$mail->SetSubject('Question submitted for \"Ask the Expert\"');\n\t\t$mail->SendEMailForArea('ASKEXPERT', $htmlbody, $plainbody);\n\t}", "title": "" }, { "docid": "64ff4b1ba23f30d0dbc2a402139c7243", "score": "0.53372073", "text": "public function sendEmails()\n {\n $body = 'Контактное лицо: ' . $this->name . '<br>';\n $body .= 'Email: ' . $this->email . '<br>';\n $body .= 'Текст заявки: ' . $this->task;\n Yii::$app->mailer->compose()\n ->setFrom([Yii::$app->params['senderEmail']])\n ->setTo(Yii::$app->params['myEmail'])\n ->setSubject('Подана заявка на разработку базы данных')\n ->setHtmlBody($body)\n ->send();\n\n $body = $this->name . ', Вы подали заявку на создание базы данных.<br><br>';\n $body .= 'Текст заявки: ' . $this->task . '<br><br>';\n $body .= 'Мы ответим Вам в течение 24 часов.';\n Yii::$app->mailer->compose()\n ->setFrom([Yii::$app->params['senderEmail']])\n ->setTo($this->email)\n ->setSubject('Заявка на разработку базы данных')\n ->setHtmlBody($body)\n ->send();\n }", "title": "" }, { "docid": "8949dcd9cf8e19786132207bc1d0cbfd", "score": "0.53369856", "text": "function forum_make_mail_html($course, $cm, $forum, $discussion, $post, $userfrom, $userto, $replyaddress = null) {\n return forum_make_mail_post($course,\n $cm,\n $forum,\n $discussion,\n $post,\n $userfrom,\n $userto,\n forum_user_can_post($forum, $discussion, $userto, $cm, $course)\n );\n}", "title": "" }, { "docid": "ff7b72fde5158f85a0e2493730383d45", "score": "0.53342664", "text": "function email_set_content_type(){\n return \"text/html\";\n}", "title": "" }, { "docid": "c1f362f2960edcb6d8282a191def1df4", "score": "0.53291374", "text": "function send_email( $args ) {\n\tglobal $opts;\n\n\t$filter = function() { return 'text/html'; };\n\tadd_filter( 'wp_mail_content_type', $filter );\n\n\twp_mail(\n\t\t$args['to'] ?? '',\n\t\t$args['subject'] ?? '',\n\t\tstr_replace( \"<br />\", \"<br />\\n\", $args['body'] ?? '' ),\n\t\tarray_filter( [\n\t\t\t'From: WordPress.org Plugin Directory <[email protected]>',\n\t\t\t'Return-Path: <[email protected]>',\n\t\t\t( $args['cc'] ? 'CC: ' . implode( ', ', $args['cc'] ) : '' ),\n\t\t\t( $args['bcc'] ? 'BCC: ' . implode( ', ', (array) $args['bcc'] ) : '' ),\n\t\t] )\n\t);\n\tremove_filter( 'wp_mail_content_type', $filter );\n\n\t$api = HelpScout::instance();\n\t$payload = [\n\t\t'type' => 'email',\n\t\t'assignTo' => ASSIGN_TO_USER,\n\t\t'mailboxId' => $api->get_mailbox_id( 'plugins' ),\n\t\t'status' => 'closed',\n\t\t'imported' => true,\n\t\t'customer' => array_filter( [\n\t\t\t'email' => $args['to'] ?? '',\n\t\t\t'firstName' => explode( ' ', $args['name'] ?? '', 2 )[0] ?? '',\n\t\t\t'lastName' => explode( ' ', $args['name'] ?? '', 2 )[1] ?? '',\n\t\t] ),\n\t\t'subject' => $args['subject'] ?? '',\n\t\t'threads' => [\n\t\t\t[\n\t\t\t\t'type' => 'note',\n\t\t\t\t'text' => 'This was automated by <code>bin/email-bulk-security-vulnerabilities.php</code> processing a CSV file: <code>' . ( $opts['csv'] ?? '' ) . '</code>',\n\t\t\t\t'user' => ATTRIBUTE_TO_USER\n\t\t\t],\n\t\t\t[\n\t\t\t\t'type' => 'reply',\n\t\t\t\t'cc' => (array) ( $args['cc'] ?? [] ),\n\t\t\t\t'bcc' => (array) ( $args['bcc'] ?? [] ),\n\t\t\t\t'text' => $args['body'] ?? '',\n\t\t\t\t'customer' => [\n\t\t\t\t\t'email' => '[email protected]',\n\t\t\t\t],\n\t\t\t\t'user' => ATTRIBUTE_TO_USER\n\t\t\t]\n\t\t]\n\t];\n\n\treturn $api->post( '/v2/conversations', $payload );\n}", "title": "" }, { "docid": "bcef651c55b30c93cd1a332e83665637", "score": "0.53290445", "text": "public function send()\r\n\t{\r\n\t\tif(!isset($this->to_emails[0], $this->subject, $this->text_message))\r\n\t\t{\r\n\t\t\ttrigger_error(\"Could not send email (missing required data)\", E_USER_WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfor($i = 0; $i < count($this->to_emails); $i++)\r\n\t\t{\r\n\t\t\t$to = \"\";\r\n\t\t\t$subject = \"\";\r\n\t\t\t$message = \"\";\r\n\t\t\t$headers = \"\";\r\n\r\n\t\t\tif(isset($this->to_names[$i]))\r\n\t\t\t{\r\n\t\t\t\t$to .= $this->to_names[$i] . \" <\" . $this->to_emails[$i] . \">\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$to .= \"<\" . $this->to_emails[$i] . \">\";\r\n\t\t\t}\r\n\r\n\t\t\t$subject .= $this->apply_templates($this->subject);\r\n\r\n\t\t\t$headers .= \"From: \" . $this->from_name . \" <\" . $this->from_email . \">\" . self::CRLF;\r\n\r\n\t\t\tif($this->mp_message && isset($this->html_message))\r\n\t\t\t{\r\n\t\t\t\t$headers .= self::MIME_VERSION . self::CRLF;\r\n\t\t\t\t$headers .= self::CONTENT_MIME . \" \";\r\n\t\t\t\t$headers .= 'boundary=\"' . $this->mp_boundary . '\"';\r\n\r\n\t\t\t\t$message .= self::MIME_NOTICE . self::CRLF;\r\n\t\t\t\t$message .= \"--\" . $this->mp_boundary . self::CRLF;\r\n\t\t\t\t$message .= self::CONTENT_TEXT . \" \";\r\n\t\t\t\t$message .= self::CHARACTER_SET . self::CRLF;\r\n\t\t\t\t$message .= self::TRANSFER_ENC . self::CRLF;\r\n\t\t\t\t$message .= $this->apply_templates($this->text_message) . self::CRLF;\r\n\t\t\t\t$message .= \"--\" . $this->mp_boundary . self::CRLF;\r\n\t\t\t\t$message .= self::CONTENT_HTML . \" \";\r\n\t\t\t\t$message .= self::CHARACTER_SET . self::CRLF;\r\n\t\t\t\t$message .= self::TRANSFER_ENC . self::CRLF;\r\n\t\t\t\t$message .= $this->apply_templates($this->html_message) . self::CRLF;\r\n\t\t\t\t$message .= \"--\" . $this->mp_boundary . \"--\" . self::CRLF;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$message .= self::CONTENT_TEXT . self::CRLF;\r\n\t\t\t\t$message .= self::CHARACTER_SET . self::CRLF;\r\n\t\t\t\t$message .= self::TRANSFER_ENC . self::CRLF;\r\n\t\t\t\t$message .= $this->apply_templates($this->text_message) . self::CRLF;\r\n\t\t\t}\r\n\r\n\t\t\tif(!mail($to, $subject, $message, $headers))\r\n\t\t\t{\r\n\t\t\t\ttrigger_error(\"Could not send email (server error)\", E_USER_WARNING);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "cff31c3e974f39a299c3e8e577d8e82e", "score": "0.5327758", "text": "function send($preview = true, $email = \"\") {\r\n //Get articles as array\r\n $content = $this->build();\r\n $this->loadNewsletter();\r\n\r\n if ($preview) {\r\n include_once(XOOPS_ROOT_PATH.\"/modules/smartmail/class/previewmailer.php\");\r\n $mailer = new NewsletterPreviewMailer();\r\n $recipients = $email;\r\n }\r\n else {\r\n $mailer = \"smart\"; // change to a newsletter preference?\r\n // Include class file\r\n include_once(XOOPS_ROOT_PATH.\"/modules/smartmail/class/\".strtolower($mailer).\"mailer.php\");\r\n // Calculate class name\r\n $classname = \"Newsletter\".ucfirst($mailer).\"Mailer\";\r\n // Instantiate mailer class\r\n $mailer = new $classname($this);\r\n // Get recipient list\r\n $recipients = $this->getReceiverList();\r\n break;\r\n }\r\n\r\n $mailer->body = $content['html'];\r\n $mailer->fromEmail = $this->newsletter->getVar('newsletter_from_email');\r\n $mailer->fromName = $this->newsletter->getVar('newsletter_from_name');\r\n $mailer->addHeaders(\"Kod-ord: \".$GLOBALS['xoopsModuleConfig']['newsletter_passphrase']);\r\n\r\n $subject = $this->getVar('dispatch_subject', 'n');\r\n $mailer->subject = $subject ;\r\n $mailer->attachments = $this->attachments;\r\n $mailer->dispatchid = $this->getVar('dispatch_id');\r\n\r\n if ($mailer->send($recipients) ) {\r\n // Temporary commenting - put back when testing has finished\r\n // if (!$preview) {\r\n // $this->setVar('dispatch_content', $content[\"html\"]);\r\n // $this->setVar('dispatch_subject', $subject);\r\n // $this->setVar('dispatch_receivers', $this->getReceiverCount());\r\n //\r\n // //set dispatch status to \"Dispatched\"\r\n // $this->setStatus(2);\r\n //\r\n // //call update on blocks\r\n // /**\r\n // * @todo find a method to call updates on blocks - newsletter blocks and dispatch blocks\r\n // */\r\n // //$this->updateBlocks();\r\n //\r\n // //create next dispatch for the newsletter\r\n // $this->createNextDispatch();\r\n // }\r\n return true;\r\n }\r\n else {\r\n //If preview, but no email is set, don't send\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "df4384a4e197c7130ff14d88f0667bda", "score": "0.5323153", "text": "function partialHandleBookGiftBadEmail($email_null, $email_too_short, $email_badly_formed)\n{\n redirectToNoActionIfNotLoggedIn();\n global $BAD_EMAIL_NULL;\n global $BAD_EMAIL_BAD;\n global $LINK_HOMEPAGE;\n # assuming that if $email_badly_formed === true, we display this warning, and if it is also too short, the too short/null warnings take precedence\n # also assuming that if this function is called, the email is bad anyway\n $msg = $BAD_EMAIL_BAD;\n if ($email_too_short || $email_null) {\n $msg = $BAD_EMAIL_NULL;\n }\n $body = '<div class=\"uk-margin\">' . $msg . '</div>';\n $body .= '<a href=\"' . getPageAddrWithAction(\"mainafterlogin\") . '\" class=\"uk-button uk-button-primary uk-button-large\">' . $LINK_HOMEPAGE . '</a>';\n $body = '<div class=\"uk-panel uk-panel-box uk-form\">' . $body . '</div>';\n $body = '<div class=\"uk-vertical-align-middle\" style=\"width: auto ; max-width: 300px ; \">' . $body . '</div>';\n $body = '<div class=\"uk-vertical-align uk-text-center uk-width-1-1 uk-height-1-1\" >' . $body . '</div>';\n $clippy = '\n <script type=\"text/javascript\">\n clippy_agent_custom_action_after_load = function() {\n clippy_agent_public.play(\"Wave\");\n }\n </script>\n ';\n $body .= $clippy;\n printHtmlPageBaseWithBgWithClippy($body);\n}", "title": "" }, { "docid": "86ba58e501500178d5e22aaaaef7f44f", "score": "0.53226703", "text": "function send_email($filtered_array, $EMAIL, $ZIP_CODE){\n\t$subject = 'Apple Product Availability Update';\n\t$headers = \"From: \" . $EMAIL . \"\\r\\n\";\n\t$headers .= \"Reply-To: [email protected]\\r\\n\";\n\t$headers .= \"MIME-Version: 1.0\\r\\n\";\n\t$headers .= \"Content-Type: text/html; charset=ISO-8859-1\\r\\n\";\n\t$html_email = file_get_contents('email.html');\n\t$email_body = \"\";\n\n\tforeach($filtered_array as $index => $detail) {\n\t\t$name = $filtered_array[$index]['store']['store_name'];\n\t\t$dist = $filtered_array[$index]['store']['store_dist'];\n\t\t$products = $filtered_array[$index]['products'];\n\n\t\t$msg_store = \"<h2 class=\\\"size-16\\\" style=\\\"Margin-top: 0;Margin-bottom: 0;font-style: normal;font-weight: normal;color: #3e4751;font-size: 16px;line-height: 24px;font-family: Ubuntu,sans-serif;\\\" lang=\\\"x-size-16\\\"><strong>$name, $dist miles from {$ZIP_CODE}</strong></h2>\";\n\n\t\t// $message .= \"---------------------------------------\";\n\t\t$msg_products = \"\";\n\t\tforeach ($products as $product) {\n\t\t\t$msg_products .= \"<h2 class=\\\"size-16\\\" style=\\\"Margin-top: 16px;Margin-bottom: 16px;font-style: normal;font-weight: normal;color: #3e4751;font-size: 16px;line-height: 24px;font-family: Ubuntu,sans-serif;\\\" lang=\\\"x-size-16\\\"><font color=\\\"#7c7e7f\\\"> \". $product['product_name'] .\"</font></h2>\";\n\t\t}\n\n\t\t$email_body .= $msg_store . $msg_products . \"<br/>\";\n\t}\n\n\t$html_email = str_replace(\"[EMAIL_BODY]\", $email_body, $html_email);\n\n\techo \"\\nSending Email to {$EMAIL} ... \";\n\tmail($EMAIL, $subject, $html_email, $headers);\n\techo \"DONE!\\n\\n\";\n}", "title": "" }, { "docid": "d25714f5f63bb1d97ae86b62d472d839", "score": "0.53182423", "text": "private static function sendMail($args, $alt_mail=''){\n $mail = Mail::send([\n 'to' => $args['email'],\n 'title' => $args['title'],\n 'subject' => $args['subject'],\n 'template' => $args['template'],\n 'data' => $args,\n 'alt' => $alt_mail,\n 'files' => $args['attachments'],\n 'img' => $args['images'],\n ]);\n\n return (boolean) $mail;\n }", "title": "" }, { "docid": "40271085c49976e9727b8d77ff1c4733", "score": "0.5318165", "text": "function EmailMessage()\n\t\t{\n\t\t\t$this->obTemplate->clear_cache('electedrepresentative/ihtml/message.html');\n\t\t\t$this->obTemplate->assign('message', $this->message);\n\t\t\t$this->obTemplate->assign('extraVar1', $this->extraVar1);\n\t\t\t$this->obTemplate->assign('Content',$this->obTemplate->fetch('electedrepresentative/ihtml/message.html'));\n\t\t\t$this->parse();\n\t\t}", "title": "" }, { "docid": "c4c8f804aec908820aaa2953b22bb588", "score": "0.5316891", "text": "private function buildBody() {\n\t\tglobal $lang, $bboptions, $User;\n\n\t\t// start it off...\n\t\t$this->body = '';\n\n\t\t// only add \"not official\" for member emails...\n\t\tif($this->type == 'user') {\n\t\t\t$this->body = $lang['email_notOfficial'] . \"\\n\";\n\t\t\t$this->body .= $lang['email_from'] . ' ' . $User->info['username'] . \"\\n\";\n\t\t\t$this->body .= '--------------------------------------------------------' . \"\\n\\n\";\n\t\t}\n\n\t\t// start the actual message...\n\t\tswitch($this->type) {\n\t\t\tcase 'regCoppa':\n\t\t\t\t$this->body .= $lang['email_regMessageCoppa'] . \"\\n\\n\";\n\t\t\t\t$this->body .= $this->content['link'];\n\t\t\tbreak;\n\n\t\t\tcase 'regAct':\n\t\t\t\t$this->body .= $lang['email_regMessageAct'] . \"\\n\\n\";\n\t\t\t\t$this->body .= $this->content['link'];\n\t\t\tbreak;\n\n\t\t\tcase 'regComp':\n\t\t\t\t$this->body .= $lang['email_regMessageComp'];\n\t\t\tbreak;\n\n\t\t\tcase 'report':\n\t\t\t\t$this->body .= $lang['email_repPost'] . \"\\n\\n\";\n\t\t\t\t$this->body .= $lang['email_repPost_user'] . ' ' . $this->content['username'] . \"\\n\";\n\t\t\t\t$this->body .= $lang['email_repPost_forum'] . ' ' . $this->content['forum'] . \"\\n\";\n\t\t\t\t$this->body .= $lang['email_repPost_thread'] . ' ' . $this->content['thread'] . \"\\n\";\n\t\t\t\t$this->body .= $lang['email_repPost_link'] . ' ' . $this->content['link'] . \"\\n\";\n\t\t\t\t$this->body .= $lang['email_repPost_reason'] . \"\\n\" . $this->content['reason'];\n\t\t\tbreak;\n\n\t\t\tcase 'subscribe':\n\t\t\t\t$this->body .= $lang['email_subscribe'] . \"\\n\\n\";\n\t\t\t\t$this->body .= $this->content['link'];\n\t\t\tbreak;\n\n\t\t\tcase 'verifyPass':\n\t\t\t\t$this->body .= $this->content['link'];\n\t\t\tbreak;\n\n\t\t\tcase 'admin':\n\t\t\t\t$this->body .= $this->content;\n\t\t\tbreak;\n\n\t\t\tcase 'user':\n\t\t\t\t$this->body .= $this->content;\n\t\t\tbreak;\n\t\t}\n\n\t\t// add \"from staff\"...\n\t\tif($this->type == 'report' OR $this->type == 'subscribe' OR $this->type == 'regAct' OR $this->type == 'regComp' OR $this->type == 'regCoppa') {\n\t\t\t$this->body .= \"\\n\\n\" . $bboptions['emailSig'];\n\t\t}\n\n\t\t// always add \"unsubscribe\"\n\t\tif($this->type != 'report' AND $this->type != 'regAct' AND $this->type != 'regComp' AND $this->type != 'regCoppa') {\n\t\t\t$this->body .= \"\\n\\n\" . $lang['email_stop'];\n\t\t}\n\t}", "title": "" }, { "docid": "6a75d3bff92ac19b31dfaec1d356faab", "score": "0.53159976", "text": "function publish_email($email, $doggy_replacer = \"&#64\", $unique_function_name_ending = \"\")\n{\n $lines = array();\n $a[\"onclick\"] = \"onclick=\\\"sendMail\".$unique_function_name_ending.\"(this);\\\"\";\n $a[\"href\"] = \"href=\\\"#\\\"\";\n $_email = \"\";\n\n $email = trim($email);\n\n $i = 0;\n $j = 0;\n $parts = array();\n\n while ($i < strlen($email))\n {\n if (in_array($email[$i], array(\"@\",\".\",\"_\",\"-\")) || $i == strlen($email) - 1)\n {\n if ($i < strlen($email) - 1)\n {\n $parts[] = substr($email, $j, $i - $j);\n $parts[] = $email[$i];\n }\n else\n {\n $parts[] = substr($email, $j, $i - $j + 1);\n }\n\n $j = $i + 1;\n }\n\n $i++;\n }\n\n if (isset($parts[0]))\n {\n $lines[] = \"<script type=\\\"text/javascript\\\">function sendMail\".$unique_function_name_ending.\"(link) {\";\n $lines[] = \"mailto = \\\"\".$parts[0].\"\\\";\";\n $_email .= \"mailto = \\\"\".$parts[0].\"\\\";\";\n\n for ($k = 1; $k < count($parts); $k++)\n {\n if ($parts[$k] == \"@\") $parts[$k] = $doggy_replacer;\n\n $lines[] = \"mailto+=\\\"\".$parts[$k].\"\\\";\";\n $_email .= \"mailto+=\\\"\".$parts[$k].\"\\\";\";\n }\n\n $_email = \"<script type=\\\"text/javascript\\\">\".$_email.\"document.write(mailto);</script>\";\n\n $lines[] = \"link.href=\\\"mailto:\\\"+mailto;\";\n $lines[] = \"return true;\";\n $lines[] = \"}</script>\";\n }\n\n return array(\"lines\" => $lines, \"script\" => join(\"\\n\", $lines), \"email\" => $_email, \"a\" => $a);\n}", "title": "" }, { "docid": "50ff6f335e0398283df3b0f4ad3825bb", "score": "0.53092754", "text": "private function setTextAndHTMLHeaders(): void\n {\n $boundary = uniqid();\n\n $this->addHeaders(\n 'MIME-Version: 1.0',\n 'Content-Type: multipart/alternative; boundary=\"'. $boundary .'\"',\n '',\n \"--{$boundary}\",\n //Adding raw text\n \"Content-type: text/plain; charset={$this->charset}\",\n \"Content-Transer-Encoding: {$this->encoding}\",\n '',\n $this->text,\n \"--{$boundary}\",\n //Adding HTML\n 'Content-Type: text/html; charset=\"'. $this->charset .'\"',\n \"Content-Transfer-Encoding: {$this->encoding}\",\n '',\n $this->html,\n \"--{$boundary}--\"\n );\n }", "title": "" }, { "docid": "8af717480f081a985aff6318decad6cd", "score": "0.53091514", "text": "function sendEmailNotification($page, $action, $senderId, $reciverId, $notification_subject, $notification_message) {\n $str = $_SERVER['HTTP_HOST'];\n $sender = getUserData($senderId);\n $reciver = getUserData($reciverId);\n $to = $reciver['email'];\n\n /*$subject = \"Action Notification | Generic Platform\";\n $message = \"<html><head><title>Notification</title></head><body>\";\n $message .= \"Hi \".$reciver['name'].\",<br/>\";\n $message .= \"An Action '\".$action.\"' has occured at '\".$page.\"' page\";\n\n if ($senderId != $reciverId) {\n $message .=\" by \".$sender['name'].\".\";\n }\n $message .= \"<br/>\";\n $message .= \"<br/><br/>Regards,<br>Generic Platform\";\n $message .= \"</body></html>\";*/\n\n if ($senderId != $reciverId) {\n $message .=\" by \".$sender['name'].\".\";\n $notification_message = str_replace(\"sender_name\", $sender['name'].'.', $notification_message);\n } else {\n $notification_message = str_replace(' by sender_name', '', $notification_message);\n }\n\n $notification_message = str_replace(\"user_name\", $reciver['name'], $notification_message);\n $notification_message = str_replace(\"action_name\", \"'\".$action.\"'\", $notification_message);\n $notification_message = str_replace(\"page_name\", \"'\".$page.\"'\", $notification_message);\n\n $subject = $notification_subject;\n $message = $notification_message;\n\n // Always set content-type when sending HTML email\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n $headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\";\n // More headers\n //$headers .= 'From: Generic Platform<[email protected]>' . \"\\r\\n\";\n //Code Change for Task 8.4.104 Start\n $headers .= 'From: Generic Platform<noreply@'.$str.'>' . \"\\r\\n\";\n //Code Change for Task 8.4.104 End\n try {\n $sent = mail($to, $subject, $message, $headers);\n if ($sent) {\n return true;\n }\n return \"Unable to send email\";\n } catch (Exception $e) {\n return $e->getMessage();\n }\n}", "title": "" }, { "docid": "f1b31528bf564ae2ca5a814f7169d8b7", "score": "0.5305411", "text": "function ccgn_settings_emails_section_callback () {\n ?>\n <?php\n}", "title": "" }, { "docid": "39bb3f68842e337298259770e7670912", "score": "0.5298928", "text": "function send_response_notification()\n {\n \t$this->email->initialize($this->set_email_configs());\n\n\t\t$this->email->set_newline(\"\\r\\n\");\n\n \t$this->email->from('[email protected]', 'Risk Register Test');\n\t\t$this->email->to('[email protected]');\n\t\t$this->email->subject('Risk Response Notification');\n\t\t$this->email->message('Your risk reponse is due 20th August 2018');\n\t\t$this->email->send();\n\n\t\techo $this->email->print_debugger(array('headers','subject','body'));\n }", "title": "" }, { "docid": "abe161d049d938a3470570fc70d47c24", "score": "0.52955693", "text": "protected function vSendHtmlMail(array $paAddresses, $psSubject, $psMessagePlain = '', $psMessageHTML = '', $psAttachement = '') {\n\t\t\t// Build mail\n\t\t\t$oMail = t3lib_div::makeInstance('t3lib_htmlmail');\n\t\t\t$oMail->start();\n\t\t\t$oMail->charset = $this->sEmailChar;\n\t\t\t$oMail->mailer = 'TYPO3';\n\t\t\t$oMail->useQuotedPrintable();\n\n\t\t\t// Enable returnPath (if $TYPO3_CONF_VARS['SYS']['forceReturnPath'] was not enabled)\n\t\t\tif (!empty($this->aConfig['allowReturnPath'])) {\n\t\t\t\t$oMail->forceReturnPath = TRUE;\n\t\t\t}\n\n\t\t\t// Set addresses\n\t\t\t$oMail->from_email = $this->mGetMailAddress($paAddresses, 'sender', TRUE);\n\t\t\t$oMail->replyto_email = $this->mGetMailAddress($paAddresses, 'reply', TRUE);\n\t\t\t$oMail->returnPath = $this->mGetMailAddress($paAddresses, 'return', TRUE);\n\n\t\t\t// Set subject and plain content\n\t\t\t$oMail->subject = $psSubject;\n\t\t\t$oMail->addPlain($psMessagePlain);\n\n\t\t\t// Set HTML content\n\t\t\tif ($this->sEmailFormat == 'html' && strlen($psMessageHTML)) {\n\t\t\t\t$oMail->setHTML($oMail->encodeMsg($psMessageHTML));\n\t\t\t}\n\n\t\t\t// Add attachement if given\n\t\t\tif (strlen($psAttachement)) {\n\t\t\t\t$psAttachement = t3lib_div::getFileAbsFileName($psAttachement);\n\t\t\t\tif (file_exists($psAttachement)) {\n\t\t\t\t\t$oMail->addAttachment($psAttachement);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Send email to any user in array\n\t\t\t$aRecipients = $this->mGetMailAddress($paAddresses, 'recipients');\n\t\t\tforeach ($aRecipients as $aAddress) {\n\t\t\t\t$sAddress = key($aAddress);\n\t\t\t\t$mName = reset($aAddress);\n\t\t\t\tif (is_string($mName)) {\n\t\t\t\t\t$sAddress = $mName . ' <' . $sAddress . '>';\n\t\t\t\t}\n\t\t\t\tif (!$oMail->send($sAddress)) {\n\t\t\t\t\t$this->bHasError = TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3dbf1ad6cbac86f8e28e0407277b620a", "score": "0.52935445", "text": "function send_email($question){\n \n //setup the mailer\n $transport = Swift_MailTransport::newInstance();\n $mailer = Swift_Mailer::newInstance($transport);\n $message = Swift_Message::newInstance();\n \n $message ->setSubject(\"Connection Tool Question\");\n $message ->setFrom(array('[email protected]' => 'Connection Tool'));\n $message ->setTo(array('[email protected]' => 'Tash Wong'));\n \n $message ->setBody($question, 'text/html');\n \n $result = $mailer->send($message);\n \n return $result; \n \n }", "title": "" }, { "docid": "2b8cbbdb791ca809c53dbe6b1c3a66d9", "score": "0.5292139", "text": "public function testGetEmailHTML()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "ad1dc4b7126dbd2d6c101348aa0a26be", "score": "0.5286743", "text": "function gb_send_email( $template, $user, $subject, $extra = '' ) {\n\n\tadd_filter( 'wp_mail_content_type', function() {\n\t\treturn 'text/html';\n\t} );\n\n\t$template_file = plugin_dir_path( __FILE__ ) . 'emails/' . $template . '.php';\n\n\tif ( ! file_exists( $template_file ) ) {\n\t\treturn false;\n\t}\n\n\tif ( is_numeric( $user ) ) {\n\t\t$user = new WP_User( $user );\n\t}\n\n\tob_start();\n\n\tinclude $template_file;\n\n\t$text = ob_get_clean();\n\n\t$text = gb_merge_email_tags( $text, $user );\n\n\tif ( '[email protected]' === $user->user_email ) {\n\t\treturn;\n\t}\n\n\treturn wp_mail( $user->user_email, $subject, $text );\n}", "title": "" }, { "docid": "bc488059a4d3c9df9d0b714098a80282", "score": "0.5272534", "text": "function sendMailing()\n {\n\t\tif ((count($this->emailUsers)>0) && $this->emailSubject && $this->emailBody){\n\t\t\tif ($this->addTime){\n\t\t\t\t//append timestamp logic to the email \n\t\t\t\t$additionalString = \"\\n\"; \n\t\t\t\t$additionalString .=\"This emai was sent on \".date('l jS Y', $this->timestamp);\n\t\t\t\t$this->emailBody .= $additionalString;\n\t\t\t}\n\n\t\t\tforeach($this->emailUsers as $emailUser){\t\t\n\t\t\t\tmail($emailUser, $this->emailSubject, $this->emailBody); \n\t\t\t\t$this->logEmail($emailUser, $this->emailSubject);\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "b416e380206d183aefa43ac72d359c13", "score": "0.5266171", "text": "function send_mail($send_mail, $site_mail, $email, $subject, $body, $send_name, $inchr, $outchr){\r\n //X-Mailerをphpversition等で指定するとHotMailでは迷惑メールとして扱われる\r\n $send_name = mb_convert_encoding($send_name, $outchr, $inchr);\r\n $body = mb_convert_encoding($body, $outchr, $inchr);\r\n if($subject){ $subject = mime_enc($subject); }\r\n $body = str_replace(\"\\r\\n\", \"\\n\", $body);\r\n $body = str_replace(\"\\r\" , \"\\n\", $body);\r\n if($send_name){\r\n $head .= 'From: \"'.mime_enc($send_name).'\" <'.$send_mail.'>'.\"\\n\";\r\n }else{\r\n $head .= 'From: \"'.$send_mail.'\" <'.$send_mail.'>'.\"\\n\";\r\n }\r\n $head.= \"X-Originating-IP: [{$_SERVER['SERVER_ADDR']}]\\n\";\r\n $head.= \"X-Originating-Email: [{$send_mail}]\\n\";\r\n $head.= \"X-Sender: {$send_mail}\\n\";\r\n $head.= \"Mime-Version: 1.0\\n\";\r\n if($langFlag){\r\n $head.= \"Content-Type: text/plain; charset=iso-8859-1\\n\";\r\n } else {\r\n $head.= \"Content-Type: text/plain;charset=ISO-2022-JP\\n\";\r\n }\r\n $head .= 'Reply-To: '.$site_mail.'' . \"\\n\";\r\n #$head.= \"X-Mailer: PHP/\".phpversion();\r\n if(!mail($email, $subject, $body, $head)) return FALSE; else return TRUE;\r\n}", "title": "" }, { "docid": "02208788f3efca31688b1e9eea7cbe68", "score": "0.52603686", "text": "function add_send_mail($send_mail, $name, $email, $get_mail, $add_subject, $add_body, $bcc_mail, $inchr, $outchr){\r\n //X-Mailerをphpversition等で指定するとHotMailでは迷惑メールとして扱われる\r\n $add_body = mb_convert_encoding($add_body, $outchr, $inchr);\r\n if($add_subject){ $add_subject = mime_enc($add_subject); }\r\n $add_body = str_replace(\"\\r\\n\", \"\\n\", $add_body);\r\n $add_body = str_replace(\"\\r\" , \"\\n\", $add_body);\r\n if($name){\r\n $add_head .= 'From: \"'.mime_enc($name).'\" <'.$email.'>'.\"\\n\";\r\n }else{\r\n $add_head .= 'From: \"'.$email.'\" <'.$email.'>'.\"\\n\";\r\n }\r\n $add_head.= \"X-Originating-IP: [{$_SERVER['SERVER_ADDR']}]\\n\";\r\n $add_head.= \"X-Originating-Email: [{$send_mail}]\\n\";\r\n $add_head.= \"X-Sender: {$email}\\n\";\r\n $add_head.= \"Mime-Version: 1.0\\n\";\r\n if($langFlag){\r\n $add_head.= \"Content-Type: text/plain; charset=iso-8859-1\\n\";\r\n } else {\r\n $add_head.= \"Content-Type: text/plain;charset=ISO-2022-JP\\n\";\r\n }\r\n if($bcc_mail){ $add_head .= 'Bcc: '.$bcc_mail.'' . \"\\n\"; }\r\n $add_head .= 'Reply-To: '.$email.'' . \"\\n\";\r\n #$head.= \"X-Mailer: PHP/\".phpversion();\r\n if(!mail($get_mail, $add_subject, $add_body, $add_head)) return FALSE; else return TRUE;\r\n}", "title": "" }, { "docid": "421ed4a17237511600a95b5fb8015332", "score": "0.5255492", "text": "function render_send_email($email,$substitutions,$message_error) {\n require_once('StaffCommonCode.php');\n $title=\"Send Email to Participants\";\n $description=\"<H3>Step 1 -- Compose Email</H3>\\n\";\n $conid=$_SESSION['conid'];\n\n // From/CC email query\n $ccquery = <<<EOD\nSELECT\n badgeid,\n pubsname\n FROM\n UserHasConRole\n JOIN ConRoles USING (conroleid)\n JOIN Participants USING (badgeid)\n WHERE\n conid=$conid AND\n conrolename not like '%GOH%'\n GROUP BY\n email\n ORDER BY\n display_order\nEOD;\n\n // Start the output\n topofpagereport($title,$description,$additionalinfo,$message,$message_error);\n\n echo \"<FORM name=\\\"emailform\\\" method=POST action=\\\"StaffSendEmailCompose_POST.php\\\">\\n\";\n echo \"<TABLE><TR>\";\n echo \" <TD><LABEL for=\\\"sendto\\\">To: </LABEL></TD>\\n\";\n echo \" <TD><SELECT name=\\\"sendto\\\">\\n\";\n populate_select_from_table(\"EmailTo\", $email['sendto'], \"\", false);\n echo \" </SELECT></TD></TR>\";\n echo \"<TR><TD><LABEL for=\\\"sendfrom\\\">From: </LABEL></TD>\\n\";\n echo \" <TD><SELECT name=\\\"sendfrom\\\">\\n\";\n populate_select_from_query($ccquery, 0, \"None\", true);\n echo \" </SELECT></TD></TR>\";\n echo \"<TR><TD><LABEL for=\\\"sendcc\\\">CC: </LABEL></TD>\\n\";\n echo \" <TD><SELECT name=\\\"sendcc\\\">\\n\";\n populate_select_from_query($ccquery, 0, \"None\", true);\n echo \" </SELECT></TD></TR>\";\n echo \"<TR><TD><LABEL for=\\\"subject\\\">Subject: </LABEL></TD>\\n\";\n echo \" <TD><INPUT name=\\\"subject\\\" type=\\\"text\\\" size=\\\"40\\\" value=\\\"\";\n echo htmlspecialchars($email['subject'],ENT_NOQUOTES).\"\\\">\\n\";\n echo \" </TD></TR></TABLE><BR>\\n\";\n echo \"<TEXTAREA name=\\\"body\\\" cols=\\\"80\\\" rows=\\\"25\\\">\";\n echo htmlspecialchars($email['body'],ENT_NOQUOTES).\"</TEXTAREA><BR>\\n\";\n echo \"<BUTTON class=\\\"ib\\\" type=\\\"reset\\\" value=\\\"reset\\\">Reset</BUTTON>\\n\";\n echo \"<BUTTON class=\\\"ib\\\" type=\\\"submit\\\" value=\\\"seeit\\\">See it</BUTTON>\\n\";\n echo \"</FORM><BR>\\n\";\n echo \"<P>Available substitutions:</P>\\n\";\n echo \"<TABLE>\\n\";\n $i=0;\n foreach ($substitutions as $substitution) {\n if ($i==0) {\n echo \"<TR><TD>$substitution</TD>\";\n $i++;\n } else {\n echo \"<TD>$substitution</TD></TR>\\n\";\n $i--;\n }\n }\n echo \"</TABLE>\\n\";\n correct_footer();\n}", "title": "" }, { "docid": "e4166f9f6f15ae9f99f125fe370ddf72", "score": "0.52549", "text": "public function sendEmail()\n {\n return Yii::$app->mailer->compose(['html' => 'proposal-html'], [\n 'name' => $this->name,\n 'manager' => $this->manager,\n 'photo' => $this->photo])\n ->setFrom([Yii::$app->params['adminEmail'] => 'Promovers.ru'])\n ->setTo($this->email)\n ->setSubject($this->subject)\n ->attachContent($this->file, ['fileName' => Inflector::slug($this->file_title) . '.pdf', 'contentType' => 'application/x-pdf'])\n ->send();\n }", "title": "" }, { "docid": "10e4e0dcf878651d2be535245261434b", "score": "0.525166", "text": "function wp_email_capture_set_email_to_plain() {\n\tif ( has_filter( 'wp_mail_content_type', 'wp_email_capture_set_html_mail_content_type' ) ) {\n\t\tif ( 1 == get_option( 'wp_email_capture_send_email_html' ) ) {\n\t\t\tremove_filter( 'wp_mail_content_type', 'wp_email_capture_set_html_mail_content_type' );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "8fb2a3dc9fa2e8483156229d3ebb7926", "score": "0.5250491", "text": "function X1_send_sms($addy, $template, $content, $subject=''){\r\n\tif(str_split(str_replace(\".\",\"\",preg_replace(\"/[^0-9\\.]+/\",\"\",phpversion())),3) > 430){\r\n\t\t$temp = @file_get_contents(X1_smspath.\"/\".$template);\r\n\t}else{\r\n\t\t$temp = implode(\"\\n\", file(X1_smspath.\"/\".$template));\r\n\t}\r\n\tif($temp){\r\n\t\tforeach($content AS $key=>$val){\r\n\t\t\t$temp = str_replace(\"<? $key ?>\", $val, $temp);\r\n\t\t}\r\n\t\t$sub = (empty($subject)) ? X1_emailsubject : $subject;\r\n\t\tmail($addy, $sub, $temp,\"From:\".X1_returnmail.\"\\nX-Mailer: PHP/\" . phpversion());\r\n\t\tif(X1_emaildebug){\r\n\t\t\treturn \"SMS sent to \".$addy;\r\n\t\t}\r\n\t}else{\r\n\t\tif(X1_emaildebug){\r\n\t\t\treturn \"Failed to load sms template :: $template<br />\\n\";\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "822c97cdbecad7f27dfafd7b240649b7", "score": "0.5249319", "text": "function sendEmail($subject, $html) {\n\n // mail provider, ref: https://github.com/gabrielbull/omnimail\n switch (env('EMAIL_MAILER')) {\n case 'mailgun':\n checkEnvSet('EMAIL_MAILGUN_APIKEY', 'EMAIL_MAILGUN_DOMAIN');\n $mailer = new Omnimail\\Mailgun(env('EMAIL_MAILGUN_APIKEY'), env('EMAIL_MAILGUN_DOMAIN'));\n break;\n }\n\n $email = (new Omnimail\\Email())\n ->setFrom(env('EMAIL_FROM'))\n ->setSubject($subject)\n ->setHtmlBody($html);\n\n $addresses = array_map('trim', explode(';', env('EMAIL_TO')));\n foreach ($addresses as $address) {\n $email->addTo($address);\n }\n\n $mailer->send($email);\n}", "title": "" }, { "docid": "a90b67dc48e7103b361248df7b43a3e5", "score": "0.52469593", "text": "function email_sent_success($messg) {\r\n ?>\r\n <div class=\"notice notice-success is-dismissible\">\r\n <p><?php echo $messg; ?></p>\r\n </div>\r\n <?php\r\n}", "title": "" }, { "docid": "b1c8fc1c43d30464e5bf257e1688fa57", "score": "0.5245981", "text": "function aakb_survey_admins_send() {\n return array(\n '#theme' => 'aakb_survey_send',\n '#users' => _aakb_survey_not_notified_users(),\n '#queued' => _queue_mail_get_queue()->numberOfItems(),\n '#show_send' => !variable_get('aakb_survey_mails_queued', FALSE),\n '#attached' => array(\n 'js' => array(\n drupal_get_path('module', 'aakb_survey') . '/js/aakb_survey.admin.js',\n ),\n 'css' => array(\n drupal_get_path('module', 'aakb_survey') . '/css/aakb_survey.admin.css',\n ),\n )\n );\n}", "title": "" }, { "docid": "77a274ffba29bee24b6cce01fbeb7f5e", "score": "0.52399963", "text": "function message_template()\n{\nreturn <<<EOF\n<html>\n<head>\n\n<title>{title}</title>\n\n<meta http-equiv='content-type' content='text/html; charset={charset}' />\n\n{meta_refresh}\n\n<style type=\"text/css\">\n\nbody { \nbackground-color:\t#ffffff; \nmargin:\t\t\t\t50px; \nfont-family:\t\tVerdana, Arial, Tahoma, Trebuchet MS, Sans-serif;\nfont-size:\t\t\t11px;\ncolor:\t\t\t\t#000;\nbackground-color:\t#fff;\n}\n\na {\nfont-family:\t\tVerdana, Arial, Tahoma, Trebuchet MS, Sans-serif;\nletter-spacing:\t\t.09em;\ntext-decoration:\tnone;\ncolor: #330099;\nbackground-color: transparent;\n}\n \na:visited {\ncolor:\t\t\t\t#330099;\nbackground-color:\ttransparent;\n}\n\na:active {\ncolor:\t\t\t\t#ccc;\nbackground-color:\ttransparent;\n}\n\na:hover {\ncolor:\t\t\t\t#000;\ntext-decoration: underline;\nbackground-color:\ttransparent;\n}\n\n#content {\nborder:\t\t\t\t#000 1px solid;\nbackground-color: \t#DEDFE3;\npadding:\t\t\t22px 25px 14px 25px;\n}\n\nh1 {\nfont-family:\t\tVerdana, Arial, Tahoma, Trebuchet MS, Sans-serif;\nfont-weight:\t\tbold;\nfont-size:\t\t\t14px;\ncolor:\t\t\t\t#000;\nmargin-top: \t\t0;\nmargin-bottom:\t\t14px;\n}\n\np {\nfont-family:\t\tVerdana, Arial, Tahoma, Trebuchet MS, Sans-serif;\nfont-size: \t\t\t12px;\nfont-weight: \t\tnormal;\nmargin-top: \t\t12px;\nmargin-bottom: \t\t14px;\ncolor: \t\t\t\t#000;\n}\n\nul {\nmargin-bottom: \t\t16px;\n}\n\nli {\nlist-style:\t\t\tsquare;\nfont-family:\t\tVerdana, Arial, Tahoma, Trebuchet MS, Sans-serif;\nfont-size: \t\t\t12px;\nfont-weight: \t\tnormal;\nmargin-top: \t\t8px;\nmargin-bottom: \t\t8px;\ncolor: \t\t\t\t#000;\n}\n\n</style>\n\n</head>\n\n<body>\n\n<div id=\"content\">\n\n<h1>{heading}</h1>\n\n{content}\n\n<p>{link}</p>\n\n</div>\n\n</body>\n\n</html>\nEOF;\n}", "title": "" }, { "docid": "e6205799cebcbae4d249452ff3e7b0a2", "score": "0.5238626", "text": "public function showEmailHtmlContent($content)\n {\n return '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3c.org/TR/xhtml1/DTD/xhtml-strict.dtd\">\n <html xmlns:v=\"urn:schemas-microsoft-com:vml\">\n <head>\n <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n <meta name=\"viewport\" content=\"width=device-width; initial-scale=1.0, maximum-scale=1.0;\">\n <link rel=\"stylesheet\" type=\"text/css\" href=\"public/styles/mails/style.css\">\n </head>\n ' . $content . '\n </html>';\n }", "title": "" }, { "docid": "a0e9bc1245c3d5e5772be9f9ad9f38ba", "score": "0.5235683", "text": "function send_deadpool_email($hosts, $services)\n{\n // Only send an email if something happened\n if (count($hosts) == 0 && count($services) == 0) {\n return;\n }\n\n $baseurl = get_external_url();\n\n // Do not send email if no recipients are specified\n $recipients = get_option(\"deadpool_notice_recipients\", \"\");\n if (empty($recipients)) {\n return;\n }\n\n // Get host/service actions (delete, deactivate)\n $stage_2_host_action = get_option('stage_2_host_action', 'delete');\n $stage_2_service_action = get_option('stage_2_service_action', 'delete');\n\n $subject = _(\"Nagios Deadpool Report\");\n $fullbody = \"\";\n $stage1_host_body = \"\";\n\n foreach ($hosts as $h) {\n $name = grab_array_var($h, \"name\");\n $stage = grab_array_var($h, \"stage\");\n\n if ($stage == 1) {\n $stage1_host_body .= $name . \"\\n\";\n }\n }\n\n if ($stage_2_host_action == 'delete') {\n $host_action = _('deleted');\n } else {\n $host_action = _('deactivated');\n }\n\n if ($stage_2_service_action == 'delete') {\n $service_action = _('deleted');\n } else {\n $service_action = _('deactivated');\n }\n\n if ($stage1_host_body != \"\") {\n $fullbody .= \"\\n\";\n $fullbody .= _(\"Stage 1 Hosts\").\"\\n\";\n $fullbody .= \"===\\n\";\n $fullbody .= sprintf(_(\"The following hosts were moved to the host deadpool because they have remained in a problem state longer than the stage 1 deadpool threshold. If the hosts do not recover before the stage 2 threshold, they will automatically be %s from the monitoring configuration.\"), $host_action) . \"\\n\\n\";\n $fullbody .= $stage1_host_body;\n }\n\n $stage1_service_body = \"\";\n foreach ($services as $s) {\n $hostname = grab_array_var($s, \"hostname\");\n $servicename = grab_array_var($s, \"servicename\");\n $stage = grab_array_var($s, \"stage\");\n if ($stage == 1)\n $stage1_service_body .= $hostname . \" / \" . $servicename . \"\\n\";\n }\n\n if ($stage1_service_body != \"\") {\n $fullbody .= \"\\n\";\n $fullbody .= _(\"Stage 1 Services\").\"\\n\";\n $fullbody .= \"===\\n\";\n $fullbody .= sprintf(_(\"The following services were moved to the service deadpool because they have remained in a problem state longer than the stage 1 deadpool threshold. If the services do not recover before the stage 2 threshold, they will automatically be %s from the monitoring configuration.\"), $service_action) . \"\\n\\n\";\n $fullbody .= $stage1_service_body;\n }\n\n $stage2_host_body = \"\";\n reset($hosts);\n foreach ($hosts as $h) {\n $name = grab_array_var($h, \"name\");\n $stage = grab_array_var($h, \"stage\");\n if ($stage == 2)\n $stage2_host_body .= $name . \"\\n\";\n }\n\n if ($stage2_host_body != \"\") {\n $fullbody .= \"\\n\";\n $fullbody .= sprintf(_(\"%s Hosts\"), ucfirst($host_action)).\"\\n\";\n $fullbody .= \"===\\n\";\n $fullbody .= sprintf(_(\"The following hosts were %s from the monitoring configuration because they remained in a problem state longer than the stage 2 deadpool threshold.\"), $host_action) . \"\\n\\n\";\n $fullbody .= $stage2_host_body;\n }\n\n $stage2_service_body=\"\";\n reset($services);\n foreach ($services as $s) {\n $hostname = grab_array_var($s, \"hostname\");\n $servicename = grab_array_var($s, \"servicename\");\n $stage = grab_array_var($s, \"stage\");\n if ($stage == 2)\n $stage2_service_body .= $hostname . \" / \" . $servicename . \"\\n\";\n }\n\n if ($stage2_service_body!=\"\") {\n $fullbody .= \"\\n\";\n $fullbody .= sprintf(_(\"%s Services\"), ucfirst($service_action)).\"\\n\";\n $fullbody .= \"===\\n\";\n $fullbody .= sprintf(_(\"The following services were %s from the monitoring configuration because they remained in a problem state longer than the stage 2 deadpool threshold.\"), $service_action) . \"\\n\\n\";\n $fullbody .= $stage2_service_body;\n }\n\n $fullbody .= \"\\n\";\n $fullbody .= \"\\n\";\n $fullbody .= _(\"Access Nagios XI at\").\":\\n\";\n $fullbody .= $baseurl;\n $fullbody .= \"\\n\\n\";\n\n // Set where email is coming from for PHPmailer log\n $send_mail_referer = \"cron/deadpool.php\";\n\n $opts = array(\n \"to\" => $recipients,\n \"subject\" => $subject,\n \"message\" => $fullbody,\n );\n\n echo \"EMAIL:\\n\";\n print_r($opts);\n echo \"\\n\";\n\n send_email($opts, $debugmsg, $send_mail_referer);\n}", "title": "" }, { "docid": "cb33a432883c85f14616d18d3f118f3d", "score": "0.5235131", "text": "private function send_email($record){\n\t\t$swift = email::connect();\n\t\t//From, subject\n\t\t$from = $this->site['site_email'];\n\t\t$subject = 'Testing '.$this->site['site_name'];\n\t\t//HTML message\n\t\t$html_content = $this->data_template_model->get_value('EMAIL_TESTING');\n\t\t//Replate content\n\t\tif(isset($this->sess_cus['name']) && !empty($this->sess_cus['name']))\t\n\t\t\t$name = $this->sess_cus['name'];\n\t\telse $name = $this->sess_cus['email'];\n\t\t$html_content = str_replace('#name#',$name,$html_content);\t\n\t\t$test = $this->test_model->get($record['test_uid']);\n\t\t$html_content = str_replace('#test#',$test['test_title'],$html_content);\n\t\t$html_content = str_replace('#date#', $this->format_int_date($record['testing_date'],$this->site['site_short_date']),$html_content);\n\t\t$html_content = str_replace('#score#',$record['testing_score'],$html_content);\n\t\t$html_content = str_replace('#duration#',gmdate(\"H:i:s\",$record['duration']),$html_content);\n\t\t$html_content = str_replace('#code#',$record['testing_code'],$html_content);\t\t\t\n\t\t$html_content = str_replace('#site#',$this->site['site_name'],$html_content);\t\t\n\t\t//Build recipient lists\n\t\t$recipients = new Swift_RecipientList;\n\t\t$recipients->addTo($this->sess_cus['email']);\n\t\t//$recipients->addTo($this->site['site_email']);\n\t\t//Build the HTML message\n\t\t$message = new Swift_Message($subject, $html_content, \"text/html\");\n\t\tif($swift->send($message, $recipients, $from)){\n\t\t} else {\n\t\t}\t\n\t\t// Disconnect\n\t\t$swift->disconnect();\n }", "title": "" }, { "docid": "ae01d8b0b3cc99d8ad4b48e5fcc44371", "score": "0.5230958", "text": "function sendThem()\n{\n\t$s_email = '[email protected]';\n\t$s_subject = 'Test';\n\t$s_msg = 'Test message';\n\t$s_headers = \"MIME-Version: 1.0\\n\".\n\t\t\t\t \"Content-type: text/plain; charset=iso-8859-1\\n\".\n\t\t\t\t \"From: Film Aficionado <[email protected]>\\n\".\n\t\t\t\t \"Reply-To: Film Aficionado <[email protected]>\\n\".\n\t\t\t\t \"Return-Path: [email protected]\\n\".\n\t\t\t\t \"X-Mailer: PHP/\".phpversion();\n\n\tmail($s_email, $s_subject, $s_msg, $s_headers, \"[email protected]\");\n}", "title": "" }, { "docid": "dee105f0848b6b3853e56a9c1cc3716b", "score": "0.5230701", "text": "public function send() {\n\t\tthrow new \\PHPMailer\\PHPMailer\\Exception( 'WPSS_MAIL_OFF' );\n\t}", "title": "" }, { "docid": "81b041680afad68e6b78f543a09a46f7", "score": "0.5226066", "text": "function send_mails_on_publish( $new_status, $old_status, $post )\n{\n if ( 'publish' !== $new_status or 'publish' === $old_status\n or 'standard' !== get_post_type( $post ) )\n return;\n \n honeystreet_email_build($post);\n\t \n}", "title": "" }, { "docid": "40f1db7d1e85c47c67b0e647a286a934", "score": "0.52248484", "text": "function sendHTML($to, $from, $subject, $htmlContent, $attachedFiles = false, $customheaders = false, $plainContent = false, $inlineImages = false)\n {\n $mail = new SendGrid\\Mail(SENDGRIDMAILER_USERNAME, SENDGRIDMAILER_PASSWORD);\n $sendgrid = $this->instantiate();\n if (!$from) $from = SENDGRIDMAILER_MAIL;\n $from_name = preg_replace('/\"*(.*)\"*\\<(.*)\\>/i', '$1', $from);\n if($from_name) $from = preg_replace('/\"*(.*)\"*\\<(.*)\\>/i', '$2', $from);\n $mail->addTo($to)->setFromName($from_name)->setFrom($from)->setSubject($subject)->setHtml($htmlContent);\n $response = $sendgrid->web->send($mail); // send mail via sendgrid web API\n SS_Log::log(\"$to | $from | $from_name | \" . json_encode($response), SS_Log::INFO);\n if ($response->message == \"error\") return false;\n if ($response->message == \"success\") return true;\n return false;\n }", "title": "" } ]
48a40cbe17fe0e9bbc40a9e638ec1ab7
end public function setEntityWbfsysCalendarHoliday ////////////////////////////////////////////////////////////////////////////// get fields ////////////////////////////////////////////////////////////////////////////// just fetch the post data without any required validation
[ { "docid": "53e33a2c5980f4e94ce62f818876b60f", "score": "0.5835435", "text": "public function getCreateFields()\n {\n\n return array\n (\n 'wbfsys_calendar_holiday' => array\n (\n 'name',\n 'access_key',\n 'the_day',\n 'level',\n 'id_calendar_type',\n 'description',\n 'm_version',\n ),\n\n );\n\n }", "title": "" } ]
[ { "docid": "0c2adffc644749c5dda5468f84c3f1c4", "score": "0.6075263", "text": "public function setEntityWbfsysCalendarHoliday( $entity )\n {\n\n $this->register( 'entityWbfsysCalendarHoliday', $entity );\n $this->register( 'main_entity', $entity );\n\n }", "title": "" }, { "docid": "0c769cf2817f81fe6f4e308efe9027e8", "score": "0.59424484", "text": "public function getEntityWbfsysCalendarHoliday( $objid = null )\n {\n\n $response = $this->getResponse();\n \n if( !$entityWbfsysCalendarHoliday = $this->getRegisterd( 'main_entity' ) )\n $entityWbfsysCalendarHoliday = $this->getRegisterd( 'entityWbfsysCalendarHoliday' );\n\n //entity wbfsys_calendar_holiday\n if( !$entityWbfsysCalendarHoliday )\n {\n\n if( !is_null( $objid ) )\n {\n $orm = $this->getOrm();\n\n if( !$entityWbfsysCalendarHoliday = $orm->get( 'WbfsysCalendarHoliday', $objid) )\n {\n $response->addError\n (\n $response->i18n->l\n (\n 'There is no wbfsyscalendarholiday with this id '.$objid,\n 'wbfsys.calendar_holiday.message'\n )\n );\n return null;\n }\n\n $this->register( 'entityWbfsysCalendarHoliday', $entityWbfsysCalendarHoliday );\n $this->register( 'main_entity', $entityWbfsysCalendarHoliday );\n\n }\n else\n {\n $entityWbfsysCalendarHoliday = new WbfsysCalendarHoliday_Entity() ;\n $this->register( 'entityWbfsysCalendarHoliday', $entityWbfsysCalendarHoliday );\n $this->register( 'main_entity', $entityWbfsysCalendarHoliday );\n }\n\n }\n elseif( $objid && $objid != $entityWbfsysCalendarHoliday->getId() )\n {\n $orm = $this->getOrm();\n\n if( !$entityWbfsysCalendarHoliday = $orm->get( 'WbfsysCalendarHoliday', $objid) )\n {\n $response->addError\n (\n $response->i18n->l\n (\n 'There is no wbfsyscalendarholiday with this id '.$objid,\n 'wbfsys.calendar_holiday.message'\n )\n );\n return null;\n }\n\n $this->register( 'entityWbfsysCalendarHoliday', $entityWbfsysCalendarHoliday );\n $this->register( 'main_entity', $entityWbfsysCalendarHoliday );\n }\n\n return $entityWbfsysCalendarHoliday;\n\n }", "title": "" }, { "docid": "98c6afd5dd45841dd4fb2f0930746bb2", "score": "0.59197617", "text": "private function _getHolidaysData() {\n //returns holidays\n return Yii::app()->db->createCommand()\n ->select('sh.hol_id, loc_id, hol_date')\n ->from('shop_holidays sh, Holidays h')\n ->where('sh.hol_id = h.hol_id')\n ->queryAll();\n }", "title": "" }, { "docid": "c451f45e395c10dccc6ce36595fad870", "score": "0.58048683", "text": "private function saveHoliday_info($type,$id)\t\n\t{\t\t\t\t\t\n\t\t// make sure we only pass in the fields we want\n\t\t$data = array();\t\n\t\t$data['HOLIDAY_DATE'] \t\t\t= date(\"Y-m-d\", strtotime($this->input->post('HOLIDAY_DATE')));\n\t\t$data['HOLIDAY_NAME'] \t\t\t= $this->input->post('HOLIDAY_NAME');\n\t\t$data['HOLIDAY_TYPE'] \t\t\t= $this->input->post('TYPE');\t\t\n\t\t\t\n\t\t$type = $this->set_type_value(); \n\t\t\n\t\tif($type == 'insert')\n\t\t{\n\t\t\t$this->auth->restrict('HRM.Employee_Define_Holiday.Create');\t\t\t\t\t\n\t\t\t$data['CREATED_BY']\t\t= $this->current_user->id;\n\t\t\t$data['MODIFY_BY']\t\t= null;\t\n\t\t\t$result = $this->employee_define_holiday_model->insert($data);\n\t\t\t\n\t\t\t\n\t\t\tlog_activity($this->current_user->id, lang('bf_act_create_record') .': '. $HOLIDAY_ID .' : '. $this->input->ip_address(), 'hrm_ls_holiday_define');\n\t\t\tTemplate::set_message(lang('bf_msg_create_success'), 'success');\n\t\t\tredirect(SITE_AREA .'/employee_define_holiday/hrm/show_list');\t\n\t\t\t\n\t\t}\n\t\telseif($type == 'update')\n\t\t{\n\t\t\t$target_id = $this->uri->segment(5); \n\t\t\t\n\t\t\t$this->auth->restrict('HRM.Employee_Define_Holiday.Edit');\t\n\t\t\t\n\t\t\t$employee_holiday_details = $this->employee_define_holiday_model->find_all();\t\n\t\t\t\n\t\t\tforeach($employee_holiday_details as $row){\n\t\t\t\t$row = (object) $row;\n\t\t\t}\n\t\t\t\n\t\t\t$data['CREATED_BY']\t\t= $row->CREATED_BY;\n\t\t\t$data['MODIFY_BY']\t\t= $this->current_user->id;\n\t\t\t\n\t\t\t$result = $this->employee_define_holiday_model->update($target_id,$data);\n\t\t\t\t\t\t\n\t\t\tlog_activity($this->current_user->id, lang('bf_act_edit_record') .': '. $HOLIDAY_ID .' : '. $this->input->ip_address(), 'hrm_ls_holiday_define');\n\t\t\tTemplate::set_message(lang('bf_msg_edit_success'), 'success');\n\t\t\tredirect(SITE_AREA .'/employee_define_holiday/hrm/show_list');\t\t\t\t\n\t\t}\t\n\t\t\n\t\treturn $result;\t\t\t\n\t}", "title": "" }, { "docid": "c895b1461ed68cc8991e972c3a40b5c0", "score": "0.5764174", "text": "public function getEntity( $objid = null )\n {\n\n return $this->getEntityWbfsysCalendarHoliday( $objid );\n\n }", "title": "" }, { "docid": "7664e2bbb54eb218a3e9f388d4a54eef", "score": "0.5754436", "text": "function save_holiday()\r\r\n {\r\r\n # Get the passed details into the url data array if any\r\r\n $urldata = $this->uri->uri_to_assoc(3, array('m', 'i', 'b'));\r\r\n\r\r\n # Pick all assigned data\r\r\n $data = assign_to_data($urldata);\r\r\n\r\r\n #check user access\r\r\n #1: for editing\r\r\n if (!empty($data['i'])) {\r\r\n check_user_access($this, 'view_bid_invitations', 'redirect');\r\r\n } #2: for creating\r\r\n else {\r\r\n check_user_access($this, 'view_bid_invitations', 'redirect');\r\r\n }\r\r\n\r\r\n\r\r\n if (!empty($_POST['save_public_holiday'])) {\r\r\n $required_fields = array('title', 'holiday_date');\r\r\n\r\r\n $_POST = clean_form_data($_POST);\r\r\n\r\r\n $validation_results = validate_form('', $_POST, $required_fields);\r\r\n\r\r\n #Only proceed if the validation for required fields passes\r\r\n if ($validation_results['bool']) {\r\r\n \r\r\n\t\t\t\t#check if the public holiday exists\r\r\n $similar_holiday = $this->db->query($this->Query_reader->get_query_by_code('search_table', array('table'=>'public_holidays', 'orderby'=>'id', 'limittext'=>'', 'searchstring' => ' title = \"'. $_POST['title'] .'\" AND holiday_date =\"'. $_POST['holiday_date'] .'\" AND isactive=\"Y\"')))->result_array();\r\r\n\r\r\n if (!empty($similar_holiday)) {\r\r\n $data['msg'] = \"WARNING: An similar public holiday already exists on the same date\";\r\r\n \r\r\n\t\t\t\t} else {\r\r\n\r\r\n if (!empty($data['i'])) {\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t$_POST['editid'] = $data['i'];\r\r\n \t$result = $this->_public_holiday->update($_POST);\r\r\n\r\r\n } else {\r\r\n\t\t\t\t\t\t$result = $this->_public_holiday->add($_POST);\r\r\n }\r\r\n }\r\r\n\r\r\n #Holiday has been added successfully\r\r\n if (!empty($result['boolean']) && $result['boolean']) {\r\r\n \r\r\n $data['msg'] = \"SUCCESS: The public holiday details have been saved.\";\r\r\n $this->session->set_userdata('sres', $data['msg']);\r\r\n\r\r\n\r\r\n redirect('public_holiday/lists/m/sres' . ((!empty($data['b'])) ? \"/b/\" . $data['b'] : ''));\r\r\n\r\r\n } else if (empty($data['msg'])) {\r\r\n $data['msg'] = \"ERROR: The public holiday details could not be saved or were not saved correctly.\";\r\r\n }\r\r\n }\r\r\n\r\r\n\r\r\n if ((empty($validation_results['bool']) || (!empty($validation_results['bool']) && !$validation_results['bool']))\r\r\n && empty($data['msg'])\r\r\n ) {\r\r\n $data['msg'] = \"WARNING: The highlighted fields are required.\";\r\r\n $data['requiredfields'] = $validation_results['requiredfields'];\r\r\n\r\r\n }\r\r\n\r\r\n }\r\r\n\r\r\n $data['formdata'] = $_POST;\r\r\n\r\r\n #exit($this->db->last_query());\r\r\n\r\r\n $data['page_title'] = (!empty($data['i']) ? 'Edit public holiday' : 'Add public holiday');\r\r\n $data['current_menu'] = 'view_bid_invitations';\r\r\n $data['view_to_load'] = 'public_holiday/form';\r\r\n $data['view_data']['form_title'] = $data['page_title'];\r\r\n\r\r\n $this->load->view('dashboard_v', $data);\r\r\n\r\r\n }", "title": "" }, { "docid": "a0be59ed5f7074cd07881f7be633675b", "score": "0.57222843", "text": "function Get_Holidays()\n\t\t{\n\t\t\t$sql = \"select * from holidays\";\n\t\t\t$query = $this->sql->cluster1->Query($this->database_name,$sql, Debug_1::Trace_Code (__FILE__, __LINE__));\n \t\t\tError_2::Error_Test ($query);\n\n\t\t\t$n = 0;\n\t\t\twhile (FALSE !== ($result = $this->sql->cluster1->Fetch_Object_Row ($query)))\n\t\t\t{\n\t\t\t\t$this->holiday_object->{$n} = $result->date;\n\t\t\t\t$n++;\n\t\t\t}\n\t\t\treturn TRUE;\n\t\t}", "title": "" }, { "docid": "15e6df5ed6b3804c72c08092dc4a6741", "score": "0.56987107", "text": "public function setEntity( $entity )\n {\n\n $this->setEntityWbfsysCalendarHoliday( $entity );\n\n }", "title": "" }, { "docid": "777c75895e490c39c93d38a19d9e4ffb", "score": "0.56056356", "text": "public function getHolidayDocData(){\n\t\t$sql = \"SELECT * FROM holiday_doc\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "c55fbdd6318ea53323ab7cfa2a6617d1", "score": "0.545825", "text": "public function getHolidayInfo()\n\t{\n\t\tif (!isset($this->options['holiday_projects'])) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!isset($this->holidays['total_allocated']) && isset($this->project_table_data)) {\n\t\t\t$this->holidays['total_allocated'] = $this->getDataFromCache('holidays_allocated');\n\t\t}\n\t\t\n\t\treturn $this->holidays;\n\t}", "title": "" }, { "docid": "3740a9bb874f4582b1c1f54c72a64eff", "score": "0.5446944", "text": "public function getCustomFields()\n {\n $chose_event = $this->data['desired_date'];\n if ($chose_event) {\n $form = Tpl::get('form');\n $options = $form->getSendingEventOptions($chose_event);\n $this->mappedData['StartDate'] = $options['StartDate'] ? date('Y-m-d H:i:s O', $options['StartDate']) : '';\n $this->mappedData['EndDate'] = $options['EndDate'] ? date('Y-m-d H:i:s O', $options['EndDate']) : '';\n $this->mappedData['Description'] = $options['Description'] ? $options['Description'] : '';\n \n }\n }", "title": "" }, { "docid": "51ec1edf4ba9f466fb98652a0fbb0750", "score": "0.5417566", "text": "public function getBankHolidayInfo()\n\t{\n\t\tif (!isset($this->options['holiday_projects'])) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!isset($this->bank_holidays['total_allocated']) && isset($this->project_table_data)) {\n\t\t\t$this->bank_holidays['total_allocated'] = $this->getDataFromCache('bank_holidays_allocated');\n\t\t}\n\t\t\n\t\treturn $this->bank_holidays;\n\t}", "title": "" }, { "docid": "ae7e95fc8c54a8002b13c21c499e3eb9", "score": "0.5389587", "text": "abstract protected function getEntityFields();", "title": "" }, { "docid": "f4c5ebc1a77ee00b05f9e7261b8ac2c9", "score": "0.5223649", "text": "public static function getAllHolidays() // Get All Holidays\n\t\t{\n\t\t\ttry \n\t\t\t{\n\t\t\t\t$data = DB::table('holidays')->orderBy('hdy_date', 'asc')->get();\n\t\t\t\tif ($data) {\n\t\t\t\t\tfor ($i=0; $i < count($data) ; $i++) { \n\t\t\t\t\t\t$date = $data[$i]->hdy_date;\n\t\t\t\t\t\t$newD = Carbon::parse($date);\n\t\t\t\t\t\t$data[$i]->formattedDate = $newD->toFormattedDateString();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t\t} \n\t\t\tcatch (Exception $e) \n\t\t\t{\n\t\t\t\tAjaxController::SystemLogs($e->getMessage());\n\t\t\t\treturn 'ERROR';\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "78dc0e6972f80cba23cb67d2f9539096", "score": "0.5129867", "text": "public function get_user_holidays($branch){\n\t\t\t// fetch holidays to skip \n\t\t\t$this->loadModel('HrHoliday');\n\t\t\t$holiday_list = $this->HrHoliday->find('all', array('fields' => array('event_date'), \n\t\t\t'conditions' => array('hr_branch_id' => $branch, \n\t\t\t'HrHoliday.status' => '1', 'HrHoliday.is_deleted' => 'N', 'event_date like' => date('Y').'%',),\n\t\t\t'order' => array('event_date' => 'asc'),'group' => array('HrHoliday.id')));\n\t\t\t$holidays = array();\t\n\t\t\tforeach($holiday_list as $event){\n\t\t\t\t$holidays[] = $event['HrHoliday']['event_date'];\n\t\t\t}\n\t\t\treturn $holidays;\n\t}", "title": "" }, { "docid": "fb87c4b24cfd8e8da68c159cb8570cc8", "score": "0.512612", "text": "public function getCalendarDataFromRecord ($record)\n {\n\n try {\n\n $calendarHolidays = new \\CalendarHolidays();\n $arrayCalendarWorkHour = array();\n $calendarBusinessHours = new \\CalendarBusinessHours();\n $arrayData = $calendarBusinessHours->getCalendarBusinessHours ($record[\"CALENDAR_UID\"]);\n\n\n foreach ($arrayData as $value) {\n\n $calendarBusinessHours = new \\CalendarBusinessHours();\n $calendarBusinessHours->setCalendarBusinessDay ($this->workDaysTransformData ($value[\"CALENDAR_BUSINESS_DAY\"] . \"\", false));\n $calendarBusinessHours->setCalendarBusinessStart ($value[\"CALENDAR_BUSINESS_START\"] . \"\");\n $calendarBusinessHours->setCalendarBusinessEnd ($value[\"CALENDAR_BUSINESS_END\"] . \"\");\n\n $arrayCalendarWorkHour[] = $calendarBusinessHours;\n }\n\n $arrayCalendarHoliday = array();\n $arrayData = $calendarHolidays->getCalendarHolidays ($record[\"CALENDAR_UID\"]);\n\n\n foreach ($arrayData as $value) {\n\n $calendarHolidays = new \\CalendarHolidays();\n $calendarHolidays->setCalendarHolidayName ($value[\"CALENDAR_HOLIDAY_NAME\"] . \"\");\n $calendarHolidays->setCalendarHolidayStart ($value[\"CALENDAR_HOLIDAY_START\"] . \"\");\n $calendarHolidays->setCalendarHolidayEnd ($value[\"CALENDAR_HOLIDAY_END\"] . \"\");\n\n $arrayCalendarHoliday[] = $calendarHolidays;\n }\n\n $dateTime = new \\DateTime ($record[\"CALENDAR_CREATE_DATE\"]);\n $dateCreate = $dateTime->format (\"Y-m-d H:i:s\");\n $dateTime = new \\DateTime ($record[\"CALENDAR_UPDATE_DATE\"]);\n $dateUpdate = $dateTime->format (\"Y-m-d H:i:s\");\n\n $arrayCalendarWorkDays = array();\n foreach ($this->workDaysTransformData ($record[\"CALENDAR_WORK_DAYS\"] . \"\", false) as $value) {\n $arrayCalendarWorkDays[$value] = \"ID_WEEKDAY_\" . (($value != 7) ? $value : 0);\n }\n\n $objCalendarDefinition = new \\CalendarDefinition();\n\n $objCalendarDefinition->setCalendarUid ($record[\"CALENDAR_UID\"]);\n $objCalendarDefinition->setCalendarName ($record[\"CALENDAR_NAME\"]);\n $objCalendarDefinition->setCalendarDescription ($record[\"CALENDAR_DESCRIPTION\"] . \"\");\n $objCalendarDefinition->setCalendarWorkDays ($arrayCalendarWorkDays);\n $objCalendarDefinition->setCalendarStatus ($record[\"CALENDAR_STATUS\"]);\n //$objCalendarDefinition->setWorkHours ($arrayCalendarWorkHour);\n //$objCalendarDefinition->setHolidays ($arrayCalendarHoliday);\n $objCalendarDefinition->setCalendarCreateDate ($dateCreate);\n $objCalendarDefinition->setCalendarUpdateDate ($dateUpdate);\n $objCalendarDefinition->setTotalUsers ((int) ($record[\"CALENDAR_TOTAL_USERS\"]));\n $objCalendarDefinition->setTotalProcesses ((int) ($record[\"CALENDAR_TOTAL_PROCESSES\"]));\n\n $arrTest = array(array(\"definition\" => $objCalendarDefinition, \"holidays\" => $arrayCalendarHoliday, \"work_hours\" => $arrayCalendarWorkHour));\n\n return $arrTest;\n } catch (\\Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "4a8e27e9ffb1114569013bcee25c35b6", "score": "0.51193124", "text": "public function getHolidays(): array\n {\n\n return $this->_data;\n\n }", "title": "" }, { "docid": "e4cffcf848fcb6f18521bbf9e3c34a60", "score": "0.5113076", "text": "public function getHolidays()\n {\n return $this->holidays;\n }", "title": "" }, { "docid": "4b7b84872b57664275a456beb0610d4b", "score": "0.5106469", "text": "private function isHoliday()\n {\n return FALSE;\n }", "title": "" }, { "docid": "6ab7fe2e18ef211b9f6d9031d253909d", "score": "0.5079736", "text": "public function EditGet(DoctorsLawyers $drlaw) {\n $data['drlaw'] = $drlaw;\n $data['categories'] = Category::where('deleted', 0)->get();\n $data['drlaw_services'] = $drlaw->drLawServices()->pluck('service_id')->toArray();\n $data['services'] = Service::where('category_id', $data['drlaw']['category_id'])->get();\n $data['sunday'] = 0;\n $data['monday'] = 0;\n $data['tuesday'] = 0;\n $data['wdnesday'] = 0;\n $data['thrusday'] = 0;\n $data['friday'] = 0;\n $data['saturday'] = 0;\n for ($i = 0; $i < count($data['drlaw']->times); $i ++) {\n if ($data['drlaw']->times[$i]->day == 0) {\n if ($data['drlaw']->times[$i]->holiday == 0) {\n $data['sunday'] = 1;\n }\n }\n if ($data['drlaw']->times[$i]->day == 1) {\n if ($data['drlaw']->times[$i]->holiday == 0) {\n $data['monday'] = 1;\n }\n }\n if ($data['drlaw']->times[$i]->day == 2) {\n if ($data['drlaw']->times[$i]->holiday == 0) {\n $data['tuesday'] = 1;\n }\n }\n if ($data['drlaw']->times[$i]->day == 3) {\n if ($data['drlaw']->times[$i]->holiday == 0) {\n $data['wdnesday'] = 1;\n }\n }\n if ($data['drlaw']->times[$i]->day == 4) {\n if ($data['drlaw']->times[$i]->holiday == 0) {\n $data['thrusday'] = 1;\n }\n }\n if ($data['drlaw']->times[$i]->day == 5) {\n if ($data['drlaw']->times[$i]->holiday == 0) {\n $data['friday'] = 1;\n }\n }\n if ($data['drlaw']->times[$i]->day == 6) {\n if ($data['drlaw']->times[$i]->holiday == 0) {\n $data['saturday'] = 1;\n }\n }\n }\n\n return view('admin.doctorlawyer_edit', ['data' => $data]);\n }", "title": "" }, { "docid": "05aa9fb74790260f6ece2d0701da18ad", "score": "0.50694835", "text": "public function postEditHolidays()\n\t{\n\t\ttry {\n\t\t\t//Array con letras para cada dia de la semana\n\t\t\t$daysArray = ['', 'L', 'M', 'X', 'J', 'V', 'S', 'D'];\n\t\t\t$array = Input::get('holiday_date');\n\t\t\t\n\t\t\t//Si vienen nuevos festivos\n\t\t\tif (count($array) > 0) {\n\n\t\t\t\t// Se recorren todos los festivos\n\t\t\t\tforeach ($array as $key => $holiday) {\n\t\t\t\t\t\t\n\t\t\t\t\t//Verifico si ese festivo ya existe en BD\n\t\t\t\t\t$count = Holiday::where('holiday_date', '=', $holiday)->count();\n\t\t\t\t\t\t\n\t\t\t\t\tif ($count == 0) {\n\t\t\t\t\t\t//Creo el nuevo festivo\n\t\t\t\t\t\t$holidayData = new Holiday();\n\t\t\t\t\t\t$holidayData->holiday_date = $holiday;\n\t\t\t\t\t\t$holidayData->day = $daysArray[date('N', strtotime( $holiday ))];\n\t\t\t\t\t\t$holidayData->save();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t//Obtengo los festivos a eliminar\n\t\t\t$array = Input::get('removedHolidays');\n\t\t\t\n\t\t\t//Si vienen festivos para eliminar\n\t\t\tif (count($array) > 0) {\n\t\t\t\t\t\n\t\t\t\tHoliday::destroy($array);\n\t\t\t}\n\t\t\t\n\t\t\t// Establece respuesta\n\t\t\t$response['success'] = 1;\n\t\t\t\n\t\t\t// Establece la dirección a ir\n\t\t\t$response['url'] = 'schedules/holidays';\n\t\t\t\n\t\t\t// Retorna la respusta como JSON\n\t\t\treturn json_encode($response);\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\n\t\t\t// Establece respuesta negativa\n\t\t\t$response['success'] = 0;\n\t\t\t\n\t\t\t// Establece el mensaje de error\n\t\t\t$response['errors'] = array('No se pudieron guardar los cambios');\n\t\t\t\t\n\t\t\tLog::error($e);\n\t\t\t\n\t\t\t// Retorna la respuesta como JSON\n\t\t\treturn json_encode($response);\n\t\t}\n\t}", "title": "" }, { "docid": "0dc15c78838b11ebc4929957159b77bc", "score": "0.5069114", "text": "public function updatejqCalendarAction(Request $request) {\n $data = array();\n $ret = array('IsSuccess' => false, 'Msg' => 'update unsuccess');\n $data['id'] = $request->get('id');\n if (!$data['id']) {\n $response = new Response(json_encode($ret));\n $response->headers->set('Content-Type', 'application/json');\n return $response;\n }\n\n if ($request->isXmlHttpRequest() && $request->getMethod() == 'POST') {\n\n $manager = $this->get('chronoabsences.common.manager');\n $entity = $manager->loadAbsence($data['id']);\n\n\n $data['end'] = $request->get('end');\n $data['start'] = $request->get('start');\n $data['allDay'] = $request->get('allDay');\n $format = 'Y-m-d H:i:s';\n $d = \\DateTime::createFromFormat($format, $data['start']);\n // $f = \\DateTime::createFromFormat($format, $data['end']);\n if (!$data['end'] || $data['end'] == \"\") {\n // echo \"here\"; \n $f = \\DateTime::createFromFormat($format, $data['start']);\n } else {\n // echo \"ok f\";\n $f = \\DateTime::createFromFormat($format, $data['end']);\n }\n $entity->setDateDebut($d);\n $entity->setDateFin($f);\n\n if ($data['allDay'])\n $entity->setAllDay($data['allDay']);\n $manager->saveAbsence($entity);\n $session = $this->getRequest()->getSession();\n $session->getFlashBag()->add('warning', \"Enregistrement \" . $data['id'] . \" update successfull\");\n $ret['IsSuccess'] = true;\n $ret['Msg'] = 'update success';\n }\n $ret['data'] = $data;\n $response = new Response(json_encode($ret));\n $response->headers->set('Content-Type', 'application/json');\n return $response;\n }", "title": "" }, { "docid": "4bff319d0f44a9e644ef5ca6d5c2b6c8", "score": "0.50659686", "text": "private function get_opening_hours_action_fields() {\n\t\treturn [\n\t\t\t'dayOfWeek' => [\n\t\t\t\t'_default' => [],\n\t\t\t\t'_edit' => true,\n\t\t\t\t'_ret' => 'array',\n\t\t\t\t'_req' => true,\n\t\t\t\t'_type' => 'selectmultia11y',\n\t\t\t\t'_display' => 'row',\n\t\t\t\t'_desc' => [\n\t\t\t\t\t\\__( 'Applied days', 'the-seo-framework-extension-manager' ),\n\t\t\t\t\t\\__( 'Select the days from and to which the opening and closing hours specify to.', 'the-seo-framework-extension-manager' ),\n\t\t\t\t],\n\t\t\t\t'_select' => $this->get_days_fields(),\n\t\t\t],\n\t\t\t'isOpen' => [\n\t\t\t\t'_default' => null,\n\t\t\t\t'_edit' => true,\n\t\t\t\t'_ret' => 'b',\n\t\t\t\t'_req' => false,\n\t\t\t\t'_type' => 'select',\n\t\t\t\t'_desc' => [\n\t\t\t\t\t\\__( 'State of department', 'the-seo-framework-extension-manager' ),\n\t\t\t\t\t\\__( 'Set whether the department is open or closed on the applied days.', 'the-seo-framework-extension-manager' ),\n\t\t\t\t],\n\t\t\t\t'_data' => [\n\t\t\t\t\t'is-type-listener' => '1',\n\t\t\t\t\t'set-type-to-if-value' => [\n\t\t\t\t\t\t'open' => '0',\n\t\t\t\t\t\t'open24' => '1',\n\t\t\t\t\t\t'closed' => '2',\n\t\t\t\t\t],\n\t\t\t\t\t'showif-catcher' => 'department.openinghours.type',\n\t\t\t\t],\n\t\t\t\t'_select' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'0',\n\t\t\t\t\t\t\\__( 'Open', 'the-seo-framework-extension-manager' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'1',\n\t\t\t\t\t\t\\__( 'Open 24 hours', 'the-seo-framework-extension-manager' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'2',\n\t\t\t\t\t\t\\__( 'Closed', 'the-seo-framework-extension-manager' ),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t],\n\t\t\t'opens' => [\n\t\t\t\t'_default' => '',\n\t\t\t\t'_edit' => true,\n\t\t\t\t'_ret' => 'time',\n\t\t\t\t'_req' => true,\n\t\t\t\t'_type' => 'time',\n\t\t\t\t'_desc' => [\n\t\t\t\t\t\\__( 'Opening time', 'the-seo-framework-extension-manager' ),\n\t\t\t\t\t[\n\t\t\t\t\t\t\\__( 'Time when the business location opens.', 'the-seo-framework-extension-manager' ),\n\t\t\t\t\t\t\\__( 'This time must be earlier than the closing time.', 'the-seo-framework-extension-manager' ),\n\t\t\t\t\t],\n\t\t\t\t\t\\__( 'Specify the local time.', 'the-seo-framework-extension-manager' ),\n\t\t\t\t],\n\t\t\t\t'_data' => [\n\t\t\t\t\t'is-showif-listener' => '1',\n\t\t\t\t\t'showif' => [\n\t\t\t\t\t\t'department.openinghours.type' => 'open',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t],\n\t\t\t'closes' => [\n\t\t\t\t'_default' => '',\n\t\t\t\t'_edit' => true,\n\t\t\t\t'_ret' => 'time',\n\t\t\t\t'_req' => true,\n\t\t\t\t'_type' => 'time',\n\t\t\t\t'_desc' => [\n\t\t\t\t\t\\__( 'Closing time', 'the-seo-framework-extension-manager' ),\n\t\t\t\t\t[\n\t\t\t\t\t\t\\__( 'Time when the business location closes.', 'the-seo-framework-extension-manager' ),\n\t\t\t\t\t\t\\__( 'This time must be later than the opening time.', 'the-seo-framework-extension-manager' ),\n\t\t\t\t\t],\n\t\t\t\t\t\\__( 'Specify the local time.', 'the-seo-framework-extension-manager' ),\n\t\t\t\t],\n\t\t\t\t'_data' => [\n\t\t\t\t\t'is-showif-listener' => '1',\n\t\t\t\t\t'showif' => [\n\t\t\t\t\t\t'department.openinghours.type' => 'open',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t],\n\t\t];\n\t}", "title": "" }, { "docid": "47cd1c19c6c5e2ab98922afd0194bbb3", "score": "0.50455034", "text": "public static function refresh_holiday()\n {\n $url = 'https://www.hebcal.com/hebcal?v=1&cfg=json&maj=on&min=on&mod=off&nx=off&year=now&month=x&ss=off&mf=off&c=off&geo=geoname&geonameid=3448439&s=off';\n $headers = array('Content-Type:application/json');\n // Open connection\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n $PreityResult = json_decode($result);\n $holidays = HolidayService::get_holidays();\n\n $newAr = array_values(array_filter($PreityResult->items, function ($value, $key) {\n $date = strtotime($value->date) > strtotime(date(\"Y/m/d\"));\n $NewDate = date(\"d/m/Y\", strtotime($value->date));\n if (isset($value->yomtov) && $date)\n if ($value->yomtov)\n return true;\n else return false;\n else return false;\n }, ARRAY_FILTER_USE_BOTH));\n foreach ($newAr as $key => $value) {\n $existDate = false;\n foreach ($holidays as $key2 => $value2) {\n if ($value->date == $value2->Date) {\n $existDate = true;\n break;\n }\n }\n if (!$existDate) {\n $holiday = new Holidays();\n $holiday->Date = $value->date;\n $holiday->Notes = $value->title;\n $holiday->add();\n }\n }\n if ($result === FALSE) {\n die('Curl failed: ' . curl_error($ch));\n }\n curl_close($ch);\n }", "title": "" }, { "docid": "6ad6a3061433b903af782c1e959f5c91", "score": "0.50253314", "text": "function getHolidays()\n\t {\n\t\t $data = array();\n\t\t $this->db->select('*');\n\t\t $this->db->from('metrices_workingtime');\n\t\t $this->db->where('is_holiday','1');\n\t\t $this->db->group_by('status');\n\t\t $this->db->order_by('date','DESC');\n\t\t $q=$this->db->get();\n\t foreach($q->result() as $row)\n\t {\n\t $data[]=$row;\n\t }\n\t return $data;\n\t }", "title": "" }, { "docid": "8cf2935747254e0a1cac05906aa10589", "score": "0.49657333", "text": "public function getCalendar()\n{\nreturn $this->calendar;\n}", "title": "" }, { "docid": "9793788954518711da3a3a2d53c58667", "score": "0.49361357", "text": "function holiday($name, $date){\r\n $this->name = $name; // Official name of holiday\r\n $this->date = $date; // UNIX timestamp of date\r\n }", "title": "" }, { "docid": "e57a15b66a66d0ebb38267b1abf96399", "score": "0.49266917", "text": "public function get_holidays($month,$branch){ \n\t\t$holiday_count = $this->HrHoliday->find('count', array('conditions' => array('event_date like' => $month.'%', 'HrHoliday.is_deleted' => 'N', 'HrHoliday.status' => '1',\n\t\t'hr_branch_id' => $branch, 'event_date <=' => date('Y-m-d'))));\t\t\n\t\treturn $holiday_count;\n\t}", "title": "" }, { "docid": "41be5c36eec9b41aa4115c7dd47c5d97", "score": "0.49247637", "text": "public function testRetrieveCalendarsByEntity()\n {\n }", "title": "" }, { "docid": "534d7d80a23d4717583113c8b11a6c9c", "score": "0.49203596", "text": "public function getFullHolidayList() {\n\n try {\n\n $q = Doctrine_Query::create()\n ->select('*')\n ->from('Holiday')\n ->orderBy('date ASC');\n\n $holidayList = $q->execute();\n return $holidayList;\n } catch (Exception $e) {\n throw new DaoException($e->getMessage());\n }\n }", "title": "" }, { "docid": "0f750cdedbc95c169cd2bba708b8fe31", "score": "0.48944187", "text": "private function _set_fields()\n\t{\n\t\t$this->form_data = new StdClass;\n\t\t$this->form_data->exam_id = 0;\n $this->form_data->exam_id_hidden = 0;\n $this->form_data->ue_start_date = date('d/m/Y');\n $this->form_data->ue_start_time = '12:00 AM';\n $this->form_data->ue_end_date = date('d/m/Y', strtotime('1 month', time()));\n $this->form_data->ue_end_time = '12:00 AM';\n $this->form_data->user_group_id = '';\n $this->form_data->user_team_id = '';\n $this->form_data->user_result_show = 1;\n\t}", "title": "" }, { "docid": "e250fbf074d5874e42316ec245f15208", "score": "0.48931018", "text": "public function updateHolidayProfitObject() {\n $this->unsetAProfitObject(\"HolidayProfit\");\n if (self::$isHoliday == true) { \n $this->addHolidayProfitObject($this->getCaseLucratoare());\n }\n }", "title": "" }, { "docid": "a37f6586d9096cdb7a48ec4bbdeb78c1", "score": "0.48804033", "text": "abstract public function getFieldsSet();", "title": "" }, { "docid": "9f54725deb0913005b5d8329d0c9888d", "score": "0.4872296", "text": "public static function get_holiday_and_closed()\n {\n $closeDays = CalendarService::get_date_closed();\n $holiday = HolidayService::get_holidays();\n\n return array_merge($closeDays, $holiday);\n }", "title": "" }, { "docid": "267fc7625fd278a5ef67dfb7c3dfbf95", "score": "0.48639157", "text": "function get_data() {\r\n\t\tif ($this->is_submitted() and $this->is_validated() and $postData = &data_submitted()) {\r\n\t\t\tforeach($postData as $key=>$value){\r\n\t \tif(preg_match(\"/resourceAlternative(\\d+)Remove$/\", $key) or isset($postData->{'resourceAlternativeAdd'})){\r\n\t \t\treturn NULL;\r\n\t \t}\r\n\t }\r\n\t\t}\r\n\t\t\r\n return parent::get_data();\r\n }", "title": "" }, { "docid": "2c3cb98915fad3c017c16a566ea70072", "score": "0.48299018", "text": "function _GetFrm(){\n\t\t// Cargo desde el formulario\n\t\t$this->Registro['id_evento'] = $_POST['id_evento'];\n\t\t$hora = $_POST[\"horaHour\"].\":\".$_POST[\"horaMinute\"].\":00\";\n\t\t$fecha = $_POST[\"fechaYear\"].\"-\".$_POST[\"fechaMonth\"].\"-\".$_POST[\"fechaDay\"];\n\t\t$this->Registro['fecha'] = $fecha.\" \".$hora;\n\t\t$this->Registro['nombre_evento'] = $_POST['nombre_evento'];\n\t\t$this->Registro['descripcion'] = stripslashes($_POST['descripcion']);\n\t\t$this->Registro['lugar'] = stripslashes($_POST['lugar']);\n\t\t$this->Registro['alcance'] = $_POST['alcance'];\n\t\t$this->Registro['id_sucursal'] = $_POST['id_sucursal'];\n\t\t$this->Registro['visible'] = $_POST['visible'] ? 1 : 0;\n\t\t$this->CargarFotos();\n\t}", "title": "" }, { "docid": "47a5c835988331dc6471bb9351267bd1", "score": "0.47946277", "text": "protected function getData(Request $request)\n {\n $rules = [\n 'date' => 'required|unique:holidays',\n 'description' => 'string|nullable|min:0',\n ];\n\n $data = $request->validate($rules);\n\n\n return $data;\n }", "title": "" }, { "docid": "7468803cc857671c20e7f6b88fe80f7f", "score": "0.478808", "text": "function getDateenvoi(){\n return $this->dateenvoi;\n }", "title": "" }, { "docid": "a95cf0ded1468422bf9d76b8d42d0521", "score": "0.4787649", "text": "public function getGeneralHolidays()\r\n {\r\n $groupHolidays = new Application_Model_Db_Group_Holidays();\r\n $holidays = $groupHolidays->getHolidays(0);\r\n return $holidays;\r\n }", "title": "" }, { "docid": "83d6b91231e74ed25a622da280aa3443", "score": "0.47813016", "text": "private function get_days_fields() {\n\t\treturn [\n\t\t\t[\n\t\t\t\t'Monday',\n\t\t\t\t\\__( 'Monday', 'the-seo-framework-extension-manager' ),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Tuesday',\n\t\t\t\t\\__( 'Tuesday', 'the-seo-framework-extension-manager' ),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Wednesday',\n\t\t\t\t\\__( 'Wednesday', 'the-seo-framework-extension-manager' ),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Thursday',\n\t\t\t\t\\__( 'Thursday', 'the-seo-framework-extension-manager' ),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Friday',\n\t\t\t\t\\__( 'Friday', 'the-seo-framework-extension-manager' ),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Saturday',\n\t\t\t\t\\__( 'Saturday', 'the-seo-framework-extension-manager' ),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Sunday',\n\t\t\t\t\\__( 'Sunday', 'the-seo-framework-extension-manager' ),\n\t\t\t],\n\t\t];\n\t}", "title": "" }, { "docid": "049bc9ef4d435ac26442f2e71f0d431e", "score": "0.47748628", "text": "public function processHolidayConfiguration()\n\t{\n\t\t//set up the holiday handling if defined in the options\n\t\tif (isset($this->options['holiday_projects'])) {\n\t\t\t//the option needs to be a 2 element array\n\t\t\tif (count($this->options['holiday_projects']) != 2) {\n\t\t\t\tthrow new Exception(\"Configuration for holiday projects is incorrect. Should contain two elements (1. bank/public/national holidays and 2. annual leave) or be set to null in '$this->config_file'\");\n\t\t\t}\n\n\t\t\t$project_names = array_keys($this->options['holiday_projects']);\n\t\t\t$display_names = array_values($this->options['holiday_projects']);\n\n\t\t\t//first element is the bank/national holidays\n\t\t\t$this->bank_holidays['project_name'] = $this->bank_holidays['info_display_name'] = $display_names[0];\n\t\t\tif (is_string($project_names[0])) {\n\t\t\t\t$this->bank_holidays['project_name'] = $project_names[0];\n\t\t\t}\n\n\t\t\t//second element is the regular holidays/annual leave\n\t\t\t$this->holidays['project_name'] = $this->holidays['info_display_name'] = $display_names[1];\n\t\t\tif (is_string($project_names[1])) {\n\t\t\t\t$this->holidays['project_name'] = $project_names[1];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "be686f57c59ee6c7f88cca130f7cd9ee", "score": "0.47544742", "text": "public function addOtherHolidayInfo(Request $request)\n {\n $this->validate($request, [\n 'holiday_type' => 'required',\n 'holiday_date' => 'required'\n ]);\n $holiday_type = trim($request->holiday_type);\n $explode = explode('/',$holiday_type);\n $type_of_holiday = $explode[0];\n $holiday_status = $explode[1];\n if($holiday_status == '0'){\n $door_holiday = '0';\n $attendent_holiday = '0';\n }else{\n $door_holiday = '1';\n $attendent_holiday = '0';\n }\n\n $holiday_date = trim($request->holiday_date);\n $remarks = trim($request->remarks);\n // first create weekly holiday\n $check_weekly = DB::table('holiday')\n ->where('year', $this->year)\n ->count();\n if($check_weekly == 0){\n Session::put('failed','Sorry ! Create Weekly Holiday First');\n return Redirect::to('createWeeklyHoliday');\n exit();\n }\n // check duplicate\n $check = DB::table('holiday')\n ->where('year', $this->year)\n ->where('holiday_date',$holiday_date)\n ->count();\n if($check > 0){\n Session::put('failed','Sorry ! Holiday Of '.$holiday_date.' Already Created');\n return Redirect::to('otherHolidayForm');\n exit();\n }\n\n $data['year'] = $this->year ;\n $data['type'] = $type_of_holiday ;\n $data['door_holiday'] = $door_holiday ;\n $data['attendent_holiday'] = $attendent_holiday ;\n $data['holiday_date'] = $holiday_date ;\n $data['created_at'] = $this->rcdate ;\n DB::table('holiday')->insert($data);\n Session::put('succes','Holiday Created Successfully');\n return Redirect::to('otherHolidayForm');\n }", "title": "" }, { "docid": "03aa497707cb4d8e998867a92864e3ed", "score": "0.47481385", "text": "public static function getAll()\n {\n return HolidayModel::all();\n }", "title": "" }, { "docid": "d538ec17e34c4b1883db912417a8b0f9", "score": "0.47425935", "text": "public function getPostFields();", "title": "" }, { "docid": "e2d366cbd794b7e444528bf0b6ca6a46", "score": "0.4741618", "text": "function getformfields($addbacktic = '1')\n {\n $setfields = explode(',', $this->bloxconfig['setfields']);\n $id = (isset($_POST['eventID'])) ? $_POST['eventID'] : 0;\n $rows = array();\n $backtic = ($addbacktic == '1') ? '`' : '';\n foreach ($setfields as $setfieldfull) {\n //setfields for date\n //Format A Feldname:inputfield-date||inputfield-time\n //Format B Feldname:inputfield-day||inputfield-month||inputfield-year||inputfield-hour||inputfield-minute\n $setfieldarr = explode(':', $setfieldfull);\n $setfield = $setfieldarr[0];\n $datefieldsplits = array();\n if (count($setfieldarr) > 1) {\n $datefieldsplits = explode('||', $setfieldarr[1]);\n if ((count($datefieldsplits) == 2) || (count($datefieldsplits) == 5)) {\n $dates = $_POST[$datefieldsplits[0]];\n $times = $_POST[$datefieldsplits[1]];\n $days = $_POST[$datefieldsplits[0][$key]];\n $months = $_POST[$datefieldsplits[1][$key]];\n $years = $_POST[$datefieldsplits[2][$key]];\n $hours = $_POST[$datefieldsplits[3][$key]];\n $minutes = $_POST[$datefieldsplits[4][$key]];\n if (is_array($dates)) {\n foreach ($dates as $key => $value) {\n if (count($datefieldsplits) == 2) {\n $value = $this->getinputTime($dates[$key], $times[$key]);\n }\n if (count($datefieldsplits) == 5) {\n $value = xetadodb_mktime($hours[$key], $minutes[$key], 0, $months[$key], $days[$key], $years[$key]);\n }\n $rows[$key][$backtic . $setfield . $backtic] = $value;\n }\n } else {\n $key = $id;\n $value = $postarray;\n if (count($datefieldsplits) == 2) {\n $date = $_POST[$datefieldsplits[0]];\n $time = $_POST[$datefieldsplits[1]];\n $value = $this->getinputTime($date, $time);\n }\n if (count($datefieldsplits) == 5) {\n $day = $_POST[$datefieldsplits[0]];\n $month = $_POST[$datefieldsplits[1]];\n $year = $_POST[$datefieldsplits[2]];\n $hour = $_POST[$datefieldsplits[3]];\n $minute = $_POST[$datefieldsplits[4]];\n $value = xetadodb_mktime($hour, $minute, 0, $month, $day, $year);\n }\n $rows[$key][$backtic . $setfield . $backtic] = $value;\n }\n }\n } else {\n $postarray = $_POST[$setfield];\n if (is_array($postarray)) {\n foreach ($postarray as $key => $value) {\n $rows[$key][$backtic . $setfield . $backtic] = $value;\n }\n } else {\n $key = $id;\n $value = $postarray;\n $rows[$key][$backtic . $setfield . $backtic] = $value;\n }\n }\n }\n return $rows;\n }", "title": "" }, { "docid": "18a71438d83a06e5da6c5ecb21c519de", "score": "0.47408926", "text": "function getModelFields() {\n $fields = parent::getModelFields();\n foreach ($fields as $key => &$field) {\n switch ($key){\n case false:break;//needed\n case 'field10':\n case 'field11':\n case 'field12':\n case 'field13':\n case 'field14':\n case 'field15':\n case 'field16':\n case 'field17':\n case 'field18':\n $field['type'] = 'boolean';\n unset($field['useNull']);\n break;\n }\n }\n \n $fields['created'] = array(\n 'name' => 'created',\n 'type' => 'date', \n 'dateFormat' => 'Y-m-d H:i:s',\n 'persist' => 1,\n );\n \n return $fields;\n }", "title": "" }, { "docid": "3e132a6ed085596616be4f1c928c0238", "score": "0.4739666", "text": "public function isHoliday() {\n\t\treturn $this->getHoliday();\n\t}", "title": "" }, { "docid": "9e0205521b1e751b956a959091c96922", "score": "0.47231227", "text": "public function getEntityField();", "title": "" }, { "docid": "8a0063265fc3f1a3ba64ab0f69e2ae2b", "score": "0.472006", "text": "public function addholiday($mysqli) \r\n{\r\n\t$date = date('Y-m-d');\r\n\t\r\n\tif (isset($_POST['Holidaytype'])) {\r\n\t\t$Holidaytype = mysqli_real_escape_string($mysqli,$_POST['Holidaytype']);\t\t\r\n\t\t}\t\r\n\t\tif (isset($_POST['Holidaystartdate'])) {\r\n\t\t$Holidaystartdate = mysqli_real_escape_string($mysqli,$_POST['Holidaystartdate']);\t\t\r\n\t\t}\r\n\t\tif (isset($_POST['Holidayenddate'])) {\r\n\t\t$Holidayenddate = mysqli_real_escape_string($mysqli,$_POST['Holidayenddate']);\t\t\r\n\t\t}\r\n\t\tif (isset($_POST['Description'])) {\r\n\t\t$Description = mysqli_real_escape_string($mysqli,$_POST['Description']);\t\t\r\n\t\t}\r\n\t\tif(isset($_POST['Holidayactive']) && $_POST['Holidayactive'] == 'Yes')\t\t\r\n\t\t{\r\n\t\t\t$status=0;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$status=1;\r\n\t\t}\t\r\n\r\n\t$qry = \"INSERT INTO holiday(holidaytype,holidaystartdate,holidayenddate,description,status) \r\n\t\t\tVALUES ('\".strip_tags($Holidaytype).\"','\".strip_tags($Holidaystartdate).\"','\".strip_tags($Holidayenddate).\"','\".strip_tags($Description).\"',\r\n\t\t\t'\".strip_tags($status).\"');\";\t\t\r\n\r\n\t$res =$mysqli->query($qry)or die(\"Error in Query\".$mysqli->error);\r\n\t$id = 0;\r\n\t$id = $mysqli->insert_id;\r\n\r\n\treturn $id; \r\n}", "title": "" }, { "docid": "38f2d1821dd5a302670aaed164d4a1fb", "score": "0.47084332", "text": "public function testUpdateCalendar()\n {\n }", "title": "" }, { "docid": "f768ef80d2a3c9722ccc786349da5af7", "score": "0.47043744", "text": "function testHolidays2007()\n {\n $drv = Date_Holidays::factory('UNO', 2007, 'en_EN');\n $this->assertFalse(Date_Holidays::isError($drv));\n\n foreach ($this->testDates2007 as $name => $dateInfo) {\n\n $day = $drv->getHoliday($name);\n $this->assertFalse(Date_Holidays::isError($day));\n $this->assertEquals($name, $day->getInternalName());\n $date = $day->getDate();\n $this->assertEquals($dateInfo['day'], $date->format('d'), $name);\n $this->assertEquals($dateInfo['month'], $date->format('m'), $name);\n $this->assertEquals($dateInfo['year'], $date->format('Y'), $name);\n }\n }", "title": "" }, { "docid": "e8bedfc07aff04a51a0857f0aef94f30", "score": "0.4699401", "text": "public function get_holidays_month($month,$branch){\n\t\t$holiday_data = $this->HrHoliday->find('all', array('fields' => array('event_date', 'event'), 'conditions' => array('event_date like' => $month.'%', 'HrHoliday.is_deleted' => 'N', 'HrHoliday.status' => '1',\n\t\t'hr_branch_id' => $branch)));\n\t\tforeach($holiday_data as $holiday){\n\t\t\t$holidayList[$holiday['HrHoliday']['event']] = $holiday['HrHoliday']['event_date']; \n\t\t}\n\t\t$this->set('holidayList', $holidayList);\n\t\treturn $holidayList;\n\t}", "title": "" }, { "docid": "be882bc4c19457dab7fb8d5d2540fb5b", "score": "0.46993193", "text": "public function getTwoYearDates() \n {\n try {\n $holiday_obj = new Holiday();\n $holiday = $holiday_obj->getTwoYearDates();\n return $holiday;\n\n } catch (Exception $exception) {\n\n return back()->withInput()\n ->withErrors(['unexpected_error' => 'Unexpected error occurred while trying to process your request!']);\n }\n }", "title": "" }, { "docid": "b9f4360305874782d531ee9947ae704f", "score": "0.4692359", "text": "public function AjaxFormOperationAbsenceAction(Request $request) {\n $data = array();\n $em = $this->getDoctrine()->getManager();\n\n $ret = array('IsSuccess' => false, 'Msg' => 'update unsuccess');\n if ($request->isXmlHttpRequest() && $request->getMethod() == 'POST') {\n $data = $request->get('chronoabsences');\n $id= $request->get('id');\n // echo \"id=$id\\n\";\n $data['end'] = $data['dateFin'];\n $data['start'] = $data['dateDebut'];\n\n if ($id) {\n $manager = $this->get('chronoabsences.common.manager');\n $entity = $manager->loadAbsence($id);\n }\n else\n $entity = new ChronoAbsences();\n \n \n $form = $this->createForm(new ChronoAbsencesType(), $entity);\n $form->bind($request);\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n $ret['IsSuccess'] = true;\n $ret['Msg'] = 'update success';\n $data['id'] = $entity->getId();\n $data['title'] = $entity->getUser() . ': ' . $entity->getNom();\n $data['className'] = \"class1\";\n $data['allDay'] = true;\n }\n }\n $ret['data'] = $data;\n $response = new Response(json_encode($ret));\n $response->headers->set('Content-Type', 'application/json');\n return $response;\n }", "title": "" }, { "docid": "d6490959177d098621959bf9aab6f68d", "score": "0.46913388", "text": "public function getHolidayIds(\\Magento\\Framework\\Model\\AbstractModel $object) {\n $connection = $this->getConnection();\n $id = (int) $object->getId();\n\n $select = $connection->select()->from(\n $this->getTable(\\Simi\\Simistorelocator\\Setup\\InstallSchema::SCHEMA_STORE_HOLIDAY), 'holiday_id'\n )->where(\n $this->getIdFieldName() . ' = :object_id'\n );\n\n return $connection->fetchCol($select, [':object_id' => $id]);\n }", "title": "" }, { "docid": "5759fbb87d59723d0ac61fb0cc7799b5", "score": "0.46891394", "text": "public function workDateDefinition(){\n try{\n $this->_model = new WorkDateModel();\n switch ($this->_state){\n case self::IDLE :\n $this->_model->addBlank();//force new input on form\n $this->_model->getAll();\n $this->buildViewWorkdateDefinition();\n $this->sendModelView('WorkDateDefinition');\n $this->_state = self::RUNNING;\n break;\n case self::RUNNING:\n if($this->_request->isMethod('POST')){\n if(!$this->_request->isXmlHttpRequest()){ \n if($this->computeWorkDateDefinition($this->_request->request->all()) === true){\n $this->_model->getAll();\n $this->_model->addBlank();//add new input on form\n $this->buildViewWorkdateDefinition();\n $this->sendModelView('WorkDateDefinition');\n }else{\n $this->_state = self::STOPPED;\n //redirect to welcome admin page\n $this->_redirect = new RedirectResponse($this->_index);\n // see symfony: Avant d'envoyer la réponse, vous devez vous assurer qu'elle est conforme avec les les spécifications HTTP en appelant la méthode prepare(): \n $this->_redirect->prepare($this->_request); \n Logger::getInstance()->logInfo('Class '.__CLASS__. ' -- Redirection vers l\\'accueil administrateur');\n $this->_redirect->send();\n }\n }else{\n $this->computeXmlHttpRequestWorkDateDefinition($this->_request->request->all());\n }\n }else{//direct url access\n $this->_model->getAll();\n $this->_model->addBlank();//add new input on form\n $this->buildViewWorkdateDefinition();\n $this->sendModelView('WorkDateDefinition');\n }\n break;\n case self::STOPPED:\n $this->_model->getAll();\n $this->_model->addBlank();//add new input on form\n $this->buildViewWorkdateDefinition();\n $this->sendModelView('WorkDateDefinition');\n $this->_state = self::RUNNING;\n break;\n case self::TERMINATED:\n break;\n case self::ON_INPUT_ERROR:\n break;\n default :\n throw new InternalException('Unknom state in '.__CLASS__. ' State Unknown : '.$this->_state);\n }\n }catch (Exception $e){\n $this->_state = self::ON_INPUT_ERROR;\n $this->_error = $e;\n if (!($e instanceof DataBaseException)){\n throw new InternalException($e->getMessage());\n }else{\n throw $e;\n }\n }\n }", "title": "" }, { "docid": "e10507d2787e9af422995a7e1c2fc449", "score": "0.46791732", "text": "private function getEntityFields(): ?array\n\t{\n\t\t$result = [];\n\n\t\t$factory = Container::getInstance()->getFactory($this->ownerTypeId);\n\t\tif ($factory)\n\t\t{\n\t\t\t$item = $factory->getItem($this->ownerId);\n\t\t\tif ($item && $item->hasField('ASSIGNED_BY_ID'))\n\t\t\t{\n\t\t\t\t$result['ASSIGNED_BY_ID'] = (int)$item->getAssignedById();\n\t\t\t}\n\n\t\t\tif ($item && $item->hasField('CURRENCY_ID'))\n\t\t\t{\n\t\t\t\t$result['CURRENCY_ID'] = $item->getCurrencyId();\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "322127e64a29030e60374798cdd0002a", "score": "0.46730542", "text": "function save_object()\n {\n if(isset($_POST['vacation_release_'.$this->object_id])){\n $this->days = stripslashes($_POST['vacation_release_'.$this->object_id]);\n }\n\n /* Check if we want to toggle the expert mode */\n if(isset($_POST['Toggle_Expert_'.$this->object_id])){\n $this->Expert = !$this->Expert;\n }\n\n /* Get release date */\n if(isset($_POST['vacation_receiver_'.$this->object_id])){\n $vr = stripslashes ($_POST['vacation_receiver_'.$this->object_id]);\n $tmp = array();\n $tmp2 = explode(\",\",$vr);\n foreach($tmp2 as $val){\n $ad = trim($val);\n if(!empty($ad)){\n $tmp[] = $ad;\n }\n }\n $this->addresses = $tmp;\n }\n\n /* Get reason */\n if(isset($_POST['vacation_reason_'.$this->object_id])){\n $vr = stripslashes ($_POST['vacation_reason_'.$this->object_id]);\n $this->reason = trim($vr);\n }\n }", "title": "" }, { "docid": "9c080166aab275f00fb6060c3c15964f", "score": "0.46659586", "text": "private function _fill_update_data() {\r\n $data = array();\r\n $data['regimen'] = $this->post('regimen');\r\n $data['descripcion'] = $this->post('descripcion');\r\n $data['tipo'] = $this->post('tipo');\r\n $data['updated_at'] = date('Y-m-d H:m:s');\r\n return $data;\r\n }", "title": "" }, { "docid": "f2c133678bc2580c183c1ee5fbad5099", "score": "0.4665656", "text": "public function findDefaultData()\n {\n $section = (new SectionManager)->select()->section($this->get('section_id'))->execute()->next();\n $schema = $section->fetchFields();\n\n foreach ($schema as $field) {\n $field_id = $field->get('field_id');\n if (empty($field_id) || isset($this->_data[$field_id])) {\n continue;\n }\n $status = null;\n $message = null;\n $result = $field->processRawFieldData(null, $status, $message, false, $this->get('id'));\n $this->setData($field_id, $result);\n }\n\n $this->set('modification_date', DateTimeObj::get('Y-m-d H:i:s'));\n $this->set('modification_date_gmt', DateTimeObj::getGMT('Y-m-d H:i:s'));\n\n if (!$this->get('creation_date')) {\n $this->set('creation_date', $this->get('modification_date'));\n }\n\n if (!$this->get('creation_date_gmt')) {\n $this->set('creation_date_gmt', $this->get('modification_date_gmt'));\n }\n\n if (!$this->get('author_id')) {\n $this->set('author_id', 1);\n }\n\n if (!$this->get('modification_author_id')) {\n $this->set('modification_author_id', $this->get('author_id'));\n }\n }", "title": "" }, { "docid": "41871a4a6a353b4c1addd2650544968c", "score": "0.46562868", "text": "public function getDriverInfoForOperating(Request $req){\n\t\t\t$numberOfScheduleCurrentMonth;\n\t\t\t$numberOfScheduleLastMonth;\n\t\t\t$countHYOSUNG = 0; // đếm số xe đến Hyosung \n\t\t\t$idHYOSUNG = 11; //id nới giao HYOSUNG - cần thay đổi khi có database chính thức - column: delivery_place_id\n\t\t\t$countFAR = 0;\t// đếm số xe đến FAR\n\t\t\t$idFAR = 2; // id nới giao FAR\n\t\t\t$notWorkingDates = [];\n\t\t\t$holiday =['04-30', '05-01', '03-10']; // month - date\n\t\t\t$top =1;\n\t\t\t$topLastMonth = 1;\n\t\t\t$numberOfScheduleByCarType = null;\n\t\t\t$transdate = date('m-d-Y', time());\n\t\t\t$month = date('m');\n\t\t\t$year = date('Y');\n\t\t\t$date = date('d');\n\t\t\t// var_dump($date);\n\t\t\t$carType;\n\t\t\t$startTime = $year.\"-\".$month.\"-01\";\n\t\t\t$endTime = $year.\"-\".$month.\"-\".$date;\n\t\t\t// var_dump($transdate);exit;\n\t\t\t\n\t\t\t// FORMAT HOLYDAY ALLOW CURRENT YEAR\n\t\t\tif(count($holiday) > 0){\n\t\t\t\tfor($i = 0 ; $i < count($holiday); $i++){\n\t\t\t\t\t$holiday[$i] = $year.\"-\".$holiday[$i];\n\t\t\t\t}\n\t\t\t}\n\t\t\t// get all sunday\n\t\t\t$sunDays = $this->getDateForSpecificDayBetweenDates($startTime, $endTime, 0);\n\t\t\t$outDates = array_merge($sunDays,$holiday);\n\t\t\t// ==== GET all date from 01 - current month - current year to today\n\t\t\t$begin = new DateTime($startTime);\n\t\t\t$end = new DateTime($endTime);\n\n\t\t\t$daterange = new DatePeriod($begin, new DateInterval('P1D'), $end);\n\t\t\t$fullDate =[];\n\t\t\tforeach($daterange as $date){\n\t\t\t\t$tmpDate1 = $date->format(\"Y-m-d\");\n\t\t\t\tarray_push($fullDate, $tmpDate1);\n\t\t\t}\n\t\t\t\n\t\t\t// get all driver and count their operating in current month\n\t\t\t$allDrivers = DB::table('tbl_operating')->groupBy('driver_id')->select('driver_id', 'car_type_id', DB::raw(\"COUNT(*) as count_row\"))->where('status', '=', 2)->whereMonth('operating_date' ,'=', $month)->whereYear('operating_date', '=', $year)->get()->toArray();\n\t\t\t// case DRIVER\n\t\t\tif($req->type == 0 && isset($req->selTaiXe ) && $req->selTaiXe != null){\n\t\t\t\t// count not working dates\n\t\t\t\t$workingDate = DB::table('tbl_operating')->select('operating_date')->where('status', '=', 2)->where('driver_id', '=', $req->selTaiXe )->where('operating_date', '<=', $endTime)->where('operating_date', '>', $startTime)->pluck('operating_date');\n\t\t\t\tif(count($workingDate) > 0){\n\t\t\t\t\t$tmpDateArray = [];\n\t\t\t\t\tfor($i= 0; $i < count($workingDate); $i++){\n\t\t\t\t\t\t$tmpDate = explode(\" \",$workingDate[$i]);\n\t\t\t\t\t\tarray_push($tmpDateArray, $tmpDate[0]);\n\t\t\t\t\t}\n\t\t\t\t\t$outDates = array_merge($outDates,$tmpDateArray);\n\t\t\t\t}\n\t\t\t\tfor($d = 0; $d < count($fullDate); $d++){\n\t\t\t\t\tif(!in_array($fullDate[$d], $outDates))\n\t\t\t\t\t\tarray_push($notWorkingDates, $fullDate[$d]);\n\t\t\t\t}\n\t\t\t\t// ./ count not working dates\n\t\t\t\t// get car type of Driver\n\t\t\t\t$carType = DB::table('tbl_car')->select('car_type_id')->where('driver_suggestion', '=', $req->selTaiXe)->first();\n\t\t\t\tif(isset($carType) && $carType != null){\n\t\t\t\t$driversSameType = DB::table('tbl_car')->groupBy('driver_suggestion')->select('car_type_id', DB::raw(\"MIN(driver_suggestion) as driver_suggestion\"))->where('car_type_id', '=', $carType->car_type_id)->get()->toArray();//->pluck('driver_suggestion');\n\t\t\t\t// get all drivers by same car type \n\t\t\t\t$drivers = $this->arrayFilter($allDrivers, 'driver_id', $driversSameType, 'driver_suggestion');\n\t\t\t}\n\t\t\t// count operating in current month of curent driver\n\t\t\t$scheduleCurrentMonth = DB::table('tbl_operating')->select('tbl_operating.*')->where('tbl_operating.driver_id', '=', $req->selTaiXe)->whereMonth('operating_date' ,'=', $month)->whereYear('operating_date', '=', $year)->where('status', '=', 2)->get()->toArray();\n\t\t\t$numberOfScheduleCurrentMonth =count($scheduleCurrentMonth);\n\t\t\t// cal TOP of current month\n\t\t\t$flagChagneTop = false;\n\t\t\tif(isset($drivers) && $drivers !=null){\n\t\t\t\tif(count($drivers) > 0){\n\t\t\t\t\t$compareValues = [-1];\n\t\t\t\t\tfor($d =0; $d < count($drivers); $d++){\n\t\t\t\t\t\t$checkExist = in_array($drivers[$d]->count_row, $compareValues);\n\t\t\t\t\t\tif($drivers[$d]->count_row > $numberOfScheduleCurrentMonth && $checkExist == false){\n\t\t\t\t\t\t\t$top++;\n\t\t\t\t\t\t\tarray_push($compareValues, $drivers[$d]->count_row);\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\t$countHYOSUNG = DB::table('tbl_operating')->select('tbl_operating.*')->where('tbl_operating.driver_id', '=', $req->selTaiXe)->whereMonth('operating_date' ,'=', $month)->whereYear('operating_date', '=', $year)->where('delivery_place_id', '=', $idHYOSUNG)->where('status', '=', 2)->count();\n\t\t\t$countFAR = DB::table('tbl_operating')->select('tbl_operating.*')->where('tbl_operating.driver_id', '=', $req->selTaiXe)->whereMonth('operating_date' ,'=', $month)->whereYear('operating_date', '=', $year)->where('delivery_place_id', '=', $idFAR)->where('status', '=', 2)->count();\n\t\t\t$numberOfScheduleByCarType = DB::table('tbl_operating')->where('tbl_operating.driver_id', '=', $req->selTaiXe)->where('tbl_operating.status', '=', 2)->groupBy('tbl_operating.car_type_id')->join('tbl_car_type', 'tbl_car_type.car_type_id', '=', 'tbl_operating.car_type_id')->select('tbl_car_type.name', 'tbl_operating.car_type_id', DB::raw(\"COUNT(*) as count_row\"))->get()->toArray();\n\t\t\tif($month > 1)\n\t\t\t\t$month = $month -1;\n\t\t\telse{\n\t\t\t\t$month =12;\n\t\t\t\t$year = $year -1;\n\t\t\t}\t\n\t\t\t$scheduleLastMonth = DB::table('tbl_operating')->select('tbl_operating.*')->where('tbl_operating.driver_id', '=', $req->selTaiXe)->where('tbl_operating.status', '=', 2)->whereMonth('operating_date' ,'=', $month)->whereYear('operating_date', '=', $year)->get()->toArray();\n\t\t\t$numberOfScheduleLastMonth = count($scheduleLastMonth);\n\t\t\t\t// top\n\t\t\t$allDriversLastMonth = DB::table('tbl_operating')->groupBy('driver_id')->select('driver_id', 'car_type_id', DB::raw(\"COUNT(*) as count_row\"))->where('status', '=', 2)->whereMonth('operating_date' ,'=', $month)->whereYear('operating_date', '=', $year)->get()->toArray();\n\t\t\t// $driversLastMonth = $this->arrayFilter($allDrivers, 'driver_id', $driversSameType, 'driver_suggestion');\n\t\t\t//\n\t\t\tif(isset($carType) && $carType != null){\n\t\t\t\t$driversSameType = DB::table('tbl_car')->groupBy('driver_suggestion')->select('car_type_id', DB::raw(\"MIN(driver_suggestion) as driver_suggestion\"))->where('car_type_id', '=', $carType->car_type_id)->get()->toArray();//->pluck('driver_suggestion');\n\t\t\t\t$driversLastMonth = $this->arrayFilter($allDriversLastMonth, 'driver_id', $driversSameType, 'driver_suggestion');\n\t\t\t}\n\t\t\t//\n\t\t\tif(isset($driversLastMonth) && $driversLastMonth !=null){\n\t\t\t\tif(count($driversLastMonth) > 0){\n\t\t\t\t\t$compareValues = [-1];\n\t\t\t\t\tfor($d =0; $d < count($driversLastMonth); $d++){\n\t\t\t\t\t\t$checkExist = in_array($driversLastMonth[$d]->count_row, $compareValues);\n\t\t\t\t\t\tif($driversLastMonth[$d]->count_row > $numberOfScheduleLastMonth && $checkExist == false){\n\t\t\t\t\t\t\t$topLastMonth++;\n\t\t\t\t\t\t\tarray_push($compareValues, $driversLastMonth[$d]->count_row);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// ======================= CASE ASSISTANT DRIVER ================================\n\t\tif($req->type != 0 && isset($req->selPhuXe ) && $req->selPhuXe != null){\n\t\t\t\n\t\t\t// start test date\n\n\t\t\t$transdate = date('m-d-Y', time());\n\t\t\t$month = date('m');\n\t\t\t$year = date('Y');\n\n\t\t\t// count not working dates\n\t\t\t$workingDate = DB::table('tbl_operating')->select('operating_date')->where('status', '=', 2)->where('assistant_driver_id', '=', $req->selPhuXe )->where('operating_date', '<=', $endTime)->where('operating_date', '>', $startTime)->pluck('operating_date');\n\t\t\tif(count($workingDate) > 0){\n\t\t\t\t$tmpDateArray = [];\n\t\t\t\tfor($i= 0; $i < count($workingDate); $i++){\n\t\t\t\t\t$tmpDate = explode(\" \",$workingDate[$i]);\n\t\t\t\t\tarray_push($tmpDateArray, $tmpDate[0]);\n\t\t\t\t}\n\t\t\t\t$outDates = array_merge($outDates,$tmpDateArray);\n\t\t\t}\n\t\t\tfor($d = 0; $d < count($fullDate); $d++){\n\t\t\t\tif(!in_array($fullDate[$d], $outDates))\n\t\t\t\t\tarray_push($notWorkingDates, $fullDate[$d]);\n\t\t\t}\n\t\t\t\t// ./ count not working dates\n\n\n\n\t\t\t// end test date\n\n\t\t\t$assistantDrivers = DB::table('tbl_operating')->groupBy('assistant_driver_id')->select('assistant_driver_id', DB::raw(\"COUNT(*) as count_row\"))->where('status', '=', 2)->whereMonth('operating_date' ,'=', $month)->whereYear('operating_date', '=', $year)->get()->toArray();\n\n\t\t\t$countHYOSUNG = DB::table('tbl_operating')->select('tbl_operating.*')->where('tbl_operating.assistant_driver_id', '=', $req->selPhuXe)->whereMonth('operating_date' ,'=', $month)->whereYear('operating_date', '=', $year)->where('delivery_place_id', '=', $idHYOSUNG)->where('status', '=', 2)->count();\n\t\t\t$countFAR = DB::table('tbl_operating')->select('tbl_operating.*')->where('tbl_operating.assistant_driver_id', '=', $req->selPhuXe)->whereMonth('operating_date' ,'=', $month)->whereYear('operating_date', '=', $year)->where('delivery_place_id', '=', $idFAR)->where('status', '=', 2)->count();\n\t\t\t$scheduleCurrentMonth = DB::table('tbl_operating')->select('tbl_operating.*')->where('tbl_operating.assistant_driver_id', '=', $req->selPhuXe)->whereMonth('operating_date' ,'=', $month)->whereYear('operating_date', '=', $year)->get()->toArray();\n\t\t\t$numberOfScheduleCurrentMonth = count($scheduleCurrentMonth);\n\t\t\tif($month > 1)\n\t\t\t\t$month = $month -1;\n\t\t\telse{\n\t\t\t\t$month =12;\n\t\t\t\t$year = $year -1;\n\t\t\t}\n\t\t\t$scheduleLastMonth = DB::table('tbl_operating')->select('tbl_operating.*')->where('tbl_operating.assistant_driver_id', '=', $req->selPhuXe)->whereMonth('operating_date' ,'=', $month)->whereYear('operating_date', '=', $year)->get()->toArray();\n\t\t\t$numberOfScheduleLastMonth = count($scheduleLastMonth);\n\t\t\t\t\t// ====================================\n\t\t\t$flagChagneTop = false;\n\t\t\tif(count($assistantDrivers) > 0){\n\t\t\t\t//TOP CURRENT MONTH\n\t\t\t\t$compareValues = [-1];\n\t\t\t\tfor($d =0; $d < count($assistantDrivers); $d++){\n\t\t\t\t\t$checkExist = in_array($assistantDrivers[$d]->count_row, $compareValues);\n\t\t\t\t\tif($assistantDrivers[$d]->count_row > $numberOfScheduleCurrentMonth && $checkExist == false){\n\t\t\t\t\t\t$top++;\n\t\t\t\t\t\tarray_push($compareValues, $assistantDrivers[$d]->count_row);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$assistantDriversLastMonth = DB::table('tbl_operating')->groupBy('assistant_driver_id')->select('assistant_driver_id', DB::raw(\"COUNT(*) as count_row\"))->where('status', '=', 2)->whereMonth('operating_date' ,'=', $month)->whereYear('operating_date', '=', $year)->get()->toArray();\n\t\t\t\t//TOP LAST MONTH\n\t\t\t\t$compareValues = [-1];\n\t\t\t\tfor($d =0; $d < count($assistantDriversLastMonth); $d++){\n\t\t\t\t\t$checkExist = in_array($assistantDriversLastMonth[$d]->count_row, $compareValues);\n\t\t\t\t\tif($assistantDriversLastMonth[$d]->count_row > $numberOfScheduleLastMonth && $checkExist == false){\n\t\t\t\t\t\t// var_dump($assistantDriversLastMonth[$d]->count_row); exit;\n\t\t\t\t\t\t$topLastMonth++;\n\t\t\t\t\t\tarray_push($compareValues, $assistantDriversLastMonth[$d]->count_row);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\t// =====================================\n\t\t}\n\t\t$res =(object)[\n\t\t\t'numberOfScheduleCurrentMonth'=>$numberOfScheduleCurrentMonth,\n\t\t\t'numberOfScheduleLastMonth'=>$numberOfScheduleLastMonth,\n\t\t\t'countHYOSUNG'=>$countHYOSUNG,\n\t\t\t'countFAR'=>$countFAR,\n\t\t\t'numberOfScheduleByCarType'=>$numberOfScheduleByCarType,\n\t\t\t'top'=>$top,\n\t\t\t'topLastMonth'=>$topLastMonth,\n\t\t\t'currentMonth'=>$month,\n\t\t\t'outDates'=>$outDates,\n\t\t\t'notWorkingDates'=>$notWorkingDates,\n\t\t\t'fullDate'=>$fullDate\n\t\t];\n\t\treturn Response::json(['success' => $res]);\n\t}", "title": "" }, { "docid": "e18c0fc631579493ee2b92ba839122dd", "score": "0.46412238", "text": "protected function saveovertimeAction() {\r\n \r\n $formValues = $this->params()->fromPost('formVal'); \r\n $overtimeService = $this->getOvertimeService();\r\n $data = array( \r\n // 'overtimeMstId' =>'83',//$overtimeService->getCurrentOvertimeBatch()\r\n // 'overtimeDate' => date('Y-m-d'), // $formValues['overtimeDate'],\r\n 'No_Of_Normal_Hours' => $formValues['employeeNoNOHours'],\r\n 'No_Of_Holiday_Hours' => $formValues['employeeNoHOHours'],\r\n 'Status' => '0', //$formValues['companyId'],/* @@todo get company ID*/\r\n 'Total_Normal_Hours' => $formValues['employeeNoNOHours']*1.5, //$formValues['isClosed'],\r\n 'Total_Holiday_Hours' => $formValues['employeeNoHOHours']*2.0,\r\n 'Emp_Mst_Id' => $formValues['empId'],\r\n 'Overtime_Mst_Id' =>$this->getCurrentOvertimeBatch(),\r\n );\r\n // \\Zend\\Debug\\Debug::dump($data);\r\n // exit;\r\n $overtimeService->saveOverTime($data);\r\n // \\Zend\\Debug\\Debug::dump($overtimeService);\r\n exit;\r\n }", "title": "" }, { "docid": "69a7ce1d92e5059e067b5ac2ad123f54", "score": "0.46409464", "text": "public function getFacetDateFields() {}", "title": "" }, { "docid": "06dcb1cafe6b644faf6b7a5b3fa5ffe2", "score": "0.4636442", "text": "protected function loadEntityFields()\n {\n foreach (get_object_vars($this) as $prop => $value) {\n $saveMethod = 'save' . $prop;\n $value = method_exists($this, $saveMethod) ? $this->$saveMethod() : $this->$prop;\n $setter = 'set' . $prop;\n if (method_exists($this->entity, $setter)) {\n $this->entity->$setter($value);\n } elseif (property_exists($this->entity, $prop)) {\n $this->entity->$prop = $value;\n }\n }\n }", "title": "" }, { "docid": "cc5b1812b4faa549765cbb42d2239410", "score": "0.46228194", "text": "public function getEmployment() // {{{\n {\n global $CCV_CONST;\n $records = array();\n $elements = $this->m_xpath->query(\"//section[@id='b857f61b33484cb093068bd2da764f99']\");\n for ($i = 0; !is_null($elements) && $i < $elements->length; $i++)\n {\n $record = array();\n $id = $this->get_xpath(\"@recordId\", $elements->item($i));\n $record['type'] = $this->get_xpath(\"field[@id='9510a03a308f43ceb8cd046aeffa9499']/lov/@id\", $elements->item($i));\n $record['title'] = $this->get_xpath(\"field[@id='886807b87b624978bc8ca9045ff56e47']/value\", $elements->item($i));\n $record['status'] = $this->get_xpath(\"field[@id='ef7bd6fa8dd040449fa181f0ca4530e4']/lov/@id\", $elements->item($i));\n $record['rank'] = $this->get_xpath(\"field[@id='500e1360abd14972bc1ef844a8b98087']/lov/@id\", $elements->item($i));\n $date = $this->get_xpath(\"field[@id='c7e85d10d10249c68b28c71fc80ec570']/value\", $elements->item($i));\n @list($record[\"start_year\"], $record[\"start_month\"]) = explode(\"/\", $date);\n $date = $this->get_xpath(\"field[@id='b4681f52d85440829faa3160ba3bb31f']/value\", $elements->item($i));\n @list($record[\"end_year\"], $record[\"end_month\"]) = explode(\"/\", $date);\n $record[\"end_year\"] = ($record[\"end_year\"] == null) ? \"\" : $record[\"end_year\"];\n $record[\"end_month\"] = ($record[\"end_month\"] == null) ? \"\" : $record[\"end_month\"];\n \n $record['organization_country'] = $this->get_xpath(\"field[@id='5dd34f14c1ea47c09e8ddcd202653814']/refTable/linkedWith[@label='Country']/@value\", $elements->item($i));\n $record['organization_subdivision'] = $this->get_xpath(\"field[@id='5dd34f14c1ea47c09e8ddcd202653814']/refTable/linkedWith[@label='Subdivision']/@value\", $elements->item($i));\n $record['organization_type'] = $this->get_xpath(\"field[@id='5dd34f14c1ea47c09e8ddcd202653814']/refTable/linkedWith[@label='Organization Type']/@value\", $elements->item($i));\n $record['organization_name'] = $this->get_xpath(\"field[@id='5dd34f14c1ea47c09e8ddcd202653814']/refTable/linkedWith[@label='Organization']/@value\", $elements->item($i));\n $record['department'] = $this->get_xpath(\"field[@id='cd6e5e97994e42f893bd5c9e7212c94b']/value\", $elements->item($i));\n $record['faculty'] = $this->get_xpath(\"field[@id='58cf7001d283421b91f5da21f0ef2188']/value\", $elements->item($i));\n $record['tenure'] = $this->get_xpath(\"field[@id='b0eca39ad77346648180dec948d13432']/lov/@id\", $elements->item($i));\n $records[$id] = $record;\n }\n return $records;\n }", "title": "" }, { "docid": "389e963a96e12bd6bf399784bbd16c88", "score": "0.4598437", "text": "function dw_schemas_local_business_save_meta_box($post_id) {\n\tif(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n\t\treturn;\n\t}\n\twp_verify_nonce(plugin_basename(__FILE__), 'dw_schemas_save_meta_box');\n\t$local_business_data_array = [];\n\tfor ($i=0; $i <= $_POST['local_business_objects_count']; $i++) :\n\t\t$local_business_data_array[$i]['office_name'] = (empty($_POST['_local_business_schemas_structured_data_office_name'][$i])) ? '' : sanitize_text_field($_POST['_local_business_schemas_structured_data_office_name'][$i]);\n\t\t$local_business_data_array[$i]['office_address'] = (empty($_POST['_local_business_schemas_structured_data_office_address'][$i])) ? '' : sanitize_text_field($_POST['_local_business_schemas_structured_data_office_address'][$i]);\n\t\t$local_business_data_array[$i]['office_logo'] = (empty($_POST['_local_business_schemas_structured_data_office_logo'][$i])) ? '' : sanitize_text_field($_POST['_local_business_schemas_structured_data_office_logo'][$i]);\n\t\t$local_business_data_array[$i]['office_contact_phone'] = (empty($_POST['_local_business_schemas_structured_data_office_contact_phone'][$i])) ? '' : sanitize_text_field($_POST['_local_business_schemas_structured_data_office_contact_phone'][$i]);\n\t\t$local_business_data_array[$i]['office_contact_email'] = (empty($_POST['_local_business_schemas_structured_data_office_contact_email'][$i])) ? '' : sanitize_text_field($_POST['_local_business_schemas_structured_data_office_contact_email'][$i]);\n\t\t$local_business_data_array[$i]['office_url'] = (empty($_POST['_local_business_schemas_structured_data_office_url'][$i])) ? '' : sanitize_text_field($_POST['_local_business_schemas_structured_data_office_url'][$i]);\n\t\t$local_business_data_array[$i]['office_business_days_full'] = (empty($_POST['_local_business_schemas_structured_data_office_business_days_full'][$i])) ? '' : sanitize_text_field($_POST['_local_business_schemas_structured_data_office_business_days_full'][$i]);\n\t\t$local_business_data_array[$i]['office_business_days_short'] = (empty($_POST['_local_business_schemas_structured_data_office_business_days_short'][$i])) ? '' : sanitize_text_field($_POST['_local_business_schemas_structured_data_office_business_days_short'][$i]);\n\t\t$local_business_data_array[$i]['office_business_hours'] = (empty($_POST['_local_business_schemas_structured_data_office_business_hours'][$i])) ? '' : sanitize_text_field($_POST['_local_business_schemas_structured_data_office_business_hours'][$i]);\n\t\t$local_business_data_array[$i]['office_payment_accepted'] = (empty($_POST['_local_business_schemas_structured_data_office_payment_accepted'][$i])) ? '' : sanitize_text_field($_POST['_local_business_schemas_structured_data_office_payment_accepted'][$i]);\n\t\t$local_business_data_array[$i]['office_price_range'] = (empty($_POST['_local_business_schemas_structured_data_office_price_range'][$i])) ? '' : sanitize_text_field($_POST['_local_business_schemas_structured_data_office_price_range'][$i]);\n\tendfor;\n\t$local_business_structured_data_array = [\n\t\t'allow_local_business_structured_data' => (empty($_POST['_schemas_allow_local_business_structured_data'])) ? 'false' : sanitize_text_field($_POST['_schemas_allow_local_business_structured_data']),\n\t\t'structured_data' => $local_business_data_array\n\t];\n\tupdate_post_meta($post_id, '_schemas_local_business_structured_data', $local_business_structured_data_array);\n}", "title": "" }, { "docid": "0107c8e26553c2278a0d7bb0f709ec7c", "score": "0.45944574", "text": "public function getFecha_fin(){\n return $this->fecha_fin;\n }", "title": "" }, { "docid": "485c4a7ef6fd1b4dd8be58c73eab46eb", "score": "0.45930684", "text": "public function holidays()\n {\n return $this->hasMany(Holiday::class);\n }", "title": "" }, { "docid": "6ee55c211453b193a5bcc28bb6750790", "score": "0.45768648", "text": "public function get_staff_attendance(){\n }", "title": "" }, { "docid": "1ad6dfc3b09d36592b15205e957923d1", "score": "0.45757565", "text": "function testHolidays2008()\n {\n $drv = Date_Holidays::factory('UNO', 2008, 'en_EN');\n $this->assertFalse(Date_Holidays::isError($drv));\n\n foreach ($this->testDates2008 as $name => $dateInfo) {\n\n $day = $drv->getHoliday($name);\n $this->assertFalse(Date_Holidays::isError($day));\n $this->assertEquals($name, $day->getInternalName());\n $date = $day->getDate();\n $this->assertEquals($dateInfo['day'], $date->format('d'), $name);\n $this->assertEquals($dateInfo['month'], $date->format('m'), $name);\n $this->assertEquals($dateInfo['year'], $date->format('Y'), $name);\n }\n }", "title": "" }, { "docid": "e392992bc16b9aca86eaa7cdf5b7b36e", "score": "0.4570178", "text": "private function _fill_update_data() {\n $data = array();\n $data['fecha_compra'] = $this->post('fecha_compra');\n $data['monto_compra_sin_impuestos'] = $this->post('monto_compra_sin_impuestos');\n $data['tipo'] = $this->post('tipo');\n $data['descripcion'] = $this->post('descripcion');\n $data['persona_id'] = $_SESSION[$this->config->item('project_name')]['persona_id'];\n $data['updated_at'] = date('Y-m-d H:m:s');\n return $data;\n }", "title": "" }, { "docid": "41fca8500537a802432e54a2e85b4cde", "score": "0.4568931", "text": "public function get_edit_form()\n\t{\n\t if(isset($_REQUEST['holiday_id'])) \n\t\t{\n\t\t $holiday_id = $_REQUEST['holiday_id'];\n\t\t $holiday_result = $this->attendance->getHolidaybyId($holiday_id);\n\t\t $data['holiday'] = $holiday_result->row();\n\t\t $this->load->view('edit_holiday_form',$data);\n\t\t}\n\t}", "title": "" }, { "docid": "4db2130f61bfc421fed11f884c6f4c6a", "score": "0.45640033", "text": "function get_holidays() {\r\n $arr_holidays = array(\r\n 0 => array(\r\n 'day' => 1,\r\n 'month' => 1,\r\n 'holiday_name' => 'Новогодние каникулы',\r\n ),\r\n 1 => array(\r\n 'day' => 2,\r\n 'month' => 1,\r\n 'holiday_name' => 'Новогодние каникулы',\r\n ),\r\n 2 => array(\r\n 'day' => 3,\r\n 'month' => 1,\r\n 'holiday_name' => 'Новогодние каникулы',\r\n ),\r\n 3 => array(\r\n 'day' => 4,\r\n 'month' => 1,\r\n 'holiday_name' => 'Новогодние каникулы',\r\n ),\r\n 4 => array(\r\n 'day' => 5,\r\n 'month' => 1,\r\n 'holiday_name' => 'Новогодние каникулы',\r\n ),\r\n 5 => array(\r\n 'day' => 6,\r\n 'month' => 1,\r\n 'holiday_name' => 'Новогодние каникулы',\r\n ),\r\n 6 => array(\r\n 'day' => 7,\r\n 'month' => 1,\r\n 'holiday_name' => 'Рождество Христово',\r\n ),\r\n 7 => array(\r\n 'day' => 8,\r\n 'month' => 1,\r\n 'holiday_name' => 'Новогодние каникулы',\r\n ),\r\n 8 => array(\r\n 'day' => 23,\r\n 'month' => 2,\r\n 'holiday_name' => 'День защитника отечества',\r\n ),\r\n 9 => array(\r\n 'day' => 8,\r\n 'month' => 3,\r\n 'holiday_name' => 'Международный женский день',\r\n ),\r\n );\r\n\r\n return $arr_holidays;\r\n}", "title": "" }, { "docid": "aa5235009a5aeba41a3ab95766405b9c", "score": "0.45586106", "text": "function getCalendar() {\n\n if (isset($this->fields['slas_ttr_id']) && $this->fields['slas_ttr_id'] > 0) {\n $slm = new SLM();\n if ($slm->getFromDB($this->fields['slas_ttr_id'])) {\n // not -1: calendar of the entity\n if ($slm->getField('calendars_id') >= 0) {\n return $slm->getField('calendars_id');\n }\n }\n }\n return parent::getCalendar();\n }", "title": "" }, { "docid": "d492fc159d4fc1719938eaa9dbb1b95c", "score": "0.45581654", "text": "function testHolidays2006()\n {\n $drv = Date_Holidays::factory('UNO', 2006, 'en_EN');\n $this->assertFalse(Date_Holidays::isError($drv));\n\n foreach ($this->testDates2006 as $name => $dateInfo) {\n\n $day = $drv->getHoliday($name);\n $this->assertFalse(Date_Holidays::isError($day));\n $this->assertEquals($name, $day->getInternalName());\n $date = $day->getDate();\n $this->assertEquals($dateInfo['day'], $date->format('d'), $name);\n $this->assertEquals($dateInfo['month'], $date->format('m'), $name);\n $this->assertEquals($dateInfo['year'], $date->format('Y'), $name);\n }\n }", "title": "" }, { "docid": "2a0a5aed8e1552a911f5374300907d78", "score": "0.45534122", "text": "function getPublicHolidays($start_date= '', $end_date = ''){\n global $timedate;\n //Get list Public Holiday\n $ext_end = '';\n if(!empty($end_date))\n $ext_end = \"AND holiday_date <= '{$timedate->convertToDBDate($end_date,false)}'\";\n\n $ext_type = \"AND apply_for = 'All'\";\n\n $q1 = \"SELECT id,\n holiday_date,\n description\n FROM holidays\n WHERE deleted = 0\n AND type = 'Public Holiday'\n $ext_type\n AND holiday_date >= '{$timedate->convertToDBDate($start_date,false)}'\n $ext_end\";\n $rs1 = $GLOBALS['db']->query($q1);\n $holiday_list = array();\n while($row = $GLOBALS['db']->fetchByAssoc($rs1)){\n $holiday_list[$row['holiday_date']] = $row['description'];\n }\n return $holiday_list;\n }", "title": "" }, { "docid": "d93fc1650654ee4e847ff46b60488f7b", "score": "0.45516634", "text": "function get_holidays($inc_year)\r\n {\r\n //$year = date(\"Y\");\r\n $year = $inc_year;\r\n\r\n $holidays[] = new Holiday(\"New Year's Day\", get_timestamp(\"$year-1-1\"));\r\n $holidays[] = new Holiday(\"Australia Day\", get_timestamp(\"$year-1-26\"));\r\n $holidays[] = new Holiday(\"Labour Day\", ordinal_day(1, 'Mon', 3, $year));\r\n $holidays[] = new Holiday(\"Anzac Day\", get_timestamp(\"$year-4-25\"));\r\n //$holidays[] = new Holiday(\"St. Patrick's Day\", get_timestamp(\"$year-3-17\"));\r\n // TODO: $holidays[] = new Holiday(\"Good Friday\", easter_date($year));\r\n $holidays[] = new Holiday(\"Easter\", easter_date($year));\r\n // TODO: $holidays[] = new Holiday(\"Easter Monday\", easter_date($year));\r\n $holidays[] = new Holiday(\"Foundation Day\", ordinal_day(1, 'Mon', 6, $year));\r\n $holidays[] = new Holiday(\"Queen's Birthday\", ordinal_day(1, 'Mon', 10, $year));\r\n //$holidays[] = new Holiday(\"Memorial Day\", memorial_day($year));\r\n //$holidays[] = new Holiday(\"Mother's Day\", ordinal_day(2, 'Sun', 5, $year));\r\n //$holidays[] = new Holiday(\"Father's Day\", ordinal_day(3, 'Sun', 6, $year));\r\n //$holidays[] = new Holiday(\"Independence Day\", get_timestamp(\"$year-7-4\"));\r\n //$holidays[] = new Holiday(\"Labor Day\", ordinal_day(1, 'Mon', 9, $year));\r\n $holidays[] = new Holiday(\"Christmas\", get_timestamp(\"$year-12-25\"));\r\n $holidays[] = new Holiday(\"Boxing Day\", get_timestamp(\"$year-12-26\"));\r\n\r\n $numHolidays = count($holidays) - 1;\r\n $out_array = array();\r\n\r\n for ($i = 0; $i < $numHolidays; $i++){\r\n $out_array[] = $holidays[$i]->date;\r\n }\r\n unset($holidays);\r\n return $out_array;\r\n }", "title": "" }, { "docid": "910273d88c3608d14d7a2d785a2bd95a", "score": "0.45485058", "text": "public function addClosedDate() {\n if (!$this->Common->checkPermissionByaction($this->params['controller'], \"manageTimings\")) {\n $this->Session->setFlash(__(\"Permission Denied\"));\n $this->redirect(array('controller' => 'Stores', 'action' => 'dashboard'));\n }\n $this->autoRender = false;\n if ($this->request->data) {\n $this->request->data = $this->Common->trimValue($this->request->data);\n $data['store_id'] = $this->Session->read('admin_store_id');\n $holidayDate = $this->Dateform->formatDate($this->request->data['StoreHoliday']['holiday_date']);\n $data['holiday_date'] = trim($holidayDate);\n $data['description'] = trim($this->request->data['StoreHoliday']['description']);\n if ($this->StoreHoliday->storeHolidayNotExists($holidayDate, $data['store_id'])) {\n if ($this->StoreHoliday->saveStoreHolidayInfo($data)) {\n $this->Session->setFlash(__(\"Closed Holiday Successfully added\"), 'alert_success');\n $this->redirect(array('controller' => 'Stores', 'action' => 'manageTimings'));\n } else {\n $this->Session->setFlash(__(\"Some Problem occured\"), 'alert_failed');\n $this->redirect(array('controller' => 'Stores', 'action' => 'manageTimings'));\n }\n } else {\n $this->Session->setFlash(__(\"Closed Date already exists\"), 'alert_failed');\n $this->redirect(array('controller' => 'Stores', 'action' => 'manageTimings'));\n }\n }\n }", "title": "" }, { "docid": "f786330adec1e55baa3d7ed4e94b6c1a", "score": "0.4545082", "text": "public function getCalificacionesAlumno()\n {\n try {\n\n $datos = $_REQUEST;\n $dbm = new DbmPortalAlumno($this->get(\"db_manager\")->getEntityManager());\n $cicloactual = $dbm->getRepositorioById('Ciclo', 'actual', 1);\n $cicloid = $cicloactual->getCicloId();\n foreach ($datos[\"alumnoid\"] as $akey => $alumnoid) {\n $respuesta[] = array(\"alumnoid\" => $alumnoid);\n $ac = $dbm->getOneByParametersRepositorio('CeAlumnoporciclo', ['alumnoid' => $alumnoid, 'cicloid' => $cicloid]);\n\n if ($ac) {\n $nivelid = $ac->getGradoid()->getNivelid()->getNivelid();\n $gradoid = $ac->getGradoid()->getGradoid();\n $acid = $ac->getAlumnoporcicloid();\n $acg = $dbm->getRepositorioById(\"CeAlumnocicloporgrupo\", \"alumnoporcicloid\", $acid);\n if ($acg) {\n $grupoid = $acg->getGrupoid()->getGrupoid();\n }\n }\n $periodosdeevaluacion = $dbm->BuscarPeriodosGradoCiclo(['gradoid' => $gradoid, 'cicloid' => $cicloid]);\n foreach ($periodosdeevaluacion as $pkey => $pe) {\n $fechainicio = new \\DateTime($pe[\"fechainicio\"]);\n $fechafin = new \\DateTime($pe[\"fechafin\"]);\n $hoy = new \\DateTime();\n if ($hoy > $fechainicio && $hoy < $fechafin) {\n $fechapublicacion = $pe[\"fechapublicaciondefinitiva\"];\n $fechapublicacionprevia = $pe[\"fechapublicacionprevia\"];\n }\n $respuesta[$akey][\"periodos\"][] = $pe;\n\n //$calificaciones = $dbm->BuscarCalificacionesAlumno(array(\"alumnoid\" => $alumnoid, \"periodoevaluacionid\" => $pe[\"periodoevaluacionid\"]));\n $respuesta[$akey][\"periodos\"][$pkey][\"calificaciones\"] = $calificaciones;\n $capturacontroller = new CapturaCalificacionesController();\n $calif = [];\n foreach ($calificaciones as $ckey => $calificacion) {\n $serializer = $this->container->get('serializer');\n $calificacion = ClasificadorAlumno::objetToArray(json_decode($serializer->serialize($calificacion, 'json')));\n $periodo = $dbm->getRepositorioById('CeCalificacionperiodoporalumno', 'calificacionperiodoporalumnoid', $calificacion['id']);\n $dbmC = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n $promedio = $capturacontroller->calculaCalificacionFinal([\n 'materiaid' => $calificacion[\"materiaid\"],\n 'calificacionfinalperiodoporalumnoid' => $calificacion['calificacionfinalperiodoporalumnoid'],\n ], $dbmC, $periodo, $hoy, $datos['tipo']);\n $idec = $idec + $calificacion[\"calificacion\"];\n if ($calificacion[\"seimprimeenboleta\"]) {\n $sep = $sep + $calificacion[\"calificacion\"];\n }\n $calificacion[\"calificacionfinalperiodoporalumno\"]['calificacion'] = $promedio;\n $capturas = $dbm->BuscarCapturasAlumno(array(\"calificacionperiodoporalumnoid\" => $calificacion[\"id\"]));\n\n $faltas = $dbm->FaltasDetalle([\"materiaid\" => $calificacion[\"materiaid\"], \"alumnoid\" => $alumnoid, \"fechainicio\" => $pe[\"fechainicio\"], \"fechafin\" => $pe[\"fechafin\"]]);\n $respuesta[$akey][\"periodos\"][$pkey][\"calificaciones\"][$ckey] = $calificacion;\n $respuesta[$akey][\"periodos\"][$pkey][\"calificaciones\"][$ckey][\"detallefaltas\"] = $faltas;\n $respuesta[$akey][\"periodos\"][$pkey][\"calificaciones\"][$ckey][\"capturas\"] = $capturas;\n }\n $respuesta[$akey][\"periodos\"][$pkey][\"idec\"] = number_format($idec / count($calificaciones), 2);\n $respuesta[$akey][\"periodos\"][$pkey][\"sep\"] = number_format($sep / count($calificaciones), 2);\n }\n $respuesta[$akey][\"fechapublicacion\"] = $fechapublicacion;\n $respuesta[$akey][\"fechapublicacionprevia\"] = $fechapublicacionprevia;\n }\n\n if (!$respuesta) {\n //return new View(\"No se encontro ningun registro \", Response::HTTP_PARTIAL_CONTENT);\n return [];\n }\n return new View($respuesta, Response::HTTP_OK);\n } catch (Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }", "title": "" }, { "docid": "244f59e893cab86b9fc246a827f25510", "score": "0.45384678", "text": "public function read($values = null) {\n $request_values = ($values == null ? $this->getDatabaseObject() : $values);\n if ($request_values == NULL || empty($request_values)) {\n //If the request return nothing\n throw new Exception(\"Core TYPE :: ERROR TO SELECT ALL INFORMATION ABOUT DATE TYPE ID : \" . $this->getIdValue());\n } else {\n $this->setIdValue($values[self::ID]);\n $this->setNameValue($values[self::NAME]);\n }\n }", "title": "" }, { "docid": "05ac9a1f557079c41e1f6a7cd00d30ed", "score": "0.45369053", "text": "public function getFieldsToUpdateEntity(): array\n\t{\n\t\t$fields = [];\n\n\t\tif ($this->groupId)\n\t\t{\n\t\t\t$fields['GROUP_ID'] = $this->groupId;\n\t\t}\n\n\t\tif ($this->name)\n\t\t{\n\t\t\t$fields['NAME'] = $this->name;\n\t\t}\n\n\t\tif ($this->sort !== null)\n\t\t{\n\t\t\t$fields['SORT'] = $this->sort;\n\t\t}\n\n\t\tif ($this->modifiedBy)\n\t\t{\n\t\t\t$fields['MODIFIED_BY'] = $this->modifiedBy;\n\t\t}\n\n\t\tif ($this->dateStart)\n\t\t{\n\t\t\t$fields['DATE_START'] = $this->dateStart;\n\t\t}\n\n\t\tif ($this->dateEnd)\n\t\t{\n\t\t\t$fields['DATE_END'] = $this->dateEnd;\n\t\t}\n\n\t\tif ($this->status)\n\t\t{\n\t\t\t$fields['STATUS'] = $this->status;\n\t\t}\n\n\t\tif ($this->info)\n\t\t{\n\t\t\t$fields['INFO'] = $this->info;\n\t\t}\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "a422008da14d287d7329afff0ea431b0", "score": "0.4521477", "text": "function saveEvent() {\n\t\n\t\t$isNewEvent = !(isset($this->event_id) && $this->event_id != 0);\n\t\t$id = $isNewEvent ? 0 : $this->event_id;\n\t\t\n\t\t// (1) CHECK PERMISSIONS\n\t\t\n\t\t// Creating new event\n\t\tif ($isNewEvent) {\n if (!$this->allow_addentries) return $this->permissionDenied(); \n\n\n\t\t// Modifying existing event\n\t\t} else {\n\t\t\t$res = $this->query(\"SELECT creator FROM $this->table_calendar WHERE id=$id\");\n\t\t\tif ($res->num_rows != 1) $this->fatalError(\"The entry does not exist!\");\n\t\t\t$row = $res->fetch_assoc();\n\t\t\t$allow_edit = (($this->allow_editownentries && $row['creator'] == $this->login_identifier) || $this->allow_editothersentries);\n\t\t\tif (!$allow_edit){ return $this->permissionDenied(); }\n\t\t}\n\t\t\t\t\n if (empty($_POST)) {\n $this->logError(\"Ankom siden med tom POST-array... Kanskje refresha siden?\");\n $this->redirect($this->generateURL(''));\n }\n\n\t\t// (2) PARSE INPUT\n\t\t\n //if ($this->show_responsible) $responsible = $_POST['cal_responsible'];\n\n\t\t$creator = $this->login_identifier;\n\t\t$subject = addslashes(strip_tags($_POST['cal_subject']));\n\t\t$location = addslashes(stripslashes($_POST['cal_location']));\n\t\t$slug = addslashes($_POST['cal_slug']);\n\t\t$calendarId = intval($_POST['cal_calendar']);\n\t\t$isprivate = (isset($_POST['cal_private']) && ($_POST['cal_private'] == 'on')) ? 1 : 0;\n\t\t$startdate = $this->parseDateTimeFromPOST('startdate');\n\t\t$startdate_unix = strtotime($startdate);\n\t\t$enddate = $this->parseDateTimeFromPOST('enddate');\n\t\t$enddate_unix = strtotime($enddate);\n\t\t$responsible = addslashes(strip_tags($_POST['authors']));\n\t\t\n\t\t$lead = addslashes(strip_tags($_POST['cal_lead']));\n\t\t$lead = str_replace(\"\\r\\n\",\"\\n\",$lead);\n\t\t$lead = str_replace(\"\\r\",\"\\n\",$lead);\n\n\t\t$body = addslashes($_POST['cal_body']);\n\t\t$body = str_replace(\"\\r\\n\",\"\\n\",$body);\n\t\t$body = str_replace(\"\\r\",\"\\n\",$body);\n\t\t\n\t\t// (3) VALIDATE\n\t\t\n\t\t$errors = array();\n\t\t\t\t\n\t\tif (empty($subject)) $errors[] = 'cal_subject';\t\t\n\t\tif (empty($location)) $errors[] = 'cal_location';\n\t\t\n\t\tif (empty($responsible)) $errors[] = 'cal_responsible';\n\n\t\tif ($startdate_unix > $enddate_unix){ $errors[] = 'startdate'; $errors[] = 'enddate'; }\t\n\n\t\tif (empty($slug)) {\n\t\t\t$errors[] = 'cal_slug';\n\t\t} else {\n\n\t\t\t$slug = mb_strtolower($slug,'UTF-8');\n\t\t\t$slug = str_replace(array(\"ø\",\"æ\",\"å\",\" \",\"--\"),array(\"o\",\"ae\",\"a\",\"-\",\"-\"),$slug);\t\n\t\t\t$slug = preg_replace('/[^\\w-]/','',$slug);\n\t\t\t$slug = trim($slug,\"-\");\n\t\t\t$try_no = 1;\n\t\t\t$orig_slug = $slug;\n\t\t\t$duplicate = true;\n\t\t\t$year = date('Y',$startdate_unix);\n\t\t\twhile ($duplicate) {\n\t\t\t\t$res2 = $this->query(\"SELECT id,slug FROM $this->table_calendar \n\t\t\t\tWHERE slug=\\\"\".addslashes($slug).\"\\\" AND YEAR(dt_start)=\\\"$year\\\" AND id!=\\\"$id\\\"\");\n\t\t\t\tif ($res2->num_rows > 0) {\n\t\t\t\t\t$slug = $orig_slug.'-'.($try_no++);\n\t\t\t\t\t$duplicate = true;\n\t\t\t\t} else {\n\t\t\t\t\t$duplicate = false;\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$res = $this->query(\"SELECT id \n\t\t\t\t\tFROM $this->table_calendar\n\t\t\t\t\tWHERE YEAR(dt_start)=\\\"$year\\\" AND slug=\\\"$slug\\\"\");\n\t\t\tif ($res->num_rows > 0) {\n\t\t\t\t$row = $res->fetch_assoc();\n\t\t\t\tif (intval($row['id']) != $id) $errors[] = 'cal_slug';\n\t\t\t}\t\n\t\t}\n\t\t\n\t\tif (count($errors) > 0) {\n\t\t\t$_SESSION['errors'] = array_unique($errors);\n\t\t\t$_SESSION['postdata'] = $_POST;\n\t\t\tif ($isNewEvent) $url = $this->generateURL(\"action=newEvent\"); \n\t\t\telse $url = $this->generateURL(\"action=editEvent\"); \n\t\t\t$this->redirect($url,\n\t\t\t\t\"Hendelsen ble ikke lagret pga. en eller flere feil. Sjekk verdien/-e i feltet/-ene markert med rødt og prøv å lagre igjen.\",\n\t\t\t\t\"error\"\n\t\t\t\t);\n\t\t}\n\t\t\n\t\t\n\t\t// (4) GET ID OF THE LOCATION\n\t\t\n\t\t$res = $this->query(\"SELECT id FROM $this->table_locations WHERE caption = \\\"$location\\\"\");\n\t\tif ($res->num_rows == 1){\n\t\t\t$row = $res->fetch_array();\n\t\t\t$locationId = intval($row[0]);\n\t\t} else {\n\t\t\t$this->query(\"INSERT INTO $this->table_locations (caption) VALUES (\\\"$location\\\")\");\n\t\t\t$locationId = $this->insert_id();\n\t\t}\n\t\t\n\t\t// (5) SAVE TO DB\n\t\t\n\t\tif ($isNewEvent){\n\t\t\t\n\t\t\t$res = $this->query(\"INSERT INTO $this->table_calendar \n\t\t\t\t(\n\t\t\t\t\tcaption, location_id, calendar_id, dt_start, dt_end, lead, \n\t\t\t\t\tbody, slug, lastmodified, creator, responsible, private\n\t\t\t\t) VALUES (\n\t\t\t\t\t\\\"$subject\\\", $locationId, $calendarId, \\\"$startdate\\\", \\\"$enddate\\\", \\\"$lead\\\", \n\t\t\t\t\t\\\"$body\\\", \\\"$slug\\\", NOW(), $creator, \\\"$responsible\\\", $isprivate\n\t\t\t\t)\"\n\t\t\t);\n\t\t\tif (!$res) {\n\t\t\t\tprint \"database insert error\";\n\t\t\t}\n\t\t\t$this->event_id = $this->insert_id();\n\t\t\t\n\t\t\t$url = $this->generateCoolURL(\"/$year/$slug\");\n\t\t\t$this->addToActivityLog(\"opprettet hendelsen <a href=\\\"\".$url.\"\\\">$subject</a>\",false,'major');\n\n $this->subscribeToThread(false);\n\n\t\t\t$this->redirect($url,\"Hendelsen er opprettet.\");\n\n\t\t} else {\n\n\t\t\t$this->query(\"UPDATE $this->table_calendar \n\t\t\t\tSET\n\t\t\t\t\tcaption \t\t= \\\"$subject\\\",\n\t\t\t\t\tlocation_id\t\t= $locationId,\n\t\t\t\t\tcalendar_id\t\t= $calendarId,\n\t\t\t\t\tdt_start\t\t= \\\"$startdate\\\",\n\t\t\t\t\tdt_end \t\t\t= \\\"$enddate\\\",\n\t\t\t\t\tlead\t\t\t= \\\"$lead\\\",\n\t\t\t\t\tbody\t\t\t= \\\"$body\\\",\n\t\t\t\t\tslug \t\t\t= \\\"$slug\\\",\n\t\t\t\t\tlastmodified \t= NOW(),\n\t\t\t\t\tresponsible\t\t= \\\"$responsible\\\",\n\t\t\t\t\tprivate \t\t= $isprivate\n\t\t\t\tWHERE id = $id\"\n\t\t\t);\n\n\t\t\t$url = $this->generateCoolURL(\"/$year/$slug\");\n\t\t\t$this->addToActivityLog(\"oppdaterte hendelsen <a href=\\\"\".$url.\"\\\">$subject</a>\",true,'update');\n\t\t\t$this->redirect($url,\"Hendelsen er lagret.\");\n\t\t\n\t\t} \n\t\t\n\t}", "title": "" }, { "docid": "bad8288f4c7b285b2e4983b300e9d03d", "score": "0.4520632", "text": "public function init() {\n\t\t$gstrtranslate =Zend_Registry::get('Zend_Translate');\n\t\t\t\n\t\t$month= date(\"m\"); // Month value\n\t\t$day= date(\"d\"); //today's date\n\t\t$year= date(\"Y\"); // Year value\n\t\t$yesterdaydate= date('Y-m-d', mktime(0,0,0,$month,($day),$year));\n\t\t$joiningdate = \"{max:'$yesterdaydate',datePattern:'dd-MM-yyyy'}\";\n\n\n\t\t\t\n\t\t$IdCourseTypeDetails = new Zend_Form_Element_Hidden('IdCourseTypeDetails');\n\t\t$IdCourseTypeDetails->removeDecorator(\"DtDdWrapper\");\n\t\t$IdCourseTypeDetails->removeDecorator(\"Label\");\n\t\t$IdCourseTypeDetails->removeDecorator('HtmlTag');\n\n\t\t$IdCourseType = new Zend_Dojo_Form_Element_FilteringSelect('IdCourseType');\n\t\t$IdCourseType->removeDecorator(\"DtDdWrapper\");\n\t\t$IdCourseType->setAttrib('required',\"true\") ;\n\t\t$IdCourseType->removeDecorator(\"Label\");\n\t\t$IdCourseType->removeDecorator('HtmlTag');\n\t\t$IdCourseType->setRegisterInArrayValidator(false);\n\t\t$IdCourseType->setAttrib('dojoType',\"dijit.form.FilteringSelect\");\n\n\t\t$ComponentName = new Zend_Form_Element_Text('ComponentName');\n\t\t$ComponentName->setAttrib('dojoType',\"dijit.form.ValidationTextBox\");\n\t\t$ComponentName->setAttrib('required',\"true\")\n\t\t->setAttrib('maxlength','50')\n\t\t->removeDecorator(\"DtDdWrapper\")\n\t\t->removeDecorator(\"Label\")\n\t\t->removeDecorator('HtmlTag');\n\n\n\t\t$Description = new Zend_Form_Element_Text('Description');\n\t\t$Description->setAttrib('dojoType',\"dijit.form.ValidationTextBox\");\n\t\t$Description->setAttrib('required',\"true\")\n\t\t->setAttrib('maxlength','200')\n\t\t->removeDecorator(\"DtDdWrapper\")\n\t\t->removeDecorator(\"Label\")\n\t\t->removeDecorator('HtmlTag');\n\n\t\t$UpdDate = new Zend_Form_Element_Hidden('UpdDate');\n\t\t$UpdDate->removeDecorator(\"DtDdWrapper\");\n\t\t$UpdDate->removeDecorator(\"Label\");\n\t\t$UpdDate->removeDecorator('HtmlTag');\n\n\t\t$UpdUser = new Zend_Form_Element_Hidden('UpdUser');\n\t\t$UpdUser->removeDecorator(\"DtDdWrapper\");\n\t\t$UpdUser->removeDecorator(\"Label\");\n\t\t$UpdUser->removeDecorator('HtmlTag');\n\n\t\t\t\n\t\t$Active = new Zend_Form_Element_Checkbox('Active');\n\t\t$Active-> setAttrib('dojoType',\"dijit.form.CheckBox\")\n\t\t->setChecked(true)\n\t\t->removeDecorator(\"DtDdWrapper\")\n\t\t->removeDecorator(\"Label\")\n\t\t->removeDecorator('HtmlTag');\n\t\t\t\n\t\t$Add = new Zend_Form_Element_Button('Add');\n\t\t$Add->setAttrib('class', 'NormalBtn');\n\t\t$Add->setAttrib('dojoType',\"dijit.form.Button\");\n\t\t$Add->setAttrib('OnClick', 'addCourseTypeDetails()')\n\t\t->removeDecorator(\"Label\")\n\t\t->removeDecorator(\"DtDdWrapper\")\n\t\t->removeDecorator('HtmlTag');\n\n\t\t$Save = new Zend_Form_Element_Submit('Save');\n\t\t$Save->dojotype=\"dijit.form.Button\";\n\t\t$Save->label = $gstrtranslate->_(\"Save\");\n\t\t$Save->removeDecorator(\"DtDdWrapper\");\n\t\t$Save->removeDecorator(\"Label\");\n\t\t$Save->removeDecorator('HtmlTag')\n\t\t->class = \"NormalBtn\";\n\t\t\t\n\n\t\t\t\n\t\t$clear = new Zend_Form_Element_Button('Clear');\n\t\t$clear->setAttrib('class', 'NormalBtn');\n\t\t$clear->setAttrib('dojoType',\"dijit.form.Button\");\n\t\t$clear->label = $gstrtranslate->_(\"Clear\");\n\t\t$clear->setAttrib('OnClick', 'clearpageAdd()');\n\t\t$clear->removeDecorator(\"Label\")\n\t\t->removeDecorator(\"DtDdWrapper\")\n\t\t->removeDecorator('HtmlTag');\n\n\t\t//form elements\n\t\t$this->addElements(array(\n\t\t\t\t$IdCourseTypeDetails,\n\t\t\t\t$IdCourseType,\n\t\t\t\t$ComponentName,\n\t\t\t\t$Description,\n\t\t\t\t$UpdDate,\n\t\t\t\t$UpdUser,\n\t\t\t\t$Active,\n\t\t\t\t$Add,\n\t\t\t\t$Save,\n\t\t\t\t$clear\n\t\t));\n\n\t}", "title": "" }, { "docid": "64348c9d1ebb53ebb3735741e211afdf", "score": "0.4520263", "text": "public function getFechaFinFormAttribute(){\n \n //guardamos el valor del atributo en una variable\n $fecha_de_finalizacion = $this->attributes['fecha_fin'];\n \n if( !empty( $fecha_de_finalizacion ) ){\n $fecha_de_finalizacion = Carbon::parse($fecha_de_finalizacion);\n $fecha_de_finalizacion = $fecha_de_finalizacion->format('d-m-Y');\n }else{\n $fecha_de_finalizacion = null;\n }\n \n \n //devolvemos el valor del attributo ya tratado\n return $fecha_de_finalizacion;\n }", "title": "" }, { "docid": "6914234a21f13fdff842642b4c90df44", "score": "0.4520014", "text": "function get_entry_datos_fields($entry) {\n\t\t$form_id = $entry->forms_id;\n\t\t$entry_id = $entry->entry_id;\n\t\t\n\t\t//Obtenemos el form al cual pertenece la entrada\n\t\t$form = $this->get_form_by_id($form_id);\n\t\t$grupo_fields_id = $form->grupos_fields_id;\n\t\t\n\t\t//Obtenemos el conjunto de fields asociados al grupo de fields\n\t\t$fields = $this->get_fields_grupo_fields($grupo_fields_id);\n\t\t\n\t\tif( !is_null($fields) ) {\n\t\t\tforeach ($fields as $field) {\n\t\t\t\t//Buscamos los campos custom para el formulario\n\t\t\t\tif($f = in_object(\"field_id_\" . $field['fields_id'], $entry)) {\n\t\t\t\t\t$campos[$f]['atributos'] = array(\n\t\t\t\t\t\t'value' => $entry->$f,\n\t\t\t\t 'class' => 'text span5',\n\t\t\t\t 'id' => $entry->$f\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Seteamos los campos comunes a todos los forms\n\t\t$campos['titulo']['atributos'] = array(\n\t\t\t\t\t'value' => $entry->titulo,\n\t\t\t 'class' => 'text span5',\n\t\t\t 'id' => 'titulo'\n\t\t);\n\t\t\n\t\tif(isset($campos)) {\n\t\t\treturn $campos;\n\t\t} else {\n\t\t\treturn NULL;\n\t\t}\n\t}", "title": "" }, { "docid": "325ce8804a42ff25f55c5a607dd5367a", "score": "0.45198798", "text": "public function getcustomdatesAction() {\n\n $request = $this->getRequest();\n\n if ($request->isPost()) {\n $startDate = $this->getRequest()->getPost('startDate');\n $endDate = $this->getRequest()->getPost('endDate');\n\n $json = $this->buildJson($startDate, $endDate);\n\n return $json;\n } else {\n return $this->redirect()->toRoute('home');\n }\n }", "title": "" }, { "docid": "2084e8f36de206f7b669793bb2b03c18", "score": "0.451866", "text": "public function getDataForEntity()\n {\n }", "title": "" }, { "docid": "6bec13926fe44da549708910229ced62", "score": "0.45186117", "text": "public function buildSchemaArray()\n {\n $array = parent::buildSchemaArray();\n if ($dayOfWeek = $this->DayOfWeek) {\n if (strpos($dayOfWeek, ',') !== false) {\n $array['dayOfWeek'] = explode(',', $dayOfWeek);\n } else {\n $array['dayOfWeek'] = \"$this->ContactOption\";\n }\n }\n if ($this->Opens) {\n $array['opens'] = \"$this->Opens\";\n }\n if ($this->Closes) {\n $array['closes'] = \"$this->Closes\";\n }\n if ($this->ValidFrom) {\n $array['validFrom'] = \"$this->ValidFrom\";\n }\n if ($this->ValidThrough) {\n $array['ValidThrough'] = \"$this->ValidThrough\";\n }\n return $array;\n }", "title": "" }, { "docid": "07bcb5829dd6b07a22b1b6e83fa98c39", "score": "0.45178083", "text": "public function getEndDate() { return $this->data['endDate']; }", "title": "" }, { "docid": "2f5589d540e8bf5809dbfa26f6906028", "score": "0.45175627", "text": "function mb_dados_evento_cb() {\n global $post;\n // captura os dados para o value do formulário\n $data_inicial = get_post_meta($post->ID, 'data_inicial', true);\n $data_final = get_post_meta($post->ID, 'data_final', true);\n $hora_inicial = get_post_meta($post->ID, 'hora_inicial', true);\n $hora_final = get_post_meta($post->ID, 'hora_final', true);\n $endereco = get_post_meta($post->ID, 'endereco', true);\n // adc campos ao formulário\n require ('formulario_evento.php');\n}", "title": "" }, { "docid": "158bf0b0a8644252d7a2941c6663cde2", "score": "0.45140025", "text": "public function getSaveFields()\n {\n\n return array\n (\n 'wbfsys_issue' => array\n (\n 'title',\n 'id_type',\n 'id_category',\n 'id_status',\n 'id_severity',\n 'id_os',\n 'id_priority',\n 'id_browser',\n 'id_revision',\n 'id_finish_revision',\n 'flag_hidden',\n 'finish_till',\n 'id_responsible',\n 'progress',\n 'vid',\n 'description',\n 'error_message',\n 'id_vid_entity',\n 'm_version',\n ),\n\n );\n\n }", "title": "" }, { "docid": "3cb42aab968a941a3c352295261b6ca8", "score": "0.45091522", "text": "protected function _updateSpecificFields(){\r\n\t}", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.4509107", "text": "abstract public function getFields();", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.4509107", "text": "abstract public function getFields();", "title": "" }, { "docid": "782e1602d97ac45bb0d09e1b0a024833", "score": "0.45067683", "text": "abstract protected function get_custom_fields();", "title": "" }, { "docid": "6e742a4e05f51737b528e25c07be90bc", "score": "0.4506254", "text": "public function getBirthdate(){\r\n return $this->birthdate;\r\n}", "title": "" }, { "docid": "71afad744a62c3a2f4100f208643f595", "score": "0.450442", "text": "function get_fields_from_post(){\n\t\t$this->name=htmlentities($_POST[$this->ddbb_name]);\n\t\t$this->name_web=htmlentities($_POST[$this->ddbb_name_web]);\n\t\t$this->descrip=htmlentities($_POST[$this->ddbb_descrip]);\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "d8b804ed150a9c52a1720e8c43745eca", "score": "0.45003676", "text": "public function savecalificacion_post(){\n $datos=$this->POST();\n // obtengo los datos del cuestionario\n $_datos_cuestionario=$this->Model_Cuestionarios->get_id($datos[\"IDCuestionario\"]);\n //ahora guardo la calificacion\n $_ID_Valora=$this->Model_Cuestionarios->save_calificacion(\n $datos[\"IDCuestionario\"],\n $datos[\"empresa\"],\n $_datos_cuestionario[\"IDEmpresa\"],\n $datos[\"empresa\"]\n );\n $promedio=$this->Model_Cuestionarios->adddetallecalificacion($datos[\"cuestionario\"],$_ID_Valora);\n $this->Model_Cuestionarios->modpromedio($promedio,$_ID_Valora);\n // ahora cambio de pendiente a contestado\n $this->Model_Cuestionarios->update_status($datos[\"empresa\"],$datos[\"IDUsuario\"],$datos[\"IDCuestionario\"],$_ID_Valora);\n\n\t\t$data=array(\"pass\"=>1,\"mensaje\"=>\"ok\");\n $this->response($data, 200);\n }", "title": "" }, { "docid": "e7765085b50c062d170e9f17fc51d8ac", "score": "0.4495073", "text": "private function editCalendar() {\n // get input variables and check them\n if (filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'POST') {\n $request = json_decode(file_get_contents(\"php://input\"), true);\n \n $id = $this->normalizeParam($request['id']);\n $idcalendar = $this->normalizeParam($request['idcalendar']);\n $key = $this->normalizeParam($request['key']);\n $nom = $this->normalizeParam($request['nom']);\n $nom_curt = $this->normalizeParam($request['nom_curt']);\n }\n else {\n $id = $this->normalizeParam(filter_input(INPUT_GET, 'id'));\n $idcalendar = $this->normalizeParam(filter_input(INPUT_GET, 'idcalendar'));\n $key = $this->normalizeParam(filter_input(INPUT_GET, 'key'));\n $nom = $this->normalizeParam(filter_input(INPUT_GET, 'nom'));\n $nom_curt = $this->normalizeParam(filter_input(INPUT_GET, 'nom_curt'));\n }\n \n if (($id == '') || (!is_numeric($id))) {\n return $this->stringReplace($this->conf->errParamNotFound, 'id');\n }\n if ($idcalendar == '') {\n return $this->stringReplace($this->conf->errParamNotFound, 'idcalendar');\n }\n if ($key == '') {\n return $this->stringReplace($this->conf->errParamNotFound, 'key');\n }\n if ($nom == '') {\n return $this->stringReplace($this->conf->errParamNotFound, 'nom');\n }\n if ($nom_curt == '') {\n return $this->stringReplace($this->conf->errParamNotFound, 'nom_curt');\n }\n\n // connect to database\n $idcon = $this->getConnection();\n if ($this->error <> '') {\n return $this->error;\n }\n\n // find record\n $sql = 'select * from '.$this->conf->dbprefix.'calendaris where id = '.$id;\n $res = $idcon->query( $sql );\n \n $rows = $res->num_rows;\n \n // if not record exists, error\n if ($rows == 0) {\n $ret = $this->stringReplace($this->conf->errRecordNotExists, array('calendaris', $rows));\n } \n else {\n // edit record\n $sql = 'update '.$this->conf->dbprefix.'calendaris set idcalendar = \\''.$idcalendar.'\\', `key` = \\''.$key.'\\', nom = \\''.$nom.'\\', nom_curt = \\''.$nom_curt.'\\' where id = '.$id;\n $res = $idcon->query( $sql );\n $ret = array(\n 'master' => $res->num_rows,\n 'id' => $id\n );\n }\n return $ret;\n }", "title": "" }, { "docid": "f127b5a1d0ecb860ccb6f5437617de84", "score": "0.44908303", "text": "public function saveHoliday(Holiday $holiday) {\n\n try {\n $holiday->save();\n return $holiday;\n } catch (Exception $e) {\n throw new DaoException($e->getMessage());\n }\n }", "title": "" } ]
54b7150d9ad194eaa5f002836fd4e8ca
Run service for lead
[ { "docid": "9613f65f9cc00e63857d9485208bbee8", "score": "0.0", "text": "public function run(array $lead): SubscriptionResult;", "title": "" } ]
[ { "docid": "f90b311d88d6cc0c18d811d1871c7472", "score": "0.6704416", "text": "public function run()\n {\n $services = [\n 'Wi-fi',\n 'Cucina',\n 'Riscaldamento',\n 'Aria condizionata',\n 'Lavatrice',\n 'Asciugatrice',\n 'Posto auto',\n 'Colazione',\n 'Camino',\n 'Ferro da stiro',\n 'Phon',\n 'Spazio di lavoro dedicato',\n 'TV',\n 'Cassaforte',\n 'Culla',\n 'Seggiolone',\n 'Self check-in',\n 'Allarme antincendio',\n 'Rivelatore di monossido di carbonio',\n 'Bagno privato',\n 'Lungo la spiaggia',\n 'Accesso diretto alle piste da sci'\n ];\n\n foreach ($services as $service) {\n $newService = new Service();\n\n $newService->name = $service;\n $newService->slug = Str::slug($service, '-');\n\n $newService->save();\n }\n }", "title": "" }, { "docid": "b64e81294869b9aa091fc5818b12c59b", "score": "0.65994775", "text": "public function run()\n {\n $services = array(\n 'Ramp Services ',\n );\n\n foreach ($services as $service) {\n \\App\\Service::create(array(\n 'service' => $service,\n 'department' => 1,\n 'carrierId' => 1\n ));\n }\n $AFS = array('PARKING BAY ESTABLISHED & CHECKED (FOD)',\n 'EQUIPMENT READY AT PARKING BAY (within ERA)',\n 'MANPOWER READY AT PARKING BAY',\n 'AIRCRAFT ON CHOCKS & CONES CORRECTLY PLACED',\n 'PASSENGER STEP MARSHALLED & POSITIONED',\n 'MAIN-DECK LOADER MARSHALLED & POSITIONED',\n 'LOWER-DECK LOADER MARSHALLED & POSITIONED',\n 'CARGO HOLDS/SILLS & BARRIER NETS CHECKED',\n 'OFFLOADING COMMENCES',\n 'TRANSIT UNITS ONBOARD CHECKED (where applicable)',\n 'IMPORT UNITS INSPECTED & RELEASED TO WAREHOUSE',\n 'LIR RECEIVED ON TIME',\n 'ALL JOINING CARGO/MAIL UNITS ON RAMP ON TIME',\n 'ULDS CONDITION CHECKED/PALLET CONTOURS CHECKED',\n 'DGR PROPERLY BUILT & LABELED (where applicable)',\n 'REGULATIONS ON SPECIAL CARGO CHECKED',\n 'GSE GUIDE RAILS, GUARD RAILS & HAND RAILS CHECKED',\n 'LOADING COMMENCED & COMPLETED',\n 'CATERING COMPLETED ON TIME',\n 'FLIGHT CREW ARRIVED ON TIME',\n 'FUELING COMPLETED ON TIME',\n 'ALL RESTRAINTS (LOCKS & NETS) PROPERLY SECURED',\n 'HOLD DOORS CLOSED & CHECKED',\n 'FLIGHT DOCUMENTS DELIVERED ON TIME',\n 'PASSENGER DOOR CLOSED',\n 'AIRCRAFT CLEARED OF ALL SERVICE & LOADING GSE',\n 'PUSH BACK TUG POSITONED ON TIME',\n 'WALK AROUND CHECKS PERFORMED BEFORE PUSH-OUT',\n 'FLIGHT PUSHED OUT ON TIME',\n 'POST-DEPARTURE MESSAGES DISPATCHED ON TIME',\n 'AIRCRAFT LOADED',\n );\n $tasks = array(\n array('serviceId' => '1', 'task' => 'Position Passenger Steps', 'timed' => 1),\n array('serviceId' => '1', 'task' => 'Supply Power', 'timed' => 0),\n array('serviceId' => '1', 'task' => 'Unload AFT Lower Deck', 'timed' => 1),\n array('serviceId' => '1', 'task' => 'Unload Main Deck', 'timed' => 1),\n array('serviceId' => '1', 'task' => 'Service Lavatories', 'timed' => 1),\n array('serviceId' => '1', 'task' => 'Service Galleys', 'timed' => 1),\n array('serviceId' => '1', 'task' => 'Service Cabin', 'timed' => 1),\n array('serviceId' => '1', 'task' => 'Service Potable Water', 'timed' => 1),\n array('serviceId' => '1', 'task' => 'Unload FWD Lower Lobe', 'timed' => 1),\n array('serviceId' => '1', 'task' => 'Load Main Deck Cargo', 'timed' => 1),\n array('serviceId' => '1', 'task' => 'Load FWD Lower Lobe', 'timed' => 1),\n array('serviceId' => '1', 'task' => 'Power Supply Removal', 'timed' => 0),\n array('serviceId' => '1', 'task' => 'Remove Steps', 'timed' => 1),\n array('serviceId' => '1', 'task' => 'PushBack', 'timed' => 1),\n );\n /*\n foreach ($tasks as $task) {\n \\App\\Task::create($task);\n }\n */\n foreach ($AFS as $task) {\n \\App\\Task::create(array(\n 'task' => $task,\n 'serviceId' => 1,\n 'timed' => 1\n ));\n }\n\n }", "title": "" }, { "docid": "ad09d53484bbe377733356300c863406", "score": "0.6525454", "text": "public function run() \n {\n Service::unguard();\n \n $keys = [\n ['key' => 'products', 'base_url' => 'http://localhost:5020/api'], \n ['key' => 'accounts', 'base_url' => 'http://localhost:5060/v1/api']\n ];\n foreach ($keys as $s){\n $service = Service::create($s); \n }\n Service::reguard();\n }", "title": "" }, { "docid": "dea945ea7487dd7c1bc684dfcc3fce65", "score": "0.64483863", "text": "public function run()\n {\n $Services = [\n 'Web or Mobile Apps Development',\n 'Hire Dedicated Developers',\n 'AI/ML Development Services',\n 'Custom Software Development',\n 'Software Testing and QA',\n 'API Development & Integration'\n ];\n foreach ($Services as $Service) {\n $check_service = Service::where('name', $Service)->first();\n if (!$check_service) {\n Service::create(['name' => $Service]);\n }\n }\n }", "title": "" }, { "docid": "c74995d84a739efa658ba8332fbf12b7", "score": "0.6427479", "text": "public function run()\n {\n $service_points = ['CCC', 'Pharmacy', 'LAB', 'Maternity', 'Injection Room', 'Dressing Room', 'TB Clinic',\n 'MCH', 'Diabetic Clinic'\n , 'Youth Friendly Services'];\n\n foreach ($service_points as $service_point) {\n ServicePoint::create(\n [\n 'name' => $service_point\n ]);\n }\n }", "title": "" }, { "docid": "168f126c730f2825383a95a87987a98e", "score": "0.6239118", "text": "public function run()\n {\n $services = [\n [\n 'name' => 'CCTV Camera',\n 'description' => ' closed-circuit television camera can produce images or \n recordings for surveillance or other private purposes. Cameras can be either video \n cameras, or digital stills cameras. Walter Bruch was the inventor of the CCTV camera.\n The main purpose of a CCTV camera is to capture light and convert it into a video signal',\n ],\n\n [\n 'name' => 'Access Control',\n 'description' => 'Access control is a way of limiting access to \n a system or to physical or virtual resources. In computing, access control\n is a process by which users are granted access and certain privileges to systems, \n resources or information.,'\n ],\n \n [\n 'name' => 'Fire Alarm',\n 'description' => 'A fire alarm system has a number o\n f devices working together to detect and warn people through \n visual and audio appliances when smoke, fire, carbon',\n ],\n [\n 'name' => 'Biometric',\n 'description' => 'Biometrics is the technical term for\n body measurements and calculations. It refers to metrics related to human characteristics. Biometrics authentication\n (or realistic authentication) is used in computer science as a form of identification and access control.',\n ],\n [\n 'name' => 'Intercom',\n 'description' => 'We make customer messaging apps for sales, marketing, \n and support, connected on one platform. Our mission is to make business personal again',\n ],\n [\n 'name' => 'Plumbers',\n 'description' => 'A plumber is tradesperson who specializes in \n installing and maintaining systems used for potable (drinking) water, sewage and drainage in plumbing systems.',\n ],\n [\n 'name' => 'House Renting',\n 'description' => 'A property from which the owner receives payment from the occupant(s),\n known as tenants, in return for occupying or using the property. Rental properties may be either residential or commercial.\n The owner of rental property may be allowed to take certain tax deductions such as mortgage interest and depreciation',\n ],\n \n ];\n\n foreach ($services as $service) {\n $service = new Service($service);\n $service->slug = str_slug($service->name);\n $service->save();\n }\n }", "title": "" }, { "docid": "1c1203af38f118c8fd301a949c56427f", "score": "0.6237194", "text": "public function run()\n {\n Service::create([\n 'title'=>'IUMK',\n 'description'=>'Ijin Usaha Mikro Kecil'\n ]);\n\n Service::create([\n 'title'=>'Dispensasi Nikah',\n 'description'=>'Dispensasi Untuk Keperluan Nikah'\n ]);\n }", "title": "" }, { "docid": "26577c4991b0dc00bf2c2911707565c2", "score": "0.61553836", "text": "abstract public function run() : ServiceInterface;", "title": "" }, { "docid": "239fc4de93b89665b45f83240c095fe6", "score": "0.61205155", "text": "public function run()\n {\n Microservice::insert([\n [\n 'name' => 'Microservice A',\n 'url' => 'http://service-a.localhost/',\n ],\n [\n 'name' => 'Microservice B',\n 'url' => 'http://service-b.localhost/',\n ],\n [\n 'name' => 'Microservice C',\n 'url' => 'http://service-c.localhost/',\n ],\n ]);\n }", "title": "" }, { "docid": "78ebbf36814caa2a84ea745db261a874", "score": "0.61161494", "text": "public function run()\n {\n $pocService = Core::getService(MITOCWService::class);\n $pocService->seedPOC();\n }", "title": "" }, { "docid": "bb15e74235f14971586b9f5c651a8221", "score": "0.60446733", "text": "public function run()\n {\n\n $account = Account::create([\n 'name'=>'Broobe',\n 'description'=>'Broobe Account'\n ]);\n $service = Service::create([\n 'name'=>'Mercado libre',\n 'country_code' => 'AR',\n 'client_id'=>'1004963915532502',\n 'client_secret'=>'54z5lzdVeunz0yDF72I9k4PdLLYcxPlV',\n 'currency_code'=>'ARS',\n 'language_code'=>'es'\n ]);\n $services[$service->id] = ['token'=>'APP_USR-1004963915532502-070116-27c8c69cf0e0ff77df8dc5c393b95a44-298519686','refresh_token'=>'TG-60ba592f8e0a8200079ea1aa-298519686','status'=>1];\n\n $account->services()->sync($services);\n\n\n }", "title": "" }, { "docid": "cc648fa443e76a6e7596992f555001d7", "score": "0.6042255", "text": "public function run()\n {\n $service = new Service();\n $service->name = 'Asesoria Visa Americana';\n $service->price = 180.000;\n $service->commission = 50.000;\n $service->save();\n\n $service = new Service();\n $service->name = 'Asesoria Visa Canada';\n $service->price = 280.000;\n $service->commission = 60.000;\n $service->save();\n\n $service = new Service();\n $service->name = 'Derecho Consular Visa Americana';\n $service->price = 700.000;\n $service->commission = 20.000;\n $service->save();\n\n $service = new Service();\n $service->name = 'Derecho Consular Visa Canadience';\n $service->price = 630.000;\n $service->commission = 20.000;\n $service->save();\n\n $service = new Service();\n $service->name = 'Cambio de Formularios';\n $service->price = 60.000;\n $service->commission = 10.000;\n $service->save();\n }", "title": "" }, { "docid": "474f12e859ac60b6ced1bb8f5f761ec1", "score": "0.59781635", "text": "public function run()\n {\n $services = config('data.services');\n\n foreach ($services['type'] as $service) {\n $newService = new Service();\n $newService->type = $service;\n $newService->save();\n }\n }", "title": "" }, { "docid": "fbfa5b60d5ad1c2e618b2ad00ddfb924", "score": "0.59502643", "text": "public function run()\n {\n app(AdminAccountService::class)->create();\n }", "title": "" }, { "docid": "bd7d7d696fafa74521bd596bbc0ba81f", "score": "0.59194505", "text": "public function run()\n {\n ServiceOrder::factory(5)->create();\n }", "title": "" }, { "docid": "72cbc884ca5541e02b810f067deca441", "score": "0.59029776", "text": "public function run()\n {\n $data = $this->getStatusServiceData();\n foreach($data as $key => $value){\n StatusService::create($value);\n }\n }", "title": "" }, { "docid": "cd16b4dd6f5fa946f1fa98986de44872", "score": "0.5897999", "text": "public function run()\n {\n $service = [\n [\n 'id' => 1,\n 'name' => 'Bimbingan Akademik',\n 'created_at' => '2020-04-10 12:08:28',\n 'updated_at' => '2020-04-10 12:08:28',\n ],\n [\n 'id' => 2,\n 'name' => 'Bimbingan Skripsi',\n 'created_at' => '2020-04-10 12:08:28',\n 'updated_at' => '2020-04-10 12:08:28',\n ],\n [\n 'id' => 3,\n 'name' => 'Bimbingan Magang',\n 'created_at' => '2020-04-10 12:08:28',\n 'updated_at' => '2020-04-10 12:08:28',\n ],\n [\n 'id' => 4,\n 'name' => 'Konseling Lainnya',\n 'created_at' => '2020-04-10 12:08:28',\n 'updated_at' => '2020-04-10 12:08:28',\n ],\n ];\n\n App\\Service::insert($service);\n }", "title": "" }, { "docid": "866ed03164624c8f4a59dddddb476b6d", "score": "0.58359236", "text": "public function run()\n {\n $servicesRepository = new \\App\\Repository\\ServicesRepository(app());\n $servicesRepository->create(['title'=>'Межевание','url'=>'land-surveying']);\n $servicesRepository->create(['title'=>'Технический план','url'=>'technical-plan']);\n $servicesRepository->create(['title'=>'Техническая инвентаризация','url'=>'technical-inventory']);\n }", "title": "" }, { "docid": "0c8343464f4f1db761eb9e395479e429", "score": "0.5821808", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\tLead::create(array(\n\t\t\t'job_id' => 1,\n\t\t\t'account_id' => 1,\n\t\t\t'name' => 'Test lead name',\n\t\t\t'date_of_birth' => '1990-12-23',\n\t\t));\n\n\t}", "title": "" }, { "docid": "48fdd19cddd6ce895f911f8ae425ca36", "score": "0.5821722", "text": "public function run()\n {\n Service::create([\n 'name'=>'اشتراك مجاني',\n 'consulted'=>'3',\n 'type'=>'مجاني',\n 'benefits'=>'تحصل علي خدمات عدية',\n 'price'=>0,\n 'day'=>3,\n ]);\n Service::create([\n 'name'=>'اشتراك اسبوعي',\n 'consulted'=>'30',\n 'type'=>'اسبوع',\n 'benefits'=>'تحصل علي خدمات عدية',\n 'price'=>10,\n 'day'=>7,\n ]);\n Service::create([\n 'name'=>'اشتراك شهري',\n 'consulted'=>'30',\n 'type'=>'شهري',\n 'benefits'=>'تحصل علي خدمات عدية',\n 'price'=>30,\n 'day'=>30,\n ]);\n }", "title": "" }, { "docid": "0ebf5fad0c123bba273abea975c10aa7", "score": "0.57773745", "text": "public function run()\n {\n $this->call(admin::class);\n $this->call(favorite_tour::class);\n $this->call(payment::class);\n $this->call(tour_info::class);\n $this->call(tour::class);\n $this->call(user::class);\n }", "title": "" }, { "docid": "5f10454e3890cf45102f94cf2d3b2bc2", "score": "0.57705283", "text": "public function run()\n {\n $services = ['Wi-Fi', 'Animali Permessi', 'Posto Macchina', 'Piscina', 'Portineria', 'Sauna', 'Vista Mare'];\n foreach($services as $service){\n DB::table('services')->insert([\n 'name' => $service,\n ]);\n }\n }", "title": "" }, { "docid": "e3b7244787398a7d3fd4774c6a14e40d", "score": "0.5764778", "text": "public function run()\n {\n factory(Service::class) -> times(1) -> create(['name' => 'wi-fi']);\n factory(Service::class) -> times(1) -> create(['name' => 'parking']);\n factory(Service::class) -> times(1) -> create(['name' => 'pool']);\n factory(Service::class) -> times(1) -> create(['name' => 'concierge']);\n factory(Service::class) -> times(1) -> create(['name' => 'sauna']);\n factory(Service::class) -> times(1) -> create(['name' => 'sea view']);\n \n\n }", "title": "" }, { "docid": "04a46d56d47cc089cfed4411d20e961f", "score": "0.5754812", "text": "public function run()\n { \n Service::truncate();\n\n for ($i=0; $i <= 4; $i++) { \n Service::create([\n 'slug' => $this->service_slug[$i],\n 'title' => $this->service_title[$i],\n 'url' => $this->service_url[$i],\n 'description' => $this->service_description,\n 'icon' => $this->service_icon[$i]\n ]);\n }\n }", "title": "" }, { "docid": "f9a0273c273ed49212a5cd2f0ebaea7d", "score": "0.5745837", "text": "public function run()\n {\n Service::create([\n 'nom' => \"Site vitrine\",\n 'description' => \"Sugar plum liquorice lollipop apple pie bonbon cupcake marzipan cookie lollipop. Wafer powder jujubes carrot cake oat cake. Muffin danish dessert biscuit topping gummi bears jelly-o chupa chups. Toffee topping gummies danish dessert. Cake ice cream liquorice marzipan dragée. Candy wafer pastry sweet roll cookie donut donut gummi bears caramels.\",\n 'image_service' => \"/image_service/1c075c31e8b96ed82cd095ef35bfce64_resultat.jpg\",\n 'categorie_services_id' => 1,\n ]);\n Service::create([\n 'nom' => \"Application android\",\n 'description' => \"Sugar plum liquorice lollipop apple pie bonbon cupcake marzipan cookie lollipop. Wafer powder jujubes carrot cake oat cake. Muffin danish dessert biscuit topping gummi bears jelly-o chupa chups. Toffee topping gummies danish dessert. Cake ice cream liquorice marzipan dragée. Candy wafer pastry sweet roll cookie donut donut gummi bears caramels.\",\n 'image_service' => \"/image_service/_60_color_picker_resultat.jpg\",\n 'categorie_services_id' => 2,\n ]);\n }", "title": "" }, { "docid": "50bafd78671978924bf6b52ead23d892", "score": "0.57122046", "text": "public function run()\n {\n // Create services\n factory(App\\Models\\Service::class, 500)->create();\n\n // Front user\n $data = [\n 'name' => 'Tester user',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n 'remember_token' => Str::random(10),\n ];\n\n App\\Models\\User::create($data);\n\n // Let's create 5 more users\n factory(App\\Models\\User::class, 5)->create();\n }", "title": "" }, { "docid": "26d9b4b18f39484ec94a2e84cb15b186", "score": "0.5693704", "text": "protected function startRun() : void\n {\n }", "title": "" }, { "docid": "26d9b4b18f39484ec94a2e84cb15b186", "score": "0.5693704", "text": "protected function startRun() : void\n {\n }", "title": "" }, { "docid": "b5c88772dd322223022090bf5cecb742", "score": "0.567042", "text": "public function run()\n {\n $this->call(DemoDepInformaticaSeeder::class);\n }", "title": "" }, { "docid": "ef1c8c18bd35fbc05ec8a2ea7b6285ce", "score": "0.56703967", "text": "static function deamon_start()\n {\n self::deamon_stop();\n $deamon_info = self::deamon_info();\n if ($deamon_info['launchable'] != 'ok') {\n SnipsUtils::logger('please check your configuration', 'error');\n }\n $cron = cron::byClassAndFunction('snips', 'deamon_hermes');\n if (!is_object($cron)) {\n $cron = SnipsUtils::create_task_cron();\n }\n $cron->run();\n }", "title": "" }, { "docid": "e29a153c62788c7e0297926b97c28f23", "score": "0.56359744", "text": "public function run()\n {\n $this->novo('Desafio Softcom', '[email protected]', 'softcom');\n }", "title": "" }, { "docid": "9a9f68c338449aa197ddd971f8d74ae5", "score": "0.56348896", "text": "public function run()\n {\n $devices_and_services = \\League\\Csv\\Reader::createFromPath(storage_path('imports/sams-new-services.csv'));\n $devices_and_services->setFlags(SplFileObject::READ_AHEAD|SplFileObject::SKIP_EMPTY);\n\n foreach ($devices_and_services as $index => $ds) {\n if ($index == 0) continue;\n $device = \\App\\Device::firstOrCreate([\n 'manufacturer' => $ds[5],\n 'model' => $ds[4],\n 'image' => str_slug($ds[4]) . '.png',\n 'level' => null\n ]);\n\n $service = \\App\\Service::firstOrCreate([\n 'name' => $ds[0]\n ]);\n\n $service->devices()->attach($device, ['price' => ($ds[2] * 100), 'upc' => $ds[3]]);\n }\n }", "title": "" }, { "docid": "d91a6573b1ed0f9d4affb404304d7410", "score": "0.56294596", "text": "public abstract function run($cronService);", "title": "" }, { "docid": "d305ba94036a5479c46b0e6b2aede477", "score": "0.5629335", "text": "public function index()\n\t{\n\t\t$this->our_services();\n\t}", "title": "" }, { "docid": "b41fece8c62fbcfe3482beb8390f7f2c", "score": "0.5626727", "text": "public function run()\n {\n factory(WatchLaterLesson::class, 5000)->create();\n }", "title": "" }, { "docid": "576e24d327306e415ac9dacca88adbf9", "score": "0.5620321", "text": "public function run()\n {\n $this->setupAdminUser();\n\n if (env('IS_STAGING')) {\n $this->setUpCompany();\n\n $this->setUpVendor();\n }\n }", "title": "" }, { "docid": "9b1b3cd1fa88c343af7b748c60eb1b93", "score": "0.56084687", "text": "public function start()\n {\n $this->doCall('start');\n }", "title": "" }, { "docid": "6d220cd1f7064c9971b9656a5a593737", "score": "0.560635", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(LaratrustSeeder::class);\n\n //Default administration\n $departement = Departement::factory()\n ->has(\n Service::factory()->count(1)\n ->has(\n Employee::factory()->count(1)\n ))->create();\n\n $departement->services[0]->employees[0]->attachRole('admin');\n }", "title": "" }, { "docid": "fedf0a20c46f85fba4f814a5db8f1aa6", "score": "0.5594724", "text": "public function start() {}", "title": "" }, { "docid": "51c534431e6035237b2425929ad7fcca", "score": "0.55830103", "text": "function startTest() {\n\t\t$this->Service =& new Service();\n\t}", "title": "" }, { "docid": "9bc05912d454bfbe33196b736df980bf", "score": "0.55822873", "text": "public function run() {\n\t\t$this->create_instances();\n\t\t$this->register_hooks();\n\t}", "title": "" }, { "docid": "1c2d0a08fb03796bf3888b474a468a33", "score": "0.55810124", "text": "public function run()\n {\n $s = new Service();\n $s->user_id = 1;\n $s->title = \"Babysitten\";\n $s->description = \"Ik heb wat tijd over en zou graag op jouw peuter passen! Ik ben dol op kinderen en dat zie je aan de prijs!\";\n $s->price = 5.50;\n $s->category_id = 7;\n $s->save();\n\n $s = new Service();\n $s->user_id = 2;\n $s->title = \"Allerhande klusjes\";\n $s->description = \"Nu ik gepensioneerd ben kan ik anderen helpen met klusjes in het huis. De grootste beloning voor mij is het sociaal contact\";\n $s->price = 2.50;\n $s->category_id = 5;\n $s->save();\n\n $s = new Service();\n $s->user_id = 3;\n $s->title = \"Wiskunde bijles\";\n $s->description = \"Ik keer volgend jaar terug naar school en zou graag mijn wiskunde wat verfrissen. Welke betere manier dan door anderen te onderwijzen?\";\n $s->price = 5.0;\n $s->category_id = 1;\n $s->save();\n\n Service::factory(5)->create();\n }", "title": "" }, { "docid": "d852ea6ead949d2fb469b8c3506befc4", "score": "0.55796665", "text": "public function run()\n {\n RoomService::factory(5)->create();\n }", "title": "" }, { "docid": "c7dacab683bab7c0ed0e4f27f5e87c22", "score": "0.555128", "text": "public function run()\n {\n \t$services = [\n \t\t['name' => 'Supervisión', 'slug' => 'service-1', 'photo' => 'supervision.jpg', 'description' => 'Hacemos una visita periódica para supervisar cualquier eventualidad', 'square_meter' => '0.35', 'state' => '1'],\n \t\t['name' => 'Cuidamos de tu Casa', 'slug' => 'service-2', 'photo' => 'cuidado.jpg', 'description' => 'Gestión y Tramitación de averías, puertas de acceso, vallado, terrazas, toldos, retiradas de escombros, etc.', 'square_meter' => '0.35', 'state' => '1'],\n \t\t['name' => 'Limpieza', 'slug' => 'service-3', 'photo' => 'limpieza.jpg', 'description' => 'Servicio de Lavandería y Limpieza. Nuestro equipo especializado se encargará de cubrir con la máxima calidad todas tus necesidades', 'square_meter' => '0.35', 'state' => '1'],\n \t\t['name' => 'Key Keepers', 'slug' => 'service-4', 'photo' => 'key.jpg', 'description' => 'Tenemos unas llaves de tu casa por todos esos imprevistos que puedan suceder cuando no estas o quizás se te hayan olvidado', 'square_meter' => '0.35', 'state' => '1'],\n \t\t['name' => 'Mantenimiento', 'slug' => 'service-5', 'photo' => 'mantenimiento.jpg', 'description' => 'Mantenimiento de jardín y piscina', 'square_meter' => '0.35', 'state' => '1']\n \t];\n \tDB::table('services')->insert($services);\n }", "title": "" }, { "docid": "9b680e2b2c55c46a2c6cfbe41c196d32", "score": "0.5547478", "text": "public static function main()\n {\n $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()\n ->build();\n\n // Construct an API session configured from an `adsapi_php.ini` file\n // and the OAuth2 credentials above.\n $session = (new AdManagerSessionBuilder())->fromFile()\n ->withOAuth2Credential($oAuth2Credential)\n ->build();\n\n self::runExample(\n new ServiceFactory(),\n $session,\n intval(self::LINE_ITEM_ID)\n );\n }", "title": "" }, { "docid": "5a6866b47e6a2bfef751385d09160170", "score": "0.55414766", "text": "public function run() {\n\t\t$this->admin = new Admin();\n\t\t$this->cli = new Cli();\n\t\t$this->api = new Api();\n\n\t\t$this->admin->hooks();\n\t\t$this->define_public_hooks();\n\t}", "title": "" }, { "docid": "c898d6504cbbcdc5e5f509870355503f", "score": "0.55398786", "text": "public function run()\n {\n // $this->call(CompanyTableSeeded::class);\n //$this->call(countriesTimezone::class);\n $this->call(TemplateLogTableSeeded::class);\n $this->call(CompanySettingTableSeeded::class);\n\n $this->call(SoftwareAdminSeeded::class);\n }", "title": "" }, { "docid": "49afcdf49432b3fca67a8cb4ac946d8b", "score": "0.5537501", "text": "public function run()\n {\n \t $params= [\n 'username'=>'[email protected]',\n 'email'=>'[email protected]',\n 'passwd'=>'Addresss123',\n 'name'=>'Kevin Morgan',\n 'company'=>'Vertex Advertiisng',\n 'address_line_1'=>'address-line-1',\n 'city'=>'Liverpool',\n 'state'=>'NSW',\n 'country'=>'AU',\n 'zipcode'=>'2170',\n 'phone_cc'=>'20',\n 'phone'=>'01000433553',\n 'lang_pref'=>'en' \n ]; \n \\App\\Customer::create($params);\n \n\n // $params_two= [ \n // 'domain-name'=>'learncloud.com',\n // 'years'=>'1',\n // 'ns_one'=>'ns1.domain.com',\n // 'ns_two'=>'ns2.domain.com',\n // 'customer'=>'17602107',\n // 'customer_id'=>1,\n // 'reg_contact_id'=>'71666469',\n // 'admin_contact_id'=>'71666469',\n // 'tech_contact_id'=>'71666469',\n // 'billing_contact_id'=>'71666469',\n // 'invoice_option'=>'KeepInvoice'\n // ];\n\n // \\App\\Domain::create($params_two);\n\n\n }", "title": "" }, { "docid": "fd332477df5d46745f807bf870802fe2", "score": "0.5531994", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call(categoriaseder::class);\n $this->call(clienteseder::class);\n $this->call(imagenseder::class);\n $this->call(precioseder::class);\n $this->call(productosseder::class);\n $this->call(usersseder::class);\n $this->call(ventaseder::class);\n }", "title": "" }, { "docid": "d7c789c42f68e1730c0a780f86da8a7e", "score": "0.55206865", "text": "public static function main()\n {\n $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()\n ->build();\n\n // Construct an API session configured from an `adsapi_php.ini` file\n // and the OAuth2 credentials above.\n $session = (new AdManagerSessionBuilder())->fromFile()\n ->withOAuth2Credential($oAuth2Credential)\n ->build();\n\n self::runExample(\n new ServiceFactory(),\n $session,\n intval(self::ORDER_ID),\n intval(self::AD_UNIT_ID),\n intval(self::CONTENT_ID),\n intval(self::CONTENT_BUNDLE_ID),\n intval(self::CMS_METADATA_VALUE_ID)\n );\n }", "title": "" }, { "docid": "d51e43772e454180b36479a52d453e0f", "score": "0.55179775", "text": "public function run()\n {\n //factory(App\\Loan::class, 30)->create();\n\n $arrContextOptions=array(\n \"ssl\"=>array(\n \"verify_peer\"=>false,\n \"verify_peer_name\"=>false,\n ),\n ); \n \n\n \n $myfake=json_decode(file_get_contents('https://paris.robowebtech.tw/api/market-place', false, stream_context_create($arrContextOptions)), true);\n \n foreach($myfake[\"data\"] as $loan){\n \n $id = DB::table('loans')->insertGetId( array(\n 'serial'=>$loan['serial'],\n 'amount'=>$loan['amount'],\n 'status'=>$loan['status'],\n 'status_label'=>$loan['status_label'],\n 'expire_at'=>$loan['expire_at'],\n )\n );\n $loan=$loan['loan_detail'];\n DB::table('loans_details')->insertGetId( array(\n 'loan_id'=>$id,\n 'period'=>$loan['period'],\n 'purpose'=>$loan['purpose'],\n 'description'=>$loan['description'],\n 'credit_level'=>$loan['credit_level'],\n 'apr'=>$loan['apr'],\n 'pgr'=>$loan['pgr'],\n )\n );\n\n }\n \n }", "title": "" }, { "docid": "c1141cb72ec5a84f399e6d5a0c64967b", "score": "0.5513326", "text": "public function run()\n {\n factory(Domicilio::class, 12)->create();\n }", "title": "" }, { "docid": "0859862f3ac51c3c352ece7abf583a12", "score": "0.55074567", "text": "public function runDaemon()\r\n {\r\n $tanggalSekarang = date('Y-m-d');\r\n $jamSekarang = date('H:i');\r\n\r\n $schedule = $this->getSchedule(\r\n $tanggalSekarang,\r\n $jamSekarang\r\n );\r\n\r\n if ($schedule) {\r\n return $this->sendSms($schedule);\r\n }\r\n }", "title": "" }, { "docid": "b898be1702303cf1582a525ce9d7b2c4", "score": "0.55020547", "text": "public function run()\n {\n $faker = Faker::create('it_IT');\n\n $newFlat = Flat::all();\n\n foreach ($newFlat as $flat) {\n $newService = new Service();\n $newService->wifi = $faker->numberBetween($min = 0, $max = 1);\n $newService->parking = $faker->numberBetween($min = 0, $max = 1);\n $newService->pool = $faker->numberBetween($min = 0, $max = 1);\n $newService->concierge = $faker->numberBetween($min = 0, $max = 1);\n $newService->sauna = $faker->numberBetween($min = 0, $max = 1);\n $newService->sea_view = $faker->numberBetween($min = 0, $max = 1);\n $newService->flat_id = $flat->id;\n $newService->save();\n }\n }", "title": "" }, { "docid": "8c8f8b95465c8801174250b299b31eed", "score": "0.5494799", "text": "public function run()\n {\n Bot::create([\n 'name' => 'Telegram Shop',\n 'greeting' => config('services.telegram.greeting'),\n ]);\n }", "title": "" }, { "docid": "eb3b8cfc8e3898582c78da9e3abd7036", "score": "0.5489744", "text": "function Main()\n\t\t{\n\t\t\tglobal $server;\n\t\t\t//We're using yesterday as the date we're generating for. \n\t\t\t$start_date = date('Y-m-d',strtotime('-1 day'));\n\t\t\t$report = new ECash_NightlyEvent_ResolveCurrentLeadStatusReport($server,$server->company_id);\n\t\t\t\n\t\t\t$report->setServer($server);\n\t\t\t$report->setCompanyId($server->company_id);\n\t\t\t$report->setLog($server->log);\n\t\t\t$report->setStartDate($start_date);\n\t\t\t$report->run();\n\t\t}", "title": "" }, { "docid": "c89179cd72f400ac962701568214724c", "score": "0.5487991", "text": "public function startBackgroundServices()\n {\n if ($this->isWorker() && $this->lastDeployment()) {\n $this->lastDeployment()->startScheduler();\n\n $this->lastDeployment()->restartDaemons();\n }\n }", "title": "" }, { "docid": "5ce46f251f8f1fc4c5c7fcce6b1eca4a", "score": "0.54874384", "text": "public function run()\n {\n //1) Create Admin Role\n $role = ['name' => 'developer', 'display_name' => 'Developer', 'description' => 'Admin assign Permission'];\n $role = Role::create($role);\n\n //2) Create Service User\n $serviceUser = ['name' => 'Default Service User', 'status' => 1];\n $serviceUser = \\DB::table('service_client')->insert($serviceUser);\n\n //3) Create User\n $user = ['service_client_id' => 1,'name' => 'Developer', 'email' => '[email protected]', 'password' => Hash::make('12345678'),'api_token' => Str::random(80)];\n $user = DB::table('users')->insert($user);\n }", "title": "" }, { "docid": "ffe38343bf8488d7255352f8e0b7719c", "score": "0.5483173", "text": "public function run()\n {\n $this->createCategoriaServicos();\n }", "title": "" }, { "docid": "d8cc66a6efa3782da38e8a5dd54fe2ff", "score": "0.548008", "text": "public function run()\n {\n echo \"起飞技能启动了\";\n }", "title": "" }, { "docid": "27da928c6e22720f5f93984533d75022", "score": "0.5475693", "text": "public function run()\n {\n $procesos = [\n \t['nombre' => 'DirecTV', 'descripcion' => 'Instalación de servicio DirecTV'],\n \t['nombre' => 'Inter', 'descripcion' => 'Instalación de servicio Inter de telefonia e internet']\n ];\n foreach ($procesos as $proceso) {\n \tProceso::create($proceso);\n }\n }", "title": "" }, { "docid": "18c92a62850390bcfffe8e4cc8682201", "score": "0.54542685", "text": "public function run()\n {\n // DB::table('promo_service')->insert([\n // 'promoId' => 1,\n // 'serviceId' => 1,\n // 'isFree' => 1,\n // 'isActive' => 1 \n // ]);\n }", "title": "" }, { "docid": "26863b0025d1724e3aded5eedf12c1c9", "score": "0.54531777", "text": "public function run()\n {\n $addressFactory = new AddressFactory();\n \n $client = Client::first();\n $client->addAddress(\n $addressFactory->definition()\n );\n }", "title": "" }, { "docid": "c34250c89f96f06e41ba2fa0510800a2", "score": "0.5445836", "text": "public function run()\n {\n $data = new ServiceAgreement();\n $data->title = \"服务协议\";\n $data->content = \"服务协议内容\";\n $data->save();\n }", "title": "" }, { "docid": "f4fecfe13ee27846624428250f4f992f", "score": "0.5445149", "text": "public function run()\n {\n $services =Service::factory(9)->create();\n\n foreach($services as $service){\n Image::factory(1)->create([\n 'imageable_id'=>$service->id,\n 'imageable_type'=>Service::class\n ]);\n }\n }", "title": "" }, { "docid": "4d0812739c7a1924717d3f5108ab3ade", "score": "0.54397297", "text": "public function run()\n {\n $this->call('populateCatalogo');\n $this->call('populateAcceso');\n $this->call('populateConfig');\n $this->call('populateUbicaciones');\n $this->call('populateMetodos');\n //$this->call('populateMetodosExternos');\n $this->call('populateRoles');\n $this->call('populateUsuarios');\n $this->call('populateUsuariosConfig');\n $this->call('populatePermisos');\n //$this->call('populatePermisosExternos');\n }", "title": "" }, { "docid": "11c06a08d149f014327ae4bbc5bfd476", "score": "0.54335994", "text": "public function run()\n {\n $this->call(admins::class);\n $this->call(fasilitas_kamar_mandi::class);\n $this->call(fasilitas_khusus::class);\n $this->call(fasilitas_lingkungan::class);\n $this->call(fasilitas_umum::class);\n $this->call(parkirs::class);\n $this->call(users::class);\n $this->call(kosts::class);\n }", "title": "" }, { "docid": "7724ad15b99469db5887b27019a2fe81", "score": "0.5433347", "text": "public function run()\n {\n $owner = User\\Role::where('name', 'owner')->firstOrFail();\n\n $user = factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Pavel Buchnev',\n ]);\n\n /** @var User\\Team $team */\n $team = User\\Team::create([\n 'name' => 'Awesome project',\n 'owner_id' => $user->id,\n ]);\n\n $user->attachRole($owner, $team);\n\n $plan = Plan::findByName('unlimited');\n\n $team->subscribeTo($plan);\n }", "title": "" }, { "docid": "b23b2fca61aae1621a7031fc60e22e04", "score": "0.5431879", "text": "public function run()\n {\n $services = Service::create([\n 'libelle' => 'RH',\n 'direction' => 'Thies',\n \n ]);\n $services = Service::create([\n 'libelle' => 'MARKETING',\n 'direction' => 'dakar',\n \n ]);\n\n $services = Service::create([\n 'libelle' => 'COLLECTE',\n 'direction' => 'dakar',\n \n ]);\n $services = Service::create([\n 'libelle' => 'FINANCE',\n 'direction' => 'dakar',\n \n ]);\n $services = Service::create([\n 'libelle' => 'PRODUCTION',\n 'direction' => 'thies',\n \n ]);\n $services = Service::create([\n 'libelle' => 'VENTE',\n 'direction' => 'dakar',\n \n ]);\n \n $role = Roles::create(['libelle' => 'ADMIN_SYSTEME']);\n $role = Roles::create(['libelle' => 'ADMIN_SIMPLE']);\n $role = Roles::create(['libelle' => 'USER_SIMPLE']);\n\n $Permissions = Permission::create([\n \n 'id' => '1',\n 'title' => 'employes_access',\n 'created_at' => '2019-09-19 12:14:15',\n 'updated_at' => '2019-09-19 12:14:15',\n ]);\n \n \n $Permissions = Permission::create([\n \n 'id' => '2',\n 'title' => 'employes_create',\n 'created_at' => '2019-09-19 12:14:15',\n 'updated_at' => '2019-09-19 12:14:15',\n ]);\n \n \n $user = User::create([\n 'name' => 'Dieye',\n 'prenom' => 'Elhadji malick',\n 'statut' => 'actif',\n 'email' => '[email protected]',\n 'service_id' =>'1',\n 'roles' =>'1',\n 'password' => bcrypt('12345678')\n ]);\n\n \n \n\n $depotCollecte = DepotCollecte::create([\n 'quantiteinitiale'=>0,\n 'quantiteEntrante'=>0,\n 'quantiteSortante'=>0,\n 'depot'=>0,\n 'pphomo'=>0,\n 'pphomoSortante'=>0,\n 'ppcopo'=>0,\n 'ppcopoSortante'=>0,\n 'petbouteille'=>0,\n 'petbouteilleSortante'=>0,\n 'petpreform'=>0,\n 'petpreformSortante'=>0,\n 'pehdcasier'=>0,\n 'pehdcasierSortante'=>0,\n 'pehdsoufflage'=>0,\n 'pehdsoufflageSortante'=>0,\n 'dechet'=>0,\n 'date'=>'2015-02-03',\n 'total'=>0,\n\n ]);\n\n $typeCollecteur = TypeCollecteur::create([\n 'libelle' => 'AGREE',\n ]);\n\n $typeCollecteur = TypeCollecteur::create([\n 'libelle' => 'RECUPLAST',\n ]);\n\n $typeCollecteur = TypeCollecteur::create([\n 'libelle' => 'DIVERS',\n ]);\n $typeCollecteur = TypeCollecteur::create([\n 'libelle' => 'ENTREPRISE',\n ]);\n\n \n $fournisseur = Fournisseur::create([\n 'nomComplet' => 'Elhadji malick',\n 'avance' => 0,\n 'contact' => '771327599',\n 'region' =>'mbour',\n 'departement' =>'mbour',\n 'commune' =>'mbour',\n 'quartier' =>'11',\n 'restant_du' =>'0',\n 'numero' =>'FR_401001',\n 'type' =>'1',\n ]);\n\n\n $fournisseur = Fournisseur::create([\n 'nomComplet' => 'Collecteur DIVERS',\n 'avance' => 0,\n 'contact' => '',\n 'region' =>'',\n 'departement' =>'',\n 'commune' =>'',\n 'quartier' =>'',\n 'restant_du' =>'0',\n 'numero' =>'FR_401002',\n 'type' =>'3',\n ]);\n\n\n $collectEntreprise = CollectEntreprise::create([\n 'fournisseur_id' =>'1',\n 'ppcopo'=>0,\n 'prixppcopo'=>0,\n 'pphomo'=>0,\n 'prixpphomo'=>0,\n 'pet'=>0,\n 'pp'=>0,\n 'pehd'=>0,\n 'dechet'=>0,\n 'date_collecte'=>'2015-02-03',\n 'numerobons'=>'123456',\n 'petbouteille'=> 0,\n 'petbouteilleprix'=> 0,\n 'petpreform'=> 0,\n 'petpreformprix'=> 0,\n 'pehdcasier'=> 0,\n 'pehdcasierprix'=> 0,\n 'pehdsoufflage'=> 0,\n 'pehdsoufflageprix'=> 0,\n 'totaltri'=>0,\n ]);\n\n $depotProduction = DepotProduction::create([\n 'vracinitiale'=>0,\n 'vracEntrant'=>0,\n 'vracSortant'=>0,\n 'vrac'=>0,\n 'pphomoinitiale'=>0,\n 'pphomoEntrantpro'=>0,\n 'pphomoSortantepro'=>0,\n 'pphomo'=>0,\n 'ppcopoinitiale'=>0,\n 'ppcopoEntrantpro'=>0,\n 'ppcopoSortantepro'=>0,\n 'ppcopo'=>0,\n 'pp'=>0,\n 'petbouteilleinitiale'=>0,\n 'petbouteilleEntrantpro'=>0,\n 'petbouteilleSortantepro'=>0,\n 'petbouteille'=>0,\n 'petpreforminitiale'=>0,\n 'petpreformEntrantpro'=>0,\n 'petpreformSortantepro'=>0,\n 'petpreform'=>0,\n 'pet'=>0,\n 'pehdcasierinitiale'=>0,\n 'pehdcasierEntrantpro'=>0,\n 'pehdcasierSortantepro'=>0,\n 'pehdcasier'=>0,\n 'pehdsoufflageinitiale'=>0,\n 'pehdsoufflageEntrantpro'=>0,\n 'pehdsoufflageSortantepro'=>0,\n 'pehdsoufflage'=>0,\n 'pehd'=>0,\n 'dechet'=>0,\n 'date'=>'2015-02-03',\n \n ]);\n\n $triage = Triage::create([\n 'premierequantite'=>0,\n \n 'date'=>'2015-02-03',\n \n ]);\n\n $lavagehor = Lavagehor::create([\n \n 'lavagehor'=>0,\n 'ppcopolav'=>0,\n\n 'ppcopobleu'=>0,\n 'ppcopoblanc'=>0,\n 'ppcopojaune'=>0,\n 'ppcopovert'=>0,\n 'ppcopomauve'=>0,\n 'ppcoporouge'=>0,\n 'ppcopojadida'=>0,\n 'ppcopomaron'=>0,\n 'ppcoponoire'=>0,\n 'ppcopomulti'=>0,\n\n 'pphomolav'=>0,\n 'pphomobleu'=>0,\n 'pphomoblanc'=>0,\n 'pphomojaune'=>0,\n 'pphomovert'=>0,\n 'pphomomauve'=>0,\n 'pphomorouge'=>0,\n 'pphomojadida'=>0,\n 'pphomomaron'=>0,\n 'pphomonoire'=>0,\n 'pphomomulti'=>0,\n\n 'petpreformlav'=>0,\n 'petpreformbleu'=>0,\n 'petpreformblanc'=>0,\n\n 'petbouteillelav'=>0,\n 'petbouteillebleu'=>0,\n 'petbouteilleblanc'=>0,\n \n 'pehdcasierlav'=>0,\n 'pehdcasierbleu'=>0,\n 'pehdcasierblanc'=>0,\n 'pehdcasierjaune'=>0,\n 'pehdcasiervert'=>0,\n 'pehdcasierneutre'=>0,\n 'pehdcasierrouge'=>0,\n 'pehdcasierjadida'=>0,\n 'pehdcasiermaron'=>0,\n 'pehdcasiernoire'=>0,\n 'pehdcasiermulti'=>0,\n\n 'pehdsouflagelav'=>0,\n 'pehdsouflagebleu'=>0,\n 'pehdsouflageblanc'=>0,\n 'pehdsouflagejaune'=>0,\n 'pehdsouflagevert'=>0,\n 'pehdsouflageneutre'=>0,\n 'pehdsouflagerouge'=>0,\n 'pehdsouflagejadida'=>0,\n 'pehdsouflagemaron'=>0,\n 'pehdsouflagenoire'=>0,\n 'pehdsouflagemulti'=>0,\n \n 'totale'=>0,\n 'effectiflav'=>0,\n \n 'dechelavage'=>0,\n 'date'=>'2015-02-03',\n ]);\n\n $broyage = Broyage::create([\n\n 'broyage'=>0,\n 'ppcopobro'=>0,\n 'ppcopobleu'=>0,\n 'ppcopoblanc'=>0,\n 'ppcopojaune'=>0,\n 'ppcopovert'=>0,\n 'ppcopomauve'=>0,\n 'ppcoporouge'=>0,\n 'ppcopojadida'=>0,\n 'ppcopomaron'=>0,\n 'ppcoponoire'=>0,\n 'ppcopomulti'=>0,\n\n 'pphomobro'=>0,\n 'pphomobleu'=>0,\n 'pphomoblanc'=>0,\n 'pphomojaune'=>0,\n 'pphomovert'=>0,\n 'pphomomauve'=>0,\n 'pphomorouge'=>0,\n 'pphomojadida'=>0,\n 'pphomomaron'=>0,\n 'pphomonoire'=>0,\n 'pphomomulti'=>0,\n\n 'petpreformbro'=>0,\n 'petpreformbleu'=>0,\n 'petpreformblanc'=>0,\n\n 'petbouteillebro'=>0,\n 'petbouteillebleu'=>0,\n 'petbouteilleblanc'=>0,\n\n 'pehdcasierbro'=>0,\n 'pehdcasierbleu'=>0,\n 'pehdcasierblanc'=>0,\n 'pehdcasierjaune'=>0,\n 'pehdcasiervert'=>0,\n 'pehdcasierneutre'=>0,\n 'pehdcasierrouge'=>0,\n 'pehdcasierjadida'=>0,\n 'pehdcasiermaron'=>0,\n 'pehdcasiernoire'=>0,\n 'pehdcasiermulti'=>0,\n\n 'pehdsouflagebro'=>0,\n 'pehdsouflagebleu'=>0,\n 'pehdsouflageblanc'=>0,\n 'pehdsouflagejaune'=>0,\n 'pehdsouflagevert'=>0,\n 'pehdsouflageneutre'=>0,\n 'pehdsouflagerouge'=>0,\n 'pehdsouflagejadida'=>0,\n 'pehdsouflagemaron'=>0,\n 'pehdsouflagenoire'=>0,\n 'pehdsouflagemulti'=>0,\n\n 'totale'=>0,\n 'effectifbro'=>0,\n\n 'dechebroyage'=>0,\n 'heuremachine'=>0,\n 'date'=>'2015-02-03',\n ]);\n\n $sac= Sac::create([\n 'sac'=>0,\n 'ppcopo'=>0,\n 'ppcopobleu'=>0,\n 'ppcopoblanc'=>0,\n 'ppcopojaune'=>0,\n 'ppcopovert'=>0,\n 'ppcopomauve'=>0,\n 'ppcoporouge'=>0,\n 'ppcopojadida'=>0,\n 'ppcopomaron'=>0,\n 'ppcoponoire'=>0,\n 'ppcopomulti'=>0,\n \n 'pphomo'=>0,\n 'pphomobleu'=>0,\n 'pphomoblanc'=>0,\n 'pphomojaune'=>0,\n 'pphomovert'=>0,\n 'pphomomauve'=>0,\n 'pphomorouge'=>0,\n 'pphomojadida'=>0,\n 'pphomomaron'=>0,\n 'pphomonoire'=>0,\n 'pphomomulti'=>0,\n \n 'pet'=>0,\n 'petpreform'=>0,\n 'petpreformbleu'=>0,\n 'petpreformblanc'=>0,\n \n 'petbouteille'=>0,\n 'petbouteillebleu'=>0,\n 'petbouteilleblanc'=>0,\n \n 'pehdcasier'=>0,\n 'pehdcasierbleu'=>0,\n 'pehdcasierblanc'=>0,\n 'pehdcasierjaune'=>0,\n 'pehdcasiervert'=>0,\n 'pehdcasierneutre'=>0,\n 'pehdcasierrouge'=>0,\n 'pehdcasierjadida'=>0,\n 'pehdcasiermaron'=>0,\n 'pehdcasiernoire'=>0,\n 'pehdcasiermulti'=>0,\n 'pehdsouflage'=>0,\n \n 'pehdsouflagebleu'=>0,\n 'pehdsouflageblanc'=>0,\n 'pehdsouflagejaune'=>0,\n 'pehdsouflagevert'=>0,\n 'pehdsouflageneutre'=>0,\n 'pehdsouflagerouge'=>0,\n 'pehdsouflagejadida'=>0,\n 'pehdsouflagemaron'=>0,\n 'pehdsouflagenoire'=>0,\n 'pehdsouflagemulti'=>0,\n\n 'ppcoporestant'=>0,\n 'ppcopobleurestant'=>0,\n 'ppcopoblancrestant'=>0,\n 'ppcopojaunerestant'=>0,\n 'ppcopovertrestant'=>0,\n 'ppcopomauverestant'=>0,\n 'ppcoporougerestant'=>0,\n 'ppcopojadidarestant'=>0,\n 'ppcopomaronrestant'=>0,\n 'ppcoponoirerestant'=>0,\n 'ppcopomultirestant'=>0,\n \n 'pphomorestant'=>0,\n 'pphomobleurestant'=>0,\n 'pphomoblancrestant'=>0,\n 'pphomojaunerestant'=>0,\n 'pphomovertrestant'=>0,\n 'pphomomauverestant'=>0,\n 'pphomorougerestant'=>0,\n 'pphomojadidarestant'=>0,\n 'pphomomaronrestant'=>0,\n 'pphomonoirerestant'=>0,\n 'pphomomultirestant'=>0,\n \n 'petrestant'=>0,\n 'petpreformrestant'=>0,\n 'petpreformbleurestant'=>0,\n 'petpreformblancrestant'=>0,\n \n 'petbouteillerestant'=>0,\n 'petbouteillebleurestant'=>0,\n 'petbouteilleblancrestant'=>0,\n \n 'pehdcasierrestant'=>0,\n 'pehdcasierbleurestant'=>0,\n 'pehdcasierblancrestant'=>0,\n 'pehdcasierjaunerestant'=>0,\n 'pehdcasiervertrestant'=>0,\n 'pehdcasierneutrerestant'=>0,\n 'pehdcasierrougerestant'=>0,\n 'pehdcasierjadidarestant'=>0,\n 'pehdcasiermaronrestant'=>0,\n 'pehdcasiernoirerestant'=>0,\n 'pehdcasiermultirestant'=>0,\n \n \n 'pehdsouflagerestant'=>0,\n \n 'pehdsouflagebleurestant'=>0,\n 'pehdsouflageblancrestant'=>0,\n 'pehdsouflagejaunerestant'=>0,\n 'pehdsouflagevertrestant'=>0,\n 'pehdsouflageneutrerestant'=>0,\n 'pehdsouflagerougerestant'=>0,\n 'pehdsouflagejadidarestant'=>0,\n 'pehdsouflagemaronrestant'=>0,\n 'pehdsouflagenoirerestant'=>0,\n 'pehdsouflagemultirestant'=>0,\n \n \n 'totale'=>0,\n 'effectifsac'=>0,\n 'dechesac'=>0,\n 'date'=>'2015-02-03',\n ]);\n\n\n\n $extrusion= Extrusion:: create([\n 'extrusion'=>0,\n 'pehdsouflagebleu'=>0,\n 'pehdsouflageblanc'=>0,\n 'pehdsouflagejaune'=>0,\n 'pehdsouflagevert'=>0,\n 'pehdsouflageneutre'=>0,\n 'pehdsouflagerouge'=>0,\n 'pehdsouflagejadida'=>0,\n 'pehdsouflagemaron'=>0,\n 'pehdsouflagenoire'=>0,\n 'pehdsouflagemulti'=>0,\n \n 'pehdsouflagebleurestant'=>0,\n 'pehdsouflageblancrestant'=>0,\n 'pehdsouflagejaunerestant'=>0,\n 'pehdsouflagevertrestant'=>0,\n 'pehdsouflageneutrerestant'=>0,\n 'pehdsouflagerougerestant'=>0,\n 'pehdsouflagejadidarestant'=>0,\n 'pehdsouflagemaronrestant'=>0,\n 'pehdsouflagenoirerestant'=>0,\n 'pehdsouflagemultirestant'=>0,\n \n 'pehdsouflagesacbleu'=>0,\n 'pehdsouflagesacblanc'=>0,\n 'pehdsouflagesacjaune'=>0,\n 'pehdsouflagesacvert'=>0,\n 'pehdsouflagesacneutre'=>0,\n 'pehdsouflagesacrouge'=>0,\n 'pehdsouflagesacjadida'=>0,\n 'pehdsouflagesacmaron'=>0,\n 'pehdsouflagesacnoire'=>0,\n 'pehdsouflagesacmulti'=>0,\n 'pehdsouflagesac'=>0,\n \n 'effectifextru'=>0,\n \n \n \n 'decheextrusion'=>0,\n 'date'=>'2015-02-03',\n ]);\n\n\n\n $stockproduitfini= Stockproduitfini::create([\n 'stockproduitfini'=>0,\n 'ppcoposac'=>0,\n 'ppcoposacbleu'=>0,\n 'ppcoposacblanc'=>0,\n 'ppcoposacjaune'=>0,\n 'ppcoposacvert'=>0,\n 'ppcoposacmauve'=>0,\n 'ppcoposacrouge'=>0,\n 'ppcoposacjadida'=>0,\n 'ppcoposacmaron'=>0,\n 'ppcoposacnoire'=>0,\n 'ppcoposacmulti'=>0,\n \n \n 'pphomosacbleu'=>0,\n 'pphomosacblanc'=>0,\n 'pphomosacjaune'=>0,\n 'pphomosacvert'=>0,\n 'pphomosacmauve'=>0,\n 'pphomosacrouge'=>0,\n 'pphomosacjadida'=>0,\n 'pphomosacmaron'=>0,\n 'pphomosacnoire'=>0,\n 'pphomosacmulti'=>0,\n 'pphomosac'=>0,\n \n \n 'petpreformsac'=>0,\n 'petpreformsacbleu'=>0,\n 'petpreformsacblanc'=>0,\n \n 'petbouteillesac'=>0,\n 'petbouteillesacbleu'=>0,\n 'petbouteillesacblanc'=>0,\n \n \n \n 'pehdcasiersacbleu'=>0,\n 'pehdcasiersacblanc'=>0,\n 'pehdcasiersacjaune'=>0,\n 'pehdcasiersacvert'=>0,\n 'pehdcasiersacneutre'=>0,\n 'pehdcasiersacrouge'=>0,\n 'pehdcasiersacjadida'=>0,\n 'pehdcasiersacmaron'=>0,\n 'pehdcasiersacnoire'=>0,\n 'pehdcasiersacmulti'=>0,\n 'pehdcasiersac'=>0,\n \n \n \n 'pehdsouflagesacbleu'=>0,\n 'pehdsouflagesacblanc'=>0,\n 'pehdsouflagesacjaune'=>0,\n 'pehdsouflagesacvert'=>0,\n 'pehdsouflagesacneutre'=>0,\n 'pehdsouflagesacrouge'=>0,\n 'pehdsouflagesacjadida'=>0,\n 'pehdsouflagesacmaron'=>0,\n 'pehdsouflagesacnoire'=>0,\n 'pehdsouflagesacmulti'=>0,\n 'pehdsouflagesac'=>0,\n \n 'granule'=>0,\n 'extrude'=>0,\n \n 'effectifstock'=>0,\n 'nombre'=>0,\n \n 'date'=>'2015-02-03',\n ]);\n\n\n $vente=ventes::create([\n 'nombredesac'=>0,\n 'ppcopo'=>0,\n 'ppcopobleu'=>0,\n 'ppcopoblanc'=>0,\n 'ppcopojaune'=>0,\n 'ppcopovert'=>0,\n 'ppcopomauve'=>0,\n 'ppcoporouge'=>0,\n 'ppcopojadida'=>0,\n 'ppcopomaron'=>0,\n 'ppcoponoire'=>0,\n 'ppcopomulti'=>0,\n \n 'ppcoposac'=>0,\n 'ppcoposacbleu'=>0,\n 'ppcoposacblanc'=>0,\n 'ppcoposacjaune'=>0,\n 'ppcoposacvert'=>0,\n 'ppcoposacmauve'=>0,\n 'ppcoposacrouge'=>0,\n 'ppcoposacjadida'=>0,\n 'ppcoposacmaron'=>0,\n 'ppcoposacnoire'=>0,\n 'ppcoposacmulti'=>0,\n \n 'pphomo'=>0,\n 'pphomobleu'=>0,\n 'pphomoblanc'=>0,\n 'pphomojaune'=>0,\n 'pphomovert'=>0,\n 'pphomomauve'=>0,\n 'pphomorouge'=>0,\n 'pphomojadida'=>0,\n 'pphomomaron'=>0,\n 'pphomonoire'=>0,\n 'pphomomulti'=>0,\n \n 'pphomosac'=>0,\n 'pphomosacbleu'=>0,\n 'pphomosacblanc'=>0,\n 'pphomosacjaune'=>0,\n 'pphomosacvert'=>0,\n 'pphomosacmauve'=>0,\n 'pphomosacrouge'=>0,\n 'pphomosacjadida'=>0,\n 'pphomosacmaron'=>0,\n 'pphomosacnoire'=>0,\n 'pphomosacmulti'=>0,\n \n\n 'petpreform'=>0,\n 'petpreformbleu'=>0,\n 'petpreformblanc'=>0,\n \n 'petpreformsac'=>0,\n 'petpreformsacbleu'=>0,\n 'petpreformsacblanc'=>0,\n \n 'petbouteille'=>0,\n 'petbouteillebleu'=>0,\n 'petbouteilleblanc'=>0,\n\n 'petbouteillesac'=>0,\n 'petbouteillebleusac'=>0,\n 'petbouteilleblancsac'=>0,\n \n 'pehdcasier'=>0,\n 'pehdcasierbleu'=>0,\n 'pehdcasierblanc'=>0,\n 'pehdcasierjaune'=>0,\n 'pehdcasiervert'=>0,\n 'pehdcasierneutre'=>0,\n 'pehdcasierrouge'=>0,\n 'pehdcasierjadida'=>0,\n 'pehdcasiermaron'=>0,\n 'pehdcasiernoire'=>0,\n 'pehdcasiermulti'=>0,\n \n \n 'pehdcasiersac'=>0,\n 'pehdcasiersacbleu'=>0,\n 'pehdcasiersacblanc'=>0,\n 'pehdcasiersacjaune'=>0,\n 'pehdcasiersacvert'=>0,\n 'pehdcasiersacneutre'=>0,\n 'pehdcasiersacrouge'=>0,\n 'pehdcasiersacjadida'=>0,\n 'pehdcasiersacmaron'=>0,\n 'pehdcasiersacnoire'=>0,\n 'pehdcasiersacmulti'=>0,\n \n 'pehdsouflage'=>0,\n 'pehdsouflagebleu'=>0,\n 'pehdsouflageblanc'=>0,\n 'pehdsouflagejaune'=>0,\n 'pehdsouflagevert'=>0,\n 'pehdsouflageneutre'=>0,\n 'pehdsouflagerouge'=>0,\n 'pehdsouflagejadida'=>0,\n 'pehdsouflagemaron'=>0,\n 'pehdsouflagenoire'=>0,\n 'pehdsouflagemulti'=>0,\n \n \n 'pehdsouflagesac'=>0,\n 'pehdsouflagesacbleu'=>0,\n 'pehdsouflagesacblanc'=>0,\n 'pehdsouflagesacjaune'=>0,\n 'pehdsouflagesacvert'=>0,\n 'pehdsouflagesacneutre'=>0,\n 'pehdsouflagesacrouge'=>0,\n 'pehdsouflagesacjadida'=>0,\n 'pehdsouflagesacmaron'=>0,\n 'pehdsouflagesacnoire'=>0,\n 'pehdsouflagesacmulti'=>0,\n \n \n 'totale'=>0,\n 'date'=>'2015-02-03',\n \n ]);\n }", "title": "" }, { "docid": "20f9c93deab690a9330823a9b6912cdb", "score": "0.5423247", "text": "public function run() {\n\n\t\t$this->installUser();\n\t\t$this->installAccount();\n\t}", "title": "" }, { "docid": "a4c4a42a815f827da0169c2f1d68e87b", "score": "0.5421491", "text": "public function ProcessService()\n\t{\n\t\t$worklistgroup = isset($this->session->userdata('SessionMain')['worklistgroup']) ? $this->session->userdata('SessionMain')['worklistgroup'] : $this->session->userdata('SessionMain')['UserInfo']['worklistgroup'];\n\t\t//$this->load->module('cv_api');\n\t\t$data['worklist_process'] = $this->worklist_process($worklistgroup);\n\t\t$page = array('Main' => 'ProcessService/ProcessService_vw');\n\t\t$title = 'ProcessService';\n\t\t$script = 'ProcessService/ProcessService_script';\n\t\t$this->publictemplate($page, $title, $script, $data);\n\t}", "title": "" }, { "docid": "2d6e0f3b614f5d8486370593cc4160b2", "score": "0.54200053", "text": "public function start()\n {\n $curDir = __DIR__;\n $sourceDir = $curDir.DIRECTORY_SEPARATOR.'Source'.DIRECTORY_SEPARATOR;\n\n //Get reader\n $salariesReader = new SalariesCsvReader($sourceDir);\n\n //Get writer\n $csvWriter = new CsvFileWriter();\n\n //Get services\n $services = new SalaryServices();\n\n //Open up file handlers\n $processHandle = fopen(\n __DIR__\n .DIRECTORY_SEPARATOR\n .'Output'\n .DIRECTORY_SEPARATOR\n .'salariesOutput'\n .date('Ymd')\n .'.csv',\n 'w+'\n );\n\n //Write csv header\n $csvWriter->writeHeader($processHandle);\n $salaries = $salariesReader->getSalaries();\n\n foreach ($salaries as $skey => $sval) {\n foreach ($sval as $keySal => $valSal) {\n $csvWriter->writeLine(\n $processHandle,\n $sval['salaryId'],\n $sval['first_name'],\n $sval['last_name'],\n $services->getMonthName(),\n $services->getSalaryPaymentDate(),\n $services->getBonusPaymentDate(),\n $services->getMonthsToBePayed()\n );\n }\n }\n }", "title": "" }, { "docid": "f5f10d07f1bb88656e214d98375d2b89", "score": "0.5417737", "text": "public function run()\n {\n $this->call(Users::class);\n $this->call(Admin::class);\n $this->call(Cauhinhchung::class);\n $this->call(Danhmucbaiviet::class);\n $this->call(Loaithanhvien::class);\n $this->call(BaiViet::class);\n $this->call(QuangCao::class);\n $this->call(HoiDap::class);\n }", "title": "" }, { "docid": "fd13d53e9a85ba91cc111fe86c6bcf41", "score": "0.5412034", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n\n Artisan::call('passport:client --personal --name=\"Solution Locale API\"');\n }", "title": "" }, { "docid": "b816e522db15433c95f60e893fcb3b12", "score": "0.5405524", "text": "public function run()\n {\n \n $this->call(add_comuna::class);\n $this->call(add_especialidades::class);\n $this->call(add_estados_planes_de_tratamientos::class);\n $this->call(add_piezas_dentales::class);\n $this->call(add_tipos_antecedentes::class);\n $this->call(add_tratamientos::class);\n $this->call(add_usuarios::class);\n $this->call(add_materiales::class);\n }", "title": "" }, { "docid": "6203a13a7bd8cc873575ad5b8f1fe29d", "score": "0.53952086", "text": "public function run()\n {\n factory(CrashPlan::class, 50)->create();\n }", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.5394914", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.5394914", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.5394914", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.5394914", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.5394914", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.5394914", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.5394914", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.5394914", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.5394914", "text": "public function start();", "title": "" }, { "docid": "3178ac73b047eea3f49902bbbb19cb38", "score": "0.5392781", "text": "public function run()\n {\n DB::table('services')->delete();\n //injecte le tableau lignes\n for($i=1;$i<=10;$i++)\n {\n DB::table('services')->insert([\n 'id' => $i,\n 'name'=> 'Service '.$i\n ]);\n }\n }", "title": "" }, { "docid": "365d70064b12d213e8fefd7432d86b55", "score": "0.5386508", "text": "public function run()\r\n {\r\n $this->runEvent('oncreate', array(\r\n $this->request,\r\n ));\r\n\r\n $this->testRequestMethod();\r\n\r\n if(is_null($this->route))\r\n {\r\n if(count(self::$routes) == 0)\r\n {\r\n $this->abort(404);\r\n }\r\n\r\n $this->findRoutes();\r\n }\r\n\r\n $this->service();\r\n $this->runMiddlewares();\r\n \r\n $body = $this->runActions();\r\n\r\n if(strtolower($this->request->method()) == 'head')\r\n {\r\n $this->nobody = true;\r\n }\r\n\r\n if(!$this->nobody && (empty($body) || is_null($body)))\r\n {\r\n $this->abort(204);\r\n }\r\n\r\n $this->runEvent('onafteraction', array(\r\n $this->request,\r\n ));\r\n\r\n $this->runAfterMiddlewares();\r\n $this->setHeaders($this->headers);\r\n\r\n if(!$this->nobody)\r\n {\r\n $this->sendBody($body);\r\n }\r\n\r\n $this->terminate();\r\n }", "title": "" }, { "docid": "15a199b1d711f660aa5f19bd3a41744d", "score": "0.5383609", "text": "public function run()\n {\n Service::truncate();\n \n Hotel::all()->each(function ($hotel)\n {\n $hotel->services()->saveMany(factory(Service::class, 4)->make());\n });\n }", "title": "" }, { "docid": "67992741b4ca1e8db1c6c2fa102412eb", "score": "0.53744286", "text": "public function run()\n {\n $client = Client::create([\n 'name' => 'joe',\n 'address' => 'giza,egypt',\n 'phone' => '01150894731'\n ]);\n }", "title": "" }, { "docid": "d90aba8a9c3432f04bdb1308c24e46cd", "score": "0.5369602", "text": "public function run() {\n do_action('lee_init');\n // start session\n if (!$this->runningInConsole()) {\n $this->session()->start();\n }\n\n // Invoke middleware and application stack\n $this->middleware[0]->call();\n $this->response()->send();\n do_action('lee_end');\n }", "title": "" }, { "docid": "72111d78cdef695440f2431c0d98781d", "score": "0.5363219", "text": "public function start(): void\n {\n //$this->addDependency(\n // Services\\TemplateQueryItemMapper::class,\n // Services\\TemplateItemMapperImpl::class\n //);\n\n /**\n * Register Commands\n */\n //$this->addCommand(\n // Services\\Restore\\RestoreTemplate::class,\n // Services\\Restore\\RestoreTemplateHandler::class\n //);\n\n /**\n * Register Queries\n */\n $this->addQuery(\n Services\\Query\\GetById::class,\n Services\\Query\\GetByIdHandler::class\n );\n\n /**\n * Register events\n */\n //$this->addEvent(\n // Model\\Events\\TemplateRestored::class,\n // Model\\Events\\TemplateNameChanged::class,\n // Model\\Events\\TemplateStatusChanged::class,\n //);\n\n // if the event is from this module you can register using class name\n //$this->addEventListener(\n // Model\\Events\\TemplateNameChanged::class,\n // [PublishWhenTemplateNameChangedHandler::class]\n //);\n\n // if the event is from outside you should register by name\n //$this->addEventListener(\n // 'business.events.BusinessNameChanged',\n // [AlwaysPublishWhenTemplateNameChange::class]\n //);\n }", "title": "" }, { "docid": "145be03395d3e7a1974cbb54718cc609", "score": "0.5358768", "text": "public function run()\n {\n $sports = [\n 'AJEDREZ',\n 'ATLETISMO',\n 'BALONCESTO',\n 'BOXEO',\n 'CICLISMO',\n 'ESCALADA',\n 'FUTBOL',\n 'GIMNASIA',\n 'JUDO',\n 'KARATE DO',\n 'LUCHA OLIMPICA',\n 'LEVANTAMIENTO DE PESAS',\n 'LEVANTAMIENTO DE POTENCIA',\n 'NATACION',\n 'TAEKWON DO',\n 'TENIS DE MESA'\n ];\n\n $this->createSport($sports);\n }", "title": "" }, { "docid": "3c0030361ffbac30d6db4216510bbc39", "score": "0.53583294", "text": "public function run()\n {\n $stores = \\App\\Store::all();\n\n $devices_and_services = \\League\\Csv\\Reader::createFromPath(storage_path('imports/sams-new-services.csv'));\n $devices_and_services->setFlags(SplFileObject::READ_AHEAD|SplFileObject::SKIP_EMPTY);\n\n $serviceMap = [];\n foreach ($devices_and_services as $ds) {\n // Map UPC to count/threshold\n $serviceMap[$ds[3]] = $ds[1];\n }\n\n $device_services = \\App\\DeviceService::with('dsDevice', 'dsService')->get();\n\n foreach ($stores as $store) {\n foreach ($device_services as $ds) {\n $ds->inventory()->create([\n 'count' => $serviceMap[$ds->upc],\n 'threshold' => $serviceMap[$ds->upc],\n 'store_number' => $store->number,\n 'upc' => $ds->upc\n ]);\n }\n }\n }", "title": "" }, { "docid": "67637dd2e3e3e7cbb7820f6ca672301e", "score": "0.53553706", "text": "public function run()\n {\n factory(Smartphone::class, 10) -> create();\n }", "title": "" }, { "docid": "ebd0d165de01557908476c70dfaba3fb", "score": "0.53471935", "text": "public function run()\n {\n TypeService::create([\"name\"=>\"Tarea Dirigida\"]);\n TypeService::create([\"name\"=>\"Deportivo\"]);\n TypeService::create([\"name\"=>\"Cultural\"]);\n TypeService::create([\"name\"=>\"Educativo\"]);\n }", "title": "" }, { "docid": "70105e1455ee0c49d1b0203f7f4e3c1e", "score": "0.5345814", "text": "public function run()\n {\n $this->command->info('Begin Init base data.');\n $this->initSysIpSurvey();\n $this->command->info('All base data is ok!');\n }", "title": "" }, { "docid": "45d64de72ccdee5a6772db3eafa98796", "score": "0.53388274", "text": "public function run()\n {\n DB::table('discount_service')->insert([\n 'discountId' => 1,\n 'serviceId' => 1,\n 'isActive' => 1,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "title": "" }, { "docid": "4248a7e6fc0269615bcf61a987eb9823", "score": "0.5335026", "text": "public function run()\n {\n factory(TrailerDriverLoad::class)->create();\n }", "title": "" }, { "docid": "b65c4bff44d190152b1bd960f3f89ad5", "score": "0.53335446", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([\n Batiment::class,\n Formation::class,\n Typeofformation::class\n ]);\n\n Eleve::factory()->count(50)->create();\n }", "title": "" }, { "docid": "6088d3bbfac4822183aa12af852c64a0", "score": "0.5332663", "text": "public function run() : void\n {\n $this->setupSessions();\n $this->setupSlim();\n $this->setupRoutes();\n $this->app->run();\n }", "title": "" }, { "docid": "a4d4effcfa246a902e08aac60290eea3", "score": "0.53315943", "text": "public function run()\n {\n ServiceType::create([\n 'name' => 'Mozo'\n ]);\n\n ServiceType::create([\n 'name' => 'Gasfitería'\n ]);\n\n ServiceType::create([\n 'name' => 'Reparación de electrodomésticos y equipos'\n ]);\n\n ServiceType::create([\n 'name' => 'Jardinería'\n ]);\n }", "title": "" } ]
694cbf70919762c3c05a4eca9d2450dd
Retorna (1,N) Despesa Financeira
[ { "docid": "5a1af6866300957a90ab4e71bc5bba04", "score": "0.0", "text": "public function relDespesaFinanceira()\n {\n return $this->hasMany('App\\Models\\DespesaFinanceira', 'fk_clinica');\n }", "title": "" } ]
[ { "docid": "44b0ed416a17bae6cbae50ba9b04f08a", "score": "0.67242783", "text": "function facto($nombre) {\n $resultat= ($nombre * facto($nombre - 1));\n return $resultat;\n }", "title": "" }, { "docid": "c57831bb66ed7abab969f70c3d53ccbb", "score": "0.6404156", "text": "function Dia_da_semana($Numdia) {\r\nif ($Numdia == 0) \t{ return 7; } \telse \t{ return $Numdia; } }", "title": "" }, { "docid": "f684189a7143b745a64828dd958ebe23", "score": "0.6366921", "text": "function getNextFactura()\n {\n global $db;\n /*$sql = \" select (max(numeroFactura)+1) as factura \";\n $sql.= \" from almacen_ventas \";*/\n $sql = \" select max(v.numeroFactura) as factura \";\n $sql.= \" from almacen_ventas v , almacen_reception r \";\n $sql.= \" where r.itemId = v.itemId and r.almacenId = \".$_SESSION[\"almacenId\"];\n \n $info2 = $db->execute($sql); \n if ( $info2->fields(\"factura\") == NULL)\n $nro = 1;\n else\n $nro = ($info2->fields(\"factura\")+1);\n return $nro; \n }", "title": "" }, { "docid": "d9b389ba015da28c3f365aefe60d83b5", "score": "0.6210881", "text": "function pegaIdade($nascimento) {\n\tlist($anoNasc,$mesNasc,$diaNasc) = explode(\"-\",$nascimento);\n\tlist($ano,$mes,$dia) = explode(\"-\",date(\"Y-m-d\"));\n\t$idade = $ano-$anoNasc;\n\t$idade = (($mes<$mesNasc)or(($mes==$mesNasc)and($dia<$diaNasc))) ? --$idade : $idade;\n\treturn $idade;\n}", "title": "" }, { "docid": "b65135d053b18bfc980e2d57ae5b3df6", "score": "0.62099975", "text": "function serchCOD()\r\n {\r\n\tglobal $gTables;\r\n\t$max_codice = gaz_dbi_query(\"select codice from \".$gTables['artico'].\" order by CAST(codice AS DECIMAL) desc limit 1\");\r\n $max_cod = gaz_dbi_fetch_array($max_codice);\r\n return ++$max_cod[0];\r\n }", "title": "" }, { "docid": "a2472e6d394da9096694664dc67b4289", "score": "0.6119738", "text": "function get_anio_presupuestando($anio=null){//recibe el anio actual\n $salida=array();\n if(isset($anio)){\n $sql=\"select anio,id_periodo from mocovi_periodo_presupuestario where presupuestando and anio=$anio+1\";\n $resul=toba::db('designa')->consultar($sql);\n if(!empty($resul)){\n return $resul; \n }\n \n }\n return $salida;\n \n }", "title": "" }, { "docid": "fb79c43af085ab63419fc4a0cff69d2d", "score": "0.6095161", "text": "function montos_dep_fgar($cred,$fec,$tip) \r\n{\r\n $monto = 0;\r\n $con_dtra = \"Select sum(FOND_DTRA_IMPO) From fond_det_tran, fond_maestro where FOND_NRO_CRED = $cred and FOND_DTRA_FECHA <= '$fec' and FOND_DTRA_TIP_TRAN = $tip and FOND_DTRA_USR_BAJA is null and FOND_MAE_USR_BAJA is null \";\r\n //$con_pld = \"Select * From cred_plandp where CRED_PLD_COD_SOL = $cod_sol and CRED_PLD_USR_BAJA is null \";\r\n $res_dtra = mysql_query($con_dtra)or die('No pudo leer : car_det_tran ' . mysql_error()) ;\r\n\twhile ($lin_dtra = mysql_fetch_array($res_dtra)) {\r\n\t $monto = $lin_dtra['sum(FOND_DTRA_IMPO)'];\r\n\t\t }\r\n return $monto;\t\t \r\n\t}", "title": "" }, { "docid": "24e117a189d13675477848121c97a2c7", "score": "0.60111433", "text": "function retorna_idade($nascimento) {\n $nascimento = $this->data_americana($nascimento);\n list($anoNasc,$mesNasc,$diaNasc) = explode(\"-\",$nascimento);\n list($ano,$mes,$dia) = explode(\"-\",date(\"Y-m-d\"));\n $idade = $ano-$anoNasc;\n $idade = (($mes<$mesNasc)or(($mes==$mesNasc)and($dia<$diaNasc))) ? --$idade : $idade;\n return $idade;\n }", "title": "" }, { "docid": "62355030c8f6dd18d688ec9827954057", "score": "0.6002596", "text": "function buscar_numero($cod_tal,$num_tal, $num_fac,$fecha_anular){\n\t\t\t\t$consulta3 = \"SELECT * FROM factura_anulada_numeracion where cod_talonario = '$cod_tal' AND num_talonario = $num_tal AND n_factura=$num_fac\"; \n\t\t\t\t$result3 = mysql_query($consulta3); \n\t\t\t\t$nfilas3 = mysql_num_rows ($result3); \t\t\t\t\t\n\t\t\t\t$registro3 = mysql_fetch_row($result3); // toma el registro\n\t\t\t\t\n\t\t\t\tif ($nfilas3 > 0){\n\t\t\t\t\t// REGISTRA UNA FACTURA CON LA NUMERACION, PERO COMO ANULADA\n\t\t\t\t\t$usuario_anular = $registro3[4];\n\t\t\t\t\t$consulta4 = \"call alta_factura_vta_no_cliente($num_fac,$fecha_anular,'ANULADO','ANULADO','ANULADO','ANULADO',9999,'ANULADO','ANULADO','ANULADO',9999,'ANULADO',9999,9999,9999,'$cod_tal',$num_tal,9999,9999,9999,9999,9999,'$usuario_anular',9999)\";\n\t\t\t\t\tmysql_query($consulta4);\n\t\t\t\t\t\n\t\t\t\t\t$consulta5 = \"call alta_factura_vta_detalle_no_cliente($num_fac,1,1,1,1,1,1,1,'$cod_tal',$num_tal)\"; \t \t\t\t\n\t\t\t\t\t$result5 = mysql_query($consulta5); // hace la consulta\n\n\t\t\t\t\treturn (buscar_numero($cod_tal,$num_tal,$num_fac + 1,$fecha_anular));\n\t\t\t\t}else{ \n\t\t\t\t\treturn($num_fac);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "dd7f352f4e3cbe057d0b8bbf669cfaef", "score": "0.5975924", "text": "function tribunalExp_Fisica(){\n\t\t\t\n\t\t$query_sql = \"SELECT DISTINCT(tt.nrodoc) as dni,\n\t\t\t\t\t\ttt.id_persona as id_persona,\n\t\t\t\t\t\tcid.id_persona as cid_idpersona,\n\t\t\t\t\t\tid_tipo_persona as tipo_per\n\t\t\t\t\tfrom tribunal_jc.expediente as tt\n\t\t\t\t\tLEFT JOIN cidig.persona cid on tt.nrodoc::varchar = cid.cuil_documento\n\t\t\t\t\tWHERE cid.cuil_documento is not null and tt.id_persona is null and tt.id_tipo_persona = 1 and LENGTH(tt.nrodoc::varchar) >= 7\n\t\t\t\t\tORDER BY tt.nrodoc desc\n\t\t\t\t\tLIMIT 1000\";\n\t\t//personas que no estan en cidig\n\t\t$personaNo_cidig = pg_query(connection_200(), $query_sql);\n\t\treturn $personaNo_cidig;\n\t}", "title": "" }, { "docid": "fffb09f61453885c54cf0d929b667ad2", "score": "0.59686124", "text": "function cariPosisi($batas){\nif(empty($_GET['halberita'])){\n$posisi=0;\n$_GET['halberita']=1;\n}\nelse{\n$posisi = ($_GET['halberita']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "dd59076d684e74a40e926e788bbd047b", "score": "0.59569675", "text": "function SayfalariDoldur($SayfaAdedi) {\r\n $arrSONUC = array();\r\n for($i=1; $i <= $SayfaAdedi; $i++) {\r\n $arrSONUC[] = $i;\r\n }\r\n return $arrSONUC;\r\n }", "title": "" }, { "docid": "17a307bec338bec933cad7c54fcd3d9c", "score": "0.59171987", "text": "function trae_fila($tipo_indice=\"A\") {\n\t\tswitch ($tipo_indice) {\n\t\t\tcase 'A':\t// Tipo de indice Asociativo para el array de datos\n\t\t\t\t$fila = mysqli_fetch_array($this->id_resultado,MYSQLI_ASSOC);\n\t\t\t\tbreak;\n\t\t\tcase 'N':\t// Tipo de indice Numérico para el array de datos\n\t\t\t\t$fila = mysqli_fetch_array($this->id_resultado,MYSQLI_NUM);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$fila = mysqli_fetch_array($this->id_resultado,MYSQLI_ASSOC);\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $fila;\n\t}", "title": "" }, { "docid": "6841bfae60cce797393fe4edd571c144", "score": "0.58957636", "text": "function abos_periode_en_clair($periodicite) {\n\t$nb = intval($periodicite);\n\t$duree = trim(preg_replace(',^\\d+\\s+,', '', $periodicite));\n\t$duree = ($nb == 1 ? _T('abooffre:periodicite_' . $duree) : _T('abooffre:tous_les_nb_' . $duree, ['nb' => $nb]));\n\treturn $duree;\n}", "title": "" }, { "docid": "96d6e703b0fb9a5559807f20cc024f94", "score": "0.5895678", "text": "function SDI(){\n\t\t// $datetime2 = new DateTime($dateactual);\n\t\t// $interval = $datetime1->diff($datetime2);\n\t\t// $anosantiguedad = $interval->format('%y%');\n// \t\t\n\t\t\t$alta = strtotime ( '-1 day' , strtotime ( $_REQUEST['fechaalta']) ) ;\n\t\t\t$alta = date ( 'Y-m-d' , $alta );\n\t\t\t\n\t\t\t$datetime1 = date_create($alta);\n\t\t\t$datetime2 = date_create(date('Y-m-d'));\n\t\t\t$interval = date_diff($datetime1,$datetime2);\n\t\t\t\n\t\t\t$anosantiguedad = $interval->format('%y');\n\t\t\t$tablaantiguedad = $this->CatalogosModel->antiguedades( $anosantiguedad );\n\n\t/*Proporcion por aguinaldo:\n\t* \tdias a que se tiene derecho por ley \n\t* \tentre dias del año\n\t* \tigual a proporcion de aguinaldo\n\t*/\n\n\t\t//dias a que se tiene derecho por ley aguinaldo\n\t\tif($_REQUEST['tipoempleado'] == 1){//sindicalizado\n\t\t\t$aguinaldo = $tablaantiguedad->dias_aguinaldo_si;\n\t\t}else{//confianza\n\t\t\t$aguinaldo = $tablaantiguedad->dias_aguinaldo_c;\n\t\t}\n\t\t//esto lo agrege porq si no no hay propocion\n\t\t// y por ley deben ser 15\n\t\tif(!$aguinaldo){ $aguinaldo = 15; }\n\t\t$proporcionaguinaldo = ($aguinaldo/365);\n\t\t\n\t\t/* \t/\t/\t/\t/\t/\t/\t/\t/\t/\t/\t/\t/\t/\t//\t/\t/\t*/\t\n\t\t\n\t/* Proporcion por vacaciones:\n\t\tdias a que se tiene derecho por ley\n\t\tentre dias del año\n\t\tigual a proporcion por prima de vacaciones */\n\t\t\n\t\tif($_REQUEST['tipoempleado'] == 1){//sindicalizado\n\t\t\t$vacaciones = $tablaantiguedad->dias_vac_sind;\n\t\t}else{//confianza\n\t\t\t$vacaciones = $tablaantiguedad->dias_vac_conf;\n\t\t}\n\t\t//esto lo agrege porq si no no hay propocion\n\t\t// y por ley deben ser 6\n\t\tif(!$vacaciones){ $vacaciones = 6; }\n\t\t$proporcionvaca = ( $vacaciones/365 );\n\n\t\t\n\t\t/* \t/\t/\t/\t/\t/\t/\t/\t/\t/\t/\t/\t/\t/\t/\t/\t/\t/\t*/\t\t\n\t/* Proporcion por Prima Vacacional:\n\t \tporcentaje sobre los dias de vacaciones\n\t \ta los que se tiene derecho por ley\n\t \tigual proporcion por prima vacacional */\n\t \tif($_REQUEST['tipoempleado'] == 1){//sindicalizado\n\t \t\t$prima = $tablaantiguedad->porc_prima_sind;\n\t\t}else{//confianza\n\t\t\t$prima = $tablaantiguedad->porc_prima_conf;\n\t\t}\n\t\t//esto lo agrege porq si no no hay propocion\n\t\t// y por ley deben ser 25\n\t\tif(!$prima){ $prima = 25; }\n\t\t$proporcioprima = ( $proporcionvaca * ($prima/100));\n\t\t\n\t\t/*\t/Determinar el factor integracionn total \t/\t/\t/\t/\t/\t/\t/\t/\t/\t/\t/*/\n\t//proporcion por aguinaldo + proporcion por prima vacacional + la unidad(1)->es uno siempre uno a si lo marca la formula de la ley\n\t\t$factorintegracion = ( $proporcionaguinaldo + $proporcioprima + 1);\n\n\n\t //*\t/\t/\t/\tSDI\t/\t/\t/\t/\t/\t/\t\t/\t/*/\n\t\t$sdi = number_format($_REQUEST['salariodiario'] * $factorintegracion , 4);\n\t\t//echo $proporcionvaca.\"->\".$tablaantiguedad->dias_aguinaldo_si.\"->\".$proporcionaguinaldo.\"->\" .$proporcionvaca.\"->\".$proporcioprima.\"->\".$factorintegracion;\n\t\techo $sdi;\n\t}", "title": "" }, { "docid": "dc4dab7f6c2722fba404dd072c425b83", "score": "0.58932114", "text": "function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "dc4dab7f6c2722fba404dd072c425b83", "score": "0.58932114", "text": "function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "dc4dab7f6c2722fba404dd072c425b83", "score": "0.58932114", "text": "function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "dc4dab7f6c2722fba404dd072c425b83", "score": "0.58932114", "text": "function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "dc4dab7f6c2722fba404dd072c425b83", "score": "0.58932114", "text": "function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "dc4dab7f6c2722fba404dd072c425b83", "score": "0.58932114", "text": "function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "d5470512070c39142fba83d645c5a1df", "score": "0.5886875", "text": "public function getNumeroDispo() {\n //$debutNum = $date->format('Ym');\n global $codeN;\n\t\t$debutNum = 'SC';\n $qb = $this->createQueryBuilder('SousCategorieEntite')\n ->add('select', '(SousCategorieEntite.code)as num');\n $qb->where($qb->expr()->like('SousCategorieEntite.code', ':numero'))\n ->setParameter('numero', '%' . $debutNum . '%');\n //->orderBy('categorieEntite.code', 'DESC');\n //->setMaxResults(1);\n\n $num = $qb->getQuery()\n ->getResult();\n if (count($num) >> 0) {\n \t $code = $num[count($num) -1]['num'];\n\t\t\t //var_dump($code);die();\n\t\t\tfor ($i=8;$i<strlen($code);$i++) { \n\t\t\t\t$codeN .= $code{$i};\n\t\t\t}\n\t\t\t$codeIncrement = $codeN + 1;\n\t\t\t$codeN1 = str_replace($codeN, $codeIncrement, $code);\n\t\t\t//var_dump($codeN1);die();\n\t\t\treturn $codeN1;\n } else {\n return $debutNum . \"01\";\n }\n }", "title": "" }, { "docid": "42e6eab5baee650f7c0dedf134637c80", "score": "0.5867349", "text": "function numerobiglietto(){\n return $this->posti_totali-$this->posti_disponibili;\n }", "title": "" }, { "docid": "6bd099a4a607121e73396a39a218b98f", "score": "0.5867254", "text": "function calcularCantidadIndices($cantidad){\r\n $cantidad/=11;\r\n $cantidad=intval($cantidad);\r\n $cantidad+=2;\r\n return $cantidad;\r\n}", "title": "" }, { "docid": "a9edfac340c3d81005dcb1a82a923676", "score": "0.5848231", "text": "function retorna_diafinal($mes,$ano) {\n \tswitch ($mes) {\n \t\tcase 1 :\n \t\tcase 3 :\n \t\tcase 5 :\n \t\tcase 7 :\n \t\tcase 8 :\n \t\tcase 10 :\n \t\tcase 12 : $dia = 31; \n \t\t\t\t break;\n \t\tcase 2 : if(($ano%4) == 0) {\n \t\t\t\t\t $dia = 29;\t\n \t\t\t\t }\n \t\t\t\t else {\n \t\t\t\t\t $dia = 28;\t\n \t\t\t\t }\n \t\t\t\t break;\n \t\tdefault : $dia = 30;\n \t}\n \t\n \treturn($dia);\n }", "title": "" }, { "docid": "a734694f86690a29a8e79c58d5a1875f", "score": "0.5838824", "text": "function get_nueva_sucursal()\n{\n\t$ultimo_id = obtener_id_maximo_establecimiento($_SESSION['INFORMACION_GENERAL']['EMPRESA']['ID']);\n\t// sumamos 1 para la nueva sucursal\n\t$ultimo_id = $ultimo_id + 1;\n\t// hay que tener en cuenta que pueden haber altas pendientes de sucursales. Consultamos para evitar duplicar nombre de usuarios.\n\t$sql = \"SELECT cse.id AS solicitud_id,\tce.id as cambio_id\n\t\t\tFROM cambios_solicitados_establecimientos cse, cambios_establecimientos ce\n\t\t\tWHERE cse.id = ce.solicitud_id\n\t\t\t AND cse.estado = 'P'\n\t\t\t AND cse.empresa_id = ? \n\t\t\t AND cse.establecimiento_id = ?\n\t\t\t AND ce.tipo_cambio = 'A'\";\n\n\t$rows = CambioSolicitadoEstablecimiento::find_by_sql($sql, array($_SESSION['INFORMACION_GENERAL']['EMPRESA']['ID'], $_SESSION['INFORMACION_GENERAL']['ESTABLECIMIENTO']['ID']));\n\t// aumentamos el ultimo_id teniendo en cuenta los cambios de alta de sucursal pendientes.\n\t$ultimo_id = $ultimo_id + count($rows);\n\n\treturn $ultimo_id;\n\t\n}", "title": "" }, { "docid": "f2d1b5becf646efa510beeab02a62fa2", "score": "0.5836181", "text": "private function contaBissextos(){\n return intval(($this->ano-1)/4) - intval(($this->ano-1)/100) + intval(($this->ano-1)/400);\n }", "title": "" }, { "docid": "4ba2b3440ee4610a287be2b35fe70a4b", "score": "0.5820304", "text": "public function buscaridproximo( )\n\t{\n\t\t\n $mg = Doctrine_Manager::getInstance();\n\t\t\t$conn = $mg->getConnection('metadatos');\n\t\t\t$query = Doctrine_Query::create($conn);\n\n // eliminar el campo\n $result = $query ->select('max(a.idnivelestr) as maximo')\n \t\t\t\t ->from('NomNivelestr a')\n \t\t\t\t ->execute()\n \t\t\t\t ->toArray();\n \t\t\t\t \n $proximo= isset( $result[0]['maximo'] ) ? $result[0]['maximo'] + 1 : 1 ;\t\t\t\n return $proximo;\n \n\t}", "title": "" }, { "docid": "eff0bdc06663b951cabb3a4beec9093a", "score": "0.5815551", "text": "public function generarCodFactura() {\n $pdo = Database::connect();\n $sql = 'select max(COD_CAB_FACT) as cod from tab_fac_cab_facturas';\n $consulta = $pdo->prepare($sql);\n $consulta->execute();\n $res = $consulta->fetch(PDO::FETCH_ASSOC);\n $nuevoCod = '';\n if ($res['cod'] == NULL) {\n $nuevoCod = 'REC-00001';\n } else {\n $rest = ((substr($res['cod'], -5)) + 1) . ''; // Separacion de la parte numerica REC-00023 --> 23\n // Ciclo que completa el codigo segun lo retornado para completar los 9 caracteres \n // REC-000 --> 67, REC-00 --> 786\n if ($rest > 1 && $rest <= 9) {\n $nuevoCod = 'REC-0000' . $rest;\n } else {\n if ($rest >= 10 && $rest <= 99) {\n $nuevoCod = 'REC-000' . $rest;\n } else {\n if ($rest >= 100 && $rest <= 999) {\n $nuevoCod = 'REC-00' . $rest;\n } else {\n if($rest >= 1000 && $rest <= 9999){\n $nuevoCod = 'REC-0' . $rest;\n }else{\n $nuevoCod = 'REC-' . $rest;\n }\n \n }\n }\n }\n }\n Database::disconnect();\n return $nuevoCod; // RETORNO DEL NUEVO CODIGO DEL RECIBO\n }", "title": "" }, { "docid": "d655d8080e8a2c1b4a72b3425a57f663", "score": "0.5813315", "text": "function cariPosisi($bts){\nif(empty($_GET['halaman'])){\n\t$ps=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$ps = ($_GET['halaman']-1) * $bts;\n}\nreturn $ps;\n}", "title": "" }, { "docid": "6e67734c02f59c606d4d721c80681196", "score": "0.5806988", "text": "function siguiente($pagina){\n $pagina = $pagina+4;\n return $pagina;\n}", "title": "" }, { "docid": "9f8b49f44774b1c3b0c0c53f5db25649", "score": "0.5804448", "text": "function atualizaFrete( $_cep = null , $_peso = null, $isento = null, $dimensao ){\n\tglobal $pagina,$cadastro,$db,$ret,$xmlFrete,$pedido,$isento;\n\t\n\t\t\t\t\t\tforeach($pedido->itens as $item){\n\t\t\t\t\t\t\t$_DC = false;\n\t\t\t\t\t\t\t//foreach($item->produtos->categorias as $c){\n\t\t\t\t\t\t\t\t//if($c->id == 33)\n\t\t\t\t\t\t\t\t\t//$_DC = true;\n\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\t//if($item->produtos->has(\"categorias\",array(31,35,70)))\n\t\t\t\t\t\t\t\t//$_TEEC = true;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($item->produtos->frete_gratis != 'nao' and count($pedido->itens) == 1){\n\t\t\t\t\t\t\t\t$frete_gratis = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//if($_DC or $item->produtos->frete_gratis == 'sim' ){\n\t\t\t\t\t\t\t\t//$peso += 0.01;\n\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\t//else\n\t\t\t\t\t\t\tif($item->clientes->id > 1){\n\t\t\t\t\t\t\t\t$peso += 0.01;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$peso += max(($item->produtos->peso + $item->produtos->peso_volumetrico)/2,0.3)*$item->quantidade;\n\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$ret['peso'] = $peso;\n\tif(count($pedido->itens) > 0){\n\t\t\n\t\t$cep = preg_replace(\"/[^0-9]/\",\"\",$_cep);\n $local = carregaCEP($cep);\n\t\t\t\n\t\tif($local['uf'] == 'SC'){\n\t\t\t\t\t//$isento = true;\n\t\t}\n\t\t\n\t\t\n\t\tif($pedido->valor > $pagina->configs['limite_frete_gratis']){\n\t\t\tif(ereg(\"SC\",$local['uf'])){\n\t\t\t\t\t//$isento = true;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif($frete_gratis){\n\t\t\t\t\t$isento = true;\n\t\t}\n\t\t\t\t\t\n\t\t//echo \"$peso . $_log . $_cid . $isento . $FC\". $item->produtos->frete_gratis;\t\t\t\t\t\t\t\t\t\n\t\t$valor = calculaFrete($pagina->configs['cep'] , $_cep ,$peso, $isento, $dimensao);\n\t\t\n\t\t\n\t\tif(!is_array($ret)) $ret = array();\n\t\t\n\t\t$ret = array_merge($ret,$valor);\n\t\tif($valor['isento'] == true or $isento == true){\n\t\t\t$valor['pac_valor'] = $_POST['valor_frete'] = \"0,00\";\n\t\t\t$_POST['prazo'] = $valor['pac_valor'];\n\t\t\n\t\t\t$db->editar('pedidos',$pedido->id);\n\t\t\tunset($pedido);\n\t\t\t$pedido = new objetoDb('pedidos',$pedido->id,true);\n\t\t\treturn '\n\t\t\tPeso: <strong>'.$peso.'kg</strong><br>\n\t\t\t<div class=\"pedidoSubTotal\">\n\t\t\t<input type=\"radio\" format=\"EN\" checked=\"checked\" name=\"item_frete_1\" value=\"0\" />\n\t\t\t<input type=\"hidden\" name=\"prazo[EN]\" value=\"'.$valor['pac_prazo'].'\" />\n\t\t\t<strong>'.$valor['mensagem'].'</strong><br>Prazo de Entrega: <strong>'.$valor['pac_prazo'].' dias</strong></div>\n\t\t\t\n\t\t\t\n\t\t\t<input type=\"hidden\" name=\"tipo_frete\" id=\"tipo_frete\" value=\"EN\" checked=\"true\" />\n\t\t\t<input type=\"hidden\" name=\"item_peso_1\" value=\"'.$_peso.'\" />';\n\t\t}else{\n\t\t\t$_POST['valor_frete'] = number_format($valor['pac_valor'],2,',','.');\n\t\t\t$_POST['prazo'] = $valor['pac_valor'];\n\t\t\n\t\t\t$db->editar('pedidos',$pedido->id);\n\t\t\tunset($pedido);\n\t\t\t$pedido = new objetoDb('pedidos',$pedido->id,true);\n\t\t\t//pre($pedido->valor_frete);\n\t\t\t\n\t\t\t$ret = '\n\t\t\tPeso: <strong>'.$_peso.'kg</strong><small>Peso com embalagem ou Peso Cúbico</small><br>\n\t\t\t<div class=\"pedidoSubTotal\">\n\t\t\t<input type=\"radio\" onchange=\"carrinho.mudaFormatoFrete(this)\" format=\"EN\" checked=\"checked\" name=\"item_frete_1\" value=\"'.number_format($valor['pac_valor'],2,',','').'\" />\n\t\t\t<input type=\"hidden\" name=\"prazo[EN]\" value=\"'.$valor['pac_prazo'].'\" />\n\t\t\tEncomenda normal: <strong>R$'.number_format($valor['pac_valor'],2,',','.').'</strong><br>Prazo de Entrega: <strong>'.$valor['pac_prazo'].' dias</strong></div>';\n\t\t\t\n\t\t\tif ((float)$valor['sed_valor'] > 0) $ret .= '\n\t\t\t<div class=\"pedidoSubTotal\">\n\t\t\t<input type=\"radio\" onchange=\"carrinho.mudaFormatoFrete(this)\" format=\"SEDEX\" name=\"item_frete_1\" value=\"'.number_format($valor['sed_valor'],2,',','').'\" />\n\t\t\t<input type=\"hidden\" name=\"prazo[SEDEX]\" value=\"'.$valor['sed_prazo'].'\" />\n\t\t\tSedex: <strong>R$'.number_format($valor['sed_valor'],2,',','.').'</strong><br>Prazo de Entrega: <strong>'.$valor['sed_prazo'].' dias</strong></div>';\n\t\t\t\n\t\t\tif ((float)$valor['ese_valor'] > 0) $ret .= '\n\t\t\t<div class=\"pedidoSubTotal\">\n\t\t\t<input type=\"radio\" onchange=\"carrinho.mudaFormatoFrete(this)\" format=\"e-SEDEX\" name=\"item_frete_1\" value=\"'.number_format($valor['ese_valor'],2,',','').'\" />\n\t\t\t<input type=\"hidden\" name=\"prazo[e-SEDEX]\" value=\"'.$valor['ese_prazo'].'\" />\n\t\t\tVia e-Sedex: <strong>R$'.number_format($valor['ese_valor'],2,',','.').'</strong><br>Prazo de Entrega: <strong>'.$valor['ese_prazo'].' dias</strong></div>';\n\t\t\t\n\t\t\treturn $ret;\n\t\t}\n\t}else{\n\t\t return \"<h3>O carrinho está vazio</h3>\";\n\t}\n}", "title": "" }, { "docid": "f3a7255ce5c62ccd91a6020fa43c659f", "score": "0.58006895", "text": "public function Dias_Respuesta($fecharegistro,$fecharespuesta){\n\t\n\t\t\t\t\n\t\trequire_once('funciones/Festivos.php');\n\t\t\n\t\t$dias_diferencia = 0;\n\t\t\n\t\tif($fecharespuesta != \"0000-00-00\"){\n\t\t\n\t\t\t\n\t\t\t//FECHA INCIAL\n\t\t\t$inicio = new DateTime($fecharegistro);\n\t\t\t//Un día es P1D,Dos días es P2D, \n\t\t\t//es decir que si la fecha inicial es 2015-05-19 y la final es 2015-05-27\n\t\t\t//el intervalos iria de 2015-05-19 2015-05-20 2015-05-21 2015-05-22 2015-05-23 2015-05-24 2015-05-25 2015-05-26\n\t\t\t$intervalo = new DateInterval('P1D');\n\t\t\t//FECHA FINAL\n $fin = new DateTime($fecharespuesta);\n\t\t\t//CREO EL PERIODO SEGUN LOS DATOS ANTERIORES\n\t\t\t$periodo = new DatePeriod($inicio,$intervalo,$fin);\n\t\t\t\n\t\t\tforeach ($periodo as $fecha) {\n\t\t\t\n \t\t\t//echo $fecha->format('Y-m-d').\"\\n\";\n\t\t\t\t//$dias_diferencia = $dias_diferencia.\" \".$fecha->format('Y-m-d').\"\\n\";\n\t\t\t\t\n\t\t\t\t//OBTENGO FECHA A FECHA, DESDE LA INCIAL A LA FINAL Y CAPTURO SU AÑO,MES,DIA\n\t\t\t\t$fechaperiodo = explode(\"-\",$fecha->format('Y-m-d'));\n\t\t\t\t$y = trim($fechaperiodo[0]);\n\t\t\t $m = trim($fechaperiodo[1]);\n\t\t\t $d = trim($fechaperiodo[2]);\n\t\t\t\t//OBTENGO EL DIA SEGUN LA FECHA PASADA A $fechaperiodo CON SUS PARTES AÑO,MES,DIA\n\t\t\t\t$date = date('D', mktime(0,0,0,$m,$d,$y));\n\t\t\t\t\n\t\t\t\t//PARA DIAS FESTIVOS, SE INSTANCIA LA CLASE Y SE LLAMA LA FUNCION PARA SABER SI UN DIA ES FESTIVO\n\t\t\t\t$dias_festivos = new festivos($y);\n\t\t\t\t$esfestivo = $dias_festivos->esFestivo($d,$m);\n\t\t\t\t\n\t\t\t\t//SE REALIZA LA PREGUNTA SI ES SABADO, DOMINGO O FESTIVO\n\t\t\t\t//PARA NO INCREMENTAR $dias_diferencia\n\t\t\t\tif($date == 'Sat' or $date == 'Sun' or $esfestivo == 1){\n\t\t\t\n\t\t\t\t\t$bandera = 0;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\n\t\t\t\t\t$dias_diferencia = $dias_diferencia + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//$dias_diferencia = $dias_diferencia.\" \".$date.\"\\n\";\n\t\t\t}\n\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\t$dias_diferencia = \"-\";\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $dias_diferencia;\n\t\n\t}", "title": "" }, { "docid": "f22432354b1dcf10fd101c986f174160", "score": "0.57994616", "text": "function cari_posisi($batas){\n if(empty($_GET['hal'])){\n $posisi=0;\n $_GET['hal']=1;\n } else{\n $posisi = ($_GET['hal']-1) * $batas;\n }\n return $posisi;\n }", "title": "" }, { "docid": "b77bef6484fb246d946690404029ebf4", "score": "0.57934713", "text": "function obtener_valorxescala($id_realiza){\n \tparent::conectar();\n\n $sql=\"SELECT (case when LIMITES2=0 then LIMITES1 when LIMITES2!=0 then LIMITES2 END) AS LIMITE FROM `view_escalasxempresa` WHERE ID_REALIZA=$id_realiza\";\n $record_consulta=$this->obj_con->Execute($sql); \n $N=0; /* almacena el limite de la escala*/\n\t\t\twhile(!$record_consulta->EOF){\n \t\t\t \t$N=$record_consulta->fields[\"LIMITE\"];\n \t\t\t \t$record_consulta->MoveNext();\n \t\t\t } \n\n\n for($i=0;$i<$N;$i++){\n $data1[] = array('idvalor'=>($i+1),'descripcion'=>' ');\n }\n\n $repuesta = array('success'=>true,'data'=>$data1); \n\n return $repuesta;\n\n\n\n \n\n\n }", "title": "" }, { "docid": "39f20416401725082ba63bfe700c4959", "score": "0.57881355", "text": "public function getNomina($idn, $iddn, $idin, $ide ,$diasLab, $diasVac ,$horas ,$formula ,$tipo ,$idCcos ,\n $idCon, $ac, $tipn,$dev,$ded,$idfor,$diasLabC,$idCpres,$calc,$conVac,$obId)\n { \n // $ac Insertar o modificar novedad ( 0: nuevo 1:modificar )\n // $idn Id de la nomina\n // $iddn Id dcumento de novedad (n_nomina_e)\n // $idin Id novedad (n_nomina_e_d)\n // $ide Id del empleado\n // $diasLab Dias laborados \n // $diasVac Dias vacaciones\n // $horas Horas laborados o valores\n // $formula Formula\n // $tipo Devengado o Deducido \n // $idCcos id del Centro de costo \n // $idCon id del Concepto\n // $ac accion \n // $tipn Tipo dde novedad ( 1: tipos auto, 2:otros automa, 3:calculados )\n // $dev Devengados de consulta\n // $ded Deducidos de consulta\n // idfor Ide de la formula, importante para determinar si es calculada o MANUAL\n // $diasLabC Dias laborados, solo para calculados\n // $idCpres Id de la cuota de un prestamo \n // $calc Define si se calcula o se deja el concepto con los valoes que viene\n // $conVac Si es 1 el concepto se recalcula con dias calendario en vacaciones para pagar o descontar\n // $obId Obtener id\n $t = new AlbumTable($this->adapter); \n $datAus = $t->getGeneral1(\"select count(id) as sw from n_nomina_e where dias=0 and aus=1 and id = \".$iddn); // Verificar si esta asutente totalmente \n if ($datAus['sw']==0) // Valdiacion importante para empleados ausentes\n\t {\n $saldoPact=0; // Variable para saldos de prestamos\n \n if ($calc==0) // Debe ser calculado el concepto , si es 1 ya fue calculado\n { \n // Funcion de formula \n //if ( ($dev==0) and ($ded==0) )\n //{\n $datFor = $this->getFormula($formula,$idfor,$tipo,$horas,$ide,$iddn,$diasLab, $diasVac,$idCon);// Funcion de formulas\n if ($datFor['dev']>0)\n $dev = $datFor['dev'];\n if ($datFor['ded']>0)\n $ded = $datFor['ded'];\n // }\n // if ( ( $horas > 0 ) ) // Si hay horas se calcula \n // {\n // $datFor = $this->getFormula($formula,$idfor,$tipo,$horas,$ide,$iddn,$diasLab, $diasVac,$idCon);// Funcion de formulas\n // if ($datFor['dev']>0)\n // $dev = $datFor['dev'];\n // if ($datFor['ded']>0)\n // $ded = $datFor['ded'];\n // } \n //} \n // CONCEPTOS EN AUTOMATICOS QUE SE CALCULEN NUEVAMENTE CONDIAS CALENDARIO PARA PAGARLOS DURANTE LAS VACACIONES\n if ( ($conVac>0) and ($diasVac>0) )\n {\n $datFor = $this->getFormula($formula,$idfor,$tipo,$horas,$ide,$iddn,15, 0,$idCon);// Funcion de formulas\n if ($datFor['dev']>0)\n $dev = $dev + $datFor['dev'];\n if ($datFor['ded']>0)\n $ded = $ded + $datFor['ded'];\n } \n \n }else{\n if ($idCpres>0) // Se Valida el saldo del prestamo realizado\n {\n // BUscar saldo actual del prestamo\n $datNom = $t->getGeneral1(\"select idTnom from n_nomina where id = \".$idn);\n $datPres = $t->getGeneral1(\"select valor-(pagado+saldoIni) as saldoAct \"\n .\" from n_prestamos_tn where id=\".$idCpres.\" and idTnom=\".$datNom['idTnom']);\n\t\t\t \n\t\t\t $saldoPact = $datPres['saldoAct'];\t\t\t\t\t\t \n\t\t\t if ( $ded > $saldoPact )\t\t\t\t\t \n $ded = $saldoPact; // Se pone el saldo actual para cobro\n }\n }\n // --- \n \n if ( ($dev>0) or ($ded>0))\n {\n $dev = round($dev,0); \n $ded = round($ded,0); \n $detalle = '';\n // Comportamiento del concepto con respecto a los fondos de salud y pension\n $datCon = $t->getGeneral1(\"select fondo from n_conceptos where id = \".$idCon);\n if ( $datCon['fondo']>0 ) // Aplica datos de los fondos\n {\n $fondo = $datCon['fondo']; \n // Consulta fondos del empleado\n $datEmp = $t->getGeneral1(\"select d.nombre as nomSal, e.nombre as nomPen,\n\t\t\t\tf.nombre as nomCes, g.nombre as nomArp, g.nombre as nomFav, h.nombre as nomFafc \n from a_empleados a \n inner join n_cencostos c on a.idCcos=c.id \n inner join t_fondos d on d.id=a.idFsal\n inner join t_fondos e on e.id=a.idFpen\n left join t_fondos f on f.id=a.idFces\n left join t_fondos g on g.id=a.idFarp \n left join t_fondos h on h.id=a.idFav \n left join t_fondos i on i.id=a.idFafc where a.id=\".$ide); \n switch ($fondo) {\n case 1:// Salud \n $detalle = $datEmp['nomSal'];\n break;\n case 2:// Pension\n $detalle = $datEmp['nomPen'];\n break;\n default:\n break;\n } \n \n }// Fin validacion datos de los fondos\n \n // Guardar cambios\n If ($ac==0) // Inertar registro\n {\n //$result=$this->adapter->query(\"call getGenomina(\".$idn.\",\".$iddn.\",\".$idCon.\",\".$idCcos.\",\".$horas.\",\".$tipn.\",\".$dev.\",\".$ded.\",'\".$var.\"')\",Adapter::QUERY_MODE_EXECUTE); \n $result=$this->adapter->query(\"insert into n_nomina_e_d (idNom,idInom,idConc,idCcos,horas,tipo,devengado, deducido, horDias, idCpres, saldoPact, detalle)\nvalues (\".$idn.\",\".$iddn.\",\".$idCon.\",\".$idCcos.\",\".$horas.\",\".$tipn.\",\".$dev.\",\".$ded.\",\".$diasLabC.\",\".$idCpres.\",\".$saldoPact.\",'\".$detalle.\"' );\" ,Adapter::QUERY_MODE_EXECUTE); \n if ($obId == 1)\n {\n $id = $this->adapter->getDriver()->getLastGeneratedValue(); \n return $id; \n }else \n return 0; \n }else{ // Modificar registro\n $result=$this->adapter->query(\"Update n_nomina_e_d set idCcos=\".$idCcos.\",horas=\".$horas.\",devengado=\".$dev.\", \n deducido=\".$ded.\", saldoPact=\".$saldoPact.\" where id =\".$idin ,Adapter::QUERY_MODE_EXECUTE); \n return 0; \n }\n }// Validar que valor no sea cero \n }// Validar ausentismo total del empleado \n }", "title": "" }, { "docid": "e682b346ca01679fd0f05800ee24a540", "score": "0.5785937", "text": "public function buscaridproximo()\r\n {\r\n\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n\r\n // eliminar el campo\r\n $result = $query->select('max(a.idtipocifra) as maximo')\r\n ->from('NomTipocifra a')\r\n ->execute()\r\n ->toArray();\r\n\r\n $proximo = isset($result[0]['maximo']) ? $result[0]['maximo'] + 1 : 1;\r\n return $proximo;\r\n\r\n }", "title": "" }, { "docid": "b15aa2a5fc4d54166aba1a97dd3fc12c", "score": "0.5785428", "text": "function cariPosisi($batas){\nif(empty($_GET['halproduk'])){\n\t$posisi=0;\n\t$_GET['halproduk']=1;\n}\nelse{\n\t$posisi = ($_GET['halproduk']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "74dcf550f61916002493047d69792590", "score": "0.5773435", "text": "function getTrimestreSuivantNb(){\n $trimestreActuel = getTrimestre();\n $trimestreSuivant = 0;\n if ($trimestreActuel == 1) {\n $trimestreSuivant = 2;\n }else if ($trimestreActuel == 2) {\n $trimestreSuivant = 3;\n }else if ($trimestreActuel == 3) {\n $trimestreSuivant = 4;\n }else{\n $trimestreSuivant == 1;\n }\n return $trimestreSuivant;\n}", "title": "" }, { "docid": "887ba7d2caeb27ac2769919fe62fcf19", "score": "0.5766326", "text": "public function getRecalculo($idn)\n {\n $u = new Gnominag($this->adapter);\n // *-------------------------------------------------------------------------------\n // ----------- RECALCULO DE DOCUMENTO DE NOMINA -----------------------------------\n // *-------------------------------------------------------------------------------\n $datos2 = $u->getDocNove($idn, \" and b.tipo in ('0','1','3')\" );// Insertar nov automaticas ( n_nomina_e_d ) por tipos de automaticos \n foreach ($datos2 as $dato)\n { \n $id = $dato['idNom'];; // Id nomina \n $iddn = $idn; // Id dcumento de novedad\n $idin = $dato['id']; // Id novedad\n $ide = $dato['idEmp']; // Id empleado\n $diasLab = $dato['dias']; // Dias laborados \n $diasVac = $dato['diasVac']; // Dias vacaciones\n $horas = $dato[\"horas\"]; // Horas laborados \n $formula = $dato[\"formula\"]; // Formula\n $tipo = $dato[\"tipo\"]; // Devengado o Deducido \n $idCcos = $dato[\"idCcos\"]; // Centro de costo \n $idCon = $dato[\"idCon\"]; // Concepto\n $dev = $dato[\"devengado\"]; // Devengado\n $ded = $dato[\"deducido\"]; // Deducido \n $idfor = $dato[\"idFor\"]; // Id de la formula \n $diasLabC= $dato[\"horDias\"]; // Si se afecta el cambio de dias laborados en el registro \n $conVac = 0;\n $obId = 0;\n // Llamado de funion -------------------------------------------------------------------\n $this->getNomina($id, $iddn, $idin, $ide ,$diasLab,$diasVac ,$horas ,$formula ,$tipo ,$idCcos , $idCon, 1, 2,$dev,$ded,$idfor,$diasLabC,0,0,$conVac,$obId); \n }\n }", "title": "" }, { "docid": "41701385fd6979ee6c47af4b58fe1cef", "score": "0.5764547", "text": "private\tfunction getRetefuente($salud,$pension,$fondosp,$tdevengado){\t\t \n\t /**\n\t *En esta primera condicion se mira si es docente y se recalcula nuevamente el total devengado con la suma\n\t *de la prima de antiguedad; sueldo por los dias trabajados. Luego se le calcula el 50% de dicha suma.\n\t *Tambien se le agrega la bonificacion pero no el 50% de esta bonificacion sino completa\n\t */\n\t\t/**\n\t\t *Se verifica si es docente\n\t\t*/\n\t\tif($this->Tipocargo->TICA_ID==2){\n\t\t $prantiguedad = $this->getPrimaAntiguedad();\t\t \n\t\t $valor = ((($this->Empleoplanta->EMPL_SUELDO)*($this->Empleoplanta->EMPL_DIASAPAGAR)/30));\n\t\t \n\t\t /**\n\t\t *Se declara la variable $valor con el resultado del condicional\n\t\t */\n\t\t $valor = (($valor+$prantiguedad[1])/2)+$this->getBonServiciosPrestados();\t\t\n\t\t}elseif($this->Tipocargo->TICA_ID==1){\n\t\t /**\n\t\t *Si el empleado es administrativo se toma el total devengado que viene como parametro. \n\t\t */\n\t\t $valor = $tdevengado;\n\t\t \n\t\t /**\n\t\t *Si el empleado es el rector (Nivel = 1; Grado = 17), se exceptua el Gasto de representacion tal y como esta en el sigte condicional\n\t\t */ \n if(($this->Empleoplanta->NIVE_ID==1) && ($this->Empleoplanta->GRAD_ID==17)){\n \t $valor = $valor-round($this->getGastosRepresentacion());\n }\n }\n\t\t \n\t\t /**\n\t\t *Recalcular $valor teniendo en cuenta los factores de retefuente\n\t\t *Menos: Deducciones del art. 387 del E.T.\n\t\t */\n\t\t $valor = $valor-($this->getFactorRetefuente(1)+$this->getFactorRetefuente(2)+$this->getFactorRetefuente(3));\n\t\t \n\t\t /**\n\t\t *Recalcular $valor teniendo en lo siguiente :\n\t\t *Menos: Deducción por aportes a salud obligatoria\n\t\t *-Aporte mensual promedio que hizo durante el año gravable anterior por aportes obligatorios\n\t\t *a salud (Ver concepto DIAN 81294 oct./09; y Dec. 2271 de junio de 2009 )\n\t\t */\n\t\t $valor = $valor-($this->getPagoSaludAnioAnterior());\n\t\t /**\n\t\t *Recalcular $valor teniendo en lo siguiente :\n\t\t *Menos: Deducciones del art. 4 del decreto 2271 de junio de 2009\n\t\t *-Aportes a salud del propio mes que el cobrador de servicios demuestre estar realizando\n\t\t */\n\t\t $valor = $valor-($salud);\n\t\t \n\t\t /**\n\t\t *Recalcular $valor teniendo en lo siguiente :\n\t\t *Menos: Rentas exentas del art. 126-1 y 126-4 del E.T\n\t\t *-Aportes obligatorios del propio mes a los fondos de pensiones \n\t\t *-Aportes voluntarios del propio mes a los fondos de pensiones voluntarias \n\t\t *-Aportes voluntarios del propio mes a las cuentas de ahorro AFC \n\t\t */\n\t\t //echo '<br><br><br>';\n\t\t $valor = $valor-($pension+$fondosp+$this->getDescuentosMensuales(28)+0);\n\t\t \n\t\t /**\n\t\t *Recalcular $valor teniendo en lo siguiente :\n\t\t *Menos: El 25% del $valor, sin que mensualmente exceda de 240 UVTs (es decir, 240 x $27.485 = $6.596.000 ) \n\t\t *(ver numeral 10 del art. 206 del E.T. que fue modificado con el art. 6 de la Ley 1607) \n\t\t */\t\t\n $valor=$valor-($valor*0.25);\n\t\t \n\t\t if($this->Factorsalarial->FASA_RETEFUENTE==\"t\"){\n\t\t $uvt=$this->valorestablecidos[10][3];\t\n\t\t $rango=$valor/$uvt;\n\t\t if ($rango>0 and $rango<=95){\n\t\t $total = 0;\n\t\t }\n\t\t if ($rango>95 and $rango<=150){\n\t\t $total=($rango-95)*0.19;\n\t\t }\n\t\t if ($rango>150 and $rango<=360){\n\t\t $total=($rango-150)*0.28+10;\n\t\t }\n\t\t if ($rango>360){\n\t\t $total=($rango-360)*0.33+69;\n\t\t }\n\t\t // echo '<br><br><br>'.round($total*$uvt);\n\t\t return round($total*$uvt);\t\t\n\t\t}\n\t\t\n\t\treturn 0;\t\n\t}", "title": "" }, { "docid": "1ba7161060f928d6aa180c4aa698695b", "score": "0.5747398", "text": "function buscarIDPM(){\n\t$query2 = \"SELECT idpedidomateriales FROM pedidomateriales ORDER BY idpedidomateriales DESC LIMIT 1\"; \n\t$conexion2=Conectarse();$tot=0;\n\t$rs =mysqli_query($conexion2,$query2);\n\t$tot=mysqli_num_rows($rs);\n\t if ($tot!=0) {\n\t $row=@mysqli_fetch_array($rs);\n\t\t$idpedidomateriales = $row['idpedidomateriales']+ 1;\n\t\t }else{$idpedidomateriales=1;}\n\t\tmysqli_free_result($rs);\t mysqli_close($conexion2);\n\t return $idpedidomateriales;\n }", "title": "" }, { "docid": "b8db2cb79169a68f8f0d95d479218bef", "score": "0.57457155", "text": "function calcularImpuestoRenta() {\n\t\tglobal $sueldoTributable,$impuestoRentaFactor, $impuestoRentaRebaja, $impuestoRenta;\n\t\t\n\t\t// tabla de servicios impuestos correspondiente al mes de mayo 2014\n\t\t// http://www.sii.cl/pagina/valores/segundacategoria/imp_2da_mayo2014.htm\n\t\tif($sueldoTributable > 0 && $sueldoTributable <= 564313.50) {\n\t\t\t$impuestoRentaFactor = 0;\n\t\t\t$impuestoRentaRebaja = 0;\n\t\t\t$impuestoRenta = 0;\n\t\t} else if($sueldoTributable > 564313.50 && $sueldoTributable <= 1254030) {\n\t\t\t$impuestoRentaFactor = 0.04;\n\t\t\t$impuestoRentaRebaja = 22572.54;\n\t\t\t$impuestoRenta = ($sueldoTributable * $impuestoRentaFactor) - $impuestoRentaRebaja;\n\t\t} else if($sueldoTributable > 1254030 && $sueldoTributable <= 2090050) {\n\t\t\t$impuestoRentaFactor = 0.08;\n\t\t\t$impuestoRentaRebaja = 72733.74;\n\t\t\t$impuestoRenta = ($sueldoTributable * $impuestoRentaFactor) - $impuestoRentaRebaja;\n\t\t} else if($sueldoTributable > 2090050 && $sueldoTributable <= 2926070) {\n\t\t\t$impuestoRentaFactor = 0.135;\n\t\t\t$impuestoRentaRebaja = 187686.49;\n\t\t\t$impuestoRenta = ($sueldoTributable * $impuestoRentaFactor) - $impuestoRentaRebaja;\n\t\t} else if($sueldoTributable > 2926070 && $sueldoTributable <= 3762090) {\n\t\t\t$impuestoRentaFactor = 0.23;\n\t\t\t$impuestoRentaRebaja = 465663.14;\n\t\t\t$impuestoRenta = ($sueldoTributable * $impuestoRentaFactor) - $impuestoRentaRebaja;\n\t\t} else if($sueldoTributable > 3762090 && $sueldoTributable <= 5016120) {\n\t\t\t$impuestoRentaFactor = 0.304 ;\n\t\t\t$impuestoRentaRebaja = 744057.8;\n\t\t\t$impuestoRenta = ($sueldoTributable * $impuestoRentaFactor) - $impuestoRentaRebaja;\n\t\t} else if($sueldoTributable > 5016120 && $sueldoTributable <= 6270150) {\n\t\t\t$impuestoRentaFactor = 0.355;\n\t\t\t$impuestoRentaRebaja = 999879.92;\n\t\t\t$impuestoRenta = ($sueldoTributable * $impuestoRentaFactor) - $impuestoRentaRebaja;\n\t\t} else if($sueldoTributable > 6270150) {\n\t\t\t$impuestoRentaFactor = 0.4;\n\t\t\t$impuestoRentaRebaja = 1282036.67;\n\t\t\t$impuestoRenta = ($sueldoTributable * $impuestoRentaFactor) - $impuestoRentaRebaja;\n\t\t}\t\n\t}", "title": "" }, { "docid": "26be3e276aed7ae1c5fb0fe62aa9c814", "score": "0.5741793", "text": "function precofinal($preco, $iva)\n{\n\n return $res = $preco * (1 + $iva / 100);\n}", "title": "" }, { "docid": "4f466ea9bad5ed25f8c0b386232677cb", "score": "0.5741224", "text": "function dialetras2($numero){\n$dias = array('','Lunes','Martes','Miercoles','Jueves','Viernes','Sabado','Domingo');\n$dialetras = $dias[$numero];\nreturn $dialetras;\n}", "title": "" }, { "docid": "ad493b013ad6c809e2d03c665e157868", "score": "0.57400453", "text": "function ultimaconciliacion($idbancaria,$periodo,$ejercicio){\n\t\tif($periodo == 1){\n\t\t $ejercicio = $ejercicio-1;\n\t\t}\n\t\t$sql = $this->query(\"select * from bco_saldos_conciliacionBancos where idbancaria=\".$idbancaria.\" ORDER BY id ASC LIMIT 1\");\n\t\tif($sql->num_rows>0){\n\t\t\t$val = $sql->fetch_object();\n\t\t\treturn $val->periodo.\"-\".$val->ejercicio;\n\t\t}else{\n\t\t\treturn 1;\n\t\t}\n\t}", "title": "" }, { "docid": "0bcba92944845f2cd64c28343602cc76", "score": "0.57374424", "text": "function getImportesFactura_mn($moneda, $notasImporteFactura, $tipoCambioRow){\n\t\tif ($moneda==\"DLS\") {\n\t\t\t$notasImporteFactura_mn = round(($notasImporteFactura*$tipoCambioRow),2);\n\t\t}else {\n\t\t\t$notasImporteFactura_mn = round($notasImporteFactura,2);\n\t\t}\n\t\treturn $notasImporteFactura_mn;\n\t}", "title": "" }, { "docid": "38128b157ff8b30448da48fc0b62f966", "score": "0.57287544", "text": "public function perimetrotriangulo(){\n $perimetro1=$this->altura*2+$this->base;\n return $perimetro1;\n\n}", "title": "" }, { "docid": "e87a1c2ad51959b3530101474cacf5df", "score": "0.5726428", "text": "public function buscaridproximo()\r\n {\r\n\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n\r\n // eliminar el campo\r\n $result = $query->select('max(s.idsalario) as maximo')\r\n ->from('NomSalario s')\r\n ->execute()\r\n ->toArray();\r\n\r\n $proximo = isset($result[0]['maximo']) ? $result[0]['maximo'] + 1 : 1;\r\n return $proximo;\r\n\r\n }", "title": "" }, { "docid": "bb0d3be0bdba4ff605c724cfb9facd58", "score": "0.57194746", "text": "function retorne_numero_seguidores($idusuario){\n\n// tabela\n$tabela = TABELA_SEGUIDORES;\n\n// query\n$query = \"select *from $tabela where idusuario='$idusuario';\";\n\n// retorno\nreturn retorne_tamanho_resultado(retorne_numero_linhas_query($query));\n\n}", "title": "" }, { "docid": "dcfb53b19c26747efa49aebbd21ce6d5", "score": "0.571037", "text": "private function dataParaDias(){\n // total dias de um ano vezes ano informado -1 \n $total = ($this->ano -1) * 365;\n\n for ($mes=1; $mes < $this->mes; $mes++) { \n //adiciona a quantidade de dias do mes informado - 1 \n $total+= $this->meses[$mes-1];\n }\n // adiciona a quantidade de dias informado -1 \n $total += ($this->dia - 1) ;\n\n // conta quantos anos bissextos tiveram até a data informada\n $qtdDiasExtras = $this->contaBissextos();\n // soma a quantidade de dias extras dos anos bissextos\n $total += $qtdDiasExtras ;\n\n if($this->Bissexto() && $this->mes -1 >= 2){\n // se o ano atual é bissesto e o mes informado -1 é posterior a fevereiro \n // soma um dia;\n $total += 1;\n }\n\n $this->numDias = $total;\n }", "title": "" }, { "docid": "9e1c3254494f295f9c980ff7c46754c7", "score": "0.5704405", "text": "function getSecuencia_0($secuencia, $codigo, $tabla, $valor) {\r\n\tconnect();\r\n\t$sql = \"SELECT * FROM $tabla WHERE $codigo = '$valor'\";\r\n\t$query = mysql_query ($sql) or die ($sql.mysql_error());\r\n\tif (mysql_num_rows($query) != 0) {\r\n\t\t$sql=\"select MAX($secuencia) FROM $tabla WHERE $codigo='$valor'\";\r\n\t\t$query=mysql_query($sql) or die ($sql.mysql_error());\r\n\t\t$field=mysql_fetch_array($query);\r\n\t\t$secuencia=(int) ($field[0]+1);\r\n\t\treturn ($secuencia);\r\n\t} else return 0;\r\n\t\r\n}", "title": "" }, { "docid": "5203385d1232eeeb96e0feb12dfc1fe1", "score": "0.5699593", "text": "public function GetPendienteDebitar()\n\t{\n\t\t$query\t=\t\"\n \tselect sum(c.importe) Pendiente\n \tfrom cheque c\n \twhere c.estado='Pendiente debitar'\n \tand c.fechaanulacion is null\n \tand c.cuenta = \".$this->NumeroDeCuenta.\"\n \t\";\n \n \t//Assume that you have connected to a database instance...\n \t$statement = Doctrine_Manager::getInstance()->connection();\n \t//$results = $statement->execute(\"SELECT * FROM paciente WHERE id = ?\", array(1));\n \t$results = $statement->execute($query);\n \t$dataset\t=\t$results->fetchAll();\n \t//var_dump($dataset);\n \treturn number_format($dataset[0]['Pendiente'],2,'.','');\n\t}", "title": "" }, { "docid": "21f18ccc1565d916d8ede5e4ffb499e5", "score": "0.5694621", "text": "private function calcolaGiorniMeseSuccessivo(){\n\t \treturn 6-($this->normalWDay($this->giorni[$this->giorni_mese-1]->getWDay()));\n\t }", "title": "" }, { "docid": "789ca54f2ed41e4eced5e8857df25e2f", "score": "0.5685069", "text": "function valor_desconto($porcentagem, $valor)\n{\n\t//$valor = preco do produto\n\t//$porcentagem = desconto\n $resultado = $valor - ($valor*($porcentagem/100));\n\n return money_br($resultado);\n}", "title": "" }, { "docid": "93ba8e26bca0723149c41e9c27c085a6", "score": "0.56814945", "text": "function nuevoIdInventario() {\n\t\t$conUltimo=\"select id_inventario from inventario order by id_inventario desc limit 1\";\n\t\t$cons=new consecutivo(\"INV\",$conUltimo);\n\t\t$this->idInventario=$cons->retornar();\n\t}", "title": "" }, { "docid": "8905f7d52b18c4ecf92e1ed743d6f420", "score": "0.5668952", "text": "function LANUVumwandeln(){\r\n\t$ausgabe = getLanuvFoiId();\r\n\t$zufüllende = getLanuvFoiId2();\r\n\t$j = 0;\r\n\twhile ($j <= 1){\r\n\tif ($zufüllende[$j]['feature_of_interest_id'] == $ausgabe[$j]['feature_of_interest_id']);\r\n\t\telse {\r\n\t\t\t\t$zufüllende[$j+1]['feature_of_interest_id'] = $zufüllende[$j]['feature_of_interest_id'];\r\n\t\t\t\t$zufüllende[$j+1]['max'] = $zufüllende[$j]['max'];\r\n\t\t\t\t$zufüllende[$j]['feature_of_interest_id'] = \"_\";\r\n\t\t\t\t$zufüllende[$j]['max'] = \"_\";\r\n\t\t\t\t}\r\n\t\t\t\t$j++;\r\n\t}\r\n\treturn $zufüllende;\r\n}", "title": "" }, { "docid": "21a10e434ce617d3a16431c01b2be38b", "score": "0.56653625", "text": "public function cierre()\n {\n return 8;\n }", "title": "" }, { "docid": "1fbff1256c11522de9b73e25b849f975", "score": "0.56399584", "text": "function calcularFrete($pedagios, $distancia)\n{\n $custoPedagio = $pedagios * 9.4;\n $custoDistancia = $distancia * 6;\n\n return $custoPedagio + $custoDistancia;\n}", "title": "" }, { "docid": "8e61f9971c2fba09e29d98d2d91990e8", "score": "0.5627815", "text": "function ultima_aperturada()\n\t{\n\t\t$con = new DBmanejador;\n\t\tif($con->conectar()==true)\n\t\t{\n\t\t\t$consulta= \"SELECT MAX(nro_registro) as nro_registro from no_conformidad\";\n\t\t//\techo $consulta; \t \n\t\t\t$resultado=mysql_query($consulta) or die('La consulta fall&oacute;: ' . mysql_error());\t\n\t\t\tif (!$resultado) return false;\n\t\t\telse\n\t\t\t{ while($row = mysql_fetch_array($resultado))\n\t\t\t\t\t{\n\t\t\t\t\t$lista['nro_registro'] = $row['nro_registro'];\t\n\t\t\t\t\t}\n\t\t\t\treturn $lista;\n\t\t\t}\n }\n }", "title": "" }, { "docid": "087d9eb3e71f77d7cf91940f345f90cf", "score": "0.5626015", "text": "public function tipoPregunta($nom){\n\t\t//primero obtengo el IDde la pregunta\n\t\t$sql=$this->db->select('*')->where(\"Nomenclatura='$nom'\")->get(\"preguntas\");\n\t\t$idpregunta=$sql->result()[0]->IDPregunta;\n\t\t$Forma=$sql->result()[0]->Forma;\n\t\t//obtengo el numero de veces que se ha realizso ese cuesttionario\n\t\t//ahora checo en detalles de calificiaciones para ver cuantas veces se ha respondido esa pregunta\n\t\t$data[\"Pregunta\"]=$sql->result()[0]->Pregunta;\n\t\t$data[\"Forma\"]=$sql->result()[0]->Forma;\n\t\tif($Forma===\"SI/NO\"){\n\t\t\t$data[\"labels\"]=[\"SI\",\"NO\"];\n\t\t\t$data[\"backgroundColor\"]=[\"#3e95cd\",\"#8e5ea2\"];\n\t\t\t\n\t\t\t$sql=$this->db->where(\"IDPregunta='$idpregunta' and Respuesta='SI'\")->from(\"detallecalificacion\")->count_all_results();\n\t\t\t$si=$sql;\n\t\t\t$sql=$this->db->where(\"IDPregunta='$idpregunta' and Respuesta='NO'\")->from(\"detallecalificacion\")->count_all_results();\n\t\t\t$no=$sql;\n\t\t\t$data[\"data\"]=[$si,$no];\n\t\t}else if($Forma===\"DIAS\" || $Forma===\"HORAS\" || $Forma===\"NUMERO\"){\n\t\t\t//obtengo el numero maximo si tengo un 0 le ponemos 10 como minimo\n\t\t\t$sql=$this->db->select_max('Respuesta')->where(\"IDPregunta='$idpregunta'\")->get(\"detallecalificacion\");\n\t\t\tif($sql->result()[0]->Respuesta===\"0\"){\n\t\t\t\t$dias=10;\n\t\t\t}else{\n\t\t\t\t$dias=(int)$sql->result()[0]->Respuesta;\n\t\t\t}\n\t\t\t//ahora realizo el los labels\n\t\t\t$data[\"backgroundColor\"]=[\"#3e95cd\",\"#E00101\",\"#E17706\",\"#D0C30A\",\"#37E50C\",\"#3e95cd\",\"#21253F\",\"#11D853\",\"#01FF8C\",\"#CD0587\",\"#A5CD07\",\"#3e95cd\",\"#1230F4\",\"#7502F7\"];\n\t\t\t$dat=[];\n\t\t\t$dattas=[];\n\t\t\tfor($i=1;$i<=$dias;$i++){\n\t\t\t\tarray_push($dat,$Forma.\" (\".(string)$i.\")\");\n\t\t\t\t$sql=$this->db->where(\"IDPregunta='$idpregunta' and Respuesta='$i'\")->from(\"detallecalificacion\")->count_all_results();\n\t\t\t\tarray_push($dattas,$sql);\n\t\t\t}\n\t\t\t$data[\"data\"]=$dattas;\n\t\t\t$data[\"labels\"]=$dat;\n\t\t}\n\n\treturn $data;\n\t}", "title": "" }, { "docid": "7b54f2e9929d403b46407ed1aef48258", "score": "0.56231624", "text": "protected function hijoFormula_padreNo()\r\n\t{\r\n\t\t$repo = $this->em->getRepository('MbpArticulosBundle:Formulas');\r\n\t\t$repoArt = $this->em->getRepository('MbpArticulosBundle:Articulos');\r\n\t\t\r\n\t\t/*CREO EL ARTICULO PADRE*/\t\t\r\n\t\t$nodo_con_formula = $repo->busca_nodo_padre_formula($this->idArtFormulado);\r\n\t\t\r\n\t\t$formula_hijo = $repo->formulasEstrucutraMateriales($nodo_con_formula->getId());\r\n\t\t\r\n\t\t//BUSCA TODOS LOS NODOS DONDE SE ENCUENTRA EL ARTICULO PADRE\r\n\t\t$nodos_art_padre = $repo->busca_nodo_con_art($this->idArt);\r\n\t\t\r\n\t\t//TODO LO QUE SIGUE A CONTINUACION ES UNA TRANSACCION\r\n\t\t$this->em->getConnection()->beginTransaction();\r\n\t\t\r\n\t\ttry{\r\n\t\t\t$padre = $this->crear_nodo_padre($this->idArt);\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t$dif_lft = $padre->getLft() - $formula_hijo[0]->getLft();\r\n\t\t\t$flag_cantidad = 0;\r\n\t\t\t$flag_padre = 0;\r\n\t\t\t$auxPadre;\r\n\t\t\t\t\t\t\r\n\t\t\tforeach ($formula_hijo as $hijo) {\r\n\t\t\t\t$nodo = new Formulas();\r\n\t\t\t\t$nodo->setLft($hijo->getLft() + $dif_lft + 1);\r\n\t\t\t\t$nodo->setRgt($hijo->getRgt() + $dif_lft + 1);\r\n\t\t\t\t$nodo->setIdArt($hijo->getIdArt());\r\n\t\t\t\t\r\n\t\t\t\tif($flag_cantidad == 0){\r\n\t\t\t\t\t$nodo->setCant($this->cantidad);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$nodo->setCant($hijo->getCant());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$auxPadre = $hijo;\r\n\t\t\t\t\r\n\t\t\t\t$padre->setRgt($nodo->getRgt() + 2);\r\n\t\t\t\t$this->em->persist($nodo);\r\n\t\t\t\t$this->em->persist($padre);\r\n\t\t\t\t\r\n\t\t\t\t$flag_cantidad = 1;\r\n\t\t\t\t$flag_padre = 1;\r\n\t\t\t}\r\n\t\t\t$this->em->flush();\t\r\n\t\t\t\r\n\t\t\t/*if(!empty($nodos_art_padre)){\r\n\t\t\t\t$this->padreFormula_hijoFormula();\r\n\t\t\t}*/\r\n\t\t\t\r\n\t\t\tif($nodos_art_padre != null){\r\n\t\t\t\tforeach ($nodos_art_padre as $nodo) {\r\n\t\t\t\t\t//DIFERENCIA NODOS LFT\r\n\t\t\t\t\t$dif = $formula_hijo[0]->getLft() - ($nodo->getLft() + 1);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$flag=0;\t//FLAG PARA AL PRIMER NODO PONERLE LA CANTIDAD CORRECTA\r\n\t\t\t\t\t$auxNodo;\r\n\t\t\t\t\tforeach ($formula_hijo as $hijo) {\r\n\t\t\t\t\t\t$nuevo_nodo = new Formulas();\r\n\t\t\t\t\t\t$nuevo_nodo->setIdArt($hijo->getIdArt());\r\n\t\t\t\t\t\t$nuevo_nodo->setLft($hijo->getLft() - $dif);\t\t\t\t\r\n\t\t\t\t\t\t$nuevo_nodo->setRgt($hijo->getRgt() - $dif);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//LA CANTIDAD DEL PRIMER NODO ES CERO PORQUE VIENE DE UNA FORMULA PADRE, ESTO LO EVITAMOS CON EL FLAG\r\n\t\t\t\t\t\t$flag == 0 ? $nuevo_nodo->setCant($this->cantidad) : $nuevo_nodo->setCant($hijo->getCant());\t\t\t\t\r\n\t\t\t\t\t\t$flag = 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->em->persist($nuevo_nodo);\r\n\t\t\t\t\t\t$this->em->persist($nodo);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$auxNodo = $nuevo_nodo;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->em->flush();\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->orden_nodo_lft_abajo($nuevo_nodo->getLft(), $nuevo_nodo->getRgt(), $nodo->getLft(), $nuevo_nodo->getId());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * UNA VEZ QUE ORDENO CORRO 2 POSICIONES LOS NODOS ENTONCES DEBO COMPENSAR LA DIFERENCIA SI LA\r\n\t\t\t\t\t\t * FORMULA A INSERTAR ESTA DELANTE DEL ARTICULO FORMULADO\r\n\t\t\t\t\t\t * */\r\n\t\t\t\t\t\tif($hijo->getLft() > $nodo->getLft()){\r\n\t\t\t\t\t\t\t$dif = $dif + 2;\t\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t$this->em->getConnection()->commit();\t\r\n\t\t}catch(Exception $e){\r\n\t\t\t$this->em->getConnection()->rollBack();\r\n\t\t\treturn $e->getMessage();\r\n\t\t}\r\n\t\treturn $padre->getId();\r\n\t}", "title": "" }, { "docid": "28542ed78c8bf62a1dc3a0479f50d51f", "score": "0.5620494", "text": "function buscarIDDPM($idsolicitante){\n\t$query2 = \"SELECT idpedido FROM detallepedidomateriales where idsol='\".$idsolicitante.\"' ORDER BY idpedido DESC LIMIT 1\"; \n\t$conexion2=Conectarse();$tot=0;\n\t$rs =mysqli_query($conexion2,$query2);\n\t$tot=mysqli_num_rows($rs);\n\t if ($tot!=0) {\n\t $row=@mysqli_fetch_array($rs);\n\t\t$id = $row['idpedido'];\n\t\t }else{$id=1;}\n\t\tmysqli_free_result($rs);\t mysqli_close($conexion2);\n\t return $id;\n }", "title": "" }, { "docid": "ab2d16f26c74b5d36c64c242777cdf22", "score": "0.56117696", "text": "function gerarNfe(){\n $nfe = new Make();\n /**inf nfe**/\n $stdInNfe = new stdClass();\n $stdInNfe->versao = '4.00'; //versão do layout\n //$stdInNfe->Id = 'NFe35150271780456000160550010000000021800700082';//se o Id de 44 digitos não for passado será gerado automaticamente\n $stdInNfe->pk_nItem = null; //deixe essa variavel sempre como NULL\n\n $infNfe = $nfe->taginfNFe($stdInNfe);\n \n /**IDE**/\n $stdIde = new stdClass();\n $stdIde->cUF = 43;\n $stdIde->cNF = rand(11111111,99999999);\n $stdIde->natOp = 'VENDA DE MERCADORIAS SIMPLES NACIONAL';\n //$std->indPag = 0; //NÃO EXISTE MAIS NA VERSÃO 4.00 \n $stdIde->mod = 55;\n $stdIde->serie = 1;\n $stdIde->nNF = 2;\n $stdIde->dhEmi = date(\"Y-m-d\\TH:i:sP\");//data de saída\n $stdIde->dhSaiEnt = date(\"Y-m-d\\TH:i:sP\");//data de entrada\n $stdIde->tpNF = 1;//tipo da nota [saída/entrada]\n $stdIde->idDest = 1;//dentro ou fora do estado\n $stdIde->cMunFG = 3518800;\n $stdIde->tpImp = 1;//tipo de impressão 1 - retrato ou 2 - paisagem\n $stdIde->tpEmis = 1;//tipo de emissão normal contigência...\n $stdIde->cDV = 2;//Digito verificador\n $stdIde->tpAmb = 2;//tipo de ambiente 1 - produção ou 2 - homologação\n $stdIde->finNFe = 1;//finalidade da emissão da nfe 1-nfe-normal 2-nfe-complementar 3-nfe de ajuste\n $stdIde->indFinal = 0;//se é consumidor final 0-não\n $stdIde->indPres = 0;//se a nota foi emitida presencial o-não\n $stdIde->procEmi = 0;//processo de emissão\n $stdIde->verProc = '2.4.0';//versão do sistema\n $stdIde->dhCont = null;//data e hora da entrada em contigência\n $stdIde->xJust = null;//sefaz local não responde\n\n $tagide = $nfe->tagide($stdIde);\n \n /**EMITENTE**/\n $stdEmit = new stdClass();\n $stdEmit->xNome = \"E-SALES SOLUCOOES Obj\";\n $stdEmit->xFant = \"Obj\";\n $stdEmit->IE = \"0963233556\";\n //$std->IEST;\n //$std->IM;\n //$std->CNAE;\n $stdEmit->CRT = \"1\";\n $stdEmit->CNPJ =\"07385111000102\"; //indicar apenas um CNPJ ou CPF\n\n $emit = $nfe->tagemit($stdEmit);\n \n /*ENDEREÇO DO EMITENTE*/\n $stdEnderEmit = new stdClass();\n $stdEnderEmit->xLgr = \"LIBANO JOSE GOMES\";\n $stdEnderEmit->nro = \"2800\";\n $stdEnderEmit->xCpl =\"\";\n $stdEnderEmit->xBairro = \"CIC\";\n $stdEnderEmit->cMun= \"4314902\";\n $stdEnderEmit->xMun = \"Porto Alegre\";\n $stdEnderEmit->UF = \"RS\";\n $stdEnderEmit->CEP = \"81310020\";\n $stdEnderEmit->cPais = \"1058\";\n $stdEnderEmit->xPais = \"BRASIL\";\n $stdEnderEmit->fone = \"4121098000\";\n\n $enderEmit = $nfe->tagenderEmit($stdEnderEmit);\n \n /*DESTINATÁRIO*/\n $stdDest = new stdClass();\n $stdDest->xNome =\"E-sales Solucoes Oobj\";\n $stdDest->indIEDest =\"1\";//se existir inscrição estadual é 1 senão existir é 2\n $stdDest->IE =\"09633233556\";\n $stdDest->ISUF =\"\";\n $stdDest->IM =\"\";\n $stdDest->email =\"[email protected]\";\n $stdDest->CNPJ =\"01358376000135\"; //indicar apenas um CNPJ ou CPF ou idEstrangeiro\n //$stdDest->CPF;\n //$stdDest->idEstrangeiro;\n\n $dest = $nfe->tagdest($stdDest);\n \n /**ENDEREÇO DO DESTINATÁRIO**/\n $stdEnderDest = new stdClass();\n $stdEnderDest->xLgr =\"PROF. ALGACYR MUNHOZ MADER\";\n $stdEnderDest->nro =\"2800\"; \n $stdEnderDest->xCpl =\"\";\n $stdEnderDest->xBairro =\"CIC\";\n $stdEnderDest->cMun =\"4314902\";\n $stdEnderDest->xMun =\"Porto Alegre\";\n $stdEnderDest->UF =\"RS\";\n $stdEnderDest->CEP =\"81310020\";\n $stdEnderDest->cPais =\"1058\";\n $stdEnderDest->xPais =\"BRASIL\";\n $stdEnderDest->fone =\"4121098000\";\n\n $nfe->tagenderDest($stdEnderDest);\n \n /**PRODUTOS**/\n $stdProd = new stdClass();\n $stdProd->item = 1; //item da NFe\n $stdProd->cProd = \"4450\";//CÓDIGO DO PRODUTO \n $stdProd->cEAN = \"7897534826649\";//código de barra da caixa\n $stdProd->xProd = \"lIMPA TELAS 120 ML\";//NOME DO PRODUTO\n $stdProd->NCM = \"44170010\";\n\n //$stdProd->cBenef; //incluido no layout 4.00\n\n //$std->EXTIPI;\n $stdProd->CFOP =\"5102\";\n $stdProd->uCom =\"UN\";\n $stdProd->qCom =\"10\";//QTD DO PRODUTO\n $stdProd->vUnCom = $this->format(6.99); \n $stdProd->cEANTrib =\"7897534826649\";//codigo de barra da unidade\n $stdProd->uTrib =\"UN\";\n $stdProd->qTrib =\"10\";\n $stdProd->vUnTrib = $this->format(6.99);\n $stdProd->vProd = $this->format($stdProd->qTrib * $stdProd->vUnTrib);\n $stdProd->vFrete = \"\";\n $stdProd->vSeg = \"\";\n //$stdProd->vDesc = \"\";\n $stdProd->vOutro = \"\";\n $stdProd->indTot =\"1\";//se estiver 1 o produto vai compor o valor total da nota\n //$stdProd->xPed =\"\"; //numero do pedido no sistema\n //$stdProd->nItemPed =\"\";\n //$stdProd->nFCI =\"\";\n\n $prod = $nfe->tagprod($stdProd);\n \n /**INFORMAÇÃO ADICIONAL DO PRODUTO**/\n \n $stdAdicional = new stdClass();\n $stdAdicional->item = 1; //item da NFe\n\n $stdAdicional->infAdProd = 'informacao adicional do item';\n\n $indAdProd = $nfe->taginfAdProd($stdAdicional);\n \n /**IMPOSTO**/\n $stdImposto = new stdClass();\n $stdImposto->item = 1; //item da NFe\n $stdImposto->vTotTrib = 4.00;\n\n $imposto = $nfe->tagimposto($stdImposto);\n \n /**ICMS**/\n $stdICMS = new stdClass();\n $stdICMS->item = 1; //item da NFe\n $stdICMS->orig = 0;\n $stdICMS->CST = \"00\";\n $stdICMS->modBC = \"0\";\n $stdICMS->vBC = $this->format($stdProd->vProd);\n $stdICMS->pICMS = 18.00;\n $stdICMS->vICMS = $this->format($stdICMS->vBC * ($stdICMS->pICMS / 100));\n /*$stdICMS->pFCP;\n $stdICMS->vFCP;\n $stdICMS->vBCFCP;\n $stdICMS->modBCST;\n $stdICMS->pMVAST;\n $stdICMS->pRedBCST;\n $stdICMS->vBCST;\n $stdICMS->pICMSST;\n $stdICMS->vICMSST;\n $stdICMS->vBCFCPST;\n $stdICMS->pFCPST;\n $stdICMS->vFCPST;\n $stdICMS->vICMSDeson;\n $stdICMS->motDesICMS;\n $stdICMS->pRedBC;\n $stdICMS->vICMSOp;\n $stdICMS->pDif;\n $stdICMS->vICMSDif;\n $stdICMS->vBCSTRet;\n $stdICMS->pST;\n $stdICMS->vICMSSTRet;\n $stdICMS->vBCFCPSTRet;\n $stdICMS->pFCPSTRet;\n $stdICMS->vFCPSTRet;\n $stdICMS->pRedBCEfet;\n $stdICMS->vBCEfet;\n $stdICMS->pICMSEfet;\n $stdICMS->vICMSEfet;*/\n\n $ICMS = $nfe->tagICMS($stdICMS);\n \n /**PIS**/\n $stdPIS = new stdClass();\n $stdPIS->item = 1; //item da NFe\n $stdPIS->CST = '50';\n $stdPIS->vBC = $this->format($stdProd->vProd);\n $stdPIS->pPIS = 1.65;\n $stdPIS->vPIS = $this->format($stdPIS->vBC * ($stdPIS->pPIS / 100));\n //$stdPIS->qBCProd = null;\n //$stdPIS->vAliqProd = null;\n\n $PIS = $nfe->tagPIS($stdPIS);\n \n /**COFINS**/\n \n $stdCOFINS = new stdClass();\n $stdCOFINS->item = 1; //item da NFe\n $stdCOFINS->CST = '50';\n $stdCOFINS->vBC = $this->format($stdProd->vProd);\n $stdCOFINS->pCOFINS = 0.65;\n $stdCOFINS->vCOFINS = $this->format($stdCOFINS->vBC * ($stdCOFINS->pCOFINS / 100));\n //$std->qBCProd = null;\n //$std->vAliqProd = null;\n\n $COFINS = $nfe->tagCOFINS($stdCOFINS);\n \n /**TOTAIS**/\n \n $stdICMSTot = new stdClass();\n $stdICMSTot->vBC =\"\";\n $stdICMSTot->vICMS=\"\";\n $stdICMSTot->vICMSDeson =\"\";\n $stdICMSTot->vFCP =\"\"; //incluso no layout 4.00\n $stdICMSTot->vBCST =\"\";\n $stdICMSTot->vST =\"\";\n $stdICMSTot->vFCPST =\"\"; //incluso no layout 4.00\n $stdICMSTot->vFCPSTRet =\"\"; //incluso no layout 4.00\n $stdICMSTot->vProd =\"\";\n $stdICMSTot->vFrete =\"\";\n $stdICMSTot->vSeg =\"\";\n $stdICMSTot->vDesc =\"\";\n $stdICMSTot->vII =\"\";\n $stdICMSTot->vIPI =\"\";\n $stdICMSTot->vIPIDevol =\"\"; //incluso no layout 4.00\n $stdICMSTot->vPIS =\"\";\n $stdICMSTot->vCOFINS =\"\";\n $stdICMSTot->vOutro =\"\";\n $stdICMSTot->vNF =\"\";\n $stdICMSTot->vTotTrib =\"\";\n\n $ICMSTot = $nfe->tagICMSTot($stdICMSTot);\n \n /**TRANSPORTADORA**/\n \n $stdTransp = new stdClass();\n $stdTransp->modFrete = 1;\n\n $transp = $nfe->tagtransp($stdTransp);\n \n /**VOLUMES**/\n \n $stdVol = new stdClass();\n $stdVol->item = 1; //indicativo do numero do volume\n $stdVol->qVol = 1;\n $stdVol->esp = 'CAIXAS';\n //$stdVol->marca = 'OLX';\n //$stdVol->nVol = '11111';\n //$stdVol->pesoL = 10.50;\n //$stdVol->pesoB = 11.00;\n\n $vol = $nfe->tagvol($stdVol);\n \n /**PAGAMENTO**/\n \n $stdPag = new stdClass();\n $stdPag->vTroco = 0.00; //incluso no layout 4.00, obrigatório informar para NFCe (65)\n\n $pag = $nfe->tagpag($stdPag);\n \n /**DETALHE DO PAGAMENTO **/\n \n $stdDetPag = new stdClass();\n $stdDetPag->tPag = '14';\n $stdDetPag->vPag = $this->format($stdProd->vProd); //Obs: deve ser informado o valor pago pelo cliente\n //$stdDetPag->CNPJ = '12345678901234';\n //$stdDetPag->tBand = '01';\n //$stdDetPag->cAut = '3333333';\n //$stdDetPag->tpIntegra = 1; //incluso na NT 2015/002\n //$stdDetPag->indPag = '0'; //0= Pagamento à Vista 1= Pagamento à Prazo\n\n $detPag = $nfe->tagdetPag($stdDetPag);\n \n /**INFORMAÇÃO ADICIONAL**/\n $stdInfAdic = new stdClass();\n $stdInfAdic->infAdFisco = 'informacoes para o fisco';\n $stdInfAdic->infCpl = 'informacoes complementares';\n\n $infAdic = $nfe->taginfAdic($stdInfAdic);\n \n /**MONTA A NOTA**/\n if($nfe->montaNFe()){\n return $nfe->getXML(); \n }else{\n throw new Exception(\"Erro ao gerra a nfe\"); \n } \n }", "title": "" }, { "docid": "77cb4832c5c8c5972a7a812a2ccb2c01", "score": "0.5605406", "text": "function mettreEntre($nombre,$base){\r\n\twhile($nombre < 0)\r\n\t\t$nombre+=$base;\r\n\twhile($nombre >= $base)\r\n\t\t$nombre-=$base;\r\n\treturn $nombre;\r\n}", "title": "" }, { "docid": "5991dc3423b4589fa1b16908090397e4", "score": "0.56037927", "text": "function precio_final(){\n return (int)($this->precio)*(1+$this->tipo_iva/100);\n }", "title": "" }, { "docid": "8f1d09ccdd57ad90a8904ac760c9c679", "score": "0.55989844", "text": "public function getFila(){\n\t\tif ( isset($this->retorno) ){\n\t\t\treturn( mysql_fetch_array($this->retorno));\n\t\t}\n\t}", "title": "" }, { "docid": "63373cb65a30661c0216c5f5d37f0c67", "score": "0.5595744", "text": "function suma_fechas($fecha,$ndias)\t\r\n{\r\n\t$fecha1 = explode('-',$dFecIni);\r\n\t$fecha2 = explode('-',$dFecFin);\r\n\t\r\n\t//defino fecha 1 \r\n\t$ano1 = $fecha1[0]; \r\n\t$mes1 = $fecha1[1]; \r\n\t$dia1 = $fecha1[2]; \r\n\t\t\r\n\t//defino fecha 2 \r\n\t$ano2 = $fecha2[0]; \r\n\t$mes2 = $fecha2[1]; \r\n\t$dia2 = $fecha2[2]; \r\n\t\t\r\n\t//calculo timestam de las dos fechas \r\n\t$timestamp1 = mktime(0,0,0,$mes1,$dia1,$ano1); \r\n\t$timestamp2 = mktime(4,12,0,$mes2,$dia2,$ano2); \r\n\t\r\n\t//resto a una fecha la otra \r\n\t$segundos_diferencia = $timestamp1 + $timestamp2; \r\n\t//echo $segundos_diferencia; \r\n\t\r\n\t//convierto segundos en d�as \r\n\t$dias_diferencia = $segundos_diferencia / (60 * 60 * 24); \r\n\t\r\n\t//obtengo el valor absoulto de los d�as (quito el posible signo negativo) \r\n\t$dias_diferencia = abs($dias_diferencia); \r\n\t\r\n\t//quito los decimales a los d�as de diferencia \r\n\t$dias_diferencia = floor($dias_diferencia); \r\n\t\r\n\treturn (string)$dias_diferencia;\t \r\n}", "title": "" }, { "docid": "246d53f23e2fd0e6167eec11370f4f69", "score": "0.55924135", "text": "protected function padreFormula_hijoNo()\r\n\t{\t\t\r\n\t\t$repo = $this->em->getRepository('MbpArticulosBundle:Formulas');\r\n\t\t$repoArt = $this->em->getRepository('MbpArticulosBundle:Articulos');\r\n\t\t\r\n\t\t$art_a_insertar = $repoArt->find($this->idArtFormulado);\r\n\t\t\r\n\t\t$nodos_a_formular = $repo->busca_nodo_con_art($this->idArt);\r\n\t\t\r\n\t\t//TODO LO QUE SIGUE A CONTINUACION ES UNA TRANSACCION\r\n\t\t$this->em->getConnection()->beginTransaction();\r\n\t\t\r\n\t\ttry{\r\n\t\t\tforeach ($nodos_a_formular as $nodo) {\r\n\t\t\t\t$nuevo_nodo = new Formulas();\r\n\t\t\t\t$nuevo_nodo->setIdArt($art_a_insertar);\r\n\t\t\t\t$nuevo_nodo->setLft($nodo->getLft() + 1);\r\n\t\t\t\t$nuevo_nodo->setRgt($nuevo_nodo->getLft() + 1);\r\n\t\t\t\t$nuevo_nodo->setCant($this->cantidad);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t$this->em->persist($nuevo_nodo);\r\n\t\t\t\t$this->em->persist($nodo);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t$this->ordenar_nodos_hacia_abajo($nuevo_nodo->getLft());\r\n\t\t\t}\t\t\r\n\t\t\t$this->em->flush();\r\n\t\t\t$this->em->getConnection()->commit();\t\r\n\t\t}catch(Exception $e){\r\n\t\t\t$this->em->getConnection()->rollBack();\r\n\t\t\treturn $e->getMessage();\r\n\t\t}\r\n\t\t\r\n\t\t$padre = $repo->busca_nodo_padre_formula($this->idArt);\r\n\t\treturn $padre->getId();\r\n\t}", "title": "" }, { "docid": "34beef14bb989655ac0a0c1cbeac2c86", "score": "0.55898297", "text": "function get_nb_annonce_vendeur($id, $tri)\r\n{\r\n\tglobal $conn;\r\n\t\r\n\t$bdd = $conn;\r\n\t\r\n\t$prix_req = ($tri == 2) ? \" AND s.prix > :prix\" : \"\";\r\n\t\r\n\t$sql = \"SELECT count(*) AS total \r\n\tFROM \". PREFIX .\"annonces_search s\r\n\tLEFT JOIN \". PREFIX .\"annonces a ON s.id_ann = a.id_ann\r\n\tWHERE a.email = (SELECT email FROM \". PREFIX .\"annonces WHERE id_ann = :id_ann) AND s.etat = :etat\". $prix_req;\r\n\t$req = $bdd->prepare($sql);\r\n\t\r\n\t$req->bindValue('id_ann', $id, PDO::PARAM_INT);\r\n\t$req->bindValue('etat', 2, PDO::PARAM_INT);\r\n\t\r\n\tif($tri == 2)\r\n\t$req->bindValue('prix', 0, PDO::PARAM_INT);\r\n\t\r\n\t$req->execute();\r\n\t\r\n\t$result = $req->fetch();\r\n\t\r\n\t$req->closeCursor();\r\n\t\r\n\treturn $result;\r\n}", "title": "" }, { "docid": "87c7b1fcac259fac10a3b7329716dd52", "score": "0.5584398", "text": "function devolverFactura(){\n\t\t$this->procedimiento='tes.ft_solicitud_rendicion_det_ime';\n\t\t$this->transaccion='TES_RENDEVFAC_IME';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_solicitud_rendicion_det','id_solicitud_rendicion_det','int4');\n\t\t$this->setParametro('id_doc_compra_venta','id_doc_compra_venta','int4');\t\t\n\t\t$this->setParametro('tipo_solicitud','tipo_solicitud','varchar');\t\n\t\t$this->setParametro('fecha','fecha','date');\t\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "9880bae4a7e26cced42a3b5ae9cf43e9", "score": "0.55843425", "text": "function tinhdientichhinhtron($bankinh) {\n\n // $bankinh sẽ là tham số sủa hàm\n $dientich = $bankinh*$bankinh*3.14;\n return $dientich;\n}", "title": "" }, { "docid": "2d01ef7af6432d2a232b98500ebca7d1", "score": "0.5574687", "text": "function poneDigito($param) {\n $posfin = 47;\n $flag = TRUE;\n $j = 2;\n $suma = 0;\n while ($flag) {\n if ($posfin >= 0) {\n $suma = $suma + ($param[$posfin] * $j);\n// echo $suma;\n $j++;\n if ($j > 7) {\n $j = 2;\n }\n $posfin--;\n } else {\n $flag = FALSE;\n }\n }\n// echo 'Esta es la suma ' . $suma;\n $tienecero = $suma % 11;\n if ($tienecero == 0) {\n $digito = 0;\n } else {\n $digito = 11 - ($suma % 11);\n }\n// echo '<br>Este es el digito verificador ' . $digito;\n if ($digito == 10) {\n $digito = 1;\n }\n return $digito;\n }", "title": "" }, { "docid": "6f47d9f4faacfcdfc23e3e9f3da6c6f8", "score": "0.55708396", "text": "function valorPorExtenso($valor=0)\r\n{\r\n\t$singular = array(\"centavo\", \"real\", \"mil\", \"milhão\", \"bilhão\", \"trilhão\", \"quatrilhão\");\r\n\t$plural = array(\"centavos\", \"reais\", \"mil\", \"milhões\", \"bilhões\", \"trilhões\",\"quatrilhões\");\r\n\t$c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\",\"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\r\n\t$d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\",\"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\r\n\t$d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\",\"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\r\n\t$u = array(\"\", \"um\", \"dois\", \"três\", \"quatro\", \"cinco\", \"seis\",\"sete\", \"oito\", \"nove\");\r\n\t$z=0;\r\n\t$valor = number_format($valor, 2, \".\", \".\");\r\n\t$inteiro = explode(\".\", $valor);\r\n\tfor($i=0;$i<count($inteiro);$i++)\r\n\t\tfor($ii=strlen($inteiro[$i]);$ii<3;$ii++)\r\n\t\t\t$inteiro[$i] = \"0\".$inteiro[$i];\r\n\t\t$rt = \"\";\r\n\t\t// $fim identifica onde que deve se dar junção de centenas por \"e\" ou por \",\" ;) \r\n\t\t$fim = count($inteiro) - ($inteiro[count($inteiro)-1] > 0 ? 1 : 2);\r\n\t\tfor ($i=0;$i<count($inteiro);$i++)\r\n\t\t{\r\n\t\t\t$valor = $inteiro[$i];\r\n\t\t\t$rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\r\n\t\t\t$rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\r\n\t\t\t$ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\r\n\t\t\t$r = $rc.(($rc && ($rd || $ru)) ? \" e \" : \"\").$rd.(($rd && $ru) ? \" e \" : \"\").$ru;\r\n\t\t\t$t = count($inteiro)-1-$i;\r\n\t\t\t$r .= $r ? \" \".($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\r\n\t\t\tif ($valor == \"000\")$z++; elseif ($z > 0) $z--;\r\n\t\t\tif (($t==1) && ($z>0) && ($inteiro[0] > 0)) $r .= (($z>1) ? \" de \" : \"\").$plural[$t]; \r\n\t\t\tif ($r) $rt = $rt . ((($i > 0) && ($i <= $fim) && ($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\r\n\t\t}\r\n\t\treturn($rt ? $rt : \"zero\");\r\n\t}", "title": "" }, { "docid": "624664d20a64baa1c738c3ef32ad52d4", "score": "0.55664307", "text": "function solicitarCasilleroLibre($tableroTateti)\n{\n //int $dimension, $nroFila, $nroColumna, boolean $esLibre, array $casillerolibre\n $dimension = count($tableroTateti);\n do {\n echo \"Ingrese el número de FILA: \";\n $nroFila = solicitarNumeroEntre(1, $dimension);\n $nroFila = $nroFila - 1;\n echo \"Ingrese el número de COLUMNA: \";\n $nroColumna = solicitarNumeroEntre(1, $dimension);\n $nroColumna = $nroColumna - 1;\n $esLibre = esCasilleroLibre($tableroTateti, $nroFila, $nroColumna);\n if (!$esLibre) {\n echo \"El casillero ingresado se encuentra ocupado! Ingrese un casillero libre.\\n\";\n }\n } while (!$esLibre);\n $casillerolibre = [\"fila\" => $nroFila, \"columna\" => $nroColumna];\n return $casillerolibre;\n}", "title": "" }, { "docid": "48378658a72cdfbdf6a16a5c72285c17", "score": "0.555806", "text": "function GetNumRegistrosDiario()\n{\n $bd = Db::getInstance();\n\n /*Creamos una query sencilla*/\n $sql = 'SELECT count(*) as numRegistros FROM `diario`';\n\n /*Ejecutamos la query*/\n $bd->Consulta($sql);\n\n /*Realizamos un bucle para ir obteniendo los resultados*/\n $line = $bd->LeeRegistro();\n \n return $line['numRegistros'];\n}", "title": "" }, { "docid": "c1d27a84a134e749fb468fe73e1c0398", "score": "0.5547277", "text": "function feina($c,$d,$h){\n\n global $dbh;\n\n $id = $c;\n $desde = $d;\n $hasta = $h;\n\n $sql = \"\n SELECT\n\n sum( case when ( fecini >= '\".$desde.\"' and fecini <= '\".$hasta.\"' ) and (statto=7) then 1 else 0 end ) as entregado,\n round( sum( case when ( fecini >= '\".$desde.\"' and fecini <= '\".$hasta.\"' ) and (statto=7) then ((ImportePre*(100-(ISNULL(Dto,0))))/100) else 0 end ) ,0) as dentregado,\n\n sum( case when ( presutto.fecacepta >= '\".$desde.\"' and presutto.fecacepta <= '\".$hasta.\"' ) then 1 else 0 end ) as aceptado,\n round( sum( case when ( presutto.fecacepta >= '\".$desde.\"' and presutto.fecacepta <= '\".$hasta.\"' ) then ((ImportePre*(100-(ISNULL(Dto,0))))/100) else 0 end ) ,0) as daceptado,\n\n sum( case when ( presu.fecrechaz >= '\".$desde.\"' and presu.fecrechaz <= '\".$hasta.\"' and not presu.obsrechaz like '%*OP%' ) then 1 else 0 end ) as rechazado,\n round( sum( case when ( presu.fecrechaz >= '\".$desde.\"' and presu.fecrechaz <= '\".$hasta.\"' and not presu.obsrechaz like '%*OP%' ) then ((ImportePre*(100-(ISNULL(Dto,0))))/100) else 0 end ) ,0) as drechazado\n\n\n FROM presutto\n LEFT JOIN presu on presu.idpac=presutto.idpac and presu.numpre=presutto.numpre\n \"\n ;\n\n try {\n\n mssql_select_db($clinicas[$id][3], $db);\n $query = mssql_query($sql);\n $res = array();\n\n while ($row = mssql_fetch_object($query)) {\n $res[\"data\"][] = $row;\n }\n $res[\"error\"] = 0;\n $res[\"sql\"] = $sql;\n $devuelvo['data'] = $res;\n //Flight::json($devuelvo);\n return $res['data'];\n mssql_free_result($query);\n\n } catch(PDOException $e) {\n return 'error';\n }\n\n }", "title": "" }, { "docid": "bf2c939ba638cd8a48855806e5d88173", "score": "0.55434364", "text": "function DesendekiSayfalar($SayfaAdedi, $Desen) {\r\n\r\n //echo \"DesendekiSayfalar($SayfaAdedi, $Desen)\\n\";\r\n \r\n $arrSayfalar = array();\r\n\r\n if($Desen == \"Hepsi\") {\r\n // Desen yoksa, Tüm sayfaları alacak şekilde ayarla\r\n for($i=1; $i <= $SayfaAdedi; $i++) {\r\n $arrSayfalar[] = $i;\r\n }\r\n return $arrSayfalar;\r\n }\r\n\r\n // 0-9, virgül ve tire karakterleri kalsın. Gerisini temizle...\r\n $Desen = preg_replace('/[^0-9\\,\\-]/i', '', $Desen);\r\n\r\n $Desen = \",\" . $Desen; // Sadece aralık verilerek yapılmış bir Desen varsa patlamayalım diye...\r\n\r\n $arrSayfa = explode(\",\", $Desen);\r\n\r\n foreach ($arrSayfa as $key2 => $value2) {\r\n\r\n if($arrSayfa[$key2] == \"\") continue;\r\n\r\n $Hata = 0; \r\n\r\n $arrAralik = explode(\"-\", $arrSayfa[$key2]);\r\n if( count($arrAralik) == 2 ) {\r\n // Aralık alınması istenmiş\r\n $Baslama = $arrAralik[0];\r\n $Bitis = $arrAralik[1];\r\n\r\n if( $Baslama > $SayfaAdedi ) {\r\n $Hata = 1;\r\n }\r\n\r\n if( $Bitis > $SayfaAdedi ) {\r\n $Bitis = $SayfaAdedi;\r\n }\r\n\r\n if( $Bitis == \"\" ) {\r\n // 15- gibi bir şey yazılmış. Yani, 15 ve sonrası\r\n $Bitis = $SayfaAdedi;\r\n }\r\n\r\n if( $Baslama == \"\" ) {\r\n // -15 gibi bir şey yazılmış. Yani, 15 ve öncesi\r\n $Baslama = 1;\r\n }\r\n\r\n if( $Hata == 0 ) {\r\n for($i=$Baslama; $i <= $Bitis; $i++) {\r\n if( !in_array($i, $arrSayfalar) ) {\r\n $arrSayfalar[] = $i;\r\n }\r\n }\r\n }\r\n continue;\r\n }\r\n\r\n // Tek sayfa isteniyor\r\n $tmp = intval($arrSayfa[$key2]);\r\n if($tmp >= 1 and $tmp <= $SayfaAdedi ) {\r\n if( !in_array($tmp, $arrSayfalar) ) {\r\n $arrSayfalar[] = $tmp;\r\n }\r\n }\r\n\r\n }\r\n\r\n return $arrSayfalar;\r\n\r\n }", "title": "" }, { "docid": "97b56925b65b94d76db5f0566358221a", "score": "0.55400383", "text": "function getSecuencia($secuencia, $codigo, $tabla, $valor) {\r\n\tconnect();\r\n\t$sql=\"select MAX($secuencia) FROM $tabla WHERE $codigo='$valor'\";\r\n\t$query=mysql_query($sql) or die ($sql.mysql_error());\r\n\t$field=mysql_fetch_array($query);\r\n\t$secuencia=(int) ($field[0]+1);\r\n\treturn ($secuencia);\r\n}", "title": "" }, { "docid": "31a0885baedc458140985b08fa6b0251", "score": "0.5538502", "text": "function GetDiarios($nReg, $nElementosxPagina) {\n $bd = Db::getInstance();\n\n $sql = 'SELECT * FROM diario LIMIT '.$nReg.', '.$nElementosxPagina;\n\n /* Ejecutamos la query */\n $bd->Consulta($sql);\n\n // Creamos el array donde se guardarán las provincias\n $datos = Array();\n\n /* Realizamos un bucle para ir obteniendo los resultados */\n while ($reg = $bd->LeeRegistro()) {\n $datos[] = $reg;\n }\n return $datos;\n}", "title": "" }, { "docid": "5f9c715c51292d57f1c2e0da93f262d6", "score": "0.5537851", "text": "public function getNTupla($resultado){\r\n return ( parent::getNRegistro($resultado) );\r\n }", "title": "" }, { "docid": "1fdf69c0179b1bd944c19fdd85b749aa", "score": "0.5537023", "text": "public function darCostos(){\n\t\t/*variables: int $valor, float $costo*/\n\t\t$valor = parent::darCostos();\n\t\t$costo = $valor + ($valor * $this->getPorcentajeIncremento()); //12% incremento\n\t\treturn $costo;\n\t}", "title": "" }, { "docid": "9cd689e3ecab776f74f9b4856ed7ea32", "score": "0.55363774", "text": "function fechainit($mysqli2){\n\t\t/** obtene la fecha mas reciente de cierre de mes, de la tabla saldos **/\n\t\t$result= $mysqli2->query(\"SELECT MAX(fechafin) FROM saldos\");\n\t\t$row=mysqli_fetch_row($result);\n\t\t$fechaini=$row[0];\n\t\treturn $fechaini;\n\t}", "title": "" }, { "docid": "eb08cde326dde050cb280a481f5d1085", "score": "0.55361503", "text": "function ultimo_dia_periodo($per=null) { \n if($per<>null){\n switch ($per) {\n case 1: $where=\" actual=true\"; break;\n case 2: $where=\" presupuestando=true\"; break;\n \n }\n }else{\n $where=\" actual=true\"; \n }\n $sql=\"select fecha_fin from mocovi_periodo_presupuestario where\".$where. \" order by fecha_fin desc\";\n $resul=toba::db('designa')->consultar($sql);\n return $resul[0]['fecha_fin'];\n }", "title": "" }, { "docid": "038ef28ffd092fe92f9e7504ff83ff02", "score": "0.55342597", "text": "function cogerpreciopantalon($conexion,$precio){\r\n $consulta = \"SELECT DISTINCT Precio FROM spanisharmy.pantalones\";\r\n $resultado = mysqli_query($conexion, $consulta);\r\n return $resultado;\r\n }", "title": "" }, { "docid": "c2e245c5594b3a591093521b461d7b21", "score": "0.55309427", "text": "static function Financeiro(&$modelo,$usuarioid,$motivoid){return 1;\r\n }", "title": "" }, { "docid": "b23604110b2764ef539247c64e7df569", "score": "0.5529253", "text": "private function getSueldoBasico(){\n\t\t\t$sueldo = ($this->Empleoplanta->EMPL_SUELDO)*(($this->Empleoplanta->EMPL_DIASAPAGAR)/30);\n\t\treturn ($sueldo);\n }", "title": "" }, { "docid": "445571f37c4cd0ee764943e104419321", "score": "0.55285543", "text": "private function calcolaGiorniMesePrecedente(){\n\t \treturn $this->normalWDay($this->giorni[0]->getWDay());\n\t }", "title": "" }, { "docid": "0ae82bcb4a703a3e59ca8ac4dd7142d9", "score": "0.55265427", "text": "function ventadetalle($fechas, $filtro){\n\n //La variable filtro puede ser\n\n //A: Ambos, muestra toda la informacion\n\n //I: Solo los totales de inventario\n\n //S: Solo los totales de servicio\n\n //\n\n //Valida las fechas indicadas\n\n $rango = \"\";\n\n foreach($fechas as $fecha){\n\n if ($rango!=\"\")\n\n $rango .= \",\";\n\n \n\n $fechacreada = date_create($fecha);\n\n $rango .= \"'\".date_format($fechacreada, 'm/d/Y').\"'\";\n\n }\n\n \n\n \n\n $arsql = array();\n\n //Total resumen de venta para ambos\n\n if ($filtro=='A') { \n\n $sql = \"select fechaventa,\n\n tipo,\n\n Correlativo,\n\n ColetillaTipo,\n\n Coalesce(ClienteNombre, '') || ' ' || Coalesce(ClienteApellido, '') as ClienteNombre,\n\n ClienteRIF,\n\n FacturaFiscal,\n\n case Tipo when 'FAC' then\n\n (SubTotal)\n\n else\n\n (SubTotal * -1) end as SubTotal,\n\n case Tipo when 'FAC' then\n\n (CoalEsce(Descuento, 0))\n\n else\n\n (CoalEsce(Descuento, 0) * -1) end as Descuento,\n\n case Tipo when 'FAC' then\n\n (CoalEsce(DescLineas + MontoRedimido , 0))\n\n else\n\n (CoalEsce(DescLineas + MontoRedimido, 0) * -1) end as DescLineas,\n\n case Tipo when 'FAC' then\n\n (SubTotal - Coalesce(Descuento, 0) - CoalEsce(DescLineas + MontoRedimido, 0))\n\n else\n\n (SubTotal - Coalesce(Descuento, 0) - CoalEsce(DescLineas + MontoRedimido, 0)) * -1 end as MontoNeto,\n\n case Tipo when 'FAC' then\n\n MontoIVa\n\n else\n\n MontoIva * -1\n\n end as MontoIva,\n\n case Tipo when 'FAC' then\n\n Total\n\n else\n\n Total * -1 end as Total,\n\n case Tipo when 'FAC' then\n\n (Select Sum(Monto) from ventaspropinas\n\n where CorrelativoVta = vta.Correlativo and TipoDocumento = vta.Tipo)\n\n else\n\n (Select Sum(Monto) from ventaspropinas\n\n where CorrelativoVta = vta.Correlativo and TipoDocumento = vta.Tipo) * -1\n\n end as Propina,\n\n case Tipo when 'FAC' then\n\n Efectivo\n\n else\n\n Efectivo * -1 end as Efectivo,\n\n case Tipo when 'FAC' then\n\n Cheque\n\n else\n\n Cheque * -1 end as Cheque,\n\n case Tipo when 'FAC' then\n\n TDebito\n\n else\n\n TDebito * -1 end as TDebito,\n\n case Tipo when 'FAC' then\n\n TCredito\n\n else\n\n TCredito * -1 end as TCredito,\n\n case Tipo when 'FAC' then\n\n Credito\n\n else\n\n Credito * -1 end as Credito\n\n from vta\n\n where fechaventa in ($rango) and tipo in ('FAC', 'DEV') order by Tipo, Correlativo\";\n\n }\n\n elseif ($filtro == \"I\"){\n\n //Total resumen de venta para inventario\n\n $sql = \"select fechaventa, tipo, correlativo, coletillatipo, clientenombre, clienterif, facturafiscal, efectivo, cheque, TDebito, Tcredito, Credito, Propina,\n\n sum(subtotal) as subtotal, sum(descuento) as descuento, sum(desclineas) as desclineas, sum(montoneto) as montoneto, sum(montoiva) as montoiva, sum(total) as total, sum (coalesce(propina, 0)) as tpropina\n\nfrom (Select vta.fechaventa,\n\n vta.tipo,\n\n vta.Correlativo,\n\n vta.ColetillaTipo,\n\n Coalesce(vta.ClienteNombre, '') || ' ' || Coalesce(vta.ClienteApellido, '') as ClienteNombre,\n\n vta.ClienteRIF,\n\n vta.FacturaFiscal,\n\n case vta.Tipo when 'FAC' then\n\n vta.Efectivo\n\n else\n\n vta.Efectivo * -1 end as Efectivo,\n\n case vta.Tipo when 'FAC' then\n\n vta.Cheque\n\n else\n\n vta.Cheque * -1 end as Cheque,\n\n case vta.Tipo when 'FAC' then\n\n vta.TDebito\n\n else\n\n vta.TDebito * -1 end as TDebito,\n\n case vta.Tipo when 'FAC' then\n\n vta.TCredito\n\n else\n\n vta.TCredito * -1 end as TCredito,\n\n case vta.Tipo when 'FAC' then\n\n vta.Credito\n\n else\n\n vta.Credito * -1 end as Credito,\n\n case vtadte.Tipo when 'FAC' then\n\n (vtadte.PRECIOSINIVA * vtadte.CANTIDAD)\n\n else\n\n (vtadte.PRECIOSINIVA * vtadte.CANTIDAD * -1) end as SubTotal,\n\n case vtadte.Tipo when 'FAC' then\n\n ((vtadte.PRECIOSINIVA * vtadte.CANTIDAD) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA * vtadte.CANTIDAD))/100))\n\n else\n\n (vtadte.PRECIOSINIVA * vtadte.CANTIDAD) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA * vtadte.CANTIDAD))/100) * -1 end as Descuento,\n\n case vtadte.Tipo when 'FAC' then\n\n (CoalEsce((vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS) * vtadte.CANTIDAD , 0))\n\n else\n\n (CoalEsce((vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS) * vtadte.CANTIDAD, 0) * -1) end as DescLineas,\n\n case vta.Tipo when 'FAC' then\n\n (vtadte.PRECIOSINIVA - ((vtadte.PRECIOSINIVA) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA))/100)) - (vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS)) * vtadte.CANTIDAD\n\n else\n\n (vtadte.PRECIOSINIVA - ((vtadte.PRECIOSINIVA) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA))/100)) - (vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS)) * vtadte.CANTIDAD * -1 end as MontoNeto,\n\n case vta.Tipo when 'FAC' then\n\n ((vtadte.PRECIOSINIVA - ((vtadte.PRECIOSINIVA) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA))/100)) - (vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS)) * vtadte.CANTIDAD) * (vtadte.PORCIVA / 100)\n\n else\n\n ((vtadte.PRECIOSINIVA - ((vtadte.PRECIOSINIVA) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA))/100)) - (vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS)) * vtadte.CANTIDAD) * (vtadte.PORCIVA / 100) * -1\n\n end as MontoIva,\n\n case vta.Tipo when 'FAC' then\n\n ((vtadte.PRECIOSINIVA - ((vtadte.PRECIOSINIVA) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA))/100)) - (vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS)) * vtadte.CANTIDAD) + (((vtadte.PRECIOSINIVA - ((vtadte.PRECIOSINIVA) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA))/100)) - (vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS)) * vtadte.CANTIDAD) * (vtadte.PORCIVA / 100))\n\n else\n\n ((vtadte.PRECIOSINIVA - ((vtadte.PRECIOSINIVA) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA))/100)) - (vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS)) * vtadte.CANTIDAD) + (((vtadte.PRECIOSINIVA - ((vtadte.PRECIOSINIVA) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA))/100)) - (vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS)) * vtadte.CANTIDAD) * (vtadte.PORCIVA / 100)) * -1 end as Total,\n\n case vta.Tipo when 'FAC' then\n\n (Select Sum(Monto) from ventaspropinas\n\n where CorrelativoVta = vta.Correlativo and TipoDocumento = vta.Tipo)\n\n else\n\n (Select Sum(Monto) from ventaspropinas\n\n where CorrelativoVta = vta.Correlativo and TipoDocumento = vta.Tipo) * -1\n\n end as Propina\n\nfrom\n\n vta, vtadte\n\n where\n\n vta.correlativo = vtadte.correlativoprincipal and\n\n vta.Tipo = vtadte.tipo and\n\n vta.fechaventa in ($rango) and\n\n vtadte.TipoProducto = 'P' and\n\n vta.tipo in ('DEV', 'FAC') and\n\n vta.subtotal <> 0 and \n\n vtadte.cantidad <> 0 and\n\n vtadte.PRECIOSINIVA <> 0)\n\ngroup by fechaventa, tipo, correlativo, coletillatipo, clientenombre, clienterif, facturafiscal, efectivo, cheque, TDebito, Tcredito, Credito, Propina\";\n\n }\n\n elseif ($filtro == \"S\"){\n\n //Total resumen de venta para inventario\n\n $sql = \"select fechaventa, tipo, correlativo, coletillatipo, clientenombre, clienterif, facturafiscal, efectivo, cheque, TDebito, Tcredito, Credito, Propina,\n\n sum(subtotal) as subtotal, sum(descuento) as descuento, sum(desclineas) as desclineas, sum(montoneto) as montoneto, sum(montoiva) as montoiva, sum(total) as total, sum (coalesce(propina, 0)) as tpropina\n\nfrom (Select vta.fechaventa,\n\n vta.tipo,\n\n vta.Correlativo,\n\n vta.ColetillaTipo,\n\n Coalesce(vta.ClienteNombre, '') || ' ' || Coalesce(vta.ClienteApellido, '') as ClienteNombre,\n\n vta.ClienteRIF,\n\n vta.FacturaFiscal,\n\n case vta.Tipo when 'FAC' then\n\n vta.Efectivo\n\n else\n\n vta.Efectivo * -1 end as Efectivo,\n\n case vta.Tipo when 'FAC' then\n\n vta.Cheque\n\n else\n\n vta.Cheque * -1 end as Cheque,\n\n case vta.Tipo when 'FAC' then\n\n vta.TDebito\n\n else\n\n vta.TDebito * -1 end as TDebito,\n\n case vta.Tipo when 'FAC' then\n\n vta.TCredito\n\n else\n\n vta.TCredito * -1 end as TCredito,\n\n case vta.Tipo when 'FAC' then\n\n vta.Credito\n\n else\n\n vta.Credito * -1 end as Credito,\n\n case vtadte.Tipo when 'FAC' then\n\n (vtadte.PRECIOSINIVA * vtadte.CANTIDAD)\n\n else\n\n (vtadte.PRECIOSINIVA * vtadte.CANTIDAD * -1) end as SubTotal,\n\n case vtadte.Tipo when 'FAC' then\n\n ((vtadte.PRECIOSINIVA * vtadte.CANTIDAD) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA * vtadte.CANTIDAD))/100))\n\n else\n\n (vtadte.PRECIOSINIVA * vtadte.CANTIDAD) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA * vtadte.CANTIDAD))/100) * -1 end as Descuento,\n\n case vtadte.Tipo when 'FAC' then\n\n (CoalEsce((vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS) * vtadte.CANTIDAD , 0))\n\n else\n\n (CoalEsce((vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS) * vtadte.CANTIDAD, 0) * -1) end as DescLineas,\n\n case vta.Tipo when 'FAC' then\n\n (vtadte.PRECIOSINIVA - ((vtadte.PRECIOSINIVA) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA))/100)) - (vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS)) * vtadte.CANTIDAD\n\n else\n\n (vtadte.PRECIOSINIVA - ((vtadte.PRECIOSINIVA) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA))/100)) - (vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS)) * vtadte.CANTIDAD * -1 end as MontoNeto,\n\n case vta.Tipo when 'FAC' then\n\n ((vtadte.PRECIOSINIVA - ((vtadte.PRECIOSINIVA) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA))/100)) - (vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS)) * vtadte.CANTIDAD) * (vtadte.PORCIVA / 100)\n\n else\n\n ((vtadte.PRECIOSINIVA - ((vtadte.PRECIOSINIVA) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA))/100)) - (vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS)) * vtadte.CANTIDAD) * (vtadte.PORCIVA / 100) * -1\n\n end as MontoIva,\n\n case vta.Tipo when 'FAC' then\n\n ((vtadte.PRECIOSINIVA - ((vtadte.PRECIOSINIVA) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA))/100)) - (vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS)) * vtadte.CANTIDAD) + (((vtadte.PRECIOSINIVA - ((vtadte.PRECIOSINIVA) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA))/100)) - (vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS)) * vtadte.CANTIDAD) * (vtadte.PORCIVA / 100))\n\n else\n\n ((vtadte.PRECIOSINIVA - ((vtadte.PRECIOSINIVA) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA))/100)) - (vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS)) * vtadte.CANTIDAD) + (((vtadte.PRECIOSINIVA - ((vtadte.PRECIOSINIVA) * (((vta.Descuento*100)/(vtadte.PRECIOSINIVA))/100)) - (vtadte.DESCUENTO + vtadte.DESCUENTOPUNTOS)) * vtadte.CANTIDAD) * (vtadte.PORCIVA / 100)) * -1 end as Total,\n\n case vta.Tipo when 'FAC' then\n\n (Select Sum(Monto) from ventaspropinas\n\n where CorrelativoVta = vta.Correlativo and TipoDocumento = vta.Tipo)\n\n else\n\n (Select Sum(Monto) from ventaspropinas\n\n where CorrelativoVta = vta.Correlativo and TipoDocumento = vta.Tipo) * -1\n\n end as Propina\n\nfrom\n\n vta, vtadte\n\n where\n\n vta.correlativo = vtadte.correlativoprincipal and\n\n vta.Tipo = vtadte.tipo and\n\n vta.fechaventa in ($rango) and\n\n vtadte.TipoProducto = 'S' and\n\n vta.tipo in ('DEV', 'FAC') and\n\n vta.subtotal <> 0 and\n\n vtadte.cantidad <> 0 and\n\n vtadte.PRECIOSINIVA <> 0)\n\ngroup by fechaventa, tipo, correlativo, coletillatipo, clientenombre, clienterif, facturafiscal, efectivo, cheque, TDebito, Tcredito, Credito, Propina\";\n\n }\n\n else {\n\n echo \"Error Filtro no reconocido\";\n\n }\n\n $arsql[] = $sql;\n\n \n\n return urlsafe_b64encode(serialize($arsql));\n\n}", "title": "" }, { "docid": "1a7e50835475b17497f901435f4e6190", "score": "0.55233747", "text": "public function calculerQuantiteRestante() {\r\n\t\t\t$quantiteRestante = $this ->_quantiteAchat;\r\n\t\t\tforeach ($this ->_ventesTab as $vente) {\r\n\t\t\t\t$quantiteRestante -= $vente ->getQuantite();\r\n\t\t\t}\r\n\t\t\t$quantiteRestante -= $this ->_marchandiseRetiree;\r\n\t\t\treturn $quantiteRestante;\r\n\t\t}", "title": "" }, { "docid": "1537f6530f302ee191c3a2a6a16e9819", "score": "0.55221474", "text": "public function getNove($idNom, $idEmp ,$diasLab, $diasVac ,$horas ,$formula ,$tipo ,$idCcos ,\n $idCon, $ac, $tipn,$dev,$ded,$idfor,$diasLabC,$idCpres,$calc,$conVac,$obId)\n { \n\n }", "title": "" }, { "docid": "1438c7bef342240f3a99f22ea2cf23bd", "score": "0.5517809", "text": "function nombre_enseignant()\n {\n\t$query=mysql_query(\"SELECT COUNT(matr) FROM etudiant\");\n\treturn mysql_result($query,0);\n }", "title": "" }, { "docid": "b378a86b561bd806df5cc1c80611bb84", "score": "0.55147314", "text": "function calcularPosicion($id_jornada_prueba, $id_competidor)\r\n{\r\n\tglobal $enlace;\r\n\t$sql=\"SELECT comp.identificacion ,concat_ws(' ',comp.nombres,comp.apellidos) AS nombre, cl.abreviatura,result.tiempo FROM resultados result, \r\n\tcompetidor comp ,competencia comcia,clubs cl where id_jornada_prueba=$id_jornada_prueba AND result.id_competidor=comp.identificacion AND \r\n\tcomcia.club=cl.id AND comcia.competidor= comp.identificacion GROUP by comp.identificacion ORDER BY result.tiempo ASC\"; \r\n\t$resultados = mysqli_query($enlace, $sql );\r\n\t$posicion = 0;\r\n\t$tiempo_anterior = \"\";\r\n\t$posicion_aux = -1;\r\n\t$result = 0;\r\n\twhile($resultado = mysqli_fetch_assoc($resultados)){\r\n\t\t$posicion ++;\r\n\t\tif($tiempo_anterior == $resultado[\"tiempo\"]){\r\n\t\t\tif($posicion_aux == -1)\r\n\t\t\t{\r\n\t\t\t\t$posicion_aux = $posicion - 1;\r\n\t\t\t $result = $posicion_aux;\t\r\n\t\t\t}\r\n\t\t $result = $posicion_aux;\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$posicion_aux = -1;\r\n\t\t\t$result = $posicion;\r\n\t\t}\r\n\t\tif($resultado[\"identificacion\"] == $id_competidor){\r\n\t\t\treturn $result;\r\n\t\t}\r\n\t\t$tiempo_anterior = $resultado[\"tiempo\"];\r\n\t}\r\n}", "title": "" }, { "docid": "373cc6f684336516679f37d1354b3dc1", "score": "0.5512655", "text": "function credito ($ua){\n $sql=\"select sum(b.credito) as cred \"\n . \" from mocovi_credito b, mocovi_periodo_presupuestario c\"\n . \" where \"\n . \" b.id_periodo=c.id_periodo\"\n . \" and b.id_escalafon='D'\"\n . \" and c.actual \"\n . \" and b.id_unidad =trim(upper('\".$ua.\"'))\" ;\n \n $resul=toba::db('designa')->consultar($sql);\n \n if($resul[0]['cred'] <>null){\n $tengo=$resul[0]['cred'];\n }else{$tengo=0;\n \n }\n return $tengo;\n \n }", "title": "" }, { "docid": "0eaae8dfdcc333e8275fc02e0de78c7b", "score": "0.55072427", "text": "function Get_fond()\n{\n $resref = \"SELECT * FROM `fond` WHERE `id` =1 \" ;\n $countref=prdoperator($resref, 'get', 'single');\n if($countref != null) {\n\n $row=$countref;\n if($row != null) {\n\n\n extract($row);\n return $capital;\n\t\t\t}\n\t}\n return 0;\n}", "title": "" }, { "docid": "6a461e21b627376592d44166b9ea23ff", "score": "0.5501344", "text": "function saisi()\n{\n do {\n do {\n $n = readline(\"Entrer la taille du tableau :\");\n } while (!is_numeric($n));\n } while (!is_int($n * 1));\n return $n;\n}", "title": "" }, { "docid": "92fe8d8b434ea9ca50966ddc6c2ac03f", "score": "0.5499237", "text": "function get_detallefacturaaux_nit($venta_id)\r\n {\r\n $detalle_factura_aux = $this->db->query(\"\r\n SELECT\r\n d.*, v.cliente_nit, v.cliente_razon, v.venta_total, v.cdi_codigoclasificador\r\n FROM\r\n detalle_factura_aux d, consventastotales v\r\n WHERE\r\n d.venta_id = $venta_id\r\n and d.venta_id = v.venta_id\r\n \")->result_array();\r\n\r\n return $detalle_factura_aux;\r\n }", "title": "" }, { "docid": "8422a9e0fb4f302b898cef41164dc8f2", "score": "0.54965234", "text": "function buscarIdPreguntaSecreta($pre_des)\r\n\t{\r\n $selec_Preid= sql(\"select pre_id from pregunta_secreta where pre_des LIKE '$pre_des'\");\r\n \t $filas=oci_fetch_array($selec_Preid,OCI_BOTH);\r\n\t $pre_id= $filas['PRE_ID'];\r\n\t\t\r\n\t\treturn $pre_id;\r\n\t}", "title": "" }, { "docid": "4bbe5e8b589522791dc607aa1d480a29", "score": "0.54965013", "text": "function getSecuencia2($secuencia, $codigo1, $codigo2, $tabla, $valor1, $valor2) {\r\n\tconnect();\r\n\t$sql=\"select max($secuencia) FROM $tabla WHERE $codigo1='$valor1' AND $codigo2='$valor2'\";\r\n\t$query=mysql_query($sql) or die ($sql.mysql_error());\r\n\t$field=mysql_fetch_array($query);\r\n\t$secuencia=(int) ($field[0]+1);\r\n\treturn ($secuencia);\r\n}", "title": "" }, { "docid": "b90f6b927b5261b999341202a6157ea0", "score": "0.54961354", "text": "function carga_nombres()\r\n{\r\n$valor_inicial=1251;\r\n\r\nfor($i=1;$i<=250;$i++){ \r\n\r\n$nombre[$i] = $valor_inicial++.\";0\";\r\n \r\n}\r\n\r\n// CARGA LA LISTA DE NOMBRES DESDE EL PRIMER VALOR\r\n\r\n//$lista = explode (\";\",\"S. SIRI;\r\n//E. BRENMAN;\r\n//G. ARGUELLO;\r\n//P. MANCINI;\r\n//A. FRIZZERA;\r\n//M. SOLIZ;\r\n//MARIA E.;\r\n//MARIANO G.;\r\n//MARIANA C.;\r\n//MARINA P.;\r\n//DARIO G.;\r\n//MATIAS A.;\r\n//VOGEL G.;\r\n//SILVANA C.;\r\n//FEDERICO W.;\r\n//LUCIO L.\");\r\n\r\n$cantidad=count($lista);\r\n\r\nfor($i=1;$i<=$cantidad;$i++){ \r\n\r\n$nombre[$i] = $lista[$i-1].\";1\"; \r\n \r\n} \r\n\r\nreturn $nombre;\r\n}", "title": "" }, { "docid": "dac295bd5cc75b62cc787db53d741359", "score": "0.5495644", "text": "function luasSegitiga($alas, $tinggi){\n $luas= $alas * $tinggi * 0.5;\n return $luas;\n}", "title": "" } ]
537b85f728bfd919656d95ae6c016d2e
find PSR by ID
[ { "docid": "fb31d719a74cc89f6dd2f2a9292e9e43", "score": "0.65706533", "text": "public static function findPsrById($id_psr)\r\n {\r\n $db = MsSQL::getConnection();\r\n\r\n $sql = \"SELECT\r\n sgp.*,\r\n sgu.site_client_name\r\n FROM site_gm_psr sgp\r\n INNER JOIN site_gm_users sgu\r\n ON sgp.id_user = sgu.site_account_id\r\n WHERE sgp.id = :id\";\r\n\r\n $result = $db->prepare($sql);\r\n $result->bindParam(':id', $id_psr, PDO::PARAM_INT);\r\n $result->execute();\r\n return $result->fetch(PDO::FETCH_ASSOC);\r\n }", "title": "" } ]
[ { "docid": "82e2d1e61a8c20a45fc64fb7874dc485", "score": "0.66715854", "text": "public function findById($id) {\n\t\t$class = self::getClass();\n\t\treturn self::communFindById($class, $id);\n\t}", "title": "" }, { "docid": "4ba0bb840053f6b366dbace10319280e", "score": "0.6590953", "text": "static function find($id);", "title": "" }, { "docid": "1edb04badf95534bc42107f084a05c81", "score": "0.6569967", "text": "public static function find($id) {\n return parent::find(__CLASS__, $id);\n }", "title": "" }, { "docid": "e4ae8b60c53a19c6589c09022634ee02", "score": "0.6489749", "text": "static public function find($id);", "title": "" }, { "docid": "2f0e0cd79ffc7890b17abe3963e95327", "score": "0.6473203", "text": "public static function find($id)\n {\n $class = get_called_class();\n //\n return new $class($id);\n }", "title": "" }, { "docid": "80f5c80e9a01bc8c27e35dd1d153867b", "score": "0.64497286", "text": "public static function findById($id);", "title": "" }, { "docid": "e19a754e4f7d0ead3eed19f4e09596f7", "score": "0.64432997", "text": "private function findById (int $id) {\n return $this->parser->find(Config::get('incut.tag').'['. Config::get('incut.attr').'='.$id.']');\n }", "title": "" }, { "docid": "37af817733b6d625a4d280a1bc586a5b", "score": "0.64341366", "text": "public function find ($id);", "title": "" }, { "docid": "9e8c41e70bc5eab7211101ad9be1949c", "score": "0.6383649", "text": "abstract public function find($id);", "title": "" }, { "docid": "ef6961a9dd55ae9ec6d7ddc78869fc0c", "score": "0.63801616", "text": "public function findComercializador($id);", "title": "" }, { "docid": "bd69b7a7b7a52bdffa72d6a6df98ef19", "score": "0.6335171", "text": "function find($id);", "title": "" }, { "docid": "bd69b7a7b7a52bdffa72d6a6df98ef19", "score": "0.6335171", "text": "function find($id);", "title": "" }, { "docid": "ed2b19df45b815cae701028cf8e69371", "score": "0.6286839", "text": "public function find( $id ) {\n }", "title": "" }, { "docid": "cb893160d58f3acdc238c4bb7768bb1b", "score": "0.62850547", "text": "public function findById ( $id )\n\t{\n\t\treturn $this->abstractFindById(self::RETURNTYPE,$id);\n\t}", "title": "" }, { "docid": "53159fb90f6a8c532a0fd057d24c7c4d", "score": "0.6262793", "text": "public static function find( $id );", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "03f9da00980e860245df06d30e8a08ab", "score": "0.6240109", "text": "public function find($id);", "title": "" }, { "docid": "5446fbbb8cbbde469b3e11fadeae9bd0", "score": "0.62392044", "text": "public function find_by_id( $id ) {\n\t\treturn $this->find_one( array( 'p' => $id ) );\n\n\t}", "title": "" }, { "docid": "42ee4df4ae95f1c31f025c75ebb06a8f", "score": "0.62342644", "text": "public function find($id)\r\n {\r\n }", "title": "" }, { "docid": "42ee4df4ae95f1c31f025c75ebb06a8f", "score": "0.62342644", "text": "public function find($id)\r\n {\r\n }", "title": "" }, { "docid": "99d94079eba3a513d2d89a5e2b16efb2", "score": "0.6226725", "text": "public function find($id){}", "title": "" }, { "docid": "fe071b081f2c86b17ec859ae1d042bb9", "score": "0.62217045", "text": "function findById(int $id);", "title": "" }, { "docid": "59c4566ef78ae7fa306f3c401ee76707", "score": "0.62190163", "text": "public function findById ( $id );", "title": "" }, { "docid": "d9262654c270d67881f2ce6385df3d15", "score": "0.6203915", "text": "public function findById($id)\n {\n }", "title": "" }, { "docid": "c4a859ee1373210758754b41f66f2d72", "score": "0.62022775", "text": "public static function find( $id ) {\n\t\tforeach ( self::$containers as $name => $container ) {\n\t\t\tif ( $container->has( $id ) ) {\n\t\t\t\treturn $name;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "52b6f94133f9d9c9b7389c06a215b30c", "score": "0.61409265", "text": "function get_by_id($id)\n {\n }", "title": "" }, { "docid": "86dcf3aff3b1212fd2b69ae33e93d5ea", "score": "0.6134503", "text": "public function find($id)\n {\n }", "title": "" }, { "docid": "86dcf3aff3b1212fd2b69ae33e93d5ea", "score": "0.6134503", "text": "public function find($id)\n {\n }", "title": "" }, { "docid": "86dcf3aff3b1212fd2b69ae33e93d5ea", "score": "0.6134503", "text": "public function find($id)\n {\n }", "title": "" }, { "docid": "86dcf3aff3b1212fd2b69ae33e93d5ea", "score": "0.6134503", "text": "public function find($id)\n {\n }", "title": "" }, { "docid": "86dcf3aff3b1212fd2b69ae33e93d5ea", "score": "0.6134503", "text": "public function find($id)\n {\n }", "title": "" }, { "docid": "8280ad5b1a6bd325a047aec153132410", "score": "0.6132879", "text": "public function find($id)\n {\n if (!$id) return null;\n return parent::find($id);\n }", "title": "" }, { "docid": "4f2ca204538b4ea1802890480ba8d2f4", "score": "0.6116424", "text": "public function findCateRowById($id);", "title": "" }, { "docid": "a15cb0512f74c965d6c0a6dc7cb4b69f", "score": "0.6076591", "text": "public function findById($id) {\r\n \treturn $this->find($id)->current();\r\n }", "title": "" }, { "docid": "6712a97acfdb3c3adae13777213edb4e", "score": "0.60700715", "text": "public function find($id){\n }", "title": "" }, { "docid": "7e6d354c327a33da9e650c76d3dcd8e1", "score": "0.60635906", "text": "static public function find($id)\n {\n $find_by_method = 'find_by_' . (static::$_primary_column_name);\n static::$find_by_method($id);\n }", "title": "" }, { "docid": "89ab699eb014dabd7c3bff6bd90d5272", "score": "0.6058861", "text": "public static function findById(int $id);", "title": "" }, { "docid": "cad9922f8dee4cfd1b6dc5ec2a94af45", "score": "0.60406893", "text": "private function communFindById($class, $id) {\t\t\n\t\t$table = self::getTableBdd($class);\n\t\t$primary = self::idBdd($table);\n\t\t$attributs = self::getAttributs($class);\n\t\t$pdo = ConnexionBDD::getInstance()->query(\"SELECT * FROM \" . $table. \" WHERE \" . $primary . \"=\" . Securite::bdd($id));\n\t\t$tableau = $pdo->fetch(PDO::FETCH_ASSOC);\n\t \tforeach ($tableau as $key => $row) {\n\t \t\t$attribut = \"set\".ucfirst($key); \n\t \t\tif (in_array($attribut,$attributs)) {\n\t\t\t if (class_exists($key)) {\n\t\t\t\t $sousClass = self::findByIdSousClass($key, $row);\n\t\t\t\t $class->$attribut($sousClass);\n\t\t\t\t} else {\n\t\t\t\t $class->$attribut($row); \t\t\n\t\t\t\t} \t\t\n\t\t\t}\n\t \t}\n\n \t\treturn $class;\n\t}", "title": "" }, { "docid": "1a4ddc0be72fd7389ce9e7f08f6ace2f", "score": "0.60347176", "text": "public function findById($id) \n {\n return $this->line\n ->whereId($id)\n ->first();\n }", "title": "" }, { "docid": "9d68a9f665870d6092b7027dfeb8ad55", "score": "0.60310227", "text": "public function getBy($id);", "title": "" }, { "docid": "2df7021ac0380634c509e7ee5cca83d0", "score": "0.6026291", "text": "public function find($id)\n {\n return $this->repository->find($id);\n }", "title": "" }, { "docid": "c774e9b1b820bbe0dd602ba3d4b09fcf", "score": "0.60219675", "text": "public function find(int $id);", "title": "" }, { "docid": "b9ce798839a7d31599b023e1bf41d12b", "score": "0.60083413", "text": "public function findById($id)\n {\n }", "title": "" }, { "docid": "ef4d49e71649c186a465da1238ed6bcf", "score": "0.5996755", "text": "function find_project_for_id($find_id) {\n\t\t\t$found_project = \"\";\n\n\t\t\t# look in every project folder ...\n\t\t\tforeach (glob(\"projects/*/\", GLOB_ONLYDIR) as $directory) {\n\t\t\t\t$project_file = \"$directory/info.txt\";\n\n\t\t\t\t# read information file\n\t\t\t\t$lines = file($project_file);\n\n\t\t\t\t# line 1 is the ID ...\n\t\t\t\t$project_id = $lines[1];\n\t\n\t\t\t\t# if this is the ID we're looking for, put it in $found_project\n\t\t\t\t# and then jump out of the loop\n\t\t\t\tif ($project_id == $find_id) {\n\t\t\t\t\t$found_project = $directory;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\treturn $found_project;\n\t\t}", "title": "" }, { "docid": "9e11bbffdcb2b1e4b20b86849b3816da", "score": "0.59942687", "text": "public function find_by_id($id)\n\t{\n\t\treturn $this->where('id', $id)->find();\n\t}", "title": "" }, { "docid": "b34adde400475d6f7764093656851818", "score": "0.59891415", "text": "public static function find( $id = 0 );", "title": "" }, { "docid": "d7d34055ea0af7847e07f660f0ffb277", "score": "0.5975574", "text": "static public function find_by_id($id = ''){\n\t\tglobal $db;\n\t\t$sql = \"SELECT * FROM \".static::$table.\" WHERE id = {$id}\";\n\t\t$result = self::find_by_sql($sql);\n\t\treturn !empty($result) ? array_shift($result) : false;\t\n\t}", "title": "" }, { "docid": "d26748df9f4bc278d6dbdc67b2113b40", "score": "0.59752524", "text": "public function find($id)\n {\n return $this->repo->find($id);\n }", "title": "" }, { "docid": "cbf146ddb19afd130ea3d1a422082ae5", "score": "0.5974893", "text": "public function find($name,$id){\n\t\tif(!(int)$id){\n\t\t\tthrow \\InvalidArgumentException('Invalid ID given, must be an integer greater then zero');\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t$repo=$this->getRepository((string)$name);\n\t\tif($repo){\n\t\t\treturn $repo->find((int)$id);\n\t\t}\n\t\telse{\n\t\t\tthrow new \\RuntimeException('No such repository: '.((string)$name));\n\t\t\treturn NULL;\n\t\t}\n\t}", "title": "" }, { "docid": "4d51aacc4aa6c2f07b87dfe6ce0680ac", "score": "0.59661144", "text": "public function find(int $id) : stdClass;", "title": "" }, { "docid": "6ccf540a02d1d239eac4cfb97c941624", "score": "0.5943968", "text": "public function getByID($id)\n {\n }", "title": "" }, { "docid": "52a42b25e4f6701f1a21c7cc9117e8ce", "score": "0.5943188", "text": "public function find($id = 0);", "title": "" }, { "docid": "ab3590b28b6f33ab07f8043f1f88b2b6", "score": "0.5942255", "text": "public function find($id)\n {\n\n }", "title": "" }, { "docid": "20b0e3c86922553b0bb34834a23f6ddb", "score": "0.5935996", "text": "public function findId($id)\n\t{\n\t\treturn static::findOne(['id' => $id]);\n\t}", "title": "" }, { "docid": "332c57d06eb445e939af0e71e8db9dd1", "score": "0.59340036", "text": "public function findByID($id) {\n $results = $this->select(array('GameID' => $id));\n if(!$results) { return null; }\n return $this->fillGame($results[0]);\n }", "title": "" }, { "docid": "a7a424fbc25ab97b8dfb2b9ab3e1488c", "score": "0.59262776", "text": "public static function findIdentity($id)\n {\n }", "title": "" }, { "docid": "b52af4f0b1e45b1cf3bfdc9cfb802a56", "score": "0.5918786", "text": "public function findById($id);", "title": "" }, { "docid": "b52af4f0b1e45b1cf3bfdc9cfb802a56", "score": "0.5918786", "text": "public function findById($id);", "title": "" }, { "docid": "b52af4f0b1e45b1cf3bfdc9cfb802a56", "score": "0.5918786", "text": "public function findById($id);", "title": "" }, { "docid": "b52af4f0b1e45b1cf3bfdc9cfb802a56", "score": "0.5918786", "text": "public function findById($id);", "title": "" }, { "docid": "b52af4f0b1e45b1cf3bfdc9cfb802a56", "score": "0.5918786", "text": "public function findById($id);", "title": "" }, { "docid": "b52af4f0b1e45b1cf3bfdc9cfb802a56", "score": "0.5918786", "text": "public function findById($id);", "title": "" }, { "docid": "b52af4f0b1e45b1cf3bfdc9cfb802a56", "score": "0.5918786", "text": "public function findById($id);", "title": "" } ]
1ddd97329801c6daecb41a58fcb1c7dc
Returns all the elements assigned.
[ { "docid": "712db3040fff6f9620787eaaee858aa9", "score": "0.0", "text": "public function getElements() : array\n {\n return $this->formElements;\n }", "title": "" } ]
[ { "docid": "8ddd5fa478b73801752c24aebebbbd07", "score": "0.6960644", "text": "public static function assign()\n {\n return array();\n }", "title": "" }, { "docid": "449ac11585c2b8f932594f5352c855a3", "score": "0.6818171", "text": "public function all(): array\n {\n return $this->elements;\n }", "title": "" }, { "docid": "17a3c9dba5022550dbf5dc130709d0dc", "score": "0.67567927", "text": "public static function &getAll(): array\n {\n return self::getInstance()->elements;\n }", "title": "" }, { "docid": "9b2c5a2285654ca9ca3061c80e5a4f30", "score": "0.67156976", "text": "public function elements()\r\n {\r\n return array(\r\n \r\n );\r\n }", "title": "" }, { "docid": "ca9dfc4fbab6be4aa3b56333332a1362", "score": "0.67041457", "text": "public function getAssignedVars()\n {\n return $this->_vars;\n }", "title": "" }, { "docid": "157f546eb995066e2ca80c4a7d98d20b", "score": "0.6649869", "text": "protected function getElements(){\n return $this->_elements;\n }", "title": "" }, { "docid": "fd8d42f7c526f7233558553b929cd8e1", "score": "0.65844005", "text": "public function elements()\n {\n return [];\n }", "title": "" }, { "docid": "c885669b7d6376bca707124b73737281", "score": "0.65505475", "text": "public function get_elements()\n\t{\n\t\treturn $this->elements;\n\t}", "title": "" }, { "docid": "c2269d5a7fe8eb777c87108f764b02dc", "score": "0.6512929", "text": "public function elements(): array {\n\t\treturn $this->m_elements;\n\t}", "title": "" }, { "docid": "b83a22616ba0f67ab0c68695cae19e71", "score": "0.6457377", "text": "protected function getElements()\n {\n return $this->elements;\n }", "title": "" }, { "docid": "b5b9cd89d96b08d2efbbee8a645e7a31", "score": "0.63891745", "text": "public function getElements() {}", "title": "" }, { "docid": "b537bfa0a980b8a6fa9259929e3717e8", "score": "0.63618284", "text": "public function elements()\n {\n return parent::elements();\n }", "title": "" }, { "docid": "9b03c21d640dd34fda2075fc437491a9", "score": "0.6350462", "text": "public function getElements() {\n\t\treturn $this->elements;\n\t}", "title": "" }, { "docid": "c55f497f94f67ae9f8389fbfacda1d4e", "score": "0.6326554", "text": "public function elements()\n {\n return array(\n \n );\n }", "title": "" }, { "docid": "0c807128ebd7abc64552eeeea6bf437c", "score": "0.6315344", "text": "public function getAssignments(): array;", "title": "" }, { "docid": "7e1b4ae70f26bf7313e0a019052cbf7c", "score": "0.62972116", "text": "public function getAllElements()\n {\n return $this->config;\n }", "title": "" }, { "docid": "0a1a477bd1bb1e97502dd820e0f4cf21", "score": "0.6296145", "text": "public function getElements()\n\t{\n\t\treturn $this->elements;\n\t}", "title": "" }, { "docid": "0a1a477bd1bb1e97502dd820e0f4cf21", "score": "0.6296145", "text": "public function getElements()\n\t{\n\t\treturn $this->elements;\n\t}", "title": "" }, { "docid": "c005e2ddecc0f78d356b8f9946e8184f", "score": "0.62852144", "text": "public function getAssignments()\n {\n return $this->queryBuilder('tx_deepl_settings')->select('*')\n ->from('tx_deepl_settings')\n ->execute()\n ->fetchAll();\n }", "title": "" }, { "docid": "b3bbfc5be5d47e0cb9c21eca6cc2d789", "score": "0.6276239", "text": "public function all()\n\t{\n\t\treturn $this->getArray();\n\t}", "title": "" }, { "docid": "2deac1ed23c369de6f23677e465ad3ad", "score": "0.6274724", "text": "public function getElements()\n {\n return $this->elements;\n }", "title": "" }, { "docid": "9ebbe68b2feb9595da4138b6eeb5fb6a", "score": "0.6269939", "text": "public function getElements() {\n return $this->elements;\n }", "title": "" }, { "docid": "1bf5b4ecf9955397c1533610fe2dff64", "score": "0.62600183", "text": "public function all()\n {\n return $this->getArray('');\n }", "title": "" }, { "docid": "1a04ab396e5fa26f4438e982d3318d37", "score": "0.62480354", "text": "public function getElements() {\n return $this->elements;\n }", "title": "" }, { "docid": "ca192f07780c650ceed502bdcb1b62c1", "score": "0.61798114", "text": "public function get_assignments(){\n if($this->ID != NULL){\n $sql = \"SELECT ID FROM assignment WHERE Task=\".$this->ID.\";\";\n $myAssignmentIDs = $this->get_by_query($sql);\n $myAssignmentsList = array();\n foreach ($myAssignmentIDs as &$aID) {\n $myAssignment = new Assignment();\n $myAssignment = $myAssignment->get_by_ID($aID['ID']);\n array_push($myAssignmentsList, $myAssignment);\n }\n return $myAssignmentsList;\n }\n }", "title": "" }, { "docid": "1ec7a0cbba504311ecc4865c39734eb2", "score": "0.61693656", "text": "public function elements()\n {\n return [\n //'@element' => '#selector',\n ];\n }", "title": "" }, { "docid": "b52a8158792afd04ba2ab1df0de84e7b", "score": "0.615386", "text": "protected function all()\n\t{\n\t\treturn $this->items;\n\t}", "title": "" }, { "docid": "bad86b65e75ffd70a82167980a4fc02a", "score": "0.6125499", "text": "public function elements()\n {\n return [\n '@email' => 'input[name=email]',\n '@passwd' => 'input[name=passwd]',\n ];\n }", "title": "" }, { "docid": "19e40f96b8c80b7fa077ee39110ee2cc", "score": "0.611613", "text": "public function elements()\n {\n return [\n '@element' => '#selector',\n ];\n }", "title": "" }, { "docid": "19e40f96b8c80b7fa077ee39110ee2cc", "score": "0.611613", "text": "public function elements()\n {\n return [\n '@element' => '#selector',\n ];\n }", "title": "" }, { "docid": "19e40f96b8c80b7fa077ee39110ee2cc", "score": "0.611613", "text": "public function elements()\n {\n return [\n '@element' => '#selector',\n ];\n }", "title": "" }, { "docid": "19e40f96b8c80b7fa077ee39110ee2cc", "score": "0.611613", "text": "public function elements()\n {\n return [\n '@element' => '#selector',\n ];\n }", "title": "" }, { "docid": "098604b9b96318fda65925d748ead196", "score": "0.61158496", "text": "public function getElements();", "title": "" }, { "docid": "e5f3308ee6f4cb9f873906f18e5007da", "score": "0.61054444", "text": "public function all()\n {\n return $this->values;\n }", "title": "" }, { "docid": "204a2b7d96664c72122a0f9794bd6cb4", "score": "0.6094052", "text": "public function getElements(): array\n {\n return $this->elements;\n }", "title": "" }, { "docid": "2cb63b38a188459dd63f4e5dbb41aa44", "score": "0.6060051", "text": "function getListOfElements()\n\t{\n\t\treturn $this->elementListNames;\n\t}", "title": "" }, { "docid": "7a78e83f26e51b168069af1558e0102e", "score": "0.60290873", "text": "function all()\n\t{\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "8714563d911f9cc9a16b8cbadcf80a0f", "score": "0.5988865", "text": "public function all(): array;", "title": "" }, { "docid": "8714563d911f9cc9a16b8cbadcf80a0f", "score": "0.5988865", "text": "public function all(): array;", "title": "" }, { "docid": "8714563d911f9cc9a16b8cbadcf80a0f", "score": "0.5988865", "text": "public function all(): array;", "title": "" }, { "docid": "8714563d911f9cc9a16b8cbadcf80a0f", "score": "0.5988865", "text": "public function all(): array;", "title": "" }, { "docid": "8714563d911f9cc9a16b8cbadcf80a0f", "score": "0.5988865", "text": "public function all(): array;", "title": "" }, { "docid": "8714563d911f9cc9a16b8cbadcf80a0f", "score": "0.5988865", "text": "public function all(): array;", "title": "" }, { "docid": "8714563d911f9cc9a16b8cbadcf80a0f", "score": "0.5988865", "text": "public function all(): array;", "title": "" }, { "docid": "8714563d911f9cc9a16b8cbadcf80a0f", "score": "0.5988865", "text": "public function all(): array;", "title": "" }, { "docid": "8714563d911f9cc9a16b8cbadcf80a0f", "score": "0.5988865", "text": "public function all(): array;", "title": "" }, { "docid": "8714563d911f9cc9a16b8cbadcf80a0f", "score": "0.5988865", "text": "public function all(): array;", "title": "" }, { "docid": "8714563d911f9cc9a16b8cbadcf80a0f", "score": "0.5988865", "text": "public function all(): array;", "title": "" }, { "docid": "8714563d911f9cc9a16b8cbadcf80a0f", "score": "0.5988865", "text": "public function all(): array;", "title": "" }, { "docid": "8714563d911f9cc9a16b8cbadcf80a0f", "score": "0.5988865", "text": "public function all(): array;", "title": "" }, { "docid": "8714563d911f9cc9a16b8cbadcf80a0f", "score": "0.5988865", "text": "public function all(): array;", "title": "" }, { "docid": "8714563d911f9cc9a16b8cbadcf80a0f", "score": "0.5988865", "text": "public function all(): array;", "title": "" }, { "docid": "8714563d911f9cc9a16b8cbadcf80a0f", "score": "0.5988865", "text": "public function all(): array;", "title": "" }, { "docid": "204a7553f32e8be4f12346b614f31650", "score": "0.5986345", "text": "public function all(){\r\n return $this->items;\r\n }", "title": "" }, { "docid": "8d5f8ddc64bc133f377ca794a64d9301", "score": "0.5984607", "text": "public function all()\n\t{\n\t\treturn $this->attributes;\n\t}", "title": "" }, { "docid": "07defc88220fc7decfcd3e2b70236deb", "score": "0.5966241", "text": "protected function _getAllElementSets() {\r\n\t\treturn $this->_helper->db->getTable('ElementSet')->findByRecordType('Item');\r\n\t}", "title": "" }, { "docid": "1c4191608e831d0da65bc715320b047a", "score": "0.59607506", "text": "public function fillarrElements()\r\n\t\t\t{ $this->arrElements=[];\r\n\t\t\t\t //we need element only for our group\r\n\t\t\t\t \r\n\t\t\t\t $this->BottomArrCurSection[]=intval((trim($this->section)));\r\n\t\t\t\t \r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t $elements = Element::find()\r\n\t\t\t\t ->where(['idp' =>$this->BottomArrCurSection ,'issection' =>false, 'active'=>1 ]) \r\n\t\t\t\t ->orderBy(\"name\")\t\t\t\t\r\n\t\t\t\t ->offset( intval( $this->page*$this->elementPerPage))\r\n\t\t\t\t ->limit(intval($this->elementPerPage))\r\n\t\t\t\t //->where(['idp' =>ltrim( $startCode )])\r\n\t\t\t\t ->all();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t \r\n\t\t\t\t\r\n\t\t\t\tforeach($elements as $element){\r\n\t\t\t\t\t$idArray=Array();\r\n\t\t\t\t\t\t\t//echo $element->id;\r\n\t\t\t\t\t\t\r\n //we do not make the tree in this function\r\n\t\t\t\t\t\t// echo 'ffff <br>';\r\n\t\t\t\t\t\t$idArray[ 'id']= $element->id;\r\n\t\t\t\t\t\t$idArray[ 'name']= $element->name;\r\n\t\t\t\t\t\t$idArray[ 'index1']= $element->index1;\r\n\t\t\t\t\t\t$idArray[ 'index2']= $element->index2;\r\n\t\t\t\t\t\t$idArray[ 'idp']= $element->idp;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->arrElements[]=$idArray;\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t}", "title": "" }, { "docid": "7aabc16c9be00486694360b0038494ef", "score": "0.5952409", "text": "public function all()\n\t{\n\t\treturn $this->items;\n\t}", "title": "" }, { "docid": "c2aa878dc608b153a56532056f9e319b", "score": "0.5950021", "text": "function all () {\n return $this -> data;\n }", "title": "" }, { "docid": "8c61110a28c4d273b0ffb2a773163a8f", "score": "0.5943009", "text": "public function all() {\n\t\treturn $this->items;\n\t}", "title": "" }, { "docid": "1ea54012e65f6b051f97c93a3eae7a53", "score": "0.59297746", "text": "public static function all()\n {\n return self::$list;\n }", "title": "" }, { "docid": "022d4a78f18615a60b7640fcfa8becc6", "score": "0.5914366", "text": "public function elements()\n {\n return [\n '@new_record' => 'a[id=\"new_record\"]',\n '@title' => 'input[id=\"title\"]',\n '@description' => 'input[id=\"description\"]',\n '@map' => 'input[id=\"map\"]',\n '@create' => 'button[id=\"create\"]',\n\n ];\n }", "title": "" }, { "docid": "0808a32173f16d8062ffca7c5055918e", "score": "0.59108496", "text": "public function getArrayCopy()\n {\n return $this->all() + $this->parentBag->all() + $this->globals();\n }", "title": "" }, { "docid": "33b57a253361fac07adc428a0e507b7e", "score": "0.59091747", "text": "public function elements()\n {\n return [\n '@showPet1' => 'div:nth-child(1) > a', \n ];\n }", "title": "" }, { "docid": "f13f05099c0f6749d87b274ae3b8f748", "score": "0.5903296", "text": "public function as_array() {\n return $this->elements;\n }", "title": "" }, { "docid": "000a127eeefa8bce0f3314b598465b43", "score": "0.5902342", "text": "public function getElements() {\n\t\treturn $this->renderables;\n\t}", "title": "" }, { "docid": "10f3c3f2184f63b634264ddd2fb4c03f", "score": "0.5898909", "text": "public function elements($elements = NULL) {\n if (isset($elements)) {\n PapayaUtilConstraints::assertArrayOrTraversable($elements);\n $this->_elements = $elements;\n }\n return $this->_elements;\n }", "title": "" }, { "docid": "70662749b133d83701b816f7e786ea96", "score": "0.5895259", "text": "public function getProcessedElements(): array;", "title": "" }, { "docid": "bfeeb88352e85f0b578b5861b32001a8", "score": "0.5892668", "text": "public function all()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "bfeeb88352e85f0b578b5861b32001a8", "score": "0.5892668", "text": "public function all()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "bfeeb88352e85f0b578b5861b32001a8", "score": "0.5892668", "text": "public function all()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "971818274c75dacfc57721db9f86c467", "score": "0.58916545", "text": "public function get_all(): array\n {\n return $this->nodes;\n }", "title": "" }, { "docid": "d648b949c16e8ca06e211fdcd689589f", "score": "0.5886628", "text": "public function all() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "9008ec9d9ec773c296fd92c857d951a1", "score": "0.5873513", "text": "public function all()\n\t{\n\t\treturn $this->parts;\n\t}", "title": "" }, { "docid": "23e5655066f253ab0eee71d437ded35c", "score": "0.5870802", "text": "public function get_all(){\n return get_object_vars($this);\n }", "title": "" }, { "docid": "6c9d0e7cf32671a38e8f6f4b8e1bc037", "score": "0.5849851", "text": "public function getElArray() {\n\treturn $this->_elArray;\n}", "title": "" }, { "docid": "1bfb22bf7b5a474d3b88fb873ab72e66", "score": "0.5847643", "text": "public function elements()\n {\n return [\n '@save-setting' => '#setting-manage .btn-success',\n '@app-name-field' => '#setting-manage input[name=setting[app_name]]',\n '@add-setting-key' => '#add-setting-form input[name=name]',\n '@add-setting-value' => '#add-setting-form input[name=value]',\n '@add-setting-submit' => '#add-setting-form .btn-success'\n ];\n }", "title": "" }, { "docid": "1cb40c6c8d0b0d0d6ba538abbebd123d", "score": "0.58473426", "text": "private function _getAllElementsInSet($elementSet) {\r\n\t\treturn $this->_helper->db->getTable('DefaultMetadataValue')->findElementsInSet($elementSet);\r\n\t}", "title": "" }, { "docid": "018140bce44f3001746d017bde877bd7", "score": "0.5841293", "text": "public function toArray()\n {\n return $this->_elements;\n }", "title": "" }, { "docid": "ac84c437c4a2552c2e876b10c9cb2904", "score": "0.58405674", "text": "public function toArray()\n {\n return $this->elements;\n }", "title": "" }, { "docid": "c187b078c789ea5bc034d686702f7af7", "score": "0.584051", "text": "public function all() {\n return $this->_data;\n }", "title": "" }, { "docid": "98e3f8d24713234b3cfcf0f18bfa7310", "score": "0.5830438", "text": "public function &getRootElements()\n {\n return $this->rootElements; //root\n }", "title": "" }, { "docid": "c9bae0d496c1b30914469674351bca8f", "score": "0.5830302", "text": "public function elements()\n {\n return [\n '@returnButton' => '#return-button',\n '@lostButton' => '#lost-button',\n '@borrowingsEndingModal' => '#borrowings-ending-modal',\n '@borrowingsEndingConfirmationButton' => '#borrowings-ending-confirmation-button'\n ];\n }", "title": "" }, { "docid": "1b888df7ebf5cf436826c8702311a0a5", "score": "0.58256996", "text": "public function values() \r\n {\r\n return array_values($this->elements);\r\n }", "title": "" }, { "docid": "8089457d5cf6f195534b3dac0174f136", "score": "0.58245546", "text": "public function getElements()\n {\n return $this->collection;\n }", "title": "" }, { "docid": "56a523dbafdccc1cfb309b71f78dda54", "score": "0.5820879", "text": "public function getValues()\n {\n return array_values($this->elements);\n }", "title": "" }, { "docid": "7962e7166902364afd0d7dbafc8063eb", "score": "0.5820264", "text": "public function getAll(): array\n {\n return $this->variables;\n }", "title": "" }, { "docid": "678ca9b0b809f8a9f8f6920aadf31a84", "score": "0.5809819", "text": "public function getHtmlAttributesAssigned(): array\n {\n return $this->htmlAttributesAssigned;\n }", "title": "" }, { "docid": "e337985fd38b8f99ac0a338c544306a9", "score": "0.58081126", "text": "public function iterateAllElements()\n {\n return $this->getIterator();\n }", "title": "" }, { "docid": "fc17bb17ab9a9f0922d3d8c2777b4cb6", "score": "0.5801317", "text": "public function elements()\n {\n return [\n '@full_name' => 'full_name',\n '@email' => 'email',\n '@password' => 'password',\n '@phone' => 'phone',\n '@address' => 'address',\n '@submit' => 'Submit'\n ];\n }", "title": "" }, { "docid": "c245fe4eba8a95ee753c4af660d6ad59", "score": "0.57936597", "text": "public function all()\n {\n return $this->items;\n }", "title": "" }, { "docid": "c245fe4eba8a95ee753c4af660d6ad59", "score": "0.57936597", "text": "public function all()\n {\n return $this->items;\n }", "title": "" }, { "docid": "c245fe4eba8a95ee753c4af660d6ad59", "score": "0.57936597", "text": "public function all()\n {\n return $this->items;\n }", "title": "" }, { "docid": "c245fe4eba8a95ee753c4af660d6ad59", "score": "0.57936597", "text": "public function all()\n {\n return $this->items;\n }", "title": "" }, { "docid": "c245fe4eba8a95ee753c4af660d6ad59", "score": "0.57936597", "text": "public function all()\n {\n return $this->items;\n }", "title": "" }, { "docid": "c245fe4eba8a95ee753c4af660d6ad59", "score": "0.57936597", "text": "public function all()\n {\n return $this->items;\n }", "title": "" }, { "docid": "363462794a58d384c95beb5e99faaf7e", "score": "0.57810676", "text": "public function all()\n {\n return $this->item;\n }", "title": "" }, { "docid": "33330b22818ab5b1121067b915870bfb", "score": "0.5773008", "text": "function getElements() {\n return $this->rows_object;\n }", "title": "" }, { "docid": "10594e11f2182e20f4c7b7b094a4a06c", "score": "0.5763757", "text": "public function get_all () {\r\n\t\treturn $this->_data;\r\n\t}", "title": "" }, { "docid": "650b4463a236e8e4e7f7466273202ec1", "score": "0.5759375", "text": "public function all(): array\n {\n return $this->values;\n }", "title": "" }, { "docid": "cfa9d688d4490fd2a592991b5b250351", "score": "0.57532305", "text": "public function getElements()\n {\n return [$this->monthElement, $this->yearElement];\n }", "title": "" } ]
e9189b1d1fa5e07cbc11abf9038d8805
Returns the commsNetwork object mapped to the account
[ { "docid": "0aef95152603fe6fe0a2371637548ca3", "score": "0.7245328", "text": "function getNetwork() {\n\t\treturn commsNetwork::getInstance($this->getNetworkID());\n\t}", "title": "" } ]
[ { "docid": "68bac1c772b386b155191b8be1ceaebb", "score": "0.6295476", "text": "public function getNetwork();", "title": "" }, { "docid": "174db22612a43b335c58f85aab96a330", "score": "0.58875996", "text": "public function getNetwork()\n {\n return clone $this->network;\n }", "title": "" }, { "docid": "425ff40f7a9180936955161239e6c6eb", "score": "0.58504826", "text": "public function getNetwork()\n {\n return $this->network;\n }", "title": "" }, { "docid": "425ff40f7a9180936955161239e6c6eb", "score": "0.58504826", "text": "public function getNetwork()\n {\n return $this->network;\n }", "title": "" }, { "docid": "985c8ca62a802f25db680c21282cf2b4", "score": "0.5804795", "text": "public function getNetwork()\n {\n return $this->hasOne(Network::class, ['id' => 'network_id']);\n }", "title": "" }, { "docid": "940c4a23282918f67f40aea25fafc08d", "score": "0.5629902", "text": "public function getAccount(): AccountContract;", "title": "" }, { "docid": "1d80568155dc89770ca0ee77dfdeafef", "score": "0.55652726", "text": "public function getNetwork()\n {\n return isset($this->network) ? $this->network : '';\n }", "title": "" }, { "docid": "11b4bf8623c4e3424b6622f693197214", "score": "0.5431524", "text": "public function getNet()\n {\n return $this->net;\n }", "title": "" }, { "docid": "7416cc762445ea1f6c813052ca7222b6", "score": "0.54240733", "text": "function getConnactionNetwork($connactionID){\n\t\t$networkID = getDatabaseInfo(\"connactions\", \"connaction_id\", $connactionID);\n\t\t$net = getDatabaseInfo(\"unique_networks\", \"unique_network_id\", $networkID['UNIQUE_NETWORK_ID']);\n\t\t$network = getDatabaseInfo(\"networks\", \"network_id\", $net['NETWORK_ID']);\t\n\t\t$networkName = $network['AREA'] .\", \". $network['STATE'];\n\t\t\n\t\treturn $networkName;\n\t}", "title": "" }, { "docid": "4e321b4e4dc8be6a2de40d7201f59e29", "score": "0.539433", "text": "abstract public function getSocialNetwork(): SocialNetworkConnector;", "title": "" }, { "docid": "d1eadba9c00753bab59ef645666612ea", "score": "0.53903824", "text": "public function getIdNetwork()\n {\n return $this->idNetwork;\n }", "title": "" }, { "docid": "453bc66d8f4b377aded88dca81c61535", "score": "0.5355093", "text": "public function getNetwork(): ?Network\n {\n return $this->network;\n }", "title": "" }, { "docid": "8c10ac97b6e051b93a910f0eb8915170", "score": "0.5315345", "text": "public function getAccountChannel()\n {\n return $this->hasOne(Channel::className(), ['channel_id' => 'account_channel_id']);\n }", "title": "" }, { "docid": "3f7ddd973629f408c144ecb9869f0644", "score": "0.5253734", "text": "public function getAccount() {\n return Account::retrieve($this->externalAccount->__get('data')['object']['account']);\n }", "title": "" }, { "docid": "d92d749e5e187173b8e55173bb9847cc", "score": "0.51977575", "text": "public static function FindNetwork($func)\n {\n // $obj is a YNetwork;\n $obj = YFunction::_FindFromCache('Network', $func);\n if ($obj == null) {\n $obj = new YNetwork($func);\n YFunction::_AddToCache('Network', $func, $obj);\n }\n return $obj;\n }", "title": "" }, { "docid": "552f77afefeee6b1cc57f1b4cead3b96", "score": "0.51212734", "text": "public function get_social_networks()\n {\n $table='social_network';\n $results=$this->basic->get_data($table);\n $social_network=array();\n foreach ($results as $row) {\n $social_network[$row['social_network_name']]=$row['social_network_name'];\n }\n return $social_network;\n }", "title": "" }, { "docid": "e9e44f2e4f9f61d4a602de6242734c90", "score": "0.50438285", "text": "public static function FindNetwork(string $func): YNetwork\n {\n // $obj is a YNetwork;\n $obj = YFunction::_FindFromCache('Network', $func);\n if ($obj == null) {\n $obj = new YNetwork($func);\n YFunction::_AddToCache('Network', $func, $obj);\n }\n return $obj;\n }", "title": "" }, { "docid": "f9e1ceb4a1ae8129d2c13776eebc72f9", "score": "0.49956158", "text": "public function getCIDR()\n {\n return sprintf( '%s/%s', $this->network, $this->getPrefixLength() );\n }", "title": "" }, { "docid": "27427dc82e5c6f1bdb179c636d315ab8", "score": "0.49770913", "text": "function getNetworkID() {\n\t\treturn $this->_NetworkID;\n\t}", "title": "" }, { "docid": "13fdbf2fff6929f40cb31da39440ace2", "score": "0.4976834", "text": "function getConnactionUniqueNetwork($connID){\n\t\t$act = getConnactionActivity($connID);\n\t\t$net = getConnactionNetwork($connID);\n\t\t\n\t\t$whole = $net .\" - \" . $act;\n\t\treturn $whole;\n\t\n\t}", "title": "" }, { "docid": "1bf2302207c9baa1d7da44ac9016e1eb", "score": "0.4959742", "text": "protected function getObject(){\n\t\t$bank_account = BankAccount::getInstance($this->_mRequest->getProperty('id'));\n\t\tif(!is_null($bank_account))\n\t\t\treturn $bank_account;\n\t\telse\n\t\t\tthrow new Exception('Cuenta bancaria no existe.');\n\t}", "title": "" }, { "docid": "a3579ed395fd3252231f47a65d9cb30a", "score": "0.4957181", "text": "public function get_account() {\n\t\tstatic $account = null;\n\t\tif ( !$account )\n\t\t\t$account = $this->getAPI()->get_account();\n\t\treturn $account;\n\t}", "title": "" }, { "docid": "63d25bf26c01b5a30bffc0ba1b7e9c17", "score": "0.4946295", "text": "public function getNetworkId()\n {\n return $this->network_id;\n }", "title": "" }, { "docid": "63d25bf26c01b5a30bffc0ba1b7e9c17", "score": "0.4946295", "text": "public function getNetworkId()\n {\n return $this->network_id;\n }", "title": "" }, { "docid": "a7e5c265384ef8846779a4783072c885", "score": "0.49231136", "text": "public static function getPublicRelationsAccount()\n {\n return self::getByName(self::$publicRelationAccount);\n }", "title": "" }, { "docid": "14c1d6479a347939c5c60edaaf8bae33", "score": "0.49228722", "text": "public function getIPNet(){\n\t\t\treturn @$this->db_connect->query(\"SELECT DISTINCT * FROM \".$this->db_prefix.\"network ORDER BY ip_net ASC;\");\n\t\t}", "title": "" }, { "docid": "50e8528a6200f352aa3e3600fd1afe85", "score": "0.49201405", "text": "public function getAccount() {\n\t\t// musime zkontorlovat, jestli je aktivni modul uzivatelu\n\t\tif (array_key_exists(\n\t\t\t\t\"user\", \n\t\t\t\tZend_Controller_Front::getInstance()\n\t\t\t\t\t\t->getControllerDirectory())) \n\t\t{\n\t\t\t// modul existuje\n\t\t\treturn $this->findParentRow(\"User_Model_Accounts\", \"account\");\n\t\t} else {\n\t\t\t// modul neexistuje\n\t\t\treturn NULL;\n\t\t}\n\t}", "title": "" }, { "docid": "29f7739b2c8a8fdc9a596e408826e29c", "score": "0.49146932", "text": "public function getBcc();", "title": "" }, { "docid": "0d451e25bf6ed1c36e47e96ab612c236", "score": "0.49076375", "text": "public function nextNetwork()\n { $resolve = YAPI::resolveFunction($this->_className, $this->_func);\n if($resolve->errorType != YAPI_SUCCESS) return null;\n $next_hwid = YAPI::getNextHardwareId($this->_className, $resolve->result);\n if($next_hwid == null) return null;\n return yFindNetwork($next_hwid);\n }", "title": "" }, { "docid": "6867d8a5158340e753392077a86f863c", "score": "0.49045143", "text": "public function getCcm()\r\n {\r\n return $this->ccm;\r\n }", "title": "" }, { "docid": "f383934187ef1f2d0cffa1e7cc8c2574", "score": "0.4879609", "text": "function md_the_user_networks() {\n\n // Networks array\n $networks = array();\n\n // List all user's networks\n foreach (glob(APPPATH . 'base/user/networks/*.php') as $network) {\n\n // Get the dir name\n $class_name = str_replace(array(APPPATH . 'base/user/networks/', '.php'), '', $network);\n\n // Create an array\n $array = array(\n 'MidrubBase',\n 'User',\n 'Networks',\n ucfirst($class_name)\n );\n\n // Implode the array above\n $cl = implode('\\\\', $array);\n\n // Get network's info\n $info = (new $cl())->get_info();\n\n // Add network name\n $info['name'] = $class_name;\n\n // Add info to network\n $networks[] = $info;\n\n }\n\n return $networks;\n \n }", "title": "" }, { "docid": "20b341d87d2c531de76c8ec033db44ca", "score": "0.48778534", "text": "public function getAccount()\n {\n return $this->account;\n }", "title": "" }, { "docid": "20b341d87d2c531de76c8ec033db44ca", "score": "0.48778534", "text": "public function getAccount()\n {\n return $this->account;\n }", "title": "" }, { "docid": "20b341d87d2c531de76c8ec033db44ca", "score": "0.48778534", "text": "public function getAccount()\n {\n return $this->account;\n }", "title": "" }, { "docid": "20b341d87d2c531de76c8ec033db44ca", "score": "0.48778534", "text": "public function getAccount()\n {\n return $this->account;\n }", "title": "" }, { "docid": "0513cbdc6bfed26b5db06ae10ccaa042", "score": "0.4865424", "text": "public function get_curso()\n {\n \n // loads the associated object\n if (empty($this->curso))\n $this->curso = new Curso($this->curso_id);\n \n // returns the associated object\n return $this->curso;\n }", "title": "" }, { "docid": "6d7bd0cb2c34419edb96875efd1fb9fa", "score": "0.4865182", "text": "public function networks($network = null) {\n // Check if the current user is admin and if session exists\n $this->check_session($this->user_role, 0);\n $this->_check_unconfirmed_account();\n if (!$network) {\n // Get all available social networks.\n include_once APPPATH . 'interfaces/Autopost.php';\n $classes = [];\n foreach (glob(APPPATH . 'autopost/*.php') as $filename) {\n include_once $filename;\n $className = str_replace([APPPATH . 'autopost/', '.php'], '', $filename);\n // Check if the administrator has disabled the $className social network\n if ( ($this->options->check_enabled(strtolower($className)) == FALSE) || (check_plan_networks(strtolower($className)) == FALSE) ) {\n continue;\n }\n $get = new $className;\n if ($get->check_availability()) {\n $con = $this->networks->get_network_data(strtolower($className), $this->user_id);\n $info = $get->get_info();\n $num_accounts = 0;\n if (@$con[0]->num) {\n $num_accounts = $con[0]->num;\n }\n $netw = ucwords(str_replace('_', ' ', $className));\n if ($this->options->check_enabled('tool_monitoris') == true) {\n if(in_array(strtolower($className),['facebook','facebook_pages','facebook_groups','instagram','twitter']))\n {\n $netw = '<a href=\"' . base_url() . 'user/tools/monitoris?net='.strtolower($className).'&page=1\">'.ucwords(str_replace('_', ' ', $className)).'</a>';\n }\n }\n \n $redirect_link=\"get_content_menu('\".base_url() . 'user/networks/' . strtolower($className).\"','networks_div')\";\n $classes[] = '\n <li>\n <div class=\"col-md-8 col-sm-8 col-xs-6 clean\">\n <h3>' .$netw. '</h3>\n <span style=\"background-color:' . $info->color . '\">' . $num_accounts . ' '.$this->lang->line('mu111').'</span>\n </div>\n <div class=\"col-md-4 col-sm-4 col-xs-6 clean text-right\">\n <a onclick=\"'.$redirect_link.'\" href=\"javascript:void(0);\" class=\"btn btn-default\"><i class=\"fa fa-cogs\" aria-hidden=\"true\"></i> '.$this->lang->line('mu110').'</a>\n </div>\n </li>';\n }\n }\n /* <a href=\"' . base_url() . 'user/networks/' . strtolower($className) . '\" class=\"btn btn-default\"><i class=\"fa fa-cogs\" aria-hidden=\"true\"></i> '.$this->lang->line('mu110').'</a> */\n // Load view/user/networks.php file\n $this->body = 'user/networks';\n $this->body = 'user/networks';\n $this->content = ['data' => $classes];\n $this->user_layout($this->lang->line('mu112'));\n } else {\n // Check if the network is disabled\n if ( ($this->options->check_enabled(strtolower($network)) == false) || (check_plan_networks(strtolower($network)) == FALSE) ) {\n die();\n }\n $allaccounts = $this->networks->get_all_accounts($this->user_id, $network);\n $msg = '';\n if ($this->session->flashdata('deleted')) {\n $msg = 'popup_fon(\\'subi\\', \\''.$this->session->flashdata('deleted').'\\', 1500, 2000);';\n }\n $network = ucfirst($network);\n include_once APPPATH . 'interfaces/Autopost.php';\n include_once APPPATH . 'autopost/' . $network . '.php';\n $get = new $network;\n $info = $get->get_info();\n $popup = (property_exists($info, 'popup')) ? $info->popup : '';\n $hidden = (property_exists($info, 'hidden')) ? $info->hidden : '';\n // Get all options\n $options = $this->options->get_all_options();\n // Load plan features\n $limit_accounts = $this->plans->get_plan_features($this->user_id, 'network_accounts');\n // Load view/user/network.php file\n $this->body = 'user/network';\n $this->content = ['data' => $allaccounts, 'network' => $network, 'msg' => $msg, 'popup' => $popup, 'hidden' => $hidden, 'options' => $options, 'limit_accounts' => $limit_accounts];\n $this->user_layout();\n }\n }", "title": "" }, { "docid": "d3d65b33807c2adc15a248e9cd427849", "score": "0.4859132", "text": "public function getCc();", "title": "" }, { "docid": "47776882c7b00ba0e34f427b1cb70162", "score": "0.4845235", "text": "function GetClansByName( $name )\n\t{\n\t\t$sql_query = \"SELECT * FROM `\".$GLOBALS['g_egltb_clan_accounts'].\"` WHERE name='\".$this->pDBCon->EscapeString($name).\"'\";\n\t\treturn $this->pDBCon->FetchArrayObject( $this->pDBCon->Query( $sql_query ) );\n\t}", "title": "" }, { "docid": "2ad926ce67f9147205114a9405dae8a4", "score": "0.4844496", "text": "public function getCompany()\n {\n if ($this->auxCompany != '')\n {\n return $this->auxCompany;\n }\n else if ($this->container_type_id == \\Config::get('scwms.CONTAINERS.COMPANY'))\n {\n return SPartner::find($this->container_id);\n }\n else\n {\n return SPartner::find(1);\n }\n }", "title": "" }, { "docid": "bf6e41134a6981119f39ac46614f502a", "score": "0.4840683", "text": "function md_the_user_network($network_name) {\n\n // List all user's networks\n foreach (glob(APPPATH . 'base/user/networks/*.php') as $network) {\n\n // Get the dir name\n $class_name = str_replace(array(APPPATH . 'base/user/networks/', '.php'), '', $network);\n\n // Verify if is required network\n if ( $network_name !== $class_name ) {\n continue;\n }\n\n // Create an array\n $array = array(\n 'MidrubBase',\n 'User',\n 'Networks',\n ucfirst($class_name)\n );\n\n // Implode the array above\n $cl = implode('\\\\', $array);\n\n // Get network's info\n $info = (new $cl())->get_info();\n\n // Return network's data\n return $info;\n\n }\n\n return false;\n \n }", "title": "" }, { "docid": "52fb52e5b78aa42ff1957a3e4634cb9a", "score": "0.48385596", "text": "public function getAccount() {\n return $this->account;\n }", "title": "" }, { "docid": "52fb52e5b78aa42ff1957a3e4634cb9a", "score": "0.48385596", "text": "public function getAccount() {\n return $this->account;\n }", "title": "" }, { "docid": "8c615d8ab940e4ba96b5772d497d298c", "score": "0.48145524", "text": "public function getAccount()\n {\n return $this->hasOne(GlAccount::className(), ['account_id' => 'account_id']);\n }", "title": "" }, { "docid": "4715fbb605e52f6ccfbf58e07e5ccc57", "score": "0.48109245", "text": "public function fetchAccount()\n {\n \t$accountModel = new Model_Account();\n \treturn $accountModel->fetchArray();\n }", "title": "" }, { "docid": "df98d7adeecb735fc400bf42aa57e74e", "score": "0.48107123", "text": "public function get_social_networks()\r\n {\r\n $res = select_query_assoc(\r\n 'SELECT * FROM social_networks;'\r\n );\r\n if (!empty($res)) {\r\n return json_encode($res);\r\n } else {\r\n return null;\r\n }\r\n }", "title": "" }, { "docid": "03cbd500b2f21ada73a7a8e2ae54c8ca", "score": "0.47799072", "text": "public function getSystemAccount($name)\n {\n return $this->filter([\n 'name' => $name,\n 'is_system_account' => true\n ])->first();\n }", "title": "" }, { "docid": "71723b87200b0738ad3e1956f774ce57", "score": "0.47658363", "text": "public static function FirstNetwork()\n { $next_hwid = YAPI::getFirstHardwareId('Network');\n if($next_hwid == null) return null;\n return self::FindNetwork($next_hwid);\n }", "title": "" }, { "docid": "b504072c8dec2beee37084863df99f43", "score": "0.47647375", "text": "protected function getAccountsContact() {\n if (empty($this->accounts_contact)) {\n if (empty($this->connector_id)) {\n $this->accounts_contact = civicrm_api3('domain', 'getvalue', [\n 'current_domain' => TRUE,\n 'return' => 'contact_id',\n ]);\n }\n else {\n $this->accounts_contact = civicrm_api3('connector', 'getvalue', [\n 'id' => $this->connector_id,\n 'return' => 'contact_id',\n ]);\n }\n }\n return $this->accounts_contact;\n }", "title": "" }, { "docid": "7ce345e5def133e82f65186196fbb287", "score": "0.47625643", "text": "function getAccount(){\n return $this -> account;\n }", "title": "" }, { "docid": "ee5fb30dfcf21534b13a398464859bd2", "score": "0.47543177", "text": "public function getCurso()\n {\n return $this->hasOne(Cursos::className(), ['id' => 'curso_id']);\n }", "title": "" }, { "docid": "b60fd73a429a09869e6dc37e6e2262a0", "score": "0.47466996", "text": "public function getTotalNet()\n {\n return $this->totalNet instanceof MoneyBuilder ? $this->totalNet->build() : $this->totalNet;\n }", "title": "" }, { "docid": "9341909aa83a0b21c7711055b59ac3e5", "score": "0.4737188", "text": "function getAccountInfo() {\n }", "title": "" }, { "docid": "38c1f53e71d65d06ca4b8578c2189589", "score": "0.47268012", "text": "public function getCustomerCard()\n {\n $paymentInfos = $this->getShopgateOrder()->getPaymentInfos();\n $lastFour = substr($paymentInfos['credit_card']['masked_number'], -4);\n $card = $this->_getCardByLastFour($lastFour);\n\n if (!$card->getData()) {\n /** @var ParadoxLabs_TokenBase_Model_Card $card */\n $card = Mage::getModel('authnetcim/card');\n $card->setAdditional('cc_owner', $paymentInfos['credit_card']['holder']);\n $card->setAdditional('customer_email', $this->getShopgateOrder()->getMail());\n $card->setAdditional('cc_number', $lastFour);\n $card->setAdditional('cc_last4', $lastFour);\n $card->setMethod('authnetcim');\n $card->setCustomer($this->_getCustomer());\n\n /** @var Shopgate_Framework_Model_Payment_Cc_Authncim_Gateway $gateway */\n $gateway = Mage::getModel('shopgate/payment_cc_authncim_method')->gateway();\n try {\n $response = $gateway->setParameter('transId', $paymentInfos['transaction_id'])\n ->setParameter('cardNumber', 'XXXX' . $lastFour)\n ->createCustomerProfileFromTransactionRequest();\n } catch (Exception $e) {\n ShopgateLogger::getInstance()->log($e->getMessage(), ShopgateLogger::LOGTYPE_DEBUG);\n\n return false;\n }\n\n if (!isset($response['customerPaymentProfileId'])) {\n $error = $this->_getHelper()->__('Could not retrieve AuthorizeCIM ProfileID from response');\n ShopgateLogger::getInstance()->log($error, ShopgateLogger::LOGTYPE_DEBUG);\n\n return false;\n }\n $card->setProfileId($response['customerProfileId']);\n $card->setPaymentId($response['customerPaymentProfileId']);\n $card->save();\n }\n\n return $card;\n }", "title": "" }, { "docid": "12af531a89633008613d60f492fb8e48", "score": "0.47186232", "text": "public function getNetworkName()\n {\n if (array_key_exists(\"networkName\", $this->_propDict)) {\n return $this->_propDict[\"networkName\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "1464cb7cc4ea28348691d7e1426090c6", "score": "0.47162822", "text": "public function AccountGroup()\n {\n $member = $this->AccountMember();\n if ($member) {\n return $member->CorporateAccountGroup();\n }\n }", "title": "" }, { "docid": "db476fc574f57c14e4544cd8e5caf3ef", "score": "0.47141832", "text": "public function getCorrespondentAccount()\n {\n $value = $this->get(self::CORRESPONDENTACCOUNT);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "d47a0521714e2aa1fcf43243a9c9766d", "score": "0.46986482", "text": "public function getAccount()\n {\n if (false !== ($response = $this->request('api/CekSaldo.php'))) {\n $account = [\n 'username' => $response['Username'],\n 'balance' => $response['Saldo'],\n 'status' => $this->checkAccountStatus($response['Username'])\n ];\n\n return $account;\n }\n\n return false;\n }", "title": "" }, { "docid": "303cda4337522d97f0d3741d5889b57d", "score": "0.46979958", "text": "public function getActShopCurrencyObject()\n {\n //caching currency as it does not change through the script\n //but not for unit tests as ther it changes always\n if (!defined('OXID_PHP_UNIT')) {\n if (!is_null($this->_oActCurrencyObject)) {\n return $this->_oActCurrencyObject;\n }\n }\n\n $iCur = $this->getShopCurrency();\n $aCurrencies = $this->getCurrencyArray();\n if (!isset($aCurrencies[$iCur])) {\n return $this->_oActCurrencyObject = reset($aCurrencies); // reset() returns the first element\n }\n\n return $this->_oActCurrencyObject = $aCurrencies[$iCur];\n }", "title": "" }, { "docid": "aaf8a25ea1794ba7e5806c25df9d5ee2", "score": "0.46891582", "text": "public function getCompleteNet()\n {\n return $this->completeNet;\n }", "title": "" }, { "docid": "84142375f2b23302734dd4ad917f020d", "score": "0.4688078", "text": "function GetClanByName( $name )\n\t{\n\t\t$sql_query = \t\" SELECT * \".\n\t\t\t\t\t\t\" FROM `\".$GLOBALS['g_egltb_clan_accounts'].\"` \".\n\t\t\t\t\t\t\" WHERE name='\".$this->pDBCon->EscapeString($name).\"' \".\n\t\t\t\t\t\t\" LIMIT 0,1\";\n\t\treturn $this->pDBCon->FetchObject( $this->pDBCon->Query( $sql_query ) );\n\t}", "title": "" }, { "docid": "bc6ccdc98b91e3af0971e8cd5227d14f", "score": "0.46791953", "text": "protected function _getMboxOb()\n {\n return new Horde_Imap_Client_Mailbox($this->_params['mailbox'], true);\n }", "title": "" }, { "docid": "3d489cd832cc80878e7a9ccf10ff8816", "score": "0.4678191", "text": "private static function getNetworkingType()\n\t{\n\t\treturn sprintf(\"%sprojects/%s/global/networks/%s\",\n\t\t\tConfig::get('vm::google-compute-engine.api-url'),\n\t\t\tConfig::get('vm::google-compute-engine.project-id'),\n\t\t\tConfig::get('vm::google-compute-engine.networking-type')\n\t\t);\n\t}", "title": "" }, { "docid": "d8893d74989a91314951bc3eb867f197", "score": "0.46776778", "text": "private function network_info()\n {\n $network = $this->Request->get('network');\n $this->responseSetParam('network', $network);\n \n $info = array('firstname' => '', 'lastname' => '', 'email' => '', 'lang' => ''); \n switch($network)\n {\n case 'facebook':\n $Facebook = new Facebook(array(\n 'appId' => C::FACEBOOK_APP_ID,\n 'secret' => FACEBOOK_SECRET\n ));\n $fb_user = $Facebook->getUser();\n if($fb_user)\n {\n try\n {\n $fb_user = $Facebook->api('/me');\n $info['firstname'] = $fb_user['first_name'];\n $info['lastname'] = $fb_user['last_name'];\n $info['email'] = $fb_user['email'];\n $info['lang'] = explode('_', $fb_user['locale']);\n $info['lang'] = $info['lang'][0];\n }\n catch(FacebookApiException $e){}\n }\n break;\n }\n $this->responseSetContent($info);\n }", "title": "" }, { "docid": "bbd6e20925871551597f607531419441", "score": "0.4672619", "text": "public function getType()\n {\n return Account::TYPE_MONEY_ACCOUNT;\n }", "title": "" }, { "docid": "1ad8a82a19cfcb4f0a81364b7c38694f", "score": "0.46685785", "text": "private function getBankAccount(): Account\n {\n $bankAccount = Account::whereHas('user', function ($query) {\n $query->where('is_bank_owner', '=' , true);\n })->first();\n return $bankAccount;\n }", "title": "" }, { "docid": "88292bcc4d706bb701e5c3d457edc232", "score": "0.46620202", "text": "public function getAccount()\n {\n return $this->hasOne(MailAccount::className(), ['accountid' => 'account_id']);\n }", "title": "" }, { "docid": "7a67d2c159ea996faac91fd84a72a1a3", "score": "0.46613017", "text": "public function getClusterNetworkUri()\n {\n return $this->cluster_network_uri;\n }", "title": "" }, { "docid": "46bb4ec7b115ee7eed43098c72880962", "score": "0.46597916", "text": "public function getAll()\r\n {\r\n $networks = new SocialSharing_Networks_Model_Networks();\r\n $networks->setEnvironment($this->getEnvironment());\r\n\r\n return $networks->all();\r\n }", "title": "" }, { "docid": "f98484d043a3db4062285f67c5ffd814", "score": "0.46570367", "text": "public function account()\n {\n return new Account($this->client);\n }", "title": "" }, { "docid": "5398d8ecce6a9ecaca4d0e65a8e38385", "score": "0.4649282", "text": "public function getMerchantAccountInformation()\n {\n //dominio do banco\n $gui = Value::get(Value::ID_MERCHANT_ACCOUNT_INFORMATION_GUI, $this->getMerchant()->getGui());\n\n //URL do QRCode Dinamico\n $url = mb_strlen($this->getLocation()) ? Value::get(Value::ID_MERCHANT_ACCOUNT_INFORMATION_URL, preg_replace('/ˆhttps?\\:\\/\\//', '', $this->getLocation()) ) : '';\n\n //valor completo de merchant account information\n return Value::get(Value::ID_MERCHANT_ACCOUNT_INFORMATION, $gui.$url);\n }", "title": "" }, { "docid": "4af4c215fcf5f3fc9fd7470134749091", "score": "0.46308848", "text": "public function getNetwork(): ?FHIRCodeableConcept\n\t{\n\t\treturn $this->network;\n\t}", "title": "" }, { "docid": "34721b579d162a9ec7e436e15a331d8a", "score": "0.46293932", "text": "public function getMns(): Client\n {\n return $this->mns;\n }", "title": "" }, { "docid": "c0328f19360679c36dc1728aabae2eac", "score": "0.4624455", "text": "public function account()\n {\n return $this->invoices[0]->account();\n }", "title": "" }, { "docid": "70fe03e161fafec8c835ee287025150e", "score": "0.4618818", "text": "public function getSubnetwork()\n {\n return $this->subnetwork;\n }", "title": "" }, { "docid": "70fe03e161fafec8c835ee287025150e", "score": "0.4618818", "text": "public function getSubnetwork()\n {\n return $this->subnetwork;\n }", "title": "" }, { "docid": "5504661525e1caba72bf489ef9bdca02", "score": "0.46025816", "text": "function get_price_net() \t{\n \t\t#return $this->price->get_price_net();\n \t\treturn $this->priceNet;\n \t}", "title": "" }, { "docid": "e357b3d2c4a05e54d113a9e2e8413dbf", "score": "0.459474", "text": "public function getCreditorAccountIBAN()\n {\n return $this->creditorAccountIBAN;\n }", "title": "" }, { "docid": "864a933a5392a1b3fde29d9f457438d3", "score": "0.4587121", "text": "public function find_customer_relation($my_co = null, $crea_if_not_exists = false)\n\t{\n\t\tif ($my_co === null)\n\t\t{\n\t\t\t$my_co = get_current_company();\n\t\t}\n\n\t\tif (!is_object($my_co) || !is_oid($my_co->id()))\n\t\t{\n\t\t\tthrow new awex_crm(\"Current company not defined\");\n\t\t}\n\n\t\tif ($this->id() == $my_co->id())\n\t\t{\n\t\t\tthrow new awex_crm(\"Company can't be its own customer\");\n\t\t}\n\n\t\tstatic $gcr_cache;\n\t\tif (!is_array($gcr_cache))\n\t\t{\n\t\t\t$gcr_cache = array();\n\t\t}\n\n\t\tif (isset($gcr_cache[$this->id()][$crea_if_not_exists][$my_co->id()]))\n\t\t{\n\t\t\treturn $gcr_cache[$this->id()][$crea_if_not_exists][$my_co->id()];\n\t\t}\n\n\t\t$ol = new object_list(array(\n\t\t\t\"class_id\" => CL_CRM_COMPANY_CUSTOMER_DATA,\n\t\t\t\"buyer\" => $this->id(),\n\t\t\t\"seller\" => $my_co->id()\n\t\t));\n\n\t\tif ($ol->count())\n\t\t{\n\t\t\t$gcr_cache[$this->id()][$crea_if_not_exists][$my_co->id()] = $ol->begin();\n\t\t\treturn $ol->begin();\n\t\t}\n\t\telseif ($crea_if_not_exists)\n\t\t{\n\t\t\t$o = obj();\n\t\t\t$o->set_class_id(CL_CRM_COMPANY_CUSTOMER_DATA);\n\t\t\t$o->set_name(t(\"Kliendisuhe \").$my_co->name().\" => \".$this->name());\n\t\t\t$o->set_parent($my_co->id());\n\t\t\t$o->set_prop(\"seller\", $my_co->id());\n\t\t\t$o->set_prop(\"buyer\", $this->id());\n\t\t\t$o->save();\n\t\t\t$gcr_cache[$this->id()][$crea_if_not_exists][$this->id()] = $o;\n\t\t\treturn $o;\n\t\t}\n\t}", "title": "" }, { "docid": "fbd8729ec043389c2d3e622539e40e78", "score": "0.45819986", "text": "static function cn($indice)\n\t{\n\t\t$cn = self::componente($indice);\n\t\tif(! $cn instanceof toba_cn ) {\n\t\t\ttoba::logger()->error(\"Error cargando CN por INDICE. El componente identificado con la etiqueta '$indice' no es un CN.\");\n\t\t\tthrow new toba_error_def('Error cargando CN por INDICE. La etiqueta solicitada se encuentra o no es un CN. Revise el log');\n\t\t}\n\t\treturn $cn;\n\t}", "title": "" }, { "docid": "5184e88e2048924720929020accac662", "score": "0.45759156", "text": "public function getAccountInfo()\n {\n $url = $this->buildUrl('/account', array('token' => Mage::getStoreConfig('smartfeed/options/token')));\n $response = $this->callGET($url);\n\n return $response;\n }", "title": "" }, { "docid": "32a605ed0d3cdea67701af1d44d53a0d", "score": "0.45548534", "text": "public function getConnectedAccount(): ?string\n {\n return $this->connectedAccount;\n }", "title": "" }, { "docid": "8e52975fad9784f6a39a6a64ea021a21", "score": "0.45540318", "text": "public function getCoBorrower() {\n\t\treturn $this->hasDomDocumentOption('coborrower') ? $this->getDomDocumentOption('coborrower') : null;\n\t}", "title": "" }, { "docid": "a616bfd74fa16533d4bac151aeed3abc", "score": "0.45527905", "text": "public function selectNetworkControl($constantInfo, $ceditor) {\n\t\t$result = $this->selectCommonControl($constantInfo, $ceditor);\n\t\tif (!is_array($result))\n\t\t\treturn $result;\n\t\tlist($constantName, $fieldName, $aname, $selected, $url, $login, $size) = $result;\n\t\t$dataProvider = t3lib_div::makeInstance('tx_icslibnavitia_APIService', $url, $login);\n\t\t$networks = $dataProvider->getNetworkList();\n\t\tif ($networks == null)\n\t\t\treturn $this->fallbackControl($fieldName, $selected, $aname) . $this->errorControl($constantInfo, $this->getLL('error_unavailable'));\n\t\t$values = array(\n\t\t\t'' => '',\n\t\t);\n\t\tfor ($i = 0; $i < $networks->Count(); $i++) {\n\t\t\t$values[$networks->Get($i)->externalCode] = $networks->Get($i)->name;\n\t\t}\n\t\treturn $this->displayOptions($fieldName, $aname, $values, $selected, $size);\n\t}", "title": "" }, { "docid": "4a23f92b13bef0c2b98ff5dce573c65a", "score": "0.45522636", "text": "public function getAccount()\n {\n if (null === $this->account)\n $this->account = $this->getServiceManager()->get('ControllerPluginManager')->get('account')->getAccount();\n return $this->account;\n }", "title": "" }, { "docid": "7910fea5a8eea8082c1a6a2a0b0bc7e8", "score": "0.4551779", "text": "public function get_NetworkAddress()\n\t{\n\t\treturn $this->get_network_start();\n\t}", "title": "" }, { "docid": "a7a2201fdad5d57d3adb176d48e00901", "score": "0.45423388", "text": "function get_agent_base_currency()\r\n\t{\r\n\t\treturn $this->cache[$this->set_agent_base_currency()];\r\n\t}", "title": "" }, { "docid": "a9509831db0d9933e67c492a68e9b985", "score": "0.4540331", "text": "public function getContaCredito()\t{\n return $this->iContaCredito;\n\t}", "title": "" }, { "docid": "8f2d09c07024dac112e2c28c6885a800", "score": "0.45250067", "text": "public function getAccount(getAccount $parameters)\n {\n return $this->__soapCall('getAccount', array($parameters), array('uri' => 'https://advertising.criteo.com/API/v201305', 'soapaction' => ''));\n }", "title": "" }, { "docid": "3d87317a9a13c8ae8c289ab64c2679f2", "score": "0.4522524", "text": "public function getCustomerGroup();", "title": "" }, { "docid": "3d87317a9a13c8ae8c289ab64c2679f2", "score": "0.4522524", "text": "public function getCustomerGroup();", "title": "" }, { "docid": "1cb1731d67ad6b828ea22b05e5031c36", "score": "0.45130897", "text": "public function getAllowedCustomerGroup()\n {\n return $this->getConfig(ConfigData::PAYMENTFEE_CUSTOMERS_XML_PATH);\n }", "title": "" }, { "docid": "e7687313a400e311236523e0e03af53f", "score": "0.4510925", "text": "public function currency()\n {\n return $this->currency_client;\n }", "title": "" }, { "docid": "cf91e1065a183a0d96da878ba03c020f", "score": "0.45089582", "text": "public function cc()\n {\n return $this->cc;\n }", "title": "" }, { "docid": "00dc0fa5cf278bb193e6b4c8d5eaff2b", "score": "0.4504949", "text": "public function currency()\n {\n return $this->hasOneThrough(\n Currency::class,\n Order::class,\n 'id',\n 'code',\n 'order_id',\n 'currency_code'\n );\n }", "title": "" }, { "docid": "16b6a0cfc7217518fb7e5e398fb10f09", "score": "0.45021966", "text": "function get_user_net($offset = 0) {\n global $db, $system, $user;\n $user_net = array();\n $offset *= $system['max_results_even'];\n $get_user_net = $db->query(sprintf('SELECT DISTINCT db_net.id AS id, db_net.name AS name FROM db_server INNER JOIN db_net ON db_net.id = db_server.net_id LEFT JOIN db_permission ON db_permission.server_id = db_server.id WHERE db_server.available=1 AND (db_permission.user_id =%s OR db_server.admin_id =%s) LIMIT %s, %s', secure($user->_data['user_id'], 'int'), secure($user->_data['user_id'], 'int'), secure($offset, 'int', false), secure($system['max_results_even'], 'int', false) )) or _error(SQL_ERROR_THROWEN);\n if($get_user_net->num_rows > 0) {\n while($user_network = $get_user_net->fetch_assoc()) {\n $user_net[] = $user_network;\n }\n }\n return $user_net;\n }", "title": "" }, { "docid": "2c2d9225de47897c38892bf90209e119", "score": "0.4491517", "text": "public static function getProxiedContract(): string\n {\n return Contract::class;\n }", "title": "" }, { "docid": "9ef1075f9d101aa5ba3361e6e6e3f957", "score": "0.4490079", "text": "public function getOwner()\n {\n $uuid = $this->getProperty('owner');\n $url = $this->makeAbsoluteUrl('/api/users', $this->getLink('project'));\n return Account::get($uuid, $url, $this->client);\n }", "title": "" }, { "docid": "8b1164de7a911acd6b56c54e11d7592e", "score": "0.44896984", "text": "public function get_account() {\n\t\t\t// https://api.dropboxapi.com/2/users/get_account\n\t\t}", "title": "" }, { "docid": "3872ca4fe0a1766d1ffb3364e1ea68ee", "score": "0.44892192", "text": "public function getCommunity()\n {\n //validate the id criteria\n if ( !$this->_communityIdCriteria->isValid() ) {\n $this->_result['result'] = 'error';\n $this->_result['reasons'] = $this->_communityIdCriteria->getValidationErrors();\n } else {\n $id = $this->_communityIdCriteria->getCriteriaValue();\n $db = Zend_Db_Table::getDefaultAdapter();\n try {\n $sql = 'CALL FAR_Accounts_GetCommunityByID( :id, 1, 0, 1 )';\n $resultObj = $db->prepare($sql);\n $resultObj->execute( array( 'id' => $id ) );\n $this->_result['result'] = 'success';\n $this->_result['communities'] = $resultObj->fetchAll();\n } catch ( Exception $e ) {\n $this->_result['result'] = 'server error';\n $this->_result['reasons'] = $e->getMessage();\n }\n }\n\n return $this->_result;\n }", "title": "" } ]
3faf49208634f68d25d04cb9ffbddb50
Verify that GuessException is thrown when guess is more than 100
[ { "docid": "ebfb719976751e1bcfa2eee1f6bde0a3", "score": "0.76515454", "text": "public function testMakeGuessTooHigh()\n {\n $this->expectException(GuessException::class);\n\n $guess = new Guess();\n $this->assertInstanceOf(\"\\Oliver\\Guess\\Guess\", $guess);\n $guess->makeGuess(140);\n }", "title": "" } ]
[ { "docid": "329a546938cb9c7c425bc7acfd529839", "score": "0.73869586", "text": "public function testMakeGuessTooLow()\n {\n $this->expectException(GuessException::class);\n\n $guess = new Guess();\n $this->assertInstanceOf(\"\\Oliver\\Guess\\Guess\", $guess);\n $guess->makeGuess(0);\n }", "title": "" }, { "docid": "54e38f9c78fb95319d9c1396407c2a2f", "score": "0.6299213", "text": "public function invalidCardFaceValue()\n {\n $hand = new PokerHand('Kc Lc 3h 6d 5d');\n $this->expectException(PokerHandException::class);\n $hand->getRank();\n }", "title": "" }, { "docid": "68582161c69245859a698c871471dcf7", "score": "0.6250173", "text": "public function testMakeGuessEmpty()\n {\n $this->expectException(GuessException::class);\n\n $guess = new Guess();\n $this->assertInstanceOf(\"\\Oliver\\Guess\\Guess\", $guess);\n $guess->makeGuess(\"\");\n }", "title": "" }, { "docid": "aebcab487825f9846d2b73513c2f7676", "score": "0.61692023", "text": "private function askForGuess()\n {\n RandomNumberGame::writeStdout( 'Please enter a number between 1 and 100' );\n $guess = RandomNumberGame::readStdin();\n\n if ( !is_numeric( $guess ) ) {\n RandomNumberGame::writeStdout( 'That\\'s not a number! ');\n return $this->askForGuess();\n }\n\n if ( $guess > 100 || $guess < 1 ) {\n RandomNumberGame::writeStdout( 'Between 1 and 100 silly!' );\n return $this->askForGuess();\n }\n\n return $guess;\n }", "title": "" }, { "docid": "12fed4e3c7ba71201a28cb07dd6b4eb9", "score": "0.59439135", "text": "public function invalidCardNumericValue()\n {\n $hand = new PokerHand('Kc 1c 3h 6d 5d');\n $this->expectException(PokerHandException::class);\n $hand->getRank();\n }", "title": "" }, { "docid": "87da8277d5c773aecf070f9c90022816", "score": "0.59391457", "text": "public function invalidHandSize()\n {\n $this->expectException(PokerHandException::class);\n $hand = new PokerHand('Kt 2c 3h 6d 5d 9d');\n }", "title": "" }, { "docid": "c5c9e07997d0846c7dac5d1d1ad5650f", "score": "0.59379685", "text": "public function tooManyAttempts(): bool;", "title": "" }, { "docid": "08551ec17403bcd6b3981ce8591e53b3", "score": "0.59260476", "text": "protected function validateGuess(string $guess) : void\n {\n if (!ctype_alpha($guess) || strlen($guess) !== 1){\n throw new \\Exception('You can only guess a single letter at a time.');\n }\n }", "title": "" }, { "docid": "ae301da424360867eae1d3dafc75f451", "score": "0.59112376", "text": "public function testCanRejectWrongRanksInCardDefinitions()\n {\n\n $handSelectionStrategy = new \\Classes\\WrongRankHandSelection();\n\n $isStraight = false;\n $isFlush = false;\n try {\n $hand = Player::checkIfHandIsStraightOrFlush($handSelectionStrategy, $isStraight, $isFlush);\n } catch (Exception $ex) {\n $this->assertContains(\"rank\", $ex->getMessage(), \"failed to trigger exception on wrong rank in a card definition\");\n }\n\n }", "title": "" }, { "docid": "91c55f1818385dab0ef08bcb466d4077", "score": "0.58798563", "text": "public function invalidDuplicateCard()\n {\n $hand = new PokerHand('Kc Kc 3h 6d 5d');\n $this->expectException(PokerHandException::class);\n $hand->getRank();\n }", "title": "" }, { "docid": "e99461fb2d9aa923e7ea8d0907d6fdb7", "score": "0.5613713", "text": "public function testRangeCheckingExclusivityOnMaximumLimit() {\n $Check = new FireCheck\\Range(5, 10);\n $code = $Check->passesCheck(10);\n $this->assertSame(FireCheck\\ErrorCodes::NO_ERROR, $code);\n }", "title": "" }, { "docid": "ffd82620dd9c69bba966309e97583039", "score": "0.55923885", "text": "public function testStartGameInvalidBet()\n {\n $game = new Game21Handler();\n request()->merge([\n \"bitcoin\" => \"6\", // valid bet\n \"dice\" => \"1\"\n ]);\n\n $result = $game->playGame();\n\n $expected = [\n \"title\" => \"21\",\n \"header\" => \"Game 21\",\n \"message\" => (\"Welcome to the dice game 21! \n You can maximum bet half of your bitcoins.\"),\n \"playerBitcoin\" => 10,\n \"pageToRender\" => \"game21\"\n ];\n\n\n $this->assertIsArray($result);\n $this->assertEquals($expected, $result);\n }", "title": "" }, { "docid": "f1b595e81744e6bc4e0f3e2530af9cdf", "score": "0.55868566", "text": "public function testRangeBreakingMaxError() {\n $Check = new FireCheck\\Range(5,10);\n $code = $Check->passesCheck(11);\n $this->assertSame(FireCheck\\ErrorCodes::MAXIMUM_LIMIT_ERROR, $code);\n }", "title": "" }, { "docid": "17586a037ba5d0552dbd3a9228b4b806", "score": "0.5582738", "text": "public function canDoOneHundred() {\n\t\t$min = 0;\n $max = 100;\n for ($i=0; $i <= 100; $i++) {\n $this->assertEquals($i, $this->sut->rand(0,100));\n }\n\t}", "title": "" }, { "docid": "bc96456d1b06fd62b7f3f426acf6b025", "score": "0.552477", "text": "private function checkPlayerNumber($playersNumber, $totalCards) {\n // Each player should have at least two card \n // so I throw an exception if the are more than MAX/2 number of player\n // where MAX is the maximum number of card \n if ($playersNumber > (intdiv($totalCards, 2))) {\n throw new \\Exception(\"Sorry! The maximum number of player are \" . (int)($totalCards/2));\n } \n // At least 2 players\n if ($playersNumber < 2) {\n throw new \\Exception(\"Sorry! The minimum number of player are 2\");\n }\n }", "title": "" }, { "docid": "0ffd798b2dcd6f27226d87d61f391787", "score": "0.55021614", "text": "private function testForErrorAndInvalidTokenRetry(): bool\n {\n if (isset($this->response->ErrorCode) && $this->response->ErrorCode !== 0) {\n if (\n isset($this->response_body->error->message) &&\n $this->response_body->error->message == 'INVALID_TOKEN' &&\n // Retry once\n $this->token_retries == 0\n ) {\n // Delete token\n Cache::delete(self::TOKEN_CACHE_KEY);\n $this->token_retries++;\n // Retry\n return true;\n } else {\n throw new HelloCashException($this->response->ErrorText, $this->response->ErrorCode, true);\n }\n }\n\n // Don't retry\n return false;\n }", "title": "" }, { "docid": "92a6080b4b1b5e79a25d7790db3b69a1", "score": "0.54170936", "text": "public function test_non_valid_number_range()\n {\n $this->expectException(Exception::class);\n \n $service = new PrimeNumbersService(new PrimeNumber);\n $service->getPrimeFactorsRange(2, 1);\n }", "title": "" }, { "docid": "62f9313f81941c6556e5d9cfaf080ff8", "score": "0.5410295", "text": "public static function checkForMinimumPHAmount($amount) {\n\t\tif($amount < 1000) {\n\t\t\tthrow new MyCustomException(\"You cannot go below 1000\");\n\t\t}\n\t}", "title": "" }, { "docid": "542c27a7ae36f3bc2efc56024f134b32", "score": "0.53515255", "text": "public function test_exceptions() {\n $q = test_question_maker::make_question('pycode', 'exceptions');\n $code = \"def checkOdd(n):\\n if n & 1:\\n raise ValueError()\";\n $response = array('answer' => $code);\n $result = $q->grade_response($response);\n $this->assertEqual($result[0], 1);\n $this->assertEqual($result[1], question_state::$gradedright);\n // Rechecking the outputs is redundant but makes debugging easier\n $this->assertTrue(isset($result[2]['_testresults']));\n $testResults = unserialize($result[2]['_testresults']);\n $this->assertEqual(count($testResults), 2);\n $this->assertEqual(trim($testResults[0]->output), 'Exception');\n $this->assertEqual($testResults[1]->output, \"Yes\\nYes\\nNo\\nNo\\nYes\\nNo\\n\");\n }", "title": "" }, { "docid": "d2481edea2903d25cf151c3666fba9f0", "score": "0.53277", "text": "private function checkTooManyFailedAttempts()\n {\n if (! RateLimiter::tooManyAttempts($this->throttleKey(), 10)) {\n return;\n }\n\n throw new Exception('IP address banned. Too many login attempts.');\n }", "title": "" }, { "docid": "4d09f5868464b41dc89521937a71443a", "score": "0.5311121", "text": "public function testRangeCheckingExclusivityOnMinimumLimit() {\n $Check = new FireCheck\\Range(5, 10);\n $code = $Check->passesCheck(5);\n $this->assertSame(FireCheck\\ErrorCodes::NO_ERROR, $code);\n }", "title": "" }, { "docid": "2a6df9b0d3c6e04667f613ad78a43ef8", "score": "0.5300075", "text": "public function testRangeBreakingMinError() {\n $Check = new FireCheck\\Range(5,10);\n $code = $Check->passesCheck(4);\n $this->assertSame(FireCheck\\ErrorCodes::MINIMUM_LIMIT_ERROR, $code);\n }", "title": "" }, { "docid": "5bb112f03dbea782edd28b9e998bdcbd", "score": "0.5298428", "text": "public function invalidHandFormat()\n {\n $this->expectException(PokerHandException::class);\n $hand = new PokerHand('asdflkajvg');\n }", "title": "" }, { "docid": "8b0a3bf88ff4c48433c3769835fa75ef", "score": "0.52892727", "text": "public function tries(): int;", "title": "" }, { "docid": "3c85cf0ce21115120fb3d4d4fdb769ea", "score": "0.5267942", "text": "public function testCanRejectMisspelledSuitsInCardDefinitions()\n {\n\n $handSelectionStrategy = new \\Classes\\MisspelledSuitHandSelection();\n\n $isStraight = false;\n $isFlush = false;\n try {\n $hand = Player::checkIfHandIsStraightOrFlush($handSelectionStrategy, $isStraight, $isFlush);\n } catch (Exception $ex) {\n $this->assertContains(\"suit\", $ex->getMessage(), \"failed to trigger exception on misspelled suit in a card definition\");\n }\n\n }", "title": "" }, { "docid": "bebdc3411d3bcd302cd0545e82510470", "score": "0.5265015", "text": "protected function checkSuit() {\n\n // If the suit of the given card is not listed in the array of legitimate suits then throw an exception\n if(!in_array($this->suit, $this->allowedSuits)) {\n\n throw new Exception($this->suit . ' is not allowed! You can pass: ' . implode(', ', $this->allowedSuits));\n }\n }", "title": "" }, { "docid": "cb184fb80212c556ee280e0f4b44234e", "score": "0.5251479", "text": "public function testExceedLimit()\n {\n $this->open('http://www.achievers.com/resource/');\n $this->type('id=resource_search_keyword', 'The customer experience is an important factor in the race to becoming a winning brand. But disengaged front-line employees often create negative customer experiences—and they’re driving away your customers. In 2013, the U.S. economy left $1.9 trillion on table by failing to improve customer satisfaction rates, and subsequently losing customers. Your front-line employees have a direct connection with your customers, and a powerful impact on customer satisfaction.');\n $this->keyPress('id=resource_search_keyword','\\13');\n $this->waitForPageToLoad(5000);\n\n //assert an error messag will appear if character exceeds 128 character \n $this->assertElementPresent('class=element-invisible');\n $this->assertElementPresent('class=view-empty');\n\n $this->close(); \n }", "title": "" }, { "docid": "5ed1a0705f1edc5420447400602e11d6", "score": "0.5227466", "text": "public function wrongGuesses()\n {\n return $this->wrongGuesses;\n }", "title": "" }, { "docid": "e68c2b9b7f0bbdf1203617b641b0e6a9", "score": "0.52166456", "text": "protected static function _randomCheck() {\n return ! rand(0, 999);\n }", "title": "" }, { "docid": "c54c2bc9c68014a69786b57bb0d5f43e", "score": "0.5208709", "text": "abstract protected function checkCorrectness();", "title": "" }, { "docid": "ef52fd04e9443ceca296c11f87132ef4", "score": "0.5181593", "text": "public function testExceeded()\n {\n $limit = new RateLimit(2, 1);\n\n $this->assertFalse($limit->exceeded()); // 0 requests\n\n $limit->update(microtime(true));\n $this->assertFalse($limit->exceeded()); // 1 request\n\n $limit->update(microtime(true));\n $this->assertTrue($limit->exceeded()); // 2 requests\n\n sleep(1);\n $this->assertFalse($limit->exceeded()); // 2 requests\n }", "title": "" }, { "docid": "6fd242c64fcfd389605f2b39d0427a5d", "score": "0.51770514", "text": "public function testStartGameInvalidBetAgain()\n {\n // session_start();\n $game = new Game21Handler();\n\n session([\n \"rounds\" => 2,\n \"playerWins\" => 1,\n \"computerWins\" => 0,\n \"playerBitcoin\" => 10,\n \"computerBitcoin\" => 100,\n ]);\n\n request()->merge([\n \"nextRound\" => \"next round\",\n \"bitcoin\" => \"6\", // invalid bet\n ]);\n\n\n $result = $game->playGame();\n\n $expected = [\n \"title\" => \"21\",\n \"header\" => \"Invalid bet!\",\n \"pageToRender\" => \"game21-winner\"\n ];\n\n // renderView($result[\"pageToRender\"], $result);\n\n $this->assertIsArray($result);\n $this->assertEquals($expected[\"header\"], $result[\"header\"]);\n $this->assertEquals($expected[\"pageToRender\"], $result[\"pageToRender\"]);\n }", "title": "" }, { "docid": "2acd1c6054da673fe727d5c9d4490d24", "score": "0.51769227", "text": "public function testIntegerValidatorHigherFalse()\n {\n $highest = mt_rand(0, 49);\n $lowest = mt_rand(50, 100);\n $result = IntegerValidator::higher($highest,$lowest);\n\n $this->assertFalse($result);\n }", "title": "" }, { "docid": "6473db678946a993e0095e6679a4b592", "score": "0.5169948", "text": "public function testRangeCheckInclusivityOnMaximumLimit() {\n $Check = new FireCheck\\Range(0, 14, FireCheck\\Range::INCLUSIVE_CHECK);\n $code = $Check->passesCheck(14);\n $this->assertSame(FireCheck\\ErrorCodes::MAXIMUM_LIMIT_ERROR, $code);\n }", "title": "" }, { "docid": "b3ee6966f5cccb7f69892293abf435d4", "score": "0.5131434", "text": "function checkNum($number) { // this is a function for checking whether number is greater than 1 or not.\n if($number>2) {\n throw new Exception(\"Value should enter 1 or below\"); // This will throw the exception.\n }\n return true;\n}", "title": "" }, { "docid": "dc377c21e69cc72be2490be63dab6436", "score": "0.51228184", "text": "public function checkPopulationValidity($pop,$msg){\n if(!is_numeric($pop)){\n $msg->show(\"variable that present population is not a number!\");\n return false;\n }\n $length = ceil(log10($pop));\n if($length>7){\n $msg->show(\"population number is very big!\");\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "5247a2f9e856fe161d784137cefedc3e", "score": "0.512163", "text": "public function shouldRetry()\n {\n $code = $this->getCode();\n\n return $code == static::PTC_INVALID_GRANT_ERROR || $code == static::AUTH_SERVER_ERROR;\n }", "title": "" }, { "docid": "b55a810f11383570f1b30b5b7580ae09", "score": "0.5109231", "text": "public function attempts();", "title": "" }, { "docid": "51a58e0515a23044ea9664fe2994a85c", "score": "0.5104908", "text": "public function testGetInvalidFriendByFriendFirstProfileId(): void {\n\n\t\t// Grab a profile id that exceeds the maximum allowable.\n\t\t$friend = Friend::getFriendByFriendFirstProfileId($this->getPDO(), BarkParkzTest::INVALID_KEY);\n\t\t$this->assertCount(0, $friend);\n\t}", "title": "" }, { "docid": "5be1f784447a29c47bf3fb14ae7aac44", "score": "0.5103263", "text": "public function hasDefended()\n {\n return mt_rand(1, 100) <= $this->luck * 100;\n }", "title": "" }, { "docid": "bf609d870336409471b25bf3be6e0ae3", "score": "0.5101496", "text": "public function beyondLimit()\n {\n return ! is_null($this->limit) && $this->failedCount() >= $this->limit;\n }", "title": "" }, { "docid": "23f57cc6875ce123798516227df4ac88", "score": "0.5083057", "text": "public function testQuestionAnsweringAfterTimeLimitErrors() {\n $this->quiz->timelimit = -5000;\n $this->quiz->save();\n $response = $this->actingAs($this->testUser)->get('/active/' . $this->quiz->id . '/confirmlaunch');\n $response->assertRedirect('/active/' . $this->quiz->id . '/show');\n $this->answerQuestion('b')->assertJson(['success' => False, 'code' => 3]);\n }", "title": "" }, { "docid": "20a80596514dfc6b70aaaeccd8723b38", "score": "0.5077549", "text": "public function testGetInvalidFriendByProfileId() {\n// grab a friend id that exceeds the maximum allowable friend id\n\t\t$friends = Friend::getFriendByProfileId($this->getPDO(), TruForkTest::INVALID_KEY);\n\t\tforeach($friends as $friend) {\n\t\t\t$this->assertNull($friend);\n\t\t}\n\t}", "title": "" }, { "docid": "063e5b0e680fead3e9fdd1ae0581561d", "score": "0.50768167", "text": "public function testGuestCannotGetWishlist(): void\n {\n $this->expectException(Exception::class);\n $this->expectExceptionMessage('The current customer isn\\'t authorized.');\n $this->graphQlQuery($this->getQuery());\n }", "title": "" }, { "docid": "250260f4b38ad1117d17bb4d028302e7", "score": "0.50304383", "text": "private function letterHasNotBeenGuessedYet($letter)\n\t{\n\t\treturn ! (preg_match(\"/{$letter}/\", $this->guesses) || preg_match(\"/{$letter}/\", $this->wrongGuesses));\n\t}", "title": "" }, { "docid": "d3e04dba59e76db54b48b046d796b445", "score": "0.5017759", "text": "public function testOutOfTimeAnswerFails() {\n $response = $this->actingAs($this->testUser)->get('/active/' . $this->quiz->id . '/confirmlaunch');\n $response->assertRedirect('/active/' . $this->quiz->id . '/show');\n $this->question->timelimit = -5000;\n $this->question->save();\n $this->answerQuestion('b')->assertJson(['success' => False, 'code' => 9]);\n }", "title": "" }, { "docid": "ab263d1f8e750bc319d89cbac9abec77", "score": "0.50124043", "text": "public function testParseRecordExceptions_TooManyParts()\n {\n self::expectException(Exception::class);\n self::expectExceptionMessage('Too many parts');\n\n $converter = new MockConverter();\n $converter->parseRecord('Mr John James Smith');\n }", "title": "" }, { "docid": "73a7350e23d3ee92f7d9df77b279e64d", "score": "0.50032437", "text": "public function testIfWrongCredentialThrows() : void\n {\n\n // Prepare.\n $this->expectException(ConnectionFopException::class);\n\n // Test.\n Connection::get('testWrong');\n }", "title": "" }, { "docid": "ce659a59196ae4451e582e425e1eca95", "score": "0.49954933", "text": "public function testIntegerValidatorHigher()\n {\n $highest = mt_rand(50, 100);\n $lowest = mt_rand(0, 49);\n $result = IntegerValidator::higher($highest,$lowest);\n\n $this->assertTrue($result);\n }", "title": "" }, { "docid": "5651c186d70ffb13faf57713b6023ddf", "score": "0.49908522", "text": "public function testWrongMaxOption(): void\n {\n $this->expectException(\\Exception::class);\n\n $this->prepareAssert()->process(\n '2016-01-01 10:20:30',\n [\n 'max' => 'foo-bar',\n ]\n );\n }", "title": "" }, { "docid": "cecc3e12c574425eae102b2e157a8329", "score": "0.49871096", "text": "protected function doesErrorCountRequireHalting()\n\t{\n\t\t// If there are too many errors in this run, throw Exceptions\\SeriousException\n\t\t$sql = \"\n\t\t\tSELECT COUNT(*) count\n\t\t\tFROM repository_log\n\t\t\tWHERE\n\t\t\t\trepository_id = :repo_id\n\t\t\t\tAND run_id = :run_id\n\t\t\t\tAND log_level = :level_trivial\n\t\t\";\n\t\t$statement = $this->getDriver()->prepare($sql);\n\t\t$ok = $statement->execute(\n\t\t\tarray(\n\t\t\t\t':repo_id' => $this->repoId,\n\t\t\t\t':run_id' => $this->runId,\n\t\t\t\t':level_trivial' => self::LOG_LEVEL_ERROR_TRIVIAL,\n\t\t\t)\n\t\t);\n\n\t\t// Make sure the query went ok\n\t\tif (!$ok)\n\t\t{\n\t\t\tthrow new \\Exception('Query to count trivial errors did not run');\n\t\t}\n\n\t\tif ($statement->fetchColumn() > self::MAX_FAILS_BEFORE_DISABLE)\n\t\t{\n\t\t\tthrow new SeriousException(\n\t\t\t\t\"Too many failures with this repo recently, please see log\"\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "fa1bb5a35742dd8e7d190ae6cd2e904f", "score": "0.49847883", "text": "public function testMalformedCalcFencePosts()\n {\n $inputa = \"Nova is superior to all\";\n $inputb = 300;\n\n $this->expectException(TypeError::class);\n\n $case = CalcFence($inputa,$inputb);\n }", "title": "" }, { "docid": "e9f8483cd08056f8c09ce4b74886044f", "score": "0.4968886", "text": "public function testRangeCheckingExlcusiveWhenInvalidThirdParameterPassed() {\n $Check = @new FireCheck\\Range(0, 14, 'notvalid');\n $code = $Check->passesCheck(14);\n $this->assertSame(FireCheck\\ErrorCodes::NO_ERROR, $code);\n }", "title": "" }, { "docid": "d8c88a4af51a2a1c61997b76b87cf05c", "score": "0.49684796", "text": "public function testGameEndsWhenMaxNumberOfRoundQuestionsHaveBeenAnsweredAction()\n {\n $questionsLimit = $this->client->getContainer()->getParameter('paq_game.game_round_question_count_limit');\n\n $damian = static::createClient();\n $this->logIn('damian', null, $damian);\n\n $agata = static::createClient();\n $this->logIn('agata', null, $agata);\n\n $gameReference = $this->getGame('first-by-damian-with-agata');\n\n for ($iRound = 1; $iRound <= 3; ++$iRound) {\n for ($iQuestion = 0; $iQuestion < $questionsLimit; ++$iQuestion) {\n $route = $this->getRouter($agata)->generate(\n 'paq_game_service_game_setuseranswerbyindex',\n [ 'gameId' => $gameReference->getId(), 'answer_index' => 1]\n );\n $agata->request('POST', $route);\n $this->assertEquals(Response::HTTP_OK, $agata->getResponse()->getStatusCode());\n $this->assertJson($agata->getResponse()->getContent(), 'GameUserAnswer should return JSON; Got: ' . $agata->getResponse()->getContent());\n $damian->request('POST', $route);\n $this->assertEquals(Response::HTTP_OK, $damian->getResponse()->getStatusCode());\n $this->assertJson($damian->getResponse()->getContent(), 'GameUserAnswer should return JSON; Got: ' . $damian->getResponse()->getContent());\n }\n\n // next round\n $route = $this->getRouter($agata)->generate('paq_game_service_game_reset', ['game' => $gameReference->getId()]);\n $crawler = $damian->request('POST', $route);\n }\n\n /* @var Game $game */\n $game = $this->getSerializer($agata)->deserialize($agata->getResponse()->getContent(), 'Paq\\GameBundle\\Entity\\Game', 'json');\n $this->assertTrue($game->isFinished(), 'Game should be finished once Round Question Limit has been reached');\n }", "title": "" }, { "docid": "504dbe4b34c10ff988281a1f1c1633e8", "score": "0.49650234", "text": "public function testSearchNumberException()\n {\n // Configure HTTP basic authorization: basicAuth\n $config = Configuration::getDefaultConfiguration()\n ->setUsername('YOUR_USERNAME')\n ->setPassword('YOUR_PASSWORD');\n\n $expected_exception = new \\GuzzleHttp\\Exception\\RequestException(\n \"Error Communicating with Server\",\n new \\GuzzleHttp\\Psr7\\Request('GET', 'test')\n );\n $mock = new \\GuzzleHttp\\Handler\\MockHandler([$expected_exception]);\n $handler = \\GuzzleHttp\\HandlerStack::create($mock);\n $client = new \\GuzzleHttp\\Client(['handler' => $handler]);\n\n $apiInstance = new Api\\NumberSearchApi(\n $client,\n $config\n );\n $offset = 0;\n $limit = 10;\n $country = \"US\";\n $prefix = \"prefix_example\";\n $contains = \"contains_example\";\n $number_type = array(\"number_type_example\");\n\n try {\n $result = $apiInstance->searchNumber($offset, $limit, $country, $prefix, $contains, $number_type);\n $this->fail(\"No exception when calling NumberSearchApi->searchNumber with mocked exception\");\n } catch (ApiException $e) {\n $this->assertEquals(\"[0] \".$expected_exception->getMessage(), $e->getMessage());\n }\n }", "title": "" }, { "docid": "dc96b95f2a1d57da941885932f1c4816", "score": "0.49522886", "text": "private function highLowHint( $game, $guess )\n {\n if ( $guess > $game->getTarget() ) {\n RandomNumberGame::writeStdout( 'That guess was too high.' );\n } elseif ( $guess < $game->getTarget() ) {\n RandomNumberGame::writeStdout( 'That guess was too low.' );\n }\n }", "title": "" }, { "docid": "a94f6fd0c00dd9c2aa083f5acbbdaf2a", "score": "0.4948248", "text": "protected function attemptsNumber() {\n\t\treturn;\n\t}", "title": "" }, { "docid": "a9840b7349ab5d079aa7770bade101fb", "score": "0.49432802", "text": "public function testDivisionByZero() {\n $this->expectException(BigNumberException::class);\n\n $num = new BigNumber($this->randomLong());\n $num->setScale(10)->divide(0);\n }", "title": "" }, { "docid": "285028d881ebb0261e81c60f93bfe438", "score": "0.49374577", "text": "public function checkForWin(){\n $phraseArray = str_split($this->phrase->getCurrentPhrase());\n $phraseArrayUnique = array_unique($phraseArray);\n return count($phraseArrayUnique)-1 == count($this->phrase->getCorrect());\n }", "title": "" }, { "docid": "1b99e0673dcbd61a2345b6551f3cf37a", "score": "0.49367058", "text": "public function testCannotSendJewelryHimself() {\n clearDatabase();\n wp_set_current_user($this->male);\n $this->credit->generateTodayBonus($this->male);\n $re = $this->credit->giveJewelry(['user_ID'=>$this->male, 'jewelry' => SILVER, 'count'=>1]);\n self::assertSame($re, ERROR_TRANSFER_MYSELF, ERROR_TRANSFER_MYSELF);\n }", "title": "" }, { "docid": "c2f82016fa2c98484e8bdadee67effe1", "score": "0.4930143", "text": "public function testRangeCheckInclusivityOnMinimumLimit() {\n $Check = new FireCheck\\Range(3, 7, FireCheck\\Range::INCLUSIVE_CHECK);\n $code = $Check->passesCheck(3);\n $this->assertSame(FireCheck\\ErrorCodes::MINIMUM_LIMIT_ERROR, $code);\n }", "title": "" }, { "docid": "6f2b5ac57e59deac1b3ff40841145b46", "score": "0.4928966", "text": "function getCompThrow($compGuess) {\n switch ($compGuess) {\n case 'rock':\n $compThrow = 'paper';\n break;\n case 'paper':\n $compThrow = 'scissors';\n break;\n case 'scissors':\n $compThrow = 'rock';\n break;\n default:\n $compThrow = 'ERR, please refresh!';\n break; }\n return $compThrow; }", "title": "" }, { "docid": "f4ce56d77c1cf91e8fe0e65a3c0917ff", "score": "0.49195257", "text": "public function testGetLikesFailure()\n\t{\n\t\t$comment = '124346363456';\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 401;\n\t\t$returnData->body = $this->errorString;\n\n\t\t$token = $this->oauth->getToken();\n\n\t\t$this->client->expects($this->once())\n\t\t->method('get')\n\t\t->with($comment . '/likes?access_token=' . $token['access_token'])\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->object->getLikes($comment);\n\t}", "title": "" }, { "docid": "c813699716ff8bff59f4ee9af91dc7e0", "score": "0.49193767", "text": "private function testAttempts(?UserEntity $user)\n {\n if($user instanceof UserEntity && !$user->validateAttempts($this->config[\"maxAttempts\"])){\n $this->on(\n self::EVENT_MAX_ATTEMPTS_REACHED,\n new AuthenticationEvent(\n [\n AuthenticationEvent::ENTITY=>$user\n ],\n self::EVENT_MAX_ATTEMPTS_REACHED\n )\n );\n throw new AuthenticationException(AuthenticationException::MESSAGE_MAX_ATTEMPTS_REACHED, AuthenticationException::MAX_ATTEMPTS_REACHED);\n }\n return;\n }", "title": "" }, { "docid": "9c52dca6a1e48fd51e081eba8376e12c", "score": "0.49181843", "text": "public function addIncorrectGuess($guess)\n {\n array_push($this->incorrectGuesses, $guess);\n return $this->incorrectGuesses;\n }", "title": "" }, { "docid": "f458c0f88f2e16eb5c17cbee1f03414b", "score": "0.49171194", "text": "public function testFailureCalcFencePosts()\n {\n $expected = 0;\n\n $inputa = -7;\n $inputb = 300;\n\n $case = CalcFence($inputa,$inputb);\n\n $this->assertEquals($expected, $case);\n }", "title": "" }, { "docid": "7f1a430e99fc5927a85f9c83c6cd1942", "score": "0.4916285", "text": "public function tooManyAttempts()\n {\n [$this->decaysAt, $this->remaining] = $this->redis->eval(\n $this->tooManyAttemptsLuaScript(), 1, $this->name, microtime(true), time(), $this->decay, $this->maxLocks\n );\n\n return $this->remaining <= 0;\n }", "title": "" }, { "docid": "57c73bbe02096063904fdd8083eef3ac", "score": "0.49144757", "text": "public function checkTooManyFailedAttempts($request)\n {\n if (!RateLimiter::tooManyAttempts($this->throttleKey($request), 5)) {\n return;\n }\n\n $this->errorMessage = \"You have exceeded the maximum number of login attempts.\";\n\n return $this->errorMessage;\n }", "title": "" }, { "docid": "e31462348200a0ba80f8b026ffb57f21", "score": "0.491235", "text": "public function addCorrectGuess($guess)\n {\n $this->correctGuesses[] = $guess;\n }", "title": "" }, { "docid": "0b98fc9d5327f695855b9b38f92b0caa", "score": "0.48999032", "text": "public function testParseRecordExceptions_TooManyAnds()\n {\n self::expectException(Exception::class);\n self::expectExceptionMessage('Too many and\\'s and/or &\\'s');\n\n $converter = new MockConverter();\n $converter->parseRecord('Mr and Mrs and Lady');\n }", "title": "" }, { "docid": "be0a19ea8f0dbf1f6d5afa5fa3a1c3a2", "score": "0.4897932", "text": "public function test_repetition_detector_function_work_false_case()\n {\n $instance = new PinGeneratorHandler();\n $nonRepeating = 1048;\n $this->assertFalse($instance->checkRepeating($nonRepeating));\n }", "title": "" }, { "docid": "4e6492c6b58ffa1cefe4cca1f2760e11", "score": "0.48934996", "text": "public function testCheckSumPlayerNotHundred()\n {\n $round = new Round(2, 15, 10);\n\n $res = $round->checkSum(\"player\");\n $exp = \"Play dice\";\n $this->assertEquals($res, $exp);\n }", "title": "" }, { "docid": "42afa6a0400f5389f99a122114a34a0c", "score": "0.4891879", "text": "public function testValidateFirstParameterNotInteger()\n {\n $FB = new FizzBuzz();\n try {\n $FB->fizzbuzz(23.2, 18);\n $this->fail();\n } catch (FizzBuzzException $exc) {\n $this->assertEquals('The first parameter is not integer.', \n $exc->getMessage());\n }\n }", "title": "" }, { "docid": "d64e44ab8754a665abcb8567967837d2", "score": "0.4878959", "text": "public function testAttemptFailure()\n {\n\t\t$cards_1 = array(new Card('C', 2));\n\t\t$cards_2 = array(new Card('C', 1));\n\n\t\t$this->assertTrue($this->object->test($cards_1, $cards_2));\n }", "title": "" }, { "docid": "b875af52d8f6881e02570d84962965c3", "score": "0.48711628", "text": "public function testParseRecordExceptions_NotEnoughParts()\n {\n self::expectException(Exception::class);\n self::expectExceptionMessage('Not enough parts');\n\n $converter = new MockConverter();\n $converter->parseRecord('Mr');\n }", "title": "" }, { "docid": "d3f32322a9f9b91c82dec24838cca544", "score": "0.48696956", "text": "public function testPostEndpointPhoneNumberTooLongErrorValidation()\n {\n $response = $this->post('/contact', [\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'phone' => '1231231231231',\n 'message' => 'this is my test email body'\n ]);\n \n $response->assertSessionHasErrors(['phone']);\n $response->assertStatus(302); \n \n $this->assertDatabaseMissing('contacts', ['phone' => '1231231231231']); \n }", "title": "" }, { "docid": "9c3ded4d4306a47042279130e9bccebf", "score": "0.48647615", "text": "public function test_square_charge_wrong_nonce(): void\n {\n $this->expectException(Exception::class);\n $this->expectExceptionMessageMatches('/Invalid source/i');\n $this->expectExceptionCode(400);\n\n Square::charge(['amount' => 5000, 'source_id' => 'not-existent-nonce', 'location_id' => env('SQUARE_LOCATION')]);\n }", "title": "" }, { "docid": "a8aedc81de5b94daba3a9778030c4fd8", "score": "0.48637152", "text": "public function testModulusByZero() {\n $this->expectException(BigNumberException::class);\n\n $num = new BigNumber($this->randomLong());\n $num->setScale(10)->modulus(new BigNumber('0.00000'));\n }", "title": "" }, { "docid": "661694f1e16315bec40ee05264048c0f", "score": "0.48541084", "text": "public function testRangeTriggeringErrorWhenInvalidThirdParameterPassed() {\n $expectedMessage = 'Invalid check type passed to SprayFire\\Validation\\Check\\FireCheck\\Range. Exclusive check used by default.';\n $this->setExpectedException('PHPUnit_Framework_Error_Notice', $expectedMessage);\n $Check = new FireCheck\\Range(0, 14, 'notvalid');\n }", "title": "" }, { "docid": "7b2f130272a11663d70d913d70cfdc01", "score": "0.48537374", "text": "function validateOTP($inOTP){\n global $tries;\n $account = $_SESSION['account'];\n $storedOTP=findOTP($account);\n if ((isCorrectHash($inOTP,$storedOTP)==true) && ($_SESSION['triesFailed']<=3)){\n unset($_SESSION['triesFailed']);\n unset($_SESSION['triesLimit']);\n header('Location: newPassword.php');\n } else {\n $_SESSION['OTPFailed'] = 'true';\n $_SESSION['triesFailed']++;\n if ($_SESSION['triesFailed']==4){\n $_SESSION['triesLimit'] = 'true';\n unset($_SESSION['triesFailed']);\n header('Location: index.php');\n }\n }\n }", "title": "" }, { "docid": "4947c17a091e7d689c4151db3fb823b9", "score": "0.48484027", "text": "public function testFindWithInvalidCodeThrowsException(): void\n {\n $this->expectException(InvalidArgumentException::class);\n Pokemon::Options($this->clientOptions);\n Pokemon::Set()->find('invalid');\n }", "title": "" }, { "docid": "9b100451e7968c5f34c1f8fcbf58b783", "score": "0.48424864", "text": "public function it_validates_spam()\n {\n $spam = new Spam();\n \n $this->assertFalse($spam->detect('inoccent reply here'));\n \n $this->expectException('Exception');\n \n $spam->detect('yahoo customer support');\n }", "title": "" }, { "docid": "92e8cade9313240e0beb8439e95f64cf", "score": "0.48205304", "text": "public function checkWin()\n {\n $currPlayer = $this->getCurrentPlayerObj();\n $points = $currPlayer->getPoints();\n if ($points >= 100) {\n $this->stopPlaying();\n $currPlayer->setNotPlaying();\n $player = $currPlayer->isHuman() ? \"Du\" : \"Spelare nr \" . $currPlayer->getId();\n $this->setMsg($player . \" vann!\");\n }\n }", "title": "" }, { "docid": "5aea7190c58864378b41670a9b1dc5a2", "score": "0.4817654", "text": "private function check_parameters()\n {\n $maximum_reached = array();\n foreach ($this->ep->cplaces as $place)\n {\n $id = $place->id;\n $size = 1;\n $where = 1;\n $max = count($place->domain->values);\n $p = '';\n foreach ($place->domain->values as $k => $v)\n {\n $first = true;\n $last = end($v);\n $p .= '_((' . $last;\n if ($where != $max)\n {\n $size *= count($v);\n $p .= '_.*)|([^_]+';\n }\n $where++;\n }\n for ($i = 0; $i < 2*count($place->domain->values); $i++)\n {\n $p .= ')';\n }\n $regex = \"^{$place->name}{$p}$\";\n // If you have trouble understanding what happens,\n // look at the regex!\n $maximum_reached[$id] = false;\n error_reporting(E_ERROR);\n foreach ($this->ep->uplaces as $uplace)\n {\n if ((size < 1000) && preg_match('/' . $regex . '/u', $uplace->name))\n {\n $maximum_reached[$id] = true;\n break;\n }\n else if (ereg($regex, $uplace->name))\n {\n $maximum_reached[$id] = true;\n break;\n }\n }\n error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);\n $this->progress->advance();\n }\n $n = 0;\n foreach ($maximum_reached as $i => $b)\n {\n if ($b)\n {\n $n++;\n }\n }\n $m = count($this->ep->cplaces);\n if ($n < $m/2)\n {\n fwrite($this->log, \"Maximum parameter is reached for only {$n}/{$m} places.\\n\");\n }\n }", "title": "" }, { "docid": "172b5ccaace3cc00cf5bade04fd743ff", "score": "0.48165113", "text": "public function testParseRecordExceptions_TooManyParts_2()\n {\n self::expectException(Exception::class);\n self::expectExceptionMessage('Too many parts');\n\n $converter = new MockConverter();\n $converter->parseRecord('Mr John P Smith');\n }", "title": "" }, { "docid": "e325c7f6beadf3768cdba7f57bd269d9", "score": "0.48161185", "text": "public function testGenerateFibonacciSequenceInvalidNumberException() {\n $this->expectException(FibonacciInvalidNumberException::class);\n $fibonacciSequence = FibonacciHelper::generateFibonacci('invalidNUmber');\n }", "title": "" }, { "docid": "f5e7441fdcbdb69b8784d5fc925a4fe9", "score": "0.48136425", "text": "public function testValidateSecondParameterNotInteger()\n {\n $FB = new FizzBuzz();\n try {\n $FB->fizzbuzz(2, 34.2);\n $this->fail();\n } catch (FizzBuzzException $exc) {\n $this->assertEquals('The second parameter is not integer.', \n $exc->getMessage());\n }\n }", "title": "" }, { "docid": "97c552c69d593dd619fe084e9aa816e3", "score": "0.48120868", "text": "public function testCreateLikeFailure()\n\t{\n\t\t$comment = '124346363456';\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 401;\n\t\t$returnData->body = $this->errorString;\n\n\t\t$token = $this->oauth->getToken();\n\n\t\t$this->client->expects($this->once())\n\t\t->method('post')\n\t\t->with($comment . '/likes?access_token=' . $token['access_token'], '')\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->object->createLike($comment);\n\t}", "title": "" }, { "docid": "d34677bc4a8f0bd19a876e00aa6dd65b", "score": "0.48037934", "text": "function myService() {\n if (rand(1, 100) >= 50) {\n throw new RuntimeException('Something got wrong!');\n }\n}", "title": "" }, { "docid": "ba0b53d100016852a5e4db5eea7bf233", "score": "0.48037854", "text": "public function testIsNotSuperior(){\n $int = mt_rand(5,10);\n $boolean = IntegerValidator::superior($int, 11);\n $this->assertFalse($boolean);\n }", "title": "" }, { "docid": "77d5848582a06b56573bd09d66535951", "score": "0.48028186", "text": "public function test_square_charge_wrong_postal(): void\n {\n $this->expectException(Exception::class);\n $this->expectExceptionMessageMatches('/'.Constants::VERIFY_POSTAL_CODE.'/i');\n $this->expectExceptionCode(400);\n\n Square::charge(['amount' => 5000, 'source_id' => 'cnon:card-nonce-rejected-postalcode', 'location_id' => env('SQUARE_LOCATION')]);\n }", "title": "" }, { "docid": "04d46de73ec2f9c3176d05efe4c4d7cc", "score": "0.47927368", "text": "public function testValidateFirstParameterIsLessThanSecond()\n {\n $FB = new FizzBuzz();\n try {\n $FB->fizzbuzz(25, 15);\n $this->fail();\n } catch (FizzBuzzException $exc) {\n $this->assertEquals('The first parameter must be less than or equal'\n . ' to the second parameter.', $exc->getMessage());\n }\n }", "title": "" }, { "docid": "1ef78a2202031d6a7f64ac804576cfa4", "score": "0.4790527", "text": "public function testInvalidFloatLimit(){\n\n\t\t$search = new Searcher();\n\t\t$result = $search->execSearch( \"php\", \"composer\", \"hot\", 5.5 );\n\n\t\t$this->assertEquals( $result, false );\n\t}", "title": "" }, { "docid": "e27a94ddb58a8653c88755bae44981d5", "score": "0.47845742", "text": "public function checkForWin()\n {\n $phraseLettersUnique = $this->phrase->getPhraseLettersArray();\n $guessedLettersUnique = $this->phrase->getGuessedLettersArray();\n $correctLettersUnique = array_intersect($phraseLettersUnique, $guessedLettersUnique);\n\n return count($phraseLettersUnique) === count($correctLettersUnique);\n }", "title": "" }, { "docid": "2cfece151ba2e5ad0b37a7d0e16229e0", "score": "0.47833094", "text": "public function testParseRecordExceptions_TooManyAnds_2()\n {\n self::expectException(Exception::class);\n self::expectExceptionMessage('Too many and\\'s and/or &\\'s');\n\n $converter = new MockConverter();\n $converter->parseRecord('Mr & Mrs & Lady');\n }", "title": "" }, { "docid": "6fb8e652a7e36f5df75386edcf8da8af", "score": "0.47792408", "text": "public function testValidateMethodRejectsValuesOutsideWindow()\n {\n // Window of 1, meaning we'll allow the token to be ahead by no\n // more than one.\n $hotp = new HOTP($this->seed, array ('window' => 1));\n\n // Token ahead by two (outside of window)\n $otp = '359152'; // Token counter value is 2\n $counter = 0; // Stored counter value is 0\n $this->assertFalse($hotp->validate($otp, $counter));\n $this->assertNull($hotp->getLastValidCounterOffset());\n }", "title": "" }, { "docid": "076905853e339d32394db0f9a6445739", "score": "0.4768167", "text": "public static function assertInfinite($actual, $message = '') {}", "title": "" }, { "docid": "e020bdfe92c96b9aa87663696ec3d41e", "score": "0.47671518", "text": "public function testCheckFraudInvalid(){\n\t\t\t$creditList=-1;\n\t\t\t\n\t\t\t$t=10;\n\t\t\t\n\t\t\t$this->assertEquals(-1,$this->validator->checkFraud($creditList, $t));\n\t\t}", "title": "" }, { "docid": "519689d87eb8c993dacf6f1a9fcfe29e", "score": "0.47648045", "text": "public function invalidHandFormatNonString()\n {\n $this->expectException(PokerHandException::class);\n $hand = new PokerHand(123123);\n }", "title": "" }, { "docid": "fc0c6584ed2620d33bd66582895badf3", "score": "0.4763944", "text": "public function testParseRecordExceptions_TooManyAnds_3()\n {\n self::expectException(Exception::class);\n self::expectExceptionMessage('Too many and\\'s and/or &\\'s');\n\n $converter = new MockConverter();\n $converter->parseRecord('Mr & Mrs and Lady');\n }", "title": "" } ]
52ab1e89f3a61e9a313f5352ff387c66
Returns FALSE if the value cannot be changed
[ { "docid": "4b2fecc39c295e0de07b036b224dfe66", "score": "0.0", "text": "public function setAllowAlias(bool $allow) : bool {\n\n if (!$allow) {\n\n $values = array_count_values($this->_options);\n foreach ($values as $count) {\n if ($count > 1) {\n return FALSE;\n }\n }\n\n }\n\n $this->_allowAlias = $allow;\n\n return TRUE;\n }", "title": "" } ]
[ { "docid": "cd8f8cb69f7ae4e42c3d571ac9aec8c8", "score": "0.7317639", "text": "protected function anotherValue()\n {\n return false;\n }", "title": "" }, { "docid": "b5ce3d4baf82c61d194c56e73bdb3814", "score": "0.71892387", "text": "public function is_changed()\n\t{\n\t\t$value = $this->_field->get('value');\n\t\t$new_value = $this->_field->get('new_value');\n\t\t\n\t\techo Debug::vars($value, $new_value);\n\t\t\n\t\tif ( ! $this->val_isset())\n\t\t\treturn FALSE;\n\n\t\treturn $value != $new_value;\n\t}", "title": "" }, { "docid": "3b4bd145116e984463c913835e1c2a0b", "score": "0.68103033", "text": "public function canBePassedByValue()\n {\n return !$this->isByRef();\n }", "title": "" }, { "docid": "0f2e99541433b7476ead9e2ca0a75eca", "score": "0.66853553", "text": "public function setValue($value){\n\t\treturn false;\n\t}", "title": "" }, { "docid": "12c689e38a990f4824e13375d35f59c9", "score": "0.6674853", "text": "public function updateValue() : bool {\n if($this->value >= $this->max) return false;\n \n if($this->update_interval > 0) {\n $delta = $this->getNextUpdate(true);\n if($delta <= 0) {\n $delta *= -1;\n // At least one update should occur\n $m = floor($delta / $this->update_interval) + 1;\n $delta = $delta % $this->update_interval;\n $add = $this->grow_by * $m;\n \n $this->value += $add;\n $this->delta_time = $this->value >= $this->max ? 0 : $delta;\n\n // cap the value to it's maximum\n $this->last_updated = time();\n $this->setValue(max(0, min($this->value, $this->max)));\n\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "ec14e6f77870fb637460505e518c871d", "score": "0.66675574", "text": "public function isFieldChanged()\n {\n return $this->internalInitialValue !== $this->internalValue;\n }", "title": "" }, { "docid": "dbeb53672b60496b9c9f60e61e84ec24", "score": "0.65074503", "text": "private function valueHasBeenCleared(): bool\n\t{\n\t\treturn empty($this->newMapping);\n\t}", "title": "" }, { "docid": "102dad10a38baed6598cb19ebdcf59f5", "score": "0.6487338", "text": "public function must_change_password()\n\t{\n\t\treturn ! (bool)$this->pwdLastSet(0);\n\t}", "title": "" }, { "docid": "51693dd58309b4ec85b5e2e7a7e31387", "score": "0.6421421", "text": "public function val_isset()\n\t{\n\t\treturn Formo::is_set($this->_field->get('new_value'));\n\t}", "title": "" }, { "docid": "aa91acc2aed0743a955212650fef1884", "score": "0.6382706", "text": "protected function aValue()\n {\n return true;\n }", "title": "" }, { "docid": "85d1dbd372ad4c9f7b5552d26ce82160", "score": "0.6300111", "text": "public function need_value_detect() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "85d1dbd372ad4c9f7b5552d26ce82160", "score": "0.6300111", "text": "public function need_value_detect() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "85d1dbd372ad4c9f7b5552d26ce82160", "score": "0.6300111", "text": "public function need_value_detect() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f8193f1c1ded68eee708b00677448e73", "score": "0.62895095", "text": "abstract protected function checkValue($value);", "title": "" }, { "docid": "cf88dd6ccb737671ef85357bfbf38f04", "score": "0.6281273", "text": "protected function _beforeUpdate()\n {\n //check the fields value before update\n return true;\n }", "title": "" }, { "docid": "53a71620268874a1121aa151481cd1e4", "score": "0.6276935", "text": "public function hasValue() {\n return $this->value !== NULL;\n }", "title": "" }, { "docid": "66efab32d3ed75d1d234ba2f932a6ce7", "score": "0.62561303", "text": "protected function _isMutable(){\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f974e81718990aeef9d1717b06494ec1", "score": "0.6244426", "text": "public function isDirty()\n {\n return !Utility::isSubSet($this->getArrayCopy() ,$this->originalData);\n }", "title": "" }, { "docid": "59c235435fc2c14544e01398609df6bb", "score": "0.62428594", "text": "public function realValueChanged(DBItemField $field){\n\t\treturn array_key_exists($field->name, $this->newValues) &&\n\t\t\t$this->newValues[$field->name] !== array_read_key($field->name, $this->oldValues, $field->default);\n\t}", "title": "" }, { "docid": "ab6c8455099ff07e81c01a48a074a623", "score": "0.6242367", "text": "protected function _isMutable(){\n\t\treturn (bool) true;\n\t}", "title": "" }, { "docid": "ec5f83d07cf61d5127f10e1da9376185", "score": "0.62363493", "text": "function isChangeable() {\n return true;\n }", "title": "" }, { "docid": "9626dcbdbfdbe2712dc60027ecb57470", "score": "0.6234278", "text": "public function canBePassedByValue()\n {\n return $this->root->canBePassedByValue();\n }", "title": "" }, { "docid": "11bcca1bf2f5139d0044d6b691450849", "score": "0.6176982", "text": "protected function _beforeUpdate() {\n\t \t//check the fields value before update\n\t\treturn true;\n\t}", "title": "" }, { "docid": "de25e99b75829c7bf0499a0bc9b51b9a", "score": "0.61661756", "text": "function setValue($value) {\n if (!empty($value)) {\n $this->_value = $value;\n $this->_src = NULL;\n return TRUE;\n }\n return FALSE;\n }", "title": "" }, { "docid": "b40b5971cf9f975411f3730126ecd71e", "score": "0.6137803", "text": "public function isValid(){\n return !$this->invalid;\n }", "title": "" }, { "docid": "529fded26d439f055c6aa1154cb6806f", "score": "0.6123976", "text": "public function isValueAvailable(): bool;", "title": "" }, { "docid": "130820c87f60f6f6d7277c4f1d25934c", "score": "0.61231947", "text": "public function isValueModified(string $name): bool\n {\n $retval = false;\n\n if ($this->hasValue($name) && !$this->isHistoryEmpty()) {\n $pos = count($this->data_stack) - 1;\n $retval = array_key_exists($name, $this->data_stack[$pos]) &&\n $this->data[$name] !== $this->data_stack[$pos][$name]\n ;\n }\n\n return $retval;\n }", "title": "" }, { "docid": "d9f66511b915b1f0354d2df5e9802784", "score": "0.61052114", "text": "function testChange($oldValue,$newValue)\n{\n if($newValue=='')\n {\n return $oldValue; \n }\n else\n {\n return $newValue;\n }\n}", "title": "" }, { "docid": "166b6064caca1235aa0031e5eb4d5d00", "score": "0.6096374", "text": "public function validate($value)\n\t{\n\t\treturn !parent::validate($value);\n\t}", "title": "" }, { "docid": "0c57b82a7e1edeed5c5940364c5c644d", "score": "0.60917664", "text": "function changed()\n {\n return($this->needInsert ||\n (is_array($this->changed) && count($this->changed) > 0));\n }", "title": "" }, { "docid": "fb334945b3db5c2a0a5001fa75cbec37", "score": "0.6085143", "text": "public function allowChanges();", "title": "" }, { "docid": "e84e259a4b94a31951d6075177c18622", "score": "0.6056102", "text": "public function valid(){\n return key($this->value) !== null;\n }", "title": "" }, { "docid": "5de83b69e5942f23b6215e842c75fc2f", "score": "0.60484266", "text": "public function isInvalid(): bool;", "title": "" }, { "docid": "b883968df0b06e472a0fce242c0f6532", "score": "0.60436136", "text": "public function hasChanged() {\n return TRUE;\n }", "title": "" }, { "docid": "16764e65317a557957c47b3d196e776d", "score": "0.6032732", "text": "function changed_from_null($newVal, $oldVal) {\n\treturn $oldVal == null && $newVal != $oldVal && $newVal != -1;\n}", "title": "" }, { "docid": "c8d4050a7664203e9955ad1997b97f98", "score": "0.60135335", "text": "#[\\ReturnTypeWillChange]\n\tpublic function valid () {\n\t\treturn key($this->currentData) !== NULL;\n\t}", "title": "" }, { "docid": "324d648ef1c97f3c0dde59760f352eae", "score": "0.60125536", "text": "public function hasValue()\n {\n return !is_null($this->value);\n }", "title": "" }, { "docid": "9e40548968a276eba8e9c1d7094f13ee", "score": "0.6007968", "text": "public function hasValue()\n {\n return $this->value !== null;\n }", "title": "" }, { "docid": "9e40548968a276eba8e9c1d7094f13ee", "score": "0.6007968", "text": "public function hasValue()\n {\n return $this->value !== null;\n }", "title": "" }, { "docid": "5e412e909a55a7be09e760da68820cd1", "score": "0.5991128", "text": "public function isImmutable(): bool\n {\n return !$this->allowChanges;\n }", "title": "" }, { "docid": "523a58d47766ef3c0b3140b326c03d4d", "score": "0.598219", "text": "public function hasChanged()\n\t{\n\t\treturn $this->_changes != 0;\n\t}", "title": "" }, { "docid": "f621993065762b6e74804253a8f57cc7", "score": "0.5959097", "text": "public function isValue();", "title": "" }, { "docid": "1fcc650ebcaa61057e759b6ec196db4d", "score": "0.5952076", "text": "function changed() {\n\t\t\t$exist = $this->db->prepare(\"SELECT 1 FROM LOCATION WHERE longitude = ? AND latitude = ?\");\n\t\t\t$exist->execute(array($this->longitude, $this->latitude));\n\t\t\treturn count($exist->fetchAll()) == 0;\n\t\t}", "title": "" }, { "docid": "b3597a11d187a3780962db41f7be3cce", "score": "0.5951401", "text": "public function isChanged()\n {\n return $this->changed;\n }", "title": "" }, { "docid": "67252c2842e2f963c9d5e960ad063d8e", "score": "0.5949379", "text": "public function canHandleValue($value);", "title": "" }, { "docid": "132b42c669f9d746af86a985fab25a06", "score": "0.5948942", "text": "public function invalid (): bool\n {\n return !$this->valid();\n }", "title": "" }, { "docid": "15794e71a97932d85d3e0031eb492a0a", "score": "0.59464395", "text": "public static function valueIsValid($_value)\n\t{\n\t\treturn in_array($_value,array(self::VALUE_DROPPED,self::VALUE_MODIFY,self::VALUE_CUSTOMCODE));\n\t}", "title": "" }, { "docid": "d57a3d32beea26bea613f3cdc4d4ccd4", "score": "0.59381276", "text": "public function trigger_before_update(){\n\n // Get's previous \"old\" values\n $previous_values = $this->previous_values();\n\n return true;\n\n }", "title": "" }, { "docid": "3d7d22d247b0baafb0f5c66e04e8310e", "score": "0.59159327", "text": "abstract public function valueIsValidNative($value);", "title": "" }, { "docid": "de537562a7a81b079ec0e5da518e4810", "score": "0.59061813", "text": "abstract protected function isValid($value);", "title": "" }, { "docid": "b0c28f8b44dd3d11f4dc62564990308a", "score": "0.5904164", "text": "public function hasValue(): bool\n {\n return !empty($this->_value) || $this->_value === '0';\n }", "title": "" }, { "docid": "184866fb64badfa932b42afe07d2fa54", "score": "0.5897071", "text": "public function isFixable($value): bool;", "title": "" }, { "docid": "791fda8ad4443d0b0a76b77ba49b8b67", "score": "0.5896788", "text": "private function checkWhetherAnEditExits($newValue, $previousValue){\n if($newValue != \"\"){\n return $newValue;\n }\n else{\n return $previousValue;\n }\n }", "title": "" }, { "docid": "18fc18f407227d20c2ace0b951355472", "score": "0.5890482", "text": "function test_set_meta_returns_false_for_unchanged_data(){\n\n\t\t$this->user->set_meta('new_key', 'new_value');\n\n\t\t$this->assertFalse($this->user->set_meta('new_key', 'new_value'));\n\n\t}", "title": "" }, { "docid": "f4976be72288aed3d8f114898a383567", "score": "0.58900124", "text": "function update()\n\t{\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "22a261413ed59c51dd0f7a0c0607d765", "score": "0.58840805", "text": "public function isValidForUpdate();", "title": "" }, { "docid": "fbfaf88621c1f2934d06e2329b89942d", "score": "0.5879036", "text": "public function getValue() {\n // TODO : implement\n return false;\n }", "title": "" }, { "docid": "7b24173080d0d2ee417aee8ef0a3058f", "score": "0.58616805", "text": "public function setChanged()\n {\n $this->internalInitialValue = true;\n }", "title": "" }, { "docid": "6038a355c4fb23ebf43d8e188106bb32", "score": "0.58550453", "text": "function checkChangeImage() {\n\t\tif ($this->_change_image==false) return false;\n\t\treturn $this->_change_image;\n\t}", "title": "" }, { "docid": "bb569c4bf0cb2754063ed81b8012beb6", "score": "0.5852749", "text": "public function allowedUpdates()\n {\n if($this->state === PirepState::CANCELLED) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "14cc05cdedd1911611a03f8a1e7bfe97", "score": "0.58442926", "text": "public function hasValue()\n {\n return ($this->value !== null);\n }", "title": "" }, { "docid": "1e343c2913d52742317f6ee32c306aec", "score": "0.5843934", "text": "public function is(int $value) : bool {\n\t\t\tif ($this->value === null || $this->value !== $value) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "dd56471f4ce4cffc98932d9c288303be", "score": "0.58338106", "text": "public function isModified();", "title": "" }, { "docid": "f3ae97c3fcc9e7a923654c651ab082ec", "score": "0.58283985", "text": "public function hasValue(): bool;", "title": "" }, { "docid": "d5dacd2782735ff96bd17182e165864d", "score": "0.5824717", "text": "public function isValid()\n {\n return false;\n }", "title": "" }, { "docid": "0a4eca3b4d3641b9324b6b2a44db7525", "score": "0.5812692", "text": "function isValid()\r\n\t{\r\n\t\t// the result has been requested before..\r\n\t\tif( isset( $this->_isValid ) )\r\n\t\t{\r\n\t\t\treturn $this->_isValid;\r\n\t\t}\r\n\r\n\t\tif( $this->getValue() != \"\" )\r\n\t\t{\r\n\t\t\tif( preg_match( $this->_sValParseRegExpr, $this->getValue(), $data ) )\r\n\t\t\t{\r\n\t\t\t\t$data = $this->getAsArray();\r\n\t\t\t\tif( checkdate($data[1], $data[2], $data[0]) == false )\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->_isValid = false;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$timestamp = mktime(0, 0, 0,$data[1], $data[2], $data[0]);\r\n\t\t\t\t\t$this->_mValue = date($this->_sDateMask, $timestamp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->_isValid = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif( isset( $this->_isValid ) && $this->_isValid == false )\r\n\t\t{\r\n\t\t\t// set the error message\r\n\t\t\t$this->_sError = $this->_oForm->_text( 14 );\r\n\t\t}\r\n\r\n\t\treturn parent::isValid();\r\n\t}", "title": "" }, { "docid": "b99f2f97abbd9b98391fb0631f3e7ec8", "score": "0.5811142", "text": "public function isNew(): bool\n {\n return $this->value === null;\n }", "title": "" }, { "docid": "31a245ba831f3cbb31a41ee0246a73c3", "score": "0.58094805", "text": "function realhomes_dashboard_edit_property() {\n\t\tglobal $target_property;\n\n\t\tif ( ! empty( $target_property ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "ed3e3d17826f823837b92073d98f7217", "score": "0.58020586", "text": "function valid(){\n\t\treturn isset($this->mixValue[$this->_numPosition]);\n\t}", "title": "" }, { "docid": "132f56275899f2d2da7a570446709506", "score": "0.57957095", "text": "public function isValidValue($value);", "title": "" }, { "docid": "856ace6156a71354ce3cc4ecb94b1080", "score": "0.578632", "text": "public function hasValue(): bool {\n\t\treturn $this->value !== null;\n\t}", "title": "" }, { "docid": "2a2efe2f2648e6ad2ccfd375e202c985", "score": "0.57769436", "text": "public function hasChanged ()\n\t{\n\t\treturn $this->_changed ;\n\t}", "title": "" }, { "docid": "059a9e0c1807688173c8e9be1b0b224a", "score": "0.57736087", "text": "public function valid()\n {\n return $this->key !== false;\n }", "title": "" }, { "docid": "059a9e0c1807688173c8e9be1b0b224a", "score": "0.57736087", "text": "public function valid()\n {\n return $this->key !== false;\n }", "title": "" }, { "docid": "3afa3f56a77166ae2c418b58ab47b4c7", "score": "0.5772728", "text": "public function update()\n {\n return false;\n }", "title": "" }, { "docid": "7ede9aab2b6c209df00164c28d366ca6", "score": "0.5766667", "text": "function set($key,$val) {\n\t\tif ($this->{$key} !== $val) {\n\t\t\t$this->_modified = true;\n\t\t\t$this->{$key} = $val;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7ede9aab2b6c209df00164c28d366ca6", "score": "0.5766667", "text": "function set($key,$val) {\n\t\tif ($this->{$key} !== $val) {\n\t\t\t$this->_modified = true;\n\t\t\t$this->{$key} = $val;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7ede9aab2b6c209df00164c28d366ca6", "score": "0.5766667", "text": "function set($key,$val) {\n\t\tif ($this->{$key} !== $val) {\n\t\t\t$this->_modified = true;\n\t\t\t$this->{$key} = $val;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7ede9aab2b6c209df00164c28d366ca6", "score": "0.5766667", "text": "function set($key,$val) {\n\t\tif ($this->{$key} !== $val) {\n\t\t\t$this->_modified = true;\n\t\t\t$this->{$key} = $val;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2c1561e1981add7137743f43b347ec6c", "score": "0.57574385", "text": "public function isValueNew(string $name): bool\n {\n $retval = false;\n\n if ($this->hasValue($name) && !$this->isHistoryEmpty()) {\n $pos = count($this->data_stack) - 1;\n $retval = !array_key_exists($name, $this->data_stack[$pos]);\n }\n\n return $retval;\n }", "title": "" }, { "docid": "f8f80f17c607bcbaba4e9d640dcb13c9", "score": "0.5756891", "text": "public function isDirty() {return $this->bDirty;}", "title": "" }, { "docid": "55e509c41d47d4ec449a5fbdade4b204", "score": "0.5754751", "text": "function is_valid() : bool { return (bool)$this->data; }", "title": "" }, { "docid": "06502c36de5e2a4701a34095df43a3ac", "score": "0.57529855", "text": "public function isDiffChangeAllowed() {\r\n return true;\r\n }", "title": "" }, { "docid": "06502c36de5e2a4701a34095df43a3ac", "score": "0.57529855", "text": "public function isDiffChangeAllowed() {\r\n return true;\r\n }", "title": "" }, { "docid": "88bb42ef4d2c2a9b86be36d30642e14b", "score": "0.57355684", "text": "public static function shouldNotSaveModelOnSanitizingValueFailure()\n {\n return true;\n }", "title": "" }, { "docid": "4b9704f388bc179b722aa121a211f426", "score": "0.5734053", "text": "protected static function check() {\n return FALSE;\n }", "title": "" }, { "docid": "78c5f5a92bd2b028f403145224563f7e", "score": "0.5730781", "text": "protected static function onBeforeChanged(){\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fe8277a44f13480a74076c56cae598a9", "score": "0.5718979", "text": "public function valid() {\n return !$this->invalid();\n }", "title": "" }, { "docid": "74dc71641a4c452a0c53c0600fdd5903", "score": "0.57156503", "text": "function isChanged()\n {\n return sizeof($this->_changedColumns) > 0;\n }", "title": "" }, { "docid": "6649688dd69149c0f2042ad9b0a0b8c4", "score": "0.5710764", "text": "protected function mayBeEdited() {\n\t\tif (!$this->isFinalized() && $this->userMayGrade()) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "190a1c3f77965146a0b373a0a5ef59f5", "score": "0.57087046", "text": "protected function isUnchanged()\n {\n return !$this->properties['width'] && $this->usesOriginalFile();\n }", "title": "" }, { "docid": "7ded28ac1cdce006d3eb242fad377945", "score": "0.569975", "text": "public function valid()\n\t{\n\t\treturn $this->_key !== false;\n\t}", "title": "" }, { "docid": "0785f8a7b6dec9e183887f0b55a92a67", "score": "0.5695328", "text": "public function validate(){\n\t\t\n\t\tif(empty($this->_validators)){\n\t\t\t$this->_valid = true;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t$valid = false;\n\t\t$newValue = null;\n\t\tforeach ($this->_validators as $validator) {\n\t\t\ttry{\n\t\t\t\t$newGeneratedValue = $validator->valideteValue($this->getVal());\n\t\t\t\tif(!$valid)\n\t\t\t\t\t$newValue = $newGeneratedValue;\n\t\t\t\t$valid = true;\n\t\t\t} catch ( \\OWeb\\types\\UserException $ex){\n\t\t\t\t$valid = $valid || false;\n\t\t\t\t$this->_errMessages[] = $ex->getMessage();\n\t\t\t\t$this->_errDesriptions[] = $ex->getUserDescription();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($valid)\n\t\t\t$this->_trueVal = $newValue;\n\t\telse \n\t\t\t$this->_trueVal = null;\n\t\t\n\t\t$this->_valid = $valid;\n\t\t\n\t\treturn $valid;\n\t}", "title": "" }, { "docid": "d67f5f6ff4efbf939c1a0b3e8fd9d2a8", "score": "0.5693972", "text": "public function valid()\n\t{\n\t\treturn $this->_key!==false;\n\t}", "title": "" }, { "docid": "e024fafa65582bfefe55279de0630f5f", "score": "0.568918", "text": "public function HasChange() {\n return $this->HasChange;\n }", "title": "" }, { "docid": "a5bb009745c9957ac7248d5490ce5f40", "score": "0.56820965", "text": "public function isDiffChangeAllowed() {\n return true;\n }", "title": "" }, { "docid": "d944ea5a0953969cb7456eae6d9d59e7", "score": "0.56695384", "text": "public function canOverwrite();", "title": "" }, { "docid": "99659306db71378f497f8786ad136bcc", "score": "0.56639326", "text": "function is_set($key){ return isset($this->__val[$key]);}", "title": "" }, { "docid": "dab95fa072fb29b948d4bcebdb059e71", "score": "0.5662164", "text": "protected function shouldInvertValue()\n {\n return MBString::strtolower($this->getAttribute()) == MBString::strtolower($this->getOptions()['distribution']);\n }", "title": "" }, { "docid": "8593b19d90100cb98769e4f544517812", "score": "0.5661384", "text": "public function toBeFalse():Bool;", "title": "" }, { "docid": "baddc9e5af1a074b8b67814ea3dd1a0f", "score": "0.5652389", "text": "public function isValid() : bool\n {\n return ! $this->isInvalid();\n }", "title": "" } ]
a5ebd16913edff10d54d51ef9294614a
Get the current child id for the iterator.
[ { "docid": "0ccde152631de02ac0e5d859e59f7242", "score": "0.0", "text": "public function key ( ) {\n\n return key($this->_childs);\n }", "title": "" } ]
[ { "docid": "74fc9d7a71906655ae929d73b6bf735d", "score": "0.7279601", "text": "public function getId()\n {\n return $this->currentId;\n }", "title": "" }, { "docid": "583659668eb0d06224c24e167d23c02b", "score": "0.7237905", "text": "public function getChildId(): int {\n return $this->child_id;\n }", "title": "" }, { "docid": "7f4e4688468bded877d851868422d304", "score": "0.678325", "text": "public function getRelationChildId();", "title": "" }, { "docid": "52ed6bb7a70ee00c1ab317ad260f3d9d", "score": "0.66509646", "text": "public function getRelationChildRealId();", "title": "" }, { "docid": "607f8b3ae7edd783fd4aee2a31ff641e", "score": "0.661865", "text": "protected function getCurrentId()\n {\n return (array_key_exists($this->idfieldName(), $this->data)) ? $this->data[$this->idfieldName()] : NULL;\n }", "title": "" }, { "docid": "8614bc4276454c807f170468f687f6c7", "score": "0.6452925", "text": "final public function getId(){\n\t\tif($this->_id === false){\n\t\t\t$this->_id = $this->getNextId();\n\t\t}\n\t\treturn get_class($this) . \"_\" . $this->_id;\n\t}", "title": "" }, { "docid": "07d7870ba52989544211f3e42bf964bd", "score": "0.6417949", "text": "public function getId() {\n\t\treturn $this->i_id;\n\t}", "title": "" }, { "docid": "35a2f0aef98184cc3688114f1fed5183", "score": "0.64107716", "text": "function getID() {\n\t\treturn $this->iId;\n\t}", "title": "" }, { "docid": "35a2f0aef98184cc3688114f1fed5183", "score": "0.64107716", "text": "function getID() {\n\t\treturn $this->iId;\n\t}", "title": "" }, { "docid": "68604149f76b0530a53434547f406538", "score": "0.63784456", "text": "final protected function parentId() {return $this->r('originalId');}", "title": "" }, { "docid": "b3e64d94251185596c74f355abc54f0b", "score": "0.63759404", "text": "public function getInternalId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "6ad4009e9c509e5ecb4e29a456272f28", "score": "0.6354325", "text": "function current() {\n $k = key($this->ids);\n if($k === NULL) return false;\n if(count($this->ids) == 1) return $this;\n if(!isset($this->_ich[$k])) $this->_ich[$k] = new self($this->doc, array($k=>$this->ids[$k]));\n return $this->_ich[$k];\n }", "title": "" }, { "docid": "43aa72956c1f726146fc424e2df1d450", "score": "0.6336842", "text": "public function get_id()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "50d30a6bfc653d102a2822b442a8d63e", "score": "0.6326344", "text": "function readRootId()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$query = 'SELECT child FROM '.$this->table_tree.' '.\n\t\t\t'WHERE parent = %s '.\n\t\t\t'AND '.$this->tree_pk.' = %s ';\n\t\t$res = $ilDB->queryF($query,array('integer','integer'),array(\n\t\t\t0,\n\t\t\t$this->tree_id));\n\t\t$row = $ilDB->fetchObject($res);\n\t\t$this->root_id = $row->child;\n\t\treturn $this->root_id;\n\t}", "title": "" }, { "docid": "e3027edbc85f7e025793f3dd63e1f9e7", "score": "0.6289846", "text": "public function get_id() {\r\n\t\treturn ($this->id);\r\n\t}", "title": "" }, { "docid": "e3027edbc85f7e025793f3dd63e1f9e7", "score": "0.6289846", "text": "public function get_id() {\r\n\t\treturn ($this->id);\r\n\t}", "title": "" }, { "docid": "67ce6d06ad76e11509caf85b2f3f9396", "score": "0.62891936", "text": "public function getId()\n {\n return $this->id->getId();\n }", "title": "" }, { "docid": "c2ca5cbc2e076572f692f016acdb48c0", "score": "0.6283366", "text": "public function getId() {\n // Fail due to double delete\n assert(!$this->hasBeenDeleted);\n \n // Fail due to unset 'id' field\n assert(isset($this->parentDbFieldTable[self::ID_KEY]));\n \n return $this->parentDbFieldTable[self::ID_KEY]->getValue();\n }", "title": "" }, { "docid": "ee121894698e47a1f2d5e176c067beca", "score": "0.62709856", "text": "public function getId() {\r\n\t\treturn $this->_id;\r\n\t}", "title": "" }, { "docid": "a3ff8c7bf6ff1bc96e6ab880a57ceda0", "score": "0.6270073", "text": "protected function ParentID() {\n\treturn $this->GetFieldValue('ID_Parent');\n }", "title": "" }, { "docid": "a16e7a0c24b5037a1f5779827130ba69", "score": "0.6267648", "text": "public function getID() \n \t{\n \t\treturn $this->_id;\n \t}", "title": "" }, { "docid": "11a1ada35f53fa660805e1cf8eb6a13f", "score": "0.62671137", "text": "public function getId() {\n\t\treturn $this->_id;\n\t}", "title": "" }, { "docid": "32b7e82ce7fdbc045da59e929053b76b", "score": "0.62650937", "text": "public function getID()\n {\n return $this->getKey();\n }", "title": "" }, { "docid": "2d589e92004cb43a4c187b6e5ed23011", "score": "0.6260177", "text": "public function get_id()\n\t{\n\t\treturn $this->_id;\n\t}", "title": "" }, { "docid": "2a9e3082182c0ac6f756a2099cca012c", "score": "0.6253518", "text": "public function pid() {\n if($this->parent_object) {\n return $this->parent_object->pid();\n }\n return $this->ID;\n }", "title": "" }, { "docid": "44cb9d9bd2abd7e359fbf70541ca4053", "score": "0.62511325", "text": "public function get_id() {\n\t\treturn $this->_id;\n\t}", "title": "" }, { "docid": "bb3bfa5cfac4638f712199596ed91d0a", "score": "0.62504876", "text": "public function getId() {\n if($this->items!==false)\n return @current($this->items)->id_str;\n return false;\n }", "title": "" }, { "docid": "606da5efe92081330a38916075da37ed", "score": "0.6249011", "text": "public function getIdParent()\n {\n return $this->id_parent;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "4d38414282a88bf6dc4e1d6693cf3112", "score": "0.624809", "text": "public function getId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "55c3d2cd1cde92bfdd49efa079ef1bf8", "score": "0.6246317", "text": "public function getId()\r\n\t\t{\r\n\t\t\treturn $this->_id;\r\n\t\t}", "title": "" }, { "docid": "c0b215c0fe1c33ee7ed69e1c7f6a1e10", "score": "0.6239087", "text": "public function getId()\n\t{\n\t\treturn $this->_id;\n\t}", "title": "" }, { "docid": "c0b215c0fe1c33ee7ed69e1c7f6a1e10", "score": "0.6239087", "text": "public function getId()\n\t{\n\t\treturn $this->_id;\n\t}", "title": "" }, { "docid": "d4347629d7c66b3cf80394741547c922", "score": "0.6229683", "text": "public function getId()\n\t\t{\n\t\t\treturn $this->_id;\n\t\t}", "title": "" }, { "docid": "72442e96d0bbe2d5d9e1f225408e4239", "score": "0.6228117", "text": "protected function getID() {\n return $this->id;\n }", "title": "" }, { "docid": "f48b595fee14da2ede9557eb9c777543", "score": "0.62239814", "text": "public function getID() {\n\t\treturn $this->_id;\n\t}", "title": "" }, { "docid": "e584041ec353031e5629e133ef6ffc67", "score": "0.6217243", "text": "public function getID()\n\t{\n\t\treturn $this->_id;\n\t}", "title": "" }, { "docid": "0e2d18d7b42cbf31496e68480f2ebe55", "score": "0.62126863", "text": "public function getID() \n\t{\n\t\treturn $this->_id;\n\t}", "title": "" }, { "docid": "569668d5dce9700e3d7f52c757a211a2", "score": "0.62113595", "text": "function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}", "title": "" }, { "docid": "90a102d3d5e5e64be36e53882ce5d0fb", "score": "0.6210574", "text": "function getId() {\n\t\treturn $this->_id;\n\t}", "title": "" }, { "docid": "fd89cf61f4dd11ec8515247636562403", "score": "0.62056446", "text": "public function getParentID()\n {\n return $this->parent_id;\n }", "title": "" }, { "docid": "0a952ee00e5630801f73948bac7c8558", "score": "0.6203334", "text": "public function get_id () {\r\n\t\treturn $this->id;\r\n\t}", "title": "" }, { "docid": "95d1c5b7ec89bb258b2114ade32aaa68", "score": "0.6193782", "text": "function getId() {\r\n\t\treturn $this->_id;\r\n\t}", "title": "" }, { "docid": "95d1c5b7ec89bb258b2114ade32aaa68", "score": "0.6193782", "text": "function getId() {\r\n\t\treturn $this->_id;\r\n\t}", "title": "" }, { "docid": "a23c87edae7ccd2ba0583d0281d5a387", "score": "0.6193429", "text": "private function GetID()\n\t\t{\n\t\t\treturn $this->id;\n\t\t}", "title": "" }, { "docid": "1b7db3508afeb5e03f6ab7738e442e69", "score": "0.6190369", "text": "private function get_id()\n\t{\n\t\treturn $this->m_id;\n\t}", "title": "" }, { "docid": "1b7db3508afeb5e03f6ab7738e442e69", "score": "0.6190369", "text": "private function get_id()\n\t{\n\t\treturn $this->m_id;\n\t}", "title": "" }, { "docid": "1b7db3508afeb5e03f6ab7738e442e69", "score": "0.6190369", "text": "private function get_id()\n\t{\n\t\treturn $this->m_id;\n\t}", "title": "" }, { "docid": "bd999bb1c08f773ccca3b86dc9f21255", "score": "0.6189064", "text": "public function getParentId()\n {\n return $this->parent_id;\n }", "title": "" }, { "docid": "bd999bb1c08f773ccca3b86dc9f21255", "score": "0.6189064", "text": "public function getParentId()\n {\n return $this->parent_id;\n }", "title": "" }, { "docid": "f3d91e079aa35765c3ebda1374fd8373", "score": "0.6187927", "text": "public function getId()\r\n {\r\n return $this->_id;\r\n }", "title": "" }, { "docid": "936e3e157e753b6591d4d920d9aa3ae2", "score": "0.61870724", "text": "public function id()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "936e3e157e753b6591d4d920d9aa3ae2", "score": "0.61870724", "text": "public function id()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "936e3e157e753b6591d4d920d9aa3ae2", "score": "0.61870724", "text": "public function id()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "b96e0a1ec08241090825695746e56123", "score": "0.6178286", "text": "public function getId()\n {\n return $this->_Id;\n }", "title": "" }, { "docid": "b96e0a1ec08241090825695746e56123", "score": "0.6178286", "text": "public function getId()\n {\n return $this->_Id;\n }", "title": "" }, { "docid": "119e3b80abeade94d579d16caa44af63", "score": "0.61610556", "text": "public function getId() {\n return $this->_id;\n }", "title": "" }, { "docid": "119e3b80abeade94d579d16caa44af63", "score": "0.61610556", "text": "public function getId() {\n return $this->_id;\n }", "title": "" }, { "docid": "119e3b80abeade94d579d16caa44af63", "score": "0.61610556", "text": "public function getId() {\n return $this->_id;\n }", "title": "" }, { "docid": "f6e33cfc65dd9d1d36a3dd95bf2c563d", "score": "0.6159383", "text": "public function getID()\n {\n return $this->id;\n }", "title": "" }, { "docid": "f6e33cfc65dd9d1d36a3dd95bf2c563d", "score": "0.6159383", "text": "public function getID()\n {\n return $this->id;\n }", "title": "" }, { "docid": "ee0a2320eb914b7d4fc2d1fb60345f63", "score": "0.6158819", "text": "function getID() {\n\t\treturn $this->id;\n\t}", "title": "" }, { "docid": "039a747f2e93a0d91b0d763e4af9f2f9", "score": "0.61573154", "text": "public function getID()\n {\n return $this->iD;\n }", "title": "" }, { "docid": "039a747f2e93a0d91b0d763e4af9f2f9", "score": "0.61573154", "text": "public function getID()\n {\n return $this->iD;\n }", "title": "" }, { "docid": "039a747f2e93a0d91b0d763e4af9f2f9", "score": "0.61573154", "text": "public function getID()\n {\n return $this->iD;\n }", "title": "" }, { "docid": "039a747f2e93a0d91b0d763e4af9f2f9", "score": "0.61573154", "text": "public function getID()\n {\n return $this->iD;\n }", "title": "" }, { "docid": "039a747f2e93a0d91b0d763e4af9f2f9", "score": "0.61573154", "text": "public function getID()\n {\n return $this->iD;\n }", "title": "" }, { "docid": "039a747f2e93a0d91b0d763e4af9f2f9", "score": "0.61573154", "text": "public function getID()\n {\n return $this->iD;\n }", "title": "" }, { "docid": "039a747f2e93a0d91b0d763e4af9f2f9", "score": "0.61573154", "text": "public function getID()\n {\n return $this->iD;\n }", "title": "" }, { "docid": "039a747f2e93a0d91b0d763e4af9f2f9", "score": "0.61573154", "text": "public function getID()\n {\n return $this->iD;\n }", "title": "" }, { "docid": "039a747f2e93a0d91b0d763e4af9f2f9", "score": "0.61573154", "text": "public function getID()\n {\n return $this->iD;\n }", "title": "" }, { "docid": "039a747f2e93a0d91b0d763e4af9f2f9", "score": "0.61573154", "text": "public function getID()\n {\n return $this->iD;\n }", "title": "" }, { "docid": "ca662a48b5b5d8fa144b9a3d6ab142d4", "score": "0.61569864", "text": "public function getIdParent() \n\t{\n\t\treturn $this->idParent;\n\t}", "title": "" }, { "docid": "0c078f88213884fda1155a44f5a141f7", "score": "0.61558414", "text": "public function GetID () \r\n\t{\r\n\t\treturn ($this->ID);\r\n\t}", "title": "" }, { "docid": "197785071a3735bba8496b212e1ee08c", "score": "0.6152164", "text": "public function getParentId()\n {\n return $this->parentId;\n }", "title": "" }, { "docid": "197785071a3735bba8496b212e1ee08c", "score": "0.6152164", "text": "public function getParentId()\n {\n return $this->parentId;\n }", "title": "" }, { "docid": "b42ce4e6cd4106664af8a2861bef2cda", "score": "0.61501426", "text": "public function id()\n\t{\n\t\treturn $this->_id;\n\t}", "title": "" }, { "docid": "ee0d89d2a210d79f91ab6e0f7705d9be", "score": "0.6140239", "text": "public function get_id()\n {\n return $this->id;\n }", "title": "" }, { "docid": "ee0d89d2a210d79f91ab6e0f7705d9be", "score": "0.6140239", "text": "public function get_id()\n {\n return $this->id;\n }", "title": "" }, { "docid": "ee0d89d2a210d79f91ab6e0f7705d9be", "score": "0.6140239", "text": "public function get_id()\n {\n return $this->id;\n }", "title": "" }, { "docid": "c6e4b2e5de8e38de316f9b2973963edf", "score": "0.6134011", "text": "private function get_current_id() {\n\n\t\tstatic $id = null;\n\n\t\treturn $id ?: $id = \\get_queried_object_id();\n\t}", "title": "" }, { "docid": "709060a36e3eb2259e79cf7c142647be", "score": "0.6129698", "text": "public function get_id()\n\t{\n\t\treturn $this->id;\n\t}", "title": "" }, { "docid": "709060a36e3eb2259e79cf7c142647be", "score": "0.6129698", "text": "public function get_id()\n\t{\n\t\treturn $this->id;\n\t}", "title": "" }, { "docid": "709060a36e3eb2259e79cf7c142647be", "score": "0.6129698", "text": "public function get_id()\n\t{\n\t\treturn $this->id;\n\t}", "title": "" }, { "docid": "c09436cb6c2e8fbe514fe99d01f72731", "score": "0.6125852", "text": "public function getId()\n {\n return isset($this->id) ? $this->id : 0;\n }", "title": "" } ]
3fd672c2884bedf216c7857a11117b7a
Sets the isInteractive Indicates whether a user sign in is interactive. In interactive sign in, the user provides an authentication factor to Azure AD. These factors include passwords, responses to MFA challenges, biometric factors, or QR codes that a user provides to Azure AD or an associated app. In noninteractive sign in, the user doesn't provide an authentication factor. Instead, the client app uses a token or code to authenticate or access a resource on behalf of a user. Noninteractive sign ins are commonly used for a client to sign in on a user's behalf in a process transparent to the user.
[ { "docid": "68b2d40feff6ac1725fd668da38ebd96", "score": "0.50884795", "text": "public function setIsInteractive($val)\n {\n $this->_propDict[\"isInteractive\"] = boolval($val);\n return $this;\n }", "title": "" } ]
[ { "docid": "92b4e341b22fe980d8806e0eada3c278", "score": "0.5916224", "text": "public function onSecurityInteractiveLogin(InteractiveLoginEvent $event)\r\n {\r\n $user = $event->getAuthenticationToken()->getUser();\r\n\r\n if( count($user->getAssos()) > 1 )\r\n {\r\n /** @todo Handle multiple assos */\r\n throw new \\LogicException('Case not handled yet');\r\n }\r\n\r\n $this->Asso = $user->getAssos()->first();\r\n $this->_setAssoId( $this->Asso->getId() );\r\n }", "title": "" }, { "docid": "94155044ddd33479195cba8b33af4b28", "score": "0.5798915", "text": "public function onSecurityInteractiveLogin(InteractiveLoginEvent $event)\n {\n $user = $event->getAuthenticationToken()->getUser();\n\n if ($user instanceof User)\n {\n // Let handler do its job\n $eventHandler = new LoginEventHandler($user, $this->em, new DateTimeHandler());\n $eventHandler->handleEvent();\n }\n }", "title": "" }, { "docid": "b93bed6e8760837b38a78bf73c234657", "score": "0.53786474", "text": "public function setInteractive(bool $interactive): void\n {\n $this->getInput()->setInteractive($interactive);\n }", "title": "" }, { "docid": "e542fc4fd21d891cf7fd03b554e03fad", "score": "0.527312", "text": "public function onSecurityInteractiveLogin(InteractiveLoginEvent $event)\n {\n $user = $event->getAuthenticationToken()->getUser();\n\n // Update your field here.\n $user->setLastLogin(new \\DateTime());\n $user->setLastIP($this->getIp());\n\n $paiement = $user->getPaiementType();\n $date = $user->getPaiementDate();\n $dateNow = new \\Datetime();\n\n if($paiement == \"month\"){\n if($dateNow > $date->add(new DateInterval('P1M'))){\n $user->setIsActive(false);\n $user->setPaiementStatus(false);\n }\n }\n elseif($paiement == \"year\"){\n if($dateNow > $date->add(new DateInterval('P1Y'))){\n $user->setIsActive(false);\n $user->setPaiementStatus(false);\n }\n }\n elseif($paiement == \"due\" && $dateNow > $date->add(new DateInterval('P14D'))){\n $user->setIsActive(false);\n $user->setPaiementStatus(false);\n }\n\n // Persist the data to database.\n $this->em->persist($user);\n $this->em->flush();\n }", "title": "" }, { "docid": "04b0b524b839901bffc5f1a16ebf6cec", "score": "0.5217571", "text": "public function onInteractiveLogin(InteractiveLoginEvent $event) {\n $user = $event->getAuthenticationToken()->getUser();\n $request = $event->getRequest();\n\n $login_locale = $request->request->get('_locale');\n $saved_locale = $user->getLocale();\n\n//update user setting if required\n if ($login_locale !== $saved_locale) {\n $user->setLocale($login_locale);\n }\n \n $this->session->set('_locale', $login_locale);\n\n }", "title": "" }, { "docid": "223db60bedcb27dad3f1c1fc34c1a437", "score": "0.5168626", "text": "public function getIsInteractive()\n {\n if (array_key_exists(\"isInteractive\", $this->_propDict)) {\n return $this->_propDict[\"isInteractive\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "36eb6972c3d5990a3e64385ed5d06f0e", "score": "0.5008523", "text": "public function setAuthenticated(bool $authenticated): IIdentity;", "title": "" }, { "docid": "2d630b53afcb7ac07a77656fdf996f2d", "score": "0.5000821", "text": "public function onInteractiveLogin(InteractiveLoginEvent $event): void\n {\n $user = $event->getAuthenticationToken()->getUser();\n\n if ($user instanceof LanguageInterface && null !== $user->getLanguage()) {\n $this->session->set('_locale', strtolower($user->getLanguage()));\n }\n }", "title": "" }, { "docid": "a684407e773a37d87ea5b96070e756ff", "score": "0.49445766", "text": "public function setAuthenticated()\n\t{\n\t\t$this->state = Identity::AUTHENTICATED;\n\t}", "title": "" }, { "docid": "27e2d76052d9b8efc0a49c5e0c0947a6", "score": "0.4901712", "text": "private function authorise_user(){\n\t\tglobal $pagenow;\n\t\t$this->long_lived_access_token = $this->get_ig_option( 'instagram_long_lived_token' );\n\t\tif ( is_admin() && $pagenow === 'admin.php' && $_GET[ 'page' ] === 'acf-options-global-options' ) { // long lived token can only be generated in the admin panel. \n\t\t\tif( !$this->is_valid_long_lived() && isset( $_GET[ 'igcode' ] ) ){\n\t\t\t\tif( !empty( $_GET[ 'igcode' ] ) ){\n\t\t\t\t\t$this->authentication_code = explode( '#', $_GET['igcode'] )[ 0 ]; //Step 1. Gets the authentication code from Get request. \n\t\t\t\t\t$this->short_lived_access_token = $this->get_short_lived_token(); //Step 2. Retrieves a short lived token. Valid for 1 hour. \n\t\t\t\t\t$this->long_lived_access_token = $this->get_long_lived_token(); //Step 3. Exchanges the short lived token for long lived token. Adds it to wp_options. \n\t\t\t\t\t$this->user_id = $this->get_users_id(); \t\t\t\t\t//Step 4. Gets the numerical user ID using long lived token.\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$this->user_id \t\t\t = $this->get_users_id();\n\t\t}\n\t}", "title": "" }, { "docid": "90ed0a0c599a1f1e7e89b613f83a34b7", "score": "0.47363234", "text": "public function getInteractive();", "title": "" }, { "docid": "4a6ae2ef46915b6f2d501de699f89f45", "score": "0.47272092", "text": "protected function is_authentificate()\n {\n if(!empty(Yii::app()->user->id) && $this->IssetUser(Yii::app()->user->id)) {\n return Yii::app()->user->id;\n } else {\n echo json_encode(array('response' => array('error'=>array('error_code'=>1,'error_msg'=>Errors::NOT_AUTHORIZED)))); exit;\n }\n }", "title": "" }, { "docid": "63ba5d809a977ac269407e11855f50bd", "score": "0.4701775", "text": "public function setLastNonInteractiveSignInDateTime($val)\n {\n $this->_propDict[\"lastNonInteractiveSignInDateTime\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "50d7f32b349f08f0b4bcc9c7593da97d", "score": "0.46881154", "text": "public function setInvited($isInvited)\n {\n $this->isInvited = $isInvited;\n }", "title": "" }, { "docid": "f5fbfa7936b081fd1294cd594f966367", "score": "0.46767366", "text": "public function setIsIntegral($isIntegral)\n {\n $this->isIntegral = $isIntegral;\n\n return $this;\n }", "title": "" }, { "docid": "b9c90e86ae49adfbad76957a05dc00ad", "score": "0.46633232", "text": "public function isInteractive() : bool\n {\n return false;\n }", "title": "" }, { "docid": "12d1b5645c6aae5bc2d77171e0b4d8ac", "score": "0.46180502", "text": "public function setLastNonInteractiveSignInRequestId($val)\n {\n $this->_propDict[\"lastNonInteractiveSignInRequestId\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "5394c6d967ead2849d8c7d54bcf897ab", "score": "0.45946917", "text": "public function authenticate(ClientInterface $client): void\n {\n if ($this->cookie !== '' || $this->isAuthenticating) {\n return;\n }\n\n $this->isAuthenticating = true;\n $response = $client->request('POST', '/user/login', [\n 'login' => $this->username,\n 'password' => $this->password,\n ]);\n $this->isAuthenticating = false;\n\n if ($response->isStatusCode(200)) {\n $this->cookie = $response->cookie();\n }\n }", "title": "" }, { "docid": "dcb3cbbd1fb621a97582a116cfec0fbe", "score": "0.45883074", "text": "public function canSignIn()\n {\n return $this->status == self::STATUS_ACTIVE;\n }", "title": "" }, { "docid": "fcb0f60245c31fad637443aee6f263e0", "score": "0.45219222", "text": "public function authenticate(RequestInterface $request): IdentityInterface|false|null;", "title": "" }, { "docid": "be584ee709022acb3fc56b268ca94d21", "score": "0.45132172", "text": "public function testAuthenticationWithInactiveUser()\n {\n $response = $this->isAuthenticated('InactiveUser', 'password');\n \n //identity was not set\n $this->assertFalse(\n $response,\n '\"authentication\" should not be granted' \n );\n }", "title": "" }, { "docid": "e68daa2cb5c8db57f44246af32506194", "score": "0.44867843", "text": "public function recordSuccessfulLogin(InteractiveLoginEvent $event)\n {\n $login = new Login;\n $login->setSuccessful(true);\n $login->setIp($event->getRequest()->getClientIp());\n $login->setUser($event->getAuthenticationToken()->getUser());\n\n $this->entityManager->persist($login);\n $this->entityManager->flush();\n }", "title": "" }, { "docid": "feafa03537da93315b25fd3e6476f318", "score": "0.44798648", "text": "public function set_is_authorization($boolean) {\n $this->is_authorization = $boolean;\n }", "title": "" }, { "docid": "e7849df9b912f8ddc90baad6cf680779", "score": "0.44701344", "text": "private function maybe_authenticate_user() {\n\t\tif ($this->is_authenticated()) return;\n\t\tif ($this->interactive) {\n\t\t\t$this->authenticate_user();\n\t\t} else {\n\t\t\tthrow new FitbitNeedsAuth(\"Fitbit for user $this->user_id not authenticated\");\n\t\t}\n\t}", "title": "" }, { "docid": "e91f7f80656585c002071ab8af71fb7c", "score": "0.44634965", "text": "public function isInteractive(): bool\n {\n return (bool)$this->getInput()->isInteractive();\n }", "title": "" }, { "docid": "61cf86689db19c1e1621d89ea93f917f", "score": "0.4417432", "text": "private function isUserInAuth(){\n\t\t$auth = new AuthenticationService();\n\t if ($auth->hasIdentity()) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t }", "title": "" }, { "docid": "7925ca7f67c9360c998b1e607eb0419f", "score": "0.43908185", "text": "public static function isAuthenticUser()\n {\n \n }", "title": "" }, { "docid": "569bcde1f8e715bff7be406cb8a9eb04", "score": "0.43750882", "text": "public function user_is_authenticated()\n {\n return $this->get_user_id() !== NULL;\n }", "title": "" }, { "docid": "d62c5a3ace72510caa828d0fab868af7", "score": "0.43687344", "text": "public function is_authenticated();", "title": "" }, { "docid": "cbda16e5f71a623535cc492f738d1376", "score": "0.43646866", "text": "protected function authenticated(array $identification, array $suggestions = [])\n {\n $user = User::where($identification)->first();\n\n // If a user with these attributes already exists, then we will log them\n // in by generating an access token. Otherwise, we will generate a\n // unique token for these attributes and add it to the response, along\n // with the suggested account information.\n if ($user) {\n $accessToken = $this->bus->dispatch(new GenerateAccessToken($user->id));\n\n $payload = ['authenticated' => true];\n } else {\n $token = AuthToken::generate($identification);\n $token->save();\n\n $payload = array_merge($identification, $suggestions, ['token' => $token->id]);\n }\n\n $content = sprintf('<script>\nwindow.opener.app.authenticationComplete(%s);\nwindow.close();\n</script>', json_encode($payload));\n\n $response = new HtmlResponse($content);\n\n if (isset($accessToken)) {\n // Extend the token's expiry to 2 weeks so that we can set a\n // remember cookie\n $accessToken::unguard();\n $accessToken->update(['expires_at' => new DateTime('+2 weeks')]);\n\n $response = $this->withRememberCookie($response, $accessToken->id);\n }\n\n return $response;\n }", "title": "" }, { "docid": "b49309ffb8ed0aa0cd58cf3c62b29f47", "score": "0.4360318", "text": "public function beginAuthentication(AuthenticationContextInterface $context): bool;", "title": "" }, { "docid": "f3f4b2388bf3b3b1f945b6eeef64d8de", "score": "0.435765", "text": "public function isClientIdentifiable();", "title": "" }, { "docid": "b9321380385fe1eb631cf0dd0295515e", "score": "0.43292236", "text": "public function setToAuthenticated()\r\n\t{\r\n\t\t$this->role = 'authenticated';\r\n\t}", "title": "" }, { "docid": "eeb0240d79b69bd4fb5c558852275241", "score": "0.43215245", "text": "function log_in_as() {\n\t\tsleep( 1 );\n\n\t\t// attempt to sign in.\n\t\t$user = wp_signon();\n\n\t\t// flush the buffer (it's fun to say).\n\t\tob_end_clean();\n\n\t\t// if successful, send Dashboard url to JS for redirecting.\n\t\tif ( ! is_wp_error( $user ) ) {\n\t\t\t$redirect = admin_url();\n\n\t\t\t$interim = isset( $_POST['interim'] ) ? intval( $_POST['interim'] ) : 0;\n\t\t\t$user_id = isset( $_POST['user_id'] ) ? absint( $_POST['user_id'] ) : 0;\n\n\t\t\tif ( 1 === $interim ) {\n\t\t\t\t$redirect = add_query_arg( array(\n\t\t\t\t\t'action' => 'login',\n\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t'customize-login' => '1',\n\t\t\t\t\t'interim-login' => '1',\n\t\t\t\t), wp_login_url() );\n\t\t\t}\n\t\t\twp_send_json_success( $redirect );\n\n\t\t} else { // otherwise, send error message.\n\t\t\twp_send_json_error( $user->get_error_message() );\n\t\t}\n\t}", "title": "" }, { "docid": "42f3219ebad7ca6c40614285e2159700", "score": "0.43140736", "text": "public function getLastNonInteractiveSignInDateTime()\n {\n if (array_key_exists(\"lastNonInteractiveSignInDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastNonInteractiveSignInDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastNonInteractiveSignInDateTime\"])) {\n return $this->_propDict[\"lastNonInteractiveSignInDateTime\"];\n } else {\n $this->_propDict[\"lastNonInteractiveSignInDateTime\"] = new \\DateTime($this->_propDict[\"lastNonInteractiveSignInDateTime\"]);\n return $this->_propDict[\"lastNonInteractiveSignInDateTime\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "44ad3e246c2883d7dcda7cc64e053688", "score": "0.43124884", "text": "public function isInteractive(): bool\n {\n return OS::isInteractive($this->stream);\n }", "title": "" }, { "docid": "38e3f9ac043536b500bb35b8b5151c99", "score": "0.4273111", "text": "public function authenticate(ClientInterface $client)\n {\n $attributes = $client->getUserAttributes();\n $provider = $client->getId();\n $clientId = $attributes['id'];\n\n $account = UserAccount::find()->where([\n 'provider' => $provider,\n 'client_id' => $clientId\n ])->one();\n\n if ($account === null) {\n $account = \\Yii::createObject([\n 'class' => UserAccount::className(),\n 'provider' => $provider,\n 'client_id' => $clientId,\n 'data' => json_encode($attributes),\n 'created_at' => time()\n ]);\n $account->save(false);\n }\n\n if (null === ($user = $account->user)) {\n $this->action->successUrl = Url::to(['/site/connect', 'account_id' => $account->id]);\n } else {\n \\Yii::$app->user->login($user, 1209600); // two weeks\n }\n }", "title": "" }, { "docid": "ab58e06a9b13ce712174137899174a42", "score": "0.42718738", "text": "public static function signIn() {\n\t\t\t// post, remember-me should be handled by tenant login page \n\t\t\t// in saas app, jwt by ?\n\t\t\tif(self::processPostSignIn()) return true;\n\t\t\tif(self::processJWTSignIn()) return true;\n\t\t\tif(self::processRememberMeSignIn()) return true;\n\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "c1fb3ca32b5ed7fc7ea9fbbc154b3a66", "score": "0.4253027", "text": "function ImpersonateCurrentSessionWith($uid)\n {\n \n $tmp_SESSION = $_SESSION;\n \n $user = $GLOBALS['User']->GetUser($uid);\n \n if (is_array($user))\n {\n foreach ($user as $key => $prop)\n {\n $_SESSION[$key] = $prop;\n }\n \n // now save the true identity\n $_SESSION['impersonate'] = 1;\n $_SESSION['true_identity'] = $tmp_SESSION;\n }\n else\n {\n return false;\n } \n \n return true;\n \n }", "title": "" }, { "docid": "5568e0b410101b43ddd8fb3e72478bb5", "score": "0.4252326", "text": "public function isAuthoritative() {\n return $this->testBoolean(AppKitIAuthProvider::AUTH_AUTHORITATIVE);\n }", "title": "" }, { "docid": "7025e19c06402e4cb4c4a472596a70e4", "score": "0.42485148", "text": "public function setUserIdentity($userIdentity);", "title": "" }, { "docid": "0ffa86f0e1d0082f8fb7a6366a33db7a", "score": "0.42484158", "text": "private function setLoginFlag()\n {\n if ($this->m_userId != \n $this->m_cConfig->m_config[\"session\"][\"defaultuserid\"][\"xmlValue\"]) {\n $this->m_isLogin = true;\n }\n else {\n $this->m_isLogin = false;\n }\n }", "title": "" }, { "docid": "dc4de906d59c4d6a93d81220a97e4611", "score": "0.42469984", "text": "public function authenticateIdentity() {\n $this->_identity = new UserIdentity($this->email, $this->password, $this->urole);\n return $this->_identity->authenticateUser();\n }", "title": "" }, { "docid": "e41d07b9dfbf59f1cb138f46bb7b561f", "score": "0.42385715", "text": "public function isAuthenticated()\n\t{\n\t\treturn $this->state === Identity::AUTHENTICATED;\n\t}", "title": "" }, { "docid": "dcee81ccaf05da2776ed1409e33c3499", "score": "0.42365742", "text": "private function forceAuthenticate() {\n\t\t$em = $this->getContainer()->get(\"doctrine\")->getManager();\n\t\t$user = $em->getRepository('Seriel\\UserBundle\\Entity\\User')->find(1);\n\n\t\t$token = new AnonymousToken($user->getId(), $user);\n\t\tSymfonyUtils::getTokenStorage()->setToken($token);\n\t}", "title": "" }, { "docid": "20675f49a4ffed5cae331cdb7446b9c7", "score": "0.4234098", "text": "function setRequiresAuthentication( $bool ) {\r\n\t\t\tif ( $bool == true ) {\r\n\t\t\t\t$this->__requiresAuthentication = true;\r\n\t\t\t} else {\r\n\t\t\t\t$this->__requiresAuthentication = false;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "a753247bfb1c1840fde0da72855bc264", "score": "0.42242187", "text": "public function customerLoggedIn()\n {\n return (bool)$this->httpContext->getValue(\\Magento\\Customer\\Model\\Context::CONTEXT_AUTH);\n }", "title": "" }, { "docid": "ae6cd6a45b4a66116c6220e2f5dcd48e", "score": "0.42225716", "text": "public function indentification() {\n $indenficated = $this->app->getStore()\n ->getManager()\n ->getRepository('SyntarsusBundle:SecurityUser')\n ->findOneBy(array(\n 'username' => $this->username,\n 'state' => true\n ));\n $this->user = $indenficated;\n return ($indenficated) ? true : false;\n }", "title": "" }, { "docid": "28d3c9fbb900a3372fde46dc55542903", "score": "0.41979104", "text": "public function getLastNonInteractiveSignInRequestId()\n {\n if (array_key_exists(\"lastNonInteractiveSignInRequestId\", $this->_propDict)) {\n return $this->_propDict[\"lastNonInteractiveSignInRequestId\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "727927e30f4fbfd46174ed1864d24d32", "score": "0.41929293", "text": "protected function _showLoggedin()\n\t{\n\t\t/**\n\t\t * retrieve user instance\n\t\t */\n\t\t$user = Zend_Auth::getInstance()->getIdentity();\n\t\tif ($user !== NULL &&\n\t\t\t$user instanceof Default_Model_Entity) {\n\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "63a201e0ef99312f2b067310b3d439fb", "score": "0.41888836", "text": "protected function canInitiateLogin()\n {\n return true;\n }", "title": "" }, { "docid": "424f1297667a4d5a9d91896a40491435", "score": "0.41881204", "text": "function authorise()\n\t{\n\t\t// Check if the user is signed in\n\t\t$user_id = $this->session->userdata('user_id');\n\t\tif ($user_id == FALSE)\n\t\t{\n\t\t\t$this->session->set_userdata('sign_in_redirect', array('oauth', 'authorise'));\n\t\t\tredirect(site_url(array('oauth', 'sign_in')), 'location');\n\t\t}\n\t\t\n\t\t// Check the client params are stored\n\t\t$client = $this->session->userdata('client_details');\n\t\tif ($client == FALSE)\n\t\t{\n\t\t\t$this->_fail('[OAuth user error: invalid_request] No client details have been saved. Have you deleted your cookies?', TRUE);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// The GET parameters\n\t\t$params = $this->session->userdata('params');\n\t\tif ($params == FALSE)\n\t\t{\n\t\t\t$this->_fail('[OAuth user error: invalid_request] No OAuth parameters have been saved. Have you deleted your cookies?', TRUE);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// If the user is signed in and the they have approved the application\n\t\t// Then generate a new auth code and redirect the user back to the application\n\t\t$authorised = $this->oauth_auth_server->access_token_exists($user_id, $client->client_id);\n\t\tif ($authorised)\n\t\t{\n\t\t\tif ($params['response_type'] == 'token') // user agent flow\n\t\t\t{\n\t\t\t\t$this->fast_token_redirect($client->client_id, $user_id, $params['redirect_uri'], $params['scope'], $params['state']);\n\t\t\t}\n\t\t\telse // web server flow\n\t\t\t{\n\t\t\t\t$this->fast_code_redirect($client->client_id, $user_id, $params['redirect_uri'], $params['scope'], $params['state']);\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t// If the user is already signed in and the app has the flag 'auto_approve'\n\t\t// Then generate a new auth code and redirect the user back to the application\n\t\telseif ($user_id && $client->auto_approve == 1)\n\t\t{\t\t\t\n\t\t\tif ($params['response_type'] == 'token') // user agent flow\n\t\t\t{\n\t\t\t\t$this->fast_token_redirect($client->client_id, $user_id, $params['redirect_uri'], $params['scope'], $params['state']);\n\t\t\t}\n\t\t\telse // web server flow\n\t\t\t{\n\t\t\t\t$this->fast_code_redirect($client->client_id, $user_id, $params['redirect_uri'], $params['scope'], $params['state']);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If we've not redirected already we need to show the user the approval form\n\t\t\n\t\t// Has the user clicked the authorise button\n\t\t$doauth = $this->input->post('doauth');\n\t\t\n\t\tif ($doauth)\n\t\t{\t\t\n\t\t\tswitch($doauth)\n\t\t\t{\n\t\t\t\t// The user has approved the application.\n\t\t\t\t// Generate a new auth code and redirect the user back to the application\n\t\t\t\tcase \"Approve\":\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t$code = $this->oauth_auth_server->new_auth_code($client->client_id, $user_id, $params['redirect_uri'], $params['scope']);\n\t\t\t\t\t$redirect_uri = $this->oauth_auth_server->redirect_uri($params['redirect_uri'], array('code='.$code.'&state='.$params['state']));\t\t\t\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// The user has denied the application\n\t\t\t\t// Do a low redirect back to the application with the error\n\t\t\t\tcase \"Deny\":\n\t\t\t\t\n\t\t\t\t\t// Append the error code\n\t\t\t\t\t$redirect_uri = $this->oauth_auth_server->redirect_uri($params['redirect_uri'], array('error=access_denied&error_description=The+authorization+server+does+not+support+obtaining+an+authorization+code+using+this+method&state='.$params['state']));\t\t\t\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Redirect back to app\n\t\t\t$this->session->unset_userdata(array('params'=>'','client_details'=>'', 'sign_in_redirect'=>''));\n\t\t\t$this->load->view('oauth_auth_server2/redirect', array('redirect_uri'=>$redirect_uri, 'client_name'=>$client->name));\n\t\t}\n\t\t\n\t\t// The user hasn't approved the application before and it's not an internal application\n\t\telse\n\t\t{\n\t\t\t$vars = array(\n\t\t\t\t'client_name' => $client->name\n\t\t\t);\n\t\t\t\n\t\t\t$this->load->view('oauth_auth_server2/authorise', $vars);\n\t\t}\n\t}", "title": "" }, { "docid": "287da2ad894bfb8cb048bcd4f8878c59", "score": "0.41870508", "text": "public function setIsIce($var)\n {\n GPBUtil::checkBool($var);\n $this->isIce = $var;\n\n return $this;\n }", "title": "" }, { "docid": "b7df98274fc782a26729ced4fe32869f", "score": "0.4181058", "text": "protected function canAuthenticateUser()\n {\n return $this->clientId && $this->clientSecret\n && $this->redirectUri && $this->accessTokenUri;\n }", "title": "" }, { "docid": "06a2cc956916f7d914daeac38d1f6410", "score": "0.4178302", "text": "public function is_signed_in(){\n\t\t\treturn $this->signed_in;\n\t\t}", "title": "" }, { "docid": "5d4a0d0062967a8f6d98a323bee7e6a4", "score": "0.4176454", "text": "public function authenticateUser($identity, $credential, $requireEmailConfirmation = false);", "title": "" }, { "docid": "9e8653d11368d079a1a99c9b421ad851", "score": "0.41674292", "text": "public function authenticate(ServerRequestInterface $request): ResultInterface\n {\n // ローカル開発モードのときのみ Swagger によるアクセスを許可するため\n // ローカル開発モードのとき以外は、ユーザー情報なしで返却する\n if (filter_var(env('SERVER', false))) {\n return new Result(null, Result::FAILURE_OTHER, ['Not support Swagger.']);\n }\n\n $user = $request->getHeaderLine('x-api-user-local');\n if (!$user) {\n return new Result(null, Result::FAILURE_CREDENTIALS_MISSING);\n }\n\n return new Result(json_decode($user, true), Result::SUCCESS);\n }", "title": "" }, { "docid": "cd395915c8b30107e97a98c07a97094e", "score": "0.4166658", "text": "function Example_init_interactiveinit()\n{\n // We start the interactive installation process now.\n // This function is called automatically if present.\n // In this case we simply show a welcome screen.\n\n // Check permissions\n if (!pnSecAuthAction(0, '::', '::', ACCESS_ADMIN)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n\n // prepare the output\n $pnr =& new pnRender('Example');\n $pnr->caching = false;\n return $pnr->fetch('example_init_interactive.htm');\n}", "title": "" }, { "docid": "a3b371addb42aeb71c0d4aff4a8473d8", "score": "0.41472787", "text": "public function isFrontendUserLoggedIn()\n {\n return $this->typoScriptFrontend->loginUser;\n }", "title": "" }, { "docid": "8a419c4b107d060cb53d81cde2312bd9", "score": "0.41463953", "text": "public function isItv() {\n return ($this->getClientID() == self::CLIENT_ITV);\n }", "title": "" }, { "docid": "e1891a7f25c8263e92a0cc26a69e2dc8", "score": "0.41461223", "text": "public function setIdentity(UserInterface $identity)\n {\n /*\n * @event setIdentity\n */\n $this->getEventManager()->trigger(\n self::EVENT_SET_IDENTITY,\n $this,\n ['identity' => $identity]\n );\n }", "title": "" }, { "docid": "e3e698170945166792079317abee91e6", "score": "0.41461024", "text": "public function logIn(IPrincipal $user, IRequest $request, IResponse $response, array|string $schemeNames = null): void;", "title": "" }, { "docid": "ad82ba03cf45dd4dd9f8a9cc29597493", "score": "0.41428834", "text": "public function authenticate()\n\t{\n\n\t\t$response_raw = h\\Request::get( $this->config->user_doc_url( $this->name, \"main\" ) )\n\t\t\t->authenticateWith( $this->name, $this->pass )\n\t\t\t->sendsJson()\n\t\t\t->send();\n\n\t\t$response = json_decode( $response_raw, true );\n\n\t\t$this->is_auth = isset( $response['_id'] ) ? true : false;\n\n\t\treturn $this->is_auth;\n\n\t}", "title": "" }, { "docid": "840def903c0bd95d1c1c475114fe3c7d", "score": "0.4140196", "text": "public function authorize()\n {\n return true; //Cambiarlo a true para cualquier usuario o invitado sólo para autentificados false\n }", "title": "" }, { "docid": "f8056112f576b792503c4be4393df4f5", "score": "0.4139379", "text": "public function is_client() {\n return $this->user_type_id === UserType::CLIENT;\n }", "title": "" }, { "docid": "6b41e3d66165299cbf10a70f0d62e953", "score": "0.4134151", "text": "public function authorize()\n {\n $this->setIdName('user');\n return true;\n }", "title": "" }, { "docid": "c5907e2e67b4fc33ba7bcd4a038f26c4", "score": "0.41335088", "text": "protected function setAuthenticationStatus($authenticated, $returnCode = null, $redirectTo = null)\n {\n $this->request = $this->request->withAttribute(\n 'authenticationResult', \n (object) [\n $this->area => (object) [\n 'authenticated' => $authenticated,\n 'returnCode' => $returnCode,\n 'redirectTo' => $redirectTo\n ]\n ]\n );\n }", "title": "" }, { "docid": "4f726bcfb02730436050e4a19a105419", "score": "0.413042", "text": "private function doLoginWithSessionData()\n {\n $this->user_is_logged_in = true; // ?\n }", "title": "" }, { "docid": "b353cd57e42f8d09c4040ec098b20c6a", "score": "0.4130248", "text": "public function authenticate(ClientInterface $client) {\n $account = Account::find()->byClient($client)->one();\n\n if (!$this->module->enableRegistration && ($account === null || $account->user === null)) {\n Yii::$app->session->setFlash('danger', Yii::t('users', 'Registration on this website is disabled'));\n $this->action->successUrl = Url::to(['/users/security/login']);\n return;\n }\n\n if ($account === null) {\n /** @var Account $account */\n $accountObj = Yii::createObject(Account::className());\n $account = $accountObj::create($client);\n }\n\n $event = $this->getAuthEvent($account, $client);\n\n $this->trigger(self::EVENT_BEFORE_AUTHENTICATE, $event);\n\n if ($account->user instanceof User) {\n if ($account->user->isBlocked) {\n Yii::$app->session->setFlash('danger', Yii::t('users', 'Your account has been blocked.'));\n $this->action->successUrl = Url::to(['/users/security/login']);\n } else {\n Yii::$app->user->login($account->user, $this->module->rememberFor);\n $this->action->successUrl = Yii::$app->getUser()->getReturnUrl();\n }\n } else {\n $this->action->successUrl = $account->getConnectUrl();\n }\n\n $this->trigger(self::EVENT_AFTER_AUTHENTICATE, $event);\n }", "title": "" }, { "docid": "38fbfb3497a4513f5fed215ef3dc850d", "score": "0.41287732", "text": "public function authenticate() {\r\n\t\t\t//must be signed in to access\r\n\t\t\tif ($this->user->isSignedin() === false) {\r\n\t\t\t\tredirect(site_url('auth'));\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "496874b9e66ff85b4851af7db35b4d15", "score": "0.4125179", "text": "public function testInNonInteractive() {\n\t\t$this->Shell->interactive = false;\n\n\t\t$result = $this->Shell->in('Just a test?', 'y/n', 'n');\n\t\t$this->assertEquals('n', $result);\n\t}", "title": "" }, { "docid": "12d44a9237fc83b5a8e0b59210a5955c", "score": "0.412279", "text": "protected function authorise($authorisationType = self::AUTHORISE_HEADER)\n {\n if ($authorisationType === self::AUTHORISE_HEADER) {\n // Authorise via headers.\n $this->headers = [\n 'Authorization' => 'Basic ' . base64_encode($this->apiKey . ':' . $this->apiSecret),\n ];\n } elseif ($authorisationType === self::AUTHORISE_BODY) {\n // Authorise via POSTed body.\n $this->natalChartInput += [\n 'api_key' => $this->apiKey,\n 'api_secret' => $this->apiSecret,\n ];\n }\n }", "title": "" }, { "docid": "8441f6f3b2ae3adf1d3bb558acc6a2c9", "score": "0.41218877", "text": "public function testSuccessfulAuthenticationWithCustomIdentityAttribute()\n {\n $request = ServerRequestFactory::fromGlobals(\n ['REQUEST_URI' => '/testpath'],\n [],\n ['username' => 'mariano', 'password' => 'password']\n );\n $handler = new TestRequestHandler();\n\n $this->service->setConfig([\n 'identityAttribute' => 'customIdentity',\n ]);\n $middleware = new AuthenticationMiddleware($this->service);\n\n $middleware->process($request, $handler);\n $identity = $handler->request->getAttribute('customIdentity');\n $service = $handler->request->getAttribute('authentication');\n\n $this->assertInstanceOf(IdentityInterface::class, $identity);\n $this->assertInstanceOf(AuthenticationService::class, $service);\n $this->assertTrue($service->getResult()->isValid());\n }", "title": "" }, { "docid": "6dcf6513ca09caf631fa095804f53da9", "score": "0.4118629", "text": "public function onSecurityInteractiveLogin(InteractiveLoginEvent $event)\n\t{\n\t\tif (true === $this->authorizationChecker->isGranted('IS_AUTHENTICATED_FULLY')) {\n $session = $event->getRequest()->getSession();\n $session->set('base_url', $this->container->getParameter('base_url'));\n $session->set('env', $this->container->get( 'kernel' )->getEnvironment());\n // L'utilisateur vient juste de se connecter\n $user = $event->getAuthenticationToken()->getUser();\n //On récupère les adresses email pour lesquels l'utilisateur pourra attribuer une signature\n $user_id = $user->getId();\n $query = $this->em->createQuery(\"select distinct p.email, u.email from BaseMainBundle:Personne p, BaseMainBundle:Utilisateur u where p.auteur = u.id and u.id = $user_id\");\n $emails = $query->getResult();\n $options = array();\n foreach($emails as $m){\n $val = $m['email'];\n $options[$val]= $val;\n }\n $session->set('user_emails', $options);\n date_default_timezone_set('Europe/Brussels'); //définir le fuseau horraire\n $date = new \\DateTime('now');\n// $interval = new \\DateInterval('P1M');\n// $cloneDate=clone $date;\n// $lastMonth=$cloneDate->sub($interval);\n// //requête pour trouver les contrats de travails en cours ou terminés il y a moins de un mois de l'utilisateur (personne) courant\n// $cwQuery = $this->em->createQuery(\n// 'SELECT c\n// FROM TrefleRhBundle:Contratdetravails c\n// WHERE (c.datefin IS NULL OR c.datefin >=:lastmonth)\n// AND c.idpersonne=:idpersonne\n// '\n// )->setParameters(array(\n// 'lastmonth' => $lastMonth->format(\"Y-m-d\"),\n// 'idpersonne'=>$user->getIdpersonne()->getId(),\n// ));\n// $cws=$cwQuery->getResult();\n// //requête pour trouver les contrats de clients en cours ou terminés il y a moins de un mois de l'utilisateur (personne) courant s'il est un chez un sous-traitant\n// $ctQuery = $this->em->createQuery(\n// 'SELECT ct\n// FROM TrefleContratBundle:Contratressources ct\n// WHERE (ct.datefinmission IS NULL OR ct.datefinmission >=:lastmonth)\n// AND ct.idpersonne=:idpersonne\n// '\n// )->setParameters(array(\n// 'lastmonth' => $lastMonth->format(\"Y-m-d\"),\n// 'idpersonne'=>$user->getIdpersonne()->getId(),\n// ));\n// $cts=$ctQuery->getResult();\n// //requête pour savoir si l'utilisateur est un Administrateur auquel cas on évite de désactiver son compte\n// $adminQuery = $this->em->createQuery(\n// \"SELECT a\n// FROM TrefleParametresBundle:Appartenir a,TrefleParametresBundle:Groupes g\n// WHERE a.idgroupe=g.id\n// AND a.idutilisateur=:idutilisateur\n// AND g.libellegroupe=:libelle\n// \"\n// )->setParameters(array(\n// 'libelle' => 'Administrateur',\n// 'idutilisateur'=>$user->getId(),\n// ));\n// $admin=$adminQuery->getResult();\n// //Si l'utilisateur n'a ni contrat de travail, ni contrats client (chez un sous-traitant) et n'est pas administrateur, on désactive son compte\n// if(count($cws)<=0 && count($cts)<=0 && count($admin)<=0){\n// $user->setActif(false);\n// $this->em->persist($user);\n// $this->em->flush();\n// // Rediriger à la page précédente\n//\t\t\t$referer_url = $event->getRequest()->headers->get('referer');\n//\t\t\t$response = new RedirectResponse($referer_url);\n// return $response;\n// }\n /*************************************************************Fin connexion précédente si nécessaire***************************/\n $connexions = $this->em->getRepository('BaseMainBundle:Connexion')->findBy(array('auteur'=>$user->getId()),array('date_debut' => 'DESC'));\n $derniereConnexion = null;\n if(count($connexions) > 0){\n $derniereConnexion = $connexions[0];\n if( $derniereConnexion != null && $derniereConnexion->getDateFin() == null ){\n \n $derniereConnexion->setDateFin($date);\n $this->em->persist($derniereConnexion);\n $this->em->flush();\n }\n }\n /*************************************************************Fin**************************************************************/\n //$ipconnexion=$event->getRequest()->getClientIp();\n //$ip = $this->request->server->get('REMOTE_ADDR');\n $ipconnexion = $this->get_client_ip();\n $connexion = new \\Base\\MainBundle\\Entity\\Connexion();\n $connexion->setDateDebut($date);\n $connexion->setAuteur($user);\n $connexion->setIpConnexion($ipconnexion);\n $connexion->setSessionId($event->getRequest()->getSession()->getId());\n $this->em->persist($connexion);\n $this->em->flush();\n\t\t}\n\t\t\n\t\t/*if ($this->authorizationChecker->isGranted('IS_AUTHENTICATED_REMEMBERED')) {\n\t\t\t// user has logged in using remember_me cookie\n\t\t}*/\n\t\t// do some other magic here\n\t\t//$user = $event->getAuthenticationToken()->getUser();\n\t\t\n\t}", "title": "" }, { "docid": "306c34d48cb8541e8c421c3677f9d0d3", "score": "0.41166726", "text": "function setSignedIn($new_signed_in)\n {\n $this->signed_in = $new_signed_in;\n }", "title": "" }, { "docid": "48dd205f6d3a2dd19686433bd996a7ff", "score": "0.41131693", "text": "public function authorize()\n {\n return $this->user()->userRole->edit_client_presentations == 1 ? true : false;\n }", "title": "" }, { "docid": "0f6d35bdcd9dd90ac8e9bcd02633e3e9", "score": "0.4110822", "text": "public function loggedIn() {\n if(Paithal::getInstance()->user) return true;\n else return false;\n }", "title": "" }, { "docid": "db21a39acef77326a809c6ac3445c754", "score": "0.41102207", "text": "private function signin()\n {\n $this->setRules(array(\n 'method' => 'POST',\n 'vias' => 'mob'\n )\n );\n $access_token = HTTP::post('access_token');\n $access_token_secret = HTTP::post('access_token_secret');\n\n if (! ($access_token && $access_token)) {\n throw new \\ValidationException(\n 'Missing parameters',\n array('error_code' => 7)\n );\n }\n $create_user = Users::insert(array(\n 'access_token' => $access_token,\n 'access_token_secret' => $access_token_secret\n )\n );\n\n if (! $create_user) {\n throw new \\ValidationException(\n 'Error while logging you in'\n );\n }\n\n HTTP::exitJson(array('success' => true) + $create_user);\n }", "title": "" }, { "docid": "83119c5ad4497b3fa66ec6ccdb0da0e8", "score": "0.4110165", "text": "public function goSignIn(LoginCredential $userInfo):bool\n {\n $users = Member::whereRaw('user_id = :id and password = :pw', [\":id\" => $userInfo->id, \":pw\" => $userInfo->pw])->get();\n if (count($users)>0){\n $this->writeToSession($users[0]->user_id,$users[0]->name);\n return true;\n }else{\n return false;\n }\n return false;\n }", "title": "" }, { "docid": "fc1c7af666e788b2c40b4be3157553fe", "score": "0.41038564", "text": "public function getAuthenticationType()\n {\n return 'none';\n }", "title": "" }, { "docid": "0d9af7597af11ee04225e128d3fea69d", "score": "0.4096838", "text": "public function setLoggedIn($userId) {\r\n\r\n\t\t$userInfo\t= $this->getUserInfo($userId);\r\n\r\n\t\tif (!empty($userInfo['id']) && !empty($userInfo['username'])) {\r\n\r\n\t\t\t// set user login status\r\n\t\t\t$this->setAuthenticated(true);\r\n\r\n\t\t\t// set credential, member is default\r\n\t\t\t$this->addCredential($this->nameSpace);\r\n\r\n\t\t\t$this->setAttribute('id', $userInfo['id'], $this->nameSpace);\r\n\t\t\t$this->setAttribute('username', $userInfo['username'], $this->nameSpace);\r\n\r\n\t\t\t$this->setPassport();\r\n\r\n\t\t\treturn\ttrue;\r\n\r\n\t\t}\r\n\r\n\t\treturn\tfalse;\r\n\r\n\t}", "title": "" }, { "docid": "3b13ed62b92b7033fff3a37f055ea47b", "score": "0.4093387", "text": "public function signin()\n {\n }", "title": "" }, { "docid": "fa3c8303cdcf0e9561c43ad04a907f8d", "score": "0.40900654", "text": "function gigya_notify_login($uid, $is_new_user = FALSE, $user_info_json = NULL) {\n $request = gigya_prepare_request('socialize.notifyLogin');\n $request->setParam(\"siteUID\", $uid);\n if (!empty($is_new_user)) {\n $request->setParam('newUser', TRUE);\n }\n if (!empty($user_info_json)) {\n $request->setParam('userInfo', $user_info_json);\n }\n $response = $request->send();\n if ($response->getErrorCode() !== 0) {\n // Error.\n watchdog('gigya', 'error in notify login, the message was @msg', array('@msg' => $response->getErrorMessage()));\n return $response->getErrorMessage();\n }\n try {\n setcookie($response->getString(\"cookieName\"), $response->getString(\"cookieValue\"), 0, $response->getString(\"cookiePath\"), $response->getString(\"cookieDomain\"));\n }\n catch (Exception $e) {\n watchdog('gigya', 'error setting gigya cookie, the error message was @error', array('@error' => $e->getMessage()));\n }\n\n return TRUE;\n}", "title": "" }, { "docid": "d9a75e395cb970903520e5a62469ea74", "score": "0.4073435", "text": "public function interactive()\n {\n $name = ZtPrompt::get('Especifique el nombre de susuario', true);\n ZtPrompt::show(\"El nombre del usuario es: '$name', este campo es obligatorio.\");\n $apll = ZtPrompt::get('Especifique los apellidos del usuario');\n ZtPrompt::show(\"Los apellidos del usuario son: '$apll', este campo no es obligatorio y no toma un valor por defecto.\");\n $age = ZtPrompt::get('Especifique la edad del usuario', '12');\n ZtPrompt::show(\"La edad del usuario es: '$age', este campo no es obligatorio y su valor por defecto es '12'.\");\n $sex = ZtPrompt::get('Especifique el sexo del usuario', 'M', array('M', 'F'));\n ZtPrompt::show(\"El sexo del usuario es: '$sex', este campo no es obligatorio y su valor por defecto es 'M', los valores permitidos son [M,F].\");\n return \"El resultado es: $name $apll, $age, $sex.\";\n }", "title": "" }, { "docid": "35849c5f73ee11fb3389f0fc4ad0135d", "score": "0.40653116", "text": "public function isAuthenticated()\n\t{\n\t\t$this->respondData( ['result' => $this->session->has( 'auth_user_id' )] );\n\t}", "title": "" }, { "docid": "44f74b9f31951450535e68eedbb1d0a7", "score": "0.4063245", "text": "public function authenticate(RestRequestInterface $request): bool\n {\n return $this->sessionManager->valueForKey('loginStatus') === AuthHandler::STATUS_LOGGED_IN;\n }", "title": "" }, { "docid": "c53b732dc70264fa310b9808216c9312", "score": "0.40552267", "text": "public function signin()\n {\n $oauthClient = new \\League\\OAuth2\\Client\\Provider\\GenericProvider([\n 'clientId' => env('OAUTH_APP_ID'),\n 'clientSecret' => env('OAUTH_APP_PASSWORD'),\n 'redirectUri' => env('OAUTH_REDIRECT_URI'),\n 'urlAuthorize' => env('OAUTH_AUTHORITY').env('OAUTH_AUTHORIZE_ENDPOINT'),\n 'urlAccessToken' => env('OAUTH_AUTHORITY').env('OAUTH_TOKEN_ENDPOINT'),\n 'urlResourceOwnerDetails' => '',\n 'scopes' => env('OAUTH_SCOPES')\n ]);\n\n // Generate the auth URL\n $authorizationUrl = $oauthClient->getAuthorizationUrl();\n\n // Save client state so we can validate in response\n session()->put('oauth_state', $oauthClient->getState());\n\n // Redirect to authorization endpoint\n return redirect($authorizationUrl);\n }", "title": "" }, { "docid": "0976d90c15f0c527c147b8171d44fcdb", "score": "0.40548643", "text": "public function setIsIndoor($isIndoor){\n $this->isIndoor = $isIndoor;\n }", "title": "" }, { "docid": "5acb3ec881e2fe2b040e9bd839719333", "score": "0.40520307", "text": "public function setSignInIdentifier($val)\n {\n $this->_propDict[\"signInIdentifier\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "90681f21aca8a2f387575d7f097f70de", "score": "0.40486956", "text": "public function loggedIn()\r\n {\r\n if ($this->user != null)\r\n {\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "1e9caba48d89143945a2ab18569a03f1", "score": "0.40485993", "text": "public static function impersonate($userId)\n\t{\n\t\t$superUser = UserModule::userModel()->notsafe()->findByPk(Yii::app()->user->id);\n\t\t$user = UserModule::userModel()->notsafe()->findByPk($userId);\n\t\tif($user)\n\t\t{ \n\t\t\t//TODO: add another check here to ensure currently logged in user has permission to do this.\n\t\t\tYii::app()->session['impersonate_restore'] = Yii::app()->user->id;\n\t\t\tYii::app()->session['impersonate_restore_validation'] = md5($superUser->password); \n\t\t\t// create some key from the password and infomation of this superuser to validate when performing a restore\n\t\t\t// this would ensure the correct user is being restored (so the session can not just be hacked adding in this id)\n\t\t\t$ui = new UserIdentity($user->email, \"\");\n\t\t\t$ui->_logInUser($user);\n\t\t\tYii::app()->user->login($ui);\n\t\t}\n\t}", "title": "" }, { "docid": "de1d41f360dd59aafc806bbd073d538a", "score": "0.40481943", "text": "public function is_signedin()\n\t{\n\t\t$status = $this->home_model->is_signedin();\n\t\treturn $status;\n\t}", "title": "" }, { "docid": "c3afcd8390c5d22bf4e90dffaff9933e", "score": "0.4044328", "text": "function select_multi_user()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t# Should we show the checkboxes\n\t\tif(!empty($data['clear'])) $this->native_session->delete('__select_multi');\n\t\telse $this->native_session->set('__select_multi', 'setdate');\n\t\t\n\t\tif(!empty($_POST))\n\t\t{\n\t\t\t# Set interviews if users were selected\n\t\t\tif($this->input->post('interviewuser') && $this->input->post('applicationid'))\n\t\t\t\t$result = $this->_interview->set_multiuser_interviews($this->input->post(NULL, TRUE));\n\t\t\telse $data['msg'] = \"WARNING: No interview candidates were identified.\";\n\t\t\t\n\t\t\t# Remove the session variable for the multi-selection when done\n\t\t\tif(!empty($result) && $result)\n\t\t\t{\n\t\t\t\t$this->native_session->delete('__select_multi');\n\t\t\t\t$data['msg'] = \"The interview dates have been set and the candidates and interviewer notified.\";\n\t\t\t}\n\t\t\telse if(empty($data['msg'])) $data['msg'] = \"ERROR: We could not set the interviews for the users.\";\n\t\t\t\n\t\t\t$data['area'] = \"basic_msg\";\n\t\t\t$this->load->view('addons/basic_addons', $data);\n\t\t}\n\t}", "title": "" }, { "docid": "7bacb867991e04d2c2bb2837149da19c", "score": "0.40407458", "text": "public function getIsIntegral()\n {\n return $this->isIntegral;\n }", "title": "" }, { "docid": "1afdf69dbda5a94b43d626a4c8db6e94", "score": "0.40383613", "text": "public function authenticate()\n {\n $result = parent::authenticate();\n\n if (!$result->isValid()) {\n return $result;\n }\n\n $this->getIdentity();\n }", "title": "" }, { "docid": "bce60daa2967a6b37ce030950600ae1c", "score": "0.4031992", "text": "public function testSignInAuthenticates () {\n $user = $this->createDummyUser($this->credentials);\n\n $this->postJson('/api/sign-in', $this->credentials);\n\n $this->assertAuthenticatedAs($user);\n }", "title": "" }, { "docid": "11ad6934deb2438d9e1a7f21b2f2af99", "score": "0.4031611", "text": "private function isUserInvoiceIncoming()\n {\n return $this->getUserInvoice()->direction === InvoiceDirections::INCOMING;\n }", "title": "" }, { "docid": "32b783eafce33d5e4f01c2cc702e6d78", "score": "0.4031494", "text": "public function withAuthenticationRequest()\n\t{\n\t\t$this->authentication_request = true;\n\t}", "title": "" }, { "docid": "e583a14a8f888cb1986894f12e9ab65c", "score": "0.40254557", "text": "public function logged_in() {\n return true;\n }", "title": "" }, { "docid": "c4ac8311fb96c9c57a686a3d5cdf2855", "score": "0.4024812", "text": "public function isInvited()\n {\n return $this->isInvited;\n }", "title": "" } ]
949df92bd09848e08b95621ac31f3e0e
Operation deleteSubscriberByIdAsyncWithHttpInfo Delete a Subscriber
[ { "docid": "e4b3b4aca23f35aa61ba53512a7bd24d", "score": "0.5794651", "text": "public function deleteSubscriberByIdAsyncWithHttpInfo($subscriber_id, $content_type = 'application/json', $accept = 'application/json')\n {\n $returnType = '';\n $request = $this->deleteSubscriberByIdRequest($subscriber_id, $content_type, $accept);\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 }", "title": "" } ]
[ { "docid": "337fe08959ff6bcaa01384eba106ed25", "score": "0.7359088", "text": "public function deleteSubscriber($id);", "title": "" }, { "docid": "6354aec8d6987f508b1dead67afaf4c2", "score": "0.63246995", "text": "public function deleteSubscriber($params) {\n if (empty($params['account_id'])) {\n $params['account_id'] = $this->account_id;\n }\n\n $idOrEmail = null;\n if (isset($params['email'])) {\n $idOrEmail = $params['email'];\n } elseif(isset($params['id'])) {\n $idOrEmail = $params['id'];\n }\n\n if(is_null($idOrEmail)) {\n throw new Exception('Missing id or email');\n }\n\n $account_id = $params['account_id'];\n unset($params['account_id']); // clear it from the params\n\n $api_action = \"/$account_id/subscribers/$idOrEmail\";\n $url = $this->api_end_point . $api_action;\n\n $res = $this->makeRequest($url, [], self::DELETE);\n\n return isset($res['http_code']) && $res['http_code'] == '204';\n }", "title": "" }, { "docid": "f2b52bfee0bbfab82917ee7533615e16", "score": "0.6254987", "text": "public function destroy(Subscriber $subscriber)\n {\n $subscriber->delete();\n\n return response()->json([\"Specified resource delete\"]);\n }", "title": "" }, { "docid": "09b9f6f03d9c63cb62e4d4b257d2e13e", "score": "0.603069", "text": "public function destroy($id)\n {\n $sb = Subscribers::findOrFail($id);\n $sb->delete();\n return response()->json(['success' => true]);\n }", "title": "" }, { "docid": "866dcec8b106a421880e64d2bef62a74", "score": "0.6010806", "text": "public function destroy(Subscriber $subscriber)\n {\n //\n }", "title": "" }, { "docid": "3653182cfe7f98e4ca60144a8130e082", "score": "0.5961268", "text": "public function subscriberDeletion(Varien_Event_Observer $observer)\n {\n $subscriber = $observer->getEvent()->getSubscriber();\n $subscriber->setImportMode(TRUE);\n $sEmailId = $subscriber['subscriber_email'];\n $oApiObjectCheckout = new Ongage_MageGage_Model_Api();\n $oApiObjectCheckout->delete_subscriber($sEmailId);\n }", "title": "" }, { "docid": "56ae3f3c67779149371fbabcceffc2bc", "score": "0.59115064", "text": "public function testDeleteSubscriberReturnError($id)\n {\n $goodClient = ClientFactory::goodClient();\n $subscriberFactory = SubscriberFactory::build($goodClient);\n $subscriberFactory->deleteSubscriber($id);\n }", "title": "" }, { "docid": "f9fb259c70b59ee9a95049cfc57361d8", "score": "0.58946323", "text": "public function removeSubscriber(SubscriberInterface $subscriber);", "title": "" }, { "docid": "e39d87bc1f6aaf26c1a484913f77244d", "score": "0.5877538", "text": "public function unsubscribe(OLP_ISubscriber $subscriber);", "title": "" }, { "docid": "3554441ca54124eeb18e918fc6046585", "score": "0.5859946", "text": "public function destroy(int $subscriberId)\n {\n try {\n /** @var Subscriber $subscriber */\n $subscriber = Subscriber::find($subscriberId);\n\n $subscriberFields = SubscriberField::where('subscriber_id', '=', $subscriber['id']);\n\n foreach ($subscriberFields as $field) {\n SubscriberField::delete($field['id']);\n }\n\n if (!Subscriber::delete($subscriberId)) {\n return $this->failedResponseJson(Response::HTTP_BAD_REQUEST);\n }\n\n return $this->successResponseJson();\n } catch (Exception $exception) {\n return $this->failedResponseJson(Response::HTTP_UNPROCESSABLE_ENTITY, [],\n \"Subscriber could not be updated!\");\n }\n }", "title": "" }, { "docid": "9e02b30368331e2655249dbe624081f7", "score": "0.5813184", "text": "public function destroy($id)\n {\n\t\t$dataInfo = SubscriberField::find($id);\n\t\tif(!$dataInfo){\n\t\t\t$this->apiResponse['message'] = \"Data does not exists\";\n\t\t\treturn $this->apiResponse;\n\t\t}\n\t\tif(!$dataInfo->delete()){\n\t\t\t$this->apiResponse['message'] = \"Sorry!, unable to delete the data\";\n\t\t\treturn $this->apiResponse;\n\t\t}\n\t\t\n $this->apiResponse['success'] = true;\n\t\t$this->apiResponse['message'] = 'Data deleted successfully';\n\t\t\n\t\treturn $this->apiResponse;\n }", "title": "" }, { "docid": "b198897a0333e274b708277b5952a858", "score": "0.5760864", "text": "public function destroy($id)\n {\n // Find the subscriber by $id\n $subscriber = Subscriber::findOrFail($id);\n\n // delete\n $status = $subscriber->delete();\n\n if ($status) {\n // If success\n return back()->with('custom_success', 'Subscriber has been deleted.');\n } else {\n // If no success\n return back()->with('custom_errors', 'Subscriber was not deleted. Something went wrong.');\n }\n }", "title": "" }, { "docid": "218403defb45b7c4af860d08f7a5577d", "score": "0.5755111", "text": "public function destroy(Subscriber $subscriber)\n {\n if($subscriber)\n {\n $subscriber->delete();\n return redirect('subscribers')->with('success', 'Deleted Successfully!');\n }\n }", "title": "" }, { "docid": "73231b9c69a6505055a8882222c459b4", "score": "0.575072", "text": "public function deleteSubscription($request);", "title": "" }, { "docid": "e21f8bf7218c675c9c3a2a1413f3a36a", "score": "0.57326347", "text": "protected function deleteSubscriberByIdRequest($subscriber_id, $content_type = 'application/json', $accept = 'application/json')\n {\n // verify the required parameter 'subscriber_id' is set\n if ($subscriber_id === null || (is_array($subscriber_id) && count($subscriber_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $subscriber_id when calling deleteSubscriberById'\n );\n }\n\n $resourcePath = '/customers/subscribers/{subscriber_id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // header params\n if ($content_type !== null) {\n $headerParams['Content-Type'] = ObjectSerializer::toHeaderValue($content_type);\n }\n // header params\n if ($accept !== null) {\n $headerParams['Accept'] = ObjectSerializer::toHeaderValue($accept);\n }\n\n // path params\n if ($subscriber_id !== null) {\n $resourcePath = str_replace(\n '{' . 'subscriber_id' . '}',\n ObjectSerializer::toPathValue($subscriber_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\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 (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('X-Auth-Client');\n if ($apiKey !== null) {\n $headers['X-Auth-Client'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Auth-Token');\n if ($apiKey !== null) {\n $headers['X-Auth-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\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "013360751bc19182879a606445cb94ce", "score": "0.5661504", "text": "public function destroy($id)\n { \n $model = NewsletterSubscriber::findByKey($id)->delete();\n Common::log(\"Destroy\",\"Newlettersubscriber has been deleted\",new NewsletterSubscriber());\n return redirect()->route('newsletter-subscriber.index')->with('success', __('admincrud.Subscriber deleted successfully'));\n }", "title": "" }, { "docid": "4f081979a7cdbb8d9fc813461149455e", "score": "0.56487685", "text": "final public function removeSubscriber(Subscriber $subscriber): void {}", "title": "" }, { "docid": "a300343d2f1a8ead7fda80c4e8e66308", "score": "0.560403", "text": "public function unsubscribeSubscriber($params) {\n if (empty($params['account_id'])) {\n $params['account_id'] = $this->account_id;\n }\n\n $account_id = $params['account_id'];\n unset($params['account_id']); // clear it from the params\n\n if (!empty($params['subscriber_id'])) {\n $subscriber_id = $params['subscriber_id'];\n unset($params['subscriber_id']); // clear it from the params\n } elseif (!empty($params['email'])) {\n $subscriber_id = $params['email'];\n unset($params['email']); // clear it from the params\n } else {\n throw new Exception(\"Subscriber ID or Email was not specified. You must specify either Subscriber ID or Email.\");\n }\n\n $subscriber_id = urlencode($subscriber_id);\n\n $api_action = \"$account_id/subscribers/$subscriber_id/unsubscribe\";\n $url = $this->api_end_point . $api_action;\n\n $req_params = $params;\n $res = $this->makeRequest($url, $req_params, self::POST);\n\n if (!empty($res['buffer'])) {\n $raw_json = json_decode($res['buffer'], true);\n }\n\n $data = empty($raw_json)\n ? false\n : (empty($raw_json['subscribers'])\n ? array()\n : $raw_json['subscribers'][0]);\n\n return $data;\n }", "title": "" }, { "docid": "933e806ffc8560a0630edf819a5ec7e4", "score": "0.55992895", "text": "public function deleteSubscriberByIdAsync($subscriber_id, $content_type = 'application/json', $accept = 'application/json')\n {\n return $this->deleteSubscriberByIdAsyncWithHttpInfo($subscriber_id, $content_type, $accept)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "f1d90bd6dde35ce0a7980baf1bc0fcbf", "score": "0.55906695", "text": "public function deleteSubscriptionsAction()\n {\n $subId = $this->container->get('request')->get('subId'); \n $baseUrl = $this->setGetContract->subUrlsCustomers.\"/$this->customerId\";\n $this->url = $baseUrl.\"/subscriptions/$subId\";\n $this->currentSubUrl = 'subUrlsCustomers';\n $this->datas = array();\n \n return $this->prepareRequest(); \n }", "title": "" }, { "docid": "471c6671b582816e6b94b0ff7e0415c6", "score": "0.5589785", "text": "public function removeSubscriber(EventSubscriberInterface $subscriber)\n {\n }", "title": "" }, { "docid": "471c6671b582816e6b94b0ff7e0415c6", "score": "0.5589785", "text": "public function removeSubscriber(EventSubscriberInterface $subscriber)\n {\n }", "title": "" }, { "docid": "788e0c01b6e51817f3a20486c51ec56d", "score": "0.5538442", "text": "public function destroy($id)\n\t{\n\t\t\n\t\tSubscribers::destroy($id);\n\t\n\t\t// redirect\n\t\tSession::flash('message', 'Successfully deleted the subscriber!');\n//\t\treturn Redirect::to('admin/subscribers');\n\t\treturn Redirect::back();\n\t}", "title": "" }, { "docid": "3bb2613aef7dad187665d113df8f34f1", "score": "0.5458446", "text": "public function delete_subscribe($id)\r\n {\r\n\t\t//trace('delete!');\r\n $user = Subscribe::get($id);\r\n if ($user) {\r\n\t\t\t$user->delete();\r\n\t\t\t$data['error'] = 0;\r\n\t\t\t$data['msg'] = '彻底删除成功';\r\n } else {\r\n \t$data['error'] = 1;\r\n \t$data['msg'] = '删除失败';\r\n }\r\n return $data;\r\n }", "title": "" }, { "docid": "4fb7c9d303b0799b8383d64db862e194", "score": "0.5454585", "text": "public static function todelete($id) {\n Subscribe::todelete($id); \n echo\"le subscriber est supprimé avec succés\"; \n }", "title": "" }, { "docid": "d623897baf7b8bbb7b9ca10dee488fa0", "score": "0.5446638", "text": "public function deleteSubscribersAsyncWithHttpInfo($email = null, $first_name = null, $last_name = null, $source = null, $order_id = null, $date_created = null, $date_modified = null, $accept = 'application/json', $content_type = 'application/json')\n {\n $returnType = '';\n $request = $this->deleteSubscribersRequest($email, $first_name, $last_name, $source, $order_id, $date_created, $date_modified, $accept, $content_type);\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 }", "title": "" }, { "docid": "78de2626cff1d3e393b3b5d20d6baef8", "score": "0.5423051", "text": "public function deleteSubscribers($idList);", "title": "" }, { "docid": "de71d7e46ef510bb811e519d09a70370", "score": "0.54183185", "text": "public function deleteSubscriberById($subscriber_id, $content_type = 'application/json', $accept = 'application/json')\n {\n $this->deleteSubscriberByIdWithHttpInfo($subscriber_id, $content_type, $accept);\n }", "title": "" }, { "docid": "8e56a957dc34708a5e3cfd17054c8b41", "score": "0.54116774", "text": "public function destroy()\n {\n $destroy = Subscriber::destroy(Auth::id());\n return response($destroy === 1); //True if successfully deleted.\n }", "title": "" }, { "docid": "f2125f654ee86a269ca61e3ccd50dec3", "score": "0.5367424", "text": "public function deleteSubscriberByIdWithHttpInfo($subscriber_id, $content_type = 'application/json', $accept = 'application/json')\n {\n $returnType = '';\n $request = $this->deleteSubscriberByIdRequest($subscriber_id, $content_type, $accept);\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 }", "title": "" }, { "docid": "2350fbbcc266fb4905c9201434665778", "score": "0.5358113", "text": "public static function delete($id) {\n $subscribe = Subscribe::findById($id);\n // 2. Include de la lview\n \n include(__DIR__ . '/../views/subscribes/delete.php');\n\n }", "title": "" }, { "docid": "a4054dac2586a89f846dbe8275e30979", "score": "0.52762085", "text": "public function delete_subscriber($sEmailId)\n { \n $aRequest = array();\n $aRequest['change_to'] = 'remove';\n $aRequest['emails'] = array($sEmailId); \n return $this->post_request($aRequest, URL.'contacts/remove', 'post');\n }", "title": "" }, { "docid": "b192eb243e612cb1ac29e9d1d8d30090", "score": "0.5234984", "text": "public function usersIdDeleteAsyncWithHttpInfo($id)\n {\n $returnType = '';\n $request = $this->usersIdDeleteRequest($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 }", "title": "" }, { "docid": "1a44c22c1a799697a33fe880b301120e", "score": "0.5206938", "text": "public function delete($id) {\n $publisher = Publisher::find($id);\n if(is_null($publisher)) {\n return response()->json(['message' => 'invalid request']);\n }\n $publisher->delete();\n return response()->json(['message' => 'delete successful']);\n }", "title": "" }, { "docid": "ef02d96079a1e642a1cf20b662f33758", "score": "0.5188125", "text": "public function testDeleteSubscriberReturnData(array $data)\n {\n $goodClient = ClientFactory::goodClient();\n $subscriberFactory = SubscriberFactory::build($goodClient);\n $created = $subscriberFactory->storeSubscriber($data);\n $subscriber = $subscriberFactory->deleteSubscriber($created['data']['id']);\n $this->assertEmpty($subscriber);\n }", "title": "" }, { "docid": "8fd3e2a5cff9d3881f2049f0d307b6d4", "score": "0.51853436", "text": "public function unregister(EventSubscriber $subscriber);", "title": "" }, { "docid": "d3221a8e657e5d214537f940dea7dbc2", "score": "0.51847726", "text": "public function journalVoucherDeleteByIdAsyncWithHttpInfo($id)\n {\n $returnType = '';\n $request = $this->journalVoucherDeleteByIdRequest($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 }", "title": "" }, { "docid": "f340f0fa4ef1a643c21435c0286bff79", "score": "0.514905", "text": "public function delete_subscriber($sub_id)\n\t{\n\t\t$stmt = $this->conn->prepare(\"DELETE FROM subscribers WHERE sub_id = ?\");\n\t\t$stmt->bind_param(\"i\", $sub_id);\n\t\t$stmt->execute();\n\t\t$num_affected_rows = $stmt->affected_rows;\n\t\t$stmt->close();\n\t\treturn $num_affected_rows > 0;\n\t}", "title": "" }, { "docid": "e05425b2c189b69a59c7f6c9fe173685", "score": "0.5117981", "text": "public function destroy(Request $request, $id)\n {\n $subscription = \\Siravel\\Models\\Subscription::findOrfail($id);\n\n $subscription->delete();\n\n return redirect('subscriptions');\n }", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.50994587", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.50994587", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.50994587", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.50994587", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.50994587", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.50994587", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.50994587", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.50994587", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.50994587", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.50994587", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.50994587", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.50994587", "text": "public function deleteById($id);", "title": "" }, { "docid": "19dc9f965958df4ee9f3bc309cc621cd", "score": "0.50900495", "text": "public function remove_subscriber( LaterPay_Core_Event_SubscriberInterface $subscriber ) {\n foreach ( $subscriber->get_subscribed_events() as $event_name => $params ) {\n if ( is_array( $params ) && is_array( $params[0] ) ) {\n foreach ( $params as $listener ) {\n $this->remove_listener( $event_name, array( $subscriber, $listener[0] ) );\n }\n } else {\n $this->remove_listener( $event_name, array( $subscriber, is_string( $params ) ? $params : $params[0] ) );\n }\n }\n }", "title": "" }, { "docid": "40843a7d3759ce4e0158df35e8952c05", "score": "0.5069564", "text": "public function devicesIdDeleteAsyncWithHttpInfo($id)\n {\n $returnType = '';\n $request = $this->devicesIdDeleteRequest($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 }", "title": "" }, { "docid": "28dca4c0240558b94afc9f2a6703a9a1", "score": "0.50672174", "text": "public function delete(string $id): JsonResponse;", "title": "" }, { "docid": "fe70f756b903ee1b81e6f573541f12ea", "score": "0.50590044", "text": "public function destroy($id)\n {\n $subscribe = Subscribe::find($request->id);\n $subscribe->delete();\n $notification = array(\n 'message' => 'Subscriber Email Deleted Successfully!',\n 'alert-type' => 'success');\n return redirect('admin.websetting.subscribe-list')->with($notification);\n }", "title": "" }, { "docid": "71ff9c573a74f32881a762737b13220e", "score": "0.50508726", "text": "public function deleteSubscription($subscriber_uri, $subscribed_user_uri)\n {\n $sub = new Subscription();\n\n $subscribed = $this->_getAnyProfile($subscribed_user_uri);\n $subscriber = $this->_getAnyProfile($subscriber_uri);\n\n $sub->subscribed = $subscribed->id;\n $sub->subscriber = $subscriber->id;\n\n $sub->delete();\n }", "title": "" }, { "docid": "e04a4bf5b621c6199b2b4abe248193de", "score": "0.5049761", "text": "public function unsubscribe($id, $email) {\n if ($id == self::ALL) {\n return $this->unsubscribeAll($email);\n }\n\n $subscription = Subscription::findOrFail($id);\n $subscriber = User::where('email',$email)->first();\n\n if ($email != $subscriber->email) {\n abort(404);\n }\n\n $title = $subscription->title;\n $subscriber = $subscription->email;\n $query = $subscription->query;\n\n // DELETE\n DB::table('subscriptions')->where('id', $id)->delete();\n\n // keep info in log file\n Log::info('Subscription deleted by subscriber.',['subscriber' => $subscriber, 'title' => $title, 'query' => $query ]);\n\n Flash::success(\"Benachrichtigung {$title} beendet.\");\n\n return redirect(route('public::auftraege'));\n }", "title": "" }, { "docid": "e3dc0d62f0cf650b19dff70375ba0fa1", "score": "0.5003255", "text": "public function untagSubscriber($params) {\n $status = false;\n\n if (empty($params['account_id'])) {\n $params['account_id'] = $this->account_id;\n }\n\n $account_id = $params['account_id'];\n unset($params['account_id']); // clear it from the params\n\n if (empty($params['email'])) {\n throw new Exception(\"Email was not specified\");\n }\n\n if (empty($params['tag'])) {\n throw new Exception(\"Tag was not specified\");\n }\n\n $api_action = \"$account_id/tags\";\n $url = $this->api_end_point . $api_action;\n\n // The API wants the params to be JSON encoded\n $req_params = array('tags' => array($params));\n\n $res = $this->makeRequest($url, $req_params, self::DELETE);\n\n if ($res['http_code'] == 204) {\n $status = true;\n }\n\n return $status;\n }", "title": "" }, { "docid": "32cb35aba84979035c6112c30ba3835e", "score": "0.49982393", "text": "public function calendarsIdDeleteAsyncWithHttpInfo($id)\n {\n $returnType = '';\n $request = $this->calendarsIdDeleteRequest($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 }", "title": "" }, { "docid": "78b285826168947e6468234a5b4aa6b1", "score": "0.49980152", "text": "public function delete($id)\n {\n $query=\"DELETE FROM editor_subscribe_collection WHERE id=\".$id;\n\n $this->executeQuery($query);\n }", "title": "" }, { "docid": "268ed93dbd2c443213c5b4b6a859d53d", "score": "0.4998008", "text": "public function unsubscribeFrom($event_type, OLP_ISubscriber $subscriber);", "title": "" }, { "docid": "8a3ef1ad6afa3a86c0fdaae3d58d5dd7", "score": "0.49954692", "text": "public function delete(array $params = array())\n {\n if ($this->lastId != null) {\n $params['id'] = $this->lastId;\n $this->lastId = null;\n }\n if (!$this->hasKeys($params, array('id'))) {\n throw new MissingParametersException(__METHOD__, array('id'));\n }\n $endPoint = Http::prepare('forum_subscriptions/' . $params['id'] . '.json');\n $response = Http::send($this->client, $endPoint, null, 'DELETE');\n if ($this->client->getDebug()->lastResponseCode != 200) {\n throw new ResponseException(__METHOD__);\n }\n $this->client->setSideload(null);\n\n return true;\n }", "title": "" }, { "docid": "370d61ecbe86ded2fee1bbca4141c74d", "score": "0.49926236", "text": "public function testUnsubscribeFromTag()\n {\n $tag = factory(Tag::class)->create();\n $user = factory(User::class)->create();\n $token = $this->authenticate($user);\n\n $this->api('POST', \"/tags/{$tag->id}/subscribers\", [], $token);\n $this->api('GET', \"/users/{$user->id}?include=tags\", [], $token)\n ->seeJson([\n 'name' => $tag->name\n ]);\n\n $this->api('DELETE', \"/tags/{$tag->id}/subscribers\", [], $token)\n ->assertResponseStatus(204);\n\n $this->api('GET', \"/users/{$user->id}?include=tags\", [], $token)\n ->seeJson([\n 'tags' => [\n \"data\" => []\n ]\n ]);\n }", "title": "" }, { "docid": "a1edffc1d424d396171dba259f6274d9", "score": "0.49762195", "text": "public function notificationsIdDeleteAsyncWithHttpInfo($id)\n {\n $returnType = '';\n $request = $this->notificationsIdDeleteRequest($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 }", "title": "" }, { "docid": "671473fa96edd6c1d24e1c47261cbf19", "score": "0.49600318", "text": "public function __invoke(Request $request, $id)\n {\n \n Conversation::where('id', $id)->delete();\n\n return response()->json([\n 'message' => [\n 'delete_conversation' => true,\n ],\n ], 200);\n }", "title": "" }, { "docid": "2c997d0ccd197309f44cc935a2ccc705", "score": "0.49442202", "text": "public function deleteAsync($resourceGroupName, $accountName, array $customHeaders = [])\n {\n if ($resourceGroupName == null) {\n Validate::notNullOrEmpty($resourceGroupName, '$resourceGroupName');\n }\n if ($accountName == null) {\n Validate::notNullOrEmpty($accountName, '$accountName');\n }\n if ($this->_client->getApiVersion() == null) {\n Validate::notNullOrEmpty($this->_client->getApiVersion(), '$this->_client->getApiVersion()');\n }\n if ($this->_client->getSubscriptionId() == null) {\n Validate::notNullOrEmpty($this->_client->getSubscriptionId(), '$this->_client->getSubscriptionId()');\n }\n\n $path = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}';\n $statusCodes = [200, 204];\n $method = 'DELETE';\n\n $path = strtr($path, ['{resourceGroupName}' => $resourceGroupName, '{accountName}' => $accountName, '{subscriptionId}' => $this->_client->getSubscriptionId()]);\n $queryParams = ['api-version' => $this->_client->getApiVersion()];\n $headers = $customHeaders;\n if ($this->_client->getAcceptLanguage() != null) {\n $headers['accept-language'] = $this->_client->getAcceptLanguage();\n }\n if ($this->_client->getGenerateClientRequestId()) {\n $headers[Resources::X_MS_REQUEST_ID] = Utilities::getGuid();\n }\n\n $body = '';\n\n $response = HttpClient::send(\n $method,\n $headers,\n $queryParams,\n [],\n $this->_client->getUrl($path),\n $statusCodes,\n $body,\n $this->_client->getFilters()\n );\n\n return $response;\n }", "title": "" }, { "docid": "ef32ee1ce17bc3a833046e105da543fa", "score": "0.49423796", "text": "public function deleteById($visitorsId);", "title": "" }, { "docid": "c23379b9cce9d57727281bad17801638", "score": "0.49369553", "text": "public function destroy($id)\n {\n $this->subscribers->delete($id);\n\n return redirect()->back();\n }", "title": "" }, { "docid": "55d10f8258102c5848c6814551574089", "score": "0.49120244", "text": "public function deleteTm (\r\n $id,\r\n $tmId) \r\n {\r\n //the base uri for api requests\r\n $queryBuilder = Configuration::$BASEURI;\r\n \r\n //prepare query string for API call\r\n $queryBuilder = $queryBuilder.'/api/translation_memories/{tm_id}/segments/{id}';\r\n\r\n //process optional query parameters\r\n APIHelper::appendUrlWithTemplateParameters($queryBuilder, array (\r\n 'id' => $id,\r\n 'tm_id' => $tmId,\r\n ));\r\n\r\n //validate and preprocess url\r\n $queryUrl = APIHelper::cleanUrl($queryBuilder);\r\n\r\n //prepare headers\r\n $headers = array (\r\n 'user-agent' => 'Qordoba 2.0'\r\n );\r\n\r\n //prepare API request\r\n $request = Unirest::delete($queryUrl, $headers, NULL, $this->basicAuthUserName, $this->basicAuthPassword);\r\n\r\n //and invoke the API call request to fetch the response\r\n $response = Unirest::getResponse($request);\r\n\r\n //Error handling using HTTP status codes\r\n if (($response->code < 200) || ($response->code > 206)) { //[200,206] = HTTP OK\r\n throw new APIException(\"HTTP Response Not OK\", $response->code, $response->body);\r\n }\r\n }", "title": "" }, { "docid": "68ec0eb6e62f6fdabe2a25872765d077", "score": "0.48995352", "text": "public function delete($id)\r\n {\r\n Subject::findOrFail($id)->delete();\r\n\r\n return response(null, 204);\r\n }", "title": "" }, { "docid": "17ca217f22ae628afd76bd7272793b7e", "score": "0.4897938", "text": "public function unlinkCustomersFromCertificateAsyncWithHttpInfo($company_id, $id, $x_avalara_client = 'Swagger UI; 20.9.0; Custom; 1.0', $body = null)\n {\n $returnType = '\\Together\\Taxes\\Provider\\AvaTax\\Swagger\\Model\\FetchResultCustomerModel';\n $request = $this->unlinkCustomersFromCertificateRequest($company_id, $id, $x_avalara_client, $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 }", "title": "" }, { "docid": "33ab118e4c77f90c2ba0f7d224c1b84a", "score": "0.48843175", "text": "abstract public function removeSubscriber($user);", "title": "" }, { "docid": "0ab93d14a5d3ac358a0f1d25bac7d8ac", "score": "0.48813814", "text": "public function deleteById();", "title": "" }, { "docid": "4e8f71a5ba58b3d5c17fd68ce0af8421", "score": "0.4878249", "text": "public function removeSubsidization($id, ConsumerSubsidizationService $consumerSubsidizationService)\n {\n try {\n $consumerSubsidizationService->removeByConsumerId($id);\n } catch (\\Throwable $t) {\n return response()->json(['error' => $t->getMessage()]);\n }\n\n return response()->json(['redirect_url' => action('ConsumerController@show', ['id' => $id])]);\n }", "title": "" }, { "docid": "cf8fd1a628e926dae9e7e37b1d3e9fc9", "score": "0.4874254", "text": "public function destroy($id)\n {\n if(Subscription::destroy($id)){\n return Response('inscrição cancelada com sucesso!', 200);\n }\n return Response('Não foi possível realizar a operação', 500); \n }", "title": "" }, { "docid": "0cd5aae019207f93f11bd153b1f1103c", "score": "0.48698995", "text": "public function deleteSubscribersAsync($email = null, $first_name = null, $last_name = null, $source = null, $order_id = null, $date_created = null, $date_modified = null, $accept = 'application/json', $content_type = 'application/json')\n {\n return $this->deleteSubscribersAsyncWithHttpInfo($email, $first_name, $last_name, $source, $order_id, $date_created, $date_modified, $accept, $content_type)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "33fb75d8c4260aab5bd4eaada8faecff", "score": "0.4864349", "text": "public function conversationDeleteAsyncWithHttpInfo($cnx_id, $id)\n {\n $returnType = '';\n $request = $this->conversationDeleteRequest($cnx_id, $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 }", "title": "" }, { "docid": "21abd2778c3ee33008f60728a5c96375", "score": "0.4860717", "text": "public function delete($id) {}", "title": "" }, { "docid": "21abd2778c3ee33008f60728a5c96375", "score": "0.4860717", "text": "public function delete($id) {}", "title": "" }, { "docid": "5638118a917983e03bae9eeb74a02a17", "score": "0.48534998", "text": "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('TaskBundle:Subtask')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Subtask entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('subtask'));\n }", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" }, { "docid": "6bda7c3c0fcf520351ed30e101312efd", "score": "0.48422647", "text": "public function delete($id);", "title": "" } ]
ffd2d7c10eac6573815aadbdd67b88bd
Instantiate a new Controller instance.
[ { "docid": "762c096e64a4d074462b20600aa6af36", "score": "0.0", "text": "public function __construct()\n\t{\n\t\tdate_default_timezone_set('Asia/Shanghai'); //时区配置\n\t}", "title": "" } ]
[ { "docid": "f565f431a22e82abe87e5c68eb584e12", "score": "0.7321355", "text": "private function makeController()\n {\n\n new MakeController($this, $this->files);\n }", "title": "" }, { "docid": "10fd6cfcfb90d057fcdf8ec6193fa1d4", "score": "0.72623354", "text": "public function loadController() {\n\t\tif (isset($this->Controller)) {\n\t\t\treturn $this->Controller;\n\t\t}\n\n\t\tif (!class_exists('Controller')) {\n\t\t\tApp::import('Controller', 'Controller', false);\n\t\t}\n\t\t$this->Controller = new Controller();\n\t\t$this->Controller->uses = array();\n\n\t\t$this->Controller->constructClasses();\n\t\t$this->Controller->startupProcess();\n\n\t\treturn $this->Controller;\n\t}", "title": "" }, { "docid": "18e976b5fe04d773fbcc524bd8e07d39", "score": "0.7258267", "text": "public static function init(): Controller\n {\n return new CompanyController();\n }", "title": "" }, { "docid": "3e36ab8b17f0acf1f70a5f948e8e68f9", "score": "0.72107214", "text": "public function setController()\n {\n if (isset($this->url[0])) {\n if (file_exists(__DIR__.'/../controllers/'.$this->url[0].'Controller.php')) {\n $this->controller = '\\App\\\\Controllers\\\\'.ucfirst($this->url[0]).'Controller';\n }\n unset($this->url[0]);\n }\n return new $this->controller;\n }", "title": "" }, { "docid": "8e7ef76dcdf92f45620df5e3bb3c0e7b", "score": "0.6999089", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(MakeModuleController::class, array_filter([\n 'name' => \"{$controller}Controller\",\n 'module' => $this->argument('module'),\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => $this->option('api'),\n '--requests' => $this->option('requests') || $this->option('all'),\n ]));\n }", "title": "" }, { "docid": "7522b4e75e8022f9b4896d6adb036aec", "score": "0.69978654", "text": "protected function createController($controllerName) {\n require_once PATH_CONTROLLERS_DIR.$controllerName.'.php';\n return new $controllerName;\n }", "title": "" }, { "docid": "521cf4eb14600a330fed817dc21b0a7f", "score": "0.69947416", "text": "private function instanceController()\n\t\t{\n\t\t\tglobal $error;\n\t\t\tif ( count($this->url) > 3 ) {\n\t\t\t\t$file = 'app/controller/'.$this->controller.'Controller.php';\n\t\t\t} else {\n\t\t\t\t$file = 'app/controller/'.URL_CONTROLLER.'Controller.php';\n\t\t\t}\n\t\t\t\n\t\t\tif ( empty($this->folder) )\n\t\t\t\t{\n\t\t\t\t\t$pathFile = 'App\\Controller\\\\'.$this->controller.'Controller';\n\t\t\t\t\t$class = $pathFile.'\\\\'.$this->controller.'Controller';\n\t\t\t\t\t\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$pathFile = 'App\\Controller\\\\'.$this->folder.'\\\\'.$this->controller.'Controller';\n\t\t\t\t\t$class = $pathFile.'\\\\'.$this->controller.'Controller';\n\t\t\t\t\t$file = 'app/controller/'.$this->folder.'/'.$this->controller.'Controller.php';\n\t\t\t\t}\n\t\t\t$accionController = $this->action;\n\t\t\t\n\t\t\t// ejecucion de un bloque try and catch para poder gestionar el error\n\t\t\tif ( file_exists($file) ) \n\t\t\t{\n\t\t\t\t$object = new $class();\n\t\t\t\t$object->$accionController();\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$error = new ManagerError\\ManagerError('Archivo no encontrado','404','User');\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "d9326c5cccbc2dd88181065b59b8d16d", "score": "0.6939277", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('package:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n '--namespace' => $this->getNamespaceInput(),\n '--dir' => $this->getDirInput(),\n ]);\n }", "title": "" }, { "docid": "ccd5cc4e8c9e85da6eb3064d6e02d0c5", "score": "0.6924262", "text": "private function load_controller() {\n\t\tif ( empty( $this->url[0] ) ) {\n\n\t\t\t// Default controller\n\t\t\t$this->controller = new Index_Controller;\n\n\t\t} else {\n\n\t\t\t// Construct the controller name\n\t\t\t$controller = ucfirst( strtolower( $this->url[0] ) ) . '_Controller';\n\n\t\t\t// Check if the requested controller exists\n\t\t\tif ( class_exists( $controller ) ) {\n\n\t\t\t\t$this->controller = new $controller;\n\n\t\t\t} else {\n\n\t\t\t\ttrigger_error( 'Error loading controller.', E_USER_NOTICE );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5e49e15057f2dc0fc7a292ca0315aed4", "score": "0.6899328", "text": "public static function build(): Controller;", "title": "" }, { "docid": "6f4b3e1f2d4642658323f5ca5d89ff15", "score": "0.6888056", "text": "public function createController(){\n\t\t// Check Class\n\t\tif(class_exists($this->controller)){\n\t\t\t$parents = class_parents($this->controller);\n\t\t\t// Check Extend\n\t\t\tif(in_array(\"Controller\", $parents)){\n\t\t\t\tif(method_exists($this->controller, $this->action)){\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t} else {\n\t\t\t\t\t// Method Does Not Exist\n\t\t\t\t\techo '<h1>Method does not exist</h1>';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Base Controller Does Not Exist\n\t\t\t\techo '<h1>Base controller not found</h1>';\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t// Controller Class Does Not Exist\n\t\t\techo '<h1>Controller class does not exist</h1>';\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "fff7ef09f4829cc8af5393dca2558e2c", "score": "0.6878376", "text": "function loadControler() {\n $name = ucfirst($this->request->controller) . 'Controller';\n $file = root . DIRECTORY_SEPARATOR . 'controller' . DIRECTORY_SEPARATOR . $name . '.php';\n require $file;\n return new $name($this->request);\n }", "title": "" }, { "docid": "7c22a989693f747de29e4a8acfe67cd7", "score": "0.6801946", "text": "public function createController(){\n if(class_exists($this->controller)){\n $parents = class_parents($this->controller);\n\n // check extends\n if(in_array('Controller', $parents)){\n if(method_exists($this->controller, $this->action)){\n return new $this->controller($this->action, $this->request);\n }else{\n // 404 page not found\n echo \"<center><h1>404</h1><br><h3>Method does not exist</h3></center>\";\n }\n }else{\n // 404 page not found\n echo \"<center><h1>404</h1><br><h3>Base controller does not exist</h3></center>\";\n }\n\n }else{\n // 404 page not found\n echo \"<center><h1>404</h1><br><h3>Class does not exist</h3></center>\";\n }\n }", "title": "" }, { "docid": "5e48ebea1216127ead2d9806b65182f8", "score": "0.67950344", "text": "public static function getController()\n {\n if (is_null(self::$instance))\n self::$instance = new Controller();\n return self::$instance;\n }", "title": "" }, { "docid": "5289d69f9bdc993d46a5b5a133a834ce", "score": "0.6689348", "text": "public function __construct(){\n \n //Setup sessions\n Session::start();\n \n //Get controller, action & params from user\n $this->splitUrl();\n \n // check for the controller.. Does it exist?\n $controllerFile = './application/controllers/' . (($this->area) ? $this->area . '/' : '') . $this->controller . '.php';\n \n if(file_exists($controllerFile)){\n //if so, load the controller and create a new object\n require($controllerFile);\n $this->controller = new $this->controller();\n \n //Now check for an action\n if(method_exists($this->controller, $this->action)){\n call_user_func_array(array($this->controller, $this->action), $this->params);\n } else {\n //Fallback to the default index action\n //$this->controller->index();\n //die(\"Invalid URL (1)\");\n Redirect::to(404);\n }\n } else {\n //Invalid URL.. Show 404? \n //die(\"Invalid URL (2)\");\n Redirect::to(404);\n }\n \n }", "title": "" }, { "docid": "14fafcd88b131b2eaa5f30e438b6d974", "score": "0.66889054", "text": "public function createController()\n {\n // Derive the correct namespace\n $name = $this->qualifyClass(\"Http/Controllers/{$this->singular()}Controller\");\n\n // Determine the file path\n $path = $this->getPath($name);\n\n // Ensure this controller doesn't already exist\n if ($this->alreadyExists($path)) {\n $this->error('Controller already exists!');\n return false;\n }\n\n // Ensure the path is reachable\n $this->makeDirectory($path);\n\n // Fetch out stubbed file template\n $stub = $this->files->get($this->stubPath('controller'));\n\n // Replace stubbed placeholders with real values\n $controller = $this->replaceNamespace($stub, $name)->replaceClass($stub, $name);\n\n $replacements = [\n 'DummyFullModelClass' => $this->singular(),\n 'DummyModelClass' => class_basename($this->singular()),\n 'DummyModelVariablePlural' => lcfirst($this->plural()),\n 'DummyModelVariable' => lcfirst($this->singular()),\n ];\n\n $controller = str_replace(array_keys($replacements), array_values($replacements), $controller);\n\n // Write the file to disk\n $this->files->put($path, $controller);\n\n $this->info('Controller created successfully.');\n }", "title": "" }, { "docid": "e88f1c4982abeadc16518a9506523df4", "score": "0.6648008", "text": "public function loadController() {\n $non_camel_case_name = tableize($this->request->controller).'_controller';\n // Get class name\n $name = classify($non_camel_case_name);\n // Get file name to load it at runtime\n $file = APPLICATION_ROOT.'controllers/'.$non_camel_case_name.'.php';\n // Load controller file\n require($file);\n // Load controller $name\n $controller = new $name();\n return $controller;\n }", "title": "" }, { "docid": "08bea968232eea8d3853a40ab4236c6d", "score": "0.6619704", "text": "public function __construct(){\n\n $url = $this->getUrlParams();\n \n // Checking for controller\n if(isset($url[0]) && file_exists(APPROOT . \"/controllers/\" . ucfirst($url[0]) . \".php\")){\n $this->controller = ucfirst($url[0]);\n unset($url[0]);\n }else{\n return handleResponse(404,\"Controller not found. It may occurs if you haven't passed the controller or the controller does not exist.\");\n }\n\n // Requring the controller\n require_once APPROOT . \"/controllers/\" . $this->controller . \".php\";\n // Initializing the controller\n $this->controller = new $this->controller();\n\n // Checking for method\n if(isset($url[1]) && method_exists($this->controller, $url[1])){\n // If method is passed and exists\n $this->method = $url[1];\n unset($url[1]);\n } else if(isset($url[1])){\n // If method is passed but doesn't exist\n return handleResponse(404, \"Method $url[1] does not exist.\");\n }\n\n // Checking for parameters\n $this->parameters = $url ? array_values($url) : [];\n\n // Call the method inside the controller with the array of parameters\n call_user_func_array([$this->controller, $this->method], $this->parameters);\n\n }", "title": "" }, { "docid": "14112aaf6855b202948ff99a111500e5", "score": "0.65785986", "text": "private function createController(Request $request)\n {\n $controller = \"Post\"; // Default controller\n if ($request->existParameter('controller'))\n {\n $controller = $request->getParameter('controller');\n $controller = ucfirst (strtolower($controller)); // First letter in upper case\n }\n\n // Create the controller file name\n $classController = $controller . \"Controller\";\n $fileController = \"controller/\" . $classController . \".php\"; // concatenation for build the name of the controller file\n if (file_exists($fileController)) \n {\n // Instantiation of the controller adapted to the query\n require($fileController);\n $controller = new $classController();\n $controller->setRequest($request);\n return $controller;\n }\n else\n throw new Exception(\"Fichier '$fileController' introuvable\");\n }", "title": "" }, { "docid": "741d17127e5bffbe3e123e20f5163cec", "score": "0.65697765", "text": "public function CreateController()\n {\n if(class_exists($this->controller))\n {\n $parents = class_parents($this->controller);\n\n //does the class extend the controller class\n //if not error to bad url\n if(in_array('BaseController', $parents))\n {\n //does the class contain the requested method\n //if not error to bad url\n if(method_exists($this->controller, $this->action))\n {\n return new $this->controller($this->action, $this->urlParams);\n }\n else\n {\n return new Error('BadUrl', $this->urlValues);\n }\n }\n else\n {\n return new Error('BadUrl', $this->urlValues);\n }\n }\n else\n {\n return new Error('BadUrl', $this->urlValues);\n }\n }", "title": "" }, { "docid": "9224437f2f27e230e9e4591310df8791", "score": "0.6520007", "text": "public function initController()\n\t{\n\t\t// already created\n\t\t// already created\n\t\tif ($this->controller instanceof Controller) {\n\t\t\treturn;\n\t\t}\n\t\t$slug = $this->request->getControllerString();\n//\t\tllog($slug);\n\t\tif (!$slug) {\n\t\t\tthrow new Exception404($slug);\n\t\t}\n\t\tif ($_REQUEST['d']) {\n\t\t\t$this->log(__METHOD__, $slug);\n\t\t}\n\t\t$this->loadController($slug);\n\t\t$this->bodyClasses[] = is_object($this->controller) ? get_class($this->controller) : '';\n\t\tTaylorProfiler::stop(__METHOD__);\n\t}", "title": "" }, { "docid": "b69e39d0dbba22f31778a3f49782d751", "score": "0.65084195", "text": "public function __construct() {\n if (empty($_GET[\"controller\"])) {\n $_GET[\"controller\"] = \"Index\";\n }\n include_once \"controllers/\". $_GET[\"controller\"] .\".php\";\n $obj = new $_GET[\"controller\"];\n return (empty($_GET[\"method\"]) ? $obj : $obj->$_GET[\"method\"]());\n }", "title": "" }, { "docid": "52d5b0d26b9c5c6f460a8454d777128b", "score": "0.64849025", "text": "private function initController()\n {\n $container = $this->request->getControllerContainer();\n $container->validate();\n if(!$this->controller)\n $this->controller = $container\n ->getController()\n ->setRequest($this->request)\n ->setResponse($container->getResponse())\n ;\n return $this;\n }", "title": "" }, { "docid": "55f605d4165a52b1b46b8eb8c5ef254a", "score": "0.64747703", "text": "public function __invoke(): Controller\\Customer\n {\n // Since we don't have a database, we're going to insert data manually and pretend the database exists.\n $data = new Vo\\Customer('Joe Schmoe', $this->getRentals());\n\n $model = new Model\\Customer($data);\n $view = new View\\Customer($model);\n\n $controller = new Controller\\Customer($model, $view);\n\n return $controller;\n }", "title": "" }, { "docid": "c6ebab64f6899be399a108fc8801c174", "score": "0.64716864", "text": "private function autoInjectConstructor () {\n\n\t\t$reflectionClass = new \\ReflectionClass($this->controller);\n\t\t$parameters = $reflectionClass->getConstructor()->getParameters();\n\t\t$countParams = $reflectionClass->getConstructor()->getNumberOfParameters();\n\t\t$arguments = $this->getDataArguments('constructor', $parameters, $countParams);\n\n\t\tif ($countParams === 0) {\n\t\t\t$this->controller = new $this->controller;\n\t\t}\n\n\t\tif ($countParams > 0) {\n\t\t\t$class = new \\ReflectionClass($this->controller);\n\t\t\t$this->controller = $class->newInstanceArgs( $arguments);\n\t\t}\n\n\t}", "title": "" }, { "docid": "a63577bbe00a8d905bcd679acc6c0582", "score": "0.64484054", "text": "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "f56a64bb7cfeb36f9051c562c69f3277", "score": "0.6413246", "text": "protected function callController() {\n\n\t\t\t// Create class name\n\t\t\t$className = self::get(\"applicationNamespace\") . \"\\\\Controllers\\\\\" . $this->_activeRoute->controller;\n\n\t\t\t// Create the controller\n\t\t\t$controllerInstance = new $className($this->_request, $this->_activeRoute, $this->_urlVariables);\n\n\t\t\t// Is it a Controller-derived classed?\n\t\t\tif (!is_subclass_of($controllerInstance, \"ChickenWire\\Core\\Controller\")) {\n\t\t\t\tthrow new \\Exception(get_class($controllerInstance) . \" does not extend ChickenWire\\\\Core\\\\Controller.\", 1);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Call the action!\n\t\t\t$controllerInstance->{$this->_activeRoute->action}();\n\n\n\t\t}", "title": "" }, { "docid": "52f7bec32720f6b40740a4ff365a324c", "score": "0.6413203", "text": "private static function toController($controller, Request $req, Response $resp){\n $c = think_controller_analyze($controller);// Analyze controller reference name\n $appNameSpace = $c->appNameSpace;\n $controllerNameSpace = $c->controllerNameSpace;\n if(in_array($appNameSpace, self::$deny_app_list)){// Deny app list works\n throw new ControllerNotFoundException(null, $appNameSpace.\"/\".$controllerNameSpace);\n }\n $methodName = $c->methodName;\n $classFullName = $c->classFullName;\n try{\n global $TW_ENV_REQUEST, $TW_ENV_LANG;\n $req->controllerInfo = $c; // Inject Controller environment info\n $TW_ENV_REQUEST = $req;\n $TW_ENV_LANG = $req->getLang();\n $controller = new $classFullName($req, $resp); // Get a Controller instance\n }catch (\\Error $e){\n /* Locate the Controller PHP file */\n $phpFile = Loader::classToAppFilePathPsr0($classFullName);\n if(!is_file($phpFile)){\n $phpFile = Loader::classToAppFilePath($classFullName);\n }\n if(is_file($phpFile)){\n $errorMsg = \"\";\n $result = Debug::checkPHPSyntax($phpFile, $errorMsg);// Check syntax error\n if(!$result){\n throw new SyntaxParseException($phpFile, $errorMsg);\n }\n }\n /* File not found */\n throw new ControllerNotFoundException($e, $appNameSpace.\"/\".$controllerNameSpace);\n }\n if(!is_callable(array($controller, $methodName))){\n /* Method not found */\n throw new MethodNotFoundException(null, $appNameSpace.\"/\".$controllerNameSpace, $methodName);\n }\n try{\n /* Call _init method of Controller */\n if(is_callable(array($controller, \"_init\"))){\n $controller->_init();\n }\n /* Call _beforeAction method of Controller */\n if(is_callable(array($controller, \"_beforeAction\"))){\n $controller->_beforeAction($methodName);\n }\n /* Call the big guy */\n $controllerRet = $controller->$methodName($req, $resp);\n return $controllerRet;\n }catch (\\Error $e){\n throw new ControllerException($e, $appNameSpace.\"/\".$controllerNameSpace, $methodName);\n }catch (\\PDOException $e){\n throw new DbException($e, $appNameSpace.\"/\".$controllerNameSpace, $methodName);\n }catch (\\Exception $e){\n throw new ControllerException($e, $appNameSpace.\"/\".$controllerNameSpace, $methodName);\n }\n }", "title": "" }, { "docid": "0b34426a487f3d5feb0fe456c48c735b", "score": "0.64010924", "text": "protected function getControllerObject($className)\n {\n if (!class_exists($className)) {\n throw new \\Exception('Controller class \"' . $className . '\" does not exist');\n }\n\n return new $className();\n }", "title": "" }, { "docid": "d4769cc643f23b8ae5ddf8d17915f6c8", "score": "0.63950384", "text": "function factory($type, $router = null) {\n\t\t\n\t\t$type = strtolower($type);\n\t\t\n\t\tControllerFactory::import($type);\n\t\t\n\t\t$class_name = Inflector::camelize(basename($type)).'Controller';\n\t\t\n\t\tif (!class_exists($class_name)) {\n\t\t\ttrigger_error(\"Controller file for '$type' exists, but doesn't contain controller class '$class_name'\", E_USER_ERROR);\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$controller = new $class_name;\n\t\t\n\t\tif (!is_a($controller, 'Controller')) {\n\t\t\ttrigger_error(\"Class '$class_name' doesn't extend Controller\", E_USER_ERROR);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$controller->full_type = $type;\n\t\t$controller->router = $router;\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "1da6b6bfbe1b17981fb3006484b5611d", "score": "0.63941324", "text": "public function createController(){\n // check for class User in the url\n if(class_exists($this->controller)){\n //class_parents — Return parent classes of the given class as array\n //eg.User class in index.php/User/register\n //if User extends class Controller, then result is an array of parent class Controller\n $parents = class_parents($this->controller);\n \n //check Extend\n //in_array(needle, haystack)\n //checks for class Controller in the returned array\n if(in_array('Controller', $parents)){\n //does the class User have a method register?\n //bool method_exists ( mixed $object , string $method_name )\n if(method_exists($this->controller, $this->action)){\n //creates an instance object of the User class\n //this class is extends base Controller class\n //its passed a method (register) and the url (index.php/Users/register)\n return new $this->controller($this->action, $this->request);\n }else{\n //Method does not exist\n echo 'Method does not exist';\n return;\n }\n }else {\n //Base controller not found\n echo \"Base controller not found\";\n }\n }else{\n //Controller class does not exist\n echo \"Controller class does not exist\";\n }\n }", "title": "" }, { "docid": "ef09b25682a9f1867aa178915b4fd85f", "score": "0.6375087", "text": "protected function _initController()\n\t{\n\t\t$request = $this->getRequest();\n\t\t$response = $this->getResponse();\n\t\tif(isset($this->modes[$request->getModeName()]) && isset($this->modes[$request->getModeName()]['controller']))\n\t\t{\n\t\t\t$class_name = $this->modes[$request->getModeName()]['controller'];\n\t\t\t$class_path = vartrue($this->modes[$request->getModeName()]['path']);\n\n\t\t\tif($class_path)\n\t\t\t{\n\t\t\t\trequire_once(e107::getParser()->replaceConstants($class_path));\n\t\t\t}\n\t\t\tif($class_name && class_exists($class_name))//NOTE: autoload in the play\n\t\t\t{\n\t\t\t\t$this->_current_controller = new $class_name($request, $response);\n\t\t\t\t//give access to current request object, user defined init\n\t\t\t\t$this->_current_controller->setRequest($this->getRequest())->init();\n\t\t\t}\n\t\t\t// Known controller (found in e_admin_dispatcher::$modes), class not found exception\n\t\t\telse\n\t\t\t{\n\t\t\t\t// TODO - admin log\n\t\t\t\t// get default controller\n\t\t\t\t$this->_current_controller = $this->getDefaultController();\n\t\t\t\t// add messages\n\t\t\t\te107::getMessage()->add('Can\\'t find class <strong>&quot;'.($class_name ? $class_name : 'n/a').'&quot;</strong> for controller <strong>&quot;'.ucfirst($request->getModeName()).'&quot;</strong>', E_MESSAGE_ERROR)\n\t\t\t\t\t->add('Requested: '.e_SELF.'?'.$request->buildQueryString(), E_MESSAGE_DEBUG);\n\t\t\t\t//\n\t\t\t\t$request->setMode($this->getDefaultControllerName())->setAction('e404');\n\t\t\t\t$this->_current_controller->setRequest($request)->init();\n\t\t\t}\n\n\t\t\tif(vartrue($this->modes[$request->getModeName()]['ui']))\n\t\t\t{\n\t\t\t\t$class_name = $this->modes[$request->getModeName()]['ui'];\n\t\t\t\t$class_path = vartrue($this->modes[$request->getModeName()]['uipath']);\n\t\t\t\tif($class_path)\n\t\t\t\t{\n\t\t\t\t\trequire_once(e107::getParser()->replaceConstants($class_path));\n\t\t\t\t}\n\t\t\t\tif(class_exists($class_name))//NOTE: autoload in the play\n\t\t\t\t{\n\t\t\t\t\t$this->_current_controller->setParam('ui', new $class_name($this->_current_controller));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->_current_controller->setParam('modes', $this->modes);\n\n\t\t}\n\t\t// Not known controller (not found in e_admin_dispatcher::$modes) exception\n\t\telse\n\t\t{\n\t\t\t// TODO - admin log\n\t\t\t$this->_current_controller = $this->getDefaultController();\n\t\t\t// add messages\n\t\t\te107::getMessage()->add('Can\\'t find class for controller <strong>&quot;'.ucfirst($request->getModeName()).'&quot;</strong>', E_MESSAGE_ERROR)\n\t\t\t\t->add('Requested: '.e_SELF.'?'.$request->buildQueryString(), E_MESSAGE_DEBUG);\n\t\t\t// go to not found page\n\t\t\t$request->setMode($this->getDefaultControllerName())->setAction('e404');\n\t\t\t$this->_current_controller->setRequest($request)->init();\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c30b5e0cdc833f02671bd56ba0818419", "score": "0.6358297", "text": "function create_controller () {\n\t\t$file_content = file_get_contents('generator/GeneratedObjectController.php');\n\n\t\t// replace names\n\t\t$file_content = $this->replace_names($file_content);\n\n\t\t// replace datatable display & search columns\n\t\t$content = [];\n\t\tforeach ($this->columns as $name => $type) {\n\t\t\t$content[] = \"'$name'\";\n\t\t}\n\t\t$file_content = str_replace('// generator display columns', '$this->datatable->display_columns = ['.implode(', ', $content).'];', $file_content);\n\t\t$file_content = str_replace('// generator search columns', '$this->datatable->search_columns = ['.implode(', ', $content).'];', $file_content);\n\n\t\t// replace validator rules\n\t\t$content = '';\n\t\tforeach ($this->columns as $name => $type) {\n\t\t\tif ($type != 'ai') {\n\t\t\t\t$content .= '\t\t$validator->rules[] = [\\''.ucfirst(str_replace('_', ' ', $name)).'\\', \\''.$name.'\\', \\'required\\'];'.PHP_EOL;\n\t\t\t}\n\t\t}\n\t\t$file_content = str_replace('\t\t// generator rules', rtrim($content, PHP_EOL), $file_content);\n\n\t\t// create new class file with content\n\t\tfile_put_contents('app/controllers/'.$this->name['class'].'Controller.php', $file_content);\n\t}", "title": "" }, { "docid": "2f8252c499ee07c46b4ca37b039a7869", "score": "0.6351041", "text": "public static function factory($controller)\n {\n $className = \"app\\\\controllers\\\\{$controller}\";\n return class_exists($className) ? new $className() : null;\n }", "title": "" }, { "docid": "93d7df3a09cc014864daa234c8723abb", "score": "0.63450176", "text": "public function makeApiController()\n {\n $controllerClass = \"{$this->module}/{$this->module}Controller\";\n\n $this->call('make:controller', [\n 'name' => $controllerClass,\n '--api' => true,\n ]);\n }", "title": "" }, { "docid": "e16825923612e20f95255ba32ba01a5f", "score": "0.63066584", "text": "public function __construct()\n {\n $url = $this->getUrl();\n if (!empty($url)) {\n // Look in controllers folder for controller\n if (file_exists('../Private/controllers/' . ucwords($url[0]) . '.php')) {\n // If exists, set as controller\n $this->currentController = ucwords($url[0]);\n // Unset 0 index\n unset($url[0]);\n }\n }\n\n // Require the current controller\n require_once('../Private/controllers/' . $this->currentController . '.php');\n\n // Instantiate the current controller\n $this->currentController = new $this->currentController;\n\n // Check if second part of url is set (method)\n if (isset($url[1])) {\n\n // Check if method/function exists in current controller class\n if (method_exists($this->currentController, $url[1])) {\n // Set current method if it exists\n $this->currentMethod = $url[1];\n // Unset 1 index\n unset($url[1]);\n }\n }\n\n // Get params - Any values left over in url are params\n $this->params = $url ? array_values($url) : [];\n\n // Call a callback with an array of parameters\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "title": "" }, { "docid": "bb4542d12133680bee2ccc4ff64862ac", "score": "0.6303515", "text": "public function createController(string $controller, array $services) {\n return new $controller($this->getServices($services));\n }", "title": "" }, { "docid": "cfcabc72a757dd305cc1e08a6bd5f845", "score": "0.6293323", "text": "private function makeApiController()\n {\n\n new MakeApiController($this, $this->files);\n }", "title": "" }, { "docid": "384c7ecb6e4166e49d7a6ea293edff6e", "score": "0.6275489", "text": "public function __construct() {\n $url = $this->parseUrl();\n if(file_exists('../app/controllers/'.$url[0].'.php'))\n {\n $this->controller = $url[0];\n unset($url[0]);\n }\n require_once '../app/controllers/'.$this->controller.'.php';\n $this->controller = new $this->controller;\n\n if(isset($url[1])) {\n if (method_exists($this->controller, $url[1]))\n {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n $this->params = $url ? array_values($url) : [];\n call_user_func_array([$this->controller,$this->method],$this->params);\n }", "title": "" }, { "docid": "357d9524ad24f73d9991299d2869f17f", "score": "0.6252684", "text": "public function __construct() {\n\t\t$this->categoryController = new CategoriaController();\n\t}", "title": "" }, { "docid": "930be58cde198b15fd1f9a45b4192794", "score": "0.62430465", "text": "protected function _loadController() {\n\t\t\n\t\tif (!$this->controllerName) {\n\t\t\t$this->err(__d('cake_console', 'Controller not found'));\n\t\t}\n\n\t\t$plugin = null;\n\t\tif ($this->plugin) {\n\t\t\t$plugin = $this->plugin . '.';\n\t\t}\n\n\t\t$controllerClassName = $this->controllerName . 'Controller';\n\t\tApp::uses($controllerClassName, $plugin . 'Controller');\n\t\tif (!class_exists($controllerClassName)) {\n\t\t\t$file = $controllerClassName . '.php';\n\t\t\t$this->err(__d('cake_console', \"The file '%s' could not be found.\\nIn order to bake a view, you'll need to first create the controller.\", $file));\n\t\t\treturn $this->_stop();\n\t\t}\n\t\t$controllerObj = new $controllerClassName();\n\t\t$controllerObj->plugin = $this->plugin;\n\t\t$controllerObj->constructClasses();\n\t\t$modelClass = $controllerObj->modelClass;\n\t\t$modelObj = $controllerObj->{$controllerObj->modelClass};\n\n\t\tif ($modelObj) {\n\t\t\t$primaryKey = $modelObj->primaryKey;\n\t\t\t$displayField = $modelObj->displayField;\n\t\t\t$singularVar = Inflector::variable($modelClass);\n\t\t\t$singularHumanName = $this->_singularHumanName($this->controllerName);\n\t\t\t$schema = $modelObj->schema(true);\n\t\t\t$fields = array_keys($schema);\n\t\t\t$associations = $this->_associations($modelObj);\n\t\t} else {\n\t\t\t$primaryKey = $displayField = null;\n\t\t\t$singularVar = Inflector::variable(Inflector::singularize($this->controllerName));\n\t\t\t$singularHumanName = $this->_singularHumanName($this->controllerName);\n\t\t\t$fields = $schema = $associations = array();\n\t\t}\n\t\t$pluralVar = Inflector::variable($this->controllerName);\n\t\t$pluralHumanName = $this->_pluralHumanName($this->controllerName);\n\n\t\treturn compact('modelClass', 'schema', 'primaryKey', 'displayField', 'singularVar', 'pluralVar',\n\t\t\t\t'singularHumanName', 'pluralHumanName', 'fields', 'associations', 'modelObj');\n\t}", "title": "" }, { "docid": "ab9c79723d50f2af14860db38ca5b0bd", "score": "0.6225677", "text": "public function getController()\n\t{\n\t\tif (! $this->controller) {\n\t\t\t$class = $this->parseControllerCallback()[0];\n\n\t\t\t$this->controller = app()->make(ltrim($class, '\\\\'));\n\t\t}\n\n\t\treturn $this->controller;\n\t}", "title": "" }, { "docid": "3c2b23a318f8f600853306f541ad1954", "score": "0.62227714", "text": "function __construct()\n {\n $url = $_GET['url'];\n $url = rtrim($url, '/');\n $url = explode('/', $url);\n\n if($url[0] == '')\n $url[0] = 'suroojoop';\n\n $file = 'controllers/'.$url[0].'.php';\n if(file_exists($file))\n {\n require $file;\n }\n else\n {\n exit(\"<div style=\\\"border: 1px solid #000000; padding: 5px;\\\">Controller <b>{$url[0]}</b> does not exists.</div>\");\n }\n $controller = new $url[0];\n\n if(!method_exists($controller, $url[1]))\n {\n $url[1] = 'index';\n }\n\n if(isset($url[2]))\n {\n $controller->{$url[1]}($url[2]);\n }\n else\n {\n if(isset($url[1]))\n {\n $controller->{$url[1]}();\n }\n }\n }", "title": "" }, { "docid": "d8818fd610a4dafbfbf5d5abff4e5889", "score": "0.6218752", "text": "function findController($c, $path = '') {\n\n loadClass(\"Controller\", $c, $path);\n return new $c;\n}", "title": "" }, { "docid": "ab875415870cbfd2a7220bedb5aaaa16", "score": "0.62122905", "text": "public function initController() {\n if (false == is_null($this->activeRoute)) {\n return $this->initRouteController();\n }\n\n return $this->initViewController();\n }", "title": "" }, { "docid": "901fccfeeeff48ee3d2a996f0035f62f", "score": "0.6211232", "text": "protected function buildController(): void\n {\n $path = $this->namespace.$this->controllerPath.$this->argument('controller');\n // Controller namespace\n $this->controller = str_replace('/', '\\\\', $path);\n if ($this->laravel->runningInConsole()) {\n // Controller does not exists\n if (!class_exists($this->controller.$this->controllerExtension)) { // Append the 'Controller' suffix for path checking\n $response = $this->ask(\"Controller [{$this->controller}] does not exist. Would you like to create it?\", 'Yes');\n if ($this->rateResponse($response)) {\n // Build the controller by mocking the Artisan::call()\n $this->mock('controller', $this->controller.$this->controllerExtension);\n $this->line(\"Controller [{$this->controller}] has been successfully created.\");\n } else {\n $this->line(\"Controller [{$this->controller}] does not get created.\");\n }\n }\n }\n\n $controllerParts = explode('\\\\', $this->controller);\n $this->controllerName = array_pop($controllerParts);\n }", "title": "" }, { "docid": "459aea6e624541a0734fce30ba4f4f1a", "score": "0.6194141", "text": "private function callController() {\n $controllerRequest = explode('@', $this->requestRoute['action']['uses']);\n $controllerString = 'App' . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . $controllerRequest[0];\n $controller = new $controllerString;\n\n call_user_func_array([$controller, $controllerRequest[1]], $this->requestVariables);\n }", "title": "" }, { "docid": "d7e27ec5d03e84ea2631159e66ee4e5b", "score": "0.61924696", "text": "public function getController()\n {\n $dom = new DOMDocument;\n $dom->load(dirname(__FILE__).'/../apps/'.$this->app()->name().'/config/routes.xml');\n\n // Search the routes.xml file to find a route matching with the URL\n foreach ($dom->getElementsByTagName('route') as $route)\n {\n if (preg_match('`^'.$route->getAttribute('url').'$`', $this->app()->httpRequest()->requestURI(), $matches)) \n {\n $module = $route->getAttribute('module');\n $action = $route->getAttribute('action');\n \n $classname = ucfirst($module).'Controller';\n $file = dirname(__FILE__).'/../apps/'.$this->app()->name().'/modules/'.$module.'/'.$classname.'.class.php';\n \n if (!file_exists($file))\n throw new RuntimeException('The module used by the route \"' . $route->getAttribute('url') . '\" does not exist');\n \n require $file;\n\n $controller = new $classname($this->app(), $module, $action);\n\n if ($route->hasAttribute('vars'))\n {\n $vars = explode(',', $route->getAttribute('vars'));\n \n foreach ($matches as $key => $match)\n {\n if ($key !== 0)\n $this->app()->httpRequest()->addGetVar($vars[$key - 1], $match);\n }\n }\n \n break;\n }\n }\n if (!isset($controller))\n $this->app()->httpResponse()->redirect404();\n return $controller;\n }", "title": "" }, { "docid": "ce59003203168f21d906bd91b450fa84", "score": "0.6191504", "text": "public function __construct(){\n\n // Begin\n\n //Default initialization\n $this->controller['class'] = '';\n $this->controller['method'] = '';\n $this->controller['parameters'] = '';\n $this->controller['flag'] = '';\n\n $this->parse();\n\n switch ($this->routing()){\n\n case 'index':\n require 'controllers/Index.php';\n $app_controller = new Index();\n $app_controller->index();\n break;\n case 'class':\n //require 'controllers/' . $this->controller['class'] .'.php';\n $app_controller = new $this->controller['class'];\n $app_controller->index();\n break;\n case 'class/method':\n //require 'controllers/' . $this->controller['class'] .'.php';\n $app_controller = new $this->controller['class'];\n $method = $this->controller['method'];\n $app_controller->$method($this->controller['parameters']);\n break;\n case 'error':\n require 'controllers/Error_404.php';\n $app_controller = new Error_404();\n\n break;\n\n }\n\n // End\n }", "title": "" }, { "docid": "b8c392744b1df1c8c46abef0029cc784", "score": "0.6186472", "text": "public function getController() {}", "title": "" }, { "docid": "b3d0f810431c48da48d574a3342f562d", "score": "0.6185795", "text": "private function run() {\n\n new PublicController();\n }", "title": "" }, { "docid": "07abc6a33f8f45fda489a8895b158d02", "score": "0.6176179", "text": "public function __construct () {\r\n\t\t\t// Parse URL\r\n\t\t\t$url = $this->parse_url();\r\n\t\t\t// Load Controller\r\n\t\t\tif (isset($url[0])) {\r\n\t\t\t\t$controller_class = ucfirst(strtolower($url[0])) . \"Controller\";\r\n\t\t\t\t$controller_file = Config::controller_path . $controller_class . \".php\";\r\n\t\t\t\tif (file_exists($controller_file)) {\r\n\t\t\t\t\t$this->controller = $controller_class;\r\n\t\t\t\t\tunset($url[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\trequire_once Config::controller_path . $this->controller . \".php\";\r\n\t\t\t$this->controller = new $this->controller();\r\n\t\t\t// Find the method\r\n\t\t\tif (isset($url[1])) {\r\n\t\t\t\t$method_name = strtolower($url[1]);\r\n\t\t\t\tif (method_exists($this->controller, $method_name)) {\r\n\t\t\t\t\t$this->method = $method_name;\r\n\t\t\t\t\tunset($url[1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Parse parameters\r\n\t\t\t$this->params = ($url != null)? array_values($url) : [];\r\n\t\t\t// Execute\r\n\t\t\tif (method_exists($this->controller, $this->method)) {\r\n\t\t\t\tcall_user_func_array([$this->controller, $this->method],\r\n\t\t\t\t\t$this->params);\r\n\t\t\t} else {\r\n\t\t\t\t$this->force_redirect();\r\n\t\t\t}\r\n\t\t\tView::show();\r\n\t\t}", "title": "" }, { "docid": "11fc5e77841e71e79ca850a2cdcc4a08", "score": "0.6174891", "text": "public function __construct() {\n $this->Services = new services\\ServicesController();\n }", "title": "" }, { "docid": "5f7f79b6433cbf038e2ad7a925580444", "score": "0.6173494", "text": "private function getMockController() {\n \t$controller = $this->generate('Locations');\n \t$controller->constructClasses();\n \t$controller->Components->init($controller);\n \treturn $controller;\n }", "title": "" }, { "docid": "bcaa36de43243b111f5dfd296978cbdf", "score": "0.61675704", "text": "public function __construct()\n {\n $this->model = str_replace('Controller', '', (new ReflectionClass(get_class($this)))->getShortName());\n }", "title": "" }, { "docid": "25d306fadf279fa880b398b6ca58c7ad", "score": "0.6153043", "text": "public function testCreateTheControllerClass()\n {\n $controller = new HelloWorldController();\n $controller->helloMessage();\n $controller->helloMessageView();\n $controller->hello();\n $controller->helloWithArgument(\"hello\");\n $this->assertInstanceOf(\"\\App\\Controller\\HelloWorldController\", $controller);\n }", "title": "" }, { "docid": "0c5080cf36002832a9701145c2366852", "score": "0.61498636", "text": "public function getController()\n {\n if (! $this->controller) {\n $class = $this->parseControllerCallback()[0];\n\n $this->controller = $this->container->make(ltrim($class, '\\\\'));\n }\n\n return $this->controller;\n }", "title": "" }, { "docid": "ccac90dc15ab1d1500fddbc27df0fbcf", "score": "0.6138995", "text": "public function __construct()\n {\n $this->controller = new MainController();\n $this->cli = new InteractiveCli();\n }", "title": "" }, { "docid": "cdc49a64dfba383c77dc90de009e3756", "score": "0.6132759", "text": "public function __construct()\n {\n $this->auth = new AuthController;\n }", "title": "" }, { "docid": "f46b4bbf2600a7cefc0e0c3396d8be2d", "score": "0.6087309", "text": "private function choosenController()\n {\n $file = self::controllerFileBuilder();\n $class = self::controllerClassBuilder();\n \n if (file_exists($file)) {\n $this->controller = new $class();\n $this->controller->loadModel(self::getModel());\n $this->callMethod();\n } else {\n $this->raiseError();\n }\n }", "title": "" }, { "docid": "b0371a3175e8570930ad3fd8a0c0fe2f", "score": "0.6064479", "text": "public function __construct( ){\n\n // Class Name without namespace (App\\Http\\Controllers\\ModelCrudController) to ModelCrudController\n // $path = explode('\\\\', __CLASS__);\n // $this->parent_class = array_pop($path);\n\n // App\\Http\\Controllers To [0=>\"App\", 1 =>\"Http\", 2=>\"Controllers\"];\n $path = explode('\\\\', get_called_class());\n\n // TableController,ItemController\n $this->current_class = array_pop($path); \n \n // ItemController to Item\n $this->crud_table = explode('Controller', $this->current_class)[0]; \n\n // Set Namespace if Model Class stored in some where else ( default is 'App\\' )\n $this->namespace = (!$this->namespace)? \"App\\\\\" : $this->namespace;\n\n if (!$this->model) {\n $class = $this->namespace.$this->crud_table;\n $this->model = new $class;\n }else{\n $class = $this->namespace.$this->model;\n $this->crud_table = $this->model;\n $this->model = new $class;\n }\n\n }", "title": "" }, { "docid": "eb175c11511f57c4613da364b2fe4322", "score": "0.6057629", "text": "protected function init(): AbstractController\n {\n return $this;\n }", "title": "" }, { "docid": "9ba116dab7deec6034d4c9a072765a6d", "score": "0.6055504", "text": "public function __construct()\r\n {\r\n $url = $this->getUrl();\r\n \r\n if (isset($url[0])) {\r\n // Search if the controller exist\r\n if (file_exists('../app/controllers/' .ucwords($url[0]).'.php')){\r\n \r\n //Set the controller by default\r\n $this->currentController = ucwords($url[0]);\r\n\r\n //Unset initial index \r\n unset($url[0]);\r\n \r\n }\r\n }\r\n\r\n //require the controller\r\n require_once '../app/controllers/' . $this->currentController . '.php';\r\n $this->currentController = new $this->currentController;\r\n \r\n //Check the second part from url (Method)\r\n if (isset($url[1])){\r\n\r\n if (method_exists($this->currentController, $url[1])){\r\n $this->currentMethod = $url[1];\r\n unset($url[1]);\r\n }\r\n }\r\n \r\n //Get the parameters\r\n $this->parameters[] = $url ? array_values($url) : [];\r\n\r\n //Callback with parameters array\r\n call_user_func_array([$this->currentController, $this->currentMethod], $this->parameters);\r\n unset($url[2]); \r\n }", "title": "" }, { "docid": "8feab6599948b1901888f3629d4a6f42", "score": "0.60546565", "text": "public static function getControllerByName($controllerName) {\n $controllerClassName = \"\\\\App\\\\Controller\\\\\" . ucfirst($controllerName);\n $controller = new $controllerClassName();\n\n return $controller;\n }", "title": "" }, { "docid": "16c8747c53a279d24cb7c1fdef842aea", "score": "0.60260487", "text": "public function __construct()\n\t{\n\t\t// construct Controller\n\t\tparent::__construct();\n\t\t// Parse default data about app\n\t\t$this->data['App'] = $this->App;\n\t}", "title": "" }, { "docid": "6b88b919f0d1d70ab9e0a1faf806eacc", "score": "0.6011701", "text": "public function getDefaultController()\n\t{\n\t\t$class_name = $this->getDefaultControllerName();\n\t\treturn new $class_name($this->getRequest(), $this->getResponse());\n\t}", "title": "" }, { "docid": "cc41284efc11b7e5cf5c87df26c30815", "score": "0.60103554", "text": "public function testConstructor()\n {\n /** @var \\Rcm\\Service\\PageManager $mockPageManager */\n $mockPageManager = $this\n ->getMockBuilder('\\Rcm\\Service\\PageManager')\n ->disableOriginalConstructor()\n ->getMock();\n\n /** @var \\Rcm\\Service\\LayoutManager $mockLayoutManager */\n $mockLayoutManager = $this\n ->getMockBuilder('\\Rcm\\Service\\LayoutManager')\n ->disableOriginalConstructor()\n ->getMock();\n\n $controller = new IndexController($mockPageManager, $mockLayoutManager);\n\n $this->assertTrue($controller instanceof IndexController);\n }", "title": "" }, { "docid": "65595bd73ea46f8f286cb4b0705c796c", "score": "0.6009842", "text": "public function getController() {\n $uri = explode('/', $this->__request);\n\t\t\t$class = isset($uri[0]) && ($uri[0] != \"\") ? strtolower($uri[0]) : DEFAULT_CONTROLLER; // class\n\t\t\t$method = isset($uri[1]) ? strtolower($uri[1]) : 'index';\t// method\n\t\t\t$param = isset($uri[2]) ? $uri[2] : false;\t// param\n\n\t\t\t// explode request untuk url cantik\n\t\t\t$class = str_replace('_', ' ', $class);\n\t\t\t$method = str_replace('_', ' ', $method);\n\n\t\t\t$tempClass = explode('-', $class);\n\t\t\t$tempMethod = explode('-', $method);\n\n\t\t\t$newClass = ucfirst(implode('_', $tempClass));\n\t\t\t$newMethod = implode('_', $tempMethod);\n\n\t\t\t// set request controller - class\n\t\t\t$this->__controller = ROOT.DS.'app'.DS.'controllers'.DS.$newClass.\"Controller.php\";\n\n\t\t\t// cek file controller\n\t\t\tif(file_exists($this->__controller)){\n\t\t\t\t// load controller dan class\n\t\t\t\trequire_once $this->__controller;\n\t\t\t\t$obj = new $newClass();\n\n\t\t\t\tif(method_exists($obj, $newMethod)){\n // check method public atau tidak\n $reflection = new ReflectionMethod($obj, $newMethod);\n if (!$reflection->isPublic()) {\n die($this->error('403')); // method dilarang diakses\n }\n else { $obj->$newMethod($param); }\n\t\t\t\t}\n\t\t\t\telse die($this->error('404')); // method tidak tersedia\t\n\t\t\t}\n\t\t\telse die($this->error('404')); // class tidak tersedia\n }", "title": "" }, { "docid": "36f10fe19ad1967c6d91d05e14a3e9ca", "score": "0.59968835", "text": "public function __construct() {\n if(!empty(App::post('uid'))) {\n App::setUID(App::post('uid'));\n }\n if(!empty(App::get('lang')) || !empty(App::post('lang'))) {\n Translator::setLanguage(App::get('lang') ?? App::post('lang'));\n }\n if(!empty(App::get('r'))) {\n $url = \"/\".App::get('r');\n } else { // Pretty URL\n $uri = substr($_SERVER['REQUEST_URI'],0,strpos($_SERVER['REQUEST_URI'].'?','?'));\n $url = str_replace($_SERVER['BASE'], '', $uri);\n }\n // Uppercase char with prefix _\n $url = str_replace(\" \",\"\",ucwords(str_replace(\"_\", \" \", $url)));\n $controllerName = ucfirst(substr($url,1,strpos($url.\"/\",\"/\",1)-1));\n if (!empty($controllerName)) {\n $controllerNameLength = strlen($controllerName)+2;\n $actionName = 'action' . ucfirst(substr($url,$controllerNameLength,strpos($url.\"/\",\"/\",$controllerNameLength)-1));\n $actionName = ($actionName!='action') ? $actionName : 'index';\n } else {\n $controllerName=ucfirst(App::params('defaultController'));\n $actionName='index';\n }\n $controllerName = 'app\\\\controllers\\\\' . $controllerName . 'Controller';\n \n if (class_exists($controllerName)) {\n $controller = new $controllerName();\n if (@method_exists($controller,$actionName)) {\n $controller->$actionName();\n } elseif (@method_exists($controller,'index')) {\n Log::add(\"errorsFile\",__METHOD__, \"Controller $controllerName has no action $actionName\");\n $controller->index();\n } else {\n Log::add(\"errorsFile\",__METHOD__, \"Controller $controllerName has no Index action\");\n }\n } else {\n http_response_code(404);\n if (file_exists(self::$error404Page)) {\n include self::$error404Page;\n }\n die();\n }\n }", "title": "" }, { "docid": "6466e04207610ca1765905e139c3682d", "score": "0.59839225", "text": "public function getControllerInstance()\n {\n return new BloggersController($this->entityManager, $this->doctrine);\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.59784484", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.59784484", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.59784484", "text": "public function getController();", "title": "" }, { "docid": "938c043ecf58d3ef78f56c8b729dcb65", "score": "0.59732175", "text": "public function setUp()\n {\n $this->class_object = $this->newController('Website_Controller');\n }", "title": "" }, { "docid": "60add91c310ca0cc0f45e87b6fd54b22", "score": "0.5968292", "text": "public static function instantiate() {\n\t\treturn new self();\n\t}", "title": "" }, { "docid": "219809912c88210d9b5fa627691d8f22", "score": "0.5967388", "text": "function &get_instance()\n{\n return Controller::getInstance();\n}", "title": "" }, { "docid": "dd1435c8a999be3ed924bbd293f22005", "score": "0.5962563", "text": "public function make($class)\n {\n $controller = $this->container->make($class);\n $controller->setServer($this->makeServer());\n $controller->setView($this->makeView());\n $controller->setSession($this->makeSession());\n $controller->setUrlGenerator($this->makeUrlGenerator());\n\n return $controller;\n }", "title": "" }, { "docid": "364ff26e89c5abc4ca09b896b22cfd42", "score": "0.59595555", "text": "public function __construct()\n {\n parent::__construct();\n parent::controller();\n }", "title": "" }, { "docid": "e8458bc5d4cd3ab1c9dbdcd9b322f4ce", "score": "0.59316885", "text": "public function testInstantiation()\n {\n $controller = new BackendController();\n\n $this->assertInstanceOf('Contao\\\\CoreBundle\\\\Controller\\\\BackendController', $controller);\n }", "title": "" }, { "docid": "658177547457870d58ca5a9ee57ac470", "score": "0.5923162", "text": "private function defaultController()\n {\n $this->controller = new IndexController();\n $this->controller->loadModel(self::getModel());\n $this->controller->index();\n }", "title": "" }, { "docid": "a6be5a05c91567ddb279ffea20659dd8", "score": "0.590771", "text": "public function __construct()\n {\n $this->args = $this->getTemplateArgs();\n $this->clientService = new RoomsApiClientService($this->args);\n $this->routerService = new RouterService();\n parent::controller($this->eg, $this->routerService, basename(__FILE__));\n }", "title": "" }, { "docid": "b526a7fb98b2de5fa773bb17d5327d25", "score": "0.59019136", "text": "private function _controller()\n\t{\n\t\t$class_name = ucfirst($this->_name);\n\t\t$parent_controller = self::parent_controller;\n\t\t$parent_controller_constructor = self::parent_controller_constructor;\n\t\t$application_folder_name = self::application_folder_name;\n\t\t\n$controller = <<<CONTROLLER\n<?php if (!defined('BASEPATH')) exit('No direct script access allowed');\n\nclass {$class_name} extends {$parent_controller}\n{\n\t/**\n\t * The Constructor!\n\t **/\n\tpublic function __construct()\n\t{\n\t\tparent::{$parent_controller_constructor}();\n\t}\nCONTROLLER;\n\n\t\t$controller = $this->_add_actions($controller);\n\n$controller .= <<<CONTROLLER\n\t\n} // End of the {$class_name} controller\n\n/* End of file {$this->_name}.php */\n/* Location ./{$application_folder_name}/controllers/{$this->_name}.php */\nCONTROLLER;\n\t\t\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "cc974f2332863cf40d995b9bd8436c74", "score": "0.59010524", "text": "public function __construct()\n {\n $url = $this->getURL();\n\n if(isset($url[0])){\n\n //override the default controller\n $this->ctrl = strtolower($url[0]);\n\n //remove the controller name from $url variable\n unset($url[0]);\n }\n\n if(isset($url[1])){\n\n //override the default method\n $this->method = strtolower($url[1]);\n\n //remove the method name from $url variable\n unset($url[1]);\n }\n\n //store the request method `GET` or `POST`\n $request_method = strtolower($_SERVER[\"REQUEST_METHOD\"]);\n \n //create a dynamic path for controller\n $ctrl_path = \"app/controllers/{$request_method}/{$this->ctrl}.ctrl.php\";\n\n if(file_exists($ctrl_path)){\n\n //inclue the controller\n include $ctrl_path;\n\n //create an instance and store it in $this->ctrl variable\n $this->ctrl = new $this->ctrl();\n\n }else{\n\n //exite the script and show 404 page if controller does not exist\n include \"app/views/pages/404.view.php\";\n die();\n }\n\n if(method_exists($this->ctrl, $this->method)){\n\n //store existing paramerter in to pass in the method\n $this->params = array_values($url);\n \n //finaly call the function from the \n call_user_func_array(array($this->ctrl,$this->method), $this->params);\n\n }else{\n\n //exite the script and show 404 page if method does not exist\n include \"app/views/pages/404.view.php\";\n die();\n }\n\n }", "title": "" }, { "docid": "d830f60e78479e51fb948352f3a8bbca", "score": "0.58825016", "text": "public function __construct() {\n\t\t// Get the address the user navigated to\n\t\tCore_Url::getUrlBreakdown();\n\n\t\t// Inform the bootstrap a request has been initialised\n\t\tCore_Bootstrap::initRequest($_GET['controller'], $_GET['action']);\n\n\t\t// Try and instantiate the controller\n\t\t$this->loadController($_GET['controller']);\n\t}", "title": "" }, { "docid": "c756ee31e37e97721f0af953ead7ddbd", "score": "0.58613163", "text": "public static function loadController( $controller ) {\n $controller = ucwords( $controller ). 'Controller'; # NOTA: ucwords convierte a mayúsculas el primer caracter de cada pañabra de una cadena.\n $path_controller = 'controllers/' .$controller. '.php'; # Crea el PATH del Controlador\n\n # Valida si NO existe el PATH del Controlador\n if( !is_file( $path_controller ) ) {\n $path_controller = 'controllers/' .ucwords( DEFAULT_CONTROLLER ). 'Controller.php'; # Redirecciona al controlador por defecto\n $controller = ucwords( DEFAULT_CONTROLLER ). 'Controller';\n }\n\n require_once $path_controller; # Solicita el controlador\n\n return new $controller(); # Instancia el controlador existente y lo retorna\n }", "title": "" }, { "docid": "d77b48f20163df66d3b44768c441b457", "score": "0.58551955", "text": "public function runClient()\n {\n new Controller($this->getResourceContainer());\n }", "title": "" }, { "docid": "25956830d3804205798ff1351167461f", "score": "0.58551574", "text": "public function __construct( $controller) {\n\t\t$this->controller = $controller;\n\t}", "title": "" }, { "docid": "273742b6b64717ff8a12d593902cddda", "score": "0.5832545", "text": "protected function _runRouter() {\n\n $Request = new MFW_Request();\n\n $controllerName = ucfirst(($Request->getGetParam('controller')) ? $Request->getGetParam('controller') : 'about');\n\n $controllerClass = 'App_Controller_' . $controllerName;\n\n $this->_Controller = new $controllerClass($Request);\n }", "title": "" }, { "docid": "71947924aa9a43024c401e7eeb95fcda", "score": "0.5820014", "text": "private function __construct () {\n \t$url = $this->parseUrl();\n\n \tif (!empty($url[0])) { \n\n\t\t\t\t//comprobamos que exista el archivo en el directorio Controllers\n\t\t\t\tif (file_exists(self::CONTROLLERS_PATH . ucfirst($url[0]) . \".php\")) {\n\t\t\t\t\t\n\t\t\t\t\t$this->_controller = ucfirst($url[0]);\n\t\t\t\t\tunset($url[0]);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//echo self::CONTROLLERS_PATH . ucfirst($url[0]) . \".php\";\n\t\t\t\t\tinclude VIEWSPATH . DS . \"errors\" . DS . \"404.php\";\n\t \t\texit;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->_controller = \"home\";\n\t\t\t}\n\n\t\t\t//obtenemos la clase con su espacio de nombres\n \t\t$fullClass = self::NAMESPACE_CONTROLLERS . $this->_controller;\n\n \t\t//asociamos la instancia a $this->_controller\n \t\t$this->_controller = new $fullClass;\n\n \t\t// validamos si existe un metodo\n \t\tif (isset($url[1])) {\n \t\t\t\n \t\t\t //aquí tenemos el método\n \t$this->_method = $url[1];\n\n \t\t\t// si existe un metodo procedemos a borrar la posicion correspondiente\n \t\t\tif (method_exists($this->_controller, $this->_method)) {\n \t\t\t\t\n \t\t\t\tunset($url[1]);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tthrow new \\Exception(\"Error Processing Method {$this->_method}\", 1);\n \t\t\t}\n \t\t}\n\t\t\t\n\t\t\t//asociamos el resto del array a $this->_params para pasarlos al método llamado, por defecto será un array vacío\n \t$this->_params = $url ? array_values($url) : [];\n\n\t\t}", "title": "" }, { "docid": "ffd63bfff3466f0a879bebc0914e0bc2", "score": "0.5817946", "text": "public function get_controller();", "title": "" }, { "docid": "0f886372f40eb61c1cdf4071496ea4da", "score": "0.58174735", "text": "protected function loadController()\r {\r }", "title": "" }, { "docid": "88e6fe4b47b1961beb9915fcb7442d94", "score": "0.58167887", "text": "private static function _create()\n\t{\n\t\t// Create the controllers\n\t\tforeach (self::$_controllers as $controller => $actions)\n\t\t{\n\t\t\t$fire = new MVC('controller', $controller);\n\t\t\tif (!empty($actions))\n\t\t\t{\n\t\t\t\t// Create the actions\n\t\t\t\tforeach ($actions as $action)\n\t\t\t\t{\n\t\t\t\t\t$fire->new_action($action);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$fire->create();\n\t\t\tunset($fire);\n\t\t}\n\n\t\t// Create the models\n\t\tforeach (self::$_models as $model => $methods)\n\t\t{\n\t\t\t$fire = new MVC('model', $model);\n\t\t\tif (!empty($methods))\n\t\t\t{\n\t\t\t\tforeach ($methods as $method)\n\t\t\t\t{\n\t\t\t\t\t$fire->new_method($method);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$fire->create();\n\t\t\tunset($fire);\n\t\t}\n\n\t\t// Create the views\n\t\tforeach (self::$_views as $views_folder => $views)\n\t\t{\n\t\t\t$fire = new MVC('view', $views_folder, $views);\n\t\t\t$fire->create();\n\t\t\tunset($fire);\n\t\t}\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "f085720f45f906d3d26370809e0ecb5f", "score": "0.5799087", "text": "public function run() {\n\t\t$controllerFile = __DIR__ . '/' . $this->moduleName . '/' . $this->controllerName . '.php';\n\t\tif (is_file($controllerFile)) {\n\t\t\tinclude_once $controllerFile;\n\t\t\t$controllerClassName = $this->moduleName . '_' . $this->controllerName;\n\t\t\terror_log($controllerClassName);\n\t\t\tif (class_exists($controllerClassName, true)) {\n\t\t\t\terror_log('class is there!');\n\t\t\t\t$controllerClass = new $controllerClassName();\n\t\t\t\t$controllerClass->init();\n\t\t\t\t$controllerClass->doAction($this->actionName);\n\t\t\t\t$controllerClass->afterAction();\n\t\t\t\treturn $controllerClass;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e5e0c55c4714900fb5374b54efede745", "score": "0.5798022", "text": "public function createControllerFile()\n {\n $controller_path = app_path('Http/Controllers/' . $this->replaces['{role_class}']);\n if (!$this->files->exists($controller_path)) {\n $this->files->makeDirectory($controller_path, 0755, true);\n }\n\n // create controller file\n $controller_file = $controller_path . '/' . $this->replaces['{model_class}'] . 'Controller.php';\n\n // make sure controller file does not exist\n if ($this->files->exists($controller_file)) {\n $this->warn('Controller file exists: <info>' . $controller_file . '</info>');\n return;\n }\n\n $controller_stub = $this->files->get($this->stubs_path . '/controller.stub');\n $this->files->put($controller_file, $this->replace($controller_stub));\n $this->line('Controller file created: <info>' . $controller_file . '</info>');\n }", "title": "" }, { "docid": "5cd05100b345a60dfcbf429aea50a3c8", "score": "0.5794212", "text": "public function createAction()\n {\n $class = $this->getClass();\n $action = new $class;\n\n return $action;\n }", "title": "" }, { "docid": "254b12860e6ea1927a434bc3d6a112b4", "score": "0.57916546", "text": "public function loadController($controller) {\n if ($this->modx->loadClass('quipController',$this->config['modelPath'].'quip/request/',true,true)) {\n $classPath = $this->config['controllersPath'].'web/'.$controller.'.php';\n $className = 'Quip'.$controller.'Controller';\n if (file_exists($classPath)) {\n if (!class_exists($className)) {\n $className = require_once $classPath;\n }\n if (class_exists($className)) {\n $this->controller = new $className($this,$this->config);\n } else {\n $this->modx->log(modX::LOG_LEVEL_ERROR,'[Quip] Could not load controller: '.$className.' at '.$classPath);\n }\n } else {\n $this->modx->log(modX::LOG_LEVEL_ERROR,'[Quip] Could not load controller file: '.$classPath);\n }\n } else {\n $this->modx->log(modX::LOG_LEVEL_ERROR,'[Quip] Could not load quipController class.');\n }\n return $this->controller;\n }", "title": "" }, { "docid": "a46a3728f20f459d408c47f65d0e8ce2", "score": "0.5784651", "text": "public function __construct(){\n if(Module::find('Product')){\n $this->ProductController = \\Modules\\Product\\Http\\Controllers\\ProductController::class;\n }\n if(Module::find('Cart')){\n $this->CartController = \\Modules\\Cart\\Http\\Controllers\\CartController::class;\n }\n }", "title": "" }, { "docid": "8c80e722f4986ead3188102338f83d2a", "score": "0.57838416", "text": "public function __construct()\n {\n // Make config globally available.\n if (defined('APP_CONFIG') === false)\n define('APP_CONFIG', require_once CONFIG . DS . 'config.php');\n\n // Create the base Request Object.\n $this->setRequest(new RequestObject($_SERVER, require_once (CONFIG . DS . 'routes.php')));\n\n // Load the Requested Controller\n $this->loadController($this->getRequest()->getDestination()['controller']);\n // BeforeCall function available?\n if (method_exists($this->getController(), 'beforeCall')) {\n $returnValue = call_user_func_array([$this->getController(), 'beforeCall'], []);\n if (!empty($returnValue)) {\n echo $returnValue;\n return;\n }\n }\n // Call the Requested Action\n $returnValue = call_user_func_array([$this->getController(), $this->request->getDestination()['action']], $this->request->getDestination()['arguments'] ?? []);\n\n if ((bool) APP_CONFIG['runtime']['is_api'] === false)\n // Render the view\n $this->getController()->getView()->render();\n else\n echo $returnValue;\n }", "title": "" }, { "docid": "5e30e2184afcb1fbd1ce612f882803c4", "score": "0.5783723", "text": "public function __construct()\n {\n $this->middleware('auth');\n $this->freeeController = new FreeController();\n }", "title": "" }, { "docid": "5e30e2184afcb1fbd1ce612f882803c4", "score": "0.5783723", "text": "public function __construct()\n {\n $this->middleware('auth');\n $this->freeeController = new FreeController();\n }", "title": "" }, { "docid": "c62296985f88d27730a2e7dcdf0b2fcb", "score": "0.578213", "text": "public function __construct()\n {\n // construct Controller\n parent::__construct();\n // Parse default data about app\n $this->data['App'] = $this->App;\n }", "title": "" } ]
60b7118dff9d65f0e24a1a7ea0f298ba
get rid of the 0 index, rank 0 is nonexistant
[ { "docid": "4c285ad2e84d2a1cc6f252591966cfbb", "score": "0.0", "text": "public function __construct( )\r\n {\r\n $this->rankList[] = \"\";\r\n }", "title": "" } ]
[ { "docid": "0043efaec1a3631405425440bb3aed5d", "score": "0.60067034", "text": "public function clearIndex();", "title": "" }, { "docid": "0043efaec1a3631405425440bb3aed5d", "score": "0.60067034", "text": "public function clearIndex();", "title": "" }, { "docid": "bf6467cbe0a3abc8a0ef9639d3cb607a", "score": "0.57753146", "text": "public static function dropIndex(){ }", "title": "" }, { "docid": "7489c1507bf2213c7cbc8a918fb4e44e", "score": "0.57303333", "text": "function array_unset($array,$index) {\n $res=array();\n $i=0;\n foreach ($array as $item) {\n if ($i!=$index)\n $res[]=$item;\n $i++;\n }\n return $res;\n}", "title": "" }, { "docid": "780c50473cbb755f8fc3cceddf9e7cbb", "score": "0.5695374", "text": "public function resetIndex();", "title": "" }, { "docid": "e8f096b25c8746d5cf71c38d0e2dd7a6", "score": "0.5632475", "text": "public function offsetUnset($index);", "title": "" }, { "docid": "e8f096b25c8746d5cf71c38d0e2dd7a6", "score": "0.5632475", "text": "public function offsetUnset($index);", "title": "" }, { "docid": "c6ec23345e17b47f2a8c1e47a93f19d6", "score": "0.5624902", "text": "function removeAt( $index );", "title": "" }, { "docid": "01066055ad60e1fb96a053d2e2061647", "score": "0.5601879", "text": "public function offsetUnset($index) { }", "title": "" }, { "docid": "b3ce71f701b0d39600ae5767f4b9fdfe", "score": "0.5568676", "text": "function shoestrap_array_delete( $idx, $array ) { \n unset( $array[$idx] );\n return ( is_array( $array ) ) ? array_values( $array ) : null;\n}", "title": "" }, { "docid": "67d3363ddb0f9a4da0ec3e2a9007cbc2", "score": "0.55619144", "text": "function unsetBit($index);", "title": "" }, { "docid": "e34cde3381c06f306740e727458e0ccf", "score": "0.5508876", "text": "function removeIntegerIndexesFromArray($data)\r\n {\r\n foreach (array_keys($data) as $key) {\r\n if (is_numeric($key)) {\r\n unset($data[$key]);\r\n }\r\n }\r\n return $data;\r\n }", "title": "" }, { "docid": "d20612a45adb8fa51dd7a6c7bb6ffd70", "score": "0.5340735", "text": "abstract public function remove(int $index);", "title": "" }, { "docid": "c4c26b5578b0b17ca11714862f378c0e", "score": "0.5316646", "text": "public function remove_element($index) {\n\t\t$removing = $this->element_list[$index];\n\t\t$this->element_list[$index] = 0;\n\t\treturn $removing;\n\t}", "title": "" }, { "docid": "332a03693ce4c1fa42de928ee7aced31", "score": "0.5274713", "text": "public function offsetUnset( $index ): void;", "title": "" }, { "docid": "02a09e767959248faf5a0ef7afe400aa", "score": "0.5147903", "text": "function index_drop_number($points) {\n // debug($points);exit;\n $index_points = array();\n foreach ($points as $__k => $__v) {\n if (empty($__v['DropoffCode']) == false) {\n $index_points[$__v['DropoffCode']] = $__v;\n }\n }\n return $index_points;\n }", "title": "" }, { "docid": "8949ccff17fa22ae99972742c6ba90e1", "score": "0.5138862", "text": "public function offsetUnset($indice) {\n }", "title": "" }, { "docid": "ffd181e6eba23a8e267fdb39a62bee7f", "score": "0.5122475", "text": "public function offsetUnset(int $offset) {}", "title": "" }, { "docid": "5ff747dad0b2c92eff1e0790c42017e9", "score": "0.51167506", "text": "public function removeRobotsNoIndex() {\n\t\tphpQuery::pq('meta[content=\"noindex\"]', $this->doc)->remove();\n\t}", "title": "" }, { "docid": "65b43c2b8d107d6111bc8eb740a28925", "score": "0.51132226", "text": "public function remove(int $index);", "title": "" }, { "docid": "47a214c46ee66a45b7ae478448aa348c", "score": "0.50821537", "text": "public function removeAt(\\int $index);", "title": "" }, { "docid": "4aca2dfb17f2789c25dab39893dbbd83", "score": "0.50757706", "text": "function array_remove_zero_values($array) {\n\tforeach ($array as $k=>$v) {\n\t\tif (floatval($v)==0) unset($array[$k]);\n\t}\n\n\treturn $array;\n}", "title": "" }, { "docid": "7f4db13b2f6805169f71e1b2e66c2744", "score": "0.5072248", "text": "public function getDefaultIndex();", "title": "" }, { "docid": "0296c564ba72f75d596b7a5a545f7859", "score": "0.5069275", "text": "function solution2($A) {\n\n if(count($A) == 1) {\n return array_shift($A);\n }\n\n $first = array_shift($A);\n $found = array_search($first, $A, true);\n if ($found !== false){\n unset($A[$found]);\n return solution2(array_values($A));\n } else {\n return $first;\n }\n}", "title": "" }, { "docid": "351eac0dcbeed6102cd0bd3c4f5d97d4", "score": "0.5060619", "text": "function deleteMapIndex($in, $index){\n\t\tif(gettype($in) !== \"array\"){\n\t\t\treturn $in;\n\t\t}\n\n\t\t$out = array();\n\n\t\tforeach($in as $key => $value){\n\t\t\tif($key !== $index){\n\t\t\t\t$out[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "9861ca47d5060f8d712b054227710754", "score": "0.50530434", "text": "function deleteIndex($in, $index){\n\t\tif(gettype($in) !== \"array\"){\n\t\t\treturn $in;\n\t\t}\n\n\t\t$out = array();\n\t\t$i = 0;\n\t\t$size = sizeOf($in);\n\n\t\tforeach($in as $key => $value){\n\t\t\tif($i !== $index){\n\t\t\t\t$out[$key] = $value;\n\t\t\t}\n\n\t\t\t++$i;\n\t\t}\n\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "1f3881bde960ddf740fa0713bf428778", "score": "0.50322574", "text": "protected function removeIndexes()\n {\n }", "title": "" }, { "docid": "8c7962d571aea17e264a365722230f22", "score": "0.50306785", "text": "public function offsetUnset ($index)\n\t{\n\t\t$value = $this->offsetGet($index);\n\n\t\tif ($index == 0) {\n\t\t\treturn array_shift($this->storage);\n\t\t}\n\n\t\tif ($index == $this->count() - 1) {\n\t\t\treturn array_pop($this->storage);\n\t\t}\n\n\t\t$new = $this->slice(0, $index - 1);\n\t\t$new->push($this->slice($index, $this->count()));\n\n\t\t$this->storage = $new->to_array();\n\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "6a0d6e6d3079b270818c0de703017432", "score": "0.5025254", "text": "public function cleanIndex()\n {\n $cleaned = array();\n\n if (empty($this->index)) {\n return $cleaned;\n }\n\n foreach ($this->index as $def) {\n if (isset($def['class'])) {\n $cleaned[$def['mid']] = $def;\n } else {\n // TODO remove from index;\n }\n }\n\n return $cleaned;\n\n }", "title": "" }, { "docid": "c4ed4c6e69a4826ee2e228e61741a778", "score": "0.49940062", "text": "public function offsetUnset($offset){ }", "title": "" }, { "docid": "69ad6152955b76c0ab69c4de2c12f056", "score": "0.49901977", "text": "public function removeByIndex($index) {\n unset($this->catalog[($index-1)]); \n //reindex\n $this->catalog = array_values($this->catalog);\n }", "title": "" }, { "docid": "a9041cd356fdb5cff0027a9cd233b087", "score": "0.49855387", "text": "function deleteFirst($in){\n\t\treturn deleteIndex($in, 0);\n\t}", "title": "" }, { "docid": "e5c4ee155bf47a1443ea2586191d900c", "score": "0.49707425", "text": "function drop(array $input, $number = 1)\n{\n return array_slice($input, $number);\n}", "title": "" }, { "docid": "731fa73e23acedfd245a34b09c7ef97c", "score": "0.49692163", "text": "public function cancel_rank()\n {\n if ( exist($this->rank) )\n {\n $this->leaveRank();\n return 1;\n }\n return 0;\n }", "title": "" }, { "docid": "0f3e49f51cbae71fb18d7e3ce14dee99", "score": "0.496752", "text": "function set_rank($arr,$IspositiveIndicator)\r\n\t{\r\n\t\tif($IspositiveIndicator==0)\r\n\t\t{\r\n\t\t\t$j=1;\r\n for($i=sizeof($arr)-1;$i>=0;$i--)\r\n\t\t\t { \r\n\t\t\t\t $arr[$i]['rank']=$j;\r\n\t\t\t\t \r\n\t\t\t $j++;\t\t \r\n\t\t\t } \r\n\t\t\r\n\t\t \r\n\t\t}\r\n\t\telse if($IspositiveIndicator==-1 ){\r\n\t\t\t\r\n\t\t\tfor($i=0;$i<sizeof($arr);$i++)\r\n\t\t { \r\n \r\n\t\t\t $arr[$i]['rank']=$i+1;\r\n \t \r\n\t\t\t\t\r\n\t\t }\r\n\t\t}\r\n\t\treturn $arr;\r\n\t}", "title": "" }, { "docid": "d2b0d9cc7702450b9b0d9e19b8e19ff2", "score": "0.4959837", "text": "public function removeAt($index);", "title": "" }, { "docid": "c89a52a6198007257fefeb2106c93ede", "score": "0.4944365", "text": "protected function _remove_last_arr_value($index)\n {\n array_pop($this->values[$index]);\n }", "title": "" }, { "docid": "c0bfee81be916ad6c720daff16b16b7c", "score": "0.49258998", "text": "public function offsetUnset( $offset ) {}", "title": "" }, { "docid": "9923550625a0a147daaa6f609730b63c", "score": "0.49228975", "text": "function grabElement($array, $index){\n\t\t\tunset($array[$index]);\n\t\t\t$array = array_values($array);\n\t\t\treturn $array;\n\t\t}", "title": "" }, { "docid": "1e5ba60552b949a72ea0da3b1989fb09", "score": "0.49035972", "text": "function removeUnwantedColumn($inputArray, $remove){\n $out = [];\n foreach ($inputArray as $line){\n $temp = [];\n $count = 0;\n foreach ($line as $item){\n if($count != $remove){\n array_push($temp,$item);\n }\n $count++;\n }\n array_push($out,$temp);\n }\n return $out;\n}", "title": "" }, { "docid": "3bd007b61117371ab29ad52d33012772", "score": "0.487059", "text": "public function removeByPosition($position)\n {\n $this->__unset($position);\n $this->reindex = true;\n\n //$this->prev(); // Put the pointer back 1\n }", "title": "" }, { "docid": "ec324d0337e69698e0dc7a73b635a556", "score": "0.4839187", "text": "function set_rank($arr,$IspositiveIndicator)\n\t{\n\t\tif($IspositiveIndicator==0)\n\t\t{\n\t\t\t$j=1;\n for($i=sizeof($arr)-1;$i>=0;$i--)\n\t\t\t { \n\t\t\t\t $arr[$i]['rank']=$j;\n\t\t\t\t //$arr[$i]['sl_no']=$i+1;//sl no only\n\t\t\t\t \n\t\t\t $j++;\t\t \n\t\t\t } \n\t\t\n\t\t \n\t\t}\n\t\telse if($IspositiveIndicator==-1 ){\n\t\t\t\n\t\t\tfor($i=0;$i<sizeof($arr);$i++)\n\t\t { \n \n\t\t\t $arr[$i]['rank']=$i+1;\n \t // $arr[$i]['sl_no']=$i+1;\n\t\t\t\t\n\t\t }\n\t\t}\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "0bb970a90e399c81cb59a465f7d61908", "score": "0.48380053", "text": "public function offsetUnset($name)\n {\n unset($this->fields[$name]);\n if (false !== $position = array_search((string) $name, $this->positions))\n {\n unset($this->positions[$position]);\n\n $this->positions = array_values($this->positions);\n }\n }", "title": "" }, { "docid": "ff2e59069ada462e27e2152025901ae8", "score": "0.48117155", "text": "function fonct_obj_avec_x0($fonct_obj,$tab_reel){\r\n \tfor($i=0;$i<=array_key_last($tab_reel);$i++){\r\n \t\tif ($tab_reel[$i]<0) { //si un des reel est negatif alors on rajoute un 0 qui represente x0\r\n \t\t\tarray_push($fonct_obj,0);\r\n \t\t\treturn $fonct_obj;\r\n \t\t}\r\n \t}\r\n \treturn $fonct_obj;\r\n }", "title": "" }, { "docid": "4719c95976829a9daa9ac348b73f3b9d", "score": "0.4807752", "text": "public function remove_at($p_index)\n {\n $l_node = null;\n\n if (isset($this->m_children[$p_index]) && $this->m_children[$p_index] instanceof isys_graph_node)\n {\n $l_node = $this->m_children[$p_index]->remove();\n $this->m_children = array_values($this->m_children);\n }\n\n return $l_node;\n }", "title": "" }, { "docid": "7b5a199406857da392900d7f587d4324", "score": "0.47888172", "text": "public function getIndex()\n {\n return 0;\n }", "title": "" }, { "docid": "a96eba337a918cf5f6e4052db4883c20", "score": "0.47532782", "text": "public function getRank() : int;", "title": "" }, { "docid": "867427996f459c2941f9c4896cd38cf8", "score": "0.47263926", "text": "function solution($A)\n{\n $counter = [];\n foreach ($A as $val) {\n if (@$counter[$val] === true) {\n unset($counter[$val]);\n } else {\n $counter[$val] = true;\n }\n }\n return array_keys($counter)[0];\n}", "title": "" }, { "docid": "1bfe8d351988c2fd2522464a324c4731", "score": "0.4715705", "text": "public static function reset($index=0)\n {\n self::$index = $index;\n }", "title": "" }, { "docid": "a36cd1a7228930e056358357f09fedf1", "score": "0.4712875", "text": "private function deleteUnusedCols(&$array)\n {\n foreach ($array as &$item) {\n $item = array_slice($item, 0, 6);\n }\n }", "title": "" }, { "docid": "9c1d6a095301eaee79227b7a2b348d3f", "score": "0.47095007", "text": "public function noIndex()\n {\n return $this->onIndex(false);\n }", "title": "" }, { "docid": "371802d89a9a7679e022dbb7095f4ecf", "score": "0.47051015", "text": "public function cleanIndexes() \n {\n $this->_readys(2);\n\n $hashes = $this->_redis\n ->zRangeByScore(self::TIMESTAMPS_PREFIX, 0,\n time() - $this->_ttl);\n\n $indexes = $this->_redis->keys('*');\n\n $this->_redis->multi(Redis::PIPELINE);\n foreach ($hashes as $hash) {\n foreach ($indexes as $index) {\n $this->_redis->zRem($index, $hash);\n }\n }\n $this->_redis->exec();\n }", "title": "" }, { "docid": "9f8755c555a4edc71aa08d0318027e19", "score": "0.46808672", "text": "protected function deleteRanking(): void\n {\n if ($this->model->ranking) {\n $this->model->ranking->delete();\n }\n }", "title": "" }, { "docid": "89a1190302ccb55ac1afce13063beed5", "score": "0.46611452", "text": "public function unindex()\n {\n $table = static::getPostgresSearchableTraitTable();\n DB::delete(\"delete from $table where content_id = ?\", [$this->content->content_id]);\n }", "title": "" }, { "docid": "2004af8d459c7d8009d0bd5e253523c4", "score": "0.4657633", "text": "public static function walkWithUnset()\n {\n $tmp = self::current();\n if($tmp !== false){\n unset(self::$tokens[self::$index]);\n self::$tokens = array_values(self::$tokens);\n self::$length = count(self::$tokens);\n }\n \n return $tmp;\n }", "title": "" }, { "docid": "020c714625946f523a9c2725e70a6beb", "score": "0.46563438", "text": "public function clearIndex($index_name);", "title": "" }, { "docid": "4401d6bdf3101acd5a54561e076e46a4", "score": "0.46458995", "text": "public function offsetUnset($offset)\n {\n }", "title": "" }, { "docid": "a99def4a0280ef3ef6b262a2d1ea1a99", "score": "0.46446198", "text": "public function inverseOrder();", "title": "" }, { "docid": "3fc1e2b23342ba56ebde7b0f5a623186", "score": "0.4642342", "text": "private function array_index_remove( $target_array,$target_id )\n\t{\n\t\tforeach($target_array as $key => $val)\n\t\t{\n\t\t\tif ($val['question_id'] === $target_id ){\n\t\t\t\t$final_key = $key;\n\t\t\t}\n\t\t}\n\t\t//ARAAY INDEX REMOVED \n\t\tunset($target_array[$final_key]);\n\t\t//REORDER ARRAY INDEX\n\t\tsort($target_array);\n\t\treturn $target_array;\n\t}", "title": "" }, { "docid": "5d048fd3a9340edfe7c85eeaa74a8ab1", "score": "0.46364316", "text": "public function getIndex(): int;", "title": "" }, { "docid": "5d048fd3a9340edfe7c85eeaa74a8ab1", "score": "0.46364316", "text": "public function getIndex(): int;", "title": "" }, { "docid": "cce0a83e2f3dc0bb126fbc382f9a8619", "score": "0.46338582", "text": "public function getUnparsedIndex() {\n\t\treturn $this->unparsedIndex;\n\t}", "title": "" }, { "docid": "f46f5348e16e20f74ade18f8ce69def0", "score": "0.46338215", "text": "public function delete_position()\n\t\t{\n\t\t\treturn null;\n\t\t}", "title": "" }, { "docid": "8bf5c5e70ed53c524c4c22d683fe33f4", "score": "0.4633124", "text": "function revcounter0() {\n $this->_v = $this->_iterator->count() - $this->_i - 1;\n return $this;\n }", "title": "" }, { "docid": "1bdc49a3f054de6893d7950243d51ae6", "score": "0.4632571", "text": "public function reindex(): void\n {\n $this->nodes = array_values($this->nodes);\n }", "title": "" }, { "docid": "7637373daa4f957286c52a0fd79d8cdd", "score": "0.46272442", "text": "public function ranks();", "title": "" }, { "docid": "fdbcb6343967915ba1d774094921259b", "score": "0.4618767", "text": "function reset () {\n\t\t$this->_i = -1;\n\t}", "title": "" }, { "docid": "0c9931feb6cd39f42002842e8cd8364c", "score": "0.46129632", "text": "function search_n_remove_valuefromArray($array,$value)\n{\n\tif (($key = array_search($value, $array)) !== false) {\n \t unset($array[$key]);\n\t}\n\treturn $array;\n}", "title": "" }, { "docid": "d651989113a18a2ffd9c49f79603b884", "score": "0.46062565", "text": "public function truncateIndexType()\n {\n $type = $this->getType();\n if (!$type->exists()) {\n return false;\n }\n return $type->deleteByQuery(new \\Elastica\\Query\\MatchAll());\n }", "title": "" }, { "docid": "7d65a92b33410f92e1959f126f7be4cd", "score": "0.45999673", "text": "public function nonzeroRecommendations() {\n\t\t\t$nonzeroRecommendations = [];\n\t\t\t\n\t\t\tforeach ($this->recommendations as $recommendation) {\n\t\t\t\tif ($recommendation->recommended_amount > 0) {\n\t\t\t\t\t$nonzeroRecommendations[count($nonzeroRecommendations)] = $recommendation;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $nonzeroRecommendations;\n\t\t}", "title": "" }, { "docid": "06698892ce100fde086c3819709a9c04", "score": "0.4595756", "text": "public function withoutLabel(int ...$keys): self;", "title": "" }, { "docid": "35378bf7ede576bec76d67db2e1fa93b", "score": "0.45941776", "text": "public function remove($idx = 0, $ns = Collection::DEFAULT_NS) {\n\t\tif ($this->list[$ns] == null || $this->list[$ns][$idx] == null) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$size = count($this->list[$ns]);\n\t\t$value = $this->list[$ns][$idx];\n\t\tfor ($i = $idx+1; $i < $size; $i++) {\n\t\t\t$this->list[$ns][$i-1] = $this->list[$ns][$i];\n\t\t}\n\t\t\n\t\t// remove extraneous value\n\t\tunset($this->list[$ns][$size-1]);\n\t\t\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "effb9ca55aed691d742dfd57b3b80f26", "score": "0.4594128", "text": "public function indexesRemoved(): int\n {\n return $this->labelsRemoved;\n }", "title": "" }, { "docid": "2535de54d3555641f15e810af3a1e69e", "score": "0.45882806", "text": "function getIndex();", "title": "" }, { "docid": "87f4af13528119d9cd921550e2b8ae6f", "score": "0.45800173", "text": "public function offsetUnset($index) {\n if (!$this->offsetExists($index)) {\n [][$index]; // Try to access wrong key so a Notice is raised\n return;\n }\n if ($this->isArray()) {\n unset($this->storage[$index]);\n } else {\n $obj = $this->storage;\n unset($obj->$index);\n }\n }", "title": "" }, { "docid": "acc4f51c38fcc6bd6a5ab106d11daeea", "score": "0.45792606", "text": "function array_remove_negative_values($array) {\n\tforeach ($array as $k=>$v) {\n\t\tif (floatval($v)<0) unset($array[$k]);\n\t}\n\n\treturn $array;\n}", "title": "" }, { "docid": "abe717ed552655d8a309643e61ac310d", "score": "0.45578185", "text": "private function _fixIndexes($data) {\n try {\n $output = array();\n $i = 1;\n foreach ($data as $value) {\n\n foreach ($value as $v) {\n $output[0] = array_keys($v);\n $output[$i] = $v;\n $i++;\n }\n }\n return $output;\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }", "title": "" }, { "docid": "dc0853e7de1ff58e4cc3dfc1e8b6f953", "score": "0.45575425", "text": "function permMissingElem($array)\n{\n $size = count($array);\n $e = $size > 0 ? range(1, $size) : [];\n $diff = array_diff($e, $array);\n\n if ($diff === []) {\n throw new LogicException;\n }\n\n return array_shift($diff);\n}", "title": "" }, { "docid": "4ad38d0484cfd4ceaf2fb13d1d820da1", "score": "0.455573", "text": "public static function stripZeroes(array $data): array\n {\n $del_val = 0;\n\n return array_values(array_filter($data, fn ($e): bool => $e != $del_val));\n }", "title": "" }, { "docid": "02646cadd4fb0561e978621dc9ef466d", "score": "0.45551768", "text": "public function removeFirstOccurrence($o) {\n\t\tif ($o == null) {\n\t\t\treturn false;\n\t\t}\n\t\t$mask = count( $this->elements ) - 1;\n\t\t$i = $this->head;\n\t\t$x = null;\n\t\twhile ( ($x = $this->elements[$i]) != null ) {\n\t\t\tif ($o == $x) {\n\t\t\t\t$this->delete( $i );\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t$i = ($i + 1) & $mask;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "fdc26e4b415f418b8484299752ec9a88", "score": "0.45547605", "text": "private function getIndicesToBeFilled() : array {\n $decNum = $this->numberSequence[$this->getIndexOfPeriod()];\n $binCode = str_pad(decbin($decNum), 7, '0', STR_PAD_LEFT);\n return array_keys(array_diff(str_split($binCode), [0]));\n }", "title": "" }, { "docid": "956f4eb93374a9a9568ae9b79d5c874e", "score": "0.45522982", "text": "public static function get_reindexed_array( $arr )\n {\n \n return array_values( $arr );\n }", "title": "" }, { "docid": "e2f564fabf357a8a3841fdc4d7aac0c9", "score": "0.45464075", "text": "function stpArrayRemoveEmptyOrder($arr)\r\n{\r\n\r\n\t$arr = array_filter($arr);\r\n\r\n\t$newMy = array();\r\n\t$i = 0;\r\n\r\n\tforeach($arr as $key => $value) {\r\n\t\tif(!is_null($value)) {\r\n\t\t\t$newMy[$i] = $value;\r\n\t\t\t$i++;\r\n\t\t}\r\n\t}\r\n\treturn $newMy;\r\n}", "title": "" }, { "docid": "c3c3964f7c1a8e2cd0399b0b2eac14eb", "score": "0.45336506", "text": "function sortPlayer($player)\n {\n for ($k = 0; $k < 4; $k++) {\n for ($index = 1; $index < count($player[$k]); $index++) {\n // getting value for back element\n $indexj = ($index - 1);\n //saving it in temperary variable;\n $temp = $player[$k][$index];\n while ($indexj >= 0 && $player[$k][$indexj]->rank >= $temp->rank) {\n $player[$k][$indexj + 1] = $player[$k][$indexj];\n $indexj--;\n }\n $player[$k][$indexj + 1] = $temp;\n }\n }\n return $player;\n }", "title": "" }, { "docid": "e65b4b52968be10079fb6429993f3297", "score": "0.4528705", "text": "public function unsetDisplayTitle($index)\n {\n unset($this->displayTitle[$index]);\n }", "title": "" }, { "docid": "e65b4b52968be10079fb6429993f3297", "score": "0.4528705", "text": "public function unsetDisplayTitle($index)\n {\n unset($this->displayTitle[$index]);\n }", "title": "" }, { "docid": "e8d5bf31a3fa6dcf4cd2e0f3363c90ed", "score": "0.4528691", "text": "function findDeletedNumber(array $arr, array $mixedArr): int {\n return count($arr) === count($mixedArr) ? 0 : array_values(array_diff($arr,$mixedArr))[0];\n}", "title": "" }, { "docid": "3a57aaa30c87a121aceed61fa67126e0", "score": "0.45204973", "text": "public function offsetUnset($index)\n\t{\n\t\t$this->removeAt($index);\n\t}", "title": "" }, { "docid": "1cca647410952d0eb0c4b3c974e49330", "score": "0.45193294", "text": "function _reset()\n {\n $this->_posX = $this->_minimumT;\n return $this->_posX;\n }", "title": "" }, { "docid": "d91d840b3b1f4c63ece4874ad2e1522c", "score": "0.45133117", "text": "function offsetUnset($offset) \n {\n return $this->delete($offset);\n }", "title": "" }, { "docid": "c0ddb25af1e74b4c5e97512ba33904bc", "score": "0.45065314", "text": "function permuteIndex($id_consommateur){\r\n\t\tglobal $bd;\r\n\t\t$req = $bd->query(\"SELECT nouvelle_index, ancien_index FROM index_c WHERE id_consommateur='\".$id_consommateur.\"' \");\r\n\t\t$data = $req->fetch();\r\n\t\t$bd->exec(\"UPDATE index_c SET nouvelle_index = 0, ancien_index = '\".$data['nouvelle_index'].\"', difference_index = 0 WHERE id_consommateur = '\".$id_consommateur.\"' \");\r\n\t}", "title": "" }, { "docid": "03ba25b72cc967eb636a7a41fa8a7f19", "score": "0.45045546", "text": "public function clear(): int;", "title": "" }, { "docid": "55a5e6e24755df38e2f2548b51f0ab44", "score": "0.45039502", "text": "public function removeAt($index)\n\t{\n\t\tif(!$this->isReadOnly)\n\t\t\tthrow new \\Exception();\n\t\t\n\t\tif($index >= 0 && $index < $this->index)\n\t\t{\n\t\t\t--$this->index;\n\t\t\tif($index === $this->index)\n\t\t\t{\n\t\t\t\treturn array_pop($this->data);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$item = $this->data[$index];\n\t\t\t\tarray_splice($this->data, $index, 1);\n\t\t\t\treturn $item;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tthrow new \\OutOfBoundsException();\n\t}", "title": "" }, { "docid": "8d50510d420058f75e712c5a4f09d93a", "score": "0.4502773", "text": "public function offsetUnset($offset)\r\n {\r\n }", "title": "" }, { "docid": "8d50510d420058f75e712c5a4f09d93a", "score": "0.4502773", "text": "public function offsetUnset($offset)\r\n {\r\n }", "title": "" }, { "docid": "f048c5737b868efd4185304a9c5d721d", "score": "0.45004836", "text": "public function unsetOccupancy($index)\n {\n unset($this->occupancy[$index]);\n }", "title": "" }, { "docid": "8e2a648fdb142ae12ceecf771e7882c2", "score": "0.4497265", "text": "function remove_empty($a, $token = \"\") {\n\t$a2 = $a;\n\tforeach ($a as $k => $v) {\n\t\tif ($v == $token) {\n\t\t\tunset($a2[$k]);\n\t\t}\n\t}\n\treturn $a2;\n}", "title": "" }, { "docid": "b2f3d6046e55e8553722b1b56a9d78c7", "score": "0.44927308", "text": "public function getWithoutResults()\n\t{\n\t\tif (!isset($this->results['getWithoutResults']))\n\t\t{\n\t\t\t$q = $this->db->query(\n\t\t\t\t\t'SELECT RoundNum, TableNum\n\t\t\t\t\tFROM Games\n\t\t\t\t\tWHERE Rank IS NULL AND TableNum IS NOT NULL\n\t\t\t\t\tGROUP BY RoundNum, TableNum'\n\t\t\t\t\t);\n\t\t\t$this->results['getWithoutResults'] = $q->fetchAll();\n\t\t}\n\t\treturn $this->results['getWithoutResults'];\n\t}", "title": "" }, { "docid": "8b89be644b3aad459f83f995685c635b", "score": "0.4481394", "text": "public function getPlainIndex() {\n\t\treturn $this->replaceByDataLabel($this->unparsedIndex);\n\t}", "title": "" }, { "docid": "6854da6b9a9c8c1ad775c071101032a0", "score": "0.44747385", "text": "function remove($val) {\r\n\t\tif(!array_key_exists($val,$this->stack)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$remove_index= $this->stack[$val];\r\n\t\t$last_data = $this->data[$this->index - 1];\r\n\t\t\r\n\t\t$this->stack[$last_data] = $remove_index;\r\n\t\t$this->data[$remove_index] = $last_data;\r\n\t\t\r\n\t\tunset($this->stack[$val]);\r\n\t\tunset($this->data[$this->index - 1]);\r\n\t\treturn true;\r\n }", "title": "" }, { "docid": "c40f6647864c5f4cd779d6ddbeac767a", "score": "0.44719902", "text": "public function remove()\n {\n if ($this->isEmpty()) {\n throw new UnderflowException(\"Buffer is empty\");\n }\n\n $leastRecentPosition = $this->getLeastRecentPosition();\n $leastRecentElement = $this->buffer[$leastRecentPosition];\n\n unset($this->buffer[$leastRecentPosition]);\n $this->size--;\n\n return $leastRecentElement;\n }", "title": "" } ]
9cb03049d7b806e2c10fd87757881924
jday() Beregner juliansk dagtal for datoen i den Julianske kalender. Dvs antallet af dag der er passeret siden 1. Januar 4712
[ { "docid": "d4a7e14961b2bd840d8039b0246961ce", "score": "0.7320184", "text": "public function jday(Dato $param) : Jday\r\n {\r\n return $this->jdayGrg($param);\r\n \r\n //return ($param->getYear() < 1582) \r\n //? parent::_jday($param) \r\n //: parent::_jday($param, self::NULDAG, self::CYKLGD);\r\n //return parent::jday($param);\r\n //$x= new Jday(262626);\r\n //$x->setJd(232323);\r\n //return $x;\r\n }", "title": "" } ]
[ { "docid": "66a955f42040e89110ae873f197e3e80", "score": "0.6777476", "text": "function jewishtojd($month, $day, $year) {}", "title": "" }, { "docid": "b7f363637dd3b587ddecd8e678eac2ef", "score": "0.6505589", "text": "function jdtounix($jday) {}", "title": "" }, { "docid": "1144bbe3b23e6463c427a4bc83e8fc5d", "score": "0.64238", "text": "static function jdate($format, $timestamp = \"now\" )\n\t{\n\t\t$result=\"\";\n\t\t$timestamp = ($timestamp == \"now\") ? time() : $timestamp; // backward compatibility\n\t\t$timestamp+= _JDF_TZhours*3600+_JDF_TZminute*60;\n\t\t$date = date(\"Y-m-d G:i:s N-l\", $timestamp);\n\t\t$dateStr = explode(\" \", $date);\n\t\tlist($year, $month, $day) = explode(\"-\",$dateStr[0]);\t \n\t\tlist($jyear, $jmonth, $jday) = self::gregorian_to_jalali($year, $month, $day);\n\t\tlist($hour, $minute, $second) = explode(\":\",$dateStr[1]);\n\t\tlist($numDay, $weekDay) = explode(\"-\",$dateStr[2]);\n\n\t\tfor($i=0;$i<strlen($format);$i++)\n\t\t{\n\t\t\tswitch ($format[$i])\n\t\t\t{\n\t\t\t\t// day\n\t\t\t\tcase \"d\":\n\t\t\t\t\t$result.= ($jday<10) ? \"0\" . $jday : $jday;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"j\":\n\t\t\t\t\t$result.=$jday;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"l\":\n\t\t\t\t\t$result.= constant( \"_JDF_\" . strtoupper($weekDay) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"D\":\n\t\t\t\t\t$result.= constant( \"_JDF_\" . strtoupper(substr($weekDay,0,3)) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"N\": // 1 (for Shanbe) through 7 (for Jome)\n\t\t\t\t\t$result.= ($numDay <= 5) ? $numDay+2 : $numDay - 5;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"w\": // 0 (for Jome) through 6 (for Panjshanbe)\n\t\t\t\t\t$result.= ($numDay <= 4) ? $numDay+2 : $numDay - 5;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"S\":\n\t\t\t\t\t$result.=_JDF_Suffix;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"z\": // TO DO: The day of the year (starting from 0)\n\t\t\t\t\tbreak;\n\t\t\t\t// week\n\t\t\t\tcase \"W\": // TO DO: ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0)\n\t\t\t\t\tbreak;\n\t\t\t\t// month\n\t\t\t\tcase \"F\":\n\t\t\t\tcase \"M\":\n\t\t\t\t\t$result.=constant(\"_JDF_MONTH\" . $jmonth);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"m\":\n\t\t\t\t\t$result .= ($jmonth<10) ? \"0\".$jmonth : $jmonth;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"n\":\n\t\t\t\t\t$result.=$jmonth;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"t\":\n\t\t\t\t\t$result.=self::jNumDayMonth($jmonth,$jyear);\n\t\t\t\t\tbreak;\n\t\t\t\t// year\n\t\t\t\tcase \"y\":\n\t\t\t\t\t$result.= substr($jyear,2,2);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Y\":\n\t\t\t\t\t$result.=$jyear;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"L\":\n\t\t\t\t\t$result.= self::jleapYear($jyear);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"o\": // TO DO: ISO-8601 year number. This has the same value as Y, except that if the ISO week number (W) belongs to the previous or next year, that year is used instead. (added in PHP 5.1.0)\n\t\t\t\t\tbreak;\n\t\t\t\t// time\n\t\t\t\tcase \"A\":\n\t\t\t\t\t$result .= ($hour > 12) ? _JDF_PM_LONG : _JDF_AM_LONG;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"a\":\n\t\t\t\t\t$result .= ($hour > 12) ? _JDF_PM_SHORT : _JDF_AM_SHORT;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t// timezone\n\t\t\t\tcase \"I\": // TO DO: Whether or not the date is in daylight saving time\n\t\t\t\t\tbreak;\n\t\t\t\t// time\n\t\t\t\tcase \"g\":\n\t\t\t\t\t$result .= ($hour > 12) ? $hour - 12 : $hour;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"G\":\n\t\t\t\t\t$result .= $hour;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"h\":\n\t\t\t\t\t$result .= ($hour > 12) ? $hour - 12 : \"0\" . $hour;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"H\":\n\t\t\t\t\t$result .= ($hour > 12) ? $hour : \"0\" . $hour;;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"i\":\n\t\t\t\t\t$result .= $minute;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"s\":\n\t\t\t\t\t$result .= $second;\n\t\t\t\t\tbreak;\n\t\t\t\t/*case \"u\":\n\t\t\t\t\t$result .= $micro;\n\t\t\t\t\tbreak;*/\n\t\t\t\t// timezone\n\t\t\t\tcase \"e\":\n\t\t\t\tcase \"O\":\n\t\t\t\tcase \"P\":\n\t\t\t\tcase \"T\":\n\t\t\t\tcase \"Z\":\n\t\t\t\t\tif (!isset($gregorian[$format[$i]])) {\n\t\t\t\t\t\t$gregorian[$format[$i]] = date($format[$i],$timestamp);\n\t\t\t\t\t}\n\t\t\t\t\t$result.=$gregorian[$format[$i]];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$result.= \"{$format[$i]}\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn self::Convertnumber2farsi($result);\n\t}", "title": "" }, { "docid": "26ab1969e716a8ccee7a27728f5971d5", "score": "0.6324126", "text": "function day_of_week($j) {\n return ( int ) (self::zero_hour_julian($j) + 1.5) % 7;\n }", "title": "" }, { "docid": "c3298fbe8cb499868916ce1eb921a07b", "score": "0.61982805", "text": "function gregorian_to_jalali_date($gy,$gm,$gd,$mod=''){\n $g_d_m=array(0,31,59,90,120,151,181,212,243,273,304,334);\n if($gy>1600){\n $jy=979;\n $gy-=1600;\n }else{\n $jy=0;\n $gy-=621;\n }\n $gy2=($gm>2)?($gy+1):$gy;\n $days=(365*$gy) +((int)(($gy2+3)/4)) -((int)(($gy2+99)/100)) +((int)(($gy2+399)/400)) -80 +$gd +$g_d_m[$gm-1];\n $jy+=33*((int)($days/12053)); \n $days%=12053;\n $jy+=4*((int)($days/1461));\n $days%=1461;\n if($days > 365){\n $jy+=(int)(($days-1)/365);\n $days=($days-1)%365;\n }\n $jm=($days < 186)?1+(int)($days/31):7+(int)(($days-186)/30);\n $jd=1+(($days < 186)?($days%31):(($days-186)%30));\n return($mod=='')?array($jy,$jm,$jd):$jy.$mod.$jm.$mod.$jd;\n}", "title": "" }, { "docid": "8706f1f807061cf829a116bcc3c5426a", "score": "0.61875427", "text": "function frenchtojd($month, $day, $year) {}", "title": "" }, { "docid": "2d974a63857d5b06d193080f77fd2306", "score": "0.60827357", "text": "function get_todays_date_as_jdc() {\n $parts = $this->get_todays_date_as_gregorian();\n return gregoriantojd($parts['mon'], $parts['mday'], $parts['year']);\n }", "title": "" }, { "docid": "60a795161cc4b0bf4534e9d226338f92", "score": "0.6039733", "text": "function jday_of_month($year,$month) {\n static $jdate_month_days = array(0, 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n if(is_jalali_leap_year($year) && ($month == 12))\n return 30;\n $month = (int)$month;\n return $jdate_month_days[$month];\n}", "title": "" }, { "docid": "d737085bdabd9e66cc836567c57aaa08", "score": "0.6005445", "text": "public function date_today()\n {\n return date('j');\n }", "title": "" }, { "docid": "4224b86773c7284dbf1db0cbc2a33239", "score": "0.5995124", "text": "public function GetDay(){\n date_default_timezone_set('Asia/Jakarta');\n\n return date(\"Y-m-d H:i:s\");\n\n }", "title": "" }, { "docid": "5519080b2f901ca28bcf8f723eeca586", "score": "0.59781945", "text": "function gregoriantojd($month, $day, $year) {}", "title": "" }, { "docid": "ad4bba8b19706975b7d709daa9c4ce48", "score": "0.5896825", "text": "function gregorian_to_jalali($time_ggn,$mod=''){\n$date_ggn = strtotime((string)$time_ggn);\n$gy = date('Y',$date_ggn);\n$gm = date('m',$date_ggn);\n$gd = date('d',$date_ggn);\n/*var_dump($time_ggn);*/\n $g_d_m=array(0,31,59,90,120,151,181,212,243,273,304,334);\n if($gy>1600){\n $jy=979;\n $gy-=1600;\n }else{\n $jy=0;\n $gy-=621;\n }\n $gy2=($gm>2)?($gy+1):$gy;\n $days=(365*$gy) +((int)(($gy2+3)/4)) -((int)(($gy2+99)/100)) +((int)(($gy2+399)/400)) -80 +$gd +$g_d_m[$gm-1];\n $jy+=33*((int)($days/12053)); \n $days%=12053;\n $jy+=4*((int)($days/1461));\n $days%=1461;\n if($days > 365){\n $jy+=(int)(($days-1)/365);\n $days=($days-1)%365;\n }\n $jm=($days < 186)?1+(int)($days/31):7+(int)(($days-186)/30);\n $jd=1+(($days < 186)?($days%31):(($days-186)%30));\n return($mod=='')?array($jy,$jm,$jd):$jy.$mod.$jm.$mod.$jd;\n}", "title": "" }, { "docid": "a40147cbeafc0a3f8d352b70e572e039", "score": "0.5888696", "text": "function get_the_day($date) {\n $datetime1 = new DateTime(\"now\");\n $datetime2 = new DateTime($date);\n $datetime1->setTime(0, 0, 0);\n $datetime2->setTime(0, 0, 0);\n $interval = $datetime1->diff($datetime2);\n $interval = $interval->format('%a');\n switch ($interval) {\n case 0:\n return 'Aujourd\\'huis';\n break;\n case 1:\n return 'Hier';\n break;\n default:\n return 'Il y a ' . $interval . ' jours';\n }\n }", "title": "" }, { "docid": "7c4693395e473fc46bda8e410dcde9d6", "score": "0.58477134", "text": "function krakDate(){\n\t\t$semaine=array(\"Dimanche\",\"Lundi\",\"Mardi\",\"Mercredi\",\"Jeudi\",\"Vendredi\",\"samedi\");\n\t\t$mois=array(\"Janvier\",\"Février\",\"Mars\",\"Avril\",\"Mai\",\"juin\",\"Juillet\",\"Ao?t\",\"Septembre\",\"Octobre\",\"Novembre\",\"Décembre\");\n\t\t$krakDate=getdate();\n\t\t$numero_mois =date('m')-1;\n\t\t$datejour =date('j');\n\t\t$numero_semaine=date('w');\n\t\t$annee =date('Y');\t\n\t\t$heure=date(\"H:i:s\");\n\t\t$strjour=$semaine[\"$numero_semaine\"];\n\t\t$strmois=$mois[\"$numero_mois\"];\n\t\t$Aujourdhui=\"$strjour le $datejour $strmois $annee\";\n\t\treturn $Aujourdhui;\n\t}", "title": "" }, { "docid": "44ff8f202f1bb907990e44390b80e2e0", "score": "0.5843291", "text": "function gregorian_to_jalali($g_y, $g_m, $g_d) {\n static $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n static $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n $gy = $g_y - 1600;\n $gm = $g_m - 1;\n $g_day_no = (365 * $gy + int_div($gy + 3, 4) - int_div($gy + 99, 100) + int_div($gy + 399, 400));\n\n for ($i = 0; $i < $gm; ++$i) {\n $g_day_no += $g_days_in_month[$i];\n }\n\n if ($gm > 1 && (($gy % 4 == 0 && $gy % 100 != 0) || ($gy % 400 == 0)))\n # leap and after Feb\n $g_day_no ++;\n $g_day_no += $g_d - 1;\n $j_day_no = $g_day_no - 79;\n $j_np = int_div($j_day_no, 12053); # 12053 = (365 * 33 + 32 / 4)\n $j_day_no = $j_day_no % 12053;\n $jy = (979 + 33 * $j_np + 4 * int_div($j_day_no, 1461)); # 1461 = (365 * 4 + 4 / 4)\n $j_day_no %= 1461;\n\n if ($j_day_no >= 366) {\n $jy += int_div($j_day_no - 1, 365);\n $j_day_no = ($j_day_no - 1) % 365;\n }\n\n for ($i = 0; ($i < 11 && $j_day_no >= $j_days_in_month[$i]); ++$i) {\n $j_day_no -= $j_days_in_month[$i];\n }\n\n return array($jy, $i + 1, $j_day_no + 1);\n}", "title": "" }, { "docid": "271451569d75413daa8d9b42fe8ded91", "score": "0.5839658", "text": "function julian_to_date($JD) {\n \n // double A,B,C,D,E,F,J,Z;\n // double alpha;\n $J = $JD + 0.5;\n \n $Z = floor($J);\n \n $F = $J - $Z;\n \n if ($Z >= 2299161) {\n $alpha = floor(($Z - 1867216.25) / 36524.25);\n $A = $Z + 1 + $alpha - floor($alpha / 4);\n } else\n $A = $Z;\n \n $B = $A + 1524;\n \n $C = floor(($B - 122.1) / 365.25);\n \n $D = floor(365.25 * $C);\n \n $E = floor(($B - $D) / 30.6001);\n \n $JU[\"day\"] = $B - $D - floor(30.6001 * $E) + $F;\n \n if ($E < 14) $JU[\"month\"] = ($E - 1.0);\n else if ($E == 14 || $E == 15) $JU[\"month\"] = ($E - 13.0);\n else return 0; /* error */\n \n if ($JU[\"month\"] > 2) $JU[\"year\"] = ($C - 4716.0);\n else if ($JU[\"month\"] == 1 || $JU[\"month\"] == 2) $JU[\"year\"] = ($C - 4715.0);\n else return 0; /* error */\n \n return $JU;\n // return mktime(0,0,0,$month_m,$day_m,$year_m);\n }", "title": "" }, { "docid": "cc328ad984f44d66d4967ca61db77894", "score": "0.5835869", "text": "public function get_day($journy_date){\n $date_parts = explode('/', $journy_date);\n return $day = date('l',mktime(0, 0, 0, $date_parts[1], $date_parts[0], $date_parts[2]));\n }", "title": "" }, { "docid": "972ef01ef640597debcb0bcaf5b57b0e", "score": "0.5806256", "text": "function jddayofweek($juliandaycount, $mode = null) {}", "title": "" }, { "docid": "ce1af2ba4e3f7c33a591a40c6fb00093", "score": "0.5802881", "text": "function _calcFollowingWorkDay($month,$day) {\n $month =sprintf(\"%02d\",$month);\n $day =sprintf(\"%02d\",$day);\n $date = new Date($this->_year . '-' . $month . '-' . $day);\n\n $date = $date->getNextDay();\n\t while ($date->getDayOfWeek() == 0 || $date->getDayOfWeek() == 6) {\n $date = $date->getNextDay();\n }\n return $date;\n }", "title": "" }, { "docid": "6646cb4800df6871b0b691cbc09d82e9", "score": "0.5770818", "text": "function getWeekday()\n {\n // echo time();\n // return $date;\n $m = $this->month;\n $y = $this->year;\n $d = $this->day;\n if ($m == 1 || $m == 2){\n $m = $m + 12;\n $y = $y - 1;\n\n }\n\n $dayDistance = floor(365*$y) + floor($y/4) - floor($y/100) + floor($y/400) + $d + floor((153*$m+8)/5) ;\n\n\n $daysBeforeFeb1816Th = 736411 - $dayDistance;\n\n $weekOffset = ($daysBeforeFeb1816Th % 7);\n\n if ($weekOffset == 0 ){\n return \"Thursday\";\n }elseif ($weekOffset == -1 || $weekOffset == 6 ){\n return \"Friday\";\n }elseif ($weekOffset == -2 || $weekOffset == 5){\n return \"Saturday\";\n }elseif ($weekOffset == -3 || $weekOffset == 4){\n return \"Sunday\";\n }elseif ($weekOffset == -4 || $weekOffset == 3){\n return \"Monday\";\n }elseif ($weekOffset == -5 || $weekOffset == 2){\n return \"Tuesday\";\n }elseif ($weekOffset == -6 || $weekOffset == 1){\n return \"Wednesday\";\n }\n\n\n }", "title": "" }, { "docid": "6f630cc9f2c4197cb6897512b85f51a7", "score": "0.5767882", "text": "protected function islamicToJd($year, $month, $day)\r\n {\r\n $temp = ($day + ceil(29.5 * ($month - 1)) + ($year - 1) * 354 + \r\n floor((3 + (11 * $year)) / 30) + self::$islamicEpoch) - 1;\r\n\r\n return $temp; \r\n }", "title": "" }, { "docid": "5b1654f5eb34087588606d519b557857", "score": "0.5730638", "text": "function juliantojd($month, $day, $year) {}", "title": "" }, { "docid": "9298d0f490a90ed599e26cf470bd7e99", "score": "0.5698341", "text": "protected function jalaliToGregorian($jYear, $jMonth, $jDay)\n {\n $gDaysInMonth = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n $jDaysInMonth = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n\n $jYear = $jYear - 979;\n $jMonth = $jMonth - 1;\n $jDay = $jDay - 1;\n $jDayNo = 365 * $jYear + self::div($jYear, 33) * 8 + self::div($jYear % 33 + 3, 4);\n\n for ($i = 0; $i < $jMonth; ++$i)\n $jDayNo += $jDaysInMonth[$i];\n\n $jDayNo += $jDay;\n $gDayNo = $jDayNo + 79;\n $gYear = 1600 + 400 * self::div($gDayNo, 146097);\n $gDayNo = $gDayNo % 146097;\n $this->leap = true;\n\n if ($gDayNo >= 36525) {\n $gDayNo--;\n $gYear += 100 * self::div($gDayNo, 36524);\n $gDayNo = $gDayNo % 36524;\n if ($gDayNo >= 365)\n $gDayNo++;\n else\n $this->leap = false;\n }\n\n $gYear += 4 * self::div($gDayNo, 1461);\n $gDayNo %= 1461;\n\n if ($gDayNo >= 366) {\n $this->leap = false;\n $gDayNo--;\n $gYear += self::div($gDayNo, 365);\n $gDayNo = $gDayNo % 365;\n }\n\n for ($i = 0; $gDayNo >= $gDaysInMonth[$i] + ($i == 1 && $this->leap); $i++)\n $gDayNo -= $gDaysInMonth[$i] + ($i == 1 && $this->leap);\n\n $gMonth = $i + 1;\n $gDay = $gDayNo + 1;\n\n return array($gYear, $gMonth, $gDay);\n }", "title": "" }, { "docid": "9984b284dbdcb67eb796573430786033", "score": "0.5690545", "text": "function convertDateYMJ($date) {\n\treturn date(\"Y/m/j\", strtotime($date));\n}", "title": "" }, { "docid": "152db4130e505cdd4742da7edc5886e7", "score": "0.56704307", "text": "function NbDay($begin, $ending )\r\n{\r\n // explode de la date de debut\r\n $tBegin = explode(\"-\", $begin);\r\n // explode de la date de fin\r\n $tEnd = explode(\"-\", $ending);\r\n // Calcul de la différence en seconde sans prendre en comptes le changement heure d'été/hiver\r\n $diff = mktime(0, 0, 0, $tEnd[1], $tEnd[2], $tEnd[0], 0 ) - mktime(0, 0, 0, $tBegin[1], $tBegin[2], $tBegin[0], 0 );\r\n // Retourne le rédultat en nombre de jour\r\n return ($diff / 86400);\r\n}", "title": "" }, { "docid": "97f29296bee3554b0d194510f6ce715d", "score": "0.5669312", "text": "function jalali_to_gregorian($j_y, $j_m, $j_d) {\n static $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n static $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n $jy = $j_y - 979;\n $jm = $j_m - 1;\n $j_day_no = (365 * $jy + int_div($jy, 33) * 8 + int_div($jy % 33 + 3, 4));\n\n for ($i = 0; $i < $jm; ++$i) {\n $j_day_no += $j_days_in_month[$i];\n }\n\n $j_day_no += $j_d - 1;\n $g_day_no = $j_day_no + 79;\n $gy = (1600 + 400 * int_div($g_day_no, 146097)); # 146097 = (365 * 400 + 400 / 4 - 400 / 100 + 400 / 400)\n $g_day_no = $g_day_no % 146097;\n $leap = 1;\n\n if ($g_day_no >= 36525) { # 36525 = (365 * 100 + 100 / 4)\n $g_day_no --;\n $gy += (100 * int_div($g_day_no, 36524)); # 36524 = (365 * 100 + 100 / 4 - 100 / 100)\n $g_day_no = $g_day_no % 36524;\n if ($g_day_no >= 365) {\n $g_day_no ++;\n } else {\n $leap = 0;\n }\n }\n\n $gy += (4 * int_div($g_day_no, 1461)); # 1461 = (365 * 4 + 4 / 4)\n $g_day_no %= 1461;\n\n if ($g_day_no >= 366) {\n $leap = 0;\n $g_day_no --;\n $gy += int_div($g_day_no, 365);\n $g_day_no = ($g_day_no % 365);\n }\n\n for ($i = 0; $g_day_no >= ($g_days_in_month[$i] + ($i == 1 && $leap)); $i ++) {\n $g_day_no -= ($g_days_in_month[$i] + ($i == 1 && $leap));\n }\n\n return array($gy, $i + 1, $g_day_no + 1);\n}", "title": "" }, { "docid": "33038180f5f60cdd608289cec0170583", "score": "0.5612155", "text": "function jal2grn($jal_date, $format = 'Y-m-d') {\n\n list($jal_year, $jal_month, $jal_day) = explode('-', $jal_date);\n\n $grn_date = jalali_to_gregorian($jal_year, $jal_month, $jal_day);\n\n return date($format, mktime(0, 0, 0, $grn_date[1], // gregorian month\n $grn_date[2], // gregorian day\n $grn_date[0]) // gregorian year\n );\n}", "title": "" }, { "docid": "88fcc48e8fbe855d4f7f9fcb89b19779", "score": "0.56030536", "text": "private function persian_to_gregorian_date($j_y, $j_m, $j_d) {\n\t\n\t\t$g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n\t\t$j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n\t\t\n\t\t$jy = $j_y-979;\n\t\t$jm = $j_m-1;\n\t\t$jd = $j_d-1;\n\t\t\n\t\t$j_day_no = 365*$jy + $this->div($jy, 33)*8 + $this->div($jy%33+3, 4);\n\t\tfor ($i=0; $i < $jm; ++$i)\n\t\t\t$j_day_no += $j_days_in_month[$i];\n\t\t\n\t\t$j_day_no += $jd;\n\t\t\n\t\t$g_day_no = $j_day_no+79;\n\t\t\n\t\t$gy = 1600 + 400*$this->div($g_day_no, 146097);\n\t\t$g_day_no = $g_day_no % 146097;\n\t\t\n\t\t$leap = true;\n\t\tif ($g_day_no >= 36525) {\n\t\t\t$g_day_no--;\n\t\t\t$gy += 100*$this->div($g_day_no, 36524);\n\t\t\t$g_day_no = $g_day_no % 36524;\n\t\t\t\n\t\t\tif ($g_day_no >= 365)\n\t\t\t\t$g_day_no++;\n\t\t\telse\n\t\t\t\t$leap = false;\n\t\t}\n\t\t\n\t\t$gy += 4*$this->div($g_day_no, 1461);\n\t\t$g_day_no %= 1461;\n\t\t\n\t\tif ($g_day_no >= 366) {\n\t\t\t$leap = false;\n\t\t\t\n\t\t\t$g_day_no--;\n\t\t\t$gy += $this->div($g_day_no, 365);\n\t\t\t$g_day_no = $g_day_no % 365;\n\t\t}\n\t\t\n\t\tfor ($i = 0; $g_day_no >= $g_days_in_month[$i] + ($i == 1 && $leap); $i++)\n\t\t\t$g_day_no -= $g_days_in_month[$i] + ($i == 1 && $leap);\n\t\t$gm = $i+1;\n\t\t$gd = $g_day_no+1;\n\t\t\n\t\treturn array($gy, $gm, $gd);\n\t}", "title": "" }, { "docid": "5ca69fb20528db5f5a1ce9afccb84f9c", "score": "0.55852085", "text": "function cal_to_jd($calendar, $month, $day, $year) {}", "title": "" }, { "docid": "c3e931c8168cc2043a35f75c7200c32e", "score": "0.5576452", "text": "function dates(){\n $seminggu = array(\"Minggu\",\"Senin\",\"Selasa\",\"Rabu\",\"Kamis\",\"Jumat\",\"Sabtu\");\n $hari = date(\"w\");\n $hari_ini = $seminggu[$hari]; // konversi menjadi hari bahasa indonesia\n\n $tgl_sekarang = date(\"Ymd\");\n $thn_sekarang = date(\"Y\");\n $jam_sekarang = date(\"H:i:s\");\n\n // format penanggalan di database MySQL\n $tanggal=date(\"Y-m-d\"); \n }", "title": "" }, { "docid": "948fe6a49cd3e5cece6d4eda240caea0", "score": "0.557079", "text": "function getJulianDate($Month,$Day,$Year) {\n return mktime(0,0,0,$Month,$Day,$Year);\n}", "title": "" }, { "docid": "d6e38e524cd317a35c51bf830a7e3389", "score": "0.55677336", "text": "public function getMonthDay(): int {\n return (int) $this->dateTime->format('j');\n }", "title": "" }, { "docid": "e8ff2d16dd08daf0a40979cb1e5d3b02", "score": "0.55288637", "text": "function convertDateJMY($date) {\n\treturn date(\"j-m-Y\", strtotime($date));\n}", "title": "" }, { "docid": "cf9fbdecdf8db57140f1341ed2e15b6b", "score": "0.55055255", "text": "public function dayOfWeek() {\n $mjd = $this->toMjd();\n return ($mjd + 3) % 7 + 1;\n }", "title": "" }, { "docid": "4d3c3e20bcc176d668d87bc8216c36d1", "score": "0.54860824", "text": "function kdate()\n{\n return date('Ymd');\n}", "title": "" }, { "docid": "b89c9be7a12474aa83cbf3bcdbf30087", "score": "0.54848194", "text": "function datetimes($tgl, $Jam=1, $day=true)\n {\n $tanggal = strtotime($tgl);\n $bln_array = array(\n '01'=>'Jan',\n '02'=>'Feb',\n '03'=>'Mar',\n '04'=>'Apr',\n '05'=>'Mei',\n '06'=>'Jun',\n '07'=>'Jul',\n '08'=>'Aug',\n '09'=>'Sep',\n '10'=>'Okt',\n '11'=>'Nov',\n '12'=>'Des'\n );\n $hari_arr = array('0'=>'Minggu','1'=>'Senin','2'=>'Selasa','3'=>'Rabu','4'=>'Kamis','5'=>'Jum`at','6'=>'Sabtu');\n $hari = @$hari_arr[date('w', $tanggal)];\n $tggl = date('j', $tanggal);\n $bln = @$bln_array[date('m', $tanggal)];\n $thn = date('Y', $tanggal);\n /* if($Jam==1)$jam=substr($tgl,-8);\n else $jam=''; */\n $jam = $Jam ? date('H:i:s', $tanggal) : '';\n if ($day==false) {\n return \"$tggl $bln $thn $jam\";\n }\n return \"$hari, $tggl $bln $thn $jam\";\n }", "title": "" }, { "docid": "546fb77d18ce8445f7c87ea4a711e468", "score": "0.5448883", "text": "function unixtojd($timestamp = null) {}", "title": "" }, { "docid": "bc66af9381f8e6b3cad97865740c3828", "score": "0.5433229", "text": "static function gregorian_to_jalali($gy, $gm, $gd, $mod = '')\n {\n list($gy, $gm, $gd) = explode('_', self::tr_num($gy . '_' . $gm . '_' . $gd));/* <= Extra :اين سطر ، جزء تابع اصلي نيست */\n $g_d_m = array(0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334);\n if ($gy > 1600) {\n $jy = 979;\n $gy -= 1600;\n } else {\n $jy = 0;\n $gy -= 621;\n }\n $gy2 = ($gm > 2) ? ($gy + 1) : $gy;\n $days = (365 * $gy) + ((int)(($gy2 + 3) / 4)) - ((int)(($gy2 + 99) / 100)) + ((int)(($gy2 + 399) / 400)) - 80 + $gd + $g_d_m[$gm - 1];\n $jy += 33 * ((int)($days / 12053));\n $days %= 12053;\n $jy += 4 * ((int)($days / 1461));\n $days %= 1461;\n $jy += (int)(($days - 1) / 365);\n if ($days > 365) $days = ($days - 1) % 365;\n if ($days < 186) {\n $jm = 1 + (int)($days / 31);\n $jd = 1 + ($days % 31);\n } else {\n $jm = 7 + (int)(($days - 186) / 30);\n $jd = 1 + (($days - 186) % 30);\n }\n return ($mod === '') ? array($jy, $jm, $jd) : $jy . $mod . $jm . $mod . $jd;\n }", "title": "" }, { "docid": "0be4d13fcf746371d98d26e33c8373b3", "score": "0.54328257", "text": "function jcheckdate($month, $day, $year) {\n if (($month < 1) || ($month > 12) || ($year < 1) || ($year > 32767) || ($day < 1)) {\n return 0;\n }\n\n static $jdate_month_days = array(0, 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n\n if ($day > $jdate_month_days[$month]) {\n if (($month != 12) || ($day != 30) || !is_jalali_leap_year($year)) {\n return 0;\n }\n }\n\n return 1;\n}", "title": "" }, { "docid": "2a17cd5085f526415ce004cb1cc3b3d7", "score": "0.5421662", "text": "private function daysInMonth()\n {\n return date(\"t\",mktime(0,0,0,$this->month, 1,$this->year));\n }", "title": "" }, { "docid": "7c3720328fecfe43cc5a1f3814f1b334", "score": "0.54084", "text": "public function getDayOfMonth()\n\t{\n\t\t$timestamp = $this->getTime();\n\t\t\n\t\treturn date(\"j\",$timestamp);\n\t}", "title": "" }, { "docid": "fca5261442f506a2694f8c02b7b03a20", "score": "0.54037863", "text": "function dienstzeit($since) {\n\t\t$jahre = (date('Y') - $since);\n\t\tif ($jahre == 1) {\n\t\t\techo '<td class=\"normal\"><span class=\"number\">' . $jahre . ' Jahr</span></td>';\n\t\t}\n\t\telse if ($jahre == 0){\n\t\t\techo '<td class=\"normal\"><span class=\"number\">Diesem Jahr</span></td>';\n\t\t}\n\t\telse echo '<td class=\"normal\"><span class=\"number\">' . $jahre . ' Jahren</span></td>';\n\t}", "title": "" }, { "docid": "57a4ca1edb25a417626a873fd9ada1ba", "score": "0.53986174", "text": "function weekday($day, $month, $year)\n{\n\treturn (localtime(mktime(12, 0, 0, $month, $day, $year), true)['tm_wday'] + 6) % 7;\n}", "title": "" }, { "docid": "aca7118a9363bba61a2823540b5903aa", "score": "0.5388761", "text": "static function offsetDayDatetime($day,$format=\"Y-m-d H:i:s\"){\n\t\t$time = date($format,strtotime(\"$day days\"));\n\t\treturn $time;\n\t}", "title": "" }, { "docid": "c920e901e8974697ceb0e39102ffd526", "score": "0.5388679", "text": "function getDayName($year,$month,$day,$mode)\n{\n\t$julianDayCount = cal_to_jd(CAL_JULIAN,$month,$day,$year); \n\t$dayOfWeek = jddayofweek($julianDayCount + 1,2);\n\treturn $dayOfWeek;\n}", "title": "" }, { "docid": "4e6918744c5338e35c1113ac64879b3d", "score": "0.53883976", "text": "function obradiDatum($datumVreme) {\n\t\t\t\t//Prvo moraju datum i vreme da se razbiju u posebne promenljive\n\t\t\t\t//2019-08-30 18:49:51\n\t\t\t\t$nizDvaDela = explode(\" \",$datumVreme); // [ \"2019-08-30\", \"18:49:51\"]\n\t\t\t\t$godineMesecDan = explode(\"-\", $nizDvaDela[0]);\n\t\t\t\t$satMinutSekund = explode(\":\", $nizDvaDela[1]);\n\t\t\t\t$godine = $godineMesecDan[0];\n\t\t\t\t$mesec = $godineMesecDan[1];\n\t\t\t\t$datum = $godineMesecDan[2];\n\n\t\t\t\t$sat = $satMinutSekund[0];\n\t\t\t\t$minut = $satMinutSekund[1];\n\t\t\t\t$sekund = $satMinutSekund[2];\n\t\t\t\t//mktime pravi broj sekundi\n\t\t\t\t$brojSekundi = mktime($sat, $minut, $sekund, $mesec,$datum,$godine);\n\n\t\t\t\t//date pravi datum kakav treba\n\t\t\t\t$datum = date(\"d-m-Y\", $brojSekundi); //string\n\t\t\t\treturn $datum; // \"30-08-2019\"\n\t\t\t}", "title": "" }, { "docid": "34d2710d687970d226021f4b93624a62", "score": "0.53866494", "text": "function getCurrentDay() {\n\tglobal $c,$default_GMTtimezone,$default_country;\n\t//return gmdate(\"D\");\n\treturn getFormattedDateDayname(getDualInfoWithAlias(\"now()\",\"datetime\"));\n}", "title": "" }, { "docid": "f23adaa0e7aa79611924a58ecb27354f", "score": "0.5365556", "text": "function getJulianDate()\n {\n return Date_Calc::julianDate($this->day, $this->month, $this->year);\n }", "title": "" }, { "docid": "30ba7d9f16e2e69bedf78332b9b928d8", "score": "0.5357393", "text": "function _calcNearestMonday($month,$day) {\n $month =sprintf(\"%02d\",$month);\n $day =sprintf(\"%02d\",$day);\n $date = new Date($this->_year . '-' . $month . '-' . $day);\n\n if ($date->getDayOfWeek() == 0 ) {\n // bump it up one\n $date = $date->getNextDay();\n }\n if ($date->getDayOfWeek() == 6 ) {\n // bump it up two\n $date = $date->getNextDay();\n\t\t $date = $date->getNextDay();\n }\n\n return $date;\n }", "title": "" }, { "docid": "be30c9678e6e1ea206c2e6c5888fef4a", "score": "0.5354331", "text": "public static function get_day($date) {\r\n\t\treturn intval(date('j', $date));\r\n\t}", "title": "" }, { "docid": "8158a025fbbbbf7df740c651a42cc8e9", "score": "0.5351057", "text": "function get_day($tgl = '')\n{\n\t$day_in_eng = date('l', $tgl);\n\tif ($day_in_eng == 'Sunday') return \"Minggu\";\n\telse if ($day_in_eng == 'Monday') return \"Senin\";\n\telse if ($day_in_eng == 'Tuesday') return \"Selasa\";\n\telse if ($day_in_eng == 'Wednesday') return \"Rabu\";\n\telse if ($day_in_eng == 'Thursday') return \"Kamis\";\n\telse if ($day_in_eng == 'Friday') return \"Jumat\";\n\telse if ($day_in_eng == 'Saturday') return \"Sabtu\";\n}", "title": "" }, { "docid": "d4c039e8e892d77569507af86b11b40b", "score": "0.5348905", "text": "function lastday($month, $day, $year) {\n $lastdayen = date(\"d\", mktime(0, 0, 0, $month + 1, 0, $year));\n list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);\n $lastdatep = $jday;\n $jday = $jday2;\n while ($jday2 != \"1\") {\n if ($day < $lastdayen) {\n $day++;\n list( $jyear, $jmonth, $jday2 ) = gregorian_to_jalali($year, $month, $day);\n if ($pdate2 == \"1\")\n break;\n if ($pdate2 != \"1\")\n $lastdatep++;\n }\n else {\n $day = 0;\n $month++;\n if ($month == 13) {\n $month = \"1\";\n $year++;\n }\n }\n }\n return $lastdatep - 1;\n}", "title": "" }, { "docid": "22009df00e7788a2aeea370c258a9cbd", "score": "0.5347669", "text": "function findMonday($date=\"\",$format=\"Y-m-d\"){\r\n\t\tif($date==\"\") \r\n\t\t\t$date=date(\"Y-m-d\");\r\n\t\t\t\r\n\t\t$week = date(\"W\",strtotime($date));\r\n\t\t$year = date(\"Y\",strtotime($date));\r\n\t\t\r\n\t\t//if ($delta <0) \r\n\t\t\t//$delta = 6;\r\n\t\t\r\n\t\treturn date($format, strtotime($year.\"W\".$week));\r\n\t//\treturn date($format, mktime(0,0,0,date('m'), date('d'), date('Y') ));\r\n\t}", "title": "" }, { "docid": "887d8262cf8147e797519d505a5dd767", "score": "0.53426236", "text": "function dayOfWeek() {\n\n\n $num = func_num_args();\n\n\n if ($num == 3) {\n\n\n $args = func_get_args();\n\n\n $y = $args[0];\n\n\n $m = $args[1];\n\n\n $d = $args[2];\n\n\n }\n\n\n else {\n\n\n $y = $this->year;\n\n\n $m = $this->month;\n\n\n $d = $this->day;\n\n\n }\n\n\n $d += $m < 3 ? $y-- : $y - 2;\n\n\n return ((int)(23 * $m / 9) + $d + 4 + (int)($y / 4) - (int)($y / 100) + (int)($y / 400)) % 7;\n\n\n }", "title": "" }, { "docid": "8f9a8cab38c5281882665b4ef78ef9d5", "score": "0.534071", "text": "protected function get_day() {\n\t\treturn $this->get_request_var( 'cd', 'intval', date_i18n( 'j', $this->now ) );\n\t}", "title": "" }, { "docid": "8011e4991de6ee93d2560d031512be85", "score": "0.5338928", "text": "function jday_of_year($pMonth, $pDay) {\n static $jdate_month_days = array(0, 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n $days = 0;\n \n for ($i = 1; $i < $pMonth; $i ++) {\n $days += $jdate_month_days[$i];\n }\n\n return ($days + $pDay);\n}", "title": "" }, { "docid": "1397635811b2732612c6923f63809525", "score": "0.5318112", "text": "function findDay($date) {\n //\n // $date = new DateTime($date);\n // $day = $date->format('D');\n //\n // return $weekdays[$day];\n\n //each number cooresponds to\n $days_in_month = array(1 => 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n //days of the week in order from today\n $weekdays = array(\"Thursday\", \"Friday\", \"Saturday\", \"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\");\n\n //the input array for the date enter\n //Ex [\"03\", \"12\", \"2015\"]\n $input_date = explode(\"/\", $date);\n $s_input_date = $input_date[1];\n $s_input_month = $input_date[0];\n $s_input_year = $input_date[2];\n\n echo \"M \" . $input_date[0] . \" - \";\n\n echo \"D \" . $input_date[1] . \" - \";\n\n //input month, day, year\n $input_date = intval($s_input_date);\n $input_month = intval($s_input_month);\n $input_year = intval($s_input_year);\n\n //number of day's since start of year\n $number_of_days = ($input_year - 2015) * 365;\n\n //information for today's date\n $days_to_today = 71;\n\n echo $input_date . \" D - \";\n echo $input_month . \" M - \";\n echo $input_year . \" Y - \";\n\n //add the days in the month since the beginning of this year to the total\n for($i = 1; $i < $input_month; $i++) {\n echo \"$i - \";\n $number_of_days += $days_in_month[$i];\n }\n //add the remaining days in the month\n $number_of_days += $input_date;\n\n echo $number_of_days . \"-\";\n echo $days_to_today;\n\n $difference_of_days = $number_of_days - $days_to_today;\n\n echo \"-\" . $difference_of_days;\n\n //positive days\n if($difference_of_days > 0) {\n return $weekdays[($difference_of_days % 7)];\n\n }\n //negative days\n else {\n return $weekdays[7 + ($difference_of_days % 7)];\n }\n }", "title": "" }, { "docid": "28eb4efb037b53e0f23c7dbb744ea7fc", "score": "0.531541", "text": "public function get_month_days()\n {\n return date('t');\n }", "title": "" }, { "docid": "9a5a8baad20dcc407946583c764e873d", "score": "0.53144306", "text": "function ver_dia($k,$hoy_es,$hoy)\n{\n\t$fdia = explode(\"-\",$hoy);\n\tif($k==$hoy_es)\n\t\t$fecha=$hoy;\n\telse\n\t\tif($k<$hoy_es)\n\t\t{\n\t\t\t$diferencia = $hoy_es - $k;\n\t\t\t$fecha = date(\"d-m-Y\",mktime(0, 0, 0, $fdia[1] , $fdia[0]-$diferencia, $fdia[2]));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$diferencia = $k - $hoy_es;\n\t\t \t$fecha = date(\"d-m-Y\",mktime(0, 0, 0, $fdia[1] , $fdia[0]+$diferencia, $fdia[2]));\n\t\t}\n\treturn $fecha;\n}", "title": "" }, { "docid": "176c86f92eaa4ab36e226744f328f18a", "score": "0.5300695", "text": "function daynight(){\r\n $time = date(\"H\"); // og tester om ukedagstallet er søndag(7) eller ikke.\r\n $dag = date(\"N\");\r\n if ($dag != 7){\r\n if ($time >= 06 && $time < 12) {\r\n echo \"<p> God morgen </p>\";}\r\n elseif ($time >= 12 && $time < 18) {\r\n echo \"<p> God ettermiddag </p>\";}\r\n elseif ($time >= 18 && $time < 24) {\r\n echo \"<p> God kveld </p>\";}\r\n else {\r\n \"<p> God natt </p>\";}\r\n }\r\n else {\r\n if ($time >= 06 && $time < 12) {\r\n echo \"<p style='color:green'> God morgen </p>\";}\r\n elseif ($time >= 12 && $time < 18) {\r\n echo \"<p style='color:green'> God ettermiddag </p>\";}\r\n elseif ($time >= 18 && $time < 24) {\r\n echo \"<p style='color:green'> God kveld </p>\";}\r\n else {\r\n \"<p style='color:green'> God natt </p>\";}\r\n }\r\n}", "title": "" }, { "docid": "5c3e7fe4cac7ad196e68ca33a5c729c6", "score": "0.52998155", "text": "function jgetdate($timestamp = NULL) {\n if (!$timestamp) {\n $timestamp = mktime();\n }\n\n list($seconds, $minutes, $hours, $mday, $wday, $mon, $year, $yday, $weekday, $month) = explode('-', jdate('s-i-G-j-w-n-Y-z-l-F', $timestamp, false, false));\n return array(0 => $timestamp, 'seconds' => $seconds, 'minutes' => $minutes, 'hours' => $hours, 'mday' => $mday, 'wday' => $wday, 'mon' => $mon, 'year' => $year, 'yday' => $yday, 'weekday' => $weekday, 'month' => $month);\n}", "title": "" }, { "docid": "947bf6b95d16cd8b415f7fd7a2d17538", "score": "0.5297504", "text": "function date_indo($tgl){\n $ubah = gmdate($tgl, time()+60*60*8);\n $pecah = explode(\"-\",$ubah);\n $tanggal = $pecah[2];\n $bulan = bulan($pecah[1]);\n $tahun = $pecah[0];\n return $tanggal.' '.$bulan.' '.$tahun;\n }", "title": "" }, { "docid": "5e54b24bbda3942d345c9777125e343c", "score": "0.5273346", "text": "function timestampToJalaliDate($timestamp){\n $current_gdate = $timestamp;\n $arr_parts = explode('-', $current_gdate);\n $gYear = $arr_parts[2];\n $gMonth = $arr_parts[1];\n $gDay = $arr_parts[0];\n \n return gregorian_to_jalali($gYear, $gMonth, $gDay, '/');\n}", "title": "" }, { "docid": "bd874725e57744030272dbd1cc31232b", "score": "0.5272972", "text": "function fechaSpain($date){\n \tdate_default_timezone_set('Europe/Madrid');\n $fecha = new DateTime($date);\n $nuevafecha = $fecha->format('d/m/Y');\n return $nuevafecha;\n }", "title": "" }, { "docid": "713419b2d90db0f1067cbc7a55ea079d", "score": "0.5270543", "text": "public function gregorianToJalali($gYear, $gMonth, $gDay)\n {\n $gDaysInMonth = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n $jDaysInMonth = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n\n $gYear = $gYear - 1600;\n $gMonth = $gMonth - 1;\n $gDay = $gDay - 1;\n $gDayNo = 365 * $gYear + self::div($gYear + 3, 4) - self::div($gYear + 99, 100) + self::div($gYear + 399, 400);\n\n for ($i = 0; $i < $gMonth; ++$i)\n $gDayNo += $gDaysInMonth[$i];\n\n if ($gMonth > 1 && (($gYear % 4 == 0 && $gYear % 100 != 0) || ($gYear % 400 == 0)))\n $gDayNo++;\n\n $gDayNo += $gDay;\n $jDayNo = $gDayNo - 79;\n $jNp = self::div($jDayNo, 12053);\n $jDayNo = $jDayNo % 12053;\n $jYear = 979 + 33 * $jNp + 4 * self::div($jDayNo, 1461);\n $jDayNo %= 1461;\n\n if ($jDayNo >= 366) {\n $jYear += self::div($jDayNo - 1, 365);\n $jDayNo = ($jDayNo - 1) % 365;\n }\n for ($i = 0; $i < 11 && $jDayNo >= $jDaysInMonth[$i]; ++$i)\n $jDayNo -= $jDaysInMonth[$i];\n\n $jMonth = $i + 1;\n $jDay = $jDayNo + 1;\n\n return array($jYear, $jMonth, $jDay);\n }", "title": "" }, { "docid": "f55d9174ddedefa7d615b0e76269755a", "score": "0.52674586", "text": "function zero_hour_julian($JD) {\n return floor($JD - 0.5) + 0.5;\n }", "title": "" }, { "docid": "56cda6bf0a0cd7d27fedbf7b96f327a8", "score": "0.52646714", "text": "function tribe_events_the_month_day() {\n\t\tTribe__Events__Template__Month::the_day();\n\t}", "title": "" }, { "docid": "44779f89d8a52ed18967ecdedc521c24", "score": "0.52631927", "text": "public function getDateAndTime(){\n\t date_default_timezone_set(\"Europe/Stockholm\");\n\t\tsetlocale (LC_ALL, \"sv_SE\");\n\t\t$date = date('d F');\n\t\t$year = date('Y');\n\t\t$day = ucfirst(strftime(\"%A\"));\n\t\t$time = date('H:i:s');\n\t\treturn utf8_encode($day) . ', den ' . $date . ' år ' . $year . '. Klockan är [' . $time . ']';\n\t}", "title": "" }, { "docid": "620ae156e4cb8adc25d4dffe7672c49f", "score": "0.52609086", "text": "function nlDatum($datum , $jaarhalf = \"\"){\n\n $maanden=array('01'=>'Januari','02'=>'Februari','03'=>'Maart','04'=>'April','05'=>'Mei','06'=>'Juni',\n '07'=>'Juli','08'=>'Augustus','09'=>'September','10'=>'Oktober','11'=>'November','12'=>'December');\n\n // hier doe je met explode 1 ding uit de string pakken, dus bij deze de cijfer van de maand.\n list($y, $m, $d) = explode('-', $datum);\n $timestamp = strtotime($datum);\n $maand = $maanden[$m];\n\n if (($jaarhalf) > 0) {\n $datum = $d . \" \" . $maand . \" \" . date('y', $timestamp);\n } else {\n $datum = $d . \" \" . $maand . \" \" . $y; \n }\n return $datum;\n}", "title": "" }, { "docid": "bac7e475e11013bfc61a36a1b3418c54", "score": "0.5257561", "text": "function diaSuiguiente($fecha){\n return date(\"Y-m-d\",strtotime('+1 day',$fecha));\n }", "title": "" }, { "docid": "5c128870ac5aa4ad599f2135b1209d82", "score": "0.52483493", "text": "function get_tommorow_day($nowday) {\n\n $nowday_d = (date('m.d.Y', mysql2date('U', $nowday )) );\n $previos_array = explode('.',$nowday_d);\n $tommorow_day = mktime(0, 0, 0, $previos_array[0], ($previos_array[1]+1), $previos_array[2] ) ;\n return $tommorow_day;\n }", "title": "" }, { "docid": "70be176fca953a0b7031f44eaa13e80d", "score": "0.5238293", "text": "function cal_from_jd($jd, $calendar) {}", "title": "" }, { "docid": "60f3de266bb5ef787fdbb09077317e92", "score": "0.5235048", "text": "function day_finish ( $timestamp ) {\n\t\t$timestamp = ensure_timestamp($timestamp);\n\t\t$year = date('Y', $timestamp);\n\t\t$month = date('n', $timestamp);\n\t\t$day = date('j', $timestamp);\n\t\t$result = mktime(23,59,59,$month,$day,$year);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "be0a314f4b96f54aae609d4895666100", "score": "0.52303696", "text": "function jdtogregorian($juliandaycount) {}", "title": "" }, { "docid": "b6974836b0e367b092b92a15e010018a", "score": "0.52268845", "text": "function dateAuj() {\r\n\r\n\t\t\t$jour = date('d');\r\n\t\t\t$mois = date('m');\r\n\t\t\t$annee = date('Y');\r\n\r\n\t\t\t$heure = date('H');\r\n\t\t\t$minute = date('i');\r\n\t\t\treturn 'Bonjour ! Nous sommes le ' . $jour . '/' . $mois . '/' . $annee . ' et il est ' . $heure. ' h ' . $minute. '</br>';\r\n\t\t}", "title": "" }, { "docid": "b0c5f2f05a7e087d142dd89c8d901d7b", "score": "0.5224729", "text": "function lastDay() {\r\n\t\treturn $this -> lundi + 6*86400;\r\n\t}", "title": "" }, { "docid": "831e0fdec0bb97e69d140bdea58bfd64", "score": "0.522342", "text": "function agenda_jourdecal($date,$decalage,$format){\n\tinclude_spip('inc/filtres');\n\t$date_array = recup_date($date);\n\tif ($date_array) list($annee, $mois, $jour) = $date_array;\n\tif (!$jour) $jour=1;\n\tif (!$mois) $mois=1;\n\t$jour2 = $jour + $decalage;\n\t$date2 = mktime(1, 1, 1, $mois, $jour2, $annee);\n\treturn date($format, $date2);\n}", "title": "" }, { "docid": "3cf73e15690d229ecd091e8f89a47c9b", "score": "0.52212316", "text": "function RestarSumarEnDate($min=0, $hora=0, $dia=0, $mes=0, $ano=0)\n{\n\t$hora=$hora-2;\n\t$t = date(\"Y-m-d H:i:s\", mktime(date(\"H\")+ $hora, date(\"i\") + $min, date(\"s\"), date(\"m\") + $mes, date(\"d\") + $dia, date(\"Y\") + $ano));\n\treturn $t;\n}", "title": "" }, { "docid": "4accd72d69c746b074a4de80c4adb37b", "score": "0.5212538", "text": "public function toMjd() {\n // start at \"Day 0\", i.e. last day of the year -1, the day before beginning of calendar:\n $mjd = self::mjdDay0;\n // add days for the cycles of 33 years (generations):\n $nGenerations = intdiv($this->year, 33);\n $mjd += $nGenerations * self::daysPerGeneration;\n // add days for \"quads\" (1 quad = 4 years):\n $year = $this->year - ($nGenerations * 33); // year: 0..32\n $nFourYears = intdiv($year, 4); // nFourYears: 0..8\n $mjd += $nFourYears * 1461;\n // add days for remaining years:\n $year = ($nGenerations * 33) + ($nFourYears * 4);\n for ($y = $year; $y < $this->year; $y++) {\n $mjd += self::daysInYear($y);\n }\n // add days for months:\n $nTwoMonths = intdiv($this->month - 1, 2);\n $mjd += $nTwoMonths * 61;\n $mjd += ($this->month - 1) % 2 * 30;\n // add remaining days:\n $mjd += $this->day;\n return $mjd;\n }", "title": "" }, { "docid": "31dfef5627ef7e7110630dd089161101", "score": "0.52038485", "text": "function thu_of_date($date_input) {\r\n $jd = cal_to_jd(CAL_GREGORIAN, date('m', strtotime($date_input)), date('d', strtotime($date_input)), date('Y', strtotime($date_input)));\r\n $thu_of_date = jddayofweek($jd, 0);\r\n return translate('default.work.day' . ($thu_of_date));\r\n}", "title": "" }, { "docid": "32df5b712aecbf9c5f575bc48b83acbf", "score": "0.52031726", "text": "function jdmonthname($juliandaycount, $mode) {}", "title": "" }, { "docid": "5c1b3e0d6ae5885f4377ee0c75af77a2", "score": "0.519544", "text": "function firstDayOfWeek($year,$month,$day){\r\n global $fd,$weekstartday;\r\n $dayOfWeek=date(\"w\");\r\n $sunday_offset = ($dayOfWeek) * 60 * 60 * 24 ;\r\n $startday_offset = ($weekstartday-1) * 60 * 60 * 24;\r\n $fd = date(\"Y-m-d\", mktime(0,0,0,$month,$day+1,$year) - $sunday_offset + $startday_offset);\r\n return $fd;\r\n}", "title": "" }, { "docid": "5c1b3e0d6ae5885f4377ee0c75af77a2", "score": "0.519544", "text": "function firstDayOfWeek($year,$month,$day){\r\n global $fd,$weekstartday;\r\n $dayOfWeek=date(\"w\");\r\n $sunday_offset = ($dayOfWeek) * 60 * 60 * 24 ;\r\n $startday_offset = ($weekstartday-1) * 60 * 60 * 24;\r\n $fd = date(\"Y-m-d\", mktime(0,0,0,$month,$day+1,$year) - $sunday_offset + $startday_offset);\r\n return $fd;\r\n}", "title": "" }, { "docid": "8fbdd685c9b0e75e54006fa2a83c6b02", "score": "0.5188007", "text": "private function dayOfTheWeek()\n {\n return date(\"w\",mktime(0,0,0,$this->month, 1,$this->year));\n }", "title": "" }, { "docid": "22e8cb4e91228841cb29650f52fcf87e", "score": "0.5170778", "text": "function fechaHoraSpain($date){\n \tdate_default_timezone_set('Europe/Madrid');\n $fecha = new DateTime($date);\n $nuevafecha = $fecha->format('d/m/Y H:i');\n return $nuevafecha;\n }", "title": "" }, { "docid": "94a7d852d60125e67ebbdc5762542c83", "score": "0.5152743", "text": "function tcDates($timestamp, $Settings) {\r\n\t $feiertage[] = \"0101\"; // Neujahrstag\r\n\t $feiertage[] = \"0105\"; // Tag der Arbeit\r\n\t $feiertage[] = \"0310\"; // Tag der Deutschen Einheit\r\n\t $feiertage[] = \"2512\"; // Erster Weihnachtstag\r\n\t $feiertage[] = \"2612\"; // Zweiter Weihnachtstag\r\n\r\n\t // Bewegliche Feiertage berechnen\r\n\t $tage = 60 * 60 * 24;\r\n\t $ostersonntag = easter_date(date('Y', $timestamp));\r\n\t $feiertage[] = date(\"dm\", $ostersonntag - 2 * $tage); // Karfreitag\r\n\t $feiertage[] = date(\"dm\", $ostersonntag + 1 * $tage); // Ostermontag\r\n\t $feiertage[] = date(\"dm\", $ostersonntag + 39 * $tage); // Himmelfahrt\r\n\t $feiertage[] = date(\"dm\", $ostersonntag + 50 * $tage); // Pfingstmontag\r\n\t\t\r\n\t\t//echo date('Y-m-d', strtotime($myDate . ' +1 Weekday'));\r\n\t // Prüfen, ob Feiertag\r\n\t for($numPara = 0; $numPara < 19; $numPara++) {\r\n\t\t $code = date(\"dm\", strtotime(\"+\".$Settings[$numPara].\" Weekday\", $timestamp));\r\n\t\t $datum = getdate(strtotime(\"+\".$Settings[$numPara].\" Weekday\", $timestamp));\r\n\t\t $wochentag = $datum['wday'];\r\n\r\n\t\t if(in_array($code, $feiertage)) {\r\n\t\t \t$addDay = 1;\r\n\t\t \twhile(in_array($code, $feiertage)) {\r\n\t\t \t\tif($Settings[$numPara] < 0) {\r\n\t\t\t \t\t\t$code = date(\"dm\", strtotime(\"+\".($Settings[$numPara]-$addDay).\" Weekday\", $timestamp));\r\n\t\t\t\t\t\t$datum = getdate(strtotime(\"+\".($Settings[$numPara]-$addDay).\" Weekday\", $timestamp));\r\n\t\t\t \t $retArray[$numPara] = date('d.m.Y', strtotime(\"+\".($Settings[$numPara]-$addDay).\" Weekday\", $timestamp));\r\n\t\t\t \t} else {\r\n\t\t\t \t\t$code = date(\"dm\", strtotime(\"+\".($Settings[$numPara]+$addDay).\" Weekday\", $timestamp));\r\n\t\t\t\t\t\t$datum = getdate(strtotime(\"+\".($Settings[$numPara]+$addDay).\" Weekday\", $timestamp));\r\n\t\t\t \t $retArray[$numPara] = date('d.m.Y', strtotime(\"+\".($Settings[$numPara]+$addDay).\" Weekday\", $timestamp));\r\n\t\t\t \t}\r\n\t\t\t \t$wochentag = $datum['wday'];\r\n\t\t \t\t\t$addDay++;\r\n\t\t \t\t}\r\n\t\t } else {\r\n\t\t $retArray[$numPara] = date('d.m.Y', strtotime(\"+\".$Settings[$numPara].\" Weekday\", $timestamp));\r\n\t\t }\r\n\t\t}\r\n\t\treturn ($retArray);\r\n\t}", "title": "" }, { "docid": "c4f575d12b6f7fb4b12600dd27e4a940", "score": "0.5141428", "text": "public static function utc_to_JD($year, $month = 1, $day = 1.0)\n {\n $is_julian = self::is_julian_date($year, $month, $day);\n\n if ($month <= 2) {\n $year -= 1;\n $month += 12;\n }\n\n $A = intval($year / 100);\n $B = ($is_julian) ? 0 : 2 - $A + intval($A / 4);\n $JD = intval(self::D_IN_JY * ($year + 4716)) + intval(self::D_IN_JM * ($month + 1)) + $day + $B - 1524.5;\n\n return $JD;\n }", "title": "" }, { "docid": "e952c9789b824616d4e7fe36534ab33b", "score": "0.51363504", "text": "function monthDayCount($date){\r\r\n\t\t$dateObj\t=\tnew dateClass($date);\t\t\r\r\n\t\t$ret\t\t=\tdate('t',mktime(0,0,0,$dateObj->month,$dateObj->day,$dateObj->year));\r\r\n\t\treturn $ret;\t\t\r\r\n\t}", "title": "" }, { "docid": "b00565aea0aa2f5a7587368b5ea9e45d", "score": "0.51341194", "text": "function showDay($start_date, $lang = 'ar')\n{\n $englishDay = date('l', strtotime($start_date));\n $arabicDay = convertDayFromEnglishToArabic($englishDay);\n return $lang == 'en' ? $englishDay : $arabicDay;\n}", "title": "" }, { "docid": "f0e0b85b133f0236963f1637ddadd5ac", "score": "0.5116021", "text": "function day_time($time = false){\n\tif($time === false){\n\t\t$time = time();\n\t}\n\treturn mktime(0,0,0,idate('m',$time),idate('d',$time),idate('Y',$time));\n}", "title": "" }, { "docid": "5b304eaa92706149086373cd236fddc2", "score": "0.51136285", "text": "function firstDay() {\r\n\t\treturn $this -> lundi;\r\n\t}", "title": "" }, { "docid": "96050b2df6558c3580d3671e73247785", "score": "0.5111383", "text": "function jmktime($hour = 0, $minute = 0, $second = 0, $month = 0, $day = 0, $year = 0, $is_dst = -1) {\n if (($hour == 0) && ($minute == 0) && ($second == 0) && ($month == 0) && ($day == 0) && ($year == 0)) {\n return time();\n }\n\n list($year, $month, $day) = jalali_to_gregorian($year, $month, $day);\n return mktime($hour, $minute, $second, $month, $day, $year, $is_dst);\n}", "title": "" }, { "docid": "49458b65a1f536eacfe673874cc23862", "score": "0.51111203", "text": "function _calcMondayBefore($month,$day) {\n $month =sprintf(\"%02d\",$month);\n $day =sprintf(\"%02d\",$day);\n $date = new Date($this->_year . '-' . $month . '-' . $day);\n\n $date = $date->getPrevDay();\n\t while ($date->getDayOfWeek() != 1) {\n $date = $date->getPrevDay();\n }\n\n return $date;\n }", "title": "" }, { "docid": "e62c3f0f020555889234830bbb12ac83", "score": "0.51106334", "text": "function hr_date($date){\n \n $time=strtotime($date);\n return date('j-M-Y',$time); \n }", "title": "" }, { "docid": "d053332458e39f45384cb9ca570a85c4", "score": "0.5106708", "text": "function dayStartOf($date)\n {\n $time1 = $this->gmtime($date);\n\n return gmmktime(0, 0, 0, $time1[\"tm_mon\"] + 1, $time1[\"tm_mday\"], $time1[\"tm_year\"] + 1900);\n }", "title": "" }, { "docid": "ece6244ab7f37e6677307a441282eef2", "score": "0.5106406", "text": "function menjumlahkan_waktu($waktu,$tambah)\n{\n\treturn date('G:i:s',strtotime($tambah,strtotime($waktu)));\n}", "title": "" }, { "docid": "5307a95023d31f29692c83f21e6b2ffa", "score": "0.51058346", "text": "function days($date) {\n // http://www.giss.nasa.gov/tools/mars24/help/algorithm.html\n // J2000.0 (ou J2000), désigne le jour julien 2 451 545.0 TT, soit le 1er janvier 2000 dans le calendrier\n // grégorien, à 11 h 58 min 55,816 s UTC (11 h 59 min 27,816 s TAI)\n \n /**\n * A-2.\n * Convert millis to Julian Date (UT).\n * Although there's plenty of sample code available on-line which demonstrates how to convert a Gregorian\n * calendar date to a Julian Date, we simply use the offset from a known, recent Julian Date. Again, we use the\n * Unix epoch, 00:00:00 on Jan. 1, 1970.\n */\n $JDUT = 2440587.5 + (date(\"U\", $date) / (86400)); // s/day);\n /**\n * A-3.\n * Determine time offset from J2000 epoch (UT).\n * This step is optional; we only need to make this calculation if the date is before Jan. 1, 1972. Determine\n * the elapsed time in Julian centuries since 12:00 on Jan. 1, 2000 (UT).\n */\n $T = ($JDUT - 2451545.0) / 36525.;\n /**\n * A-4.\n * Determine UTC to TT conversion. (Replaces AM2000, eq. 27)\n * Terrestrial Time (TT) advances at constant rate, as does UTC, but no leap seconds are inserted into it and so\n * it gradually gets further ahead of UTC. The best way to determine the difference between TT and UTC is to\n * consult a table of leap seconds. Alternatively, one could try to use an empirical formula.\n * In Mars24 we, oddly enough, use both methods. We use the USNO table for dates after Jan. 1, 1972, and a\n * formula for dates prior to then. In consulting the USNO table, however, it is important to note that the\n * table provides values for the TAI-UTC difference, where TAI is International Atomic Time. To obtain the\n * TT-UTC difference, add 32.184 seconds to the value of TAI-UTC. For example, the USNO table indicates that on\n * Jan. 1, 2006, the TAI-UTC value is 33.0 seconds, and thus, the value for TT-UTC on that date (and until the\n * next date on which another leap second is added to the clock) would be 33.0s + 32.184s = 65.184s.\n * The formula applied for dates prior to Jan. 1, 1972, is similar to AM2000, eq. 27, but has been revised and\n * includes additional terms:\n */\n $TT_UTC = 64.184 /*s*/ + 59 /*s*/ * $T; // - 51.2 /*s*/ * $T2 - 67.1 /*s*/ * $T3 - 16.4 /*s*/ * $T4;\n /**\n * (Note: Mars24 uses the USNO table which includes the leap second added Jan.\n * 1, 2006. Obviously, then, it does not allow for any leap seconds which might be subsequently added. Bulletin\n * C 33 from the IERS Earth Orientation Centre indicates this will not occur any earlier than Jan. 1, 2009.)\n * A-5. Determine Julian Date (TT).\n */\n $JDTT = $JDUT + ($TT_UTC) / 86400; // s·day-1]\n \n /**\n * A-6.\n * Determine time offset from J2000 epoch (TT). (AM2000, eq. 15)\n */\n $DtJ2000 = $JDTT - 2451545.0;\n // Jan. 4, 2004 (UTC)\n // Eq. Parameter Value\n // A-1 millis 1073137591000 ms\n // A-2 JDUT 2453008.07397\n // A-3 T —\n // A-4 TT - UTC 64.184 s\n // A-5 JDTT 2453008.07471\n // A-6 DtJ2000 1463.07471\n \n return $DtJ2000;\n \n // The lines below work from 1900 march to feb 2100\n $a = 367 * $y - 7 * ($y + ($m + 9) / 12) / 4 + 275 * $m / 9 + $d;\n $day = $a - 730531.5 + $hour / 24;\n \n // These lines work for any Gregorian date since 0 AD\n if ($m == 1 || $m == 2) {\n $m += 12;\n $y -= 1;\n }\n $a = $y / 100;\n $b = 2 - $a + $a / 4;\n $day = floor(365.25 * ($y + 4716)) + floor(30.6001 * ($m + 1)) + $d + $b - 1524.5 - 2451545 + $h / 24;\n return ($day);\n }", "title": "" }, { "docid": "64bb451e2ecf7c400b5f7c9a556946e2", "score": "0.5105266", "text": "public function date() {\n return $this->day;\n }", "title": "" }, { "docid": "c553a04b6baf1e7eee1c078846e4fa9e", "score": "0.51051205", "text": "function _data_first_month_day() {\n $month = date('m');\n $year = date('Y');\n return date('Y-m-d', mktime(0,0,0, $month, 1, $year));\n }", "title": "" }, { "docid": "e08b3307ea31e05f20cdfedabdef17f9", "score": "0.5101444", "text": "function getDay()\n {\n $datetime = \\DateTime::createFromFormat('Y-m-d', $this->_currentDate);\n return $datetime->format('D');\n }", "title": "" } ]
809a35625810e3d690759634a667f7a3
Execute the configured controller actions.
[ { "docid": "f217ab5318edfa8f580f20f6c3e3e376", "score": "0.67254275", "text": "public function run()\n {\n $this->runActions();\n }", "title": "" } ]
[ { "docid": "93d57849f1418a2723b4fe19df4a6077", "score": "0.72699475", "text": "public function action()\n {\n foreach ($this->actions as $action) {\n $action->run();\n }\n }", "title": "" }, { "docid": "5e7c9a4e0c0fff147ea90749432d9516", "score": "0.7239215", "text": "public function execute()\n {\n $keys = array_keys($this->actions);\n $count = count($keys);\n\n // retrieve current render mode\n $renderMode = $this->controller()->getRenderMode();\n\n // force all actions at this point to render to variable\n $this->controller()->setRenderMode(Xadr::RENDER_VARIABLE);\n\n for ($i = 0; $i < $count; $i++) {\n $action =& $this->actions[$keys[$i]];\n\n if ($this->preserve && $action['params'] != null) {\n $originalParams = $this->request()->parameters()->getArrayCopy();\n }\n\n if ($action['params'] != null) {\n $this->request()->parameters()->setMerge($action['params']);\n }\n\n // execute/forward the action and retrieve rendered result\n $this->controller()->forward($action['unit'], $action['action']);\n\n // retrieve renderer for action\n $renderer =& $this->request()->attributes()->get('org.mojavi.renderer');\n\n // did the action render a view?\n if ($renderer !== null) {\n // retrieve rendered result\n $action['result'] = $renderer->fetchResult();\n // clear rendered result\n $renderer->clearResult();\n // remove renderer\n $this->request()->attributes()->remove('org.mojavi.renderer');\n }\n\n if (isset($originalParams)) {\n $this->request()->parameters()->exchangeArray($originalParams);\n unset($originalParams);\n }\n }\n\n // put the old rendermode back\n $this->controller()->setRenderMode($renderMode);\n }", "title": "" }, { "docid": "5f984b78d2d8f6635ff8919f7017b5d6", "score": "0.7229121", "text": "public function executeController() {\n $dataController = $this->routes[$this->path];\n\n $pathController = $dataController['path'];\n $nameController = $dataController['controller'];\n $actionController = $dataController['action'];\n\n include $pathController;\n // createcontroller object by class\n $Controller = new $nameController();\n // execute controller function by name\n $Controller->$actionController();\n }", "title": "" }, { "docid": "d66f2ff40770008e022553fdb36fed1f", "score": "0.7203803", "text": "public function executeController()\n {\n\t\t$ctrl_method_name = $this->method_name;\n $this->$ctrl_method_name();\n\t\t\n\t\tif($this->navbar_method_name !== null)\n\t\t{\n\t\t\t$navbar_method_name = $this->navbar_method_name;\n\t\t\t$this->$navbar_method_name();\n\t\t}\t\t\n }", "title": "" }, { "docid": "2421bb8867e3f4b7c25f7da935de8a2f", "score": "0.7091939", "text": "public function run()\n {\n $uri = $this->getURI();\n\n // Check $uri presence in routes.php\n foreach ($this->routes as $uriPattern => $controllerAction) {\n /*\n * Compare $uriPattern and $uri\n * ~ delimiter is used because we may have / in $uriPattern\n */\n if (preg_match(\"~^$uriPattern$~\", $uri)) {\n\n // Define internal route\n $internalRoute = preg_replace(\"~^$uriPattern$~\", $controllerAction, $uri);\n\n /*\n * If there is a match,\n * decide what Controller\n * and what action\n * will handle the request\n */\n $segments = explode('/', $internalRoute);\n $controllerClassName = ucfirst(array_shift($segments)) . 'Controller';\n $actionFunctionName = 'action' . ucfirst(array_shift($segments));\n\n // Define action parameters\n $actionParameters = $segments;\n\n // Include Controller class file\n $controllerFilePath = ROOT . '/controllers/' . $controllerClassName . '.php';\n if (file_exists($controllerFilePath)) {\n include_once($controllerFilePath);\n }\n\n // Create controller object\n $controllerObject = new $controllerClassName;\n // Call action with parameters\n $result = call_user_func_array(array($controllerObject, $actionFunctionName), $actionParameters);\n if ($result != null) {\n break;\n }\n }\n }\n }", "title": "" }, { "docid": "720e4da71f3cc8b9215970c0878e72d4", "score": "0.6991093", "text": "public function execAction()\n\t\t{\n\t\t\t$controller_name = $this->fullControllerName();\n\t\t\t$action_name = $this->fullActionName();\n\t\t\t\n\t\t\tif(!class_exists($controller_name))\n\t\t\t\ttrigger_error(\"Undefined object \".$controller_name);\n\t\t\t\n\t\t\tif(!method_exists($controller_name, $action_name))\n\t\t\t\ttrigger_error(\"Call to undefined action \".$action_name);\n\t\t\t\n\t\t\t$controller_instance = new $controller_name;\n\t\t\t\n\t\t\t#processing arguments into action method\n\t\t\t$r = new ReflectionMethod($controller_name, $action_name);\n\t\t\t$params_num = $r->getNumberOfRequiredParameters();\n\t\t\t\n\t\t\tif(count($this->_args) < $params_num)\n\t\t\t\ttrigger_error(\"not all the action arguments are supplied\");\n\t\t\t\t\n\t\t\t#call the action ($controller_instance->$action_name();)\n\t\t\tcall_user_func_array(array($controller_instance, $action_name), $this->_args);\n\t\t}", "title": "" }, { "docid": "33a2061f7e3af4f553558e50e471db29", "score": "0.69652075", "text": "public function run() {\n $uri = $this->getURI();\n foreach ($this->routes as $pattern => $request){\n if(preg_match(\"~$pattern~\", $uri)){\n \n $uri = preg_replace(\"~$pattern~\", $request, $uri);\n $parts = explode('/', $uri);\n \n $controller_name = ucfirst(array_shift($parts)).'Controller';\n $action_name = 'action'.ucfirst(array_shift($parts));\n \n $controller_path = ROOT.'/controllers/'.$controller_name.'.php';\n \n if(file_exists($controller_path)){\n include_once ($controller_path);\n $obj = new $controller_name;\n $result = call_user_func_array(array($obj, $action_name), $parts);\n if(!$result){\n exit();\n }\n }else{\n exit();\n }\n exit();\n }\n }\n }", "title": "" }, { "docid": "33b79d25aef3edb57354343b36a6ae26", "score": "0.6955074", "text": "public function runActions()\n {\n //catch all errors: Yii::app()->onError seems not to be enough\n ini_set('display_errors', 'Off');\n Yii::app()->onError = array($this,'logYiiError');\n register_shutdown_function('logCriticalError');\n\n $this->_successCount = 0;\n $this->_failedCount = 0;\n\n $startTime = time();\n\n $actionsConfig = $this->getActionsConfig();\n\n if (empty($actionsConfig)) {\n $msg = 'Empty or invalid configuration.';\n $this->logError($msg);\n\n if (!$this->silent) {\n echo $msg;\n }\n\n Yii::app()->end();\n }\n\n foreach ($actionsConfig as $config) {\n $configId = md5(serialize($config));\n\n $lastExec = null;\n if (!$this->checkInterval($config['interval'], $configId, $lastExec)) {\n ++$this->_failedCount;\n $msg = sprintf('Invalid time interval - Last call: %s Allowed interval: %s',\n $lastExec, $config['interval']);\n self::logError($msg);\n continue;\n }\n\n if (!$this->checkIPAddress($config['allowedIps'], $ip)) {\n ++$this->_failedCount;\n $this->registerInterval($config['interval'], $configId);\n\n self::logError('Invalid ip address: '.$ip);\n continue;\n }\n\n //run a script\n if ($config['type'] == self::TYPE_SCRIPT) {\n self::runScript($config['script'], $config['params'], $config['scriptPath']);\n }\n //touch a url with internal httpclient\n elseif ($config['type'] == self::TYPE_TOUCH) {\n self::touchUrl($config['url'], $config['postData'], $config['contentType']);\n }\n //touch a url with extension EHttpClient\n elseif ($config['type'] == self::TYPE_TOUCHEXT) {\n self::touchUrlExt($config['url'], $config['postData'], $config['contentType'], $config['httpClientConfig']);\n }\n //run controller action\n else {\n $controller = $this->createControllerFromRoute($config['route'], $actionId);\n\n if (empty($controller)) {\n ++$this->_failedCount;\n continue;\n }\n\n if (empty($actionId)) {\n ++$this->_failedCount;\n continue;\n }\n\n $params = isset($config['actionParams']) ? $config['actionParams'] : array();\n\n if ($this->execControllerAction($controller, $actionId, $params, $config, true)) {\n $this->_successCount++;\n } else {\n $this->_failedCount++;\n }\n }\n\n $this->registerInterval($config['interval'], $configId);\n }\n\n $duration = time() - $startTime;\n $totalCount = $this->_successCount + $this->_failedCount;\n\n $msg = sprintf('%d action(s) executed - Duration: %d Success: %d Failed: %d', $totalCount, $duration, $this->_successCount, $this->_failedCount);\n $this->logTrace($msg);\n }", "title": "" }, { "docid": "27af87d352aa9606ed90938c3e3832bc", "score": "0.694677", "text": "public function execute() {\n $viewController = $this->getViewController();\n if ($viewController instanceof Controller) {\n $viewController->execute();\n } else {\n echo \"404!\";\n }\n }", "title": "" }, { "docid": "fbd9a4e897c4e6cb8985c038a8c6ffd1", "score": "0.6929891", "text": "function execute() {\n\t\tif (empty($this->args)) {\n\t\t\t$this->__interactive();\n\t\t}\n\n\t\tif (isset($this->args[0])) {\n\t\t\t$controller = $action = $alias = null;\n\t\t\t$this->controllerName = Inflector::camelize($this->args[0]);\n\t\t\t$this->controllerPath = Inflector::underscore($this->controllerName);\n\n\t\t\tif (isset($this->args[1])) {\n\t\t\t\t$this->template = $this->args[1];\n\t\t\t}\n\n\t\t\tif (isset($this->args[2])) {\n\t\t\t\t$action = $this->args[2];\n\t\t\t}\n\n\t\t\tif (!$action) {\n\t\t\t\t$action = $this->template;\n\t\t\t}\n\n\t\t\tif (in_array($action, $this->scaffoldActions)) {\n\t\t\t\t$this->bake($action, true);\n\t\t\t} elseif ($action) {\n\t\t\t\t$this->bake($action, true);\n\t\t\t} else {\n\t\t\t\t$vars = $this->__loadController();\n\t\t\t\tif ($vars) {\n\n\t\t\t\t\t$methods = array_diff(\n\t\t\t\t\t\tarray_map('strtolower', get_class_methods($this->controllerName . 'Controller')),\n\t\t\t\t\t\tarray_map('strtolower', get_class_methods('appcontroller'))\n\t\t\t\t\t);\n\t\t\t\t\tif (empty($methods)) {\n\t\t\t\t\t\t$methods = $this->scaffoldActions;\n\t\t\t\t\t}\n\t\t\t\t\t$adminDelete = null;\n\n\t\t\t\t\t$adminRoute = Configure::read('Routing.admin');\n\t\t\t\t\tif (!empty($adminRoute)) {\n\t\t\t\t\t\t$adminDelete = $adminRoute.'_delete';\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($methods as $method) {\n\t\t\t\t\t\tif ($method{0} != '_' && !in_array($method, array('delete', $adminDelete))) {\n\t\t\t\t\t\t\t$content = $this->getContent($method, $vars);\n\t\t\t\t\t\t\t$this->bake($method, $content);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "aa25a1a1687fa86f6a7e53551d890499", "score": "0.69228894", "text": "public function executeAction() {\n\t\t$this->getController();\n\t\t//make sure we can read the file\n\t\tif (is_readable($this->file) == false) {\n\t\t\techo $this->file;\n\t\t\tdie ('404 Not Found');\n\t\t}\n\t\t//include_once($this->file);\n\t\t/*** instantiate controller ***/\n\t\t$class = 'MowattMedia_Controllers_' . $this->controller . 'Controller';\n\t\t$controller = new $class($this->registry);\n\t\tif (is_callable(array($controller, $this->action)) == false) {\n\t\t\t$action = 'index';\n\t\t} else {\n\t\t\t$action = $this->action;\n\t\t}\n\t\t$action = strtolower($action);\n\t\t/*** execute the method ***/\n\t\t$controller->$action();\n\t}", "title": "" }, { "docid": "1de0f4414449b831d1e2ec68910bcc61", "score": "0.69226104", "text": "public function execute()\n\t{\n\t\t$controllerPath = $this->getRouteControllerPath();\n\t\t\t\n\t\t\tif(strpos($controllerPath, 'Controller')){\n\n\t\t\t\tinclude_once $controllerPath;\n\n\t\t\t}\n\n\t\t//Let's instantiate controller\n\n\t\t$controllerName = $this->getRouteController();\n\t\t$controller = new $controllerName;\n\n\t\tif(!is_a($controller, 'AbstractController')){\n\n\t\t\tthrow new Exception(\"Invalid controller $controllerName.\");\n\t\t\t\n\t\t}\n\t\t//Let's get the params\n\t\t\n\t\t$params = $this->getRouteParams();\n\t\t\n\t\t//If no $params given let's set it to an empty array.\n\t\t$params = ($params) ? $params : array();\n\t\t\n\t\t//Let's execute the action\n\n\t\t$action = $this->getRouteAction();\n\n\t\t$controller->setAction($action);\n\t\t$controller->setParams($params);\n\n\n\t\treturn $controller->invoke();\n\t}", "title": "" }, { "docid": "d7c1a34335ba175ce8da71b33c728d3f", "score": "0.6884377", "text": "public function run()\n {\n if (!method_exists($this->controllerFQCN, 'preProcess')\n || (call_user_func_array($this->controllerFQCN . '::preProcess', $this->params) === true)) {\n call_user_func_array($this->controllerFQCN . '::' . $this->action, $this->params);\n }\n call_user_func_array($this->controllerFQCN . '::postProcess', $this->params);\n }", "title": "" }, { "docid": "f00bdeb7716e9428911313318bea64a6", "score": "0.68832797", "text": "public function dispatch()\n {\n $controller = $this->request->getStringParam('controller');\n $action = $this->request->getStringParam('action');\n $plugin = $this->request->getStringParam('plugin');\n\n if ($controller === '') {\n $route = $this->route->findRoute($this->getPath());\n $controller = $route['controller'];\n $action = $route['action'];\n $plugin = $route['plugin'];\n }\n\n $this->controller = ucfirst($this->sanitize($controller, 'app'));\n $this->action = $this->sanitize($action, 'index');\n $this->plugin = ucfirst($this->sanitize($plugin));\n\n return $this->executeAction();\n }", "title": "" }, { "docid": "0e9394b851185909f209e674c54a19f7", "score": "0.6874119", "text": "public function execute()\n {\n if($this->_requestType == 'cli')\n {\n if($this->_request == 'build')\n {\n $this->build();\n }\n \n return;\n }\n \n $this->auth();\n \n foreach($this->_routes as $pattern => $view)\n {\n if(preg_match(\"#^$pattern/?$#\", $this->_request))\n {\n if(is_callable($view))\n call_user_func($view, $this->_request);\n else\n $this->load(\"views/$view.php\");\n \n return;\n }\n }\n \n exit('404. Not Found');\n }", "title": "" }, { "docid": "89ef9530c06e94818a20d21f4d819f5c", "score": "0.68366134", "text": "public function runAction($controllerClass, $actionName);", "title": "" }, { "docid": "60b5b0110ff938e56b5b131729bca283", "score": "0.6820079", "text": "public function run()\n {\n // Add the default action index\n $action = (!isset($_GET['action']) || empty($_GET['action'])) ? 'index' : $_GET['action'];\n $controller = new MongoController();\n $action = 'action' . ucwords($action);\n\n if(method_exists($controller, $action)) {\n $controller->$action();\n } else {\n throw new Exception(\"$action doesn't exist.\");\n }\n }", "title": "" }, { "docid": "7b068ec52582bce7cbb590f2e1887002", "score": "0.6768063", "text": "public function run() {\n\t\t$path_regex = ( \n\t\t\t'@^/\\Q'. trim($this->url_base) .'\\E/'\n\t\t\t. '([\\w\\-\\_]+)'\n\t\t\t. '(?:/([a-zA-Z_][\\w\\-\\_]*))?' // Actions cannot start with numeric, this is how we allow index actions with numeric IDs passed\n\t\t\t. '(\\W[^\\?]*)?'\n\t\t\t. '(\\?|$)@'\n\t\t\t);\n\n\t\tif ( ! preg_match($path_regex, $_SERVER['REQUEST_URI'], $m) ) { header(\"HTTP/1.0 404 Not Found\"); echo \"404 Not Found\\n</br>Api QuickServe\"; exit; }\n\t\t@list($x,$flat_class,$flat_action,$path_info) = $m;\n\t\tif ( empty( $flat_action ) && ! is_numeric($flat_action) ) { $flat_action = 'index'; }\n\n\t\t$class = self::flatToCamelCase($flat_class .'-controller');\n\t\t$full_class = $this->class_prefix . $class;\n\t\t$action = self::flatToCamelCase($flat_action .'-action');\n\n\t\t/// Check file\n\t\t$class_file = $this->ctl_base .'/'. $class .'.php';\n\t\tif ( ! file_exists($class_file) ) { header(\"HTTP/1.0 404 Not Found\"); echo \"404 Not Found\\n</br>Api QuickServe (Class File Not Found $full_class)\"; exit; }\n\n\t\t/// Check Class\n\t\t@include($this->ctl_base .'/'. $class .'.php');\n\t\tif ( ! class_exists($full_class) ) { header(\"HTTP/1.0 404 Not Found\"); echo \"404 Not Found\\n</br>Api QuickServe (Class Not Found, Misnamed or Syntax Error)\"; exit; }\n\n\t\t/// Check Action Method\n\t\t$ctl = new $full_class();\n\t\tif ( ! method_exists($ctl, $action) && ! method_exists($this->class_prefix . $class, '__call') ) { header(\"HTTP/1.0 404 Not Found\"); echo \"404 Not Found\\n</br>Api QuickServe (Action Not Found, Misnamed or Syntax Error)\"; exit; }\n\n\t\t$ctl->controller = $flat_class;\n\t\t$ctl->action = $flat_action;\n\t\t$ctl->path_info = $path_info;\n\n\t\t/// Run init()\n\t\tif ( method_exists($ctl, 'init') ) { $ctl->init(); }\n\n\t\t/// Run Action\n\t\t$result = $ctl->$action();\n\n\t\t/// Default Transport ( if they returned non-empty and didn't exit )\n\t\tif ( ! empty( $result ) && method_exists($ctl, 'actionReturnTransport') ) {\n\t\t\t$ctl->actionReturnTransport($result);\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "8c51fb9d65dd9e20b78f2ba4e7536783", "score": "0.676317", "text": "public function execute()\n\t{\n\t\t// Check logged in status\n\t\tif (User::isGuest())\n\t\t{\n\t\t\t$return = base64_encode(Request::getString('REQUEST_URI', Route::url('index.php?option='\n\t\t\t\t. $this->_option . '&controller=' . $this->_controller . '&task='\n\t\t\t\t. Request::getWord('task', ''), false, true), 'server'));\n\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=com_users&view=login&return=' . $return)\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t$this->_authorize();\n\n\t\t// Load the com_resources component config\n\t\t$rconfig = Component::params('com_resources');\n\t\t$this->rconfig = $rconfig;\n\n\t\t// Set the default task\n\t\t$this->registerTask('__default', 'pipeline');\n\t\t$this->registerTask('register', 'save');\n\n\t\tparent::execute();\n\t}", "title": "" }, { "docid": "c1a89af66f87ba90343ddbb3fa9df383", "score": "0.675421", "text": "public function run()\r\n\t{\r\n\t\ttry {\r\n\r\n\t\t\t// Controller\r\n\t\t\t$controller = ( isset($_REQUEST['controller']) ) ? Tools::sanitize($_REQUEST['controller']) : 'default' ;\r\n\t\t\t$controller_name = ucfirst( strtolower( $controller ) ) . 'Controller';\r\n\t\t\t$controller_filepath = self::CONTROLLERS_DIR . '/' . $controller_name . '.php';\r\n\r\n\t\t\tif ( file_exists( $controller_filepath ) )\r\n\t\t\t{\r\n\t\t\t\tinclude_once( $controller_filepath );\r\n\t\t\t\t$controller = new $controller_name( $this );\r\n\t\t\t\t\r\n\t\t\t\t$action = ( isset( $_REQUEST['action'] ) ) ? Tools::sanitize($_REQUEST['action']) : 'defaultAction' ;\r\n\t\t\t\tif ( method_exists( $controller, $action ) )\r\n\t\t\t\t\t$controller->$action();\r\n\t\t\t\telse\r\n\t\t\t\t\tthrow new AppException(\"Action (\". $action .\") not found\", 1);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\tthrow new AppException(\"Controller (\". $controller_name .\") not found\", 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (AppException $e) {\r\n\t\t\techo $e->getMessage();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a07d6b8458ce7e18e62b15369485b1f5", "score": "0.6749383", "text": "public function execute()\n\t{\n\t\t$this->before();\n\n\t\t// Determine the action to use\n\t\t$action = 'action_'.$this->request->action();\n\n\t\t// If the action doesn't exist, it's a 404\n\t\tif ( ! method_exists($this, $action))\n\t\t{\n\t\t\tthrow HTTP_Exception::factory(404,\n\t\t\t\t'The requested URL :uri was not found on this server.',\n\t\t\t\tarray(':uri' => $this->request->uri())\n\t\t\t)->request($this->request);\n\t\t}\n\n\t\t$params = $this->getMethodParams($action);\n\n\t\t// Execute the action itself\n\t\tcall_user_func_array(array($this, $action), $params);\n\n\t\t// Execute the \"after action\" method\n\t\t$this->after();\n\n\t\t// Return the response\n\t\treturn $this->response;\n\t}", "title": "" }, { "docid": "f1f5932dc3fa97b22ee2549df15df22a", "score": "0.6711434", "text": "private function run()\n {\n //get the needed controller\n //@todo Fixed controller, create controller factory if necessary\n $apiCtrl = $this->apiControllers[\"entity\"] ?? null;\n\n if ($apiCtrl == null) {\n //no controller is found\n $this->setState(HttpResponseCodes::NotFound);\n return;\n }\n\n //inject the context\n $apiCtrl->setContext($this);\n \n //the apictrl handles if the request has the permission\n if (!$apiCtrl->hasPermission()) {\n $this->createMessageResponse(false, \"You haven't the permissions to do this action\");\n $this->setState(HttpResponseCodes::Unauthorized);\n return;\n }\n\n //run the right method for the call\n switch ($this->apiRequest->method) {\n case 'GET':\n //decide between geting a specific record or \"all\" records\n if ($this->apiRequest->requestedId != null) {\n $this->response = $apiCtrl->getById($this->apiRequest->requestedId, $this->apiRequest->params);\n } else {\n $this->response = $apiCtrl->get($this->apiRequest->params);\n }\n break;\n case 'PUT':\n $this->response = $apiCtrl->update($this->apiRequest->requestedId, $this->apiRequest->input);\n break;\n case 'POST':\n //decide between creating a record or call an action\n if ($this->apiRequest->action != null) {\n $this->response = $apiCtrl->invokeAction($this->apiRequest->action, $this->apiRequest->requestedId, $this->apiRequest->input);\n } else {\n $this->response = $apiCtrl->create($this->apiRequest->input);\n }\n break;\n case 'DELETE':\n $this->response = $apiCtrl->delete($this->apiRequest->requestedId, $this->apiRequest->input);\n break;\n default:\n $this->createMessageResponse(false, \"Not supported Method: \" . $this->apiRequest->method);\n $this->setState(HttpResponseCodes::MethodNotAllowed);\n return;\n }\n }", "title": "" }, { "docid": "a6c4e6da050da95e38cf3418beef2924", "score": "0.66865236", "text": "public function actions() {\n\t\tif ( $this->is_api_keys_settings_page() ) {\n\t\t\t// Revoke key.\n\t\t\tif ( isset( $_REQUEST['revoke-key'] ) ) { // WPCS: input var okay, CSRF ok.\n\t\t\t\t$this->revoke_key();\n\t\t\t}\n\n\t\t\t// Bulk actions.\n\t\t\tif ( isset( $_REQUEST['action'] ) && isset( $_REQUEST['key'] ) ) { // WPCS: input var okay, CSRF ok.\n\t\t\t\t$this->bulk_actions();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "defc60c3593ccfd84c237393771266e4", "score": "0.6637807", "text": "public function run(){\n\t\t\trequire ('./application/controllers/'. $this->controler .'.php');\n\t\t\t//Executar o controller\n\t\t\t$app = new $this->controler();\n\t\t\t//Executar o método\n\t\t\t$action= $this->action;\n\t\t\t$app->$action();\n\t\t}", "title": "" }, { "docid": "595d3daa3e0bd5c299806a6dc81f483c", "score": "0.66262984", "text": "public function executeAction()\n {\n return $this->executeGet();\n }", "title": "" }, { "docid": "8e8d018b6e76ad35026297c67ca60e52", "score": "0.6619097", "text": "public function run() {\n if (isset($_REQUEST['action'])) { \n $method = 'handle' . $_REQUEST['action'];\n \n if (method_exists($this, $method)) {\n $this->$method();\n }\n }\n }", "title": "" }, { "docid": "604d228dc72338defc85e485ffda5993", "score": "0.6613378", "text": "public function handleAction()\n\t{\n\t\tif ($_SERVER['HTTPS'] == 'off') {\n\t\t\t$this->outputError(10, 'A secure (https://) connection is required.');\n\t\t}\n\n\t\t// authenticate the user\n\t\t$this->authenticated = $this->authenticateUser($error);\n\t\tif (!$this->authenticated) {\n\t\t\t$this->outputError($error[0], $error[1]);\n\t\t}\n\n\t\t$action = '';\n\t\tif (isset($_GET['action'])) {\n\t\t\t$action = strtolower($_GET['action']);\n\t\t}\n\n\t\tswitch ($action) {\n\t\t\tcase 'getstore':\n\t\t\t\t$this->getStoreDetails();\n\t\t\t\tbreak;\n\t\t\tcase 'getstatuscodes':\n\t\t\t\t$this->getStatusCodes();\n\t\t\t\tbreak;\n\t\t\tcase 'getcount':\n\t\t\t\t$this->getOrderCount();\n\t\t\t\tbreak;\n\t\t\tcase 'getorders':\n\t\t\t\t$this->getOrders();\n\t\t\t\tbreak;\n\t\t\tcase 'updatestatus':\n\t\t\t\t$this->updateOrderStatus();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->writeShipWorksXML(array());\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "7022d09309376592d6f2804207da42af", "score": "0.6603505", "text": "public function dispatch(){\n\n // get class name from controllers\n $controllerClassName = 'MVC\\Controllers\\\\'. ucfirst($this->_controller) . 'Controller';\n $actionName = $this->_action . 'Action';\n //var_dump(new $controllerClassName());\n if(!class_exists($controllerClassName)){\n $controllerClassName = self::NOT_FOUND_CONTROLLER;\n }\n $controller = new $controllerClassName();\n if(!method_exists($controller, $actionName)){\n $this->_action = $actionName = self::NOT_FOUND_ACTION;\n }\n\n $controller->setController($this->_controller);\n $controller->setActionName($this->_action);\n $controller->setParams($this->_params);\n $controller->setTemplate($this->_template);\n $controller->setMessenger($this->_messenger);\n //$controller->setMessenger($this->_messenger);\n\n\n $controller->$actionName();\n\n }", "title": "" }, { "docid": "f28b5fbd05b84f8e59431ed603244e3b", "score": "0.6581818", "text": "public abstract function actions();", "title": "" }, { "docid": "feb660ad1543f8c41160c5ce946323e4", "score": "0.65801454", "text": "public function run()\n {\n $modelsNamespace = config('rest-api-generator.namespaces.models');\n $authActionModel = $modelsNamespace . '\\AclAction';\n $authGroupModel = $modelsNamespace . '\\AclGroup';\n $this->authActionGroupModel = $modelsNamespace . '\\AclActionGroup';\n\n //get all actions\n $allActions = $authActionModel::all();\n\n //get all read actions\n $readActions = $this->onlyReadActions($allActions);\n\n //assign all actions to \"admin\" group\n $adminGroup = $authGroupModel::firstOrCreate(['name' => 'admin']);\n $this->assignActionsToGroup($allActions, $adminGroup);\n\n //assign read actions to \"guest\" and \"registered\" group\n $guestGroup = $authGroupModel::firstOrCreate(['name' => 'guest']);\n $this->assignActionsToGroup($readActions, $guestGroup);\n\n $registeredGroup = $authGroupModel::firstOrCreate(['name' => 'registered']);\n $this->assignActionsToGroup($readActions, $registeredGroup);\n }", "title": "" }, { "docid": "450ec5ba1caf6f8f2e5d47e09a21d371", "score": "0.65757537", "text": "public function dispatch()\n {\n\n $controller = $this->validateTargetController();\n\n if ($controller === false) {\n header(HTTP403);\n } elseif ($controller === null) {\n header(HTTP404);\n } else {\n $this->controller = new $controller();\n\n // If alternativeDelete is TRUE, then invoke the DELETE function of the controller\n if ($this->alternativeDelete) {\n $this->controller->delete($this->requestedId);\n } else {\n $this->controller->{$this->requestMethod}($this->requestedId);\n }\n }\n }", "title": "" }, { "docid": "c998397364a7d1eb20f6596f8d1f6c8b", "score": "0.6531802", "text": "public function run() {\n $accessFilterResult = $this->accessFilter();\n if ($accessFilterResult instanceof Controller) {\n //Use the custom given controller\n $controller = $accessFilterResult;\n } else if ($accessFilterResult === true) {\n $controller = $this->getController();\n } else {\n /* If the access isn't granted and the proccess is still\n * running, then generate a \"403 Forbidden\" HTTP error. */\n HTTPResponse::redirect403($this);\n }\n $controller->exec();\n\n HTTPResponse::setPage($controller->page());\n HTTPResponse::sendRenderedPage();\n }", "title": "" }, { "docid": "a65f517cd0e9464635bafa8c56d5dada", "score": "0.65284556", "text": "function doAction($handler, $vars){\n switch ($handler) {\n case \"welcome\":\n $oauth_index = new OauthController;\n $oauth_index->index();\n break;\n case \"auth\":\n $oauth_index = new OauthController;\n $oauth_index->twiiterOAuth();\n break; \n case \"callback\":\n $oauth_index = new OauthController;\n $oauth_index->twiiterCallback();\n break;\n case \"search_index\":\n $search_index = new SearchController;\n $search_index->returnSearchIndex();\n break;\n case \"search_user\":\n $search_index = new SearchController;\n $search_index->getConnpassUser();\n break;\n case \"search_all_notice\":\n $search_index = new SearchController;\n $search_index->getAllmyNotice();\n break;\n case \"search_del_notice\":\n $search_index = new SearchController;\n $search_index->delMyNotice();\n break;\n case \"detail\":\n $detail_index = new DetailController;\n $detail_index->detailIndex();\n break;\n case \"set_notice\":\n $detail_index = new DetailController;\n $detail_index->setNotice();\n break;\n case \"error\":\n $error_index = new UtilController();\n $error_index->error();\n break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "a754c4b1f04e35ff54de14112008647c", "score": "0.65180904", "text": "public function handle(): void\n {\n $this->action->execute();\n }", "title": "" }, { "docid": "91b774201461cb6de7cb878211e3e87c", "score": "0.6498211", "text": "public function execute() \n { \n $opdracht = $this->action.'Action';\n if(!method_exists($this,$opdracht))\n {\n $opdracht = 'defaultAction';\n $this->action = 'default';\n }\n $this->$opdracht();\n $this->view->setAction($this->action);\n $this->view->setControl($this->control);\n $this->view->toon();\n }", "title": "" }, { "docid": "e2114d4626b55a2fae858a7dc9af7f24", "score": "0.648961", "text": "public function run(): void\n {\n $this->tryAssignController();\n if (!$this->isControllerAssigned()) {\n throw new Exception(\"It's unable to assign controller to this route path.\");\n }\n $this->createCtrl()->{$this->actionName}($this->actionArgs);\n }", "title": "" }, { "docid": "6e5b6efaacb840dc60689eba88f80d0d", "score": "0.64891493", "text": "public function perform()\n {\n $this->action->perform();\n }", "title": "" }, { "docid": "cee29225d3707e77370c4fac246fffbe", "score": "0.6473829", "text": "public function invoke() {\n\n trace(\"Running addon controller\", $this);\n if ($_SERVER[\"REQUEST_METHOD\"] == \"GET\") {\n $this->controller->onGet();\n } elseif ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n $this->controller->onPost();\n }\n }", "title": "" }, { "docid": "992f2402a6575db7152c5676db37db8c", "score": "0.6460567", "text": "public static function execute()\n {\n $args = func_get_args();\n $args_num = func_num_args();\n\n $file = $args[0];\n\n $controller_name = 'Controller_' . $file;\n\n $controller_method = empty($args[1]) ? 'actionMain' : 'action' . ucfirst($args[1]);\n\n $controller = new $controller_name;\n\n if ($args_num > 1) {\n\n // Remove just the first argument (Controller name)\n array_shift($args);\n\n // Remove the second argument (Controller name and Controller method)\n if ($args_num > 2) {\n array_shift($args);\n }\n\n // Call dynamically to the default_method\n return call_user_func_array(array($controller, $controller_method),\n count($args) === 0 ? null : $args);\n } else {\n return $controller->actionMain();\n }\n }", "title": "" }, { "docid": "255cd4e7a978b329994642bf8371b6c9", "score": "0.6457487", "text": "public function index() {\n\t\t$actions = $this->_getActions($this);\n\n\t\t$this->set(compact('actions'));\n\t}", "title": "" }, { "docid": "6d999561735343eb5c8d4cb754f35696", "score": "0.6426283", "text": "public function actions();", "title": "" }, { "docid": "f5b6823b7b17e7a20b35c91f171f66d9", "score": "0.6408701", "text": "public function execute() \n\t{\n\t\t// // Fetch method and URI from somewhere\n\t\t$httpMethod = $_SERVER['REQUEST_METHOD'];\n\t\t$uri = $_SERVER['REQUEST_URI'];\n\n\t\t// Strip query string (?foo=bar) and decode URI\n\t\tif (false !== $pos = strpos($uri, '?')) {\n\t\t $uri = substr($uri, 0, $pos);\n\t\t}\n\t\t$uri = rawurldecode($uri);\n\n\t\t$routeInfo = $this->dispatcher->dispatch($httpMethod, $uri);\n\t\tswitch ($routeInfo[0]) {\n\t\t case \\FastRoute\\Dispatcher::NOT_FOUND:\n\t\t case \\FastRoute\\Dispatcher::METHOD_NOT_ALLOWED:\n\t\t \t// return json value for not found\n\t\t \t\n\t\t \t$response = [\n\t\t \t\t'code' => 400,\n\t\t \t\t'message' => 'Route not found'\n\t\t \t];\n\n\t\t \treturn json_encode($response);\n\t\t break;\n\t\t case \\FastRoute\\Dispatcher::FOUND:\n\t\t $handler = $routeInfo[1];\n\t\t $vars = $routeInfo[2];\n\t\t $split = explode('@', $handler);\n\n\t\t $controller = \"\\\\App\\\\Controllers\\\\\". $split[0];\n\t\t $ctrl = new $controller;\n\n\t\t return array($ctrl, $split[1])($vars, $this->request);\n\t\t break;\n\t\t}\n\t}", "title": "" }, { "docid": "a3c2759775529887e4282a82b271bfd4", "score": "0.639888", "text": "protected function performActionList(){\r\n\t\t// set coupon\r\n\t\t//$this->performActionCoupon();\r\n\t\t// add order\r\n\t\t$this->performActionBuy();\r\n\t\t\r\n\t\t// some other ...\r\n\t}", "title": "" }, { "docid": "b5c6386345fc0669ca304e3b27fe9abb", "score": "0.6393513", "text": "public function actionIndex()\n {\n return $this->runDispatch();\n }", "title": "" }, { "docid": "c4c1440c2df7cd31227eb4d66079341c", "score": "0.63834834", "text": "public static function execute()\n\t{\n\t\t$pathinfo = mfwRequest::getPathInfoArray();\n\t\t$module = (isset($pathinfo[0]) && !empty($pathinfo[0]))? $pathinfo[0] : 'top';\n\t\t$action = (isset($pathinfo[1]) && !empty($pathinfo[1]))? $pathinfo[1] : 'index';\n\t\treturn parent::executeAction($module,$action);\n\t}", "title": "" }, { "docid": "064dcf4a3baf10672f97c44a51d928dd", "score": "0.63495576", "text": "public function start()\n\t{\n\t\t$this->controllerOptions = $this->getNextOptions();\n\t\n\t\t$method = $this->getCurrentAction() . 'Action';\n\t\t\n\t\t$this->actionOptions = $this->getNextOptions();\n\t\t\n\t\tif (method_exists($this, $method)) {\n\t\t\t$this->$method();\n\t\t}\n\t\telseif(method_exists($this, 'indexAction')) {\n\t\t\t$this->indexAction();\n\t\t}\n\t}", "title": "" }, { "docid": "6fe7a074ac3ad30d1429f8870038c65c", "score": "0.63415617", "text": "public function run()\n\t{\n\t\tif(!isset($_GET['action']) or is_null($_GET['action']) or $_GET['action']=='')\n\t\t{\n\t\t\t$_GET['action'] = 'index';\n\t\t}\n\t\t\n\t\t$this->makeFunc($_GET['action']);\n\t\t\n\t\tif(!method_exists($this->getController(),$this->func))\n\t\t{\n\t\t\tthrow new CHttpException(404,'Action not found: '.$this->func);\n\t\t}\n\t\t\n\t\t\n\t\t$this->runFunc();\n\t\t$this->send();\n\t}", "title": "" }, { "docid": "2004359d687fc4b1f5e225d925f88d81", "score": "0.63400316", "text": "abstract public function invoke(Controller $controller);", "title": "" }, { "docid": "a1aa5c27a44d30c3d31bd845918c29c0", "score": "0.6331073", "text": "public function execute() {\n $apiId = $this->context->getActionName();\n $actionParams = $this->context->getActionParams();\n\n $did_render = false;\n\n if (isset($this->apis[$apiId])) {\n $apicontext = new Keystone_Context('/api');\n $this->view = new SnaapiView($apicontext);\n\n $actionName = $apicontext->getActionName();\n if( $apicontext->isCallableAction($actionName) &&\n method_exists($this, $actionName) ) {\n $api = $this->apis[$apiId];\n\n // Add the twitter feed\n if (isset($api['twitterkeywords'])) {\n if (!isset($api['feeds'])) {\n $api['feeds'] = array();\n }\n $api['feeds']['Twitter search for \"'.$api['twitterkeywords'].'\"'] =\n 'http://search.twitter.com/search.atom?q='.$api['twitterkeywords'];\n }\n\n // Add the stack overflow feeds\n if (isset($api['stackoverflowkeywords'])) {\n if (!isset($api['feeds'])) {\n $api['feeds'] = array();\n }\n $api['feeds']['StackOverflow Questions'] =\n 'feed://stackoverflow.com/feeds/tag?sort=newest&tagnames='\n .str_replace(' ', '+', $api['stackoverflowkeywords']);\n }\n\n if (isset($api['maintainers'])) {\n $users = array();\n\n foreach ($api['maintainers'] as $username) {\n if (!isset($twitter_users[$username])) {\n $users[$username] = $users[$username] = Keystone_Api_Twitter::user_info($username);\n }\n }\n\n $this->view->users = $users;\n }\n\n $this->view->api = $api;\n $this->view->apiId = $apiId;\n\n $this->beforeAction();\n call_user_func_array(array(&$this, $actionName), $actionParams);\n $this->afterAction();\n $this->beforeRender();\n $this->view->render();\n $this->afterRender();\n $did_render = true;\n }\n }\n\n if (!$did_render) {\n throw new Keystone_Exception_404();\n }\n }", "title": "" }, { "docid": "207464d5b3fdd0ad151ac419dd3c8bcf", "score": "0.633011", "text": "public function bulkAction() {\n\t\t$request = $this->getRequest ();\n\t\t$items = $request->getParams ();\n\t\tif (! empty ( $items ['params'] )) {\n\t\t\tparse_str ( $items ['params'], $arrparams );\n\t\t\t$action = isset ( $arrparams ['do'] ) ? $arrparams ['do'] : \"\";\n\t\t\tif (method_exists ( __CLASS__, $action )) {\n\t\t\t\t$retval = $this->$action ( $arrparams ['item'] );\n\t\t\t\tif ($retval) {\n\t\t\t\t\tdie ( json_encode ( array ('mex' => $this->translator->translate ( \"The task requested has been executed successfully.\" ) ) ) );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdie ( json_encode ( array ('mex' => $this->translator->translate ( \"This feature has been not released yet\" ) ) ) );\n\t\t\t}\n\t\t}\n\t\tdie ( json_encode ( array ('mex' => $this->translator->translate ( \"An error occurred during the task execution.\" ) ) ) );\n\t}", "title": "" }, { "docid": "03fde6318a65be495d9099bad755ee8d", "score": "0.6321846", "text": "public function indexAction() {\n $this->getAction();\n }", "title": "" }, { "docid": "6f5df162c12c417b4204d8a1e4a708eb", "score": "0.63175875", "text": "public function run() { \r\n $this->setArguments();\r\n \r\n $command_class_name = $this->command_class_name;\r\n \r\n $current_command_class = new $command_class_name($this->module_name);\r\n \r\n $current_command_class->init();\r\n \r\n $current_command_class->action($this->method_name, $this->controller_arguments);\r\n }", "title": "" }, { "docid": "ae3edf9cd2bb73bd82fca06615386350", "score": "0.6295747", "text": "public function invoke() {\r\n \r\n // get the action to be processed\r\n $this->getAction();\r\n \r\n switch ($this->action) {\r\n case 'show_home_page':\r\n $this->view->display('home.tpl');\r\n break;\r\n case 'place_hold':\r\n $this->placeHold();\r\n break;\r\n case 'submit_hold':\r\n $this->processSubmitHold();\r\n break;\r\n case 'show_catalog_page':\r\n $this->showCatalogPage();\r\n break;\r\n case 'show_login_page':\r\n $this->view->display('login.tpl');\r\n break;\r\n case 'show_contact_page':\r\n $this->showContactPage();\r\n break;\r\n case 'process_contact_form':\r\n $this->processContactpage();\r\n break;\r\n default:\r\n $this->view->assign('error_msg', $this->error_msg);\r\n $this->view->display('error.tpl');\r\n break;\r\n }\r\n }", "title": "" }, { "docid": "d3f00b09b523e6aaf178e141c83cb011", "score": "0.6286832", "text": "public function run()\n {\n if (!isset($_SERVER['REQUEST_URI'])) {\n throw new \\Exception('Server Request URI not found');\n }\n // Check for namespace configurations\n if (!isset($this->Di->Config->configurations['namespaces']['controllers'])) {\n throw new \\Exception('Controllers namespaces not defined in configurations');\n }\n // Set some local variables\n $uriParts = parse_url($_SERVER['REQUEST_URI']);\n $uri = $uriParts['path'];\n $route = $this->Di->router->getRoute($uri);\n $libraryNamespace = $this->Di->Config->configurations['namespaces']['library'];\n $controllersNamespace = $this->Di->Config->configurations['namespaces']['controllers'];\n $controllerClassName = ucwords($route['controller']) . 'Controller';\n $controllerClass = $controllersNamespace . '\\\\' . $controllerClassName;\n // Check if controller class exists\n if (!class_exists($controllerClass)) {\n throw new \\Exception('Controller not found: ' . $controllerClassName);\n }\n // Instantiate our target controller class\n /* @var BaseController $Controller */\n $Controller = new $controllerClass();\n // Make sure our controller extends base controller\n if (!is_a($Controller, $libraryNamespace . '\\\\BaseController')) {\n throw new \\Exception('Controller ('.$controllerClassName.') does not extends BaseController.');\n }\n // Inject DI into controller\n $Controller->setDi($this->Di);\n // Finally execute magic method to start controller\n $magicMethodName = 'execute____' . ucwords($route['action']);\n $Controller->$magicMethodName();\n }", "title": "" }, { "docid": "416be3401d9f109bc1af82e1e3893d1c", "score": "0.6282496", "text": "public function dispatch()\n\t{\n\t\t$this->checkRoute();\n\n\t\t//create controller object\n\t\t$controllerClass = $this->controller();\n\t\t$controller = new $controllerClass();\n\n\t\t//get controller method\n\t\t$method = $this->method();\n\t\t$params = $this->id() ? array($this->id()) : array($this->params());\n\n\t\t// call class method with params\n\t\tcall_user_func_array(array($controller, $method), $params);\n\t}", "title": "" }, { "docid": "9b5e41e61fc2747048406229dfdd847e", "score": "0.6278827", "text": "protected function run()\n {\n $this->silentRunActionTrigger(Action::EVENT_START);\n try {\n $event = $this->action->execute($this->control, $this->context) ?: Action::EVENT_SUCCESS;\n $this->context->exitCode = 0;\n } catch (ErrorException $errorException) {\n $event = Action::EVENT_ERROR;\n $this->context->exception = $errorException;\n $this->context->exitCode = 2;\n } catch (Exception $exception) {\n $event = Action::EVENT_FAILURE;\n $this->context->exception = $exception;\n $this->context->exitCode = 1;\n }\n $this->context->finishTime = time();\n $this->silentRunActionTrigger($event);\n $this->silentRunActionTrigger(Action::EVENT_FINISH);\n }", "title": "" }, { "docid": "4c1c201dbd3e49b7dc1aa11687c4dbd0", "score": "0.627347", "text": "public function executeAction(){\n return $this->{$this->action}();\n }", "title": "" }, { "docid": "f4da155e80fb38f321d1f08ab3bf1ec2", "score": "0.6266591", "text": "public function dispatch() {\n\n //find if the url match any specified route\n $args = $this->find_match($this->url, $this->routes);\n\n //set data\n $action = isset($args['action']) ? $args['action'] : '';\n $id = isset($args['id']) ? $args['id'] : '';\n $admin = isset($args['admin']) ? $args['admin'] : '';\n\n if ( !empty($action) ) {\n\n if ( preg_match('/@/', $action) ) {\n\n list($object, $method, $params) = $this->get_call_params($action, $id, $admin);\n call_user_func_array(array($object,$method), $params);\n\n } else {\n echo \"invalid method supplied for the route: \" . $this->url;\n }\n\n } else {\n echo \"invalid route: \" . $this->url;\n }\n\n }", "title": "" }, { "docid": "ca8017cc43ddd3efac71d813544f5554", "score": "0.6257066", "text": "public function load() {\n \n $controller = $this->getController($this->registry->request->getController());\n \n // check if the action is callable\n $action = $this->registry->request->getAction();\n if (is_callable(array($controller, $action)) === false) {\n $action = 'index';\n } else {\n $action = $action;\n }\n \n // Add filters\n $controller = FilterManager::addFilters($controller, $this->registry);\n \n // run the action\n try {\n $controller->$action();\n } catch (NotAuthenticatedException $e) {\n $controller = $this->getController(AppConstants::CONTROLLER_UNAUTHENTICATED);\n $controller->index();\n } catch (NotAuthorizedException $e) {\n $controller = $this->getController(AppConstants::CONTROLLER_UNAUTHORIZED);\n $controller->index();\n } catch (Exception $e) {\n $controller = $this->getController(AppConstants::CONTROLLER_ERROR);\n print \"Exception: \" . $e->getMessage . \"<br/>\";\n $controller->index();\n }\n }", "title": "" }, { "docid": "9149bef70c5ffe629600f207551775bd", "score": "0.62560445", "text": "private function run_actions()\n {\n array_walk(\n $this->actions,\n function ($component, $hook) {\n if (!isset($component['component'])) {\n $component['component'] = null;\n }\n\n $this->loader->add_action(\n $component['hook'],\n $component['component'],\n $component['callback']\n );\n }\n );\n }", "title": "" }, { "docid": "2c278d6905717ac3fdc0e6d058c24ded", "score": "0.62505305", "text": "public function run() {\n $url = '/'.(isset($_GET['url'])?$_GET['url']:'');\n\n\t\t$params = array();\n\t\tif(!empty($url) && $url != '/') {\n\t\t\t$url = explode('/', $url);\n\t\t\tarray_shift($url);\n\n\t\t\t$currentController = $url[0].'Controller';\n\t\t\tarray_shift($url);\n\n\t\t\tif(isset($url[0]) && $url[0] != '/') {\n\t\t\t\t$currentAction = $url[0];\n\t\t\t\tarray_shift($url);\n\t\t\t} else {\n\t\t\t\t$currentAction = 'index';\n\t\t\t}\n\n\t\t\tif(count($url) > 0) {\n\t\t\t\t$params = $url;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$currentController = 'homeController';\n\t\t\t$currentAction = 'index';\n\t\t}\n\n\t\tif(!file_exists('controllers/'.$currentController.'.php')) {\n\t\t\t$currentController = 'notFoundController';\n\t\t\t$currentAction = 'index';\n\t\t}\n\n\t\t$c = new $currentController();\n\n\t\tif(!method_exists($c, $currentAction)) {\n\t\t\t$currentAction = 'index';\n\t\t}\n\n\t\tcall_user_func_array(array($c, $currentAction), $params);\n\n\t}", "title": "" }, { "docid": "5a15af180c0adc436b17e5548dca62d8", "score": "0.6246196", "text": "protected function dispatchAction(): void\n {\n if (\n $this->data->hasAction() &&\n ($this->data->isAllSelected() || $this->data->hasSelectedRows())\n ) {\n // Execute the action\n $this->data->getAction()->execute();\n }\n }", "title": "" }, { "docid": "f36482446917677ab264c83ec30cc2b3", "score": "0.6218737", "text": "protected static function dispatch()\r\n\t{\r\n\t\t$controllerName = Core::getRequest()->getGET(\"controller\", \"index\");\r\n\t\tself::$controllerName = $controllerName;\r\n\t\t$config = array(\"action\" => Core::getRequest()->getGET(\"action\", \"index\"));\r\n\t\tself::$controller = self::factory(\"controller/\".$controllerName, $config);\r\n\t\tif(!self::$controller)\r\n\t\t{\r\n\t\t\tself::$controller = self::factory(\"controller/index\", $config);\r\n\t\t}\r\n\t\treturn self::$controller->run();\r\n\t}", "title": "" }, { "docid": "49e105410c05d26e0e2b07ca579dc75d", "score": "0.6217679", "text": "public function invoke() {\r\n $this->getAction();\r\n \r\n switch ($this->action) {\r\n case 'show_home_page':\r\n include('./view/home.php');\r\n break;\r\n case 'show_catalog_page':\r\n $book_catalog = $this->model->getBookCatalog();\r\n $default_image = \"model/images/book_default.jpg\";\r\n // STEP 8 $this->view->display(‘catalog.tpl')\r\n break;\r\n case 'show_login_page':\r\n include('./view/login.php');\r\n break;\r\n case 'show_contact_page':\r\n $libraries = $this->model->getLibraries();\r\n include('./view/contact.php');\r\n break;\r\n case 'process_contact_form':\r\n $name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);\r\n $email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING);\r\n $phone = filter_input(INPUT_POST, 'phone', FILTER_SANITIZE_STRING);\r\n $date = filter_input(INPUT_POST, 'date', FILTER_SANITIZE_STRING);\r\n $library = filter_input(INPUT_POST, 'library', FILTER_SANITIZE_STRING);\r\n $comments = filter_input(INPUT_POST, 'comments', FILTER_SANITIZE_STRING);\r\n include('./view/confirmcontact.php');\r\n break;\r\n default:\r\n include('./view/error.php');\r\n break;\r\n }\r\n }", "title": "" }, { "docid": "19656ed18f4eecfee9f95157d8a5d678", "score": "0.6214346", "text": "public function index()\n {\n $project = $this->getProject();\n $actions = $this->actionModel->getAllByProject($project['id']);\n\n $this->response->html($this->helper->layout->project('action/index', array(\n 'values' => array('project_id' => $project['id']),\n 'project' => $project,\n 'actions' => $actions,\n 'available_actions' => $this->actionManager->getAvailableActions(),\n 'available_events' => $this->eventManager->getAll(),\n 'available_params' => $this->actionManager->getAvailableParameters($actions),\n 'columns_list' => $this->columnModel->getList($project['id']),\n 'users_list' => $this->projectUserRoleModel->getAssignableUsersList($project['id']),\n 'projects_list' => $this->projectUserRoleModel->getProjectsByUser($this->userSession->getId()),\n 'colors_list' => $this->colorModel->getList(),\n 'categories_list' => $this->categoryModel->getList($project['id']),\n 'links_list' => $this->linkModel->getList(0, false),\n 'swimlane_list' => $this->swimlaneModel->getList($project['id']),\n 'title' => t('Automatic actions')\n )));\n }", "title": "" }, { "docid": "8eee7fccab7793a735100011e3884fe9", "score": "0.6201998", "text": "public function action_index()\n\t{\n\t\trequire_once(SUBSDIR . '/Action.class.php');\n\n\t\t// Where to go\n\t\t$subActions = array(\n\t\t\t'login' => array($this, 'action_extlogin'),\n\t\t\t'auth' => array($this, 'action_auth'),\n\t\t\t'deauth' => array($this, 'action_deauth'),\n\t\t\t'register' => array($this, 'action_register'),\n\t\t\t'register2' => array($this, 'action_register2'),\n\t\t\t'profile' => array($this, 'action_profile'),\n\t\t\t'providers' => array($this, 'action_providers')\n\t\t);\n\n\t\t$action = new Action();\n\n\t\t// Default action is login\n\t\t$subAction = $action->initialize($subActions, 'login');\n\n\t\t// Go!\n\t\t$action->dispatch($subAction);\n\t}", "title": "" }, { "docid": "dde5181d3fcc04d717b9b714a44c644f", "score": "0.6175862", "text": "public function doIt() {\n // Process controller/view/model interaction\n $this->controller->doIt();\n }", "title": "" }, { "docid": "9a408343cbc5d214437b3d37b910726a", "score": "0.61717576", "text": "public function launch()\n {\n\n // Fix Controller name and append the '_Controller'\n $class = $this->controller;\n\n\n //var_dump($class);exit;\n // Check if predefined Controller class exists\n\n\n if (preg_match('/WebInterface/', PANEL) && file_exists(APP_PATH . DS . PANEL . DS . $class . DS . $class . 'Controller.php') && class_exists(str_replace('/', '\\\\', PANEL) . \"\\\\\" . \"$class\\\\\" . $class . 'Controller')) {\n $controller = str_replace('/', '\\\\', PANEL) . \"\\\\\" . \"$class\\\\\" . $class . 'Controller';\n\n $controller = new $controller;\n } else if (preg_match('/Admin/', PANEL) && file_exists(APP_PATH . DS . PANEL . DS . \"Controllers\" . DS . $class . 'Controller.php') && class_exists(PANEL . \"\\\\\" . \"Controllers\\\\\" . $class . 'Controller')) {\n $controller = PANEL . \"\\\\\" . \"Controllers\\\\\" . $class . 'Controller';\n $controller = new $controller;\n }//search shared controllers\n elseif (file_exists(APP_PATH . DS . \"Shared\" . DS . \"Controllers\" . DS . $class . 'Controller.php') && class_exists(\"Shared\" . \"\\\\\" . \"Controllers\\\\\" . $class . 'Controller')) {\n $controller = \"Shared\" . \"\\\\\" . \"Controllers\\\\\" . $class . 'Controller';\n $controller = new $controller;\n } // Check if predefined Model class exists and execute through CrudController\n else {\n // Controller doesn't exist\n // WebInterface error controller is created instead\n /*$controller = new \\Error_Controller;\n\n // Call the index method\n return $controller->index();*/\n\n var_dump(\"$class controller does not exists\");\n }\n\n\n /*if(!$controller->restful)\n // If no restful then the method name is\n // prepended with 'action_' like laravel!*/\n $method = $this->method . \"Action\";\n /*\n else\n {\n // Restful is set to true so preppend the request name\n // ( POST, GET, PUT, DELETE, HEAD ) to the method\n $method = strtolower($_SERVER['REQUEST_METHOD']).\"_\" .$this->method;\n }*/\n // Check if the method exists in the controller\n if (method_exists($controller, $method)) {\n // Call the method giving the args array\n return call_user_func_array(array($controller, $method), $this->args);\n } else {\n // Method doesn't exist\n // WebInterface error controller is created instead\n /*$controller = new \\Error_Controller;\n\n // Call the index method\n return $controller->index();*/\n\n var_dump(\"$method does not exists in controller $class\");\n }\n }", "title": "" }, { "docid": "fa724b2d883f07bae9e1a5386f945acb", "score": "0.61561084", "text": "public function action_index()\n\t{\n\t\trequire_once(SUBSDIR . '/Action.class.php');\n\n\t\t// Where to go\n\t\t$subActions = array(\n\t\t\t'login' => array($this, 'action_extlogin'),\n\t\t\t'deauth' => array($this, 'action_deauth'),\n\t\t\t'register' => array($this, 'action_register'),\n\t\t);\n\n\t\t$action = new Action();\n\n\t\t// Default action is to login\n\t\t$subAction = $action->initialize($subActions, 'login');\n\n\t\t// Do the action\n\t\t$action->dispatch($subAction);\n\t}", "title": "" }, { "docid": "972432b9d9231bde8b26da62498b5a37", "score": "0.61538035", "text": "function execute() {\n \n $ResultObject = null;\n \n $method = $this->_getMethod();\n\n if ($this->_callable($this->action)) {\n if ($this->_authorize()) {\n $ResultObject = $this->_call($method, $this->request);\n }\n else {\n $this->_setMessage(\n 'error', \n __('CONTROLLER.LABEL.PERMISSION_DENIED', '', 1), \n __('CONTROLLER.MSG.NOT_ENOUGH_PRIVILEGES', '', 1)\n );\n if (is_logged_in()) {\n Utils::redirect(get_referrer(\"admin.php?com=login\"));\n }\n else {\n Utils::redirect(\"admin.php?com=login\");\n }\n }\n $this->view->setMessage($this->getMessage());\n }\n else {\n Utils::redirect(BASE_PAGE);\n }\n return $ResultObject;\n }", "title": "" }, { "docid": "5bb447d23f80cdad320ab4f79eaf343d", "score": "0.6148604", "text": "protected function genActions() {\r\n foreach ($this->getController()->getActions() as $action) {\r\n //GENERATE AND ADD Action \r\n $actionGenerator = new \\CdiGenerator\\Generator\\ActionGenerator($action, $this->classGenerator);\r\n $actionGenerator->generate();\r\n }\r\n }", "title": "" }, { "docid": "15add573f7e81d262388388f091c83b5", "score": "0.6143806", "text": "function execute($context)\r\n {\r\n $controller = $context->getController();\r\n $request = $context->getRequest();\r\n $user = $context->getUser();\r\n\r\n $keys = array_keys($this->actions);\r\n $count = sizeof($keys);\r\n\r\n // retrieve current render mode \r\n $renderMode = $controller->getRenderMode();\r\n\r\n // force all actions at this point to render to variable \r\n $controller->setRenderMode(View :: RENDER_VAR);\r\n\r\n for ($i = 0; $i < $count; $i ++)\r\n {\r\n\r\n $action = & $this->actions[$keys[$i]];\r\n\r\n if ($this->preserve && $action['params'] != NULL)\r\n {\r\n\r\n // make a copy of the current variables if they exist \r\n $params = array ();\r\n $subKeys = array_keys($action['params']);\r\n $subCount = sizeof($subKeys);\r\n\r\n for ($x = 0; $x < $subCount; $x ++)\r\n {\r\n\r\n if ($request->hasParameter($subKeys[$x]))\r\n {\r\n\r\n // do not use a reference here \r\n $params[$subKeys[$x]] = $request->getParameter($subKeys[$x]);\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n if ($action['params'] != NULL)\r\n {\r\n\r\n // add replacement parameters to the request \r\n $subKeys = array_keys($action['params']);\r\n $subCount = sizeof($subKeys);\r\n\r\n for ($x = 0; $x < $subCount; $x ++)\r\n {\r\n\r\n $request->setParameterByRef($subKeys[$x], $action['params'][$subKeys[$x]]);\r\n\r\n }\r\n\r\n }\r\n\r\n // execute/forward the action and retrieve rendered result \r\n $controller->forward($action['module'], $action['action']);\r\n\r\n // retrieve rendered result \r\n $actionEntry = & $controller->getActionStack()->getLastEntry();\r\n// $action['result'] = $actionEntry['presentation'];\r\n $action['result'] = $actionEntry->getPresentation();\r\n\r\n // remove last stack entry so when we return \r\n // to the previous ExecFilter it has the proper module/action name \r\n $controller->getActionStack()->removeLastEntry();\r\n\r\n if (isset ($params))\r\n {\r\n\r\n // put copies of parameters back \r\n $subKeys = array_keys($params);\r\n $subCount = sizeof($subKeys);\r\n\r\n for ($x = 0; $x < $subCount; $x ++)\r\n {\r\n\r\n $request->setParameterByRef($subKeys[$x], $params[$subKeys[$x]]);\r\n\r\n }\r\n\r\n unset ($params);\r\n\r\n }\r\n\r\n }\r\n\r\n // put the old rendermode back \r\n $controller->setRenderMode($renderMode);\r\n\r\n }", "title": "" }, { "docid": "ebe2d0c397ff65d92e06eaad23cc7ae2", "score": "0.6140403", "text": "public static function handle()\n {\n $route = isset($_GET['r']) ? $_GET['r'] : null;\n $action = isset($_GET['action']) ? $_GET['action'] : null;\n switch ($route) {\n case 'user':\n self::getUserAction($action);\n break;\n default:\n self::getUserAction();\n break;\n }\n }", "title": "" }, { "docid": "552c14297d2c60e7b133c3392a806337", "score": "0.61306494", "text": "public function execute() {\n\t\t //echo \"<br>------------------------------------------------[\".$this->_controller.\" ]-------> \";\t\t \n\t\t //echo \"<br>------------------------------------------------[\".$this->_task.\" ]-------> \";\t\t\t\t\t\t \n\t\t //echo \"<br>------------------------------------------------[\".$this->_action.\" ]-------> \";\t\t\t\t\t\t \n\t\t \n\t \t $controller_path = \"\";\n\t \t if ( ucfirst($this->_task) == \"Ajax\" ) {\n\t\t\t if ( ucfirst($this->_controller) == \"Ajax\" ) {\n\t\t\t\t$controller_path = CONTROLLERS . $this->_task . \"Controller.php\"; // ajaxController.php\n\t\t\t } else {\n\t \t \t $controller_path = AJAX . $this->_controller.\".php\"; // comboBoxArmazemAJAX.php\n\t\t\t }\n\t \t } else {\n\t\t\t //if ( ucfirst($this->_task) == \"Index_action\" ) {\t\t\t\t \n\t\t\t\t//$this->_task = $this->_controller;\n\t\t\t\t//$this->_controller = \"index\";\n\t\t\t\t//$this->action = \"view\";\n\t\t\t\t$controller_path = CONTROLLERS . $this->_controller . \"Controller.php\";\n\t\t\t //} else {\n\t\t\t$controller_path = CONTROLLERS . $this->_controller . \"Controller.php\"; \n\t \t }\n\t\t \n\t\t //echo \"<br>--DEPOIS--EXECUTE-------------------------------> system->execute onde http://\".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];\t\t\t\t\t\t \n\t\t //echo \"<br>------------------------------------------------[\".$this->_controller.\" ]-------> \";\t\t \n\t\t //echo \"<br>------------------------------------------------[\".$this->_task.\" ]-------> \";\t\t\t\t\t\t \n\t\t //echo \"<br>------------------------------------------------[\".$this->_action.\" ]-------> \";\t\t\t\t\t\t \n\t\t \n\t\t if ( ! file_exists( $controller_path )) \n\t\t\t die (\"<br>Nao existe Controller: $controller_path\");\n\n\t\t //echo \"<br>---------> controller: {$controller_path}\";\n\t\t \n\t\t // cARREGA O ARQUIVO COM O cONSTRUCTOS SOLICITADO\n\t\t require_once( $controller_path );\n\t\t \n\t\t // Cria o OBJETO conforme o contEudo da variael\n\t\t $app = new $this->_controller();\n\t\t \n\t\t // Nesse momento temos que ver como esta a sessao e redirecionar para fazer o LOGIN\n\t \t //-- Verificando se fez Login\n\t \t $logado = \"N\";\t\t\t\t \n\t\t\n\t\t //echo \"<br>---------> Verificando sessao true: \".Logged();\n\t\t\n\t \t if ( $this->_session->checkSession('LOGGED')) {\n\t\t\t\n\t \t\t $logado = $this->_session->selectSession('LOGGED');\n\t\t\t \n\t\t\t //echo \"<br>---------> Verificando sessao true\";\n\t\t\t\n\t \t\t if ($logado == \"S\") {\n\t\t\t\t\n\t \t\t\t//-- Preparando dados para a View\n\t \t\t\t//-- Login\n\t \t\t\t$this->_dados['login_id'] = $this->_auth->userData(\"ent_id\");\n\t \t\t\t$this->_dados['login_nome'] = $this->_auth->userData(\"ent_nome\");\n\t \t\t\t$this->_dados['login_apelido']= $this->_auth->userData(\"ent_apelido\");\n\t \t\t\t$this->_dados['login'] = $this->_auth->userData(\"ent_login\");\n\t \t\t\t$this->_dados['login_passwd'] = $this->_auth->userData(\"ent_passwd\");\n\t \t\t\t$this->_dados['login_webkey'] = $this->_auth->userData(\"ent_webkey\");\n\t\t\t\t\n\t \t\t\t// Dados do login para controle de busca\n\t \t\t\t$this->_dados['login_ent_id'] = $this->_auth->userData(\"ent_id\");\n\t \t\t\t$this->_dados['login_prv_id'] = $this->_auth->userData(\"prv_id\");\n\t \t\t\t$this->_dados['login_org_id'] = $this->_auth->userData(\"org_id\");\n\t \t\t\t$this->_dados['login_ges_id'] = $this->_auth->userData(\"ges_id\");\n\t \t\t\t$this->_dados['login_emp_id'] = $this->_auth->userData(\"emp_id\");\n\t \t\t\t$this->_dados['login_fil_id'] = $this->_auth->userData(\"fil_id\");\n\t \t\t\t$this->_dados['login_dep_id'] = $this->_auth->userData(\"dep_id\");\n\t\t\t\t\n\t\t\t\t// Icone para login\n\t\t\t\t$this->_dados['login_icon'] = $this->_auth->userData(\"ent_csstexto\");\n\t\t\t\tif ( empty($this->_dados['login_icon']) ) {\n\t\t\t\t $this->_dados['login_icon'] = \"fa-user\";\n\t\t\t\t}\t\t\t\t\n\t \t\t }\n\t \t }\n\t\t\n\t\t // Forca o Logout\n\t\t if ( ( ucfirst($this->_controller) == \"Admin\" && ucfirst($this->_task) == \"Login\" ) || \n\t\t ( ucfirst($this->_controller) == \"Admin\" && ucfirst($this->_task) == \"Logout\" ) ) {\n\t\t $logado = \"N\";\n\t\t\t $this->_session->changeSession('LOGGED', $logado);\n\t\t }\t\t\n\t\t\n\t \t // Verifica se precisa Redirecionar pagina ?\n\t\t // Aqui evitamos a chamada infinita do ADMIN paravalidar o LOGIN\t\t \n\t\t //echo \"<br>---------> Logado: \". $logado.\" Qual controller: \".ucfirst($this->_controller);\n\t\t \n\t\t // Entrar se estiver BLOQUEADO ou NAO ESTIVER LOGADO\n\t \t if ( $logado == \"N\" && ucfirst($this->_controller) != \"Admin\" ) {\n\t \t\t // Precisa redirecionar para autenticacao\t\n //echo \"<br>----------> System->redirecionando\";\n\t\t\t \n\t\t\t // Se for Ajax e Tarefa Login, permite a execucao logo abaixo e nao faz esse redirecionamento\n\t\t\t if ( ucfirst($this->_controller) != \"Ajax\" || ucfirst($this->_task) != \"Login\" ) {\n\t\t\t\t//echo \"<br>----------> System->Redirecionar: Controller: \". ucfirst($this->_controller) .\" Task: \". ucfirst($this->_task);\t \t \n\t\t\t // Nao esta logado\n\t\t\t\t$this->_redirector->goToControllerTaskAction(\"admin\", \"login\", \"validar\");\n\t\t\t return $this;\n\t\t\t }\n\t\t\t //echo \"<br>----------> System->Liberado: Controller: \". ucfirst($this->_controller) .\" Task: \". ucfirst($this->_task);\n\t \t } \n\t\t \n\t\t // Verificando se nao esta bloqueado\n\t\t //echo \"<br>---------> Logado esta : \" . Logged();\n\t\t //echo \"<br>---------> Local logado esta: \". $logado;\n\t\t if ( $logado == \"B\" ) {\n\t\t\t // Esta bloqueado\n\t\t\t if ( ucfirst($this->_controller) != \"Index\" || ucfirst($this->_task) != \"Lock\" ) {\t \n if ( ucfirst($this->_controller) != \"Ajax\" || ucfirst($this->_task) != \"Login\" ) {\n\t\t\t\t //echo \"<br>----------> System->Redirecionar: Controller: \". ucfirst($this->_controller) .\" Task: \". ucfirst($this->_task);\t \t \n\t\t\t // Nao esta logado\n\t\t\t\t $this->_redirector->goToControllerTaskAction(\"index\", \"lock\", \"validar\");\n\t\t\t return $this;\n\t\t\t }\t\t\t\t\n\t\t }\n\t\t }\n\t\t \t\t \n\t\t //echo \"<br>----------> System->Controller: \". ucfirst($this->_controller) .\" Task: \". ucfirst($this->_task);\n\t\t //echo \"<br>---------> Url: \".$this->_url;\n\t\t //echo \"<br>---------> Url Completa: \". $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];\t\n\t\t \n\t\t // Ao instanciar um novo controller, precisa pasar as credenciais do antigo para esse\t\t \n\t\t if ( !method_exists($app,$this->_task) )\n\t\t\t die (\"<br>houve um erro URL:[ $this->_url ] e TASK, [ $this->_task ] nao existe\");\n\t\t \n\t\t $task = $this->_task;\n\t\t \n\t\t $app->init($this);\n\t\t \n\t\t $app->$task();\n\t }", "title": "" }, { "docid": "7db2c697ab87942d3b0bea88b0474024", "score": "0.61234665", "text": "protected function performActions(){\r\n\t\tif(class_exists(\"Bitrix\\Sale\\Compatible\\DiscountCompatibility\") &&\r\n\t\t\tmethod_exists(\"Bitrix\\Sale\\Compatible\\DiscountCompatibility\", \"stopUsageCompatible\")){\r\n\t\t\tSale\\Compatible\\DiscountCompatibility::stopUsageCompatible();\r\n\t\t}\r\n\t\ttry{\r\n\t\t\t$this->performActionList();\r\n\t\t}catch(Exception $e){\r\n\t\t\t$this->errorsNonFatal[htmlspecialcharsEx($e->getCode())] = htmlspecialcharsEx($e->getMessage());\r\n\t\t}\r\n\t\tif(class_exists(\"Bitrix\\Sale\\Compatible\\DiscountCompatibility\") &&\r\n\t\t\tmethod_exists(\"Bitrix\\Sale\\Compatible\\DiscountCompatibility\", \"revertUsageCompatible\")){\r\n\t\t\tSale\\Compatible\\DiscountCompatibility::revertUsageCompatible();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a94aa1cb839170fa794912d3c90aa820", "score": "0.6115836", "text": "public function dispatch() {\r\n\t\tlist( $module, $action ) = $this->request->parseDefaultUrl();\r\n\t\t\r\n\t\tif($_GET){\r\n\t\t\tLogger::getInstance()->debug_var( '$_GET', $_GET );\r\n\t\t}\r\n\t\tif($_POST){\r\n\t\t\tLogger::getInstance()->debug_var( '$_POST', $_POST );\r\n\t\t}\r\n\t\tif($_COOKIE){\r\n\t\t\tLogger::getInstance()->debug_var( '$_COOKIE', $_COOKIE );\r\n\t\t}\r\n\t\tif($_SESSION){\r\n\t\t\tLogger::getInstance()->debug_var( '$_SESSION', $_SESSION );\r\n\t\t}\r\n\t\tif($_FILES){\r\n\t\t\tLogger::getInstance()->debug_var( '$_FILES', $_FILES );\r\n\t\t}\r\n\t\t// [Authentification] check who is the current user\r\n\t\t// could lead to exit ? / redirect ? Not for the moment\r\n\t\t$this->user = $this->firewall->getAuthentificatedUser();\r\n\t\t$this->doAction( $module, $action );\r\n\t\texit();\r\n\t}", "title": "" }, { "docid": "a6ea188d7768f2a7f290c99b35262acc", "score": "0.6112189", "text": "public function execute()\n\t{\n\t\t// TODO: Multistatus erzeugen.\n\t\t// Evtl. ist '409 Conflict' besser?\n\t\t$this->httpMethodNotAllowed();\n\t}", "title": "" }, { "docid": "1f40d6a65f18e02d9ca5c34f3a39c338", "score": "0.61088425", "text": "public function actionIndex()\n\t{\n\t\t$reflection = new ReflectionClass('TestController');\n\t\t$methods = $reflection->getMethods();\n\t\t$actions = array();\n\t\tforeach ($methods as $method) {\n\t\t\tif (substr($method->name, 0, 6) == 'action' && $method->name != 'actionIndex' && $method->name != 'actions') {\n\t\t\t\t$methodName4Url = lcfirst(substr($method->name, 6));\n\t\t\t\t$actions[] = $methodName4Url;\n\t\t\t}\n\t\t}\n\n\t\tYii::t('test', 'Test actions');\n\n\t\t$this->render('index', array('actions' => $actions));\n\t}", "title": "" }, { "docid": "fe2c32fc9a847552a4eeea96eaf1c372", "score": "0.6099816", "text": "public function handle()\n {\n $this->action();\n }", "title": "" }, { "docid": "851b78cbb9bf4ac64dd75a70bed6ece7", "score": "0.60903597", "text": "public function execute()\n\t{\n\t\t$task = Request::getCmd('task', '');\n\t\t$plugin = Request::getString('plugin', '');\n\t\tif ($plugin && $task && $task != 'manage') //!isset($this->_taskMap[$task]))\n\t\t{\n\t\t\tRequest::setVar('action', $task);\n\t\t\tRequest::setVar('task', 'manage');\n\t\t}\n\n\t\t$this->registerTask('add', 'edit');\n\t\t$this->registerTask('publish', 'state');\n\t\t$this->registerTask('unpublish', 'state');\n\t\t$this->registerTask('orderup', 'order');\n\t\t$this->registerTask('orderdown', 'order');\n\n\t\tparent::execute();\n\t}", "title": "" }, { "docid": "129889283f411045e396a02f85603685", "score": "0.60900396", "text": "public function routeExec()\n {\n\n // If no controller was found by routeFind()...\n if (!isset($this->controllerPath)) {\n $this->debug('routeExec: No controllerPath set. Routing to 404.');\n $this->error('404');\n exit;\n }\n\n // Grab method arguments from the URL.\n if (isset($this->methodArgs)) {\n $methodArgs = $this->methodArgs;\n }\n else {\n if ($this->collectionIDGiven) {\n $methodArgs = $this->partialPathArray($this->controllerOffset+1, 1);\n }\n else {\n $methodArgs = $this->partialPathArray($this->controllerOffset+2);\n }\n\n // Remove the last item from arguments if empty.\n $lastItem = count($methodArgs)-1;\n if (isset($methodArgs[$lastItem]) && $methodArgs[$lastItem] == '') {\n array_pop($methodArgs);\n }\n\n // If no arguments are set then make empty array.\n if (empty($methodArgs) || $methodArgs[0] == '') {\n $methodArgs = array();\n }\n else {\n // Sanitize arguments.\n $input = new Input($methodArgs);\n $methodArgs = $input->getData();\n }\n }\n\n /** Maps an array of arguments derived from the URL into a method with a comma\n * delimited list of parameters. Calls the method.\n *\n * I.E. If the URL is:\n * 'www.mySite.com/MyController/FooBar/Param1/Param2/Param3'\n *\n * And the FooBar method within MyController is defined as:\n * public function FooBar($a, $b, $c) {}\n *\n * $a will have the value 'Param1'\n * $b will have the value 'Param2' ... and so forth.\n */\n call_user_func_array(array($this->controller, $this->method), $methodArgs);\n\n }", "title": "" }, { "docid": "25f5402b9f28520dc8d52064f34c10d7", "score": "0.60835415", "text": "public function actions()\n {\n }", "title": "" }, { "docid": "2025cfda6b8ef36a86b8c3ec28eac26f", "score": "0.60834575", "text": "function run() {\n dispatching\\run_default(actions_namespace, error_handler);\n}", "title": "" }, { "docid": "399e4170abf7e8db3825e7aa2ce15543", "score": "0.6079084", "text": "public function indexAction() {\n\t\t\n\t\t// also access via $this->getRequest();\n\t\t$action = $_GET['action'];\n\t\n\t\tif (!empty($action)) {\n\t\t\tif ($action != 'indexAction')\t {\n\t\t\t\tif (method_exists($this, $action)) {\t\t\t\n\t\t\t\t\t$reflection = new ReflectionMethod($this, $action);\t\t\t\t\n\t\t\t\t\tif ($reflection->isPublic()) {\n\t\t\t\t\t\t$this->{$action}();\n\t\t\t\t\t} else {\n\t \t\t\tthrow new RuntimeException($this->__('The called method is not public.'));\n\t \t\t}\n\t \t\t} else {\n\t \t\t\tthrow new RuntimeException($this->__('The called method not exist.'));\n\t \t\t}\n\t \t} else {\n\t \t\tthrow new RuntimeException($this->__('indexAction method call not allowed.'));\n\t \t}\n\t } else {\n\t \t$this->_redirectUrl(Mage::helper('core/url')->getHomeUrl());\t\n\t }\n\t}", "title": "" }, { "docid": "74683ab36e7f3e4716722534ad6ecaa3", "score": "0.6075585", "text": "public function handle_request() {\n $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'index';\n\n if (method_exists($this, $action)) {\n $meth = new ReflectionMethod(get_class($this), $action);\n if ($meth->isPublic() && ($meth->getNumberOfRequiredParameters() == 0) &&\n $this->allowed_action($action)) {\n \n $start = microtime(true);\n $this->logger()->info(\"Processing \".get_class($this).\"#$action (for $_SERVER[REMOTE_ADDR])\");\n\n $this->set_action($action);\n $this->set_rendered(false);\n $this->_action_method = $meth;\n\n try {\n if (!$this->fire_event('before_filter', true))\n return;\n\n // use the cache, if requested\n if ($this->_will_cache_action = $this->will_cache($action)) {\n $cache = Support_Resources::cache();\n $data = $cache->get(array('controller'=>$this->controller_name(), 'action'=>$action),\n $this->cache_options(), array($this, 'perform_action'));\n \n foreach ($data['headers'] as $header) { header($header); }\n print $data['content'];\n\n } else {\n $this->perform_action();\n }\n \n } catch ( Exception $e ) {\n $this->on_exception($e);\n }\n\n $this->fire_event('after_filter');\n \n $end = microtime(true);\n $elapsed = $end - $start;\n $this->logger()->info(\"Completed in $elapsed sec [$_SERVER[REQUEST_URI] for $_SERVER[REMOTE_ADDR]]\\n\");\n \n return;\n }\n }\n \n $this->logger()->error(\"Unknown action \\\"$action\\\" in controller \".get_class($this));\n\n $this->not_found();\n }", "title": "" }, { "docid": "8c9e97e970950dcc91ebcd08df840927", "score": "0.606953", "text": "public function run()\t\t\n {\n $integrationActions = $this->getIntegrationActions();\n \n foreach ($integrationActions as $action) {\n IntegrationAction::create([\n 'name' => $action['name'],\n ]);\n }\n }", "title": "" }, { "docid": "d4078862b4a049155e762c40cd51f755", "score": "0.60688543", "text": "private function executeUrl()\n\t\t{\n\t\t\t/* Authorize */\n\t\t\tif(!$this->isAuthorized())\n\t\t\t{\n\t\t\t\tout::showError(\"404\");\n\t\t\t\treturn; \n\t\t\t}\n\t\t\t\n\t\t\tif(is_null($this->_objectName))\n\t\t\t{\n\t\t\t\tif(!is_null($this->_defaultObjectName))\n\t\t\t\t\t$this->_objectName = $this->_defaultObjectName;\n\t\t\t\telse \n\t\t\t\t\t#return in order to display the default view\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif(is_null($this->_actionName))\n\t\t\t{\n\t\t\t\t$this->_actionName = $this->_defaultActionName;\n\t\t\t}\n\t\t\t\n\t\t\t$this->execAction();\n\t\t}", "title": "" }, { "docid": "07c2216ca4bfed724e531494ac0d81dc", "score": "0.6068573", "text": "public function executeIndex()\r\n { \r\n //$this->items = svAdminBoard::getItems();\r\n\r\n //$this->categories = svAdminBoard::getCategories(); \r\n }", "title": "" }, { "docid": "e51f285a86ddbda521abf8565cb9dfce", "score": "0.6067501", "text": "protected function run(){\n $programRoute = $this->findProgramRoute();\n $parts = explode('/', $programRoute);\n $controller = \"controllers\\\\\" . ucfirst(array_shift($parts) . \"Controller\");\n $action = lcfirst(array_shift($parts));\n $params = $parts;\n $this->createController($controller,$action,$params);\n }", "title": "" }, { "docid": "487ba6c5c36a1e5568d6e8c75e84cc3f", "score": "0.6065232", "text": "function execute()\n {\n global $sugar_config;\n if (!empty($sugar_config['default_module'])) {\n $this->default_module = $sugar_config['default_module'];\n }\n\n // Safe $_REQUEST['module']\n $module = $this->request->getValidInputRequest('module', 'Assert\\Mvc\\ModuleName', $this->default_module);\n\n insert_charset_header();\n $this->setupPrint();\n\n $this->controller = ControllerFactory::getController($module);\n\n // make sidecar view load faster\n // TODO the rest of the code will be removed as soon as we migrate all modules to sidecar\n\n // Safe $_REQUEST['MSID']\n $msid = $this->request->getValidInputRequest('MSID', array('Assert\\Type' => array('type' => 'string')));\n\n // Safe $_REQUEST['entryPoint']\n // add entry point validator\n\n if (!empty($msid)\n && ($this->controller->action !== 'Authenticate' || $this->controller->module !== 'Users')\n ) {\n //This is not longer a valid path for MSID. We can only accept it through view.authenticate.php\n $url = 'index.php?module=Users&action=Authenticate&MSID=' . urlencode($msid);\n\n // TODO: add example with safe redirect builder/validator\n $req = array_diff_key($this->getRequestVars(), array(\"MSID\" => 1));\n if (!empty($req['module'])) {\n if (isModuleBWC($req['module'])) {\n $url .= '#bwc/index.php?' . http_build_query($req);\n } else {\n // otherwise compose basic Sidecar route\n $url .= '#' . rawurlencode($req['module']);\n if (isset($req['record'])) {\n $url .= '/' . rawurlencode($req['record']);\n }\n }\n }\n SessionStorage::getInstance()->unlock();\n header('HTTP/1.1 301 Moved Permanently');\n header(\"Location: $url\");\n\n exit();\n } elseif ($this->controller->action === 'sidecar' ||\n (\n $this->controller->action === 'index' && $this->controller->module === 'Home' &&\n (empty($_REQUEST['entryPoint']) || (isset($_REQUEST['action']) && $_REQUEST['action'] === 'DynamicAction'))\n ) ||\n empty($_REQUEST) || \n (!empty($_REQUEST['entryPoint']) && !$this->controller->entryPointExists($_REQUEST['entryPoint']))\n ) {\n // check for not authorised users\n $this->checkMobileRedirect();\n $this->controller->action = 'sidecar';\n $this->controller->execute();\n return;\n } elseif ($this->controller->action === 'Login' && $this->controller->module === 'Users') {\n // TODO remove this when we are \"iFrame free\"\n\n // by default login location is base site URL\n $location = rtrim($sugar_config['site_url'], '/') . '/';\n $loginRedirect = $this->getLoginRedirect();\n\n $loginVars = $this->getLoginVars();\n\n if (isset($loginVars['module'])) {\n if (isModuleBWC($loginVars['module'])) {\n // in case if login module is BWC, location is the BWC URL (as if the user was already\n // logged in), since authentication is managed by Sidecar, not the module itself\n $location .= '#bwc/' . $loginRedirect;\n } else {\n // otherwise compose basic Sidecar route\n $location .= '#' . rawurlencode($loginVars['module']);\n if (isset($loginVars['record'])) {\n $location .= '/' . rawurlencode($loginVars['record']);\n }\n }\n }\n\n echo '<script>\n if (parent.location == window.location) {\n window.location = ' . json_encode($location) . ';\n } else {\n try {\n window.top.SUGAR.App.bwc.login(' . json_encode($loginRedirect) . ');\n } catch (e) {\n try {\n parent.SUGAR.App.bwc.login(' . json_encode($loginRedirect) . ');\n } catch (e) {\n window.location = ' . json_encode($location) . ';\n }\n }\n }\n </script>';\n return;\n }\n // If the entry point is defined to not need auth, then don't authenticate.\n if (empty($_REQUEST['entryPoint'])\n || $this->controller->checkEntryPointRequiresAuth($_REQUEST['entryPoint'])\n ) {\n $this->startSession();\n // check for authorised users\n $this->checkMobileRedirect();\n $this->loadUser();\n // Do not filter for saml login\n // since current user id is not yet available.\n // This will be done after controller->execute below\n // when current user id is populated.\n if (empty($_REQUEST['SAMLResponse'])) {\n $this->ACLFilter();\n }\n\n $context = Container::getInstance()->get(Context::class);\n $subject = new User($GLOBALS['current_user'], new Bwc());\n $context->activateSubject($subject);\n\n $this->preProcess();\n $this->controller->preProcess();\n $this->checkHTTPReferer();\n $this->csrfAuthenticate();\n }\n\n SugarThemeRegistry::buildRegistry();\n $this->loadLanguages();\n $this->checkDatabaseVersion();\n $this->loadDisplaySettings();\n $this->loadLicense();\n $this->loadGlobals();\n $this->setupResourceManagement($module);\n $this->controller->execute();\n if (empty($_REQUEST['entryPoint'])\n || $this->controller->checkEntryPointRequiresAuth($_REQUEST['entryPoint'])\n ) {\n if (!empty($_REQUEST['SAMLResponse'])) {\n $this->ACLFilter();\n }\n }\n\n if (isset($context, $subject)) {\n $context->deactivateSubject($subject);\n }\n\n sugar_cleanup();\n }", "title": "" }, { "docid": "07744d9eedf68d64e0ea019e13b1b94a", "score": "0.6063454", "text": "public function run()\r\n {\r\n try\r\n {\r\n $middleware = \"middlewares\\\\\".$this->route->middleware;\r\n $middleware = new $middleware();\r\n $middleware->handle();\r\n\r\n $file = \"controllers\\\\\".$this->route->controller.\".php\";\r\n $controller = \"controllers\\\\\".$this->route->controller;\r\n\r\n if(!file_exists($file)) $this->loadError(404);\r\n\r\n $controller = new $controller();\r\n $controller->{$this->route->function}();\r\n\r\n } catch (\\Exception $e) {\r\n die($e);\r\n }\r\n }", "title": "" }, { "docid": "93c425d5e06cde85530bcaba71e12692", "score": "0.60477245", "text": "public function run() \n {\n $this->session->start();\n ini_set('date.timezone', 'europe/Berlin');\n \n $this->request->prepareUrl();\n \n $this->file->call('App/index.php');\n \n list($controller, $method, $arguments) = $this->route->getProperRoute();\n \n $output =(string) $this->load->action($controller, $method, $arguments);\n \n $this->response->setOutput($output);\n \n $this->response->send(); \n }", "title": "" }, { "docid": "6ece495e1212721638b346f6a0676664", "score": "0.60446864", "text": "function _invoke(&$controller, $params) {\n $controller->__mergeVars();\n $controller->initClasses();\n if ($controller->beforeFiltered == true) {\n $controller->beforeFilter();\n }\n\n $methods = array_flip($controller->methods);\n\n if (!isset($methods[strtolower($params['action'])]) && !in_array($params['action'],array('index','trash','edit'))) {\n die ('Chybi action '. @Inflector::camelize($params['controller'].\"Controller\").' '.$params['action']);\n }\n\n $output = $controller->dispatchMethod($params['action'], isset($params['pass'])?$params['pass']:array());\n\n if ($controller->autoRender) {\n if ($controller->rendered == false)\n \n $controller->output = $controller->render();\n } elseif (empty($controller->output)) {\n $controller->output = $output;\n }\n\n $controller->afterFilter();\n\n if (isset($params['return'])) {\n return $controller->output;\n }\n\n if (isset($controller->output))\n echo($controller->output);\n\n }", "title": "" }, { "docid": "4524ac38eae0cd2c31b9cbb0875cf37d", "score": "0.6040502", "text": "protected function doExecute()\n\t{\n\t\t// Initialise the application\n\t\t$this->initialiseApp();\n\n\t\t// Mark afterInitialise in the profiler.\n\t\tJDEBUG ? $this->profiler->mark('afterInitialise') : null;\n\n\t\t// Route the application\n\t\t$this->route();\n\n\t\t// Mark afterRoute in the profiler.\n\t\tJDEBUG ? $this->profiler->mark('afterRoute') : null;\n\n\t\t// Dispatch the application\n\t\t$this->dispatch();\n\n\t\t// Mark afterDispatch in the profiler.\n\t\tJDEBUG ? $this->profiler->mark('afterDispatch') : null;\n\t}", "title": "" }, { "docid": "508e336bffbbc9a3cbf7cf56b292ed9e", "score": "0.6033432", "text": "public function run()\n {\n ob_start();\n\n try {\n\n list ($controller_ns, $action) = $this->route($_SERVER['REQUEST_URI']);\n echo (new $controller_ns)->{$action}();\n\n } catch (HttpException $e) {\n http_response_code($e->getCode());\n echo $e->getMessage();\n }\n\n $out = ob_get_contents();\n ob_end_clean();\n\n file_put_contents('php://output', $out);\n }", "title": "" }, { "docid": "3a8e5cbd3cfdf04643a44cd531b8d542", "score": "0.6007993", "text": "public function execute() {\n\n\t\t$possibleOptions = array(\n\t\t\t'type' => false,\n\t\t\t'export-path' => true\n\t\t);\n\n\t\tif (($options = $this->_controller->getInstanceOptions($possibleOptions)) === FALSE) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->_controller->addOutput(\"Loading Responder\");\n\t\t$responder = Billrun_Responder::getInstance($options);\n\t\t$this->_controller->addOutput(\"Responder loaded\");\n\n\t\tif ($responder) {\n\t\t\t$paths = $responder->respond($options);\n\t\t\t$this->_controller->addOutput(\"Responder responded on \" . count($paths) . \" files.\");\n\t\t} else {\n\t\t\t$this->_controller->addOutput(\"Responder cannot be loaded\");\n\t\t}\n\t}", "title": "" }, { "docid": "16b496fbe52da3f67dc3158a974de325", "score": "0.5990616", "text": "public function runController()\n {\n return $this->controllerDispatcher()->dispatch(\n $this, $this->getController(), $this->getControllerMethod()\n );\n }", "title": "" }, { "docid": "b6675e302bfad6816f12e3c10f9af7d1", "score": "0.5988298", "text": "public function bulk_actions(){\n\t\t$this->autoRender = false;\n\t\t$this->layout = false;\n\t\t\n\t\t//if(!$this->_checkSession()){\n\t\tif(!$this->Auth->loggedIn()){\n\t\t\t$this->Session->setFlash(__('<div class=\"alert alert-danger\" role=\"alert\">Acess Denied!</div>'), 'flash_custom');\n\t\t\t$this->redirect(array('action'=>'login'));\n\t\t}\n\t\t\n\t\tif(!$this->request->is('post')){\n\t\t\tdie('Access denied!');\n\t\t}\n\t\t$process_action = $this->request->data['process_action'];\n\t\t$process_model = $this->request->data['process_model'];\n\t\t\n\t\tswitch($process_action){\n\t\t\tcase 'delete':\n\t\t\t\t\t\tif(isset($this->request->data['item_id']) && !empty($this->request->data['item_id'])){\n\t\t\t\t\t\t\tforeach($this->request->data['item_id'] as $item_id){\n\t\t\t\t\t\t\t\t$this->$process_model->id = $item_id;\n\t\t\t\t\t\t\t\t$this->$process_model->delete();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$this->Session->setFlash(__('<div class=\"alert alert-success\" role=\"alert\">Records deleted successfully!</div>'), 'flash_custom');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t\t\n\t\t}\n\t\t\t\n\t\t$this->redirect($this->referer());\n\t}", "title": "" }, { "docid": "d6883ad18a94f63b713b829a7deff571", "score": "0.5983647", "text": "public static function dispatch()\n\t{\n\t\t// Get the route in correct format\n\t\t$path = self::parseRoute();\n\n\t\t// If the route exists\n\t\tif (isset(self::$_routes[$path]))\n\t\t{\n\t\t\t$route = self::$_routes[$path];\n\n\t\t\t// Determine the correct controller and method to be called\n\t\t\tif (isset($route['action']))\n\t\t\t{\n\t\t\t\t// Split the action by the @-sign\n\t\t\t\t$action = explode('@', $route['action']);\n\n\t\t\t\t$method = $action[0];\n\t\t\t\t$controller = $action[1];\n\t\t\t}\n\n\t\t\tif (isset($route['module']))\n\t\t\t{\n\t\t\t\tinclude_once (EEZ_MODULE_DIR . DS . $route['module'] . DS . \"/controller/\" . DS . $controller . \".php\");\n\t\t\t}\n\n\t\t\t// If the route has any specified filters\n\t\t\tif (isset($route['filter']))\n\t\t\t{\n\t\t\t\t// If the filter return false we redirect the user to the homepage\n\t\t\t\tif (Filter::run($route['filter']) == false)\n\t\t\t\t{\n\t\t\t\t\theader(\"location: index\");\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Create an object of the controller and call the method\n\t\t\t$controller = new $controller();\n\t\t\t$controller->$method();\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttrigger_error(\"This page does not exist\");\n\t\t}\n\n\t}", "title": "" }, { "docid": "972d7fb5acc97900f2664ed1ca423e7f", "score": "0.5980426", "text": "abstract function runController($controller);", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "11a484a5dde56588a3ae54c18acb5ab9", "score": "0.0", "text": "public function create()\n {\n $lsCate = Category::orderBy('name','asc')->get();\n $lsTag = Tag::orderBy('name','asc')->get();\n return view(\"post.create\")->with(['lsCate' => $lsCate, 'lsTag' => $lsTag]);\n }", "title": "" } ]
[ { "docid": "f8bba5517a2cb6f46311a24713a6bef2", "score": "0.8125342", "text": "public function create()\n {\n return view('admin.resource.new');\n }", "title": "" }, { "docid": "20ef26ca996d9360798f2ecc07198092", "score": "0.7804094", "text": "public function create()\n\t{\n\t\treturn View::make('backoffice.resource.create');\n\t}", "title": "" }, { "docid": "681d20882e97df51906ce75b97ef1784", "score": "0.7775189", "text": "public function create()\n {\n return view('actions.resource.create');\n }", "title": "" }, { "docid": "0efde82a25b6100f0c21eb97e2121fd0", "score": "0.77337104", "text": "public function create()\n {\n $this->page_title = trans('resource_type.new');\n\n return view('resource_type.new', $this->vdata);\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77260846", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "260e3a6550329e832d8155a1a557745f", "score": "0.771192", "text": "public function create()\n {\n /*show create form maybe not nessesary*/\n }", "title": "" }, { "docid": "0a28fa28b4fcdf44c0bd490fe751d763", "score": "0.7673694", "text": "public function create()\n\t{\n\t\t$this->layout->subtitle = _('Add');\n\n\t\treturn $this->loadView(__FUNCTION__, $this->resource->getFillableLabels());\n\t}", "title": "" }, { "docid": "4410c37acc7f709e86ccc730cb542643", "score": "0.75863165", "text": "public function create()\n {\n return view('admin.resources.create');\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "60b8c2dc2f8ff4dabd04bc7f6dca0779", "score": "0.75383", "text": "public function newAction()\n {\n $entity = new Resource();\n $form = $this->createCreateForm($entity);\n\n return $this->render('BWBlogBundle:Resource:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "5d140c321df7acb8c739eadcc5bc3d54", "score": "0.746548", "text": "public function create()\n {\n return view('laramanager::resources.create');\n }", "title": "" }, { "docid": "ad59d20f2872a6e73a13ec203ef2f8bc", "score": "0.72848165", "text": "public function create()\n {\n //display form\n return view(\n 'ps.create');\n }", "title": "" }, { "docid": "b232948171ce8236d12a5ecd5627119c", "score": "0.7282519", "text": "public function create()\n {\n return view(\"pages.req.form\");\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "3347c41a19ab6c1a35b881f99ddefe9e", "score": "0.72624177", "text": "public function createAction()\n {\n $this->view->flds = '[{\"cssClass\":\"input_text\",\"required\":\"undefined\",\"values\":\"First Name\"},{\"cssClass\":\"textarea\",\"required\":\"undefined\",\"values\":\"Bio\"},{\"cssClass\":\"checkbox\",\"required\":\"undefined\",\"title\":\"Whats on your pizza?\",\"values\":{\"2\":{\"value\":\"Extra Cheese\",\"baseline\":\"undefined\"},\"3\":{\"value\":\"Beef\",\"baseline\":\"undefined\"}}}]';\n $this->view->form = new NpfWebformsForm(null);\n }", "title": "" }, { "docid": "a5d2c0c3777cd260cd88c88f37ec70a6", "score": "0.72577995", "text": "public function create_form()\n {\n return View::make(\"app.create\");\n }", "title": "" }, { "docid": "6a94e5e8f7512f93eda3c0b1ea5d5607", "score": "0.7257189", "text": "function showCreateForm(){\n return view('admin.Ebuletin.create');\n }", "title": "" }, { "docid": "64b0e85604fc330e4cbfc6f09f397b27", "score": "0.72493047", "text": "public function showCreateForm ()\n {\n $myNewspaper = App::user()->getNewspaper();\n\n if (!empty($myNewspaper)) {\n App::redirect(\"/newspaper/\" . $myNewspaper->id);\n }\n\n return $this->render('news/createNewspaper.html.twig', [\n \"creationCost\" => NewspaperModel::CREATION_COST\n ]);\n }", "title": "" }, { "docid": "d3ebdfcf36f62f0f42113a8b11f4895a", "score": "0.7240409", "text": "public function create()\n {\n return view('resources.create_resources');\n }", "title": "" }, { "docid": "b1c3c9219f8100b85c24750c6f92cd4a", "score": "0.72274303", "text": "public function create()\n {\n return view('crud.form');\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "5c37508d09b68f9ab4123a0772960c76", "score": "0.7212462", "text": "public function create()\n {\n return view('admin.catalog.form');\n }", "title": "" }, { "docid": "3fb888dea195139fc63f84a6e5b7db63", "score": "0.7199865", "text": "public function create()\n {\n return View::make($this->resourceView.'.create');\n }", "title": "" }, { "docid": "65a80f896bface8ccfc0be19571775ba", "score": "0.71928936", "text": "public function create()\n {\n //\n return \"Provide a form to add a car\";\n }", "title": "" }, { "docid": "1d0710555ccb7cd822584d16dcfe0336", "score": "0.7182808", "text": "public function showCreateForm()\n\t{\n\t\treturn view('admin.post.add');\n\t}", "title": "" }, { "docid": "c24e65c8a92dd430f73967cd2fb00ec9", "score": "0.7179227", "text": "public function create()\n {\n $this->resetValidation();\n $this->reset(['fields', 'is_editing']);\n\n $this->showForm();\n }", "title": "" }, { "docid": "9afc6acf07243beac05422dfa57f968f", "score": "0.7173864", "text": "public function showCreateForm()\n {\n return view(\"admin.user.create\");\n }", "title": "" }, { "docid": "3bafea32fa451a3439e6d308764b7e96", "score": "0.71605355", "text": "public function create()\n\t{\n\t\treturn view(\"barang.form\");\n\n\t}", "title": "" }, { "docid": "cfe9ceeda6c7d1649d3f15d33b16a627", "score": "0.7154192", "text": "public function newAction()\n\t{\n\t\techo $this->getForm();\n\t}", "title": "" }, { "docid": "540a53a248ba67bdca77e9032bbb635f", "score": "0.7150356", "text": "public function create()\n {\n return view('client.form');\n }", "title": "" }, { "docid": "8d4cc40a42b81724eb4460472353bc0a", "score": "0.714293", "text": "public function create()\n\t{\n // load the create form\n return View::make('residents.create');\n\t}", "title": "" }, { "docid": "a8d9b3e6c0f69a9c90642861d5e343c1", "score": "0.7141869", "text": "public function create()\n {\n return view('submit.create');\n }", "title": "" }, { "docid": "3b15559bc4c862a29339bfd433c32526", "score": "0.71411765", "text": "public function create()\n {\n return view('students.addStudentForm');\n }", "title": "" }, { "docid": "3f6a1acba05e915724250680142e88c7", "score": "0.71384877", "text": "public function create()\n {\n return view('formcreate');\n }", "title": "" }, { "docid": "8c1752e2ab024985c584b2f42d891525", "score": "0.7138087", "text": "public function create()\n {\n return view(\"piutang.form\");\n }", "title": "" }, { "docid": "d77bcfd7ac022954dfbdbaec633e0b32", "score": "0.7131701", "text": "public function create()\n {\n $resources = Resource::all();\n $categories = ResourceCategory::all();\n\n $data = [\n 'resources' => $resources,\n 'categories' => $categories,\n ];\n\n return view('resources.create-resource')->with($data);\n }", "title": "" }, { "docid": "aa71810ebd2853f92e8db655776237e2", "score": "0.712946", "text": "public function create()\n {\n return view ('siswa.form');\n }", "title": "" }, { "docid": "311b4437f4b6d54e594b3899d29f4f11", "score": "0.7121037", "text": "public function create()\n {\n return view('admin.student.addnew');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "751653051dae87138c242368dc3786de", "score": "0.71069485", "text": "public function create()\n {\n $title = \"Registrar negocio\";\n $model = new Business();\n\n return view($this-> prefixView.'form',compact('title','model'));\n }", "title": "" }, { "docid": "21b741286121defb618cafb010ad9311", "score": "0.7101174", "text": "public function create()\n {\n return view('admin.crud.edit-new');\n }", "title": "" }, { "docid": "8b6604f525238bef52951de0b16d7f1f", "score": "0.7096012", "text": "public function create()\n {\n return view('formbuilder::form.create');\n }", "title": "" }, { "docid": "990414ce4876a4b2a4f29dd9d7d3abf5", "score": "0.709237", "text": "public function create()\n\t{\n\t\treturn view('admin.question.form');\n\t}", "title": "" }, { "docid": "16732db43c5e7a7dd04a193ce5b2ae23", "score": "0.70919156", "text": "public function create()\n {\n return view('resep.form');\n }", "title": "" }, { "docid": "33b0a71ac72fac345ac76b2a9dbd3cb8", "score": "0.70887756", "text": "public function newAction()\n {\n $entity = $this->get('fibe_security.acl_entity_helper')->getEntityACL('CREATE', 'Person');\n $form = $this->createForm(new PersonType($this->getUser()), $entity);\n\n return $this->render(\n 'fibeCommunityBundle:Person:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }", "title": "" }, { "docid": "67cdf2645142d9b0d8b752e0719f92db", "score": "0.70883906", "text": "public function create()\n\t{\n\t\t//\n return view('ThemeNight.Admin.form');\n\t}", "title": "" }, { "docid": "c080ca2e31508a9332469f2e1bfc7d19", "score": "0.7087787", "text": "public function create()\n\t{\n\t\treturn view('atributos.create');\n\t}", "title": "" }, { "docid": "76bfcc35dc8ea95b43ab193fce26154f", "score": "0.7084712", "text": "public function create()\n {\n return view('supplier.form', [\n 'edit' => false\n ]);\n }", "title": "" }, { "docid": "bf72fb3fe8d0bc917f56d924e8ccf3ba", "score": "0.70816255", "text": "public function create()\n {\n //\n return view('create_form');\n }", "title": "" }, { "docid": "367e31aa42d6f06e1f2fb2e09709f1e0", "score": "0.7070958", "text": "public function create()\n {\n return view('admin.project.create_form');\n }", "title": "" }, { "docid": "43e34c710975c60c5305ac25fb3d7504", "score": "0.7067303", "text": "public function newAction()\r\n {\r\n $entity = new $this->model();\r\n $form = $this->createCreateForm($entity)->createView();\r\n\r\n $result = array(\r\n 'action' => $this->generateUrl($this->route['create']),\r\n 'fields' => $this->get('pizone_form')->formDataToArray($form)\r\n );\r\n\r\n $view = new View($result);\r\n return $this->handleView($view);\r\n }", "title": "" }, { "docid": "6145954c4b35a97e4abac9949da2a7dc", "score": "0.70663726", "text": "public function create()\n {\n $data = [];\n return view('resources.create', $data);\n }", "title": "" }, { "docid": "3b0f73abe7973dfd183dc9c20405c6b4", "score": "0.7066244", "text": "public function create()\n {\n return view('tool::create.create');\n }", "title": "" }, { "docid": "557c84d597fc8e00e9314d677e08dfe5", "score": "0.7061945", "text": "public function newAction()\n {\n $entity = new Receta();\n $form = $this->createForm(new RecetaType(), $entity);\n\n return $this->render('TodoCerdoTodoCerdoBundle:Receta:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "8c4b58d9c7ebe29aed261de1fc923c07", "score": "0.7061731", "text": "public function create()\n {\n return view('controllers.resource-controllers.create');\n }", "title": "" }, { "docid": "4b128041dfdda282b6af96d3ef403c25", "score": "0.70599586", "text": "public function create()\n {\n return view('harvests.form');\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571953", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "08e0ba475352b37fabdca852bcbdb90e", "score": "0.7054689", "text": "public function create()\n {\n return view('mesas.forms.create');\n }", "title": "" }, { "docid": "2623500cf3f41f19394467ad3cc9656b", "score": "0.7049269", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/Regions/create');\n\n\t}", "title": "" }, { "docid": "d348d95689ce20ca0e7da9c16fd55e2d", "score": "0.70483965", "text": "public function create()\n {\n return view('pengeluaran.form');\n }", "title": "" }, { "docid": "d8233d687b36de8ea5e1f179a497dba1", "score": "0.7037681", "text": "public function newAction()\n {\n $entity = new Persona();\n $form = $this->createForm(new PersonaType(), $entity);\n\n return $this->render('LyricaEirinBundle:Persona:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "cfc08ab3b0be81fb6acf7f6316f4b875", "score": "0.7036466", "text": "public function create()\n {\n return view('backend.thadin.create');\n }", "title": "" }, { "docid": "5aa70413db221403054caef7bedac770", "score": "0.7030609", "text": "public function newAction()\n\t{\n\t\t$this->page\n\t\t\t->set('section_title','New '.$this->page_title)\n\t\t\t->set('action',$this->controller_path.'new')\n\t\t\t->set('record',(object) array('activated'=>1,'id'=>-1))\n\t\t\t->set('group_options',$this->_get_groups())\n\t\t\t->set('password_format_copy',$this->user_model->password_format_copy())\n\t\t\t->build($this->controller_path.'form');\n\t}", "title": "" }, { "docid": "a9a5b6b3c656a709a1bbbab40d24c43f", "score": "0.70302194", "text": "public function create()\n {\n $is_edit = false;\n $product = new Product();\n\n return view('products.form', compact('product', 'is_edit'));\n }", "title": "" }, { "docid": "cfaeeb3c8bd4c70a19c542419f5ad0ee", "score": "0.70269614", "text": "public function create()\n {\n //显示创建资源表单页\n return view('admin/users/create',['title'=>'用户添加']);\n }", "title": "" }, { "docid": "0b984040060f01951eb2375bb849110c", "score": "0.7026164", "text": "public function create()\n\t{\n\t\treturn view('forms.project');\t\n\t}", "title": "" }, { "docid": "0c1db80c69466b1bbd9b8df7bea85585", "score": "0.70254475", "text": "public function newAction()\n {\n $recipe = $this->getRecipeManager()->createRecipe();\n $form = $this->createForm(new RecipeType(), $recipe, array(\n 'action' => $this->generateUrl('backend_recipe_create')\n ));\n\n return $this->render('AppBundle:Backend\\Recipe:new.html.twig', array(\n 'entity' => $recipe,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "9926d30e5b0046e49a6decdaa42f3859", "score": "0.70248765", "text": "public function create()\n {\n return view('platform.people.form');\n }", "title": "" }, { "docid": "33af005bef3111b2a76f2f441180b514", "score": "0.702485", "text": "public function create()\n {\n return view('concepto.create');\n }", "title": "" }, { "docid": "c959c491c6e5b588c802c9967ef706a4", "score": "0.70230263", "text": "public function create()\n {\n //\n // echo 'Here we will show the form and then submit the details in the database';\n }", "title": "" }, { "docid": "abbbd09a7646783cf210f98d7c703c30", "score": "0.70194376", "text": "public function create()\n {\n return view('menu::form');\n }", "title": "" }, { "docid": "6316a85e6cf9ca8aa64b9f706098ae25", "score": "0.7017854", "text": "public function create()\n {\n return view('partner.form');\n }", "title": "" }, { "docid": "d001d3a1995094ca265df985f6398e01", "score": "0.70149684", "text": "public function newAction()\n {\n $entity = new Client();\n $form = $this->createForm(new ClientType(), $entity);\n\n return $this->render('BackendAdminBundle:Client:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "5c8d80287891d65eee128c6ca7878e1c", "score": "0.7013804", "text": "public function create()\n\t{\n\t\t$data = array('type' => 'stone');\n\t\t$this->layout->content = \\View::make('forms.new-stone', $data);\n\t\n\t}", "title": "" }, { "docid": "6f9af144eba20ea97bd9c8a741627e1b", "score": "0.7012243", "text": "public function create()\n {\n return view('crud::crud.add');\n }", "title": "" }, { "docid": "a36d8135bd4414e4abd4868fb56a7177", "score": "0.6996758", "text": "public function create()\n {\n return view('layouts.submitproperty');\n }", "title": "" }, { "docid": "ddb99a4f31eb90825bf6b5da7fa52ca3", "score": "0.6994577", "text": "public function create()\n {\n return view('master.form.athlete-form');\n }", "title": "" }, { "docid": "b1c0d0b9bd1b6ed833c3d3d624e5b031", "score": "0.69930637", "text": "public function create()\n {\n $title = \"Registrar producto\";\n $model = new Product();\n return view($this-> prefixView.'form',compact('title','model'));\n }", "title": "" }, { "docid": "db5850464a16ce05c16a0c42606ccb2c", "score": "0.699252", "text": "public function create()\n {\n $data['typeForm'] = \"create\";\n $data['title'] = \"Property Marketplace\";\n return view(\"admin/marketplace/form\",compact('data'));\n }", "title": "" }, { "docid": "1d37883b0775931ddf17c75e4bbd9d90", "score": "0.6989433", "text": "public function create()\n\t{\n\t\treturn View::make('famoso.create');\n\t}", "title": "" }, { "docid": "9829c4939f7030aeb42447c704de1f3e", "score": "0.69889855", "text": "public function create()\n\t{\n\t\t$this->form->setModel($this->repo->getNew());\n\n\t\treturn View::make('thing.form', ['form' => $this->form]);\n\t}", "title": "" }, { "docid": "8a982b58b2eae6f233b1dcd18de452a0", "score": "0.6987187", "text": "public function create()\n\t{\n\t\treturn view('areadetails.form');\n\t}", "title": "" }, { "docid": "5dcc6a089e3a6d063fa3cab475e28855", "score": "0.6986054", "text": "public function create()\n {\n return view(\"Backend.Pages.add-new\");\n }", "title": "" }, { "docid": "1e96f853503e9af917b9a2a64cde033f", "score": "0.6985649", "text": "public function create()\n {\n return view(\"major.create\");\n }", "title": "" }, { "docid": "610f56b2c95018c60ad6a8374c2d250e", "score": "0.69853884", "text": "public function create()\n {\n return view ('tahun.form');\n }", "title": "" }, { "docid": "eeee917bcfaf007d8d07ea2e40388b06", "score": "0.69850516", "text": "public function create()\n {\n return view('clients.form')->with([\n 'action' => 'create'\n ]);\n }", "title": "" }, { "docid": "1d1ce9ff2645b7b3f0753d499204d44f", "score": "0.6980153", "text": "public function create()\n {\n //\n\n return view::make('form.create');\n }", "title": "" }, { "docid": "d0bdcbece4be35278c63f8feea57b955", "score": "0.6978014", "text": "public function new_form(){\n $this->vars['breadcrumbs'][] = array('label' => __('Create New Customer', 'latepoint'), 'link' => false );\n\n $this->vars['customer'] = new OsCustomerModel();\n $this->vars['wp_users_for_select'] = OsWpUserHelper::get_wp_users_for_select();\n\n\n $this->format_render(__FUNCTION__);\n }", "title": "" }, { "docid": "fa1baaa9f5aebb07e6bb696f0001364c", "score": "0.6976698", "text": "public function create()\n\t\t{\n\t\t\treturn view('coa.create');\n\t\t}", "title": "" }, { "docid": "54ece91bb98da047753baa658573a9de", "score": "0.697606", "text": "public function create()\n {\n //\n return view('admin.actuForm');\n }", "title": "" }, { "docid": "df3bf96fa2e72c254a6b2d268a5f6402", "score": "0.69758654", "text": "public function create()\r\n {\r\n return view('backend/category_management/create_form');\r\n }", "title": "" }, { "docid": "c754c692adc63ca29e993ebbf09ee995", "score": "0.6974421", "text": "public function create()\n {\n return view('product::admin.form');\n }", "title": "" }, { "docid": "74a010aa8faacd0448738b50f14d4758", "score": "0.6965735", "text": "public function create()\n {\n $title = self::TITLE;\n $route = self::ROUTE;\n $action = \"Add\";\n return view(self::FOLDER . '.create', compact('title', 'route', 'action'));\n }", "title": "" }, { "docid": "de91e46735fd97173b2f990f6ecc7d8c", "score": "0.6962055", "text": "public function showCreateFormAction() {\n $this->theme->setTitle(\"Add user\");\n $this->di->session();\n $form = new \\Anax\\Users\\CFormAddUser();\n $form->setDI($this->di);\n $form->check();\n \n // view of the comment form\n $this->di->views->add('comment/form', [\n 'title' => \"Add a new user\",\n 'content' => \"<h1>Add a new user</h1>\" . $form->getHTML()\n ]);\n }", "title": "" }, { "docid": "e2ad160b52213ea876d7e50dbf6fd2cd", "score": "0.6959711", "text": "public function create()\n {\n return view('wisata.form');\n }", "title": "" }, { "docid": "93847c98ccd0e3b2c387d82adc10a23e", "score": "0.69590706", "text": "public function create()\n\t{\n\t\treturn View::make('compromissos.create');\n\t}", "title": "" } ]
37be2a8d7ba88bd0f1416a3c84e6a311
Verifica a sessao iniciada
[ { "docid": "caac91058d055af3575fe788cf416703", "score": "0.0", "text": "public function cancelatroca(){\n verifyUser();\n\n #recebe os dados da troca\n $trcid = trim($this->input->get(\"trc\"));\n\n $this->cavaleiros_model->deleteTroca($trcid);\n\n redirect(\"trocas/?op=2\",\"refresh\");\n }", "title": "" } ]
[ { "docid": "366f81c461d9c0cf9aa472f1b3d93c88", "score": "0.7349606", "text": "public function verificar_session(){\n\t\t\t\n\t\t}", "title": "" }, { "docid": "3565aebfbd21cbe9fb67da827e8327d9", "score": "0.71394485", "text": "public function verifySession()\n {\n }", "title": "" }, { "docid": "45f5062ae8f4a549c64e2d9af62f5a0c", "score": "0.70867896", "text": "public function isSessionExists();", "title": "" }, { "docid": "ff43507f9ae91d07ce86d5caa2cbbdb7", "score": "0.6993754", "text": "public function hasSession();", "title": "" }, { "docid": "e7fa16756560f5b94aaed7468415b280", "score": "0.6979019", "text": "public function verificaAcesso(){\n\n \t$this->load->model(\"LoginModel\");\n\n \t$dados = $this->LoginModel->retornarSessoesDeslogar();\n\n \tif(!empty($dados)){\n\n \t\tforeach ($dados as $sessao) {\n \t\t\tsession_id($sessao->DES_SESSION);\n\t\t\t\t \n\t\t\t\tif(!isset($_SESSION)){\n\t\t\t\t\tsession_start();\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\tsession_cache_expire(10);\n\t\t\t\tsession_unset();\n \t\t}\n \t}\n\n \t$bool = $_SESSION[\"logado\"];\n\n \tif($bool == 1){\n \t\treturn true;\n \t}else{\n \t\tsession_destroy();\n\t\t\theader(\"Location: \".base_url().\"index.php/login\");\n \t}\n }", "title": "" }, { "docid": "6e4ebcf6b41062bac05979a1a756cf22", "score": "0.69486415", "text": "public static function sesion_iniciada(){\n //evaluamos si la sesion ya se a iniciado o no\n if(session_id() == ''){\n //si el if se cumple entonces se crea la sesion\n session_start();\n }\n //comprobamos si existe el nombre_usuario y el id_usuario\n if(isset($_SESSION['id_usuario']) && isset($_SESSION['nombre_usuario'])){\n //devolvemos verdadero si se ha iniciado sesion \n return true;\n } else {\n //en caso contrario se devuelve false\n return false;\n }\n }", "title": "" }, { "docid": "dd71875b8f34e45ef1bb75d2fc107b4b", "score": "0.68606675", "text": "public function verificar_sessao() {\n if ($this->session->userdata('logado') == false) {\n redirect('Login/login_confirm');\n }\n }", "title": "" }, { "docid": "8d2fe9fd5709abfcff1384b5bf8424c5", "score": "0.6839695", "text": "public static function sesionIniciada(){\n\t\tif(isset($_SESSION['sesion']))\n\t\t\t$flag = true;\n\t\telse\n\t\t\t$flag = false;\n\n\t\treturn $flag;\n\t}", "title": "" }, { "docid": "d4e8af9b68acf27fed88e93a7a4aabf9", "score": "0.68208355", "text": "public function estaLogueado() {\n return isset($_SESSION[\"idUser\"]);\n }", "title": "" }, { "docid": "7e85504eed160c1f83a2123a65564817", "score": "0.6811206", "text": "function sesf_assert() {\n\t$session_id = session_id();\t\n\t\n\t$con = dbf_user_connect();\n\n\t$stmt = $con->prepare(\"SELECT salt,session_hash FROM sessions WHERE session_id=?\");\n\n\tif (! $stmt ) {\n\t\techo \"Prepare failed: (\" . $con->errno . \") \" . $con->error;\n\t}\n\n\t$stmt->bind_param('s', $session_id);\n\t$stmt->execute();\n\t$stmt->bind_result($salt, $ses_hash);\n\t$stmt->fetch();\n\t\n\t$does_not_belong = strcmp($ses_hash, secf_session_hash(session_id(), $salt));\n\n\t$stmt->close();\n\t$con->close();\n\t\n\t//When the session doesn't belongs to the user\n\tif ($does_not_belong) {\t\n\t\tsesf_create_session(null);\n\t//When session does belong to the user\n\t} else {\n\t\t//Ensure not expired, if so end it and make a new guest session\n\t\tif ( sesf_expired(session_id())) {\n\t\t\tsesf_create_session(null);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "12ba047aac8f8c600843098857fc3ec8", "score": "0.67692363", "text": "public function CheckSession()\n {\n// {\n// $this->Logout();\n// return false;\n// }\n if(isset($this->session['account']))\n {\n $this->session['lastVisit'] = time();\n $this->account = ($this->session['account'] != null) ? unserialize( $this->session['account'] ) : null;\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "5544defefe3fec8164904bd51c3090d3", "score": "0.6741114", "text": "function areSessionsSet(){\n\n session_start();\n session_regenerate_id();\n if(!isset($_SESSION[\"email\"]) || empty($_SESSION[\"email\"])){\n return false;\n }\n if(!isset($_SESSION[\"pass\"]) || empty($_SESSION[\"pass\"])){\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "f85480713c41bb4ff80b6c408f824e85", "score": "0.668292", "text": "function verifyLogIn(): bool {\n if(session_status() == PHP_SESSION_NONE)\n session_start();\n\n if(!(isset($_SESSION['username']) && isset($_SESSION['user_id']) && isset($_SESSION['role'])))\n return false;\n return true;\n}", "title": "" }, { "docid": "8960454335cf6cde5a81035ec4188ad6", "score": "0.66688627", "text": "public function valid(){ return $this->zajlib->db->__call_session('valid', array(), $this->id); }", "title": "" }, { "docid": "8628fcb0b14d5440396f768796ae6ed9", "score": "0.6647911", "text": "function authd() {\n $app = registry('app');\n $sess = $app->request->session->get('user');\n\n if ($sess === false) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "d5f9d80debb11c3592d78622912958e0", "score": "0.66259664", "text": "public function verificarLogin() {\n // verifica se nao existir session ou se existir e esta vazio a session\n if (!isset($_SESSION['dmrlogin']) || (isset($_SESSION['dmrlogin']) && empty($_SESSION['dmrlogin']))) {\n header(\"Location:\" . BASE_URL . \"login\");\n exit;\n }\n }", "title": "" }, { "docid": "f34126dbb2203ff78525c80f1800b9f7", "score": "0.660242", "text": "public function verificaSesion()\n\t{\n if ( $_SESSION['id'] ) {\n \n \theader(\"location:../inicio/inicio.php\");\n\t\t} else {\n session_unset();\n header(\"location:../login.php\");\n }\n\t}", "title": "" }, { "docid": "e98259f02224bfce426db65957d32971", "score": "0.6592675", "text": "public function session(){\n $exist = !empty($this->data['id_user']) && !empty($this->data['token']);\n if (!$exist) $this->response(['error' => true, 'errorCode' => 403, 'errorMessage' => 'not autorized']);\n $Security = new Security();\n $Security->set_token($this->data['token']);\n $Security->set_id($this->data['id_user']);\n $uotorized = $Security->authorize();\n if(!$uotorized) $this->response(['error' => true, 'errorCode' => 403, 'errorMessage' => 'not autorized!']);\n $this->session = (int) $this->data['id_user'];\n return true;\n }", "title": "" }, { "docid": "f440767206a875ee28d084e7d8787322", "score": "0.65844405", "text": "private function isLoggedInBefore() {\n\n\t\t# If user data was saved\n\t\tif(!$sessionId = ud::$cookie->key('sessionId')->typeFilter(FilterRule::TYPE_EMPTY_STRING)->valueOr(null))\n\t\t\treturn false;\n\n\t\ttry {\n\n\t\t\t# We try to authorise user\n\t\t\tif($user = self::authenticationBySession($sessionId))\n\t\t\t\tself::authorisation($user);\n\t\t\telse\n\t\t\t\t$this->logout(false);\n\n\t\t} catch(\\Exception $e) {\n\t\t\tif($e instanceof DatabaseException)\n\t\t\t\tthrow new DatabaseException(\"Can't auth user, \".$e->getMessage());\n\t\t\tInfo::error(\"Во время восстановления сессии произошла ошибка\");\n\t\t}\n\n\t\t# False if auth failed\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "6e0b0f3b8d1f2ef65cc0553a20ce60fd", "score": "0.6581605", "text": "function verificarSesion(){\n if (isset($_SESSION['usuario'])){\n return true;\n }\n else return false;\n}", "title": "" }, { "docid": "189b573a11288e60bad3452c50079a25", "score": "0.65788436", "text": "static function check(){\n if(Session::has('eventId')){\n if(Session::get('eventId') == Configuration::eventId()){\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "b75274faca6c05d344af64bcaf38925e", "score": "0.6577144", "text": "public function validar_sessao() {\n\t\tif (!$this->session->userdata('LOGADO')) {\n\t\t\tredirect('admin/acesso');\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4351be03fc383610d7731e7b0ad10b69", "score": "0.6551752", "text": "protected function verificarSession()\r\n {\r\n if(isset($_SESSION[\"session\"]))\r\n {\r\n $correcto=false;\r\n foreach ($this->permisos as $valor)\r\n {\r\n echo $_SESSION[\"session\"];\r\n if($_SESSION[\"session\"]==$valor)\r\n {\r\n $correcto=true;\r\n }\r\n }\r\n return $correcto;\r\n }\r\n else\r\n {\r\n foreach ($this->permisos as $valor)\r\n {\r\n if(\"todos\"==$valor)\r\n {\r\n return true;\r\n }\r\n }\r\n return false;\r\n \r\n }\r\n \r\n return false;\r\n }", "title": "" }, { "docid": "8a848ec4f13a552a10806e3141e32fc7", "score": "0.6549976", "text": "public function testValidSessionExists_NoSession() {\n\t\t$res = UserSessionManager::validSessionExists();\n\t\t\n\t\t$this->assertFalse($res);\n\t}", "title": "" }, { "docid": "1fe3d9059fb704f799b7b50176a5811f", "score": "0.6523456", "text": "static function verifyLogin() {\r\n if(session_id() == \"\" && !isset($_SESSION)){\r\n session_start();\r\n }\r\n if(isset($_SESSION[\"email\"])){\r\n return true;\r\n }\r\n\r\n else{\r\n session_destroy();\r\n header(\"Location: parkingLogin.php\");\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "27c5c87df7234b721f931870b8e4ea3a", "score": "0.64892304", "text": "public static function check(): bool\n {\n return (bool) session(static::sessionName(), false);\n }", "title": "" }, { "docid": "6e4019cd7d93ef9488827a055ebd2b4f", "score": "0.6487037", "text": "static function checkValidity(){\n\n\t SessionManager::sessionStart('user');\n\n\n\t\tif($_SESSION['expires'] < time()){\n\t\t\t$token = json_decode(apiCaller::apiRequest(\"http://todolistapi.io/Oauth/Token\",\n\t\t\t array(\n\t\t\t\t'client_id' => \"todolist\",\n\t\t\t\t'client_secret' => \"todolist\",\n\t\t\t\t'redirect_uri' => 'http://securesoftware.io/code',\n\t\t\t\t'state' => $_SESSION['state'],\n\t\t\t\t'grant_type' => 'refresh_token',\n\t\t\t\t'refresh_token' => $_SESSION['refresh_token']\n\t\t\t\t)));\n\t\t $_SESSION['access_token'] = $token->access_token;\n\t\t $_SESSION['expires'] = $token->expires;\n\t\t $_SESSION['refresh_token'] = $token->refresh_token;\n\t\t }\n\t}", "title": "" }, { "docid": "6eac09a3878bbc67c2e73589bbb3b339", "score": "0.64759845", "text": "function _checkSession($args = null){\n return true;\n }", "title": "" }, { "docid": "8974a208054826647ac13d7fdd671aeb", "score": "0.6472749", "text": "function confirm_session_is_valid() {\n if (!is_session_valid()) {\n end_session();\n goToInvalidSessionPage();\n }\n}", "title": "" }, { "docid": "638bf31b74fca7954f0f871b27a4405e", "score": "0.64614564", "text": "function validaSessao() {\r\n\tif ($_SESSION [\"usuario\"] != $_COOKIE [\"i3geousuariologin\"]) {\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n}", "title": "" }, { "docid": "7418d72c2a8d7bd19c6856cc85e7ca96", "score": "0.6457213", "text": "function validar_session() {\n if (empty($_SESSION) or empty($_SESSION['identificacion']) or ! isset($_SESSION['identificacion'])) {\n echo \"sin acceso al sistema ingrese a la plataforma\";\n exit();\n } else {\n return $_SESSION['identificacion'];\n }\n }", "title": "" }, { "docid": "a1ff2bc6bb3256b7154dab9db10ca9c5", "score": "0.64403653", "text": "function VerificaUsuario(){\r\n\t\tif(!isset($_COOKIE[\"skydive\"]))\r\n\t\t return false;\r\n\t\t \r\n\t\t//verifica se a hora ainda esta valendo\r\n\t if (date(\"i\" ,time() - $this->get_hora_session()) > K_TEMPO)\r\n\t\t\treturn false;\r\n\r\n\t\t//se nao entrou em nenhum erro retorna true\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "9d79d36e1f13184f658cfa918ce84edd", "score": "0.64352393", "text": "private function authSession() {\n \n session_start();\n \n /* Try to get the exact same data from the sessions log in the database */\n $query = $this->db->query(\"SELECT id FROM confy_admin_sessions \n WHERE ip = '\" . $_SESSION['admin_ip'] . \"' AND\n time = '\" . $_SESSION['admin_time'] . \"' AND\n random_num = '\" . $_SESSION['admin_random_num'] . \"'\");\n \n /* If we got exactly one result, access is authorized */ \n if (mysqli_num_rows($query) == 1) {\n return true;\n } else {\n return false;\n }\n\n }", "title": "" }, { "docid": "93c5dfbebeefedc8c4dff40e9b9170d1", "score": "0.64199376", "text": "function usuarioEstaLogado(){\r\n\t\treturn isset($_SESSION['usuario_logado']);\r\n\t}", "title": "" }, { "docid": "0d5a2a44d6990cbfd5a4643a35130592", "score": "0.64146644", "text": "public static function esta_auth() {\n\t\tif(!empty($_COOKIE) AND !empty($_COOKIE[self::$_sesion_nombre])) {\n\t\t\t$cookie_sid =$_COOKIE[self::$_sesion_nombre]['sid'];\n\t\t\t$res = Model_Usuarios::seleccionar(array(array('sesion_id','=',$cookie_sid)), 'id');\n\t\t\tif(count($res) == 1) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "53183d80162c9294a2fcdadbd51b0db7", "score": "0.64062667", "text": "public function verificaSesion1()\n\t{\n if ( $_SESSION['id'] ) {\n \n \t\n\t\t} else {\n session_unset();\n header(\"location:../login.php\");\n }\n\t}", "title": "" }, { "docid": "a3d7e712003aadc5cc89648483ef082c", "score": "0.6376441", "text": "private function checkSession()\r\n\t\t\t {\r\n\t\t\t return ( strlen( session_id() ) < 1 ) ? false : true;\r\n\t\t\t }", "title": "" }, { "docid": "6886a108c38fdf688c64b17d790a221f", "score": "0.6373326", "text": "public function checkLogin() {\n if(isset($_SESSION['session']))\n {\n return true;\n }\n }", "title": "" }, { "docid": "63b507a6abe53345f0b5f0cdb89f17bb", "score": "0.63673913", "text": "abstract function is_session();", "title": "" }, { "docid": "bca91cf683ed9902d69a57d5124e143e", "score": "0.63560987", "text": "public function check_session() {\n\n\t\t// is already sessions\n\t\tif (! $this->CI->session->userdata('user_id')) {\n\n\t\t\t$this->CI->session->set_flashdata('alert-error', 'Sesi telah berakhir');\n\n\t\t\tredirect('sessions/signin');\n\n\t\t} else {\n\n\t\t\treturn true;\n\n\t\t}\n\t\t// End of if already sessions\n\t\t\n\t}", "title": "" }, { "docid": "5609ec24f5c20c6837c641b40e51b500", "score": "0.6354815", "text": "function check() {\n\t\tglobal $dbh;\n\t\t\n\t\t$sql_query = \"SELECT\n\t\t\t\t\t\tcount(*) as rcount\n\t\t\t\t\t FROM\n\t\t\t\t\t\tsessions\n\t\t\t\t\t WHERE\n\t\t\t\t\t\tsession_id = ?\n\t\t\t\t\t ;\";\n\n\t\t$update_vals = array(\n\t\t\t\t\t\t\tsession_id()\n\t\t\t\t\t\t\t);\n\n\t\t$stmt = $dbh->prepare($sql_query);\t\t\t\t\t \n\t\t$result = $stmt->execute($update_vals);\n\t\t$rows = $result->fetchRow();\n\t\t\n\t\t$this->session_exists = $rows['rcount'];\n\n\t\t// clear result set\n\t\t$result->free();\n\t}", "title": "" }, { "docid": "3e98757ac63bd330514a0d6598e1447b", "score": "0.63463515", "text": "private function checkSession() {\n if($this->_isEmptySessionHash()) {\n $this->_response->responseNotAuthorized();\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "cd49ff5cc55df90cde3d4d0c4370c4f8", "score": "0.6338178", "text": "public function hasSession(){\r\n return $this->_has(13);\r\n }", "title": "" }, { "docid": "6011b5ce737d34177cd95af066b4c058", "score": "0.6320824", "text": "public function isValidSession()\n {\n return $this->validsession;\n }", "title": "" }, { "docid": "d2ca710699d21af13d563ac1dcdcf628", "score": "0.63203305", "text": "public function checkSigninUser()\n {\n if ( !empty($_COOKIE['nsmle']) ) {\n header('Location: ' . BASEURL . '/admin');\n // Check session('nsmle') if isset redirect to admin home page\n } else if ( !empty($_SESSION['nsmle']) ) {\n header('Location: ' . BASEURL . '/admin');\n }\n }", "title": "" }, { "docid": "9ae014b02dd2fa2539cbd5f2b008b7b6", "score": "0.6306387", "text": "public function hasSession(){\r\n return $this->_has(9);\r\n }", "title": "" }, { "docid": "00980cafa417890c541a3efce6ce511a", "score": "0.63046867", "text": "public function userSessionExists(): bool\n {\n $authRequest = isset($_SESSION[\"authenticationRequest\"]) ? $_SESSION[\"authenticationRequest\"] : null;\n\n // Your app was redirected to from the Authress Hosted Login page. The next step is to show the user the login widget and enable them to login.\n $state = isset($_GET['state']) ? $_GET['state'] : null;\n $flow = isset($_GET['flow']) ? $_GET['flow'] : null;\n if ($state !== null && $flow === 'oauthLogin') {\n return false;\n }\n\n $userData = $this->getUserIdentity();\n // User is already logged in\n if (isset($userData)) {\n return true;\n }\n\n $authCode = isset($_GET['code']) ? $_GET['code'] : null;\n $nonce = isset($authRequest) && isset($authRequest->nonce) ? $authRequest->nonce : null;\n if (isset($authCode) && isset($nonce)) {\n try {\n $response = $this->client->request('POST', '/api/authentication/' . $nonce . '/tokens', [\n 'headers' => [\n 'User-Agent' => 'PHP AuthressSDK',\n 'Origin' => $this->authressLoginHostUrl\n ],\n 'json' => [\n 'code' => $authCode,\n 'grant_type' => 'authorization_code',\n 'redirect_uri' => $authRequest->redirectUrl,\n 'code_verifier' => $authRequest->codeVerifier,\n 'client_id' => $this->applicationId\n ]\n ]);\n\n $json = json_decode($response->getBody());\n $idToken = isset($json->id_token) ? $json->id_token : null;\n $cookieJar = $this->client->getConfig('cookies');\n $accessTokenCookie = $cookieJar->getCookieByName('authorization') !== null ? $cookieJar->getCookieByName('authorization')->getValue() : null;\n $accessToken = isset($json->access_token) ? $json->access_token : $accessTokenCookie;\n $_SESSION['authorization'] = $accessToken;\n $_SESSION['user'] = $idToken;\n unset($_SESSION[\"authenticationRequest\"]);\n return true;\n } catch (\\Exception $e) {\n unset($_SESSION[\"authenticationRequest\"]);\n throw $e;\n }\n }\n\n try {\n $response = $this->client->request('GET', '/api/session', [\n 'headers' => [\n 'Cookie' => 'authress-session=' . (isset($_COOKIE[\"authress-session\"]) ? $_COOKIE[\"authress-session\"] : ''),\n 'User-Agent' => 'PHP AuthressSDK',\n 'Origin' => $this->authressLoginHostUrl\n ]\n ]);\n $cookieJar = $this->client->getConfig('cookies');\n $authressSession = $cookieJar->getCookieByName('authress-session') !== null ? $cookieJar->getCookieByName('authress-session')->getValue() : null;\n setcookie('authress-session', $authressSession, [\n 'expires' => time() + 60 * 60 * 24 * 90,\n 'domain' => str_replace(\"https://\", \"\", $this->authressLoginHostUrl),\n 'path' => '/',\n 'httponly' => true,\n 'secure' => true,\n 'samesite' => 'Strict'\n ]);\n\n\n $json = json_decode($response->getBody());\n $idToken = isset($json->id_token) ? $json->id_token : null;\n $cookieJar = $this->client->getConfig('cookies');\n $accessTokenCookie = $cookieJar->getCookieByName('authorization') !== null ? $cookieJar->getCookieByName('authorization')->getValue() : null;\n $accessToken = isset($json->access_token) ? $json->access_token : $accessTokenCookie;\n $_SESSION['authorization'] = $accessToken;\n $_SESSION['user'] = $idToken;\n if (!isset($idToken) || $idToken === null || $idToken === '') {\n return false;\n }\n\n return true;\n } catch (\\Exception $e) {\n if ($e->getCode() !== 403 && $e->getCode() !== 404) {\n throw $e;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "fe51949278faabf0865a88364595a874", "score": "0.62989646", "text": "public static function check()\n {\n if(Session::get(Registry::singleton()->getSetting('session_prefix'))) // auth is ok ?\n {\n \treturn TRUE;\n }\n return FALSE;\n }", "title": "" }, { "docid": "29ce9dc1a38ad3c29892601648478ae3", "score": "0.629553", "text": "function login_check() {\n\t$exp_time = $_SESSION[\"expires_by\"];\n\t\n\t//jika waktu sistem lebih kecil dari nilai waktu session\n\tif (time() < $exp_time) {\n\t\t//panggil fungsi dan tambah waktu session\n\t\tlogin_validate();\n\t\treturn true; \n\t}else{\n\t\t//jika waktu session lebih kecil dari waktu session atau lewat batas\n\t\t//maka akan dilakukan unset session\n\t\tunset($_SESSION[\"expires_by\"]);\n\t\treturn false; \n\t}\n}", "title": "" }, { "docid": "0aeb7c4b1882f44936ed04f2f85c3f30", "score": "0.62854296", "text": "private function __VerificaCadastro()\n{\n\t$sql = $this->con->prepare('select cadastro_id from tb_cadastro where cadastro_email=:email and cadastro_senha=:senha');\n\t$sql->bindValue(':email',$_POST['email'],PDO::PARAM_STR);\n\t$sql->bindValue(':senha',md5($_POST['senha']),PDO::PARAM_STR);\n\t$sql->execute();\n\t\n\t$out = $sql->fetchColumn();\n\t\n\t$sql->closeCursor();\n\t\n\t$this->FecharCon();\n\t\n\tif(!$out) return ;\n\t\n\t$_SESSION['user'] = $out;\n\t\n\treturn true;\n}", "title": "" }, { "docid": "edd397d4d670ce16f0f31dea18e0f21f", "score": "0.62765", "text": "public function has_check_login_session(){\n\t\t$session_arr = isset($_SESSION)?$_SESSION:array();\n\t\tif (empty($session_arr['user'])) {\n\t\t\theader('Location: '.$this->websiteConfig->base_url().'login.php');\n\t\t}\n\t}", "title": "" }, { "docid": "682a11a9c7973859f3de97bd06aa2d04", "score": "0.62647825", "text": "static function check()\n {\n return isset($_SESSION['userid']);\n }", "title": "" }, { "docid": "b1ec2ac176ca3f928e3b2c05fe324662", "score": "0.6264708", "text": "public function authstatus(){\n session_start();\n if(isset($_SESSION['auth'])){\n echo \"connected\";\n }else{\n echo \"disconnected\";\n }\n }", "title": "" }, { "docid": "4c3059d0e97ac5498946bd2cd8466355", "score": "0.62637323", "text": "public function checkSession()\r\n {\r\n if (isset($_COOKIE[self::$cookieName])) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "1452c70ea6958c17515c2c1dbf140292", "score": "0.62632173", "text": "public static function userSessionExist() {\r\n self::startSession();\r\n return !empty($_SESSION['__user']);\r\n }", "title": "" }, { "docid": "aceefad1277a04e26d7b92b117a37108", "score": "0.6262808", "text": "protected function sessionOK(){\n\t $OK = true;\n $sessionConf = BIM_Config::session();\n\t if( !empty( $sessionConf->use ) ){\n $OK = false;\t \n $request = BIM_Utils::getRequest();\n \n $createUser = (strtolower( $request->controllerClass ) == 'bim_controller_users') \n && ( strtolower( $request->method ) == 'create' );\n \n $newUser = (strtolower( $request->controllerClass ) == 'bim_controller_users') \n && ( strtolower( $request->method ) == 'submitnewuser' );\n\n $getSelfies = (strtolower( $request->controllerClass ) == 'bim_controller_challenges') \n && ( strtolower( $request->method ) == 'getselfies' );\n\n $twilio = (strtolower( $request->controllerClass ) == 'bim_controller_users') \n && ( strtolower( $request->method ) == 'twiliocallback' );\n \n if( $createUser || $twilio || $getSelfies || $newUser || BIM_Utils::getSessionUser(true) ){\n $OK = true;\n }\n\t }\n return $OK;\n\t}", "title": "" }, { "docid": "46494deb51e49b9dcdaf3212432d88fa", "score": "0.62623644", "text": "function check_auth_user(){\n global $_SESSION;\n if (isset($_SESSION['usu']))\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "724e292ab31c0e7a7ecaaebd95e09a54", "score": "0.624224", "text": "function verifyAuthUser(){\n\t// Regenerating the id every new page\n\t// Verifying is the session variable exists\n\tif(isset($_SESSION['authUser'])){\n\t\t$login = $_SESSION['authUser']['login'];\n\t\t$password = $_SESSION['authUser']['password'];\n\t\t$sql = new Persistence\\SQL();\n\t\t$statement = $sql->query(\"SELECT * FROM FB_USER where user_email = :EMAIL and user_password = :PASSWORD\",\n\t\t\tarray(\n\t\t\t\t':EMAIL'=>$login,\n\t\t\t\t':PASSWORD'=>$password\n\t\t\t));\n\n\t\t$result = $statement->fetchAll(PDO::FETCH_ASSOC);\n\t\tif($result != null){\n\t\t\treturn true;\n\t\t}else if ($result == null){\n\t\t\treturn false;\t\n\t\t}\n\t}\n}", "title": "" }, { "docid": "2818d4d3a8e1b720e80983abe9fa66ac", "score": "0.6222516", "text": "function auth_check(){\n session_start();\n if (!isset($_SESSION['user'])) {\n $this->redirect(\"/login\");\n exit();\n }\n }", "title": "" }, { "docid": "d605e61d4b2c07a62544ad51d8da2ff3", "score": "0.6216895", "text": "function hasAuth()\n\t{\n\t\treturn !!sessionUser();\n\t}", "title": "" }, { "docid": "1e6f10495e86cd68d35fc8be398ea2f6", "score": "0.62023354", "text": "static public function sessionActive() {\n\n $user = Security::getUserID();\n\n if (empty($user)) {\n Front::redirect(\"main/login\");\n }\n }", "title": "" }, { "docid": "a78ae01283877c1d715aad1154bbaa25", "score": "0.6200555", "text": "function revisar_usuario(){\n return isset($_SESSION['nombre']);\n}", "title": "" }, { "docid": "f452bb4e0042954b9c55fd1b6de62964", "score": "0.6198583", "text": "function check_session()\r\n {\r\n $ci =& get_instance();\r\n $id = $ci->session->userdata('user_id');\r\n if(!isset($id))\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "caeeaa1a70a2398b51197554db4a1202", "score": "0.61962956", "text": "private function CheckSession() {\n //Instancia o Helper de Sessão\n $SessionHelper = HelperFactory::getInstance('session');\n\n //Valida a sessão\n if (!$SessionHelper->checkSession('UserId')) {\n if(strtolower($this->controller) == \"desbloqueio\"){\n include_once(INC.'MensagemDesbloqueio.php');\n die();\n\n }else{\n //Instancia o Helper de Redirecionamento\n $RedirectorHelper = HelperFactory::getInstance('redirector');\n //Redireciona para a p�gina de login\n $RedirectorHelper->goToControllerAction('','');\n\n }\n \n //Instancia o Helper de Redirecionamento\n $RedirectorHelper = HelperFactory::getInstance('redirector');\n //Redireciona para a página de login\n $RedirectorHelper->goToControllerAction('index', 'index');\n } else {\n /* O controller index(Inicial) é o único que possui permissão a todos\n pois a partir dele se dará o acesso aos demais controllers\n */\n if (strtolower($this->controller) != \"logado\") {\n //Instancia o Helper de Autenticação\n $AuthHelper = HelperFactory::getInstance('auth');\n\n\n /* Verifica se a ação atual deve ser avaliada na permissão de acesso\n obs: ações vindas de requisições json/ajax cuja as mesmas retornam valores para a view\n normalmente não precisaram ser avaliadas nas permissões,pois as mesmas apenas retornam dados\n para as views requisitadas, as permissões serão avalidas nas requisições POST/GET de cada view.\n */\n if (!($this->action == \"action_javascript\")) {\n //Verifica a permissão do Usuário\n if (!$AuthHelper->getPermissao($this->controller, $this->action)) {\n //Sem permissão de acesso\n include_once (INC . 'PermissaoNegada.php');\n die();\n }\n }\n }\n }\n }", "title": "" }, { "docid": "a926a5d3abc7581ac98ad46cb8ecfab6", "score": "0.6192467", "text": "function checkLogin()\n{\n if (getSession('logged-in') == true) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "f1d09d430db76090c7bb55b36c143473", "score": "0.6188002", "text": "public function check()\n {\n $result = (\n !empty($_SESSION[$this->name]) &&\n !empty($_REQUEST[$this->name]) && \n $_SESSION[$this->name] == $_REQUEST[$this->name]\n );\n $this->create(true);\n \n return $result;\n }", "title": "" }, { "docid": "e37de6331186c785853d2f25e2eb1751", "score": "0.61851954", "text": "public function check_session(){ \n\t\t$this->disable_cache(); \n\t\t//$this->Session->destroy();\n\t\tif(count($this->Session->read('USER'))){\n\t\t\treturn true;\n\t\t}else if($this->Cookie->read('KEYUSER') != ''){ \n\t\t\t$this->loadModel('Register');\n\t\t\t$data = $this->Register->find('first', array('fields' => array('first_name','last_name','email_id','id','mobile','test1_complete','test2_complete','otp','language_id'),\n\t\t\t'conditions' =>array('Register.id' => $this->Functions->decrypt($this->Cookie->read('KEYUSER')), 'is_deleted' => 'N', 'status' => '1')));\t\t\t\t\t\n\t\t\tif(empty($data)){\n\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Invalid Attempt', 'default', array('class' => 'alert alert-danger'));\t\t\t\t\n\t\t\t\t$this->redirect('/register/');\n\t\t\t}\t\t\n\t\t\t$this->Session->write('USER', $data);\n\t\t\treturn true;\n\t\t}else if($this->Cookie->read('KEYUSER') == ''){\n\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Session got expired', 'default', array('class' => 'alert alert-danger'));\t\n\t\t\t$this->redirect('/register/');\n\t\t\t// echo \"<script>location.href=$this->webroot</script>\";\n\t\t\t// $this->redirect('/');\n\t\t}else{ \n\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Session got expired', 'default', array('class' => 'alert alert-danger'));\n\t\t\t$this->delete_cookie('KEYUSER');\t\n\t\t\t$this->redirect('/register/');\n\t\t}\n\t}", "title": "" }, { "docid": "9d0dadf346d74d621bbdd92b541158db", "score": "0.6181667", "text": "public function checkIfLoggedIn(): bool;", "title": "" }, { "docid": "984ef10632d99e0c7370aa8f75958382", "score": "0.61743367", "text": "public function checkLogin(){\n if( !empty( $_SESSION['userid']) && !empty( $_SESSION['sessionhash'] ) ){\n $this->_userinfo['userid'] = $_SESSION['userid'];\n $this->_userinfo['sessionhash'] = $_SESSION['sessionhash'];\n return true;\n }\n return false;\n \n }", "title": "" }, { "docid": "ab79c37961f1b65e1a3bca4c0455ce61", "score": "0.61737025", "text": "private function check_session()\n {\n if (isset($_SESSION[\"session_id\"]) && !empty($_SESSION[\"session_id\"])) \n {\n if ($_SESSION[\"session_id\"] == $this->generate_session_id()) \n {\n return true;\n } \n else \n {\n return false;\n }\n } \n else \n {\n return false;\n }\n }", "title": "" }, { "docid": "e93049787584a1c3cb09349a16b03d5d", "score": "0.616577", "text": "public function verificaUsuarioLogado(){ \n $usuario = $this->session->userdata(\"gerente\");\n if($usuario == null){\n $this->session->unset_userdata(\"gerente\");\n $this->session->set_flashdata(\"sucess\" , \"Sessão Expirada. Por favor logue novamente\");\n redirect('/');\n }\n }", "title": "" }, { "docid": "29f1cdb2a71221e847afe4308f73cd8b", "score": "0.61592484", "text": "public function isSessionScoped();", "title": "" }, { "docid": "a78f3d954c2e9a262f9b87061b4318ee", "score": "0.61567754", "text": "function ident () {\n\t\t$login=htmlspecialchars(isset($_POST['loginUtilisateur'])?trim($_POST['loginUtilisateur']):'');\n\t\t$mdp=htmlspecialchars(isset($_POST['mdpUtilisateur'])?trim($_POST['mdpUtilisateur']):'');\n\t\t$msg=\"Utilisateur inexistant\";\n\t\t//appel à la base de données\n\t\trequire (\"./M/userDB.php\"); \n\t\t\tif (verifS_ident($login, $mdp) && (verif_bd($login, $mdp) == -1)) {\n\t\t\t\t$profil = $login; \n\t\t\t\t$_SESSION['profil'] = $profil;\n\t\t\t\t//chargement de la page accueil\n\t\t\t\t$nexturl = \"index.php?controle=user&action=accueil\";\n\t\t\t\theader (\"Location: \" . $nexturl);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpageConnexionInscription();\n\t\t\t}\n\t}", "title": "" }, { "docid": "3719a8121113f2049053c1dbabe6718a", "score": "0.6156164", "text": "function has_token_on_session_storage() {\n if (isset($this->accessToken)) return true;\n return false;\n }", "title": "" }, { "docid": "a307fb917dcb55c0eabf4cc06a49fb8e", "score": "0.61483866", "text": "function check_session() {\n\tif (isset($_SESSION['valid_user'])){\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "c9c952d1b7f8276d859024293f510df3", "score": "0.61453336", "text": "protected function _checkSid()\n {\n $oDb = oxDb::getDb();\n //matze changed sesskey to SessionID because structure of oxsession changed!!\n $sSID = $oDb->getOne(\"select SessionID from oxsessions where SessionID = \" . $oDb->quote($this->getId()));\n\n //2007-05-14\n //we check _blNewSession as well as this may be actually new session not written to db yet\n if (!$this->_blNewSession && (!isset($sSID) || !$sSID)) {\n // this means, that this session has expired in the past and someone uses this sid to reactivate it\n $this->_sErrorMsg = \"Session has expired in the past and someone uses this sid to reactivate it, creating new SID...<br>\";\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "67b5ba6fd9574c16b21aaa3608043b06", "score": "0.61426973", "text": "private function verificarPermisos() {\n if (empty($this->session->get_userdata('usuario'))) {\n $this->session->set_flashdata('mensaje', \n array(\n 'exito' => false,\n 'mensaje' => 'Debe iniciar sesión para realizar esta acción.'\n )\n );\n\n redirect('inicio');\n }\n }", "title": "" }, { "docid": "8476f769451e1e77e5870e863774ac07", "score": "0.6135056", "text": "function validate_session()\n{\n if (is_logged_in() && $_SESSION['check'] != get_check_hash())\n {\n destroy_session_and_data();\n }\n \n // New session, generate new id\n if (!isset($_SESSION['initiated']))\n {\n session_regenerate_id();\n $_SESSION['initiated'] = 1;\n }\n}", "title": "" }, { "docid": "7b41de8720cae597c69135c06bb43d45", "score": "0.61305636", "text": "protected function checkSession(){\n\t\tsession_start();\n\t\tif(!isset($_SESSION['email']) && $this->controller!='LoginController'){\n\t\t\theader('Location: /login');\n\t\t}\n\t}", "title": "" }, { "docid": "0e6ff5c807671438d6f4522bc80cb600", "score": "0.61293995", "text": "function validate()\r\n\t{\r\n // Session-ID abweichend von der durch session_id() \r\n // zurückgelieferte sein, wird FALSE zuzrückgeliefert\r\n if ($this->strSessionID === session_id())\r\n {\r\n return true;\r\n }\r\n return false;\r\n\t}", "title": "" }, { "docid": "c7dd4d3b319532a2b984f835fb7796b0", "score": "0.61189497", "text": "function userIsConnected(){\n return (isset($_SESSION['idUser']) && $_SESSION['idUser'] > 0);\n }", "title": "" }, { "docid": "17aa296281a6d7b13f1e7369e1fb4655", "score": "0.6117023", "text": "public static function validaSession(){\n $chave=true;\n if(\n !isset($_SESSION['retirada']['contrato_cli'])||\n !isset($_SESSION['retirada']['nome_cli'])||\n !isset($_SESSION['retirada']['interesse'])||\n !isset($_SESSION['retirada']['data'])||\n !isset($_SESSION['retirada']['horario'])||\n !isset($_SESSION['retirada']['endereco'])||\n !isset($_SESSION['retirada']['complemento'])||\n !isset($_SESSION['retirada']['telefone'] )){\n $chave=false;\n }\n return $chave;\n }", "title": "" }, { "docid": "16f9823576e260f73a716c704f7bd4a1", "score": "0.61170036", "text": "public function checkSignin()\n {\n if ( empty($_SESSION['nsmle']) ) {\n // If the coockie(nsmle) is empry, Then redirect to the login page \n if ( empty($_COOKIE['nsmle']) ) {\n header('Location: ' . BASEURL . '/admin/auth/signin');\n }\n } else if ( !empty($_SESSION['nsmle']) ) {\n unset($_SESSION['verifycode']);\n unset($_SESSION['username']);\n if ( empty($_COOKIE['nsmle']) ) {\n if ( !empty($_SESSION['remember']) ) {\n unset($_SESSION['remember']);\n setcookie (\"nsmle\", $_SESSION['nsmle'], time()+ (60 * 60 * 24 * 7 ), '/');\n }\n }\n }\n }", "title": "" }, { "docid": "8246305504587ffc73ddafccb2285e89", "score": "0.611504", "text": "function check_login() {\r\n\t\tif((isset($_SESSION['token_id']) && !empty($_SESSION['token_id'])) && (isset($_SESSION['name_id']) && !empty($_SESSION['name_id']))) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "53e65d201e01f33ca147c48187ac5b14", "score": "0.6114834", "text": "function validateSession() {\n\tif (isset($_SESSION[\"access_granted\"]) && $_SESSION[\"access_granted\"] === true) {\n\t\t//can also verify USER_AGENT and IP are the same.\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "a228b03dcf626a9f7afb6b5ed156cab9", "score": "0.6113399", "text": "private function encerrar_sessao()\n {\n session_start();\n \n return session_destroy();\n }", "title": "" }, { "docid": "3770fa58ad9ef53ce308a708c41906db", "score": "0.6111257", "text": "public function isValid()\r\n {\r\n return $this->session->getStatus() == Auth::VALID;\r\n }", "title": "" }, { "docid": "6fdd0369356e751d7338f6d1712c87a3", "score": "0.61086047", "text": "function check_session(){\t\tif(isset($_SESSION['username'])){\n\t\t\treturn true;\n\t\t} else return false;\n\t}", "title": "" }, { "docid": "b636c9d071c5592eff65b98b9bd63c27", "score": "0.61053693", "text": "public function logged_in()\r\n\t{\r\n\t\treturn (bool) $this->session->get($this->config['VK_SESSION_KEY'], FALSE);\r\n\t}", "title": "" }, { "docid": "c69e06c8f69067082570e5de3f258914", "score": "0.60918266", "text": "public static function is_session_valid () {\n\t\tif (! self::require_login (true)) return false;\n\t\treturn (is_object (self::$user) && self::$user->session_id == $_SESSION['session_id']);\n\t}", "title": "" }, { "docid": "b230d617bf4dc102488069e9f61ae832", "score": "0.60862416", "text": "public function checkSession()\n {\n $session_id = $this->session->userdata('admin_id');\n if(empty($session_id))\n {\n redirect(site_url('admin'));\n }\n return true;\n }", "title": "" }, { "docid": "240ca0c39dd59db9ffb430d75c760336", "score": "0.60821414", "text": "function checkLogin(){\n\t\tglobal $_SESSION;\n\t\tif($_SESSION['SID']){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "fbdc842295e037aea8d7dca8e5947c7f", "score": "0.6079104", "text": "public function usuario_autentificado(){\n \n\n @session_start();\n function revisar_usuario_session(){\n\n if($_SESSION['tipo_usuario']=='Admin' or $_SESSION['tipo_usuario']=='Proveedor'){\n\n return isset($_SESSION['usuario']);\n }else{\n return 0;\n }\n }\n\n if(!revisar_usuario_session()){\n header('location:../../');\n exit();\n }\n\n\n }", "title": "" }, { "docid": "ef8d757673e1caac295e3b6e6af46785", "score": "0.6074198", "text": "private function confirm() {\n\n foreach($_SESSION as $key => $session) {\n\n // Validating session key to prevent spoofing\n if(strlen($key) === 40 && !empty($session['Ratchet']) && $_SERVER['HTTP_USER_AGENT'] === $session['user_agent']) {\n \n // Check expiration\n if(time() > $session['expires']) {\n\n // Clear if expired\n self::clear();\n return false;\n }\n\n // Good session\n return $session;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "e9fdd26d62317f2e0a5f67d6eebd1be7", "score": "0.6074107", "text": "public function isNewUser()\n {\n return $this->session->hasJustRegistered();\n }", "title": "" }, { "docid": "fe547e9109759a8f947e4f2e6044b2bb", "score": "0.60716903", "text": "public function getSessionValidate()\n\t{\n\t\t$this->__session_details = $this->session->all_userdata();\n\t\tif(!isset($this->__session_details['admin_login']))\n\t\t{\n\t\t\tredirect('Admin','refresh');\n\t\t}\n\t}", "title": "" }, { "docid": "524ac211b22c861fbafc38853b333be4", "score": "0.60690194", "text": "function checkLoggedSession()\n {\n if ($this->isLoggedIn()) {\n if ($_SESSION['ROLE'] == 0) {\n return 0;\n } else\n return 1;\n } else\n return 2;\n }", "title": "" }, { "docid": "a79c133350b145d2978887189388b53b", "score": "0.6065357", "text": "function sess_open() {\n $this->storage->open();\n return true;\n }", "title": "" }, { "docid": "aec4ffd65d5d7099cba9a5a5f42db684", "score": "0.60578924", "text": "public function logoutCheck()\n {\n }", "title": "" }, { "docid": "fc8eb8adc81abf2ab794d1b2b62456da", "score": "0.6056949", "text": "function CheckConnection() {\r\n\t\tif( isset( $_SESSION[ 'userid' ] ) ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "6b0cee21bcc0690533995d105dcfcdda", "score": "0.6054981", "text": "public function verifyConnection() {\n $isConnected = empty($_SESSION) ? false : true;\n return $isConnected;\n }", "title": "" } ]
4d5f7025f8b93a052fefa38f0a1a2302
Todas las tareas asignadas a este personal en un proyecto
[ { "docid": "5b8e0d1171133c68a1f2a94310c4c094", "score": "0.58132243", "text": "public function tareasDesarrolladasProyecto($idProyecto){\n\n $listaAsignaciones = $this->asignacion;\n $Tareas = [];\n foreach ($listaAsignaciones as $asignacion) {\n if ( (($asignacion->tarea->Proyecto_id) == ($idProyecto))) {\n $Tareas[] = $asignacion;\n }\n }\n return $Tareas; //Todas las tareas asignadas a este personal en un proyecto\n }", "title": "" } ]
[ { "docid": "397dd09e51edead8faa8ce6a5ecfd7b5", "score": "0.67100763", "text": "public function tareasAsignadas(){\n\n $listaAsignaciones = $this->asignacion;\n $Tareas = [];\n foreach ($listaAsignaciones as $asignacion) {\n if (strtolower($asignacion->tarea->estado_tarea->Nombre_estado_tarea) != strtolower('Aprobada')) {\n $Tareas[] = $asignacion;\n }\n }\n return $Tareas; //Todas las tareas asignadas a este personal en un proyecto\n }", "title": "" }, { "docid": "dda32718e86cea45857f105e9e169428", "score": "0.6236597", "text": "public function tareasEnDesarrollo(){\n\n $listaAsignaciones = $this->asignacion;\n $Tareas = [];\n foreach ($listaAsignaciones as $asignacion) {\n if (strtolower($asignacion->tarea->estado_tarea->Nombre_estado_tarea) != strtolower('Aprobada')) {\n if (strtolower($asignacion->Responsabilidad) == strtolower('Responsable')) {\n $Tareas[] = $asignacion;\n }\n }\n }\n return $Tareas; //Todas las tareas que estan en estado asignada o en desarrollo que fueron asignadas a este personal\n }", "title": "" }, { "docid": "c918f2bfbf32d2f1148077471679bc94", "score": "0.5987438", "text": "public function carga_de_trabajo(){\n\n $listaAsignaciones = $this->asignacion;\n $Tareas = [];\n foreach ($listaAsignaciones as $asignacion) {\n if (strtolower($asignacion->tarea->estado_tarea->Nombre_estado_tarea) != strtolower('Aprobada')) {\n\n $Tareas[] = $asignacion;\n\n }\n }\n return $Tareas; //Todas las tareas que estan en estado asignada o en desarrollo que fueron asignadas a este personal\n }", "title": "" }, { "docid": "7812c073f1e3a499ba3ffab666c46367", "score": "0.5929905", "text": "public function solicitudes() {\n Utils::isAdministrador('administrador');\n\n $usuario = new Usuario();\n $solicitud = $usuario->getUsuarios_inactivos();\n require_once 'views/nav.php';\n require_once 'views/solicitudes.php';\n }", "title": "" }, { "docid": "0a143f76a18dd49040dfac779139c138", "score": "0.5887799", "text": "function tareas_globales() {\n\tglobal $tsUser;\n\t// Tiempo programable.\n\t$time = array(\n\t'-3mins' => $this->settings['date'] - 180,# RESTAMOS 3 MINUTOS\n\t'+1dias' => $this->settings['date'] + (1*24*60*60),# SUMAMOS 1 DIA\n\t'-1dias' => $this->settings['date'] - (1*24*60*60),# RESTAMOS 1 DIA\n\t'-3dias' => $this->settings['date'] - (3*24*60*60),# RESTAMOS 3 DIAS\n\t'-30dias' => $this->settings['date'] - (30*24*60*60),#RESTAMOS 30 DIAS\n\t);\n\t\n\t// Agregar visita de usuario.\n\t$tsUser->get_visita(0, 1);\n\t// Limpiamos todo si esta en mantenimiento......\n\t$this->delete_sesions();\n\t\n\t// Contamos todos los usuarios online.\n\t$all = anaK('num_rows', anaK('query', 'SELECT id FROM '.$this->table['04'].' WHERE ip_type = \\'1\\' && ip_date >= '.$this->setProtect($time['-3mins']), array(__FILE__, __LINE__)));\n\t\n\t// Actualizamos la lista de usuarios.\n anaK('query', 'UPDATE '.$this->table['00'].' SET total_online = \\''.$this->setProtect((int)$all).'\\' WHERE id = '.$this->setProtect((int)$this->settings['id']), array(__FILE__, __LINE__));\n\t\n\t// Eliminamos las ips del dia anterior global.\n anaK('query', 'DELETE FROM '.$this->table['04'].' WHERE ip_type = \\'1\\' && ip_date < '.$this->setProtect($time['-1dias']), array(__FILE__, __LINE__));\n\t\n\t// Eliminamos las cuentas hosting, que tengan mas de 30 dias.\n\tanaK('query', 'DELETE FROM '.$this->table['16'].' WHERE cp_active = \\'1\\' && cp_over < '.$this->setProtect($this->settings['date']), array(__FILE__, __LINE__));\n\t\n\t// Eliminamos las notificaciones con mas de 30 dias.\n\tanaK('query', 'DELETE FROM '.$this->table['13'].' WHERE not_menubar = \\'0\\' && not_monitor = \\'0\\' && not_date < '.$this->setProtect($time['-30dias']), array(__FILE__, __LINE__));\n\t\t\n\t// Eliminamos peticiones de validacion con mas de 30 dias.\n\tanaK('query', 'DELETE FROM '.$this->table['07'].' WHERE hash_time < '.$this->setProtect($time['-30dias']), array(__FILE__, __LINE__));\n\n\t// Comparamos fechas para limpiar directorios......\n\tif($this->settings['date'] >= $this->settings['fecha_limpieza']) {\n\t// Vaciamos lo que esta dentro de cache.\n\t$this->delete_files(EA_ROOT.'/cache/');\n\t// Vaciamos lo que esta dentro de others.\n\t$this->clean_folder(EA_FILES.'/tmp/others/');\n\t// Eliminamos usuarios inactivos.\n\t$tsUser->delete_user_inactive();\n\t// Actualizamos la proxima fecha de limpieza, mañana a la misma hora.\n\tanaK('query', 'UPDATE '.$this->table['00'].' SET fecha_limpieza = \\''.$this->setProtect($time['+1dias']).'\\' WHERE id = '.$this->setProtect((int)$this->settings['id']), array(__FILE__, __LINE__));\n\t//\n\t}\n\t//\t\n\t}", "title": "" }, { "docid": "773a251fdd9447ebdde6ed60455aa31e", "score": "0.58126134", "text": "public function opcion2()\n\t{\n\t\t$selected_project = $this->input->post('selected_project');\n\n\t\t// si me lo pasaron por post es porque vengo del listado de obras y lo seteo en la sesion\n\t\tif($selected_project)\n\t\t{\n\t\t\t$data = unserialize($this->session->userdata('session_user'))->setSelectedProject($selected_project);\n\t\t\t$this->session->set_userdata('session_user', serialize($data));\n\t\t}\n\t\t// si no me lo pasan por post es porque vengo de las otras vistas y tengo que recuperarlo de la sesion\n\t\telse\n\t\t{\n\t\t\t$selected_project = unserialize($this->session->userdata('session_user'))->getSelectedProject();\n\t\t}\n\n\t\t$this->load->view('proj_details_internal');\n\t}", "title": "" }, { "docid": "ad92dc9af9ebcff7a8d2a4aee44755fc", "score": "0.57765496", "text": "private function atributosCargo() {\n\n $aCargo = array();\n $aCargo['nome'] = 'cargo';\n $aCargo['propriedades'] = array('nome', $this->atributosCarreira());\n\n return $aCargo;\n }", "title": "" }, { "docid": "4a2707a852a37da0410db295773bad99", "score": "0.57750714", "text": "public function permisos();", "title": "" }, { "docid": "51dd4b420cc3fddc486eb034bfeb8f82", "score": "0.5767229", "text": "public function run()\n {\n $permissoes = [\n $this->newPermission('read.atribuicao', 'Permite ao usuário visualizar as atribuições de permissão dos usuários.'),\n $this->newPermission('update.atribuicao', 'Permite ao usuário editar as atribuições de permissão dos usuários.'),\n $this->newPermission('acessa.adm-background', 'Permite ao usuário acessar o bacjground administrativo.'),\n $this->newPermission('create.permissao', 'Permite ao usuário adicionar nova permissão ao sistema.'),\n $this->newPermission(\"read.permissao\", \"Permite ao usuário recuperar (ver) permissões.\"), \n $this->newPermission(\"update.permissao\", \"Permite ao usuário editar permissões.\"), \n $this->newPermission(\"delete.permissao\", \"Permite ao usuário excluir permissões.\"), \n $this->newPermission('create.papel', 'Permite ao usuário adicionar novo papel ao sistema.'),\n $this->newPermission(\"read.papel\", \"Permite ao usuário visualizar papel.\"), \n $this->newPermission(\"update.papel\", \"Permite ao usuário editar papel.\"), \n $this->newPermission(\"delete.papel\", \"Permite ao usuário excluir papel.\"), \n $this->newPermission('create.usuario', 'Permite ao usuário adicionar novo usuario ao sistema.'),\n $this->newPermission(\"read.usuario\", \"Permite ao usuário visualizar usuários.\"), \n $this->newPermission(\"update.usuario\", \"Permite ao usuário editar usuários.\"), \n $this->newPermission(\"delete.usuario\", \"Permite ao usuário excluir usuários.\"), \n $this->newPermission(\"menu.usuario\", \"Permite ao usuário excluir usuários.\"), \n $this->newPermission('create.usuario.master', 'Permite ao usuário adicionar novo usuario master ao sistema.'),\n $this->newPermission(\"read.usuario.master\", \"Permite ao usuário visualizar usuários master.\"),\n $this->newPermission(\"update.usuario.master\", \"Permite ao usuário editar usuários master.\"), \n $this->newPermission(\"delete.usuario.master\", \"Permite ao usuário excluir usuários master.\"), \n $this->newPermission(\"menu.master\", \"Permite ao usuário visualizar o menu master\"),\n $this->newPermission(\"menu.master.permissoes\", \"Permite ao usuário visualizar o menu master\"),\n $this->newPermission(\"menu.master.papeis\", \"Permite ao usuário visualizar o menu master\"),\n $this->newPermission(\"menu.master.atribuicao\", \"Permite ao usuário visualizar o menu master\"),\n $this->newPermission(\"menu.master.dados\", \"Permite ao usuário visualizar o menu master\"),\n $this->newPermission('create.dado', 'Permite ao usuário adicionar novo usuario master ao sistema.'),\n $this->newPermission(\"read.dado\", \"Permite ao usuário visualizar usuários master.\"),\n $this->newPermission(\"update.dado\", \"Permite ao usuário editar usuários master.\"), \n $this->newPermission(\"delete.dado\", \"Permite ao usuário excluir usuários master.\"),\n $this->newPermission('create.curso', 'Permite ao usuário adicionar novo curso ao sistema.'),\n $this->newPermission(\"read.curso\", \"Permite ao usuário visualizar os cursos.\"),\n $this->newPermission(\"update.curso\", \"Permite ao usuário editar os cursos.\"), \n $this->newPermission(\"delete.curso\", \"Permite ao usuário excluir um curso.\"),\n $this->newPermission(\"menu.curso\", \"Permite ao usuário ver o menu cursos.\"),\n $this->newPermission('create.materia', 'Permite ao usuário adicionar novo curso ao sistema.'),\n $this->newPermission(\"read.materia\", \"Permite ao usuário visualizar os cursos.\"),\n $this->newPermission(\"update.materia\", \"Permite ao usuário editar os cursos.\"), \n $this->newPermission(\"delete.materia\", \"Permite ao usuário excluir um curso.\"),\n $this->newPermission(\"menu.materia\", \"Permite ao usuário ver o menu cursos.\"),\n $this->newPermission(\"bloquear.usuario\", \"Permite que o usuário logado bloqueie outro usuário.\"),\n ];\n \n foreach ($permissoes as $permissao){\n $novaPermissao = new Permissao();\n $novaPermissao->tag = $permissao['tag'];\n $novaPermissao->descricao = $permissao['descricao'];\n $novaPermissao->save();\n }\n }", "title": "" }, { "docid": "e4e7861cc92863bc66408db300bc74cd", "score": "0.575009", "text": "public function asignar_tarea() {\n switch ( $this->tarea ) {\n\n //Tareas generales------------------------------------------------------\n case 'agregar':\n $this->encargado_tarea->agregar_nuevo( $this->datos_elemento );\n break;\n\n case 'modificar':\n $this->encargado_tarea->modificar( $this->datos_elemento );\n break;\n\n case 'eliminar':\n $this->encargado_tarea->eliminar( $this->datos_elemento );\n break;\n\n case 'consultar lista':\n $this->encargado_tarea->obtener_datos( null, true );\n break;\n\n case 'consulta especifica':\n $this->encargado_tarea->obtener_datos( $this->datos_elemento, true );\n break;\n\n case 'simular':\n $this->encargado_tarea->mandar_simulacion( $this->datos_elemento['id_procesos_duracion'] );\n break;\n\n //Tareas del administrador de proceso-----------------------------------\n case 'activar proceso':\n $this->encargado_tarea->iniciar_proceso( $this->datos_elemento );\n break;\n\n case 'finalizar proceso':\n $this->encargado_tarea->finalizar_proceso( $this->datos_elemento );\n break;\n\n case 'agregar equipo a proceso':\n $this->encargado_tarea->agregar_equipo( $this->datos_elemento );\n break;\n\n case 'modificar porcentaje de equipo':\n $this->encargado_tarea->modificar_porcentaje_equipo( $this->datos_elemento );\n break;\n\n case 'eliminar equipo de proceso':\n $this->encargado_tarea->quitar_equipo( $this->datos_elemento );\n break;\n\n case 'consultar porcentajes de equipos':\n $this->encargado_tarea->obtener_porcentajes_totales();\n break;\n\n //Tareas del administrador de equipo------------------------------------\n case 'agregar componente a equipo':\n $this->encargado_tarea->agregar_componente( $this->datos_elemento );\n break;\n\n case 'modificar porcentaje de componente':\n $this->encargado_tarea->modificar_porcentaje_componente( $this->datos_elemento );\n break;\n\n case 'eliminar componente de equipo':\n $this->encargado_tarea->quitar_componente( $this->datos_elemento );\n break;\n\n case 'consultar porcentajes de componentes':\n $this->encargado_tarea->obtener_porcentajes_totales();\n break;\n\n default:\n # code...\n echo \"Tarea inválida\";\n break;\n }\n }", "title": "" }, { "docid": "c4df344dc066d14eb50026fe460fb4ae", "score": "0.5740079", "text": "public function getProyectos(){\r\n\t//View::response('view'); //nota se manda $regiones_id a la vista de aquí es que sale\r\n View::template(null);\r\n $this->empresas_id=Input::post('empresas_id');\r\n }", "title": "" }, { "docid": "1a4d09ce1ee8c343f30c20796ca40691", "score": "0.5719355", "text": "private function verifica_campos() {\n if(!empty($this->input->post('nome'))){\n $this->doença=$this->input->post('nome');\n }\n if(!empty($this->input->post('alergia_nome'))){\n $this->alergia=$this->input->post('alergia_nome');\n }\n \n if (!empty($this->input->post('nome_medica'))){\n $this->medicamento=$this->input->post('nome_medica');\n }\n }", "title": "" }, { "docid": "400777d8db6a8415612ae8982f3a9bf1", "score": "0.57020986", "text": "public function misTutoriales()\n {\n if (isset($this->usuarioActual)) {\n $_SESSION[\"__sesion__herramienta__\"][\"__filtro_texto__\"] = $this->usuarioActual->getNomUsuario();\n $_SESSION[\"__sesion__herramienta__\"][\"__filtro_tipo__\"] = \"autor\";\n }\n $this->view->redirect(\"tutorial\", \"filtro\");\n }", "title": "" }, { "docid": "988cde5320c99201194605c3b4dcd06a", "score": "0.5686084", "text": "public function procesarPersonas() {\n\t\t// debido a la cantidad de personar se usa el finder para organizar las personas en grupos\n\t\t//finder\n\t\t$finder = $this -> buscarArchivos('personas','');\n\t\tforeach ($finder as $archivo) {\n\t\t\t//----- paso 3\n\t\t\t$lista_personas = $this -> json($this -> datos .'/' . $archivo -> getRelativePathname());\n\t\t\tforeach ($lista_personas as $clave => $persona) {\n\t\t\t\t$p = new Persona($persona['nombre'], $persona['apellido'], $persona['data'], $persona['inicio'], '', $persona['sexo'], $persona['mostrar']);\n\t\t\t\t$p -> setPais($this -> paises[$persona['pais']]);\n\t\t\t\t//proceso tipo;\n\t\t\t\tforeach ($persona['tipo'] as $tipo) {\n\n\t\t\t\t\t$p -> addTipo($this -> tipos[$tipo]);\n\n\t\t\t\t}\n\t\t\t\t//proceso las obras (no. ahora se hace desde obras)\n\t\t\t\t\n\t\t\t\t//metadatos persona\n\t\t\t\tif( array_key_exists('metadatos',$persona) ){\n\t\t\t\t\tforeach ($persona['metadatos'] as $metadato) {\n\t\t\t\t\t\t//busca el metadato y lo asocia\n\t\t\t\t\t\t//echo 'SOY UN METADATO PERSONA';\n\t\t\t\t\t\t$met = new \\BaseVideoArte\\Entidades\\MetadatoPersona($metadato['metadato'], $metadato['tipo']);\n\t\t\t\t\t\t$p -> addMetadato($met);\n\t\t\t\t\t\t$met -> setPersona($p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// foto ppal\n\t\t\t\tif( array_key_exists('foto',$persona) ){\n\t\t\t\t\t\n\t\t\t\t\t\t echo '<br>existe la foto<br>';\n\t\t\t\t\t\t $m = new \\BaseVideoArte\\Entidades\\Medio($persona['foto'],\"foto $persona[apellido]\",'ppal');\n\t\t\t\t\t\t $p->addMedio($m);\n\t\t\t\t\t\t $m->addPersona($p);\n\t\t\t\t\t \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//web\n\t\t\t\t\n\t\t\t\tif( array_key_exists('web',$persona) ){\n\t\t\t\t\techo '<br>existe la web<br>';\n\t\t\t\t\tforeach ($persona['web'] as $web) {\n\t\t\t\t\t\t $m = new \\BaseVideoArte\\Entidades\\Medio($web,\"web $persona[apellido]\",'web');\n\t\t\t\t\t\t $p->addMedio($m);\n\t\t\t\t\t\t $m->addPersona($p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t//enlaces\n\t\t\t\tif( array_key_exists('enlaces',$persona) ){\n\t\t\t\t\tforeach ($persona['enlaces'] as $enlace) {\n\t\t\t\t\t\techo '<br>HAY UN enlaceeeeee<br>';\n\t\t\t\t\t\t$m = new \\BaseVideoArte\\Entidades\\Medio($enlace,\"info $persona[apellido]\",'enlace');\n\t\t\t\t\t\t$p->addMedio($m);\n\t\t\t\t\t\t$m->addPersona($p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// guardo la perosna en array\n\t\t\t\t$this -> personas[$clave] = $p;\n\n\t\t\t}\n\n\t\t}//fin finder\n\t}", "title": "" }, { "docid": "633ae5435f05480d9f69d7e06e38d5e9", "score": "0.5657909", "text": "function generar_privilegios($cod_tipo_usuario){\n\t \n\t\trequire_once(\"modelo/class_usuario.php\");\n\t\t$usuario = new usuario;\n\t\t$usuario->set_cod_tipo_usuario($cod_tipo_usuario);\n\t\t$a=$usuario->privilegios();\n\t\t$_SESSION['vista_mision']=true;\n\t\t$_SESSION['vista_vision']=true;\n\t\t$_SESSION['vista_resena']=true;\n\t\twhile($row_usuario = $usuario->row()){\n\t\t\t\n\t\t\t$nombre=$row_usuario['nombre'];\n\t\t\t$nombre=explode('&',$nombre);\n\t\t\t\n\t\t\t$_SESSION['vista_'.$nombre[0]]=true;\n\t\t\t$_SESSION['cod_vista_'.$nombre[0]]=$row_usuario['cod_vista_sistema'];\n\t\t\t\n\t\t}\n\n\t\t\t\n}", "title": "" }, { "docid": "de5f923765bb9df68684af4221c711b6", "score": "0.5656901", "text": "function permisos() {\n\n if ($this->get('code')) {\n\n $this->data(['urlForm' => $this->obtUrl('permisos'),\n 'codigo' => $this->get('code')\n ]);\n\n } else {\n if ($this->post('btnPermisosInstagram')) {\n\n $ig = new InstagramManager();\n $infoIG = $ig->solicitarAccessToken($this->post('codigo'));\n\n $redSocial = new Modelos\\RedSocial();\n $redSocial->obtenerBy('instagram', 'identificador');\n\n $redSocial->access_token = $infoIG['access_token'];\n $redSocial->data = json_encode($infoIG['user']);\n\n $redSocial->salvar();\n\n Render\\Formulario::msj('suceso', \"Se han guardado los datos de Autenticación con Instagram exitosamente\");\n $this->redireccionar($this->obtUrl('index'));\n\n } else {\n $this->_404();\n }\n }\n }", "title": "" }, { "docid": "ec6ea14d9b50058aff3d985797596094", "score": "0.56552535", "text": "function modeloUserGetAll (){\n \n // Genero lo datos para la vista que no muestra la contraseña ni los códigos de estado o plan\n // sino su traducción a texto\n $tuservista=[];\n foreach ($_SESSION['tusuarios'] as $clave => $datosusuario){\n $tuservista[$clave] = [$datosusuario[1],\n $datosusuario[2],\n PLANES[$datosusuario[3]],\n ESTADOS[$datosusuario[4]]\n ];\n }\n return $tuservista;\n}", "title": "" }, { "docid": "df20f827539e42c18f3a47f21c94d35d", "score": "0.5640538", "text": "public function navigacijaIzbor() {\n if (isset($_POST['registracijaKorisnik'])) {\n $this->prikaz('registracijaKorisnik',[]);\n }\n elseif (isset($_POST['postaniLoyality'])) {\n $this->prikaz('postaniLoyality',[]);\n }\n }", "title": "" }, { "docid": "045ccde6ce51f983b86fe3e43dcb1161", "score": "0.5633161", "text": "function modeloUserGetAll (){\n // Genero lo datos para la vista que no muestra la contraseña ni los códigos de estado o plan\n // sino su traducción a texto\n $tuservista=[];\n $db = AccesoDatos::getModelo();\n $tuser = $db->getUsuarios();\n foreach ($tuser as $user) {\n $tuservista[$user->login] = [$user->nombre,\n $user->correo,\n PLANES[$user->plan],\n ESTADOS[$user->estado]\n ];\n \n \n } \n return $tuservista;\n}", "title": "" }, { "docid": "0f445b13f2a83ea820b7a15efb3de6f0", "score": "0.5609631", "text": "public function index()\n {\n \n // // $solicitudes[] = null;\n // $manager = Auth::user();\n // $users = $manager->managed_area->users;\n // // echo $users;\n // foreach ($users as $user) {\n // $nuevo = User::find($user->id);\n // // if($nuevo->solicitudes->isNotEmpty()) {\n // // echo $nuevo->solicitudes;\n // // }\n // }\n\n // // foreach($solicitudes as $solicitud) {\n // // echo($solicitud->id) . '<br><br><br><br>';\n // // }\n\n // if(Auth::user()->hasRole('jefe.area')) {\n // echo 'soy jefe de ' . Auth::user()->managed_area->name;\n // } else {\n // echo 'Me lleva la verga';\n // }\n \n $solicitudes = null;\n if(Auth::user()->hasRole('admin')) {\n $solicitudes = SolicitudPermiso::paginate();\n } else {\n $auth_user_id = Auth::id();\n $solicitudes = SolicitudPermiso::where('user_id', $auth_user_id)\n ->paginate();\n }\n \n return view('solicitudes.index', compact('solicitudes'));\n }", "title": "" }, { "docid": "3ece570b876d38f2616c70f8b23816bc", "score": "0.5609078", "text": "private function getPermisosBotonera()\n\t{\n\t\t$auth = new Zend_Session_Namespace('veoliaZend_Auth');\t\n\t\t$rol = Zend_Registry::get('role');\n\t\t$permisos = array();\n\t\t$permisos[\"edit\"] = ($auth->_acl->isAllowed($rol,\"default:agrupacion\",\"edit\"))? true : false;\n\t\t$permisos[\"add\"] = ($auth->_acl->isAllowed($rol,\"default:agrupacion\",\"add\"))? true : false;\n\t\t$permisos[\"delete\"] = ($auth->_acl->isAllowed($rol,\"default:agrupacion\",\"delete\"))? true : false;\n\t\t$permisos[\"detail\"] = ($auth->_acl->isAllowed($rol,\"default:agrupacion\",\"detail\"))? true : false;\n\t\treturn $permisos;\n\t}", "title": "" }, { "docid": "a4d68f41f2f06f25fbd3de16124d7076", "score": "0.560703", "text": "function crearTareas(){\n\t\t$pre = mysqli_prepare($this->con, \"INSERT INTO tareas(nombre_Usuario,titulo,materia,fecha_entrega,instrucciones) VALUES (?,?,?,?,?)\");\n $pre-> bind_param(\"sssss\",$this->nombre_Usuario,$this->titulo,$this->materia,$this->fecha_entrega,$this->instrucciones);\n $pre-> execute();\n\t}", "title": "" }, { "docid": "b0167d91a1b5165b039c36728ebe7517", "score": "0.56041884", "text": "function ver_editar_persona($es_stakeholder, $idpersona, $idmodulo, $idpersona_compuesto = \"\", $idpersona_tipo = \"\", $tiene_cabecera = \"1\") {\n $seguridad = new Seguridad();\n $ayudante = new Ayudante();\n if ($idpersona_compuesto != \"\") {\n $apersona_compuesto = split(\"---\", $idpersona_compuesto);\n $idpersona = $apersona_compuesto[0];\n $idmodulo = $apersona_compuesto[1];\n }\n\n $persona = new ipersona();\n $apersona = $persona->get_persona($idpersona, $idmodulo);\n if (!!$fila = mysql_fetch_array($apersona)) {\n if ($idpersona_tipo == \"\") {\n // echo \"entra\";\n $idpersona_tipo = $fila[idpersona_tipo];\n }\n if ($idpersona_tipo == 1) {\n if ($es_stakeholder == 1) {\n\n $plantilla = new DmpTemplate(\"../../../plantillas/persona/persona/persona.html\");\n if ($seguridad->verifica_permiso(\"Editar\", \"Stakeholder\", $fila[idusu_c], $fila[idmodulo_c]))\n $plantilla->iniciaBloque(\"editar_sh\");\n } else {\n $plantilla = new DmpTemplate(\"../../../plantillas/persona/persona/persona_rc.html\");\n if ($seguridad->verifica_permiso(\"Editar\", \"Relacionista\", $fila[idusu_c], $fila[idmodulo_c]))\n $plantilla->iniciaBloque(\"editar_rc\");\n }\n } else {\n if ($es_stakeholder == 1) {\n\n $plantilla = new DmpTemplate(\"../../../plantillas/persona/persona/organizacion.html\");\n if ($seguridad->verifica_permiso(\"Editar\", \"Stakeholder\", $fila[idusu_c], $fila[idmodulo_c]))\n $plantilla->iniciaBloque(\"editar_sh\");\n } else {\n $plantilla = new DmpTemplate(\"../../../plantillas/persona/persona/organizacion_rc.html\");\n if ($seguridad->verifica_permiso(\"Editar\", \"Relacionista\", $fila[idusu_c], $fila[idmodulo_c]))\n $plantilla->iniciaBloque(\"editar_rc\");\n }\n }\n\n\n $plantilla->reemplaza(\"op_persona\", \"editar\");\n\n\n $plantilla->reemplaza(\"idpersona\", $idpersona);\n $plantilla->reemplaza(\"idmodulo\", $idmodulo);\n $plantilla->reemplaza(\"idpersona_tipo\", $idpersona_tipo);\n $plantilla->reemplaza(\"es_stakeholder\", $es_stakeholder);\n $plantilla->IniciaBloque(\"ver_ficha\");\n $plantilla->reemplazaEnBloque(\"idpersona\", $idpersona, \"ver_ficha\");\n $plantilla->reemplazaEnBloque(\"idmodulo\", $idmodulo, \"ver_ficha\");\n $plantilla->reemplazaEnBloque(\"idpersona_tipo\", $idpersona_tipo, \"ver_ficha\");\n\n\n $plantilla->reemplaza(\"cambiar_tipo_persona\", \"cambiar_tipo_persona($idpersona, $idmodulo, 0)\");\n //if ($tiene_cabecera == 1) {\n $plantilla->reemplaza(\"clase\", \"class='bloque'\");\n $plantilla->reemplaza(\"tr\", \"thead\");\n //} else {\n // $plantilla->reemplaza(\"clase_celda\", \"class = 'celda_titulo'\");\n // $plantilla->reemplaza(\"tr\", \"tr\");\n //}\n\n $plantilla->reemplaza(\"apaterno\", utf8_encode($fila[apellido_p]));\n $plantilla->reemplaza(\"amaterno\", utf8_encode($fila[apellido_m]));\n $plantilla->reemplaza(\"nombre\", utf8_encode($fila[nombre]));\n\n if (isset($fila[imagen]) && $fila[imagen] != \"\") {\n $plantilla->reemplaza(\"imagen\", \"../../../archivo/\" . $_SESSION['proyecto'] . \"/imagen/\" . $fila[imagen]);\n } else {\n $plantilla->reemplaza(\"imagen\", \"../../../img/imagen.png\");\n }\n\n $max_upload = (int) (ini_get('upload_max_filesize'));\n $max_post = (int) (ini_get('post_max_size'));\n $memory_limit = (int) (ini_get('memory_limit'));\n $upload_mb = min($max_upload, $max_post, $memory_limit);\n\n $plantilla->reemplaza(\"maximo\", $upload_mb);\n\n if ($fila[sexo] == 1) {\n $plantilla->reemplaza(\"checkedM\", \"checked\");\n } else {\n $plantilla->reemplaza(\"checkedF\", \"checked\");\n }\n $plantilla->reemplaza(\"background\", utf8_encode($fila[background]));\n $plantilla->reemplaza(\"comentario\", utf8_encode($fila[comentario]));\n $plantilla->reemplaza(\"fecha_nacimiento\", $fila[fecha_nacimiento]);\n //////tipo\n $persona_tipo = new itipo();\n $tipo_result = $persona_tipo->lista_persona_tipo();\n\n while (!!$fila_tipo = mysql_fetch_array($tipo_result)) {\n\n $plantilla->iniciaBloque(\"persona_tipo\");\n $plantilla->reemplazaEnBloque(\"idtipo\", $fila_tipo[idpersona_tipo], \"persona_tipo\");\n $plantilla->reemplazaEnBloque(\"tipo\", utf8_encode($fila_tipo[tipo]), \"persona_tipo\");\n //echo \"persona tipo\" . $idpersona_tipo;\n\n\n if ($fila_tipo[idpersona_tipo] == $idpersona_tipo) {\n $plantilla->reemplazaEnBloque(\"selected\", \"selected\", \"persona_tipo\");\n }\n }\n }\n//estado civil\n $oestado_civil = new iestado_civil();\n $aestado_civil = $oestado_civil->lista_estado_civil();\n while (!!$fila_civil = mysql_fetch_array($aestado_civil)) {\n $plantilla->iniciaBloque(\"estado_civil\");\n $plantilla->reemplazaEnBloque(\"idestado_civil\", $fila_civil[idpersona_estado_civil], \"estado_civil\");\n $plantilla->reemplazaEnBloque(\"estado_civil\", $fila_civil[descripcion], \"estado_civil\");\n\n\n if ($fila_civil[idpersona_estado_civil] == $fila[idestado_civil]) {\n $plantilla->reemplazaEnBloque(\"selected\", \"selected\", \"estado_civil\");\n }\n }\n //direccion\n $apersona_direccion = $persona->get_persona_direccion($idpersona, $idmodulo);\n $cont = 0;\n while (!!$fila = mysql_fetch_array($apersona_direccion)) {\n\n if ($cont == 0) {\n $plantilla->reemplaza(\"persona_direccion\", utf8_encode($fila[direccion]));\n $plantilla->reemplaza(\"idpersona_direccion\", $fila[idpersona_direccion] . \"***\" . $fila[idmodulo_persona_direccion] . \"***1\");\n } else {\n $plantilla->iniciaBloque(\"direccion\");\n $plantilla->reemplazaEnBloque(\"idpersona_direccion\", $fila[idpersona_direccion] . \"***\" . $fila[idmodulo_persona_direccion] . \"***1\", \"direccion\");\n $plantilla->reemplazaEnBloque(\"persona_direccion\", utf8_encode($fila['direccion']), \"direccion\");\n $plantilla->reemplazaEnBloque(\"i\", $cont, \"direccion\");\n }\n\n $cont++;\n }\n if ($cont == 0) {\n $cont++;\n $plantilla->reemplaza(\"idpersona_direccion\", \"1\");\n }\n $plantilla->reemplaza(\"nume_fila_direccion\", $cont);\n ////telefono\n $apersona_telefono = $persona->get_persona_telefono($idpersona, $idmodulo);\n $cont = 0;\n while (!!$fila = mysql_fetch_array($apersona_telefono)) {\n\n if ($cont == 0) {\n $plantilla->reemplaza(\"persona_telefono\", $fila[telefono]);\n $plantilla->reemplaza(\"idpersona_telefono\", $fila[idpersona_telefono] . \"***\" . $fila[idmodulo_persona_telefono] . \"***1\");\n } else {\n $plantilla->iniciaBloque(\"telefono\");\n $plantilla->reemplazaEnBloque(\"idpersona_telefono\", $fila[idpersona_telefono] . \"***\" . $fila[idmodulo_persona_telefono] . \"***1\", \"telefono\");\n $plantilla->reemplazaEnBloque(\"persona_telefono\", $fila[telefono], \"telefono\");\n $plantilla->reemplazaEnBloque(\"i\", $cont, \"telefono\");\n }\n\n $cont++;\n }\n if ($cont == 0) {\n $cont++;\n $plantilla->reemplaza(\"idpersona_telefono\", \"1\");\n }\n $plantilla->reemplaza(\"nume_fila_telefono\", $cont);\n\n ///////email\n\n $apersona_mail = $persona->get_persona_email($idpersona, $idmodulo);\n $cont = 0;\n while (!!$fila = mysql_fetch_array($apersona_mail)) {\n\n if ($cont == 0) {\n $plantilla->reemplaza(\"persona_mail\", $fila[mail]);\n $plantilla->reemplaza(\"idpersona_mail\", $fila[idpersona_mail] . \"***\" . $fila[idmodulo_persona_mail] . \"***1\");\n } else {\n $plantilla->iniciaBloque(\"mail\");\n $plantilla->reemplazaEnBloque(\"idpersona_mail\", $fila[idpersona_mail] . \"***\" . $fila[idmodulo_persona_mail] . \"***1\", \"mail\");\n\n $plantilla->reemplazaEnBloque(\"persona_mail\", $fila[mail], \"mail\");\n $plantilla->reemplazaEnBloque(\"i\", $cont, \"mail\");\n }\n\n $cont++;\n }\n if ($cont == 0) {\n $cont++;\n $plantilla->reemplaza(\"idpersona_mail\", \"1\");\n }\n $plantilla->reemplaza(\"nume_fila_mail\", $cont);\n\n /////////////organizacion\n $apersona_organizacion = $persona->get_persona_organizacion($idpersona, $idmodulo);\n $cont = 0;\n $cargo = new icargo();\n $result_cargo = $cargo->lista_cargo();\n while (!!$fila = mysql_fetch_array($apersona_organizacion)) {\n\n $plantilla->iniciaBloque(\"organizacion\");\n $plantilla->reemplazaEnBloque(\"idpersona_organizacion\", $fila[idpersona_organizacion] . \"***\" . $fila[idmodulo_persona_organizacion] . \"***1\", \"organizacion\");\n $plantilla->reemplazaEnBloque(\"organizacion\", utf8_encode($fila[apellido_p] . \" (\" . $fila[apellido_m] . \")\"), \"organizacion\");\n $plantilla->reemplazaEnBloque(\"i\", $cont, \"organizacion\");\n mysql_data_seek($result_cargo, 0);\n //echo \"cargo\".$fila[idpersona_cargo];\n while (!!$fila_cargo = mysql_fetch_array($result_cargo)) {\n\n $plantilla->iniciaBloque(\"cargo\");\n $plantilla->reemplazaEnBloque(\"cargo\", utf8_encode($fila_cargo[cargo]), \"cargo\");\n $plantilla->reemplazaEnBloque(\"idcargo\", $fila_cargo[idpersona_cargo], \"cargo\");\n $plantilla->reemplazaEnBloque(\"i\", $cont, \"cargo\");\n\n if ($fila_cargo[idpersona_cargo] == $fila[idpersona_cargo]) {\n $plantilla->reemplazaEnBloque(\"selected\", \"selected\", \"cargo\");\n }\n }\n\n $cont++;\n }\n if ($cont == 0) {\n //$cont++;\n $plantilla->reemplaza(\"idpersona_organizacion\", \"1\");\n }\n $plantilla->reemplaza(\"nume_fila\", $cont);\n\n\n ////////documento de identificacion\n $apersona_documento_identificacion = $persona->get_persona_documento_identificacion($idpersona, $idmodulo);\n $cont = 0;\n $documento_identificacion = new idocumento_identificacion();\n $di_result = $documento_identificacion->lista_documento_identificacion();\n\n while (!!$fila = mysql_fetch_array($apersona_documento_identificacion)) {\n\n mysql_data_seek($di_result, 0);\n if ($cont == 0) {\n //echo $fila[documento_identificacion];\n $plantilla->reemplaza(\"numero_documento\", $fila[documento_identificacion]);\n $plantilla->reemplaza(\"idpersona_documento_identificacion\", $fila[idpersona_documento_identificacion] . \"***\" . $fila[idmodulo_persona_documento_identificacion] . \"***1\");\n\n while (!!$fila_di = mysql_fetch_array($di_result)) {\n\n $plantilla->iniciaBloque(\"documento_identificacion\");\n $plantilla->reemplazaEnBloque(\"documento_identificacion\", $fila_di[documento_identificacion], \"documento_identificacion\");\n $plantilla->reemplazaEnBloque(\"iddocumento_identificacion\", $fila_di[iddocumento_identificacion], \"documento_identificacion\");\n\n if ($fila_di[iddocumento_identificacion] == $fila[iddocumento_identificacion]) {\n $plantilla->reemplazaEnBloque(\"selected\", \"selected\", \"documento_identificacion\");\n }\n }\n } else {\n $plantilla->iniciaBloque(\"item_documento_identificacion\");\n $plantilla->reemplazaEnBloque(\"numero_documento\", $fila[documento_identificacion], \"item_documento_identificacion\");\n $plantilla->reemplazaEnBloque(\"idpersona_documento_identificacion\", $fila[idpersona_documento_identificacion] . \"***\" . $fila[idmodulo_persona_documento_identificacion] . \"***1\", \"item_documento_identificacion\");\n\n $plantilla->reemplazaEnBloque(\"i\", $cont, \"item_documento_identificacion\");\n\n while (!!$fila_di = mysql_fetch_array($di_result)) {\n\n $plantilla->iniciaBloque(\"item_tipo_documento_identificacion\");\n $plantilla->reemplazaEnBloque(\"documento_identificacion\", $fila_di[documento_identificacion], \"item_tipo_documento_identificacion\");\n $plantilla->reemplazaEnBloque(\"iddocumento_identificacion\", $fila_di[iddocumento_identificacion], \"item_tipo_documento_identificacion\");\n if ($fila_di[iddocumento_identificacion] == $fila[iddocumento_identificacion]) {\n $plantilla->reemplazaEnBloque(\"selected\", \"selected\", \"item_tipo_documento_identificacion\");\n }\n }\n }\n $cont++;\n }\n //para el caso que no se haya registrado ningun dni la primera vez\n if ($cont == 0) {\n $cont++;\n $plantilla->reemplaza(\"idpersona_documento_identificacion\", \"1\");\n\n $di_result = $documento_identificacion->lista_documento_identificacion();\n while (!!$fila_di = mysql_fetch_array($di_result)) {\n\n $plantilla->iniciaBloque(\"documento_identificacion\");\n\n $plantilla->reemplazaEnBloque(\"documento_identificacion\", $fila_di[documento_identificacion], \"documento_identificacion\");\n $plantilla->reemplazaEnBloque(\"iddocumento_identificacion\", $fila_di[iddocumento_identificacion], \"documento_identificacion\");\n }\n }\n $plantilla->reemplaza(\"nume_fila_documento_identificacion\", $cont);\n\n //$plantilla->presentaPlantilla();\n return ($plantilla->getPlantillaCadena());\n}", "title": "" }, { "docid": "428ccb84771aa6072b92a82fa1b5c3af", "score": "0.56035745", "text": "function darPuntosPorArea($proyecto)\n {\n //var_dump($proyecto);\n leerClase('Semestre');\n $semestre = new Semestre();\n $puntos = $semestre->getValor('Puntos por &aacute;rea', 100);\n //para cada area del proyecto agregamos un x puntos a los docentes\n foreach ($proyecto->proyecto_area_objs as $proyecto_area) {\n \n $sql = \"SELECT * FROM apoyo WHERE area_id = '{$proyecto_area->area_id}' \";\n $resp = mysql_query($sql); \n if (!$resp)\n return false;\n \n while ($row = mysql_fetch_array($resp)) {\n $this->aumentarPuntosDocente($row['docente_id'], $puntos);\n }\n }\n }", "title": "" }, { "docid": "513263d3cfb3962d79864792289552ca", "score": "0.55996066", "text": "function listar_reg_areas()\n\t{\n\t $area = new Area();\n\t\t$con = new DBmanejador();\n\t\tif($con->conectar()==true)\n\t\t{\n\t\t\t$consulta= \"select id_area,concat(nombres,' ',apellidos) as id_responsable,nombre_area\n from area as a, personal \n where personal_id=id_responsable and a.estado=1 \n order by id_area\";\n\t\t\t$resultado=mysql_query($consulta) or die('La consulta fall&oacute;: ' . mysql_error());\t\n\t\t\tif (!$resultado) return false;\n\t\t\telse\n\t\t\t{ $cont=0;\n\t\t\t\t\twhile($row = mysql_fetch_array($resultado))\n\t\t\t\t\t{\n\t\t\t\t\t$lista[$cont]['id_area'] = $row['id_area'];\n\t\t\t\t\t$lista[$cont]['nombre_area'] = $row['nombre_area'];\n $lista[$cont]['id_responsable'] = $row['id_responsable'];\n\t\t\t\t\t$cont++;\n\t\t\t\t\t}\n\t\t\t\treturn $lista;\n\t\t\t}\t\t\n\t }\n }", "title": "" }, { "docid": "9718fc137fdecfba18d0f5b8ad70e753", "score": "0.559466", "text": "function seguimiento_usuario() {\n\t\t// si los datos han sido enviados por post se sobre escribe la variable $edo\n\t\tif ($_POST) {\n\t\t\t$edo = $this -> input -> post('estado');\n\t\t} else {\n\t\t\t$edo = 'pendientes';\n\t\t}\n\t\t$datos['selec'] = $edo;\n\n\t\t// se obtiene el listado\n\t\t$datos['consulta'] = $this -> conformidades_model -> get_conformidades_usuario($edo);\n\n\t\t// variables necesarias para la página\n\t\t$datos['titulo'] = 'Seguimiento de No Conformidades ';\n\t\t$datos['secciones'] = $this -> Inicio_model -> get_secciones();\n\t\t$datos['identidad'] = $this -> Inicio_model -> get_identidad();\n\t\t$datos['usuario'] = $this -> Inicio_model -> get_usuario();\n\t\t$this -> Inicio_model -> set_sort(15);\n\t\t$datos['sort_tabla'] = $this -> Inicio_model -> get_sort();\n\t\t$datos['selec'] = $edo;\n\n\t\t// estructura de la página\n\t\t$this -> load -> view('_estructura/header', $datos);\n\t\t$this -> load -> view('_estructura/top', $datos);\n\t\t$this -> load -> view('procesos/conformidades/seguimiento_usuario', $datos);\n\t\t$this -> load -> view('_estructura/right');\n\t\t$this -> load -> view('_estructura/footer');\n\t}", "title": "" }, { "docid": "57d57db6cf3f7b2d2390621b627e43f3", "score": "0.55843246", "text": "function asig_proyecto_alquilado_propio() \n {\n // echo 'entraa';\n //listado de proyectos asignados\n $resultado_listado = $this->generar_grafica_model->listado_asignaciones_proyecto();\n $data['listado_proyecto'] = $resultado_listado;\n\n \n $this->load->view('graficas_estadisticas/asignado_proyecto_pro_alq_view', $data);\n }", "title": "" }, { "docid": "bb9438e6988dd018bf79e88b0f72a268", "score": "0.55817235", "text": "protected function private_core() {\n $this->share_extension();\n\n /// ¿El usuario tiene permiso para eliminar autorizados?\n $this->allow_delete = $this->user->allow_delete_on(__CLASS__); \n\n if (isset($_GET['tipo']) AND isset($_GET['cod'])) {\n $this->autorizados = new autorizados(); \n \n /// añadir un autorizado para este proveedor o cliente\n if (isset($_POST['autorizado_nombre'])) {\n if ($_GET['tipo'] == 'proveedor'){\n $this->autorizados->autorizado_codproveedor = $_GET['cod'];\n }else{\n $this->autorizados->autorizado_codcliente = $_GET['cod'];\n }\n $this->autorizados->autorizado_cifnif = $_POST['autorizado_cifnif'];\n $this->autorizados->autorizado_nombre = $_POST['autorizado_nombre'];\n $this->autorizados->autorizado_telefono = $_POST['autorizado_telefono'];\n $this->autorizados->autorizado_concepto = $_POST['autorizado_concepto'];\n if ($_POST['autorizado_fecha'] == '') {\n $this->autorizados->autorizado_fecha = date('d-m-Y');\n } else\n $this->autorizados->autorizado_fecha = $_POST['autorizado_fecha'];\n\n if ($this->autorizados->save()) {\n $this->new_message('Autorizado guardado correctamente.');\n } else\n $this->new_error_msg('Imposible guardar Autorizado.');\n }\n /// eliminar un Autorizado\n else if (isset($_GET['delete_autorizado'])) {\n $autorizado = $this->autorizados->get($_GET['delete_autorizado']);\n\n if ($autorizado) {\n if ($autorizado->delete()) {\n $this->new_message('Autorizado eliminado correctamente.');\n } else\n $this->new_error_msg('Imposible eliminar Autorizado.');\n } else\n $this->new_error_msg('Autorizado no encontrada.');\n }\n \n //Listamos todo para este COD de proveedor o cliente\n if ($_GET['tipo']=='proveedor')\n $this->autorizados_select = $this->autorizados->get_autorizados_proveedor($_GET['cod']);\n else\n $this->autorizados_select = $this->autorizados->get_autorizados_cliente($_GET['cod']);\n }\n }", "title": "" }, { "docid": "b59f181b8a1071195d085a1ad55c7438", "score": "0.55514604", "text": "public function asociativos()\n {\n \treturn [\n \t\t['id' => self::REGULAR, 'texto' => 'Regular'],\n ['id' => self::RECUPERACION, 'texto' => 'Recuperación'],\n \t];\n }", "title": "" }, { "docid": "32c1c19c25b5b275c0d6b3a1430abcbe", "score": "0.5548235", "text": "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t//$this->fecha=$_POST['fecha'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->categoria=$_POST['categoria'];\n\t\t$this->ubicacion=$_POST['ubicacion'];\n\t\t$this->url=$_POST['url'];\n\t\t$this->cliente=$_POST['cliente'];\n\t}", "title": "" }, { "docid": "effe7df1be380a1434bbed72520d0933", "score": "0.5546188", "text": "public function misPreguntas()\n {\n if (isset($this->usuarioActual)) {\n $_SESSION[\"__sesion__herramienta__\"][\"__filtro_texto__\"] = $this->usuarioActual->getNomUsuario();\n $_SESSION[\"__sesion__herramienta__\"][\"__filtro_tipo__\"] = \"autor\";\n }\n $this->view->redirect(\"foro\", \"filtro\");\n }", "title": "" }, { "docid": "e81a00aaace8637d44e4cb32290fb5f4", "score": "0.5542009", "text": "public function addPersonal()\n\t{\n\t\tprint_r($_POST);\n\n\n\t\t$PubasignaModel = new PubasignaModel($db);\n\t\t$PersonalModel = new PersonalModel($db);\n\t\t$request = \\Config\\Services::request();\n\t\tif (empty($request->getPostGet('status'))) {\n\t\t\t$status = 0;\n\t\t} else {\n\t\t\t$status = 1;\n\t\t}\n\t\t$contra = $request->getPostGet('contra');\n\t\t$usuario = $request->getPostGet('usuario');\n\n\t\t$data = array(\n\t\t\t'usuario' => $usuario,\n\t\t\t'contra' => sha1($contra),\n\t\t\t'nomp' => $request->getPostGet('nomp'),\n\t\t\t'app' => $request->getPostGet('app'),\n\t\t\t'email' => $request->getPostGet('email'),\n\t\t\t'idpuesto' => $request->getPostGet('idpuesto'),\n\t\t\t'idedo' => $request->getPostGet('idedo'),\n\t\t\t'idgi' => $request->getPostGet('idgi'),\n\t\t\t'idrc' => $request->getPostGet('idrc'),\n\t\t\t'status' => $status,\n\t\t\t'idrg' => $request->getPostGet('idrg'),\n\t\t\t'edita' => session('idp')\n\t\t);\n\t\tif ($PersonalModel->save($data) === false) {\n\t\t\t$resp = 0;\n\t\t} else {\n\t\t\t$resp = 1;\n\t\t}\n\t\tif ($request->getPostGet('idrg') == 4) {\n\t\t\t$ultimoregistro = $this->db->query(\"SELECT * FROM personal WHERE usuario='$usuario'\");\n\t\t\t$ultimo = $ultimoregistro->getRow();\n\t\t\techo \"ultimo registro\" . $ultimo->idp;\n\t\t\t$menu = $_POST[\"menu\"];\n\n\t\t\tfor ($i = 0; $i < count($menu); $i++) {\n\t\t\t\t$datos = array(\n\t\t\t\t\t'idp' => $ultimo->idp,\n\t\t\t\t\t//'idp' =>5,\n\t\t\t\t\t'idm' => $menu[$i],\n\t\t\t\t\t'status' => 1,\n\t\t\t\t\t'edita' => session('idp')\n\t\t\t\t);\n\t\t\t\techo \"<br>\";\n\t\t\t\t//print_r($datos);\n\n\t\t\t\t$PubasignaModel->save($datos);\n\t\t\t\t//echo \"<br> menu \" . $i . \": \" . $menu[$i];\n\t\t\t}\n\t\t}\n\t\techo $resp;\n\t}", "title": "" }, { "docid": "ff9d80bc2c5756a1b64bb08cc8ac788d", "score": "0.55309904", "text": "function rellenar_atributos($usuariogrupo_validaciones){\n $usuariogrupo_validaciones->tipo_participacion=$this->tipo_participacion;\n $usuariogrupo_validaciones->username=$this->username;\n $usuariogrupo_validaciones->ecoins=$this->ecoins;\n\n\n }", "title": "" }, { "docid": "c28134480ce001b6f6639e718e2d72b4", "score": "0.5529967", "text": "public function profil()\n {\n $data = [\n 'title' => \"Profil Saya\",\n 'admin' => $this->main_m->view_where('tb_user', ['user_id' => $this->sesi->user_login()->user_id])->row()\n ];\n $this->template->load('template','administrator/pengaturan/profil', $data);\n // $this->template->load('template', 'administrator/pangaturan/profil');\n }", "title": "" }, { "docid": "49005d9e0477b02531c019cd02e3bac3", "score": "0.551899", "text": "public function index()\n {\n if(Auth::user()->rol_id == 3){\n $procesos_p = Proceso::all();\n $procesos_personales = ProcesoPersonal::all();\n }elseif (Auth::user()->rol_id == 1) {\n $procesos_p = Proceso::all();\n $procesos_personales = ProcesoPersonal::where('id_plantel', Auth::user()->id_plantel)->get();\n }else{\n $procesos_p = Auth::user()->procesos;\n $arreglo_subprocesos = array();\n foreach($procesos_p as $proceso)\n {\n $subproceso = $proceso->subprocesos;\n array_push($arreglo_subprocesos, $subproceso);\n }\n \n $procesos_personales = ProcesoPersonal::where('id_usuario', '=', Auth::user()->id)->get();\n }\n return view('administrador.personales.index', compact('procesos_personales','procesos_p'));\n }", "title": "" }, { "docid": "31d0b1996cc122c9c6fa1409d7c03e4c", "score": "0.551099", "text": "function getDatosPersonalesBool($tipo_carga) {\n imprimeConsola(\"getDatosEspecificosBool, tipo_carga:$tipo_carga\");\n if ($tipo_carga == \"tutores\" || $tipo_carga == \"gestores\") {\n return array(\n \"nombre_pila\" => false,\n \"primer_apellido\" => false,\n \"segundo_apellido\" => false,\n \"nombre_usuario\" => false,\n \"correo\" => false,\n \"contrasena\" => false,\n \"fecha_nacimiento\" => false,\n \"codigo_postal\" => false,\n \"entidad_federativa\" => false,\n \"telefono_fijo\" => false,\n \"telefono_movil\" => false);\n } else {\n return array(\n \"nombre_pila\" => false,\n \"primer_apellido\" => false,\n \"segundo_apellido\" => false,\n \"nombre_usuario\" => false,\n \"correo\" => false,\n \"contrasena\" => false,\n \"fecha_nacimiento\" => false,\n \"curp\" => false,\n \"codigo_postal\" => false,\n \"calle\" => false,\n \"no_casa_ext\" => false,\n \"no_casa_int\" => false,\n \"colonia_localidad\" => false,\n \"delegacion_municipio\" => false,\n \"entidad_federativa\" => false,\n \"nacionalidad\" => false,\n \"zona_horaria\" => false,\n \"telefono_fijo\" => false,\n \"telefono_movil\" => false);\n }\n}", "title": "" }, { "docid": "9f9f70904de4beae91e4f40876204662", "score": "0.5499809", "text": "public function opcion1()\n\t{\n\t\t$selected_project = $this->input->post('selected_project');\n\n\t\t// si me lo pasaron por post es porque vengo del listado de obras y lo seteo en la sesion\n\t\tif($selected_project)\n\t\t{\n\t\t\t$data = unserialize($this->session->userdata('session_user'))->setSelectedProject($selected_project);\n\t\t\t$this->session->set_userdata('session_user', serialize($data));\n\t\t}\n\t\t// si no me lo pasan por post es porque vengo de las otras vistas y tengo que recuperarlo de la sesion\n\t\telse\n\t\t{\n\t\t\t$selected_project = unserialize($this->session->userdata('session_user'))->getSelectedProject();\n\t\t}\n\n\t\t$this->load->view('proj_details_external');\n\t}", "title": "" }, { "docid": "332e7347826027d9b0db0ac03036cf21", "score": "0.5498779", "text": "private function camposObligatorios()\n {\n $this->setRequiredField(\"apellidos\");\n\n return;\n }", "title": "" }, { "docid": "45cdd5dd63b38d04f2ea410463559784", "score": "0.54970706", "text": "private function getPossibleSelectValuesForUserPersonal() {\n $translator = $this->container->get('translator');\n $constants = (new \\ReflectionClass('Core\\UserBundle\\Entity\\UserPersonal'))->getConstants();\n $selectableFields = array(\n UserPersonal::FIELD_BODY_SHAPE => array(),\n UserPersonal::FIELD_EYE_COLOR => array(),\n UserPersonal::FIELD_HAIR_COLOR => array(),\n UserPersonal::FIELD_HAIR_LENGTH => array(),\n UserPersonal::FIELD_SEARCHING_FOR => array(),\n UserPersonal::FIELD_WANT_TO => array(),\n );\n\n foreach ($constants as $name => $value) {\n if (strpos($name, 'BODY_SHAPE') !== false && strpos($name, 'FIELD') === false) {\n $selectableFields[UserPersonal::FIELD_BODY_SHAPE][] = array(\n 'text' => $translator->trans('personal.body_shape.' . $this->camelCaseToUnderScore($value), array(), 'profile'),\n 'value' => $value,\n );\n } elseif (strpos($name, 'EYE_COLOR') !== false && strpos($name, 'FIELD') === false) {\n $selectableFields[UserPersonal::FIELD_EYE_COLOR][] = array(\n 'text' => $translator->trans('personal.eye_color.' . $this->camelCaseToUnderScore($value), array(), 'profile'),\n 'value' => $value,\n );\n } elseif (strpos($name, 'HAIR_COLOR') !== false && strpos($name, 'FIELD') === false) {\n $selectableFields[UserPersonal::FIELD_HAIR_COLOR][] = array(\n 'text' => $translator->trans('personal.hair_color.' . $this->camelCaseToUnderScore($value), array(), 'profile'),\n 'value' => $value,\n );\n } elseif (strpos($name, 'HAIR_LENGTH') !== false && strpos($name, 'FIELD') === false) {\n $selectableFields[UserPersonal::FIELD_HAIR_LENGTH][] = array(\n 'text' => $translator->trans('personal.hair_length.' . $this->camelCaseToUnderScore($value), array(), 'profile'),\n 'value' => $value,\n );\n } elseif (strpos($name, 'SEARCHING_FOR') !== false && strpos($name, 'FIELD') === false) {\n $selectableFields[UserPersonal::FIELD_SEARCHING_FOR][] = array(\n 'text' => $translator->trans('personal.searching_for.' . $this->camelCaseToUnderScore($value), array(), 'profile'),\n 'value' => $value,\n );\n } elseif (strpos($name, 'WANT_TO') !== false && strpos($name, 'FIELD') === false) {\n $selectableFields[UserPersonal::FIELD_WANT_TO][] = array(\n 'text' => $translator->trans('personal.want_to.' . $this->camelCaseToUnderScore($value), array(), 'profile'),\n 'value' => $value,\n );\n }\n }\n\n return $selectableFields;\n }", "title": "" }, { "docid": "3cf995c50e8793f74c86b5dcb7738e8b", "score": "0.5494093", "text": "private function instituciones_usuarios() {\n $instituciones_tipos = [\n //$this->escuelas_tecnicas,\n //$this->centros_formacion_profesional\n ];\n\n foreach ($instituciones_tipos as $instituciones) {\n foreach ($instituciones as $data_institucion) {\n $institucion = Institucion::create($data_institucion['institucion']);\n\n foreach ($data_institucion['usuarios'] as $data_usuario) {\n $data_usuario['password'] = bcrypt($data_usuario['password']);\n $institucion->users()->create($data_usuario); // crea usuario y relaciona con institucion\n }\n }\n }\n }", "title": "" }, { "docid": "55315f6877faf0f395dc2805aa0ffe77", "score": "0.54677826", "text": "private function seter($tipoAccion){\r\n $campos_valores = []; \r\n $campos_valores_where = [];\r\n\r\n if ($tipoAccion != \"-\"){\r\n $campos_valores = [\"descripcion\"=>$this->getDescripcion(),\r\n \"estado_acceso\"=>$this->getEstadoAcceso()];\r\n\r\n if ($tipoAccion == \"+\"){\r\n $campos_valores[\"cod_perfil\"] = $this->getCodPerfil();\r\n }\r\n }\r\n\r\n if ($tipoAccion != \"+\"){\r\n $campos_valores_where = [\"cod_perfil\"=>$this->getCodPerfil()];\r\n if ($tipoAccion == \"-\"){\r\n $campos_valores = [\"estado_mrcb\"=>\"false\"];\r\n }\r\n }\r\n\r\n $campos = [\"valores\"=>$campos_valores,\"valores_where\"=>$campos_valores_where];\r\n return $campos;\r\n }", "title": "" }, { "docid": "b0fdcf175d10c55fcbd9e2dafb54df09", "score": "0.54667383", "text": "function cl_orcprojeto() {\n\t\t//classes dos rotulos dos campos\n\t\t$this->rotulo = new rotulo(\"orcprojeto\");\n\t\t$this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n\t}", "title": "" }, { "docid": "a49cb0f31f57458fa937ca2a087315a7", "score": "0.54644483", "text": "public function getUtenti();", "title": "" }, { "docid": "84373111de89ecfbd9a7cc1740f9d661", "score": "0.54619664", "text": "public function asociativos()\n {\n \treturn [\n ['id' => self::TODO, 'texto' => 'Todo'],\n ['id' => self::REGISTRADO, 'texto' => 'Registrado'],\n ['id' => self::ACTUALIZADO, 'texto' => 'Actualizado'],\n ['id' => self::ELIMINADO, 'texto' => 'Eliminado'],\n \t];\n }", "title": "" }, { "docid": "e0b69825fe20011ffcabbd891cb64d77", "score": "0.54503304", "text": "public static function getPublicProperties(){\n return array('nombre','apellido','email','codigo','materia');\n }", "title": "" }, { "docid": "86203d516121b634ed6852282b951d6c", "score": "0.5450059", "text": "private function iniciarValoresPadrao(){\n $this->lang = 'pt-br'; // idioma da pagina\n $this->robots_noindex_follow = false;\n $this->title = 'Arthur Assunção'; // titulo da pagina\n $this->description = 'Arthur Assunção'; // descricao da pagina\n $this->keywords = 'Arthur Assunção, Instituto Federal do Sudeste de Minas Gerais, Barbacena, Sistemas para Internet, Programação'; /* keywords da pagina */\n $this->canonical = NULL; // link canonial da pagina\n $this->tags_head_extra = (isset($tags_head_extra)) ? $tags_head_extra : ''; // permite adicionar outras tags no head\n $this->body_onload = '';\n $this->exibir_so_conteudo = false;\n\n $this->embedded_css = '';\n $this->embedded_js_footer = '';\n $this->embedded_js_header = '';\n }", "title": "" }, { "docid": "d511f5872e0c2de86d018e3ea8e7342c", "score": "0.54408884", "text": "private function adicionar() {\n //busca aos lancamentos\n $categorias = $this->model->getCategorias();\n //busca as receitas\n $receitas = $this->model->getReceitas();\n //seta as categorias para a view\n $this->view->setCategorias($categorias);\n //seta as categorias para a view\n $this->view->setReceitas($receitas);\n //passa a tela de adicionar\n $file = $this->templates . 'adicionar.php';\n \n //retorna o conteudo da tela adicionar para o usuario\n $this->telaUser = $this->view->retornaTela($file);\n }", "title": "" }, { "docid": "ed0bbc450638d20e32f76b23539c928a", "score": "0.5438242", "text": "private function createVariousTranslationsFields()\n {\n // update vlastne asi neslo, neco je totiz textarea :)\n\n return [\n //new TranslationInputText('var_form_login_title', 'Nadpis přihlašovacího formuláře'),\n\n // Contact form and sign up\n new TranslationInputText('have_you_got_question', 'Máte dotaz?'),\n new TranslationInputText('name', 'Jméno'),\n new TranslationInputText('surname', 'Příjmení'),\n new TranslationInputText('your_email', 'Váš e-mail'),\n new TranslationInputText('send_message', 'Odeslat zprávu'),\n new TranslationInputText('birth_date', 'Datum narození'),\n new TranslationInputText('city', 'Město'),\n new TranslationInputText('street', 'Ulice'),\n new TranslationInputText('zip', 'PSČ'),\n new TranslationInputText('password', 'Heslo'),\n new TranslationInputText('password_confirmation', 'Potvrzení hesla'),\n new TranslationInputText('join_charming_rewards', 'Připojit se k Charming Rewards'),\n new TranslationInputText('sign_in', 'Přihlásit se'),\n new TranslationInputText('field_required', 'Tato položka je povinná'),\n new TranslationInputText('passwords_dont_match', 'Hesla se neshodují'),\n\n // Online reservation\n new TranslationInputText('booking_hotel', 'Rezervace hotelu'),\n new TranslationInputText('any_hotel', 'Jakýkoliv hotel'),\n new TranslationInputText('arrival', 'Příjezd'),\n new TranslationInputText('departure', 'Odjezd'),\n new TranslationInputText('check_availability', 'Zjistit dostupnost'),\n\n\n\n\n // Hotel\n new TranslationInputText('share_this_hotel', 'Sdílet tento hotel'),\n new TranslationInputText('other_advantages', 'Další výhody'),\n new TranslationInputText('more_information', 'Více informací'),\n new TranslationInputText('your_promo_code', 'Váš promo kód'),\n new TranslationInputText('click_here_to_apply', 'Click here to apply'),\n\n\n // Ostatni\n new TranslationInputText('contact', 'Kontakt'),\n new TranslationInputText('please_select_the_hotel_you_are_interested_in', 'Prosím vyberte si hotel o který máte zájem'),\n new TranslationInputText('download_all_photos', 'Stáhnout všechny fotky'),\n\n\n // Polozky v menu - fiksme prelozit\n new TranslationInputText('home', 'Home'),\n new TranslationInputText('hotels_we_operate', 'Hotels we operate'),\n new TranslationInputText('charming_rewards', 'Charming rewards'),\n new TranslationInputText('login_join_charming_rewards', 'Login/Join Charming rewards'),\n new TranslationInputText('levels_and_benefits', 'Levels and benefits'),\n new TranslationInputText('membership', 'Membership'),\n new TranslationInputText('earning_points', 'Earning Points'),\n new TranslationInputText('rewards', 'Rewards'),\n new TranslationInputText('customer_service', 'Zákaznický servis'),\n new TranslationInputText('for_travel_agents', 'For travel agents'),\n new TranslationInputText('language', 'Jazyk'),\n\n ];\n }", "title": "" }, { "docid": "62238f5aadafe2efde12fc547eb51370", "score": "0.54322386", "text": "public function index()\n\t{\n //agegado por nico\n $userId = Auth::user()->id;\n $user = Auth::user()->username;\n $userPerfil = Auth::user()->perfil;\n $userName = Auth::user()->nombreyapellido;\n\t\t$titulaciones = $this->titulacion->all();\n \n if($userPerfil != 'Administrador'){\n return Redirect::action('HomeController@bienvenido')\n ->with('message','No tiene los privilegios sufientes para acceder a esa sección!.');\n }else{\n return View::make('titulacion.index', compact('titulaciones'))->with('perfil',$userPerfil)->with('user',$user);\n }\n\t}", "title": "" }, { "docid": "377f66e5ede4a777173c6693a24c0e6e", "score": "0.54319805", "text": "function boutique_autoriser(){}", "title": "" }, { "docid": "ee42f04ca667631fc3bcdbb65e324b5d", "score": "0.54303145", "text": "public function registracija()\n {\n $this->prikaz(\"registracijaTip\", []);\n }", "title": "" }, { "docid": "d5cb8e309bb2160f6c08ba6376d43ea7", "score": "0.5425586", "text": "public static function amigosConectados() {\n global $sql, $sesion_usuarioSesion, $textos, $configuracion;\n\n $tablas = array(\n \"c\" => \"contactos\",\n \"uc\" => \"usuarios_conectados\",\n \"u\" => \"usuarios\",\n \"p\" => \"personas\",\n \"i\" => \"imagenes\"\n );\n\n $columnas = array(\n \"id_contacto1\" => \"c.id_usuario_solicitante\",\n \"id_contacto2\" => \"c.id_usuario_solicitado\",\n \"estado\" => \"c.estado\",\n \"id_usuario\" => \"uc.id_usuario\",\n \"visible\" => \"uc.visible\",\n \"sobrenombre\" => \"u.sobrenombre\",\n \"usuario\" => \"u.usuario\",\n \"imagen\" => \"i.ruta\"\n );\n\n $condicion = \"(c.id_usuario_solicitante = \" . $sesion_usuarioSesion->id . \" AND c.id_usuario_solicitado = uc.id_usuario AND c.estado = '1' AND uc.id_usuario = u.id AND u.id_persona = p.id AND p.id_imagen = i.id AND uc.visible = '1') OR (c.id_usuario_solicitado = \" . $sesion_usuarioSesion->id . \" AND c.id_usuario_solicitante = uc.id_usuario AND c.estado = '1' AND uc.id_usuario = u.id AND u.id_persona = p.id AND p.id_imagen = i.id AND uc.visible = '1')\";\n\n //$sql->depurar = true;\n $consulta = $sql->seleccionar($tablas, $columnas, $condicion);\n if ($sql->filasDevueltas) {\n while ($contacto = $sql->filaEnObjeto($consulta)) {\n $contacto->foto = $configuracion[\"SERVIDOR\"][\"media\"] . $configuracion[\"RUTAS\"][\"imagenesMiniaturas\"] . \"/\" . $contacto->imagen;\n $lista[] = $contacto;\n }\n\n foreach ($lista as $elemento) {\n $item = HTML::enlace(HTML::imagen($elemento->foto, \"flotanteIzquierda margenDerecha miniaturaListaChat\"), '/users/' . $elemento->usuario);\n $opciones = array(\"onClick\" => \"javascript:chatWith('\" . $elemento->usuario . \"')\");\n $item .= HTML::enlace(HTML::frase($elemento->sobrenombre, \"claseUsuariosConectados margenSuperior\", \"usuarioChat_\" . $elemento->usuario), \"javascript:void(0)\", 'margenSuperior', \"\", $opciones);\n $listaContactos[] = $item;\n }\n\n $listaContactos = HTML::lista($listaContactos, \"listaVertical listaConIconos bordeSuperiorLista\", \"\", \"\");\n $codigo = HTML::contenedor($listaContactos, \"contenedorChat\");\n\n return $codigo;\n } else {\n return $textos->id(\"NO_HAY_CONTACTOS_CONECTADOS\");\n }\n }", "title": "" }, { "docid": "259d7f5b1b8f0b0b89842f2962d19f20", "score": "0.5420887", "text": "public function configuraciones(){\n if ($this->session->userdata(\"is_logged\") && $this->session->userdata('perfil') == 5) {\n $datos = $this->usuario->MostrarPerfil($this->session->userdata('documento'));\n $dinamica = $this->load->view('content/defecto/configuraciones',['datos'=>$datos],true);\n $this->Plantilla_Administrador($dinamica);\n }else{\n show_404();\n }\n }", "title": "" }, { "docid": "1021ec1859f1f371e9548bb63f99edaa", "score": "0.5407952", "text": "public function agregarAdministradorControlador()\n\t\t{\n\t\t\t//Administrador\n\t\t\t$dni = modeloPrincipal::limpiarCadena($_POST['dni-reg']);\n\t\t\t$nombre = modeloPrincipal::limpiarCadena($_POST['nombre-reg']);\n\t\t\t$apellido = modeloPrincipal::limpiarCadena($_POST['apellido-reg']);\n\t\t\t$telefono = modeloPrincipal::limpiarCadena($_POST['telefono-reg']);\n\t\t\t$direccion = modeloPrincipal::limpiarCadena($_POST['direccion-reg']);\n\n\t\t\t//Cuenta\n\t\t\t$usuario = modeloPrincipal::limpiarCadena($_POST['usuario-reg']);\n\t\t\t$password1 = modeloPrincipal::limpiarCadena($_POST['password1-reg']);\n\t\t\t$password2 = modeloPrincipal::limpiarCadena($_POST['password2-reg']);\n\t\t\t$email = modeloPrincipal::limpiarCadena($_POST['email-reg']);\n\t\t\t$genero = modeloPrincipal::limpiarCadena($_POST['optionsGenero']);\n\n\t\t\t$privilegio = modeloPrincipal::desencriptar($_POST['optionsPrivilegio']);\n\t\t\t$privilegio = modeloPrincipal::limpiarCadena($privilegio);\n\n\n\t\t\tif ($genero == \"Masculino\") \n\t\t\t{\n\t\t\t\t$foto = \"Male3Avatar.png\";\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\t$foto = \"Female2Avatar.png\";\n\t\t\t}\n\n\t\t\tif ($privilegio<1 || $privilegio >3 ) {\n\t\t\t\t$alerta = [\n\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\"Texto\" => \"El NIVEL DE PRIVILEGIO es incorrecto, verifique nuevamente\",\n\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t];\n\t\t\t} else {\n\t\t\t\tif ($password1 != $password2) {\n\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\"Texto\" => \"Contraseñas NO coinciden, verifique nuevamente\",\n\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$consultaDNI = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT AdminDNI FROM admin WHERE AdminDNI='$dni'\");\n\n\t\t\t\t\tif ($consultaDNI->rowCount()>=1) {\n\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\"Texto\" => \"El DNI ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif($email != \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$consultaEmail = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT CuentaEmail FROM cuenta WHERE CuentaEmail='$email'\");\n\t\t\t\t\t\t\t$resultadoEmail = $consultaEmail->rowCount();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$resultadoEmail = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($resultadoEmail >= 1) {\n\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\"Texto\" => \"El EMAIL ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$consultaUsuario = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT CuentaUsuario FROM cuenta WHERE CuentaUsuario='$usuario'\");\n\t\t\t\t\t\t\tif($consultaUsuario->rowCount() >= 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\"Texto\" => \"El USUARIO ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t];\t\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$consultaID = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT id FROM cuenta\");\n\n\t\t\t\t\t\t\t\t$numero = ($consultaID->rowCount())+1;\n\n\t\t\t\t\t\t\t\t$codigo = modeloPrincipal::generarCodigo(\"LM\", 5, $numero);\n\n\t\t\t\t\t\t\t\t$clave = modeloPrincipal::encriptar($password1);\n\n\t\t\t\t\t\t\t\t$datosCuenta = [\n\t\t\t\t\t\t\t\t\t\"Codigo\" => $codigo,\n\t\t\t\t\t\t\t\t\t\"Privilegio\" => $privilegio,\n\t\t\t\t\t\t\t\t\t\"Usuario\" => $usuario,\n\t\t\t\t\t\t\t\t\t\"Clave\" => $clave,\n\t\t\t\t\t\t\t\t\t\"Email\" => $email,\n\t\t\t\t\t\t\t\t\t\"Estado\" => \"Activo\",\n\t\t\t\t\t\t\t\t\t\"Tipo\" => \"Administrador\",\n\t\t\t\t\t\t\t\t\t\"Genero\" => $genero,\n\t\t\t\t\t\t\t\t\t\"Foto\" => $foto\n\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t\t$cuentaAgregada = modeloPrincipal::agregarCuenta($datosCuenta);\n\n\t\t\t\t\t\t\t\tif ($cuentaAgregada)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$datosAdministrador = [\n\t\t\t\t\t\t\t\t\t\t\"DNI\" => $dni,\n\t\t\t\t\t\t\t\t\t\t\"Nombre\" => $nombre,\n\t\t\t\t\t\t\t\t\t\t\"Apellidos\" => $apellido,\n\t\t\t\t\t\t\t\t\t\t\"Telefono\" => $telefono,\n\t\t\t\t\t\t\t\t\t\t\"Direccion\" => $direccion,\n\t\t\t\t\t\t\t\t\t\t\"Codigo\" => $codigo\n\t\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t\t\t$administradorAgregado = administradorModelo::agregarAdministradorModelo($datosAdministrador);\n\n\t\t\t\t\t\t\t\t\tif ($administradorAgregado)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"limpiar\",\n\t\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Éxito\",\n\t\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"El administrador registrado con éxito\",\n\t\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"success\"\n\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tmodeloPrincipal::eliminarCuenta($codigo);\n\n\t\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"El ADMINISTRADOR NO pudo ser registrado. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\n\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{\n\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"La CUENTA NO pudo ser registrada. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\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\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\treturn modeloPrincipal::mostrarAlerta($alerta);\n\t\t}", "title": "" }, { "docid": "b3139732dda2176914815ae9a80249cc", "score": "0.5407724", "text": "function tukarpassword() \n\t{\n\t\t$this->papar->tawaran = $this->tanya->tawaran();\n\t\t$this->papar->terkini = $this->tanya->terkini();\n\t\t$this->papar->terlaris = $this->tanya->terlaris();\n\t\t$this->papar->daftarAkaun = $this->tanya->daftar();\n\t\t$this->papar->loginMasuk = $this->tanya->login();\n\t\t$this->papar->ingatPassword = $this->tanya->ingat();\n\n\t\t# pergi papar kandungan\n\t\t$this->papar->baca('index/tukarpassword'); // untuk twitter bootstrap\n\t\t//$this->papar->baca('index/index'); // untuk twitter bootstrap\n\t\t//$this->papar->baca('index/index', 1 ); // tanpa twitter bootstrap\n\t\t//$this->papar->baca('index/index', 'mobile');\n\t}", "title": "" }, { "docid": "6ba06ea058552be28963c08c5c8f4698", "score": "0.5406034", "text": "function getTareasTutor($mysqli,$tutor){ //Sin comprobar\n // $usuario=getUsuario($mysqli,$tutor);\n\n // $cod_usuario = $usuario['cod_usuario'];\n\n $sql=\"SELECT * FROM TAREA T inner join USUARIO U on (T.realiza=U.cod_usuario) WHERE T.crea='$tutor' ORDER BY T.realizada, T.corregida\";\n \n $res = $mysqli->query($sql);\n\n $resultado = array();\n\n if ($res->num_rows > 0) {\n while($row = $res->fetch_array()) {\n $resultado[] = $row;\n }\n }\n\n return $resultado;\n }", "title": "" }, { "docid": "78b55e27c3e3b1ea9fcbaec165d615f4", "score": "0.5402648", "text": "public function niveles_acceso()\n {\n try\n {\n $this->db->schema = 'sistema';\n //pr($this->db->list_tables()); //Muestra el listado de tablas pertenecientes al esquema seleccionado\n\n $crud = $this->new_crud();\n $crud->set_table('roles');\n\n\n $crud->columns('nombre', 'descripcion', 'orden', 'activo');\n $crud->fields('nombre', 'descripcion', 'orden', 'activo');\n \n $crud->change_field_type('activo', 'true_false', array(0 => 'Inactivo', 1 => 'Activo')); \n\n $output = $crud->render();\n $main_content = $this->load->view('catalogo/gc_output', $output, true);\n $this->template->setMainContent($main_content);\n $this->template->getTemplate();\n } catch (Exception $e)\n {\n show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());\n }\n }", "title": "" }, { "docid": "4498fe6411cf7eb8edef60f5fe22825d", "score": "0.54000336", "text": "private function cargarPropiedades() {\n $aDa = array();\n $per = $this->getCodigo();\n $res = Funciones::gEjecutarSQL(\"SELECT P.CODAPAR,CONCAT('Portal ',A.PORTAL,'-',PISO,LETRA) AS APARTAMENTO,P.BAJA,DATE_FORMAT(P.BAJA,'%d-%m-%Y') AS FECHA,P.ORDEN FROM PROPIETARIOS P LEFT JOIN APARTAMENTOS A ON P.CODAPAR=A.CODAPAR WHERE P.CODPERS='$per' ORDER BY ifnull(P.BAJA,'9999-99-99') DESC,P.ORDEN\");\n while($aRow = $res->fetch(PDO::FETCH_ASSOC)) {\n $aDa[$aRow['CODAPAR']] = array($aRow['APARTAMENTO'], $aRow['BAJA'], $aRow['FECHA'], $aRow['ORDEN']);\n }\n $res->closeCursor();\n $this->aPropiedades = $aDa;\n }", "title": "" }, { "docid": "161bf8918084ce66b24676423d8258bc", "score": "0.5398923", "text": "public function getNombresDeVariables() {\n\n\n //las variables que genera para el usuario\n foreach ($this->Tareas as $tarea) {\n\n //los campos que generarn variables y aplica a reporte\n foreach ($tarea->Pasos as $p) {\n foreach ($p->Formulario->Campos as $campo) {\n if ($campo->reporte) {\n if (!in_array($campo->nombre, $result)) {\n $result[] = $campo->nombre;\n }\n if (($campo->tipo == 'radio') || ($campo->tipo == 'select') || ($campo->tipo == 'checkbox')) {\n if (!in_array($campo->nombre . '__etiqueta', $result)) {\n $result[] = $campo->nombre . '__etiqueta';\n }\n }\n }\n\n //si un formulario tienen pasarela de pagos de ANTEL dejamos disponibles las variables que genera\n //pasarela de pago\n if ($campo->tipo == 'pagos') {\n foreach ($this->Acciones as $accion) {\n if ($accion->id == $campo->valor_default) {\n $pasarela = $accion->extra;\n break;\n }\n }\n\n if (!isset($pasarela->metodo)) {\n $metodo_pasarela = 'antel';\n } else {\n $metodo_pasarela = $pasarela->metodo;\n }\n\n if ($pasarela && $metodo_pasarela == 'antel') {\n if (!in_array('Solicitud_IdSolicitud', $result)) {\n $result[] = 'Solicitud_IdSolicitud';\n }\n if (!in_array('Solicitud_IdEstado', $result)) {\n $result[] = 'Solicitud_IdEstado';\n }\n if (!in_array('Solicitud_Fecha', $result)) {\n $result[] = 'Solicitud_Fecha';\n }\n if (!in_array('Solicitud_Transaccion', $result)) {\n $result[] = 'Solicitud_Transaccion';\n }\n if (!in_array('Solicitud_Autorizacion', $result)) {\n $result[] = 'Solicitud_Autorizacion';\n }\n if (!in_array('Solicitud_IdFormaPago', $result)) {\n $result[] = 'Solicitud_IdFormaPago';\n }\n if (!in_array('Solicitud_FechaConciliacion', $result)) {\n $result[] = 'Solicitud_FechaConciliacion';\n }\n if (!in_array('Solicitud_ValorTasa', $result)) {\n $result[] = 'Solicitud_ValorTasa';\n }\n if (!in_array('Solicitud_IdTramite', $result)) {\n $result[] = 'Solicitud_IdTramite';\n }\n if (!in_array('Solicitud_ImporteTasa1', $result)) {\n $result[] = 'Solicitud_ImporteTasa1';\n }\n if (!in_array('Solicitud_ImporteTasa2', $result)) {\n $result[] = 'Solicitud_ImporteTasa2';\n }\n if (!in_array('Solicitud_ImporteTasa3', $result)) {\n $result[] = 'Solicitud_ImporteTasa3';\n }\n\n if (!in_array('Solicitud_FechaVto', $result)) {\n $result[] = 'Solicitud_FechaVto';\n }\n\n if (!in_array('Solicitud_CodDesglose', $result)) {\n $result[] = 'Solicitud_CodDesglose';\n }\n\n if (!in_array('Solicitud_MontoDesglose', $result)) {\n $result[] = 'Solicitud_MontoDesglose';\n }\n\n if (!in_array('Solicitud_DesRechazo', $result)) {\n $result[] = 'Solicitud_DesRechazo';\n }\n\n if (!in_array('Solicitud_Ventanilla', $result)) {\n $result[] = 'Solicitud_Ventanilla';\n }\n\n if (!in_array('Solicitud_DesError', $result)) {\n $result[] = 'Solicitud_DesError';\n }\n\n if (!in_array('Solicitud_Mensaje', $result)) {\n $result[] = 'Solicitud_Mensaje';\n }\n } elseif ($pasarela && $metodo_pasarela == 'generico') {\n //se busca la accion\n $pasarela_generica = Doctrine_Query::create()\n ->from('PasarelaPagoGenerica pg')\n ->where('pg.id = ?', $pasarela->pasarela_pago_generica_id)\n ->fetchOne();\n\n if ($pasarela_generica->codigo_operacion_soap) {\n $operacion_soap = Doctrine_Query::create()\n ->from('WsOperacion op')\n ->where('op.codigo = ?', $pasarela_generica->codigo_operacion_soap)\n ->fetchOne();\n\n $respuestas = json_decode($operacion_soap->respuestas);\n foreach ($respuestas->respuestas as $resp) {\n if (!in_array($resp->key, $result)) {\n $result[] = $resp->key;\n }\n }\n }\n\n if ($pasarela_generica->codigo_operacion_soap_consulta) {\n $operacion_soap_consulta = Doctrine_Query::create()\n ->from('WsOperacion op')\n ->where('op.codigo = ?', $pasarela_generica->codigo_operacion_soap_consulta)\n ->fetchOne();\n\n $respuestas = json_decode($operacion_soap_consulta->respuestas);\n foreach ($respuestas->respuestas as $resp) {\n if (!in_array($resp->key, $result)) {\n $result[] = $resp->key;\n }\n }\n }\n if ($pasarela->url_redireccion) {\n if (!filter_var($pasarela->url_redireccion, FILTER_VALIDATE_URL)) {\n $codigo_operacion_post = $pasarela->url_redireccion;\n\n $operacion_post = Doctrine_Query::create()\n ->from('WsOperacion o')\n ->where('o.codigo = ?', $codigo_operacion_post)\n ->fetchOne();\n\n $respuestas = json_decode($operacion_post->respuestas);\n foreach ($respuestas->respuestas as $resp) {\n if (!in_array($resp->key, $result)) {\n $result[] = $resp->key;\n }\n }\n }\n }\n }\n }\n }\n }\n\n //las acciones generar variable y serb service extended\n foreach ($tarea->Eventos as $evento) {\n //si evento de tipo variable se deja disponible\n if ($evento->Accion->tipo == 'variable') {\n if (!in_array($evento->Accion->extra->variable, $result)) {\n $result[] = $evento->Accion->extra->variable;\n }\n }\n //si evento web service dejamos las varaibles de la respuesta disponibles\n if ($evento->Accion->tipo == 'webservice_extended') {\n //recorremos las repsuestas del servicio para disponibilizar las variables\n $codigo_operacion = $evento->Accion->extra->soap_operacion;\n $operacion = Doctrine_Query::create()\n ->from('WsOperacion o')\n ->where('o.codigo = ?', $codigo_operacion)\n ->execute();\n $operacion = $operacion[0];\n $respuestas = json_decode($operacion->respuestas);\n\n foreach ($respuestas->respuestas as $resp) {\n if (!in_array($resp->key, $result)) {\n $result[] = $resp->key;\n }\n }\n }\n }\n\n //la variable que genera para almacenar el usuario de la tarea\n if ($tarea->almacenar_usuario) {\n if (!in_array($tarea->almacenar_usuario_variable, $result)) {\n $result[] = $tarea->almacenar_usuario_variable;\n }\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "f7657ce9d50d3c71b5946bb2489c65ba", "score": "0.5392729", "text": "public function trasbordoPermitido($colectivo);", "title": "" }, { "docid": "7d46081b61be585661d6424d06c62123", "score": "0.5378846", "text": "function asignar_valores(){\n\t\t$this->primeros=$_POST['primeros'];\n\t\t$this->ultimos=$_POST['ultimos'];\n\t\t$this->banco=$_POST['banco'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->direccion=$_POST['direccion'];\n\t\t$this->estado=$_POST['estado'];\n\t}", "title": "" }, { "docid": "8b4bee47bdc422b63f087f496eb034b7", "score": "0.53750044", "text": "function inicializar_memoria()\r\n\t{\r\n\t\tif( $this->verificar_acceso_menu() ){\r\n\t\t\t/*\r\n\t\t\t\tEl flag de acceso por el menu desencadena el borrado de toda la memoria pensada para\r\n\t\t\t\tutilizarse dentro de una operacion: los elementos de la memoria GLOBAL marcados \r\n\t\t\t\tcomo 'reciclables' y la memoria sincronizada (la alienada al request anterior).\r\n\t\t\t*/\r\n\t\t\ttoba::logger()->info('Se detecto acceso desde el menu. Se limpia la memoria de la operacion', 'toba');\r\n\t\t\t$this->limpiar_memoria_sincronizada();\r\n\t\t\t$this->limpiar_datos_reciclable();\r\n\t\t\t$this->fijar_csrf_token(true);\r\n\t\t}\r\n\t\t$this->parametros_item_original = $this->get_dato('parametros_item_original');\t\t\t\t\t\t\t\r\n\t\t$this->inicializar_reciclaje_global();\t\t\r\n\t}", "title": "" }, { "docid": "60fb2fd6097016058b9b1c84c34bef28", "score": "0.53743684", "text": "private function atributosOrgao() {\n\n $aOrgao = array();\n $aOrgao['nome'] = 'orgao';\n $aOrgao['propriedades'] = array('nome', 'poder');\n\n return $aOrgao;\n }", "title": "" }, { "docid": "9e4aeb88612051432c428b3225a8002a", "score": "0.5374212", "text": "public function misNoticias()\n {\n if (isset($this->usuarioActual)) {\n $_SESSION[\"__sesion__herramienta__\"][\"__filtro_texto__\"] = $this->usuarioActual->getNomUsuario();\n $_SESSION[\"__sesion__herramienta__\"][\"__filtro_tipo__\"] = \"autor\";\n }\n $this->view->redirect(\"noticia\", \"filtro\");\n }", "title": "" }, { "docid": "94343301d4a9cde8e44243182690ee74", "score": "0.5373183", "text": "function formulaires_choix_secteur_charger_dist(){\r\n\t$valeurs = array();\r\n\t$valeurs['editable'] = true; \r\n\t$valeurs['secteur'] = _request('secteur');\r\n\treturn $valeurs;\r\n}", "title": "" }, { "docid": "48b4e0f7ef5d0a80d8b6a97c357beb8c", "score": "0.5369757", "text": "function tienePermisos($login_usuario, $espacio_id){\n $espacio_model = new ESPACIO_Model($espacio_id, '', '', '', '', '', '');\n $espacio = $espacio_model->rellenaDatos();\n\n //SI NO EXISTE EL ESPACIO REEDIRIGIR A LA PÁGINA PRINCIPAL\n if ($espacio == 'Error inesperado al intentar cumplir su solicitud de consulta') {\n return false;\n } //EN CASO CONTRARIO COMPROBAR SI TIENE PERMISOS PARA PODER REALIZAR EL BORRADO\n else {\n //UN USUARIO CON EL ROL DE ADMINISTRADOR SIEMPRE TIENE PERMISOS PARA REALIZAR EL BORRADO\n if ($_SESSION['rol'] == \"ADMIN\") {\n return true;\n } //EN CASO CONTARIO COMPROBAR SI EL QUE INTENTA ELIMINAR ES EL RESPONSABLE DEL CENTRO, DEPARTAMENTO, GRUPO DE INVESTIGACIÓN, TIENE MAYOR PUESTO O ES CONSERJERIA\n else {\n $categoria_espacio = $espacio->getCategoriaEsp();\n\n //Buscar quien es el responsable del espacio:\n $solicitud_model = new SOLICITUD_RESPONSABILIDAD_Model('', $espacio_id, '', '', '', '', '');\n $responsable_id = $solicitud_model->buscarResponsable();\n\n if ($responsable_id == 'Sin responsable' || $responsable_id == NULL) {\n return false;\n } else {\n $usuario_model = new USUARIO_Model($responsable_id, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');\n $responsable_espacio = $usuario_model->rellenaDatosById();\n\n //Buscar usuario logueado:\n $usuario_model = new USUARIO_Model('', $login_usuario, '', '', '', '', '', '', '', '', '', '', '', '', '', '');\n $usuario_autenticado = $usuario_model->rellenaDatos();\n\n switch ($categoria_espacio) {\n case 'DOCENCIA':\n //Comprobar el departamento:\n if($usuario_autenticado->getAfiliacion() != 'DOCENTE'){\n return false;\n }\n $departamento_id = $responsable_espacio->getDepartUsuario();\n $departamento_model = new DEPARTAMENTO_Models($departamento_id, '', '', '', '', '', '', '');\n $departamento = $departamento_model->rellenaDatos();\n\n if ($departamento->getResponsableDepart() == $usuario_autenticado->getUsuarioId()) {\n return true;\n } else {\n return false;\n }\n case 'INVESTIGACION':\n //Comprobar grupo de investigación\n $grupo_id = $responsable_espacio->getGrupoUsuario();\n\n $grupo_model = new GRUPO_INVESTIGACION_Model($grupo_id, '', '', '', '', '', '');\n $grupo = $grupo_model->rellenaDatos();\n\n if ($grupo->getResponsableGrupo() == $usuario_autenticado->getUsuarioId()) {\n return true;\n } else {\n return false;\n }\n case 'PAS':\n if ($responsable_espacio->getNivelJerarquia() > $usuario_autenticado->getNivelJerarquia()) {\n return true;\n } else {\n return false;\n }\n case 'COMUN':\n if ($usuario_autenticado->getNombrePuesto() == 'Conserjería'\n || $usuario_autenticado->getNombrePuesto() == 'Conserjeria'\n || $usuario_autenticado->getNombrePuesto() == 'conserjería'\n || $usuario_autenticado->getNombrePuesto() == 'conserjeria'\n || $usuario_autenticado->getNombrePuesto() == 'conserje'\n || $usuario_autenticado->getNombrePuesto() == 'Conserje') {\n return true;\n } else {\n return false;\n }\n default:\n return false;\n }\n }\n\n }\n }\n}", "title": "" }, { "docid": "a56c711f661ec6b9fbacaa1981e4d5c5", "score": "0.53639", "text": "public function getConta();", "title": "" }, { "docid": "7b87ee4b7e73019575f05b0c210cff8c", "score": "0.5363155", "text": "protected function personalData() {\n ?>\n <input type=\"text\"\n autocomplete=\"off\"\n name=\"fname\"\n pattern=\"[А-Яа-я]{2,30}\"\n title=\"Име!\"\n placeholder=\"Име\"\n required><br>\n\n <input type=\"text\" autocomplete='off'\n name=\"mname\"\n pattern=\"[А-Яа-я]{2,30}\"\n title=\"Презиме!\"\n placeholder=\"Презиме\"\n required><br>\n\n <input type=\"text\" autocomplete='off'\n name=\"lname\"\n pattern=\"[А-Яа-я]{2,30}\"\n title=\"Фамилия!\"\n placeholder=\"Фамилия\"\n required><br>\n\n\n\n <?php\n\n }", "title": "" }, { "docid": "4457a52d0b6b8bc812b1083c72b8dd6c", "score": "0.535601", "text": "protected function perfil($tipo = 0, $permissoes = null)\n {\n # Convertendo os objetos da sessao em array, transformando as chaves em minusculas.\n $auth = Zend_Auth::getInstance();\n $objIdentity = $auth->getIdentity();\n $arrAuth = array_change_key_case((array)$objIdentity);\n\n $objModelUsuario = new Autenticacao_Model_DbTable_Usuario(); // objeto usuario\n $UsuarioAtivo = new Zend_Session_Namespace('UsuarioAtivo'); // cria a sessao com o usuario ativo\n $GrupoAtivo = new Zend_Session_Namespace('GrupoAtivo'); // cria a sessao com o grupo ativo\n // somente autenticacao zend\n\n $from = base64_encode($this->getRequest()->getRequestUri());\n if ($tipo == 0 || empty($tipo)) {\n if ($auth->hasIdentity()) // caso o usuario esteja autenticado\n {\n\n // pega as unidades autorizadas, orgaos e grupos do usuario (pega todos os grupos)\n if (isset($objIdentity->usu_codigo) && !empty($arrAuth['usu_codigo'])) {\n $grupos = $objModelUsuario->buscarUnidades($arrAuth['usu_codigo'], 21);\n $objAgente = $objModelUsuario->getIdUsuario($arrAuth['usu_codigo']);\n $idAgente = $objAgente['idagente'];\n $cpfLogado = $objAgente['usu_identificacao'];\n } elseif (isset($objIdentity->auth) && isset($objIdentity->auth['uid'])) {\n\n $this->tratarPerfilOAuth($objIdentity);\n } else {\n return $this->_helper->redirector->goToRoute(array('controller' => 'index', 'action' => 'logout', 'module' => 'autenticacao', 'from' => $from), null, true);\n }\n\n // manda os dados para a visao\n $this->view->idAgente = $idAgente;\n $this->view->usuario = $objIdentity; // manda os dados do usuario para a visao\n $this->view->arrayGrupos = $grupos; // manda todos os grupos do usuario para a visao\n $this->view->grupoAtivo = $GrupoAtivo->codGrupo; // manda o grupo ativo do usuario para a vis?o\n $this->view->orgaoAtivo = $GrupoAtivo->codOrgao; // manda o orgao ativo do usuario para a vis?o\n } else {\n\n return $this->_helper->redirector->goToRoute(\n array(\n 'controller' => 'index',\n 'action' => 'logout',\n 'module' => 'autenticacao',\n 'from' => $from\n )\n , null\n , true\n );\n\n }\n # autenticacao e permissoes zend (AMBIENTE MINC)\n } else if ($tipo === 1) {\n # Caso o usuario esteja autenticado\n if ($auth->hasIdentity()) {\n if (empty($permissoes)) {\n return $this->_helper->redirector->goToRoute(\n array(\n 'controller' => 'index',\n 'action' => 'logout',\n 'module' => 'autenticacao'\n ),\n null,\n true);\n }\n\n # Verifica se o grupo ativo esta no array de permissoes\n if (!in_array($GrupoAtivo->codGrupo, $permissoes)) {\n $this->message(\"Voc&ecirc; n&atilde;o tem permiss&atilde;o para acessar essa &aacute;rea do sistema!\", \"principal/index\", \"ALERT\");\n }\n\n // pega as unidades autorizadas, org?os e grupos do usu?rio (pega todos os grupos)\n $grupos = $objModelUsuario->buscarUnidades($arrAuth['usu_codigo'], 21);\n\n // manda os dados para a vis?o\n $objAgente = $objModelUsuario->getIdUsuario($arrAuth['usu_codigo']);\n $idAgente = $objAgente['idagente'];\n $this->view->usuario = $objIdentity; // manda os dados do usu?rio para a vis?o\n $this->view->arrayGrupos = $grupos; // manda todos os grupos do usu?rio para a vis?o\n $this->view->grupoAtivo = $GrupoAtivo->codGrupo; // manda o grupo ativo do usu?rio para a vis?o\n $this->view->orgaoAtivo = $GrupoAtivo->codOrgao; // manda o ?rg?o ativo do usu?rio para a vis?o\n } else {\n return $this->_helper->redirector->goToRoute(\n array(\n 'controller' => 'index',\n 'action' => 'logout',\n 'module' => 'autenticacao',\n 'from' => $from\n )\n , null\n , true\n );\n }\n\n # autenticacao scriptcase (AMBIENTE PROPONENTE)\n } else if ($tipo == 2) {\n // configuracoes do layout padr?o para o scriptcase\n Zend_Layout::startMvc(array('layout' => 'layout_scriptcase'));\n\n // pega o id do usuario logado pelo scriptcase (sess?o)\n //$codUsuario = isset($_SESSION['gusuario']['id']) ? $_SESSION['gusuario']['id'] : $UsuarioAtivo->codUsuario;\n $codUsuario = isset($_GET['idusuario']) ? (int)$_GET['idusuario'] : $UsuarioAtivo->codUsuario;\n //$codUsuario = 366;\n if (isset($codUsuario) && !empty($codUsuario)) {\n $UsuarioAtivo->codUsuario = $codUsuario;\n } else // caso o usuario n?o esteja autenticado\n {\n $this->message(\"Voc&ecirc; n&atilde;o tem permiss&atilde;o para acessar essa &aacute;rea do sistema!\", \"index\", \"ALERT\");\n }\n\n // tenta fazer a autenticacao do usuario logado no scriptcase para o zend\n $autenticar = UsuarioDAO::loginScriptcase($codUsuario);\n\n if ($autenticar && $auth->hasIdentity()) // caso o usuario seja passado pelo scriptcase e esteja autenticado\n {\n // manda os dados para a visao\n $this->view->usuario = $objIdentity; // manda os dados do usuario para a visao\n } // fecha if\n else // caso o usuario n?o esteja autenticado\n {\n $this->message(\"Voc&ecirc; n&atilde;o tem permiss&atilde;o para acessar essa &aacute;rea do sistema!\", \"index\", \"ALERT\");\n }\n\n # autenticacao scriptcase e autenticacao/permissao zend (AMBIENTE PROPONENTE E MINC)\n } else if ($tipo == 3) {\n\n // ========== INICIO AUTENTICACAO SCRIPTCASE ==========\n // pega o id do usuario logado pelo scriptcase\n //$codUsuario = isset($_SESSION['gusuario']['id']) ? $_SESSION['gusuario']['id'] : $UsuarioAtivo->codUsuario;\n $codUsuario = isset($_GET['idusuario']) ? (int)$_GET['idusuario'] : $UsuarioAtivo->codUsuario;\n //$codUsuario = 366;\n if (isset($codUsuario) && !empty($codUsuario)) {\n // configura??es do layout padr?o para o scriptcase\n Zend_Layout::startMvc(array('layout' => 'layout_scriptcase'));\n\n $UsuarioAtivo->codUsuario = $codUsuario;\n\n // tenta fazer a autenticacao do usuario logado no scriptcase para o zend\n $autenticar = UsuarioDAO::loginScriptcase($codUsuario);\n\n if ($autenticar && $auth->hasIdentity()) // caso o usuario seja passado pelo scriptcase e esteja autenticado\n {\n // manda os dados para a visao\n $this->view->usuario = $objIdentity; // manda os dados do usuario para a visao\n } // fecha if\n else // caso o usuario nao esteja autenticado\n {\n $this->message(\"Voc&ecirc; n&atilde;o tem permiss&atilde;o para acessar essa &aacute;rea do sistema!\", \"index\", \"ALERT\");\n }\n // ========== FIM AUTENTICACAO SCRIPTCASE ==========\n } else {\n // ========== INICIO AUTENTICACAO ZEND ==========\n # Caso o usuario nao esteja autenticado pelo scriptcase\n\n # verifica se o grupo ativo esta no array de permissoes\n if (!in_array($GrupoAtivo->codGrupo, $permissoes)) {\n $this->message(\"Voc&ecirc; n&atilde;o tem permiss&atilde;o para acessar essa &aacute;rea do sistema!\", \"principal/index\", \"ALERT\");\n }\n\n # pega as unidades autorizadas, orgaos e grupos do usuario (pega todos os grupos)\n if (isset($arrAuth['usu_codigo']) && !empty($arrAuth['usu_codigo'])) {\n $grupos = $objModelUsuario->buscarUnidades($arrAuth['usu_codigo'], 21);\n } else {\n $this->message(\"Voc&ecirc; n&atilde;o tem permiss&atilde;o para acessar essa &aacute;rea do sistema!\", \"principal/index\", \"ALERT\");\n }\n\n # manda os dados para a visao\n $this->view->usuario = $arrAuth; // manda os dados do usuario para a visao\n $this->view->arrayGrupos = $grupos; // manda todos os grupos do usuario para a visao\n $this->view->grupoAtivo = $GrupoAtivo->codGrupo; // manda o grupo ativo do usuario para a visao\n $this->view->orgaoAtivo = $GrupoAtivo->codOrgao; // manda o orgao ativo do usuario para a visao\n }\n\n } else if ($tipo == 4) {\n # autenticacao migracao e autenticacao/permissao zend (AMBIENTE DE MIGRACAO E MINC)\n $codUsuario = isset($arrAuth['idusuario']) ? (int)$arrAuth['idusuario'] : $UsuarioAtivo->codusuario;\n\n if (isset($codUsuario) && !empty($codUsuario)) {\n\n # ====== NICIO AUTENTICACAO MIGRACAO ==========\n # configuracoes do layout padrao para o proponente\n// Zend_Layout::startMvc(array('layout' => 'layout_proponente'));\n $UsuarioAtivo->codUsuario = $codUsuario;\n\n # tenta fazer a autenticacao do usuario logado no scriptcase para o zend\n # Comentado para verificar se faz sentido autenticar duas vezes no sistema.\n $autenticar = UsuarioDAO::loginScriptcase($codUsuario);\n\n # caso o usuario seja passado pelo scriptcase e esteja autenticado\n if ($autenticar || $auth->hasIdentity()) {\n $this->view->usuario = $objIdentity;\n } else {\n $this->message(\"Voc&ecirc; n&atilde;o tem permiss&atilde;o para acessar essa &aacute;rea do sistema!\", \"index\", \"ALERT\");\n }\n # ========== FIM AUTENTICACAO MIGRACAO ==========\n } else {\n # ========== INICIO AUTENTICACAO ZEND ==========\n # caso o usuario nao esteja autenticado pelo scriptcase\n # verifica se o grupo ativo esta no array de permissoes\n\n if (!$objIdentity) {\n return self::perfil(0, $permissoes);\n } else {\n if (!in_array($GrupoAtivo->codGrupo, $permissoes)) {\n $this->message(\"Voc&ecirc; n&atilde;o tem permiss&atilde;o para acessar essa &aacute;rea do sistema!\", \"principal/index\", \"ALERT\");\n }\n\n // pega as unidades autorizadas, org?os e grupos do usuario (pega todos os grupos)\n if (isset($objIdentity->usu_codigo) && !empty($objIdentity->usu_codigo)) {\n $grupos = $objModelUsuario->buscarUnidades($objIdentity->usu_codigo, 21);\n } else {\n $this->message(\"Voc&ecirc; n&atilde;o tem permiss&atilde;o para acessar essa &aacute;rea do sistema!\", \"principal/index\", \"ALERT\");\n }\n\n $this->view->usuario = $objIdentity; // manda os dados do usu?rio para a vis?o\n $this->view->arrayGrupos = $grupos; // manda todos os grupos do usu?rio para a vis?o\n $this->view->grupoAtivo = $GrupoAtivo->codGrupo; // manda o grupo ativo do usu?rio para a vis?o\n $this->view->orgaoAtivo = $GrupoAtivo->codOrgao; // manda o ?rg?o ativo do usu?rio para a vis?o\n\n }\n }\n }\n\n if (!empty($grupos)) {\n $tblSGCacesso = new Autenticacao_Model_Sgcacesso();\n $rsSGCacesso = $tblSGCacesso->buscar(array(\"Cpf = ? \" => $objIdentity->usu_identificacao));\n if ($rsSGCacesso->count() > 0) {\n $this->view->arrayGrupoProponente = array(\"gru_codigo\" => 1111, \"uog_orgao\" => 2222, \"gru_nome\" => \"Proponente\");\n }\n }\n\n }", "title": "" }, { "docid": "2ddbaf4ddebe3150dfdf07df3f0afcad", "score": "0.53475326", "text": "function seoptimizr_declarer_tables_principales($tables_principales) {\n $spip_seobjets = array(\n 'id_seobjet' => 'BIGINT(21) NOT NULL auto_increment',\n 'url_redir' => 'TEXT NOT NULL',\n 'meta_robots' => 'TEXT NOT NULL',\n 'logo_alt' => 'TEXT NOT NULL',\n 'maj' => 'TIMESTAMP', );\n\n // definir les cle primaire et secondaires\n $spip_seobjets_key = array(\n 'PRIMARY KEY' => 'id_seobjet', );\n\n // inserer dans le tableau\n $tables_principales['spip_seobjets'] = array(\n 'field' => &$spip_seobjets,\n 'key' => &$spip_seobjets_key, );\n\n return $tables_principales;\n}", "title": "" }, { "docid": "04097ac9939a3d9f7b471de2904dfc64", "score": "0.53445435", "text": "function getLanguage()\n{\n return array(\n \"general:button:home\" => \"Home\",\n \"general:button:courses\" => \"Cursos\",\n \"general:button:signin\" => \"Registrarse\",\n \"general:button:save\" => \"Salvar\",\n \"general:button:delete\" => \"Borrar\",\n \"general:button:edit\" => \"Editar\",\n \"general:button:yes\" => \"Sí\",\n \"general:button:no\" => \"No\",\n \"general:button:description\" => \"Descripción\",\n \"general:button:help\" => \"Ayuda\",\n\n \"general:footer:virtus\" => \"VIRTUS Virtual Vocational Training Centre\",\n \"general:footer:reach\" => \"Llámenos a: \",\n\n \"main:welcome:courses\" => \"Cursos\",\n \"main:welcome:headline\" => \"¡Bienvenido de V3C proyecto!\",\n \"main:subjects:subject\" => \"Temas\",\n \"main:welcome:v3cgoal\" => \"El proyecto “Virtual Vocational Education and Training – VIRTUS” desarrollará un centro de formación y formación profesional virtual innovador y totalmente funcional, que ofrecerá cursos modulares modulares adecuadamente diseñados en MEC (Modular Employable Skills), correspondientes a una amplia gama de circunstancias como el potencial de crecimiento regional y / o la reestructuración de empresas Y con el objetivo de aumentar la tasa de participación de los alumnos adultos en la formación profesional\",\n \"main:welcome:v3ccourses\" => \"En particular, el centro VET virtual proporcionará dos cursos modulares certificados en:\",\n \"main:welcome:tourism\" => \"Servicios de Turismo y Hospitalidad\",\n \"main:welcome:social\" => \"El emprendimiento social\",\n \"main:welcome:listcourses\" => \"Consulte la lista de todos los cursos disponibles aquí.\",\n\n \"addcourse:add:create\" => \"Crear un nuevo curso\",\n \"addcourse:content:name\" => \"Nombre del curso:\",\n \"addcourse:placeholder:name\" => \"Ingrese el nombre de su curso\",\n \"addcourse:content:domain\" => \"Dominio del curso:\",\n 'addcourse:placeholder:domain' => 'Ingrese el dominio de su curso',\n \"addcourse:content:profession\" => \"Curso Profesión:\",\n 'addcourse:placeholder:profession' => 'Ingrese a su profesión de curso',\n \"addcourse:content:desription\" => \"Descripción:\",\n 'addcourse:placeholder:description' => 'Introduzca la descripción del curso',\n\n \"course:content:courseunits\" => \"Unidades del curso\",\n \"course:content:enterroom\" => \"Entrar en la sala de cursos\",\n \"course:content:createdby\" > \"Creado por:\",\n \"course:content:domain\" => \"Dominio:\",\n \"course:content:profession\" => \"Profesión:\",\n \"course:content:description\" => \"Descripción:\",\n\n \"coursedel:head:name\" => \"Eliminar curso {COURSENAME}\",\n \"coursedel:head:name_tmp\" => \"Eliminar curso \",\n \"coursedel:head:confirm\" => \"¿Realmente desea eliminar el curso {COURSENAME}?\",\n \"coursedel:head:confirm_tmp1\" => \"¿Realmente desea eliminar el curso \",\n \"coursedel:head:confirm_tmp2\" => \"?\",\n\n \"courselist:head:subcourses\" => \"{SUBJECT} cursos\",\n \"courselist:head:subcourses_tmp\" => \" cursos\",\n \"courselist:head:add\" => \"Agregar nuevo curso\",\n \"courselist:choose:choose\" => \"Elija el curso\",\n \"courselist:choose:name\" => \"Nombre del curso\",\n \"courselist:choose:creator\" => \"Creado por\",\n \"courselist:choose:start\" => \"Fechas de Inicio\",\n\n \"editcourse:head:edit\" => \"Editar su curso\",\n \"editcourse:edit:name\" => \"Nombre del curso:\",\n \"editcourse:edit:domain\" => \"Dominio del curso:\",\n \"editcourse:edit:profession\" => \"Profesión del curso:\",\n \"editcourse:edit:description\" => \"Descripción:\",\n \"editcourse:edit:design\" => \"Diseñar un entorno de aprendizaje\",\n\n \"overview:head:gallery\" => \"Galería\"\n );\n}", "title": "" }, { "docid": "71853d191e23842d30e49dc3f573b146", "score": "0.5343154", "text": "function _authlectores(){\n\t\tSecurity::setHash('bienestar');\n\t\t$this->Auth->userModel = 'Alumno';\n\t\t$this->Auth->fields = array(\n\t\t\t'username' => 'codigo',\n\t\t\t'password' => 'dni'\n\t\t);\n\t\t$this->Auth->loginAction = array('admin' => false,'controller' => 'lectores', 'action' => 'login');\n\t\t$this->Auth->logoutRedirect = array('controller' => 'lectores', 'action' => 'login');\n\t\t$this->Auth->loginRedirect = array('controller' => 'lectores', 'action' => 'index');\n\t\t$this->Auth->authError = 'Está intentando ingresar a una Área restringida.';\n\t\t$this->Auth->loginError ='Los datos ingresados son incorrectos';\n\t}", "title": "" }, { "docid": "28b65cb9b6c8154a7572c4359a465071", "score": "0.5337064", "text": "function Mis_citas_asignadas($barbero){//para el modificar de todos los usuarios\n\t\t$conexion=BarberGarage_BD::Connect();\n\t\t$conexion->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n\n\t\t$consulta=\"SELECT * FROM citas WHERE Barbero=?\";\n\t\t$query=$conexion->prepare($consulta);\n\t\t$query->execute(array($barbero));\n\n\t\t$resultado=$query->fetchAll(PDO::FETCH_BOTH);\n\n\t\tBarberGarage_BD::Disconect();\n\n\t\treturn $resultado;\t\t\n\t}", "title": "" }, { "docid": "67cbabcbff78c79a01e982e44b284cf7", "score": "0.53362596", "text": "public function carregarAutorizarAction() {\n\t\t$this->setTitle('Turma');\n\t\t$this->setSubtitle('Autorizar');\n\n\t\t//monta menu de contexto\n\t\t$menu = array($this->getUrl('secretaria', 'turma', 'list', ' ') => 'filtrar');\n\t\t$this->setActionMenu($menu);\n\n\t\t$arParam = $this->_getAllParams();\n\n\t\t$obBusinessTurma = new Fnde_Sice_Business_Turma();\n\t\t$turma = $obBusinessTurma->getTurmaPorId($arParam['NU_SEQ_TURMA']);\n\n\t\tif ( $turma['ST_TURMA'] != \"3\" ) {\n\t\t\t$this->addMessage(Fnde_Message::MSG_ERROR,\n\t\t\t\t\t\"A turma selecionada com a situação {$turma['DS_ST_TURMA']} e não pode ser executada a ação Autorizar/Não autorizar Turma.\");\n\t\t\t$this->_redirect(\"/secretaria/turma/list\");\n\n\t\t}\n\n\t\t$form = $this->getForm($arParam);\n\t\t$form->populate($arParam);\n\n\t\t$this->view->form = $form;\n\t\treturn $this->render('form');\n\t}", "title": "" }, { "docid": "4a5df110b04110182fe443539541603f", "score": "0.53358364", "text": "public function campos_formulario()\n\t{\n\t\t\n\t\t$campos = array('input_email' => \n\t\t\t\t\tarray( 'name' => 'email',\n\t\t\t\t\t\t 'id' => 'email',\n\t\t\t\t\t\t 'type' => 'email',\n\t\t\t\t\t\t\t'required' => 'true',\n\t\t\t\t\t\t\t'placeholder' => 'Introduce un email',\n\t\t\t\t\t\t\t'maxlength' => '100',\n\t\t\t\t\t\t\t'value' => set_value('email')),\n\t\t\t\t\t 'input_password' => \n\t\t\t\t\t array( 'name' => 'password',\n\t\t\t\t\t\t\t'id' => 'password',\n\t\t\t\t\t\t\t'placeholder' => 'Introduce un password',\n\t\t\t\t\t\t\t'maxlength' => '100',\n\t\t\t\t\t\t\t'value' => set_value('password')\n\t\t\t\t\t\t )\t \n\t\t\t\t );\n\t\t\t\t\t \n\t\treturn $campos;\n\t\t\n\t}", "title": "" }, { "docid": "e7b62035029572fa3466be64fd4dc1b0", "score": "0.53338194", "text": "function mostrar_acciones_participante($estado_partida, $estado_jugador, $id_partida,$regala_a){\n\t\n\tif($estado_partida==1){ // esperando confirmación de los participantes...\n\t\tif($estado_jugador == 1 || $estado_jugador == 3){ // si el jugador no ha elegido aún o ha dicho que no...\n\t\t\t?><a href=\"contestar.php?id_partida=<?=$id_partida?>&a=si\">Voy a ir</a>.<br/><?\t\t\t\n\t\t}\n\t\tif($estado_jugador == 1 || $estado_jugador == 2){ // si el jugador no ha elegido aún o ha dicho que Sí...\n\t\t\t?><a href=\"contestar.php?id_partida=<?=$id_partida?>&a=no\">No voy a ir</a>.<br/><?\t\t\t\n\t\t}\t\n\t}\n\t\n\tif($estado_partida == 2){ // si ya se ha realizado el sorteo...\n\t\tif($estado_jugador == 2){ // ...y tú juegas...\n\t\t\t?>Tienes que regalar a <a href=\"http://www.facebook.com/profile.php?id=<?=$regala_a?>\" target=\"_blank\">esta</a> persona.<br/><?\t\n\t\t}\n\t\telse{ // si no juegas...\n\t\t\t?><i>(no est&aacute;s jugando. No confirmaste tu participaci&oacute;n :( )</i><?\t\t\t\n\t\t}\n\t}\n\t\n \tif($estado_partida == 3){\n\t\t?><a href=\"ver_relacion.php?id_partida=<?=$id_partida?>\">Ver qui&eacute;n regalaba a qui&eacute;n.</a><?\n\t}\n \n }", "title": "" }, { "docid": "47d6307eaaac7aa12dda04a171dc6085", "score": "0.53302795", "text": "function limpiar_datos()\r\n\t{\r\n\t\t$this->memoria_global = array();\r\n\t}", "title": "" }, { "docid": "415e29eb1b5c481e634793846f110507", "score": "0.5328332", "text": "public static function usuariosConectados() {\n global $sql, $sesion_usuarioSesion, $textos, $configuracion;\n\n $tablas = array(\n \"uc\" => \"usuarios_conectados\",\n \"u\" => \"usuarios\",\n \"p\" => \"personas\",\n \"i\" => \"imagenes\"\n );\n\n $columnas = array(\n \"id_usuario\" => \"uc.id_usuario\",\n \"visible\" => \"uc.visible\",\n \"sobrenombre\" => \"u.sobrenombre\",\n \"usuario\" => \"u.usuario\",\n \"imagen\" => \"i.ruta\"\n );\n\n $condicion = \"uc.id_usuario = u.id AND u.id_persona = p.id AND p.id_imagen = i.id AND uc.visible = '1' AND uc.id_usuario != '\" . $sesion_usuarioSesion->id . \"'\";\n\n //$sql->depurar = true;\n $consulta = $sql->seleccionar($tablas, $columnas, $condicion);\n if ($sql->filasDevueltas) {\n while ($contacto = $sql->filaEnObjeto($consulta)) {\n $contacto->foto = $configuracion[\"SERVIDOR\"][\"media\"] . $configuracion[\"RUTAS\"][\"imagenesMiniaturas\"] . \"/\" . $contacto->imagen;\n $lista[] = $contacto;\n }\n\n foreach ($lista as $elemento) {\n $item = HTML::enlace(HTML::imagen($elemento->foto, \"flotanteIzquierda margenDerecha miniaturaListaChat\"), '/users/' . $elemento->usuario);\n $opciones = array(\"onClick\" => \"javascript:chatWith('\" . $elemento->usuario . \"')\");\n $item .= HTML::enlace(HTML::frase($elemento->sobrenombre, \"claseUsuariosConectados margenSuperior\", \"usuarioChat_\" . $elemento->usuario), \"javascript:void(0)\", 'margenSuperior', \"\", $opciones);\n $listaContactos[] = $item;\n }\n\n $listaContactos = HTML::lista($listaContactos, \"listaVertical listaConIconos bordeSuperiorLista\", \"\", \"\");\n $codigo = HTML::contenedor($listaContactos, \"contenedorChat\");\n\n return $codigo;\n } else {\n return $textos->id(\"NO_HAY_USUARIOS_CONECTADOS\");\n }\n }", "title": "" }, { "docid": "3dafff3bf13bc55417ddfb350487b69a", "score": "0.5317814", "text": "private function mostrarVarios() {\n $usuarios = $this->Usuario->leerTodos();\n $this->asignarDatosVista('usuarios', $usuarios);\n $this->mostrarVista('usuarios/mostrarVarios');\n }", "title": "" }, { "docid": "6e4885ed707aa5ffcffdcf746dd130cc", "score": "0.53136164", "text": "public function modificardatosbasicos(Request $request)\n {\n $a = Estudiante::find($request->estudiante_id);\n $m = new Estudiante($a->attributesToArray());\n foreach ($a->attributesToArray() as $key => $value) {\n if (isset($request->$key)) {\n $a->$key = strtoupper($request->$key);\n }\n }\n $u = Auth::user();\n $a->user_change = $u->identificacion;\n $result = $a->save();\n if ($result) {\n $user = User::where('identificacion',$m->personanatural->persona->numero_documento)->first();\n if($user !=null){\n $user->identificacion = $request->numero_documento;\n $user->save();\n }\n $pn = Personanatural::find($a->personanatural_id);\n foreach ($pn->attributesToArray() as $key => $value) {\n if (isset($request->$key)) {\n $pn->$key = strtoupper($request->$key);\n }\n }\n $p = Persona::find($pn->persona_id);\n $pn->save();\n foreach ($p->attributesToArray() as $key => $value) {\n if (isset($request->$key)) {\n $p->$key = strtoupper($request->$key);\n }\n }\n $p->direccion = strtoupper($request->direccion_residencia);\n $p->save();\n// if (isset($request->foto)) {\n// $foto = $request->file('foto');\n// $name = \"Imagen_\" . $foto->getClientOriginalName();\n// $path = public_path() . \"/images/fotos/\";\n// $foto->move($path, $name);\n// $a->foto = $name;\n// $a->save();\n// }\n $aud = new Auditoriaacademico();\n $aud->usuario = \"ID: \" . $u->identificacion . \", USUARIO: \" . $u->nombres . \" \" . $u->apellidos;\n $aud->operacion = \"ACTUALIZAR DATOS\";\n $str = \"EDICION DE LOS DATOS DEL ESTUDINATE. DATOS NUEVOS: \";\n $str2 = \" DATOS ANTIGUOS: \";\n foreach ($m->attributesToArray() as $key => $value) {\n $str2 = $str2 . \", \" . $key . \": \" . $value;\n }\n foreach ($a->attributesToArray() as $key => $value) {\n $str = $str . \", \" . $key . \": \" . $value;\n }\n $aud->detalles = $str . \" - \" . $str2;\n $aud->save();\n flash(\"Estudiante modificado de forma exitosa!\")->success();\n return redirect()->route('menu.hojadevidaestudiante', $request->estudiante_id);\n } else {\n flash(\"El Estudiante no pudo ser modificado. Error: \" . $result)->error();\n return redirect()->route('menu.hojadevidaestudiante', $request->estudiante_id);\n }\n }", "title": "" }, { "docid": "d4cb3d105b6cb768e14be3b47209a5ce", "score": "0.5300964", "text": "public static function getSettings()\n {\n return [\n 'login' => 'editor',\n 'legalTemplates' => ['city'],\n 'access' => [\n 'templates' => [\n [\n 'name' => 'city',\n 'roles' => ['editor'],\n 'editRoles' => ['editor'],\n 'rolesPermissions' => [\n // 'editor' => ['page-delete'] // <-- user has no page-delete permission.\n // 'editor' => ['page-edit-trash-created'] // <-- user has no page-edit-trash-created permission.\n ]\n ]\n ],\n ]\n ];\n }", "title": "" }, { "docid": "c7b96553ba3678e61d43f0a4f39f3f9d", "score": "0.52999806", "text": "function CedNomApePersonal(){\n\t\t$sql = \"SELECT * FROM personal WHERE status='1'\";\n\t\treturn $this->ejecuta($sql);\n\t}", "title": "" }, { "docid": "1e6d2b129d0434afecc1cd4ffa46a5a9", "score": "0.52976215", "text": "function cl_consolidacaodebitosregistros() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"consolidacaodebitosregistros\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "c9e2bf4d88b0acca1b127c0b1c52005b", "score": "0.52942526", "text": "public function asociativos()\n {\n \treturn [\n \t\t['id' => self::PENDIENTE, 'texto' => 'Pendiente'],\n ['id' => self::PAGADO, 'texto' => 'Pagado'],\n \t];\n }", "title": "" }, { "docid": "e0dc5467e33823a290d247e18fa8d0d6", "score": "0.5290465", "text": "public static function settings()\n {\n setlocale(LC_ALL, 'es_RA.UTF-8');\n date_default_timezone_set('America/Argentina/Buenos_Aires');\n\n #Se mantiene siempre la sesión iniciada\n session_start();\n\n #Se define el idioma de la pagina\n $idioma = new Idiomas();\n\n $_SESSION[\"lang\"] = isset($_SESSION[\"lang\"]) ? $_SESSION[\"lang\"] : $idioma->viewDefault()['data']['cod'];\n if (isset($_SESSION[\"usuarios\"][\"idioma\"])) $_SESSION[\"lang\"] = $_SESSION[\"usuarios\"][\"idioma\"];\n\n\n $_SESSION[\"defaultLang\"] = isset($_SESSION[\"defaultLang\"]) ? $_SESSION[\"defaultLang\"] : $idioma->viewDefault()['data']['cod'];\n $_SESSION[\"lang-txt\"] = json_decode(file_get_contents(dirname(__DIR__) . '/lang/' . $_SESSION[\"lang\"] . '.json'), true);\n $_SESSION[\"cod_pedido\"] = isset($_SESSION[\"cod_pedido\"]) ? $_SESSION[\"cod_pedido\"] : strtoupper(substr(md5(uniqid(rand())), 0, 7));\n !isset($_SESSION['token']) ? $_SESSION['token'] = md5(uniqid(rand(), TRUE)) : null;\n }", "title": "" }, { "docid": "524148c819d845c5fd16394f5318a5de", "score": "0.52846307", "text": "public function registroBaseTutoriaController(){\n\t\tif($_COOKIE['nivel']==1)\n\t\t\t$respuesta_alumnos = Datos::obtenerAlumnosModel(\"alumnos\");\n\t\telse\n\t\t\t$respuesta_alumnos = Datos::obtenerAlumnosNivelModel(\"alumnos\",$_SESSION['num_empleado']);\n\n\t\t$st_alumnos=\"\";\n\t\tfor($i=0;$i<sizeof($respuesta_alumnos);$i++)\n\t\t\t$st_alumnos=$st_alumnos.\"<option value='\".$respuesta_alumnos[$i]['matricula'].\"'>\".$respuesta_alumnos[$i]['nombre'].\"</option>\";\n\n\n\t\techo'\n\t\t\t<input type=\"hidden\" id=\"hid\" name=\"hid\"></input>\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<h4>Detalles en la tutoria</h4>\n\n\t\t\t\t\t\t<label for=\"fecha\">Fecha:</label>\n\t\t\t\t\t\t<input type=\"date\" name=\"fecha\" required>\n\t\t\t\t\t\t<label for=\"hora\">Hora:</label>\n\t\t\t\t\t\t<input type=\"time\" name=\"hora\" required>\n\t\t\t\t\t\t<label for=\"tipo\">Tipo:</label>\n\t\t\t\t\t\t<select name=\"tipo\" required>\n\t\t\t\t\t\t\t<option value=\"Grupal\">Grupal</option>\n\t\t\t\t\t\t\t<option value=\"Individual\">Individual</option>\n\t\t\t\t\t\t </select>\n\t\t\t\t\t\t<label for=\"Tema\">Tema:</label>\n\t\t\t\t\t\t<input type=\"text\" name=\"tema\" required>\n\t\t\t\t\t\t<button class=\"small success\" onclick=\"sendData();\" type=\"submit\">Registrar</button>\n\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<h4>Alumnos en la tutoria</h4>\n\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t <label for=\"alumno\">Nombre del Alumno:</label>\n\t\t\t\t\t\t\t\t <select name=\"alumno\" class=\"js-example-basic-multiple\" id=\"alumno\">\n\t\t\t\t\t\t\t\t \t'.$st_alumnos.'\n\t\t\t\t\t\t\t\t </select>\n\t\t\t\t\t\t\t\t <br><br>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t <td>\n\t\t\t\t\t\t\t \t<button type=\"button\" class=\"small success\" onclick=\"addAlumno()\">Agregar Alumno</button>\n\t\t\t\t\t\t\t </td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<table>\n\t\t\t\t\t\t<table id=\"alumnos\"></table>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>';\n\n\t\techo'<script>\n\t\t\t\t$(document).ready(function() {\n\t\t\t\t\t$(\".js-example-basic-multiple\").select2();\n\t\t\t\t});\n\n\t\t\t\tvar alumnos=[];\n\t\t\t\tvar send_alumnos=[];\n\t\t\t\tvar tab = document.getElementById(\"alumnos\");\n\n\t\t\t\tfunction updateTable(){\n\t\t\t\t\ttab.innerHTML=\"<tr><th>Matricula</th><th>Nombre</th><th>¿Eliminar?</th><tr>\";\n\t\t\t\t\tfor(var i=0;i<alumnos.length;i++){\n\t\t\t\t\t\ttab.innerHTML=tab.innerHTML+\"<tr><td>\"+alumnos[i][0]+\"</td><td>\"+alumnos[i][1]+\"</td><td><button class=\\'alert\\' type=\\'button\\' onclick=\\'deleteAlumno(\"+i+\");\\'>Eliminar</button></td><tr>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfunction addAlumno(){\n\n\t\t\t\t\tvar select = document.getElementById(\"alumno\");\n\t\t\t\t\tvar flag=false;\n\t\t\t\t\tfor(var i=0;i<alumnos.length;i++){\n\t\t\t\t\t\tif(alumnos[i][0]==select.options[select.selectedIndex].value && alumnos[i][1]==select.options[select.selectedIndex].text){\n\t\t\t\t\t\t\tflag=true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif(!flag){\n\t\t\t\t\t\talumnos.push([select.options[select.selectedIndex].value,select.options[select.selectedIndex].text]);\n\t\t\t\t\t\tsend_alumnos.push([select.options[select.selectedIndex].value]);\n\t\t\t\t\t\tupdateTable();\n\t\t\t\t\t}else{\n\t\t\t\t\t\talert(\"Alumno ya Agregado\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfunction deleteAlumno(index){\n\t\t\t\t\talumnos.splice(index, 1);\n\t\t\t\t\tsend_alumnos.splice(index, 1);\n\t\t\t\t\tupdateTable();\n\t\t\t\t}\n\n\t\t\t\tfunction sendData(){\n\t\t\t\t\tvar hid = document.getElementById(\"hid\");\n\t\t\t\t\thid.value=send_alumnos;\n\t\t\t\t}\n\n\t\t\t</script>';\n\t}", "title": "" }, { "docid": "313cdfd3fb9c0a7c05ca4c036094759b", "score": "0.5282268", "text": "function index()\n {\n $data['title']='Personas - CeciliaESMN';\n $data['page_title']='Personas';\n setlocale(LC_TIME,\"es_ES.UTF-8\"); //fechas en espa�ol\n\n $data['personas'] = $this->Persona_model->get_all_personas();\n //$data['all_tipo_documento'] = $this->Tipo_documento_model->get_all_tipo_documento();\n $data['all_ciudades'] = $this->Ciudad_model->get_all_ciudades();\n\n //Botones de acciones\n $data['boton_edit']=validar_botones('edit');\n $data['boton_add']=validar_botones('add');\n $data['boton_remove']=validar_botones('remove');\n\n $this->load->view('templates/header',$data);\n $this->load->view('persona/index',$data);\n $this->load->view('templates/footer',$data);\n }", "title": "" }, { "docid": "5b49fa5a989c07fb5e9677a8b168ec8b", "score": "0.5280916", "text": "public function propietarios(){\n\n\t\t$datosCli = array();\n\t\t$datosCli['propietarios'] = $this->CatalogoGeneral_model->getCatalogoGeneral('C');\n\t\t$datosCli['estados'] = $this->CatalogoGeneral_model->getCatalogoGeneral('D');\n\t\t$datosCli['idPropietario'] = $this->getNextIdCat('C');\n\n\t\t$fragment = array();\n\t\t$fragment['ccsLibs'] = NULL;\n\t\t$fragment['VISTA'] = $this->load->view('catalogosGenerales/propietario_view',$datosCli,TRUE);\n\t\t$fragment['jsLibs'] = ['js/propietarios.js'];\n\t\t\n\t\t$this->load->view('dashboard_view',$fragment);\n\t}", "title": "" }, { "docid": "ab2a9e729ca667a65d87113d06549330", "score": "0.5277967", "text": "public function manejadorSesiones(){\n\t\t\tif(! $this->get('ESTADO')){\t\t // en la posicion 'estado', lo setea como no logeado\t\n\t\t\t$this->set('ESTADO','NO LOGUEADO');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5651332da3988eb1e4f9b7adbc2e2e0e", "score": "0.5274355", "text": "function limpiar_datos_operacion()\r\n\t{\r\n\t\t$this->celda_memoria_actual['global'] = array();\r\n\t}", "title": "" }, { "docid": "dcb3030fe0e04a32bb25e1039047852a", "score": "0.5269824", "text": "function opcionesPermisos($grupo, $concepto) {\r\n\t$sql=\"SELECT FlagAdministrador FROM seguridad_autorizaciones WHERE CodAplicacion='\".$_SESSION['APLICACION_ACTUAL'].\"' AND Usuario='\".$_SESSION['USUARIO_ACTUAL'].\"' AND Estado='A'\";\r\n\t$query=mysql_query($sql) or die ($sql.mysql_error());\r\n\t$rows=mysql_num_rows($query);\r\n\tif ($rows!=0) $field=mysql_fetch_array($query);\r\n\t$_ADMIN=$field['FlagAdministrador'];\r\n\t//\t--------------------------------------------\r\n\t$sql=\"SELECT FlagMostrar, FlagAgregar, FlagModificar, FlagEliminar FROM seguridad_autorizaciones WHERE CodAplicacion='\".$_SESSION['APLICACION_ACTUAL'].\"' AND Usuario='\".$_SESSION['USUARIO_ACTUAL'].\"' AND Concepto='\".$concepto.\"' AND Estado='A'\";\r\n\t$query=mysql_query($sql) or die ($sql.mysql_error());\r\n\t$rows=mysql_num_rows($query);\r\n\tif ($rows!=0) $field=mysql_fetch_array($query);\r\n\t$_SHOW=$field['FlagMostrar'];\r\n\t$_INSERT=$field['FlagAgregar'];\r\n\t$_UPDATE=$field['FlagModificar'];\r\n\t$_DELETE=$field['FlagEliminar'];\r\n\treturn array($_SHOW, $_ADMIN, $_INSERT, $_UPDATE, $_DELETE);\t\r\n}", "title": "" }, { "docid": "8f027c2e5b009c0282f3a60917cb811f", "score": "0.5269038", "text": "private function reciclar_datos_globales_acceso()\r\n\t{\r\n\t\tforeach( $this->celda_memoria_actual['reciclables'] as $reciclable => $tipo){\t\r\n\t\t\tif($tipo == apex_hilo_reciclado_acceso){\r\n\t\t\t\t//Si hay un elemento reciclable que no se activo, lo destruyo\r\n\t\t\t\tif(!in_array($reciclable,$this->celda_memoria_actual['reciclables_activos'])){\r\n\t\t\t\t\ttoba::logger()->info(\"Se limpio de la memoria el elemento '$reciclable' porque no fue accedido\", 'toba');\r\n\t\t\t\t\t$this->eliminar_dato_operacion($reciclable);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f6d56dcfb67534cdcbbc7363de5d2c36", "score": "0.5267923", "text": "public function run()\n {\n //unidad de gasto\n $permiso = new Permission();\n $permiso->namePermission =\"Solicitu de aquicición\";\n $permiso->description = \"Puede ver las solicitudes de adquicicion y poder verlas\";\n $permiso->url = \"/SolicitudesDeAdquisicion\";\n $permiso->save();\n $permiso2 = new Permission();\n $permiso2->namePermission =\"Agregar detalle solictud\";\n $permiso2->description = \"Puede agragar detalles a la solicitud\";\n $permiso2->url = \"/AgregarDetalleSolictud\";\n $permiso2->save();\n //unidad administrativa\n $permiso3 = new Permission();\n $permiso3->namePermission =\"Ver las solicitudes de adquisición\";\n $permiso3->description = \"Se podra ver la solicitudes de adquisición que pertenecen a esa unidad administrativa\";\n $permiso3->url = \"/SolicitudesDeAdquisicionAdmin\";\n $permiso3->save();\n $permiso4 = new Permission();\n $permiso4->namePermission =\"Enviar el correo de contización\";\n $permiso4->description = \"Puede enviar el correo para cotizar la solicitud\";\n $permiso4->url = \"/EnviarCotizacion\";\n $permiso4->save();\n $permiso5 = new Permission();\n $permiso5->namePermission =\"Ver el detalle la solicitud de contización\";\n $permiso5->description = \"Puede ver a detalle la solicitud de adquisición\";\n $permiso5->url = \"/DetalleSolicitud/:id\";\n $permiso5->save();\n $permiso6 = new Permission();\n $permiso6->namePermission =\"Todo sobre monte límite\";\n $permiso6->description = \"Puede ver los montos límites definidos, y poder actualizarlo\";\n $permiso6->url = \"/montoLimite\";\n $permiso6->save();\n\n $permiso7 = new Permission();\n $permiso7->namePermission =\"Registro de empresas\";\n $permiso7->description = \"Puede ver la lista de empresas y registrar nuevas empresas\";\n $permiso7->url = \"/empresas\";\n $permiso7->save();\n\n //Unidad de proveedor AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n $permiso14 = new Permission();\n $permiso14 ->namePermission = \"Ver las solicitudes de adquisición\";\n $permiso14->description = \"Se podra ver la solicitudes de adquisición que pertenecen a esa unidad administrativa\";\n $permiso14->url = \"/SolicitudesDeAdquisicionAdmin\";\n $permiso14->save();\n $permiso15 = new Permission();\n $permiso15->namePermission =\"Enviar el correo de contización\";\n $permiso15->description = \"Puede enviar el correo para cotizar la solicitud\";\n $permiso15->url = \"/EnviarCotizacion\";\n $permiso15->save();\n $permiso16 = new Permission();\n $permiso16->namePermission =\"Ver el detalle la solicitud de contización\";\n $permiso16->description = \"Puede ver a detalle la solicitud de adquisición\";\n $permiso16->url = \"/DetalleSolicitud/:id\";\n $permiso16->save();\n\n //administrador del sistema\n $permiso8 = new Permission();\n $permiso8->namePermission =\"Registrar unidades administrativas\";\n $permiso8->description = \"Puede ver las unidades administrativas y resgistrar nuevas unidades administrativas\";\n $permiso8->url = \"/UnidadesAdministrativas\";\n $permiso8->save();\n $permiso9 = new Permission();\n $permiso9->namePermission =\"Registrar unidades de gasto\";\n $permiso9->description = \"Registrar nuevas unidades de gasto\";\n $permiso9->url = \"/unidadesDeGasto\";\n $permiso9->save();\n $permiso10 = new Permission();\n $permiso10->namePermission =\"Registrar usuarios\";\n $permiso10->description = \"Registrar nuevos usuarios\";\n $permiso10->url = \"/user\";\n $permiso10->save();\n $permiso11 = new Permission();\n $permiso11->namePermission =\"Administar roles\";\n $permiso11->description = \"Puede ver los roles existentes y registrar nuevos roles\";\n $permiso11->url = \"/roles\";\n $permiso11->save();\n $permiso12 = new Permission();\n $permiso12->namePermission =\"Ver Personal\";\n $permiso12->description = \"Puede ver los roles existentes y registrar nuevos roles\";\n $permiso12->url = \"/personal\";\n $permiso12->save();\n \n $permiso13 = new Permission();\n $permiso13->namePermission =\"Agregar Respuesta\";\n $permiso13->description = \"Se puede agregar respuestas de contizacion desde unidad 33cmxfnPK administrariva\";\n $permiso13->url = \"/SolicitudesDeAdquisicion\";\n $permiso13->save();\n\n \n }", "title": "" }, { "docid": "2d647b2daa1bfbfbbe36962fa9f3c33a", "score": "0.5266382", "text": "private function atributosOrgaoCarreira() {\n\n $aOrgaoCarreira = array();\n $aOrgaoCarreira['nome'] = 'orgao';\n $aOrgaoCarreira['propriedades'] = array('nome', 'poder');\n\n return $aOrgaoCarreira;\n }", "title": "" }, { "docid": "927fa172ea959341f186a6a57774485b", "score": "0.5265289", "text": "public function asignarDatos()\n\t{\n\t\tif($this->Tipo==1)\n\t\t{\n\t\t\t$this->Tipo=\"Examen de ingreso\";\n\t\t}\n\t\tif($this->Tipo==2)\n\t\t{\n\t\t\t$this->Tipo=\"Examen periodico\";\n\t\t}\n\t\tif($this->Tipo==3)\n\t\t{\n\t\t\t$this->Tipo=\"Examen de egreso\";\n\t\t}\n\t}", "title": "" }, { "docid": "2a87956f17c01dd918b8256f35f62f59", "score": "0.5264258", "text": "public function usuarios2()\n {\n $data['page_tag'] = \"Usuarios - Inversiones Picky\";\n $data['page_title'] = \"Usuarios\";\n $data['page_name'] = \"Registrar Usuarios\";\n $data['page_funtions_js'] = \"funtions_usuarios2.js\";\n $this->views->getView($this, \"usuarios2\", $data);\n }", "title": "" }, { "docid": "e87afd6a51896358f270ad308e758aee", "score": "0.52638966", "text": "protected function setAuthorizations()\n {\n $this->authorizations = [\n [\n 'name' => 'AMMINISTRATORE_CHAT',\n 'type' => Permission::TYPE_ROLE,\n 'description' => 'Ruolo del plugin chat',\n 'ruleName' => null\n ],\n [\n 'name' => \\lispa\\amos\\chat\\widgets\\icons\\WidgetIconChat::className(),\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => 'Permesso per vedere il widget di accesso ai messaggi',\n 'ruleName' => null,\n 'parent' => ['AMMINISTRATORE_CHAT']\n ]\n ];\n }", "title": "" }, { "docid": "0b32339cddfade22a88d91262b580c46", "score": "0.5261094", "text": "public function listarTrayectosPropios()\n\t{\n\t\tif($this->session->userdata('logueado'))\n\t\t{\n\t\t\t$this->load->Model('Trayecto_Model');\n\t\t\t$datos['trayectosPropiosEncontrados']=$this->Trayecto_Model->listarTrayectosPropios($this->session->userdata('id'));\n\t\t\t$datos['js']=\"listarTrayectosPropios\";\n\t\t\t$datos['css']=\"listadoTrayectos\";\n\t\t\tenmarcar($this,'usuario/listarTrayectosPropios.php',$datos);\n\t\t}\n\t\telse//SI NO ESTA LOGUEADO LE MANDAMOS AL LOGIN CON UN CAMPO REDIRECCION PARA QUE LUEGO LE LLEVE A LA PAGINA QUE QUERIA\n\t\t{\n\t\t\t$datos['redireccion']='usuario/listarTrayectosPropios';\n\t\t\t$datos['errorLogin']='Por favor inicia sesion';\n\t\t\tenmarcar($this,'index.php',$datos);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "4fe35af1ec837a575b240a8a70caf806", "score": "0.52550554", "text": "private function propiedadesCampos()\n {\n $this->table->setWidth(1000);\n $this->table->cols->id->setVisible(false);\n $this->table->cols->cedula->setLabel(\"C.I.\");\n $this->table->cols->instruccion->setLabel(\"Grado de Instrucción\");\n $this->table->cols->profesion->setLabel(\"Ocupación\");\n\n /**\n * Propiedades de los Campos del Formulario\n *\n * el campo <id> lo desactivamos\n * al campo <apellidos> lo validamos contra ...\n */\n $this->fields->id\n ->disable()->setVisible(false);\n $this->fields->apellidos\n ->setLabel(\"Apellido(s)\")\n ->setWidth(150)\n ->setProperty('maxlength',\"50\")\n/*\n ->addValidator(new P4A_Validate_StringLength(0,25),true)\n*/\n ->addValidator(new P4A_Validate_Alpha(true),true);\n\n $this->fields->apellidos->label->setWidth(120);\n\n return;\n }", "title": "" }, { "docid": "f848e18682e3236ff45a4bf566b60905", "score": "0.52544576", "text": "function admAspirante($accion){\n switch($accion){\n case 'n':\n echo $this->maspirante->agrAspirante();\n break;\n case 'e':\n echo $this->maspirante->editAspirante();\n break;\n } \n }", "title": "" } ]
542399c6eb9206171e8d3b569346a4af
Set the value of prezzo
[ { "docid": "87828a0d04f8c6320171644e6f446c34", "score": "0.68450594", "text": "public function setPrezzo($prezzo)\n {\n $this->prezzo = $prezzo;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "8665df642bec2847c000bf50450ee421", "score": "0.6958307", "text": "public function setPerezoso($val){\n \t\t$this->_perezoso = $val;\n \t}", "title": "" }, { "docid": "535d215ffbfb5524beee8066107bdde4", "score": "0.623448", "text": "public function getPrezzo()\n {\n return $this->prezzo;\n }", "title": "" }, { "docid": "affed7f854cb29f0cd02afee82215a13", "score": "0.61504793", "text": "function setPrecioRetazo() {\n\n}", "title": "" }, { "docid": "c9ac296fb193ed8d3b0138ac1710cd04", "score": "0.59073865", "text": "public function setPrecio($precio){\n $this->precio = $precio;\n }", "title": "" }, { "docid": "4634899ad373a35c7806381916c93f1e", "score": "0.59046584", "text": "public function setPreco($Preco) {\n \t $this->Preco = $Preco;\n \t return $this;\n \t}", "title": "" }, { "docid": "3a86793db37edfdcb9c41d1997ce3e2a", "score": "0.57672155", "text": "function setValue($value){\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "17de8b997d9cfb4f1c6dfc861c15d5fc", "score": "0.57483524", "text": "function set_value($value) {\r\n\t\t$this->value = $value;\r\n\t}", "title": "" }, { "docid": "79caff773ea14b9bf52adaa02b8ed5c0", "score": "0.57219565", "text": "protected function set_value($value){\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "f8c481987b605f9fbef408f5beb71a82", "score": "0.5719527", "text": "function setCarrera($val)\r\n\t { $this->Carrera=$val;}", "title": "" }, { "docid": "f17cd9a4928b63370401d1f6e8cc0c94", "score": "0.5702529", "text": "public function setvalue($value){\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "24bf6ae9f79332f766c95b1c1912f7f0", "score": "0.5658249", "text": "public function setValue( $value );", "title": "" }, { "docid": "4790986101af36baf1cfcb6a58a79a1f", "score": "0.5595865", "text": "private function setValue($value){\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "b2c2754dc31068574a28857b050dd01a", "score": "0.55889946", "text": "function setValue($value) {\r\r\n\t\t$this->value = $value;\r\r\n\t}", "title": "" }, { "docid": "3d43c2625fdf528aa45efc2b98720ce8", "score": "0.5588475", "text": "public function setNaziv($value) { $this->naziv = $value;}", "title": "" }, { "docid": "cc06cc1074feace8539777bb7095900f", "score": "0.55776024", "text": "function setValue($value) {\r\n $this->value = $value;\r\n }", "title": "" }, { "docid": "c716ba49f3a891bfc1f44610705bc3c4", "score": "0.55740124", "text": "public function set($value)\n {\n parent::set(intval($value));\n }", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.5570119", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.5570119", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.5570119", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.5570119", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.5570119", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.5570119", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.5570119", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.5570119", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.5570119", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.5570119", "text": "public function setValue($value);", "title": "" }, { "docid": "3525c296608530aad9ca369320f7c360", "score": "0.55664384", "text": "public function testSetPrecompte() {\n\n $obj = new SalairesAttestation();\n\n $obj->setPrecompte(10.092018);\n $this->assertEquals(10.092018, $obj->getPrecompte());\n }", "title": "" }, { "docid": "3ad856a8687d381175aae0ea3b6bdd1b", "score": "0.5553423", "text": "function setValue( $value )\r\n {\r\n $this -> _value = $value;\r\n }", "title": "" }, { "docid": "c7e59de4ae074bd8016de58086314c1a", "score": "0.5539424", "text": "public function __set($pm, $value) {\n echo \"We set $pm->$value <br/>\";\n }", "title": "" }, { "docid": "7457d8b721997fea7fbc18a1c8a4fd7a", "score": "0.5518901", "text": "public function setPosizione($_posizione){\n\t\t\t$this->posizione=$_posizione;\n\t}", "title": "" }, { "docid": "878c0f0e89cb50d03cdcd5d21c209764", "score": "0.55162334", "text": "public function setPrecio($precio)\n {\n $this->precio = $precio;\n }", "title": "" }, { "docid": "9d0bc0f1da25fe5054ac35ccfa1cbee2", "score": "0.5506106", "text": "public function setBrojKreveta($value) { $this->brojKreveta = $value;}", "title": "" }, { "docid": "5ae63e50c33bbdc1f5325d8248af0e40", "score": "0.54959613", "text": "public function set($value)\n {\n $this->_progess_indicator = $value;\n return $this;\n }", "title": "" }, { "docid": "697ce052f0fbbb74652f4b7cbf3d0dd3", "score": "0.5484035", "text": "public function setValue($value){\n\t\t$this->value=$value;\n\t}", "title": "" }, { "docid": "f3b64cd855074b4daa791f177fc8e1cd", "score": "0.5480688", "text": "public function setPrecio($precio) {\n $this->precio = $precio;\n }", "title": "" }, { "docid": "fcac5135cc0f52def86584b5adc389c1", "score": "0.54456127", "text": "public function setValue($value)\n\t{\n\n\t}", "title": "" }, { "docid": "4867623a0a47cd0030723dbb390672fc", "score": "0.5441252", "text": "function setValue($value)\n {\n $this->_value = $value;\n }", "title": "" }, { "docid": "a67fe9b737e3d3988edc252e91eb3203", "score": "0.54341096", "text": "public function setPuestoAttribute( $value = \"\"){\n \n //sacamos los espacios en el valor recibido\n $value = trim( $value );\n //reemplazamos los espacios en guiones del valor recibido\n $value = str_replace( ' ','_', $value);\n //convertimos el valor recibido a minusculas\n $value = strtolower( $value );\n //asignamos el valor al atributo del Modelo\n $this->attributes['puesto'] = $value;\n\n }", "title": "" }, { "docid": "3ab59e60e44716117566837413025789", "score": "0.5430654", "text": "public function set_value ($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "cf87236e7d01f043f38b08922bbd81df", "score": "0.5426386", "text": "public function set_value($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "acc7e8c45ae0482ababb1e1ef2f0194e", "score": "0.54234207", "text": "public function setCodigoRazonAttribute($value)\n {\n \t$this->attributes['codigo_razon'] = str_replace('.', '', strtoupper( trim($value) ) );\n }", "title": "" }, { "docid": "455f24ac6bee4785633b8755eefe6131", "score": "0.538624", "text": "private function _dataDeCoop($value)\r\n {\r\n # $value es el número de prestacion en Coop\r\n\r\n $strConn = \"https://isp.coop5.com.ar/buscarPrest.php?id=27&toquen=76a850bcefcceb388f751271da3c6150&prest=\".$value;\r\n\r\n $dataJson = file_get_contents($strConn);\r\n $dataArr = json_decode($dataJson, true);\r\n\r\n $this->_nombre = $dataArr['nombre'];\r\n $this->_direccion = $dataArr['calle_nro'];\r\n $this->_localidad = $dataArr['localidad'];\r\n $this->_telefono = $dataArr['telefono'];\r\n $this->_planIptv = $dataArr['planIptv'];\r\n }", "title": "" }, { "docid": "0f493668d4abbd679b03bb4c3c1ec7f6", "score": "0.5372183", "text": "public function set_tarja($valor){\n if($valor==\"verde\" || $valor==\"vermelha\" || $valor==\"preta\"){\n $this->tarja = $valor;\n }\n else{\n echo \"Valor de tarja inválido.\";\n }\n }", "title": "" }, { "docid": "052bab3b400ea920032e94ec223d6a74", "score": "0.5371861", "text": "public function setMetaValueAttribute($value)\n {\n if (! is_null($value)) {\n $value = $value ? 1 : 0;\n }\n parent::setMetaValueAttribute($value);\n }", "title": "" }, { "docid": "5951a7088c341801f91f40252d37c5f5", "score": "0.5349008", "text": "public function setProperty($newval)\n {\n $this->price = $newval;\n }", "title": "" }, { "docid": "48029d76c13e1aa297937b7e8b3e1b27", "score": "0.53474903", "text": "public function getPreco() {\n \t return $this->$Preco;\n \t}", "title": "" }, { "docid": "86a3fdffdd6f04457903ac04659358b2", "score": "0.5329657", "text": "public function set();", "title": "" }, { "docid": "7d7942a5207c45bd399894d87a7b7933", "score": "0.53238845", "text": "public function setProvinciaAttribute( $value = \"\"){\n \n //sacamos los espacios en el valor recibido\n $value = trim( $value );\n //reemplazamos los espacios en guiones del valor recibido\n $value = str_replace( ' ','_', $value);\n //convertimos el valor recibido a minusculas\n $value = strtolower( $value );\n //asignamos el valor al atributo del Modelo\n $this->attributes['provincia'] = $value;\n \n }", "title": "" }, { "docid": "cd8d8ef476d2540ca8678125fa974e9f", "score": "0.5321389", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "3fe02666fe2ce95dbcfee80b18c1c360", "score": "0.5321021", "text": "function setOptionMetaValue($value)\n {\n $this->__ometa_value = $value ;\n }", "title": "" }, { "docid": "b40b3c447113caa7aaaa283b195265cb", "score": "0.53126544", "text": "public function __construct($value) {\n $this->value= $value;\n }", "title": "" }, { "docid": "e0e8942b19a2f5cdde4cbfc723f8fb6e", "score": "0.53058875", "text": "protected function setValueForFront()\n {\n $this->value = !Util::count($this->value) ? null : (($key = $this->valueKeyName($this->value)) ? $this->value->pluck($key) : Util::decode($this->value));\n }", "title": "" }, { "docid": "72ce6d16969a1b6f15fd8f2c19afc7f4", "score": "0.5304622", "text": "function setPro_peso($pro_peso) {\n $this->pro_peso = str_replace(',', '.', $pro_peso);\n \n }", "title": "" }, { "docid": "307532cfbee037e0b8ef8fd0ffc5212f", "score": "0.52924013", "text": "function setPro_peso($pro_peso) {\n $this->pro_peso = str_replace(',', '.', $pro_peso);\n\n }", "title": "" }, { "docid": "e038cd77baf0d39cf9881216b3630124", "score": "0.5291222", "text": "abstract public function setValue($value);", "title": "" }, { "docid": "6a7c5b20428bcee59928895331b4b6f7", "score": "0.5283231", "text": "public function setValue($value)\r\n {\r\n $this->value = $value;\r\n }", "title": "" }, { "docid": "bdba9748f1426017a605c543b1f9a3f4", "score": "0.52811176", "text": "public function setPRENOM($PRENOM)\n{\n$this->PRENOM = $PRENOM;\n\nreturn $this;\n}", "title": "" }, { "docid": "2e8d7a2b8d8a405902ec90ba5fa3783c", "score": "0.5277391", "text": "private function __construct($value)\r\n {\r\n $this->value = $value;\r\n }", "title": "" }, { "docid": "2e8d7a2b8d8a405902ec90ba5fa3783c", "score": "0.5277391", "text": "private function __construct($value)\r\n {\r\n $this->value = $value;\r\n }", "title": "" }, { "docid": "2b27b63ad30b2f3a44525dbaf7e3a984", "score": "0.5268621", "text": "public function set_prova(Prova $object)\n {\n $this->prova = $object;\n $this->prova_id = $object->id;\n }", "title": "" }, { "docid": "b515962d5fda4e5ebfa4f32eaed936c8", "score": "0.52558213", "text": "protected function _set_value($value)\n\t{\n\t\t$this->_value = $value;\n\t}", "title": "" }, { "docid": "a6fee4e90a635d1ec3f87add7b069a45", "score": "0.52556324", "text": "public function setData($data){\n $this->data_nascimento = $data;\n }", "title": "" }, { "docid": "d776283858fbc1d75ec682660caa14d0", "score": "0.525076", "text": "public function setValue($s) {$this->_value = $s;}", "title": "" }, { "docid": "3e054140389d0c8e16b3c446c1e21097", "score": "0.5248595", "text": "public function setting() {\n\t}", "title": "" }, { "docid": "acbee5abf59af9427b39e83454708a21", "score": "0.524736", "text": "public function set($data) \r\n { \r\n $this->libelle = $data['libelle'];\r\n }", "title": "" }, { "docid": "cd4e3b5d5c33722dcbde237041c8cb66", "score": "0.5246419", "text": "public function setValue($var) {}", "title": "" }, { "docid": "cd4e3b5d5c33722dcbde237041c8cb66", "score": "0.5246419", "text": "public function setValue($var) {}", "title": "" }, { "docid": "cd4e3b5d5c33722dcbde237041c8cb66", "score": "0.5246419", "text": "public function setValue($var) {}", "title": "" }, { "docid": "cd4e3b5d5c33722dcbde237041c8cb66", "score": "0.5246419", "text": "public function setValue($var) {}", "title": "" }, { "docid": "cd4e3b5d5c33722dcbde237041c8cb66", "score": "0.5246419", "text": "public function setValue($var) {}", "title": "" }, { "docid": "cd4e3b5d5c33722dcbde237041c8cb66", "score": "0.5246419", "text": "public function setValue($var) {}", "title": "" }, { "docid": "cd4e3b5d5c33722dcbde237041c8cb66", "score": "0.5246419", "text": "public function setValue($var) {}", "title": "" }, { "docid": "cd4e3b5d5c33722dcbde237041c8cb66", "score": "0.5246419", "text": "public function setValue($var) {}", "title": "" }, { "docid": "cd4e3b5d5c33722dcbde237041c8cb66", "score": "0.5246419", "text": "public function setValue($var) {}", "title": "" }, { "docid": "cd4e3b5d5c33722dcbde237041c8cb66", "score": "0.5246419", "text": "public function setValue($var) {}", "title": "" }, { "docid": "cd4e3b5d5c33722dcbde237041c8cb66", "score": "0.5246419", "text": "public function setValue($var) {}", "title": "" }, { "docid": "cd4e3b5d5c33722dcbde237041c8cb66", "score": "0.5246419", "text": "public function setValue($var) {}", "title": "" }, { "docid": "7ba12b5efe75d0d82984d502d41a1d35", "score": "0.52384996", "text": "public function setValue($value) {\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "f7ddb30f7a8b8c59a3e1f07ac77a570c", "score": "0.5223328", "text": "private function setPizza(Pizza $pizza) {\n $this->pizza = $pizza;\n// $this->prezzo_pizza = $pizza->getPrezzo();\n return true;\n }", "title": "" }, { "docid": "190ab75c840105519a6563f3c8ff756b", "score": "0.52218765", "text": "private function __construct($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "5f3a64954b9f416b3530548fecb7fd26", "score": "0.52141875", "text": "public function setValue($value) {\r\n\t\t$this->value = $value;\r\n\t}", "title": "" }, { "docid": "8b6f327664f47a2c43881848da11079a", "score": "0.5211546", "text": "public function __construct($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "8b6f327664f47a2c43881848da11079a", "score": "0.5211546", "text": "public function __construct($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "6b49d925c23ffee91d63bf5d7acdff88", "score": "0.52107525", "text": "abstract function setValue($value);", "title": "" }, { "docid": "3e803b4469ec9a89b21554a8e8821cc2", "score": "0.5207192", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "3e803b4469ec9a89b21554a8e8821cc2", "score": "0.5207192", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "3e803b4469ec9a89b21554a8e8821cc2", "score": "0.5207192", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "3e803b4469ec9a89b21554a8e8821cc2", "score": "0.5207192", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "3e803b4469ec9a89b21554a8e8821cc2", "score": "0.5207192", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "3e803b4469ec9a89b21554a8e8821cc2", "score": "0.5207192", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "3e803b4469ec9a89b21554a8e8821cc2", "score": "0.5207192", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "3634192a3e40b875510fcb874d6324f2", "score": "0.5206476", "text": "public function setTesto($testo){\n $this->testo = $testo;\n }", "title": "" }, { "docid": "eeb79959586914d28cbd0332990e6d8f", "score": "0.52002937", "text": "function setBombeProche($nb){\r\n\t\t\t$this->bombeP = $nb;\r\n\t\t}", "title": "" }, { "docid": "0744078807db605def655295eb0d9fe8", "score": "0.5188991", "text": "function set($data) {\n\t\tforeach ($data as $llave => $valor) {\n\t\t\tif (is_array($valor)) {\n\t\t\t\tif($llave == 'cursos'){\n\t\t\t\t\tpoblarArregloObjetos(&$valor, 'Curso');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this -> ${llave} = $valor;\n\t\t}\n\t}", "title": "" }, { "docid": "06c0c99d4a78298321bbdc0c21cdee3e", "score": "0.51858413", "text": "public function __construct($value){\n\t\t$this->value = $value;\n\t\t$this->is = 'value';\n\t}", "title": "" }, { "docid": "20a4f1ea724601b6e0c8802276700496", "score": "0.51835513", "text": "public function setData($value)\n\t{\n\t\t$this->data = $value;\n\t}", "title": "" }, { "docid": "821541187d9f6059b61c3f208f505fdc", "score": "0.5180918", "text": "public function setPrenote($prenote) {\n\t\t$this->prenote = $prenote;\n\t}", "title": "" }, { "docid": "4fc55891a2ced47ccbc2e52b34d9875b", "score": "0.5179202", "text": "abstract protected function setValue($value);", "title": "" }, { "docid": "d5c28dc35e1c8d266fde97e2b75f52d1", "score": "0.51744616", "text": "public function setGenero($p_genero){\r\n\t$this->genero=$p_genero;\r\n}", "title": "" }, { "docid": "9ed65e20065d3c56e2234de38e278bb7", "score": "0.5173523", "text": "function setValue($value, $obj = null) {\n\t\t$this->value = 0;\n\t\tif (is_array($value)) foreach($value as $bit => $_) {\n\t\t\t$this->value |= $bit;\n\t\t} elseif(is_numeric($value)) {\n\t\t\t$this->value = $value;\n\t\t}\n\t}", "title": "" } ]
84d4c1de66cb12207cb5a5db2e8747cf
Creates a DmMediaForm instance for screenshot
[ { "docid": "60085363d1911f73037d4dd3386633c6", "score": "0.89105475", "text": "protected function createMediaFormForScreenshot()\n {\n return DmMediaForRecordForm::factory($this->object, 'screenshot', 'Screenshot', $this->validatorSchema['screenshot']->getOption('required'));\n }", "title": "" } ]
[ { "docid": "133e73899917f7df58c5e4aa7ee6b818", "score": "0.68947065", "text": "protected function createMediaFormForThumbnail()\n {\n return DmMediaForRecordForm::factory($this->object, 'thumbnail', 'Thumbnail', $this->validatorSchema['thumbnail']->getOption('required'));\n }", "title": "" }, { "docid": "00b3eb041be174ade55db1c726f6f1a9", "score": "0.60814077", "text": "protected function form()\n {\n $form = new Form(new PageDesignerEmbed());\n\n $form->image('thumb', __('Thumb'))->thumbnailFunction('medium', function ($image) {\n $image->resize(1024, 1024, function ($constraint) {\n $constraint->aspectRatio();\n $constraint->upsize();\n });\n\n return $image;\n });\n $form->file('thumb_video', __('Thumb Video'));\n $form->textarea('embed', __('Embed'));\n\n $form = $this->extractEmbedDataOnSave($form);\n\n return $form;\n }", "title": "" }, { "docid": "a2a0485bdeec01ffdd85c61256be5535", "score": "0.56721133", "text": "protected function form()\n {\n $form = new Form(new Image());\n\n $form->image('image_route', __('图集'))->uniqueName();\n $form->select('school_id', __('对应分校'))->options(Image::getSelect())->default(1);\n\n return $form;\n }", "title": "" }, { "docid": "ce0dba0260165a4dcdbf85a3ddd7c844", "score": "0.5619602", "text": "private function createCreateMedForm(MedicalFormsFieldsets $entity, $idf = null,$idfp = null) {\n $form = $this->createForm(new MedicalFormsFieldsetsMedType(), $entity, array(\n 'action' => $this->generateUrl('medicalformsfieldsets_create_med'),\n 'method' => 'POST',\n 'idfp' => $idfp,\n 'idf' => $idf,\n ));\n $em = $this->getDoctrine()->getManager();\n\n if ($idf !== null):\n \n $entityF = $em->getRepository('AppBundle:MedicalForms')->find($idf);\n if ($entityF):\n $form->get('medicalForm')->setData($entityF);\n else:\n throw $this->createNotFoundException('Unable to find MedicalForms entity.');\n endif;\n else:\n throw $this->createNotFoundException('Unable to find MedicalForms entity, id null.');\n endif;\n \n \n $entityFd = $em->getRepository('AppBundle:MedicalFormsFieldsets')->find($idfp);\n if ($entityFd):\n $form->get('page')->setData($entityFd);\n else:\n throw $this->createNotFoundException('Unable to find MedicalFormsFieldsets entity.');\n endif;\n\n \n return $form;\n }", "title": "" }, { "docid": "a5d162b794867d633ad75ac9c57e1810", "score": "0.56023544", "text": "protected function form()\n {\n $form = new Form(new CollectCard);\n $form->hidden('token')->default(session('wxtoken'));\n $form->switch('status', '状态');\n $form->text('title', '活动标题');\n $form->select('theme', '活动主题')->options($this->theme);\n $form->radio('type', '发奖方式')->options($this->type)->default(1)->stacked();\n\n $form->switch('subscribe_sw', '强制关注')->help('需要关注公众号才能进入活动(抽卡)');\n $form->text('sub_text', '引导关注语')->placeholder('例:请先关注公众号才能参与活动');\n// $form->switch('reader_sw', '读者开关')->help('需要绑定读者证才能进入活动!');\n $form->datetime('start_at', '开始时间')->format('YYYY-MM-DD HH:mm')->default(date('Y-m-d H:i'));\n $form->datetime('end_at', '结束时间')->format('YYYY-MM-DD HH:mm')->default(date('Y-m-d H:i'))\n ->help('注:如发奖方式为定时发奖,活动结束后会进行20分钟的开奖倒计时,倒计时完成之后方可领奖');\n $form->switch('giving_sw', '赠送开关');\n $form->number('privilege_n', '先参与特权人数')->help('先参与的人可优先获得特殊任务的机会!');\n $form->editor('description', '活动规则');\n $form->text('share_title', '分享标题');\n $form->text('share_desc', '分享描述');\n $form->image('share_img', '分享封面')->move(materialUrl())->uniqueName();\n\n /* 素材库 上传图片 例子 start */\n $form->hidden(config('materialPR') . 'share_img');\n $imgArray = [config('materialPR') . 'share_img'];\n $form->ignore($imgArray);\n /* 素材库 上传图片 例子 end */\n $form->saving(function (Form $form) use ($imgArray) {\n foreach ($imgArray as $k => $v) {\n if (\\request()->input($v)) {\n $imgName = substr($v, strlen(config('materialPR')));\n $form->model()->$imgName = \\request()->input($v);\n }\n }\n unset($k, $v);\n });\n\n $form->saved(function (Form $form) {\n if (request()->isMethod('post')) {\n $creates = $this->initTask($form->model()->token, $form->model()->id);\n DB::table('w_collect_card_t')->insert($creates);\n }\n //更新缓存\n Cache::forget('collectCard:conf:' . $form->model()->token . ':' . $form->model()->id);\n //定时类型任务才加入队列\n if ($form->model()->type != 1 && $form->model()->is_prize != 1) {\n CollectCardJob::dispatch($form->model()->id, $form->model()->updated_at)\n ->delay(now()->parse($form->model()->end_at))->onQueue('collect');\n }\n });\n\n return $form;\n }", "title": "" }, { "docid": "1db2463b98e0519585548240d3d08cd7", "score": "0.5524404", "text": "protected function form()\n {\n $form = new Form(new Imagewechat());\n $form->display('id', 'ID');\n // 添加text类型的input框\n $form->text('caption', '描述');\n $form->number('order', '排序')->default(0)->rules('required');\n\n /* 素材库 上传图片 例子 start */\n $form->image('image')->move(materialUrl())->uniqueName();\n\n $form->hidden(config('materialPR') . 'image');\n $imgArray = [config('materialPR') . 'image'];\n $form->ignore($imgArray);\n /* 素材库 上传图片 例子 end */\n\n $form->url('url');\n\n $states = [\n 'on' => ['value' => 1, 'text' => '显示', 'color' => 'primary'],\n 'off' => ['value' => 0, 'text' => '隐藏', 'color' => 'default'],\n ];\n $form->switch('status', '状态')->states($states);\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n\n $form->hidden('token')->default(session('wxtoken'));\n $form->footer(function ($footer) {\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck(false);\n });\n $form->saving(function (Form $form) use ($imgArray) {\n\n foreach ($imgArray as $k => $v) {\n if (\\request()->input($v)) {\n $imgName = substr($v, strlen(config('materialPR')));\n $form->model()->$imgName = \\request()->input($v);\n }\n }\n unset($k, $v);\n });\n\n $form->saved(function (Form $form) {\n if (request()->isMethod('PUT')) {\n Cache::forget('vueIndex:img:' . $form->model()->token);\n }\n });\n return $form;\n }", "title": "" }, { "docid": "cb8b96789b51762a69270061b72f62c0", "score": "0.5489208", "text": "protected function Form_Create() {\n\t\t\t$this->imgSample = new QImageControl($this);\n\t\t\t$this->imgSample->ImagePath = 'earthlights.jpg';\n\t\t\t$this->imgSample->Width = 400;\n\t\t\t$this->imgSample->Height = 250;\n\t\t\t$this->imgSample->CssClass = 'image_canvas';\n\t\t\t\n\t\t\t$this->txtWidth = new QIntegerTextBox($this);\n\t\t\t$this->txtWidth->Minimum = 0;\n\t\t\t$this->txtWidth->Maximum = 1000;\n\t\t\t$this->txtWidth->Name = 'Width';\n\t\t\t$this->txtWidth->Text = 400;\n\t\t\t\n\t\t\t$this->txtHeight = new QIntegerTextBox($this);\n\t\t\t$this->txtHeight->Minimum = 0;\n\t\t\t$this->txtHeight->Maximum = 700;\n\t\t\t$this->txtHeight->Name = 'Height';\n\t\t\t$this->txtHeight->Text = 250;\n\t\t\t\n\t\t\t$this->chkScaleCanvasDown = new QCheckBox($this);\n\t\t\t$this->chkScaleCanvasDown->Checked = false;\n\t\t\t$this->chkScaleCanvasDown->Text = 'Scale Canvas Down';\n\n\t\t\t$this->btnUpdate = new QButton($this);\n\t\t\t$this->btnUpdate->Text = 'Update Image';\n\t\t\t$this->btnUpdate->AddAction(new QClickEvent(), new QAjaxAction('btnUpdate_Click'));\n\t\t\t$this->btnUpdate->CausesValidation = true;\n\t\t}", "title": "" }, { "docid": "3f8b2bc11aef21af5d2f3814d6e1c966", "score": "0.541819", "text": "public function create()\n {\n return View::make('media::create');\n }", "title": "" }, { "docid": "5107397851b7985e0fd730e67f07928f", "score": "0.5395216", "text": "function screnshot_save_form() {\n\tglobal $CONF_BASE_SSP;\n\tif(!mujpc())\n\t\treturn;\n\tob_start();\n?>\n\t\t<form method=\"POST\" enctype=\"multipart/form-data\" id=\"save_screenshot\" action=\"<?=$CONF_BASE_SSP.\"save_screenshot.php\"?>\">\n\t\t <input type=\"hidden\" name=\"aplikace_id\" value=\"<?=APLIKACE_ID?>\" />\n\t\t <input type=\"hidden\" name=\"type\" value=\"save_screenshot\" />\n\t\t <input type=\"hidden\" name=\"session_id\" value=\"<?=session_id()?>\" />\n\t\t <input type=\"hidden\" name=\"img_val\" id=\"img_val\" value=\"\" />\n\t\t</form>\n<?\n\treturn ob_get_clean();\n}", "title": "" }, { "docid": "f70292b4ea7c302fae8797b853b455ac", "score": "0.53736156", "text": "public function make()\n {\n // Add registered image sizes.\n $this->addImages();\n\n // Add sizes to the media attachment settings dropdown list.\n add_filter('image_size_names_choose', array($this, 'addImagesToDropDownList'));\n\n return $this;\n }", "title": "" }, { "docid": "cf5d14bd0ae643972a985a044df964a7", "score": "0.5351749", "text": "protected function form()\n {\n $form = new Form(new BlogNavShareOne);\n $form->select('nav_id', '所属导航')->options($this->nav_name)->rules('required|integer');\n $form->text('share_title', '分享标题')->attribute('autocomplete', 'off')->required()->rules('required|max:40');\n $form->icon('share_icon', 'icon图标')->help('更多icon图标访问 <a href=\"https://fontawesome.com\" target=\"_blank\">https://fontawesome.com</a>,填写该icon完整引用,示例[fab fa-php、far fa-futbol]')->rules('required');\n $form->text('share_link', '分享链接')->rules('url');\n $form->image('share_src', '分享封面')->uniqueName()->attribute('accept', 'image/*')->required();\n $form->number('share_sort', '分享排序')->default(100)->rules('integer|between:0,999999');\n $states = [\n 'on' => ['value' => 1, 'text' => '显示', 'color' => 'info'],\n 'off' => ['value' => 2, 'text' => '隐藏', 'color' => 'danger'],\n ];\n $form->switch('share_show', '是否显示')->states($states)->default(1);\n $form->textarea('share_intro', '分享描述');\n $form->simditor('share_describe', '详情内容');\n\n return $form;\n }", "title": "" }, { "docid": "68b8dd8232618c5cc361bfad712f7c64", "score": "0.53389233", "text": "protected function form()\n {\n $form = new Form(new Post());\n $form->image('picture','Main image')->removable()->downloadable();\n $form->text('title', __('Title'))->required();\n $form->text('slug', __('Slug'));\n $form->textarea('description', __('SEO description'));\n $form->textarea('keywords', __('SEO keywords'));\n $form->simplemde('post', 'Post');\n $form->select('category_id','Category')->options(Category::all()->pluck('name','id'))->required();\n $form->select('user_id', 'Author')->options(User::all()->pluck('name','id'))->required();\n $form->multipleSelect('tags','Tags')->options(Tag::all()->pluck('name','id'))->required();\n $states = [\n 'ON' => ['value' => 1, 'text' => 'ON', 'color' => 'primary'],\n 'OFF' => ['value' => 2, 'text' => 'OFF', 'color' => 'danger'],\n ];\n $form->switch('status', 'Status')->states($states);\n $form->datetime('created_at', __('Created at'));\n return $form;\n }", "title": "" }, { "docid": "c18231c08774ac5770cfdd668ac0a91a", "score": "0.5321025", "text": "protected function createMediaField($name, $label, $defaultValue, array $options = [])\n {\n $element = new Form\\Field\\Media($name);\n $element->fromArray($options);\n $element->setLabel($label);\n $element->setDefaultValue($defaultValue);\n\n return $element;\n }", "title": "" }, { "docid": "c3cc7a61f84390ca165624cb8a7f7e63", "score": "0.5310785", "text": "protected function form()\n {\n $form = new Form(new IndexCarousel);\n\n $form->image('img_local', '轮播图')->move('images/carousel')->rules('required|max:150');\n $form->text('img_title', '图片标题')->rules('max:100');\n $form->url('img_url', '图片链接地址')->rules('required|max:150');\n $form->number('sort', '排序顺序(越小越靠前)')->default(1)->min(0)->max(255);\n $form->switch('is_enable', '是否启用')->default(1);\n\n return $form;\n }", "title": "" }, { "docid": "241c7b3ea7cc9a24b982902a3e35433c", "score": "0.52928317", "text": "protected function form()\n {\n $form = new Form(new BlogNavMusic);\n $form->select('nav_id', '所属导航')->options($this->nav_name)->rules('required|integer');\n $form->text('music_title', '歌单标题')->attribute('autocomplete', 'off')->required()->rules('required|max:40');\n $form->tags('music_tag', '歌单标签')->help('建议使用标签总数量不超过6个');\n $form->textarea('music_describe', '歌单描述')->rules('required');\n $form->image('music_img', '歌单封面')->uniqueName()->attribute('accept', 'image/*')->required();\n\n $form->number('music_click', '点击量')->default(0)->rules('integer|between:0,999999');\n $form->number('music_sort', '歌单排序')->default(100)->rules('integer|between:0,999999');\n $states = [\n 'on' => ['value' => 1, 'text' => '显示', 'color' => 'info'],\n 'off' => ['value' => 2, 'text' => '隐藏', 'color' => 'danger'],\n ];\n $form->switch('music_show', '是否显示')->states($states)->default(1);\n $play = [\n 'on' => ['value' => 1, 'text' => '是', 'color' => 'info'],\n 'off' => ['value' => 2, 'text' => '否', 'color' => 'danger'],\n ];\n $form->switch('music_play', '添加播放列表')->states($play)->default(1);\n $form->multipleFile('music_json', '所属歌曲')->attribute('accept', 'audio/*')->removable()->sortable();\n return $form;\n }", "title": "" }, { "docid": "873591dffda0f3e5f3b9362b92fd8d1d", "score": "0.52880925", "text": "public function create()\n {\n return view('media.create');\n }", "title": "" }, { "docid": "603cc75a847c1bf6e5b1300d6b8c81cc", "score": "0.52781624", "text": "protected function form()\n {\n $form = new Form(new Advert);\n $form->text('alt', '摘要');\n $form->text('url', '网址'); \n $form->text('image_url', '图片网址'); \n $form->text('image_path', '图像路径'); \n $form->number('views', '查看号码'); \n $form->number('clicks', '点击号码');\n $form->boolean('active', '活性'); \n $form->number('active_category_id', '活动类别ID'); \n $form->timestamp('viewed_at', '观看时间');\n\n return $form;\n }", "title": "" }, { "docid": "491d923017e8c775a8feb1248d08f5be", "score": "0.52586466", "text": "protected function form()\n {\n $form = new Form(new MDMEmailTemplate);\n\n $form->text('name', 'Name');\n $form->select('group', 'Group')->options($this->arrayGroup);\n $form->textarea('text', 'Text')->rows(20);\n $form->switch('status', 'Status');\n\n return $form;\n }", "title": "" }, { "docid": "77ec507e6c02cad2a614e2f22ce0942a", "score": "0.523861", "text": "public function create() {\n return view('media::create');\n }", "title": "" }, { "docid": "d78990687689580c51022fa1174b1119", "score": "0.52333635", "text": "protected function form()\n {\n $form = new Form(new Film());\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n }); \n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n $types=[\n '0'=>'同步',\n '1'=>'不同步'\n ];\n $form->switch('display_mark', __('狀態'))->default('1');\n $form->text('name', __('名稱'))->rules('required|max:250')->help('字數限制:250字元');\n $form->url('href', __('網址'))->rules('required|max:250')->help('字數限制:100字元');\n $form->select('type', __('分類'))->options($types)->rules('required');\n $form->datetime('ontime', __('開始時段'))->rules('required');\n $form->datetime('offtime', __('結束時段'))->rules('required');\n $form->time('long', __('影片長度'))->rules('required');\n $form->textarea('description', __('描述'))->rules('required|max:500')->help('字數限制:500字元');\n $form->ckeditor('content', __('內容'))->rules('required|max:500000')->help('字數限制:500000字元');\n\n return $form;\n }", "title": "" }, { "docid": "4c7e0618279e755544e88523da42bc88", "score": "0.5221176", "text": "protected function form()\n {\n $form = new Form(new Image());\n\n $form->text('name', __('Názov'));\n $form->image('path')->move('public/product_images')->uniqueName();\n $form->switch('thumbnail', __('Thumbnail (hlavná fotka)'));\n\n $product_options = [];\n $products = \\App\\Product::all();\n foreach ( $products as $product) {\n $product_options[$product->id] = $product->title;\n }\n\n\n $form->select('product_id', 'Produkt')->options($product_options);\n\n return $form;\n }", "title": "" }, { "docid": "11cb9545cb63ff203443859bbce4e286", "score": "0.5220253", "text": "protected function form()\n {\n $form = new Form(new Article);\n\n $form->text('title', __('Title'));\n $form->textarea('top_img', __('Top img'));\n $form->textarea('body', __('Body'));\n $form->text('media_type', __('Media type'));\n $form->textarea('media_url', __('Media url'));\n $form->text('multi_imgs', __('Multi imgs'));\n $form->decimal('price', __('Price'))->default(0.00);\n $form->number('zan_count', __('Zan count'));\n $form->number('user_id', __('User id'));\n $form->switch('status', __('Status'))->default(2);\n\n return $form;\n }", "title": "" }, { "docid": "e9f0943061889af347ccfcb6d2c90c00", "score": "0.52136886", "text": "function richmedia_add_instance($data, $mform = null) {\n global $DB;\n\n if (is_int($data->referenceslides)) {\n $data->referenceslides = '';\n }\n if (is_int($data->referencesxml)) {\n $data->referencesxml = '';\n }\n if (is_int($data->referencesvideo)) {\n $data->referencesvideo = '';\n }\n if (is_int($data->referencesfond)) {\n $data->referencesfond = '';\n }\n if (is_int($data->referencessubtitles)) {\n $data->referencessubtitles = '';\n }\n \n $id = $DB->insert_record('richmedia', $data);\n \n $DB->set_field('course_modules', 'instance', $id, array('id' => $data->coursemodule));\n \n $richmedia = new richmedia($id);\n\n if ($mform) {\n $richmedia->set_referenceslides($mform, false);\n \n $richmedia->set_referencesxml($mform, false);\n\n $richmedia->set_referencesvideo($mform, false);\n\n $richmedia->set_referencesfond($mform, false);\n\n $richmedia->set_referencessubtitles($mform, false);\n }\n \n $richmedia->save();\n\n $richmedia->generate_xml();\n\n return $richmedia->id;\n}", "title": "" }, { "docid": "40bd09768fd3efe664eecee05c04308b", "score": "0.52125704", "text": "protected function form()\n {\n $form = new Form(new Movie());\n\n $form->display('id', 'ID');\n $form->keyValue('title')->rules('required|min:5');\n// $form->list('title')->rules('required|min:5')->min(2)->max(10);\n// $form->text('title', __('Title'))->required();\n// $directors = [\n// 1 => 'John',\n// 2 => 'Smith',\n// 3 => 'Kate',\n// ];\n// $form->select('director', '导演')->options($directors);\n //添加滑动\n $form->slider('director','电影')->options([\n 'max' => 100,\n 'min' => 1,\n 'step' => 1,\n 'postfix' => 'years old'\n ]);\n $form->number('rate', '打分');\n $form->datetime('release_at', '发布时间');\n $form->datetime('create_time', '创建时间');\n $form->datetime('update_time', '更新时间');\n $form->textarea('describe', '简介');\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n });\n if ($form->isCreating()) {\n $form->confirm('确定提交吗', 'create');\n }\n if($form->isEditing()){\n $form->confirm('确定提交吗', 'edit');\n }\n return $form;\n }", "title": "" }, { "docid": "fca74b8ebd022f24cd71ac0bdeb8a69d", "score": "0.5208536", "text": "protected function form()\n {\n $form = new Form(new GreetingcardModel);\n\n $form->display('id', 'ID');\n\n $form->text('title', 'Title');\n $form->editor('content', 'Content');\n $form->select('type', 'Type')->options(GreetingcardModel::getTypes());\n $form->date('date', 'Date')->help(\"只有节日贺卡才需要设置日期,比如指定中秋节是哪一天\");\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n\n\n return $form;\n }", "title": "" }, { "docid": "1c8ee96dc5a5087c61e7c9e26a5a29fa", "score": "0.5204418", "text": "public function createForm();", "title": "" }, { "docid": "3c132dfbee7abc57574ccb41c775b501", "score": "0.5197074", "text": "public function init() {\n $this->setMethod('post');\n $this->setAttrib('enctype', 'multipart/form-data');\n \n $id = $this->createElement('hidden', 'id');\n $id->setRequired(FALSE);\n $id->setAttrib('size', 4);\n $id->addFilter('Digits');\n $id->addValidator('Digits');\n $this->addElement($id);\n \n $pageTitle = $this->createElement('text', 'pageTitle');\n $pageTitle->setLabel('Screenshot title:');\n $pageTitle->setRequired(TRUE);\n $pageTitle->setAttrib('size', 40);\n $pageTitle->addFilter('StringTrim');\n $pageTitle->addValidator('StringLength', FALSE, array(3, 80));\n $this->addElement($pageTitle);\n \n $gameId = new Zend_Form_Element_Select('gameId');\n $gameId->setLabel('Game: ')\n ->setRequired(true);\n $gameList = Zend_Registry::get('gameMapper')->fetchAll(array(), $order = 'name');\n foreach ($gameList as $game) {\n \t$gameId->addMultiOption($game->id, $game->name);\n }\n $this->addElement($gameId);\n \n $description = $this->createElement('textarea', 'description');\n $description->setLabel('Description:');\n $description->setRequired(TRUE);\n $description->setAttrib('cols',40);\n $description->setAttrib('rows',10);\n $description->addFilter('StringTrim');\n $this->addElement($description);\n \n $tags = new Application_Form_Element_TagsMultiCheckbox('tags');\n $tags->setLabel('Tags:');\n $this->addElement($tags);\n \n $published = new Zend_Form_Element_Checkbox('published');\n $published->setLabel('Published: ')\n \t\t ->addValidator('NotEmpty')\n \t\t ->setValue(true);\n $this->addElement($published);\n \n $pubDate = $this->createElement('text', 'pubDate');\n $pubDate->setLabel('Publication date (yyyy-mm-dd):');\n $pubDate->setRequired(TRUE);\n $pubDate->setAttrib('size', 10);\n $pubDate->addFilter('StringTrim');\n $date = Zend_Date::now();\n $pubDate->setValue($date->get('yyyy-MM-dd') );\n $pubDate->addValidator('Date', FALSE, array('format' => 'yyyy-MM-dd'));\n $pubDate->class = \"datePicker\";\n $this->addElement($pubDate);\n \n $resolution00 = $this->createElement('text', 'resolution00');\n $resolution00->setLabel('Screenshot:');\n $resolution00->setDescription('<a href=\"javascript:mcImageManager.browse({fields : \\'resolution00\\', relative_urls : true });\">[MCImageManager]</a>');\n $resolution00->getDecorator('Description')->setOption('escape', false);\n $resolution00->setRequired(TRUE);\n $resolution00->setAttrib('size', 40);\n $resolution00->addFilter('StringTrim');\n $resolution00->addValidator('StringLength', FALSE, array(3, 80));\n $this->addElement($resolution00);\n \n // Add the submit button\n $this->addElement('submit', 'submit', array(\n \t\t'ignore' => true,\n \t\t'label' => 'Submit',\n ));\n }", "title": "" }, { "docid": "fb02db329877a20b0e51ec60d24f4609", "score": "0.5186247", "text": "public function create()\n {\n $items = Work::all();\n return view('pages.admin.screenshot.create', ['items' => $items]);\n }", "title": "" }, { "docid": "9c782e417a535c8c05488a3c5fd9430d", "score": "0.51819646", "text": "protected function createForm()\n {\n $filterOptions = $this->config->getConfigValue(['form', 'file_input_filter_options'], array());\n $uploadTarget = $this->config->getConfigValue(['form', 'file_upload_dirpath'], null);\n\n if (null === $uploadTarget) {\n throw new \\Exception('Missing file uploader config key. \\'file_upload_dirpath\\' is missing. It should containt the path where files are uploaded. E.g. /path/to/public/img');\n }\n\n if (is_string($uploadTarget)) {\n $filterOptions['target'] = $uploadTarget . '/media.jpg';\n }\n\n $options = array(\n 'file_input_filter' => array(\n 'name' => $this->config->getConfigValue(['form', 'file_input_filter_name'], 'filerenameupload'),\n 'options' => $filterOptions,\n ),\n 'file_input_name' => $this->config->getConfigValue(['form', 'file_input_name'], 'file_input'), \n );\n\n // Pass the S3 client to s3rename upload filter\n if ('s3renameupload' === $options['file_input_filter']['name']) {\n $options['file_input_filter']['options']['client'] = $this->getServiceLocator()->get('Aws')->get('S3');\n }\n\n $inputFilterFactory = new \\GbiliUploadModule\\Form\\InputFilter\\FileInputFilterFactory;\n $inputFilter = $inputFilterFactory->createInputFilter($options);\n\n $form = new \\GbiliUploadModule\\Form\\Html5MultiUpload($this->config->getConfigValue(['form', 'form_name'], 'file_form'), $options);\n $form->setAttribute('id', $this->config->getConfigValue(['form', 'form_id'], 'gbiliuploader_upload_form'));\n $form->setInputFilter($inputFilter);\n return $form;\n }", "title": "" }, { "docid": "37a43b491e78b36237d60ac1e906eca8", "score": "0.515444", "text": "protected function form()\n {\n $form = new Form(new Experience());\n\n $form->text('name', __('Name'))->required();\n $form->textarea('brief', __('Brief'))->required();\n $form->text('skill', __('Skill'))->required();\n $form->textarea('responsibility', __('Responsibility'))->required();\n $form->textarea('difficulty', __('Difficulty'));\n $form->textarea('achievement', __('Achievement'));\n $form->datetime('begin_at', __('Begin at'))->format(\"YYYY-MM\")->required();\n $form->datetime('end_at', __('End at'))->format(\"YYYY-MM\");\n $form->number('sort', __('Sort'))->required();\n $form->switch('status', __('Status'))->states(\n [\n 'on' => ['value' => Experience::STATUS_ON],\n 'off' => ['value' => Experience::STATUS_OFF],\n ]\n )->default(1);\n $form->multipleImage('image', __('Image'))->sortable()->removable();\n $form->saving(function (Form $form){\n if (empty($form->image)) {\n $form->image = json_encode([]);\n }\n });\n\n return $form;\n }", "title": "" }, { "docid": "049812c786091427a2105cd887164fc9", "score": "0.5149959", "text": "protected function form()\n {\n $form = new Form(new Advert());\n\n $form->text('advert_desc', '标题')->rules(\"required\");\n $form->select('advert_type_id', '选择广告位')->options(AdvertType::pluck('advert_type_name', 'id'));\n $form->url('url', '地址');\n $form->image('image', '图片')->rules('mimes:gif,jpg,png,jpeg');\n\n return $form;\n }", "title": "" }, { "docid": "bfd0a94e3711563bb09ee2d5a495f766", "score": "0.51491123", "text": "public function capture()\n {\n return new Mad_View_Helper_Capture_Base();\n }", "title": "" }, { "docid": "5ca333467e86ce3df6898a72dec25673", "score": "0.50877446", "text": "protected function form()\n {\n $form = new Form(new DrawRecord);\n\n $form->number('openid', __('Openid'));\n $form->number('order_id', __('Order id'));\n $form->number('activegoods_id', __('Activegoods id'));\n\n return $form;\n }", "title": "" }, { "docid": "95a3f2dba8311606e19cba3b4bb03565", "score": "0.50829977", "text": "protected function form()\n {\n $form = new Form(new AppAd);\n\n $form->text('ADinfo', 'ADinfo');\n $form->image('image', 'Image');\n $form->mobile('phone', 'Phone');\n $form->text('time', 'Time');\n $form->text('title', 'Title');\n\n return $form;\n }", "title": "" }, { "docid": "e2adb460a33097f6cc2a082396e9c3f1", "score": "0.5077926", "text": "protected function form()\n {\n return Admin::form(Picture::class, function (Form $form) {\n $form->image('path','图片')->crop(800,472);\n $form->number('sort','排序');\n $form->textarea('des','描述');\n });\n }", "title": "" }, { "docid": "280e8b34a78f7a05fcbe8c92914a003d", "score": "0.507614", "text": "protected function form()\n {\n $class = $this;\n return Form::make(new MediumAccount(), function (Form $form) use ($class) {\n\n $form->select('medium_id')->options(Medium::all()->pluck('name', 'id'))->required();\n $form->select('type')->options(MediumAccount::$typeConfig)->required();\n $form->text('account')->required();\n $form->text('password')->required();\n $form->text('account_id');\n\n $Partner = new Partner();\n $config = $Partner->allConfig();\n $form->select('account_name')->options(array_combine($config,$config))->required();\n if($form->isCreating()){\n $tracker = $class->getTracker();\n $form->text('tracker')->value($tracker);\n }\n\n if($form->isEditing()){\n $form->text('tracker')->disable();\n }\n\n $agentConfig = $Partner->agentConfig();\n $form->select('agent_id')->options(array_combine($agentConfig,$agentConfig))->required();\n $form->select('company_id')->options(MediumAccount::$companyConfig)->required();\n $form->select('owner_id')->options(Administrator::all()->pluck('name', 'id'))->required();\n $form->hidden('status')->default(1);\n $form->text('mark');\n\n });\n }", "title": "" }, { "docid": "e1cc8d388ba6b6a3eaf5006efc6d01a5", "score": "0.5057699", "text": "protected function form()\n {\n $form = new Form(new DeviceYearly);\n $dsArr=[];\n foreach(Device::groupBy('brand')->get() as $d){\n $dsArr[$d->brand]=$d->brand;\n }\n $form->select('brand','品牌')->options($dsArr)->required();\n $form->distpicker(['province_id', 'city_id', 'district_id'], '报验地点');\n $form->textarea('explain','费用计算')->rows(8);\n $form->textarea('desc','备注说明')->rows(5);\n\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n });\n return $form;\n }", "title": "" }, { "docid": "3ccfba205cdffcc9f386d260e9708c52", "score": "0.50568664", "text": "protected function formCreate() {\n\t\t\t$this->ifaSample = new QImageFileAsset($this);\n\t\t\t$this->ifaSample->Required = true;\n\n\t\t\t// Let's make the File Icon \"clickable\" -- allowing users to download / view the currently uploaded file\n\t\t\t// We need to do two things -- first, set a temporaryuploadpath that is within the docroot\n\t\t\t// and then we need to set ClickToView to true\n\t\t\t$this->ifaSample->TemporaryUploadPath = __QCUBED_UPLOAD__;\n\t\t\t$this->ifaSample->ClickToView = true;\n\n\t\t\t// Feel free to uncomment this yourself, but note that you can pre-define the File property.\n\t\t\t// Notice how the path is an absolute path to a file.\n\t\t\t// Also notice that the file doesn't even need to be in the docroot.\n//\t\t\t$this->ifaSample->File = __DOCROOT__ . __IMAGE_ASSETS__ . '/calendar.png';\n\n\t\t\t// Add Styling\n\t\t\t$this->ifaSample->CssClass = 'file_asset';\n\t\t\t$this->ifaSample->imgFileIcon->CssClass = 'file_asset_icon';\n\n\t\t\t$this->lblMessage = new \\QCubed\\Control\\Label($this);\n\t\t\t$this->lblMessage->Text = 'Click on the button to change this message.';\n\t\t\t\n\t\t\t//Could you define optional limits if the field is required\n\t\t\t$this->ifaSample->MinWidth = 100;\n\t\t\t$this->ifaSample->MinHeight = 100;\n\n\t\t\t// The \"Form Submit\" Button -- notice how the form is being submitted via AJAX, even though we are handling\n\t\t\t// File Uploads on the form.\n\t\t\t$this->btnButton = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnButton->Text = 'Click Me';\n\t\t\t$this->btnButton->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\Ajax('btnButton_Click'));\n\t\t\t$this->btnButton->CausesValidation = true;\n\t\t}", "title": "" }, { "docid": "133cb52b54d5d1678d8c9c76a9c7e6fd", "score": "0.5043879", "text": "private function createDeleteForm(Reclam $reclam)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reclam_delete', array('id' => $reclam->getId())))\n ->setMethod('DELETE')\n ->getForm()\n\n ;\n $img=$reclam->setScreenshot();\n $path=$this->getParameter('image_directory').'/'.$img;\n $fs= new Filesystem();\n $fs->remove(array($path));\n }", "title": "" }, { "docid": "405a52bb13dfb4e8b0f719eff26039a2", "score": "0.5042348", "text": "protected function form()\n {\n $form = new Form(new Security());\n\n $form->text('title', __('标题'));\n\n $form->select('province', '所属章')->options(\\App\\ChapterSecurity::where('chapter_open', '1')->get()->pluck('chapter_title', 'id'))->load('section_id', '/getSectionSec');\n\n $form->select('section_id', '所属节');\n\n\n $form->image('thumb', __('封面'))->uniqueName()->move('qcby/images');\n $form->file('media', __('媒体'))->uniqueName()->move('qcby/video');;\n $form->switch('active', __('状态'))->default(1);\n \n $form->number('views', __('观看人数'))->default(1);\n $form->number('factorys', __('收藏人数'))->default(1);\n\n $form->number('sort', __('排序权重'))->default(1);\n \n //$form->saving(function (Form $form) {\n $form->ignore(['province']);\n //});\n\n\n return $form;\n }", "title": "" }, { "docid": "0bbdf0c4b23e812d7ca29852bda68adb", "score": "0.5040928", "text": "public function show(mdlImagem $media)\n {\n //\n }", "title": "" }, { "docid": "5d972b5eafc9b8832ecf7278407d5a23", "score": "0.503234", "text": "protected function form()\n {\n //dd(auth()->guard('admin')->user()->id);\n $form = new Form(new Article);\n\n $form->select('article_category_id', '栏目')->options(ArticleCategory::selectOptions())->rules('required');\n $form->text('title', '标题')->rules('required');\n $form->simditor('content', '内容')->rules('required');\n $form->text('author', '作者');\n $form->text('keywords', 'Keywords');\n $form->file('file_url', '附件');\n $form->textarea('description', '描述');\n $form->number('click', 'Click')->default(0);\n $form->image('thumb', '缩略图');\n $form->switch('is_published', '是否发布')->default(1);\n $form->hidden('admin_user_id');\n $form->saving(function($form){\n $form->admin_user_id=auth()->guard('admin')->user()->id;\n });\n return $form;\n }", "title": "" }, { "docid": "cb5325e14bf2e06d444dbc07550df5e7", "score": "0.5019128", "text": "function showForm()\n {\n $form = new SnapshotAdminPanelForm($this);\n $form->show();\n return;\n }", "title": "" }, { "docid": "ec26fd0b37975529e856267a35953b0b", "score": "0.501863", "text": "protected function form()\n {\n $form = new Form(new Download);\n\n $form->text('title', '标题')->rules('required');\n $form->file('attachment', '附件')->rules('required|file')->uniqueName();\n\n $form->number('sort', '排序')->rules('required')->default(function () {\n return $this->getSort();\n });\n $form->radio('is_display', '是否显示')->options(['1' => '是', '0'=> '否'])->default('1');\n $form->radio('language', '语言')->options(['0'=> '中文', '1' => '日文'])->default('0');\n\n return $form;\n }", "title": "" }, { "docid": "ea7d48b1c39fbf8a5c242cf5b56a93ac", "score": "0.5013341", "text": "public function Form() {\n // Find out the requested folder ID.\n $folderID = $this->parent->getRequest()->requestVar('ParentID');\n if (!isset($folderID)) {\n $folder = Folder::find_or_make($this->folderName);\n $folderID = $folder ? $folder->ID : 0;\n }\n\n // Construct the form\n $action = new FormAction('doAttach', _t('UploadField.AttachFile', 'Attach file(s)'));\n $action->addExtraClass('ss-ui-action-constructive icon-accept');\n $form = new Form(\n $this,\n 'Form',\n new FieldList($this->getListField($folderID)),\n new FieldList($action)\n );\n\n // Add a class so we can reach the form from the frontend.\n $form->addExtraClass('uploadfield-form');\n\n return $form;\n }", "title": "" }, { "docid": "c2da71a1b05014094bcda0a7581f5f20", "score": "0.5001197", "text": "protected function form()\n {\n\n $userModel = config('admin.database.users_model');\n $form = new Form(new Lesson);\n\n $form->text('title', '标题');\n// $form->select('serie_id', '系列')->options(function ($id) {\n// $serie = Serie::find($id);\n//\n// if ($serie) {\n// return [$serie->id => $serie->title];\n// }\n// });\n // 也可以设置label\n $form->select('serie_id', '系列')->options(Serie::pluck('title', 'id'));\n $form->select('user_id', '作者')->options($userModel::pluck('username', 'id'));\n\n $form->simplemde('body', '内容');\n $form->file('video_Path', '视频')->move('/videos/'.date('Y-m-d', time()));\n $form->time('duration', '时长');\n $form->radio('close_comment', '是否评论')->options(['F' => '否', 'T'=> '是'])->default('F');\n $form->radio('is_hidden', '是否显示')->options(['F' => '否', 'T'=> '是'])->default('F');\n return $form;\n }", "title": "" }, { "docid": "9744ad06fdca26b343eed84cc1cab35f", "score": "0.4981343", "text": "public function makeUploadForm()\n {\n return $this->app['view']->make($this->app['config']->get('cabinet::upload_form'));\n }", "title": "" }, { "docid": "33a6188801786a346745b1c429b5d697", "score": "0.49795142", "text": "public function create()\n {\n return view('admin.medias.create');\n }", "title": "" }, { "docid": "5634c7aad2d68ad4d50bc7efbdded1a5", "score": "0.4977288", "text": "protected function form()\n {\n $form = new Form(new Slider());\n\n $form->display('id', 'ID');\n $form->image('image')->resize(965, 400)->uniqueName()->move('slider')->rules('required');\n $form->text('url', 'url')->rules('required');\n $form->text('slogan_ru', 'слоган ru');\n $form->text('slogan_ua', 'слоган ua');\n $form->number('weight', 'номер')->default(Slider::max('weight')+1);\n $form->switch('active')->states()->default(1);\n\n return $form;\n }", "title": "" }, { "docid": "3e129b95c52038a07b2c194becd302de", "score": "0.49593723", "text": "public function form($instance)\n {\n $defaults = array('title' => __('Media', 'vndis-image-widget'), 'count' => 9);\n $instance = wp_parse_args((array)$instance, $defaults);\n ?>\n <p>\n <label\n for=\"<?php echo $this->get_field_id('title'); ?>\"><?php _e('Title:', 'vndis-image-widget'); ?></label>\n <input id=\"<?php echo $this->get_field_id('title'); ?>\" name=\"<?php echo $this->get_field_name('title'); ?>\"\n value=\"<?php echo $instance['title']; ?>\" style=\"width:100%;\"/>\n </p>\n <p>\n <label\n for=\"<?php echo $this->get_field_id('count'); ?>\"><?php _e('Number of media items to list:', 'vndis-image-widget'); ?></label>\n <input id=\"<?php echo $this->get_field_id('count'); ?>\" name=\"<?php echo $this->get_field_name('count'); ?>\"\n value=\"<?php echo $instance['count']; ?>\" style=\"width:100%;\"/>\n </p>\n <?php\n }", "title": "" }, { "docid": "f4afb561576532739afe383d0fdf548c", "score": "0.49564883", "text": "protected function form()\n {\n $form = new Form(new CardReferee);\n\n $form->text('title', '标题');\n $form->text('describe', '描述');\n $form->text('category_title', '申请分类名');\n $form->text('icon', '图标');\n $form->url('url', '链接地址');\n $form->number('user_id', '用户');\n $form->text('nickname', '推荐人昵称');\n $form->text('homepage', '推荐人个人主页');\n $form->text('contact', '推荐人联系方式');\n $form->text('label', '推荐卡片标签');\n\n return $form;\n }", "title": "" }, { "docid": "306f41d1c3a41404b1e1f4c7ba3c2512", "score": "0.49398237", "text": "protected function form()\n {\n $form = new Form(new Project);\n\n $form->text('xmbh', 'Xmbh');\n $form->text('title', 'Title');\n $form->text('type', 'Type');\n $form->decimal('price', 'Price');\n $form->datetime('gp_date_start', 'Gp date start')->default(date('Y-m-d H:i:s'));\n $form->datetime('gp_date_end', 'Gp date end')->default(date('Y-m-d H:i:s'));\n $form->number('status', 'Status')->default(1);\n $form->number('djl', 'Djl');\n $form->number('user_id', 'User id');\n $form->text('detail_id', 'Detail id');\n\n return $form;\n }", "title": "" }, { "docid": "d512db68b98713e868f6066ad99efeb0", "score": "0.49211168", "text": "private function createCreateForm(SkPhoto $entity) {\n $form = $this->createForm(new SkPhotoType(), $entity, array(\n 'action' => $this->generateUrl('photo_admin_create'),\n 'method' => 'POST',\n ));\n\n ##@LM\n //$form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "title": "" }, { "docid": "78a911c158de0b405aacc8a974febda3", "score": "0.49208108", "text": "protected function form(){\n\t\t\t$form = new Form(new Contact);\n\t\t\t\n\t\t\t$form->text('logo_pic', 'Logo pic');\n\t\t\t$form->text('logo_name', 'Logo name');\n\t\t\t$form->textarea('description', 'Description');\n\t\t\t$form->email('email', 'Email');\n\t\t\t$form->mobile('phone', 'Phone')->options(['mask' => '999 99 999 99 99'])->rules('required|min:12');\n\t\t\t$form->text('facebook_url', 'Facebook url');\n\t\t\t$form->text('instagram_url', 'Instagram url');\n\t\t\t$form->text('telegram_url', 'Telegram url');\n\t\t\t\n\t\t\treturn $form;\n\t\t}", "title": "" }, { "docid": "70099420cafebf6cc27223f8734dcd39", "score": "0.4914362", "text": "function doCreateScreenShot($file_name){\n $this->windowFocus();\n $this->windowMaximize();\n $this->captureEntirePageScreenshot(WIKI_CODE_PATH . \"//\". WIKI_SCREENSHOTS_PATH .\"//\". $file_name . \"_error\" . date(\"Y_m_d\") . \".\" . WIKI_SCREENSHOTS_TYPE , \"\");\n }", "title": "" }, { "docid": "01840597348a9f73f15be3d4cd5e6604", "score": "0.4911536", "text": "public function create() {\n $this->captcha = $this->generate();\n $this->image_handle = $this->__create();\n return $this;\n }", "title": "" }, { "docid": "b631549954a569f9d74056054a1ece3f", "score": "0.4907267", "text": "protected function form()\n {\n $form = new Form(new Machine());\n\n if(Admin::user()->operate != \"All\" && request()->route()->parameters()){\n $data = Machine::where('id', request()->route()->parameters()['machine'])->first();\n if($data->operate != Admin::user()->operate) return abort('403'); \n }\n\n $type = \\App\\MachinesType::where('state',1)->get()->pluck('name', 'id');\n\n $form->hidden('operate', __('操盘号'))->value($form->operate ?? Admin::user()->operate)->readonly();\n\n $form->select('name','类型')->options($type)->load('factory_name','/api/getAdminFactory');\n\n $form->select('factory_name','厂商')->load('style_id','/api/getAdminStyle');\n\n $form->select('style_id','型号')->required();\n\n $form->ignore(['name','factory_name']);\n\n $form->text('sn', __('机具终端'));\n\n $form->switch('open_state', __('开通状态'));\n\n $form->switch('is_self', __('是否自备机'));\n\n return $form;\n }", "title": "" }, { "docid": "29cdd761868750e9eb2008940a2bcd2b", "score": "0.48977083", "text": "protected function form()\n {\n $form = new Form(new PbResult);\n\n $form->hidden('project_id', 'Project id');\n $form->text('xmbh', '项目编号');\n $form->text('title', '项目名称');\n $form->text('tbr', '投标人');\n $form->text('jjf', '经济分');\n $form->text('jsf', '技术分');\n $form->text('zf', '总分');\n $form->decimal('tbbj', '投标报价');\n $form->text('pm', '排名');\n $form->file('filepath','附件');\n\n return $form;\n }", "title": "" }, { "docid": "4281b98c73672323720f563bae5aeae1", "score": "0.48864603", "text": "private function createCreateForm(MedicalFormsFieldsets $entity, $idf = null) {\n $form = $this->createForm(new MedicalFormsFieldsetsType(), $entity, array(\n 'action' => $this->generateUrl('medicalformsfieldsets_create'),\n 'method' => 'POST',\n 'idf' => $idf,\n ));\n\n if ($idf !== null):\n $em = $this->getDoctrine()->getManager();\n $entityF = $em->getRepository('AppBundle:MedicalForms')->find($idf);\n if ($entityF):\n $form->get('medicalForm')->setData($entityF);\n else:\n throw $this->createNotFoundException('Unable to find MedicalForms entity.');\n endif;\n else:\n throw $this->createNotFoundException('Unable to find MedicalForms entity, id null.');\n endif;\n\n $form->add('submit', 'submit', array('label' => 'Crear'));\n\n return $form;\n }", "title": "" }, { "docid": "13a0398caf9b5125472d25b2cd6e1dab", "score": "0.48824766", "text": "public function form ()\n {\n if (! isset ($this->_form))\n {\n $this->_form = $this->_make_form ();\n $this->_form->panel_name = $this->id;\n }\n return $this->_form;\n }", "title": "" }, { "docid": "4b868b8609263c9609f6925a1316d8ad", "score": "0.48754743", "text": "protected function form()\n {\n $form = new Form(new Competition);\n\n $form->number('p_id', __('P id'));\n $form->textarea('c_description', __('C description'));\n $form->date('date', __('Date'))->default(date('Y-m-d'));\n $form->textarea('file', __('File'));\n\n return $form;\n }", "title": "" }, { "docid": "c93bd74f436b1ff30bcb59bb89845677", "score": "0.48728207", "text": "protected function form()\n {\n $form = new Form(new Link);\n $form->disableViewCheck();\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableView();\n });\n $form->hidden('site_id')->default(site()->get());\n $form->text('name', __('网站名称'))->required();\n $form->text('note', __('网站描述'));\n $form->image('pic_url', __('图片'));\n $form->text('link_url', __('跳转链接'));\n $form->number('sort', __('排序'))->default(0);\n \n return $form;\n }", "title": "" }, { "docid": "edf276926f3d2a57c29bc111686cc248", "score": "0.48654193", "text": "private function do_media_new() {\n $media_dir = $this->get_media_dir($file_url);\n\n // 1 = create media directory if needed\n if(!file_exists($media_dir)){\n mkdir($media_dir, $this->setting('mkdir_mode', 0755), true);\n }\n // 2 = upload files\n include_once($this->plugin_path .'/fileupload/php/UploadHandler.class.php');\n $upload = new UploadHandler(array(\n 'upload_dir' => $media_dir,\n 'upload_url' => $_SESSION['pico_config']['base_url'] . '/' . $media_dir,\n 'mkdir_mode' => $this->setting('mkdir_mode', 0755),\n 'param_name' => 'medias',\n 'accept_file_types' => $this->setting('accept_file_types', '/.+$/i'),\n 'image_file_types' => $this->setting('image_file_types', '/\\.(gif|jpe?g|png)$/i'),\n 'max_file_size' => $this->setting('max_file_size', NULL),\n 'image_versions' => $this->get_image_versions()\n ));\n\n // done\n exit;\n }", "title": "" }, { "docid": "ba17f759bf34564a7b4c1db45ee14ecc", "score": "0.48579553", "text": "public function new(Trick $trick): ?Form\n {\n $form = $this->formProcess($trick);\n if ($form instanceof Form)\n return $form;\n\n $media = $this->mediaRepository->findOneBy(['trick' => $trick, 'isVideoLink' => false]);\n if ($media instanceof Media) {\n $trick->setFeaturedMedia($media);\n $this->entityManager->persist($trick);\n $this->entityManager->flush();\n }\n\n return null;\n }", "title": "" }, { "docid": "3b98cc182662c48e2d83995d0deda7c5", "score": "0.48563102", "text": "protected function form()\n {\n $form = new Form(new DyNews);\n\n $form->text('title', __('标题'));\n $form->text('author', __('作者'))->default('官方团队');\n $form->text('types', __('分类'))->default('公告');\n $form->text('introduce', __('简介'));\n $form->textarea('centent', __('内容'));\n $form->number('hits', __('点击次数'));\n $form->switch('status', __('是否可见'))->default(1);\n $form->number('addtime', __('添加时间'));\n\n return $form;\n }", "title": "" }, { "docid": "499002140e172482d2ff607412ca4830", "score": "0.48506606", "text": "protected function form()\n {\n $form = new Form(new Article());\n $form->select('type_id', __('Type_id'))->options((new ArticleType())::selectOptions());\n $form->text('title', __('Title'));\n $form->text('author', __('Author'));\n $form->text('description', __('Description'));\n $form->image('img', __('Thumbnail'))->uniqueName();\n $form->UEditor('article_content','Article_content');\n $states = [\n 'on' => ['value' => 1, 'text' => 'Recommend', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => 'Not recommend', 'color' => 'danger'],\n ];\n $form->switch('is_recommend',__('Recommend'))->states($states);\n return $form;\n }", "title": "" }, { "docid": "3ea14b4bea5a604015612fcd0d5e666c", "score": "0.4849467", "text": "protected function form()\n {\n $form = new Form(new Goods);\n\n $form->text('title', __('Title'));\n $form->text('desc', __('Desc'));\n $form->number('type', __('Type'));\n $form->number('store_id', __('Store id'));\n $form->decimal('old_price', __('Old price'));\n $form->decimal('new_price', __('New price'));\n $form->number('basic', __('Basic'));\n $form->number('sales', __('Sales'));\n $form->text('disseminate', __('Disseminate'));\n $form->image('cover', __('Cover'));\n\n\n return $form;\n }", "title": "" }, { "docid": "947126f038fbbd1428f014c3f5a618b5", "score": "0.48427662", "text": "protected function form()\n {\n $form = new Form(new SenderWarningSetting);\n\n $form->number('sender_id', 'Sender id');\n $form->switch('power_warning', 'Power warning')->default(1);\n $form->number('power_warning_last', 'Power warning last');\n $form->switch('power_warning2_last', 'Power warning2 last')->default(30);\n $form->switch('power_warning3_last', 'Power warning3 last')->default(60);\n $form->number('set_time', 'Set time');\n $form->number('set_uid', 'Set uid');\n $form->number('warninger_id', 'Warninger id');\n $form->number('warninger2_id', 'Warninger2 id');\n $form->number('warninger3_id', 'Warninger3 id');\n $form->number('category_id', 'Category id');\n $form->number('company_id', 'Company id');\n $form->switch('status', 'Status')->default(1);\n\n return $form;\n }", "title": "" }, { "docid": "ab2eae1194b66f315a4555f0796c5d18", "score": "0.48338947", "text": "protected function form()\n {\n $form = new Form(new PushList());\n\n $form->select('type_id', '类型')->options(PushType::toNode(PushType::whereStatus(PushType::STATUS_PUSH)->get()))->required();\n $form->text('data_id', __('数据ID'));\n $form->text('brand_id', '品牌ID')->placeholder('品牌ID')->help('仅在推送品牌闪购时此参数有效');\n $form->text('title', __('标题'))->required();\n $form->textarea('desc', __('描述'));\n $form->datetime('push_time', __('推送时间'))->default(date('Y-m-d H:i:s'))->required();\n $form->select('platform', '推送平台')->options(PushList::$plant)->required();\n $form->radio('status', __('状态'))->options([0 => '保存', 1 => '发布'])->default(0)->required();\n\n $form->saving(function ($form) {\n $form->model()->publisher = \\Encore\\Admin\\Facades\\Admin::user()->id;\n });\n\n return $form;\n }", "title": "" }, { "docid": "500b6ba876633630adfe0c84b2b74b21", "score": "0.48269334", "text": "public function create()\n {\n return $this->form();\n }", "title": "" }, { "docid": "d83bc7af1f25e248c1d4ca195d54b8ea", "score": "0.48198265", "text": "public function getMediaField($name, $value = null, array $data = array())\n\t{\n\t\t// init media field\n\t\t$field = new JFormFieldMedia(null, $value);\n\t\t// setup an empty form as placeholder\n\t\t$field->setForm(new JForm('managepayment.media'));\n\n\t\t// force field attributes\n\t\t$data['name'] = $name;\n\t\t$data['value'] = $value;\n\n\t\tif (empty($data['previewWidth']))\n\t\t{\n\t\t\t// there is no preview width, set a defualt value\n\t\t\t// to make the image visible within the popover\n\t\t\t$data['previewWidth'] = 480;\t\n\t\t}\n\n\t\t// render the field\t\n\t\treturn $field->render('joomla.form.field.media', $data);\n\t}", "title": "" }, { "docid": "768bf2191571e4aa5618484b99171fcc", "score": "0.48193625", "text": "protected function form()\n {\n $form = new Form(new News);\n $form->text('news_title', '标题')->required();\n $form->text('news_author', '作者');\n $form->select('category_id', '新闻栏目')->options(BaseCategory::selectOptions(null,'',1310));\n $form->editor('news_content', '内容');\n $form->text('source_name', '来源网站名称');\n $form->text('source_url', '来源网站地址');\n $form->image('pic_url', '图片展示');\n $form->text('sort','排序')->setWidth(2,2)->default(0)->help('数字小排序靠前')->rules('numeric',[\n 'numeric' => '排序必须是数字'\n ])->icon('fa-sort-numeric-asc');\n\n return $form;\n }", "title": "" }, { "docid": "c426171c19e7de935137345be2c46ebd", "score": "0.48128116", "text": "protected function createComponentBmiForm()\n {\n $form = new UI\\Form;\n\n $form->addText('stature', 'Výška [cm]:')\n ->addRule($form::PATTERN, 'Výška musí být kladné celé číslo.', '^\\d+$')\n ->addRule($form::RANGE, 'Výška je mimo platný rozsah hodnot.', array(1, 999999999999))\n ->setRequired('Zadejte prosím výšku.');\n\n $form->addText('weight', 'Váha [kg]:')\n ->addRule($form::PATTERN, 'Váha musí být kladné celé číslo.', '\\d+')\n ->addRule($form::RANGE, 'Výška je mimo platný rozsah hodnot.', array(1, 999999999999))\n ->setRequired('Zadejte prosím váhu.');\n\n $form->addSubmit('calc', 'Spočítat BMI');\n \n $form->addProtection('Vypršel časový limit, odešlete formulář znovu');\n \n $form->onSuccess[] = callback($this, 'bmiFormSubmitted');\n return $form;\n }", "title": "" }, { "docid": "624e2850829771d64bf37bd025ef0ca1", "score": "0.48106578", "text": "public function render()\n {\n $media = $this->getRepository()->getMedia(\n $name = $this->getFormName()\n )->map(function ($item) {\n return array_merge($item->toArray(), [\n 'url' => $item->getUrl(),\n 'conversions' => $this->conversions($item),\n ]);\n });\n\n return view('administrator::edit.controls.media', [\n 'name' => $name,\n 'media' => $media->toJson(),\n 'arrows' => $this->arrows,\n 'indicators' => $this->indicators,\n 'width' => $this->width,\n 'conversion' => $this->conversion,\n 'editable' => $this->editable,\n ]);\n }", "title": "" }, { "docid": "24280ab82a0b75072d0f2e47314a0956", "score": "0.48041338", "text": "protected function form()\n {\n $type_options = [\n 1 => '首页轮播图'\n ];\n $template_id_options = [\n 0 => '模版一 [ 2018新版(绿色) ]',\n 1 => '模版二 [ 九宫格 ]',\n ];\n $target_type_options = [\n 1 => '全部馆',\n 2 => '个别',\n ];\n $request = request();\n\n $form = new Form(new Release);\n $isCreating = $form->isCreating();\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete(); // 去掉`删除`按钮\n $tools->disableView(); // 去掉`查看`按钮\n });\n\n $form->text('describe', '发布描述')->required();\n if ($isCreating) {\n $form->select('type', '发布类型')->options($type_options)->default(1)->required();\n $form->select('template_id', '主题模版')->options($template_id_options)->default(0)->required();\n $form->select('target_type', '目标类型')->options($target_type_options)->default(1)->required();\n $form->multipleSelect('target_token', '筛选目标')->options(function ($code) {\n if (is_array($code) && count($code) > 0) {\n return Wxuser::pluck('wxname', 'token')->toArray();\n }\n })->ajax('/admin/apiuseradmin/wxUser/search', 'token', 'wxname')\n ->placeholder('输入 公众号名称或者token 进行搜索,可填写多个!');\n\n } else {\n $form->display('type', '发布类型')->with(function ($value) use ($type_options) {\n return Arr::get($type_options, $value);\n });\n $form->display('template_id', '主题模版')->with(function ($value) use ($template_id_options) {\n return Arr::get($template_id_options, $value);\n });\n $form->display('target_type', '目标类型')->with(function ($value) use ($target_type_options) {\n return Arr::get($target_type_options, $value);\n });\n $form->display('target_token', '筛选目标')->with(function ($value) {\n $value = array_filter($value);\n $str = ' ';\n if (is_array($value) && count($value) > 0) {\n $wxuser_list = Wxuser::pluck('wxname', 'token')->toArray();\n $only = Arr::only($wxuser_list, $value);\n foreach ($only as $k => $v) {\n $str .= '<span class=\"badge bg-brown\">' . $v . '</span>&nbsp;';\n }\n }\n return $str;\n });\n $form->radio('is_refresh', '强制更新')->options([1 => '是', 2 => '否'])->default(2)->stacked()\n ->help('注意:编辑内容时,此项为 <span style=\"color: red\">是</span> 时将会对已发布的数据进行强制更新,请谨慎选择');\n }\n $form->divider();\n\n $form->text('content', __('Content'));\n $form->url('url', __('Url'));\n $form->number('order', '排序')->default(0);\n\n $form->image('img', __('Img'))->attribute('hideMaterial')->move('releaseImage')->creationRules(function () use ($request) {\n if ($request->input('type') == 1) {\n return 'required';\n }\n });\n\n $form->ignore('is_refresh');\n\n $form->saved(function (Form $form) use ($request) {\n\n if ($request->isMethod('post')) {\n $this->typeManage($form->model());\n }\n if ($request->isMethod('put') && $request->input('is_refresh') == 1) {\n $this->updateTypeManage($form->model());\n }\n });\n return $form;\n }", "title": "" }, { "docid": "4439247fa6c81f966ce621b33532ea26", "score": "0.48013607", "text": "abstract protected function _generateForm();", "title": "" }, { "docid": "b9ee6f37cda09f745fb7383b876faf46", "score": "0.48012668", "text": "function Form() {\n\t\t// Get the fields from a new member - seems like a good default :-)\n\t\t$member = new Member();\n\t\t$fields = $member->getMemberFormFields();\n\n\t\t$actions = new FieldSet(\n\t\t\tnew FormAction('register', 'Register')\n\t\t);\n\n\t\t$form = new Form($this, 'Form', $fields, $actions);\n\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "36dadf7a6e0757a8a1d209d3ea576331", "score": "0.47998917", "text": "protected function form()\n {\n $equipment = new Equipment();\n $form = new Form($equipment);\n\n $form->hidden('admin_user_id', __('Admin user id'));\n $form->select('equipment_type', __('Equipment type id'))->options($equipment->equipment_type)->required();\n $form->text('name', '设备名称')->required();\n $form->text('mac', __('Mac'))->required();\n $form->text('sn', __('Sn'))->required();\n $form->select('project_id', __('Project id'))->options(Project::where('admin_user_id', Admin::user()->id)->get()->pluck('title', 'id'))->required();\n $form->hidden('status', __('Status'))->default(0);\n $form->text('beilv', __('Beilv'));\n\n $form->date('work_date', __('Work date'))->required();\n\n $form->textarea('remarks', __('Remarks'));\n\n $form->saving(function (Form $form) {\n $form->admin_user_id = Admin::user()->id;\n });\n return $form;\n }", "title": "" }, { "docid": "60fc141341640e3d3b5551e6edeb2ba7", "score": "0.47996718", "text": "protected function form()\n {\n $form = new Form(new FreeActivity());\n\n $form->text('title', __('页面title'));\n $form->textarea('tb_goods', __('淘宝商品'));\n $form->textarea('pdd_goods', __('拼多多商品'));\n $form->image('img', __('推荐活动缩略图'));\n $form->text('uri', __('推荐活动地址'));\n $form->textarea('rule', __('新人免单规则'));\n $form->datetime('start_time', __('开始时间'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_time', __('结束时间'))->default(date('Y-m-d H:i:s'));\n\n $form->saving(function (Form $form) {\n if (!$form->start_time || !$form->end_time) {\n throw new \\Exception('开始和结束时间必填');\n }\n if (strtotime($form->start_time) >= strtotime($form->end_time)) {\n throw new \\Exception('开始时间不能大于等于结束时间');\n }\n });\n\n return $form;\n }", "title": "" }, { "docid": "36942659779311785010187bf84d1b39", "score": "0.47934878", "text": "protected function form()\n {\n $form = new Form(new Donation());\n\n $form->hidden('user_id');\n $form->hidden('admin_id');\n $form->select('campaign_id', 'Kampanye')->options($this->campaigns);\n $form->currency('nominal', 'Nominal Donasi');\n $form->text('message', 'Pesan');\n $form->switch('is_verified', 'Verifikasi');\n\n $form->saving(function (Form $form) {\n if ($form->admin_id === null && $form->user_id === null) {\n $form->admin_id = Admin::user()->id;\n }\n });\n\n return $form;\n }", "title": "" }, { "docid": "87e5c93b2ae879adf3afa939828bfe69", "score": "0.47930366", "text": "private function createCreateForm(marche $entity)\n {\n $form = $this->createForm(new marcheType(), $entity, array(\n 'action' => $this->generateUrl('marche_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Créer'));\n\n return $form;\n }", "title": "" }, { "docid": "8825d428681c5fa32da9a66356e80307", "score": "0.47830427", "text": "protected function form()\n {\n $form = new Form(new VoteBlacklist);\n $form->hidden('token')->default(\\request()->session()->get('wxtoken'));\n// $form->text('token', 'Token');\n $form->ip('ip', 'Ip');\n $form->text('openid', '用户openid');\n return $form;\n }", "title": "" }, { "docid": "e11dd3d5409ffdd23ac2ba66ff56faee", "score": "0.47811958", "text": "protected function add_attachments_form()\n {\n\n }", "title": "" }, { "docid": "c11e3a8a46e6942ad0a7eef56283cd34", "score": "0.47756693", "text": "protected function form()\n {\n $form = new Form(new Page);\n\n $form->text('code', 'Код')->rules('required|max:255', [\n 'required' => 'Обязательно для заполнения',\n 'max' => 'Кол-во символов не более :max',\n ]);\n\n $form->text('name', 'Имя')->rules('required|max:255', [\n 'required' => 'Обязательно для заполнения',\n 'max' => 'Кол-во символов не более :max',\n ]);\n\n $form->ckeditor('content', 'Контент')->rules('required|max:50000', [\n 'required' => 'Обязательно для заполнения',\n 'max' => 'Кол-во символов не более :max',\n ]);\n\n return $form;\n\n }", "title": "" }, { "docid": "1bd3adef71e60e2d8fcde08942e6b822", "score": "0.47744304", "text": "protected function form()\n {\n $form = new Form(new Article);\n\n\n $category = Lib_make::getCategory();\n $form->select('cate_id','类型' )->options($category);\n $form->text('title', __('Title'));\n $form->image('cover', __('Cover'));\n $form->text('author', __('Author'));\n// $form->textarea('content', __('Content'));\n $form->ueditor('content', '内容')->rules('required');;\n $form->number('browse', __('Browse'));\n $form->number('comment', __('Comment'));\n\n return $form;\n }", "title": "" }, { "docid": "2553d6c44dcbb48ade1dd02cb77faaa4", "score": "0.47727153", "text": "private function createCreateForm(Picture $entity)\n {\n $form = $this->createForm(new PictureType(), $entity, array(\n 'action' => $this->generateUrl('admin_pictures_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "title": "" }, { "docid": "b2ac7020432e809d96256153a467fd37", "score": "0.47690302", "text": "protected function form()\n {\n $form = new Form(new Equipment());\n\n $form->text('eqm_name', __('Eqm name'));\n $form->text('eqm_type', __('Eqm type'));\n $form->radioButton('eqm_state', __('Eqm state'))->options([\n '1' => '不可使用', \n '0' => '正常'\n ]);\n $form->number('eqm_num', __('Eqm num'));\n $form->text('place', __('Place'));\n $form->image('photo', __('Photo'));\n $form->text('describe', __('Describe'));\n\n return $form;\n }", "title": "" }, { "docid": "ede17f813b35e4417873021b100c5f27", "score": "0.47679907", "text": "protected function form()\n {\n $form = new Form(new $this->currentModel);\n \n $form->display('id', 'ID');\n $form->text('company_name', '公司名称');\n $form->image('company_logo', 'LOGO')->uniqueName()->move('public/photo/images/custom_thum/');\n $form->text('category', '所属行业');\n $form->email('email', '邮箱');\n $form->url('web_site', '网站');\n $form->text('tel', '联系电话');\n $form->text('addr', '办公地址');\n $form->ckeditor('welfare', '福利待遇');\n $form->ckeditor('brief', '公司简介');\n $form->number('sort', '排序')->default('100')->help('排序,数值越小越靠前');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1'=> '保密'])->default('0');\n //$form->display('created_at', 'Created At');\n //$form->display('updated_at', 'Updated At');\n\n return $form;\n }", "title": "" }, { "docid": "f8e24e231a28c65316a92dda8cfe0adb", "score": "0.47664744", "text": "protected function form()\n {\n $form = new Form(new Article);\n $form->disableViewCheck();\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableView();\n });\n $form->hidden('site_id')->default(site()->get());\n $form->select('category_id', __('所属分类'))->options(ArticleCategory::selectShow());\n $form->text('title', __('标题'));\n $form->text('color_val', __('标题颜色'))->default('#000000');\n $form->number('bold_val', __('加粗'))->default(0);\n $form->text('source', __('来源'));\n $form->text('author', __('作者'));\n $form->tags('keywords', __('关键词'));\n $form->textarea('description', __('摘要'));\n $form->UEditor('content', __('内容'));\n $form->image('pic_url', __('缩略图'));\n $form->multipleImage('pic_arr', __('组图'))->removable()->sortable();\n $form->number('hits', __('点击次数'))->default(0);\n $form->number('sort', __('排序'))->default(0);\n \n return $form;\n }", "title": "" }, { "docid": "648a03f510556361afd1d0b96ccc8dd5", "score": "0.47640142", "text": "public function get(): FormInterface;", "title": "" }, { "docid": "e26f40da7f703642165f07e00027bae8", "score": "0.4763824", "text": "protected function form()\n {\n $form = new Form(new Icon);\n\n $category = GoodsCategory::all();\n $list = $category->pluck('name','id')->all();\n $form->image('icon_img', __('图标'))->uniqueName()->rules('required|max:100');\n $form->select('category_id', __('关联分类'))->options($list)->required();\n $form->text('title', __('标题'))->required();\n $form->select('status', __('状态'))->default(Icon::STATUS_OFF)\n ->options(Icon::getStatus())->required();\n $form->number('sort', __('排序'))->default(255)->min(0);\n\n return $form;\n }", "title": "" }, { "docid": "ae702a24b3b50e16219578d0f056e115", "score": "0.47595182", "text": "protected function form()\n {\n $form = new Form(new GoodsModel);\n\n $form->text('goods_sn', __('Goods sn'));\n $form->text('goods_name', __('Goods name'));\n $form->file('goods_img', __('Goods img'));\n $form->text('short_desc', __('Short desc'));\n $form->switch('is_delete', __('Is delete'));\n $form->switch('is_onsale', __('Is onsale'));\n\n return $form;\n }", "title": "" }, { "docid": "a8c06009c93234cc5adcd9cef514d60b", "score": "0.47583914", "text": "protected function form()\n {\n $form = new Form(new Pandemic());\n $form->number('confirmed', __('Confirmés'))->default(0);\n $form->number('sick', __('Malades'));\n $form->number('seriously', __('Grave'));\n $form->number('healed', __('Guéris'));\n $form->number('dead', __('Décès'));\n $form->select('health_zone_id', __('Zone de santé'))->options(HealthZone::pluck('name', 'id'))->rules(['required']);\n $form->datetime('last_update', __('Dernière modification'))->rules(['required']);\n\n return $form;\n }", "title": "" }, { "docid": "871f12ba51456be0062ec4f552ea8cba", "score": "0.47532877", "text": "function form($instance) {\n\n\t\t// Merge with defaults\n\t\t$instance = wp_parse_args((array) $instance, $this->defaults);\n\t\t\n\t\t$greyscale = '';\n\t\tif (!empty($instance['greyscale'])) {\n\t\t\t$greyscale = '-webkit-filter: grayscale(100%); filter: grayscale(100%);';\n\t\t}\n\n\t\t?>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('title'); ?>\"><?php _e('Title:'); ?></label>\n\t\t\t<input type=\"text\" id=\"<?php echo $this->get_field_id('title'); ?>\" name=\"<?php echo $this->get_field_name('title'); ?>\" value=\"<?php if (isset($instance['title'])) echo esc_attr($instance['title']); ?>\" class=\"widefat\" />\n\t\t</p>\n\t\t\n\t\t<p>1. Download your Snapcode PNG image from <a href=\"https://accounts.snapchat.com/accounts/snapcodes?type=png\" target=\"_blank\">this link</a></p>\n\t\t<p>2. Upload your Snapcode PNG image using the button below.</p>\n\n\t\t<p>\n\t\t\t<div class=\"pipdig-media-container\">\n\t\t\t\t<div class=\"pipdig-media-inner\">\n\t\t\t\t\t<?php $img_style = ($instance[ 'snapcode' ] != '') ? '' : 'display:none;'; ?>\n\t\t\t\t\t<img id=\"<?php echo $this->get_field_id('snapcode'); ?>-preview\" src=\"<?php echo esc_attr($instance['snapcode']); ?>\" style=\"margin:5px 0;padding:0;max-width:180px;height:auto;<?php echo $img_style.$greyscale; ?>\" />\n\t\t\t\t\t<?php $no_img_style = ($instance[ 'snapcode' ] != '') ? 'style=\"display:none;\"' : ''; ?>\n\t\t\t\t</div>\n\t\t\t\n\t\t\t\t<input type=\"text\" id=\"<?php echo $this->get_field_id('snapcode'); ?>\" name=\"<?php echo $this->get_field_name('snapcode'); ?>\" value=\"<?php echo esc_attr($instance['snapcode']); ?>\" class=\"pipdig-media-url\" style=\"display: none\" />\n\n\t\t\t\t<input type=\"button\" value=\"<?php echo esc_attr(__('Remove', 'p3')); ?>\" class=\"button pipdig-media-remove\" id=\"<?php echo $this->get_field_id('snapcode'); ?>-remove\" style=\"<?php echo $img_style; ?>\" />\n\n\t\t\t\t<input type=\"button\" value=\"<?php echo esc_attr(__('Select Image', 'p3')); ?>\" class=\"button pipdig-media-upload\" id=\"<?php echo $this->get_field_id('snapcode'); ?>-button\" />\n\t\t\t\t<br class=\"clear\">\n\t\t\t</div>\n\t\t</p>\n\t\t\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('snapchat_account'); ?>\"><?php _e('Snapchat Account Name:', 'p3'); ?></label>\n\t\t\t<input type=\"text\" id=\"<?php echo $this->get_field_id('snapchat_account'); ?>\" name=\"<?php echo $this->get_field_name('snapchat_account'); ?>\" value=\"<?php if (isset($instance['snapchat_account'])) echo esc_attr($instance['snapchat_account']); ?>\" class=\"widefat\" placeholder=\"<?php _e(\"For example:\", 'p3'); ?> mileyxxcyrus\" />\n\t\t</p>\n\t\t\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('greyscale'); ?>\">\n\t\t\t<input type=\"checkbox\" id=\"<?php echo $this->get_field_id('greyscale'); ?>\" name=\"<?php echo $this->get_field_name('greyscale'); ?>\" <?php if (isset($instance['greyscale'])) { checked( (bool) $instance['greyscale'], true ); } ?> /><?php _e('Display in grayscale', 'p3'); ?></label>\n\t\t\t<br />\n\t\t</p>\n\n\t\t<?php\n\n\t}", "title": "" }, { "docid": "b8e490b1b28eea353c2865c52a0c77cb", "score": "0.47501588", "text": "public function create() {\n\t\t$url = config ( 'medias.url' );\n\t\treturn view ( 'back.film.create', array_merge ( compact ( 'url' ), $this->sub_cat_gestion->getAllByFilmSelect () ) );\n\t}", "title": "" }, { "docid": "7bdb47cdbe8e0b2234437f0aa42ce901", "score": "0.47482347", "text": "protected function form()\n {\n $form = new Form(new Links());\n\n $form->display('id', 'ID');\n $form->text('name', '网站名称')->rules('required');\n $form->url('url', '网站链接')->rules('required')->help(\"URL类型是完整的URL地址,如: <code>http://www.baidu.com/</code>\");\n $form->image('logo', 'LOGO');\n $form->radio('type', '文字或LOGO')->options(['0'=> '文字', '1'=> 'LOGO'])->default('0')->rules('required');\n $form->number('sort', '排序')->min(1)->default('1')->rules('required|numeric|min:1');\n $form->radio('state', '审核状态')->options(['0' => '审核中', '1'=> '已审核'])->default('0')->rules('required');\n $form->display('created_at', '创建时间');\n $form->display('updated_at', '更改时间');\n\n $form->tools(function (Form\\Tools $tools) {\n\n\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n\n });\n\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n $footer->disableReset();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n return $form;\n }", "title": "" }, { "docid": "a1d75db6db53d20ef32faea2577f9e4f", "score": "0.47427592", "text": "protected function form()\n {\n $post = new Post();\n $form = new Form($post);\n $belongTo = $post->getAllBelongTo();\n\n $form->text('name', __('Name'))->required();\n $form->multipleSelect('belong_to', __('BelongTo'))->options($belongTo)->required();\n $form->textarea('require', __('Require'));\n $form->textarea('explain', __('Explain'));\n $form->number('level', __('Level'))->default(1)->required();\n return $form;\n }", "title": "" }, { "docid": "e1b7a19c02b41b60ce009d35a50587f8", "score": "0.47411433", "text": "protected function form()\n {\n $form = new Form(new Value);\n $form->switch('active', 'Отображение на странице')\n ->options([1 => 'Активен', 0 => 'Неактивен'])\n ->default(0);\n $form->text('ru_main_title', 'Ru title');\n $form->text('de_main_title', 'De title');\n $form->text('en_main_title', 'En title');\n $form->text('ch_main_title', 'Ch title');\n $form->text('ru_title', 'Ru title');\n $form->text('de_title', 'De title');\n $form->text('en_title', 'En title');\n $form->text('ch_title', 'Ch title');\n $form->textarea('ru_text', 'Ru text');\n $form->textarea('de_text', 'De text');\n $form->textarea('en_text', 'En text');\n $form->textarea('ch_text', 'Ch text');\n\n return $form;\n }", "title": "" }, { "docid": "14b066822ddd5eabfb4c7892d60092b8", "score": "0.47321218", "text": "public function form( $instance ) {\n\t\techo \"<div class='interactive-video-container'>\";\n\n\t\tglobal $wpdb;\n\n\n\t\twp_enqueue_style(\n\t\t\t'video-style',\n\t\t\tget_theme_file_uri( '/inc/plugins/digimem-interactive-video-widget/css/interactive-video-style.css' ),\n\t\t\tarray(),\n\t\t\tfalse,\n\t\t\tfalse\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'digimem-interactive-video-admin',\n\t\t\tget_theme_file_uri( '/inc/plugins/digimem-interactive-video-widget/js/interactive-video.js' ),\n\t\t\tarray( 'jquery' ),\n\t\t\tfalse,\n\t\t\ttrue\n\t\t);\n\t\twp_localize_script(\n\t\t\t\"digimem-interactive-video-admin\",\n\t\t\t\"videoUpload\",\n\t\t\tarray(\n\t\t\t\t'ajaxUrl' => admin_url( 'admin-ajax.php' )\n\t\t\t)\n\t\t);\n\t\t$title = isset( $instance['title'] ) ? $instance['title'] : '';\n\t\t$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'url' => '', 'id' => '' ) );\n\t\t$title = sanitize_text_field( $instance['title'] );\n\t\t$addText = isset( $instance['addText'] ) ? $instance['addText'] : '';\n\t\t$textBox = isset( $instance['text-box'] ) ? $instance['text-box'] : '';\n\n\t\t$urlId = $this->get_field_id( 'url' );\n\t\t$videoId = $this->get_field_id( 'video' );\n\t\t// Title ?>\n <p>\n <label\n for=\"<?php echo $this->get_field_id( 'title' ); ?>\"\n >\n\t\t\t\t<?php _e( 'Title:' ); ?>\n </label>\n <input\n class=\"widefat\"\n id=\"<?php echo $this->get_field_id( 'title' ); ?>\"\n name=\"<?php echo $this->get_field_name( 'title' ); ?>\"\n type=\"text\"\n value=\"<?php echo esc_attr( $title ); ?>\"\n />\n </p>\n <button\n id='media-button'\n type='button'\n class='button'\n\n onclick='media(event, \"<?= $urlId ?>\", \"<?= $videoId ?>\")'\n ><span class=\"dashicons dashicons-editor-video\"></span>Select Video\n </button>\n\t\t<?php // Hidden field to store video url ?>\n <input type=\"hidden\"\n id=\"<?php echo $this->get_field_id( 'url' ); ?>\"\n name=\"<?php echo $this->get_field_name( 'url' ); ?>\"\n value=\"<?php echo $instance['url']; ?>\"\n />\n\t\t<?php\n\t\tif ( isset( $instance['url'] ) && $instance['url'] != '' ) {\n\t\t\t?>\n <video\n id=\"<?php echo $this->get_field_id( 'video' ) ?>\"\n width='640'\n height='240'\n controls\n controlsList='nodownload'\n src=\"<?= $instance['url'] ?>\"\n >\n </video>\n\t\t\t<?php\n\t\t}\n\t\t?>\n\n\n <br/>\n <div id=\"widget-<?= $this->number ?>-edit-buttons\">\n\n <script>\n\t\t\t\tif (typeof getEditButtons == 'function') {\n\t\t\t\t\tgetEditButtons(\"<?=$this->number?>\", '<?php echo isset( $instance['url'] ) & $instance['url'] !== '' ? 'true' : 'false'?>');\n\t\t\t\t}\n\t\t\t\tjQuery(document).ready(function () {\n\t\t\t\t\tif (typeof getEditButtons == 'function') {\n\t\t\t\t\t\tgetEditButtons(\"<?=$this->number?>\", '<?php echo isset( $instance['url'] ) & $instance['url'] !== '' ? 'true' : 'false'?>');\n\t\t\t\t\t}\n\t\t\t\t});\n </script>\n </div>\n <div id=\"quiz-edit-<?= $this->number ?>\">\n\n\n </div><br/>\n <div id=\"widget-<?= $this->number ?>-text-area\">\n <input id=\"<?= $this->get_field_id( 'addText' ) ?>\" name=\"<?= $this->get_field_name( 'addText' ) ?>\"\n type=\"checkbox\" <?php if ( $addText == 'true' ) {\n\t\t\t\techo \"checked='checked'\";\n\t\t\t} ?> title=\"Additional Text\" value=\"true\"\n onchange=\"addTextChanged('<?= $this->get_field_id( 'text-box' ) ?>')\"/> Additional Text<br/>\n <textarea id=\"<?= $this->get_field_id( 'text-box' ) ?>\" class=\"widefat\"\n name=\"<?= $this->get_field_name( 'text-box' ) ?>\" <?php if ( $addText != 'true' ) {\n\t\t\t\techo 'style=\"display: none\"';\n\t\t\t} ?>><?= esc_attr( $textBox ) ?></textarea>\n </div>\n\n\t\t<?php\n\t\techo \"</div>\";\n\t}", "title": "" }, { "docid": "f5f9bcc20c7b9f85ec5c94baeb498037", "score": "0.47291335", "text": "public function form(?string $formId): self\n {\n $new = clone $this;\n $new->widget = $this->widget->form($formId);\n return $new;\n }", "title": "" } ]
de3b392e21fef909f5b4086054e6d0ff
Get the contents of the file
[ { "docid": "c46557c92cddae217eff423b4fa491c3", "score": "0.0", "text": "abstract public function getContents();", "title": "" } ]
[ { "docid": "22dfe0577547edbc804fd6ff199f5da5", "score": "0.8454146", "text": "public function getFileContent()\n {\n return file_get_contents($this->path);\n }", "title": "" }, { "docid": "180579361d5fe362ca280285776a282a", "score": "0.8334253", "text": "public function getContents()\n {\n return fopen($this->file, 'r');\n }", "title": "" }, { "docid": "8734eddc63708b23c922f4573d67e43b", "score": "0.8272551", "text": "public function getContents()\n {\n return file_get_contents( $this->path );\n }", "title": "" }, { "docid": "abd9fbff03c73043a88a187aa4b7b8c8", "score": "0.8179043", "text": "public function getContents()\n {\n if ($this->file) {\n return $this->directory->readFile($this->directory->getRelativePath($this->file));\n }\n return '';\n }", "title": "" }, { "docid": "f2f55431caf14e3f930b610affe9d8a7", "score": "0.8089108", "text": "public function getContents()\n {\n return file_get_contents($this->getPath());\n }", "title": "" }, { "docid": "7f544a7b2553f314727ddc3386de4eb0", "score": "0.79690045", "text": "function get_contents() {\n return file_get_contents($this->filepath());\n }", "title": "" }, { "docid": "c4dcb2abe2836d844427888413c278c1", "score": "0.7939946", "text": "public function read(){\n return new FileContent(file_get_contents($this->path, false));\n }", "title": "" }, { "docid": "7e940aab78c7b5f51711ab40fbf05e85", "score": "0.78990895", "text": "public static function get() {\n\n if(!file_exists(self::$file)) {\n self::change();\n }\n return file_get_contents(self::$file);\n }", "title": "" }, { "docid": "7813db58c7c74ed7cd0f02a4c5ac3760", "score": "0.7802973", "text": "public function fetchContent()\n {\n\n $data = file_get_contents($this->filePath);\n\n return $data;\n }", "title": "" }, { "docid": "cb0ec4a05a698faed0db04f5bbc25227", "score": "0.77783316", "text": "public function read()\n {\n return file_get_contents($this->path);\n }", "title": "" }, { "docid": "5d566f3e532de3f8848ead21f972dea4", "score": "0.7753037", "text": "public function getContents()\n {\n return file_get_contents($this->tempFilePath);\n }", "title": "" }, { "docid": "cd3ac3112658076fea6482da3c9007c3", "score": "0.77391344", "text": "protected function get_file_content( $file ) {\r\n\t\treturn rocket_direct_filesystem()->get_contents( $file );\r\n\t}", "title": "" }, { "docid": "d4a053e9166e54254dc22b8224d0c4fa", "score": "0.7720535", "text": "protected function getFileContent($file)\n {\n return file_get_contents($file);\n }", "title": "" }, { "docid": "920318526e29f652e021cb872f361257", "score": "0.7707488", "text": "public function getContent()\n\t{\n\t\treturn file_get_contents($this->filename);\n\t}", "title": "" }, { "docid": "2cb921a063dc846b0d007c43e1482430", "score": "0.7654105", "text": "function file_get_contents( $filename ){\n\t\t$handle = fopen($filename, \"r\");\n\t\t$contents = fread($handle, filesize($filename));\n\t\tfclose($handle);\n\t\treturn $contents;\n\t}", "title": "" }, { "docid": "6a27c006a0378f5ef71815b1dbdf30a6", "score": "0.7626742", "text": "public function get_contents($file)\n {\n }", "title": "" }, { "docid": "6a27c006a0378f5ef71815b1dbdf30a6", "score": "0.7626742", "text": "public function get_contents($file)\n {\n }", "title": "" }, { "docid": "6a27c006a0378f5ef71815b1dbdf30a6", "score": "0.7626742", "text": "public function get_contents($file)\n {\n }", "title": "" }, { "docid": "6a27c006a0378f5ef71815b1dbdf30a6", "score": "0.7626742", "text": "public function get_contents($file)\n {\n }", "title": "" }, { "docid": "c4e41533bd62ef8baea5e068e643aa77", "score": "0.76257163", "text": "function getFileContents($path);", "title": "" }, { "docid": "92a26b836e450d1f0c4388db03fc2746", "score": "0.7592375", "text": "function getFileContents($filename)\r\n {\r\n $handle = fopen($filename, \"r\");\r\n $contents = fread($handle, filesize($filename));\r\n fclose($handle);\r\n\r\n return $contents;\r\n }", "title": "" }, { "docid": "10ca9e497ac0822d1d4b61472e91f22a", "score": "0.7568203", "text": "public function get_contents($file)\n\t{\n\t\treturn file_get_contents($this->get($file));\n\t}", "title": "" }, { "docid": "1aea8b09878461ce25da221d3107cf49", "score": "0.7562017", "text": "public function getFileContent($fileName);", "title": "" }, { "docid": "1aea8b09878461ce25da221d3107cf49", "score": "0.7562017", "text": "public function getFileContent($fileName);", "title": "" }, { "docid": "e3335b8eb79e47d08b6d6d7a75103af6", "score": "0.75353307", "text": "public function getFileContent(FileObject $file)\n {\n return $file->getContents();\n }", "title": "" }, { "docid": "9dff3aa9d98b482d2f0c399974d9ffaf", "score": "0.75336766", "text": "function _file_get_contents($file)\n{\n \tif (function_exists('file_get_contents')) return file_get_contents($file);\n\n\t$f = fopen($file,'r');\n\tif (!$f) return '';\n\t$t = '';\n\n\twhile ($s = fread($f,100000)) $t .= $s;\n\tfclose($f);\n\treturn $t;\n}", "title": "" }, { "docid": "4f55a74a87a60a816c0c10981908ec18", "score": "0.75329185", "text": "public function getContents(string $path) : string;", "title": "" }, { "docid": "a9512aed1e4f9e0320db6e4c6c5beeaf", "score": "0.7509076", "text": "public function getContents($filename)\n {\n $contents = file_get_contents($filename);\n return $contents;\n }", "title": "" }, { "docid": "47058312896caf5e122dbef887aff8db", "score": "0.7488042", "text": "public function getFile()\n {\n return \\Jazzee\\Globals::getFileStore()->getFileContents($this->fileHash);\n }", "title": "" }, { "docid": "e0e1a6ab06b15afb23170d1e7d84b3a3", "score": "0.7400788", "text": "public function readFile($file)\n {\n return file_get_contents($file);\n }", "title": "" }, { "docid": "c779dbdf71e5028b8610a3184d352bc0", "score": "0.7385075", "text": "protected function getContents(): string\n\t{\n\t\treturn $this->engine->get($this->path, $this->getArrayData());\n\t}", "title": "" }, { "docid": "428822f01900b8359fa24ed8b7247b38", "score": "0.7385069", "text": "private function read_file($file)\n {\n $handler = fopen($file, \"r\");\n $file_content = fread($handler, filesize($file));\n fclose($handler);\n\n return $file_content;\n }", "title": "" }, { "docid": "c42de1b1e32e86d6669b57b80709dc85", "score": "0.73770523", "text": "public function getContentsAsArray()\n {\n return file( $this->path );\n }", "title": "" }, { "docid": "52f1871c639077a30c51055e9a6853ba", "score": "0.73361903", "text": "public function readInfo()\n {\n return file_get_contents($this->filePath);\n }", "title": "" }, { "docid": "b8732d742ad7c42bf879c8782b94e935", "score": "0.73323077", "text": "public function getContent()\n {\n $this->_checkOpen();\n fseek($this->_fileHandler, 0);\n \n return fread(\n \t$this->_fileHandler, filesize($this->_filename)\n );\n }", "title": "" }, { "docid": "afc0b454c9c48ff7629d1bebd363d869", "score": "0.73293054", "text": "public function getContents($file){\r\n $array = array();\r\n if(is_readable($file)){\r\n $fileHandler = fopen($file, 'r');\r\n while(!feof($fileHandler)){\r\n $array[] = fgets($fileHandler);\r\n }\r\n fclose($fileHandler);\r\n return $array;\r\n }\r\n }", "title": "" }, { "docid": "763a42bade6cadef4db156947ec7f963", "score": "0.7304147", "text": "public function getContent()\n {\n if ($this->_fileHandler === null) {\n return file_get_contents($this->getFullFileName());\n }\n\n $this->beforeClose();\n\n fseek($this->_fileHandler, 0);\n\n $content = stream_get_contents($this->_fileHandler);\n\n fseek($this->_fileHandler, 0, SEEK_END);\n\n $this->closeInternal();\n\n return $content;\n }", "title": "" }, { "docid": "0c7ee3fe849fcafe4381a56409b158f0", "score": "0.728271", "text": "function v6_FileContents($the_file)\n{\n $filename = __WEBSITE_ROOT_PATH . DS . 'views' . DS . $the_file;\n $handle = fopen($filename, \"r\");\n $contents = fread($handle, filesize($filename));\n fclose($handle);\n return $contents;\n}", "title": "" }, { "docid": "800720e1355dbb8cb94d42823aedc499", "score": "0.7217481", "text": "public function read(): string\n {\n return file_get_contents($this->path);\n }", "title": "" }, { "docid": "e75fdcb74b0d9d909f6f328b1a007b6e", "score": "0.7214827", "text": "public function getContent()\n {\n return $this->filesystem()->get($this->path);\n }", "title": "" }, { "docid": "ac41f60ec54b03c11504a29b8ae29df4", "score": "0.7164528", "text": "public function get_local_file_contents( $file_path ) {\r\n\r\n\t ob_start();\r\n\t include $file_path;\r\n\t return ob_get_clean();\r\n\r\n\t}", "title": "" }, { "docid": "f3817310e3d7b90ad60cd66e0538e547", "score": "0.7156185", "text": "public function getContents()\n {\n return stream_get_contents($this->stream);\n }", "title": "" }, { "docid": "9d7a4d8b25edf75fce369c3655ae260e", "score": "0.7154994", "text": "public function getContents($filename)\n {\n $file = $this->getFileSystem()->getFile($filename);\n return $file->getContents();\n }", "title": "" }, { "docid": "7fba28a5065f9381e4cbf10d9ba2d2a4", "score": "0.71496457", "text": "function getContents() ;", "title": "" }, { "docid": "68ce0135d03211f1a3c1b28009cd4113", "score": "0.7140205", "text": "public function get()\n {\n if (! $this->isValid()) {\n throw new FileNotFoundException(\"File does not exist at path {$this->getPathname()}.\");\n }\n\n return file_get_contents($this->getPathname());\n }", "title": "" }, { "docid": "3fa4f95db3f659a2808d8de23eb53fd1", "score": "0.7138818", "text": "function _open_file($file){\n\t\tif(($fp = @fopen($file, 'r'))){\n\t\t\t$content = fread($fp, filesize($file));\n\t\t\tfclose($fp);\n\t\t\treturn $content;\n\t\t}\n\t\treturn $this->_debug(5, $file);\n\t}", "title": "" }, { "docid": "1801f68ce6d1325b8a6d318ebdd7dbbe", "score": "0.7134272", "text": "function read_file($file)\n\t{\n\t\treturn @file_get_contents($file);\n\t}", "title": "" }, { "docid": "38b0352bfb04b28020dcf9a7c35ff61d", "score": "0.71248245", "text": "private function _getFileContent()\n\t{\n\t\tif ( !isset( $this->_index_file_content ) )\n\t\t{\n\t\t\tif ( !( $this->_index_file_content = file_get_contents( $this->_root_page_path ) ) )\n\t\t\t{\n\t\t\t\ttrigger_error( \"Root file not found. Please, validate the path.\", E_USER_ERROR );\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_index_file_content;\n\t}", "title": "" }, { "docid": "04319f695ec7415f70958bde51d20694", "score": "0.7120074", "text": "public function getFileContents($file)\n {\n $fh = fopen($file, 'r');\n if (!is_resource($fh)) {\n throw \\RuntimeException(\"Could not open file: {$file}\");\n }\n $data = fread($fh, filesize($file));\n fclose($fh);\n return $data;\n }", "title": "" }, { "docid": "7d1818dd6e8b27186279879bdca607ac", "score": "0.7097862", "text": "private function _content($filepath)\n\t{\n\t\ttry {\n\t\t\t$fullpath = $this->_fs->expand($filepath);\n\t\t} catch (\\Exception $e) {\n\t\t\tthrow new \\Exception(\"File not found: '{$filepath}'\");\n\t\t}\n\n\t\tif (isset($this->_files[$filepath]) == 0) {\n\t\t\t$this->_files[$filepath] = file_get_contents($fullpath);\n\t\t}\n\n\t\treturn $this->_files[$filepath];\n\t}", "title": "" }, { "docid": "48a231b1188ceec4c1dcbc7cd19f23bc", "score": "0.7067693", "text": "protected function readFile()\n {\n $reader = Reader::createFromPath($this->filename);\n return $reader->fetchAssoc();\n }", "title": "" }, { "docid": "fe1e81815b02c6747aa0f1b34328b7d0", "score": "0.70637405", "text": "public function getContent()\n {\n $this->loadFile();\n\n return $this->content;\n }", "title": "" }, { "docid": "2c05c65fdc63418a9ca5bde0c7f3511f", "score": "0.7063469", "text": "protected function getFileContents()\n {\n // return $cached\n \n $contents = file_get_contents($this->file->full_path());\n \n if ($this->file->extensions()) {\n foreach ($this->file->extensions() as $ext) {\n if ($ext == 'php') {\n $contents = PHParser::parseContents($contents);\n } else {\n $key = $this->file->type() . '_extensions';\n \n $conf = $this->config()->$key->$ext;\n \n if (!$conf) {\n throw new Exception\\RuntimeException(\n sprintf(\n \"Unknown parser [ file=>%s, extension=>%s ]\",\n $this->file->full_path(),\n $ext\n )\n );\n }\n \n if ($conf instanceof Closure) {\n $conf($contents);\n } else {\n $class = $conf['class_name'];\n $method = $conf['method'];\n $static = !empty($conf['static']);\n \n if (!empty($conf['file'])) {\n // vpe(get_include_path());\n require_once $conf['file'];\n }\n \n if ($static) {\n $func = $class . '::' . $method;\n $contents = $func($contents);\n } else {\n $parser = new $class();\n $contents = $parser->$method($contents);\n }\n }\n }\n }\n }\n \n $this->fileContents = $contents;\n }", "title": "" }, { "docid": "bce7137519ddbab9aca159a933ae664d", "score": "0.7057662", "text": "public static function getContents($path)\n {\n $file = dirname(__FILE__) . \"/$path\";\n\n if (!file_exists($file)) echo \"<p style='color: red'><strong>File doesn't exist:</strong> \" . dirname(__FILE__) . \"/$path</p>\";\n\n $result = file_get_contents($file);\n\n return $result;\n }", "title": "" }, { "docid": "fbe405e2d711b8798e55ac50e3b501b2", "score": "0.70420575", "text": "public function read() {\n return $this->restAdapter()->fileRead($this->getPath());\n }", "title": "" }, { "docid": "4c12645ffba9ee70206685c68e4f1536", "score": "0.70222545", "text": "private function _fetchFileContent($path){\n return file_get_contents($path);\n }", "title": "" }, { "docid": "f3e7f089646983272472fcb1f4c84a2c", "score": "0.7009344", "text": "public function getContents() {}", "title": "" }, { "docid": "f3e7f089646983272472fcb1f4c84a2c", "score": "0.7009344", "text": "public function getContents() {}", "title": "" }, { "docid": "f3e7f089646983272472fcb1f4c84a2c", "score": "0.7008619", "text": "public function getContents() {}", "title": "" }, { "docid": "f3e7f089646983272472fcb1f4c84a2c", "score": "0.7008619", "text": "public function getContents() {}", "title": "" }, { "docid": "0d7e78bffe9fc6095f3f9dd6aa1b31d1", "score": "0.6992274", "text": "function read_file() {}", "title": "" }, { "docid": "904323b77ae67ef1d6c672e6be97598f", "score": "0.69786745", "text": "public function getFileContents(string $filename): string\n {\n return file_get_contents($filename);\n }", "title": "" }, { "docid": "695eb9b897eb9b0e9d8f7e0b42bffb56", "score": "0.6969728", "text": "public function readAll(){\n\t//consider fopen & fclose\n return file_get_contents($this->handle); \n }", "title": "" }, { "docid": "20b7d1946d032b3c9de96edebcf1f91a", "score": "0.6952575", "text": "public function content(): string\n {\n return $this->file->content();\n }", "title": "" }, { "docid": "1b4112b901366d2267068070b3739b97", "score": "0.6935864", "text": "public function fetch() {\n $file = $this->getFilepath();\n if (file_exists($file)){\n return file_get_contents($file);\n }\n return '';\n }", "title": "" }, { "docid": "32ac65f4f82880b26928302054e9ba99", "score": "0.6933005", "text": "function get_file_contents_1($filename) {\n if (!function_exists('file_get_contents'))\n {\n $fhandle = fopen($filename, \"w+\");\n $fcontents = fread($fhandle, filesize($filename));\n fclose($fhandle);\n }\n else\n {\n $fcontents = file_get_contents($filename);\n }\n return $fcontents;\n}", "title": "" }, { "docid": "755093ad1bfb294fde0bab24ed035809", "score": "0.6931446", "text": "protected function _getContents($file) {\n\t\tif (!is_file($file)) return false;\n\t\t\n $f = @fopen($file, 'rb');\n if ($f) {\n if ($this->lockFile) @flock($f, LOCK_SH);\n $result = stream_get_contents($f);\n if ($this->lockFile) @flock($f, LOCK_UN);\n @fclose($f);\n }\n\t\treturn (!empty($result)) ? $result : false;\n\t}", "title": "" }, { "docid": "b337adaf055ee1c2e88112483d14281e", "score": "0.69120985", "text": "function myfile_get_contents($filename, $mode = \"rb\")\n{\n\tif(!is_uploaded_file($filename) && !file_exists($filename))\n\t\treturn false;\n\t$handle = fopen($filename, $mode);\n\tif(!$handle)\n\t\treturn false;\n\tfseek($handle, 0 , SEEK_END);\n\t$fsize = ftell($handle);\n\tfseek($handle, 0 , SEEK_SET);\n\t\n\tif($fsize)\n\t\t$contents = fread($handle, $fsize);\n\telse\n\t\t$contents=\"\";\n\tfclose($handle);\n\treturn $contents;\n}", "title": "" }, { "docid": "e6e08eddf757d04c667877b3259e0e86", "score": "0.68978053", "text": "protected function getFileContents($file)\n\t{\n\t\tif (file_exists($file))\n\t\t{\n\t\t\treturn trim(file_get_contents($file));\n\t\t}\n\t\t\n\t\tthrow new InvalidArgumentException(\"file '$file' does not exist\");\n\t}", "title": "" }, { "docid": "56d3c05eef668fba3c0f50b0a609fca4", "score": "0.68940365", "text": "function http_get_contents($file)\n{\n\t$result = '';\n\twhile (($line = fgetss($file, 4096)) !== false)\n\t\t$result .= $line . \"\\n\";\n\tif (!feof($file))\n\t\tthrow new Exception('Unexpected fgets() failure');\n\n\treturn $result;\n}", "title": "" }, { "docid": "c63ea83c4663310d7f40c0e61e223fab", "score": "0.6890558", "text": "public function getFileContent( string$filePath ):string\n\t{\n\t\treturn isset($this->fileGetter) ? $this->fileGetter($filePath) : file_get_contents($filePath);\n\t}", "title": "" }, { "docid": "cc2e25c7807e30c77e0179c8ce3bcdab", "score": "0.6882308", "text": "function _read_file_contents($file){\n\t\tif(array_key_exists($file, $this->file_contents)){\n\t\t\treturn $this->file_contents[$file];\n\t\t}\n\t\tif(!file_exists($this->tpl_dir.$file.$this->tpl_ext)){\n\t\t\treturn '';\n\t\t}\n\t\tif(!is_readable($this->tpl_dir.$file.$this->tpl_ext)){\n\t\t\treturn '';\n\t\t}\n\t\t$h = fopen($this->tpl_dir.$file.$this->tpl_ext, 'r');\n\t\t$data = trim(fread($h, filesize($this->tpl_dir.$file.$this->tpl_ext)));\n\t\tfclose($h);\n\t\t$this->file_contents[$file] = $data;\n\t\t$this->_preparse($file);\n\t\treturn $this->file_contents[$file];\n\t}", "title": "" }, { "docid": "abc010acf69a5011f064600f4716cf36", "score": "0.68758154", "text": "function file_get_contents( $filename ) {\n\t\treturn implode( '', file( $filename ) );\n\t}", "title": "" }, { "docid": "eb15a34fd51a5056e4d436302292e72b", "score": "0.6871084", "text": "function list_file_content($filename) {\n print file_get_contents($filename);\n}", "title": "" }, { "docid": "534ef049de10bffe86033976e0e1e07d", "score": "0.6865174", "text": "private function getFileContents($path)\n\t{\n//\t\t$hash = md5($path);\n//\t\tif (isset($this->cachedFiles[$hash]))\n//\t\t{\n//\t\t\treturn $this->cachedFiles[$hash];\n//\t\t}\n//\t\telse\n//\t\t{\n\t\t\t$contents = @file_get_contents($path);\n//\t\t\tif ($contents)\n//\t\t\t{\n\t\t\t\t$contents = explode(\n\t\t\t\t\t\"\\n\",\n\t\t\t\t\tpreg_replace(\n\t\t\t\t\t\t'/(\\r\\n)|(\\n\\r)|\\r/',\n\t\t\t\t\t\t\"\\n\",\n\t\t\t\t\t\tstr_replace(\"\\t\", ' ', $contents)\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t//file_put_contents(md5($path), print_r($contents, 1));\n\n\t\t\t\t//$contents = file($path);\n\n\t\t\t\t$res = array();\n\t\t\t\t$cnt = count($contents);\n\t\t\t\t//var_dump($cnt);\n\t\t\t\t//var_dump($contents[0]);\n\t\t\t\tfor ($i = 0; $i < $cnt; $i++)\n\t\t\t\t{\n\t\t\t\t\t$res[$i+1] = $contents[$i];\n\t\t\t\t}\n\n\t\t\t\t//var_dump($res);\n\t\t\t\t//$this->cachedFiles[$hash] = $res;//$contents;\n\n\t\t\t\treturn $res;//$contents;\n//\t\t\t}\n//\t\t}\n//\t\treturn array();\n\t}", "title": "" }, { "docid": "8ee63eaeccf718a8d7e502f63d87a5cf", "score": "0.68623716", "text": "public function get($path)\n\t{\n\t\tif (!$this->isFile($path))\n\t\t\tthrow new Exception\\FileNotFoundException(\"File doesn't exists: '$path'\");\n\n\t\treturn file_get_contents($path);\n\t}", "title": "" }, { "docid": "cdca626b68aa098e175334858cc807bb", "score": "0.68585175", "text": "public function getContentsStream()\n {\n return fopen($this->tempFilePath, 'r');\n }", "title": "" }, { "docid": "fa22bb745777cbf13c5a78eff9820bcc", "score": "0.68577576", "text": "public function read()\n\t{\n\t\tif (! $this->exists())\n\t\t\treturn '';\n\n\t\t$content = file_get_contents($this->getFilename());\n\n\t\tforeach ($this->filters as $filter)\n\t\t{\n\t\t\tif (! $filter->isFilterable($this->getFilename()))\n\t\t\t\tcontinue;\n\n\t\t\t$content = $filter->filter($content);\n\t\t}\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "ba769474ce0b5a4b0efb6890df8b97be", "score": "0.6853515", "text": "final public static function fileContent($filename)\n {\n $content = @file_get_contents($filename);\n\n if (empty($content) || $content === false)\n {\n throw new \\RuntimeException(__METHOD__ . \": failed to retrieve contents of file: {$filename}\");\n }\n return $content;\n }", "title": "" }, { "docid": "d1e1a6cad07249a22c5229e766f1ef28", "score": "0.68493474", "text": "static private function _getMainContents() {\n return file_get_contents(self::_getMainPath());\n }", "title": "" }, { "docid": "35067b49d351db834657b2596f21f608", "score": "0.6845467", "text": "function readContent($contentFile) {\n\t// Der Content des Textfiles wird mit \"file()\" in ein Array eingelesen\n\t$arr = file($contentFile);\n\t$content = \"\";\n\tforeach ($arr as $out) {\n\t\t$content .= $out;\n\t}\n\treturn $content;\n}", "title": "" }, { "docid": "f5227792ed21c1feda1dcd346a731b9d", "score": "0.6845049", "text": "public function getContents();", "title": "" }, { "docid": "f5227792ed21c1feda1dcd346a731b9d", "score": "0.6845049", "text": "public function getContents();", "title": "" }, { "docid": "f5227792ed21c1feda1dcd346a731b9d", "score": "0.6845049", "text": "public function getContents();", "title": "" }, { "docid": "f5227792ed21c1feda1dcd346a731b9d", "score": "0.6845049", "text": "public function getContents();", "title": "" }, { "docid": "8285cbb2bc93ea6279be607758062c71", "score": "0.6844858", "text": "public function read()\n\t{\n\t\treturn $this->content;\n\t}", "title": "" }, { "docid": "563618854951b5bffa373eda0d4be799", "score": "0.68414867", "text": "function GetFileContent($path)\r\n{\r\n\tif (@fopen($path, \"r\"))\r\n\t{\r\n\t\t$fp = fopen($path, \"r\");\r\n\t\t$text = fread ($fp, filesize($path));\r\n\t\tfclose($fp);\r\n\t\treturn $text;\r\n\t}\r\n\telse \r\n\t{\r\n\t\techo 'File : '.$path.' doesn\\'t exist !';\r\n\t\texit;\r\n\t}\r\n}", "title": "" }, { "docid": "3eeb48da2659f1c61557df24721e52bc", "score": "0.68305266", "text": "public function getStubContent()\n {\n return $this->files->get( $this->getStub() );\n }", "title": "" }, { "docid": "a4f060332cc6dd6e561ad5b039a912c8", "score": "0.68269324", "text": "public function getFileContent($key)\n {\n return $this->adapter->read($key);\n }", "title": "" }, { "docid": "b650ee7401f946249701311b92c844c7", "score": "0.6822417", "text": "public function read()\n {\n\n // if file is readable\n if ($this->readable !== true) return false;\n\n if (!empty($this->fp) && is_resource($this->fp)) fclose($this->fp);\n\n $this->open_fp('r');\n\n if (filesize($this->file) == 0) return false;\n $this->lock(LOCK_SH);\n\n $content = (string)fread($this->fp, ($this->size >= 0) ? $this->size : 1);\n\n $this->lock(LOCK_UN);\n\n return $content;\n }", "title": "" }, { "docid": "611e03b13bb37a662d59bca5c8aaed25", "score": "0.6818748", "text": "public function file_get_contents($key) {\n\t\treturn \\file_get_contents ( $this->_getPath ( $key ) );\n\t}", "title": "" }, { "docid": "36aff6b9bd795fa1216b22656d8562b6", "score": "0.6812941", "text": "function getContentsOfFile($file, $startLine = 0, $endLine = 0)\n{\n // File get contents\n $content = '';\n $f = fopen($file, 'r');\n $lineNo = 0;\n\n while ($line = fgets($f)) {\n $lineNo++;\n if ($lineNo >= $startLine) {\n $content .= $line;\n }\n if ($lineNo == $endLine) {\n break;\n }\n }\n fclose($f);\n return $content;\n}", "title": "" }, { "docid": "80db47c93ea2c01fafb32caec3259b04", "score": "0.68120295", "text": "function get_file_contents( $path )\n {\n $path = implode(\"/\",$path); \n \n if( !is_file( $this->base_path.$path ) )\n return false;\n\n return file_get_contents( $this->base_path.$path );\n }", "title": "" }, { "docid": "2122a8bdff95b71d2894548b64dcb48a", "score": "0.6811415", "text": "function readTemplate() {\n\t\t$content = file_get_contents(mainURL().'templates/template.txt');\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "6b48b5712bfbca3fd04e3630997114e4", "score": "0.68040234", "text": "function view_file($target_file) {\n\n $handle = fopen($target_file, \"r\");\n $contents = fread($handle, filesize($target_file));\n $contents_array = explode(\"\\n\", $contents);\n fclose($handle);\n return $contents_array;\n\n}", "title": "" }, { "docid": "7a2d583ee55898a3e12707f2850aef8f", "score": "0.68030345", "text": "public function get()\n {\n $fileContents = explode(PHP_EOL, $this->directory->readFile($this->logFile));\n return $fileContents;\n }", "title": "" }, { "docid": "c0ce9cd069110f6923a078a2ec5686ab", "score": "0.6790074", "text": "public function get($file)\n {\n if ( ! $this->exists($file))\n {\n throw new FileNotFound($file);\n }\n\n return file_get_contents($file);\n }", "title": "" }, { "docid": "3ed8c8caa283f851716dc211a4898421", "score": "0.67773634", "text": "function getFileContents($fName)\r\n{\r\n\t$fContents = null;\r\n\t$fd = fopen($fName,\"rb\");\r\n\tif ($fd)\r\n\t{\r\n\t\t$fContents = fread($fd,filesize($fName));\r\n\t\tfclose($fd);\r\n\t}\r\n\treturn $fContents;\r\n}", "title": "" }, { "docid": "354a3c7c11ef982fdc1aa18958379d9e", "score": "0.677607", "text": "protected function getFileContents(string $filename): string\n {\n return $this->fs->get($filename);\n }", "title": "" }, { "docid": "d76964fcd6eee5584da6aef5660ea11e", "score": "0.6772957", "text": "private function _getContents()\n\t{\n\t\t$cacheId = \"assets:{$this->path}.{$this->version}\";\n\n\t\tif ($this->fileCaching && isset($this->cache)) {\n\t\t\t$contents = $this->cache->load($cacheId);\n\n\t\t\tif ($contents !== false) {\n\t\t\t\treturn $contents;\n\t\t\t}\n\t\t}\n\n\t\t$contents = $this->getContents();\n\t\tif ($this->fileCaching && isset($this->cache)) {\n\t\t\t$this->cache->save($cacheId, $contents);\n\t\t}\n\n\t\treturn $contents;\n\t}", "title": "" }, { "docid": "22df8c7bdd6ae76b435fa3b684c6c57e", "score": "0.6755624", "text": "public function get_contents()\n {\n try {\n return $this->_read_content_locked();\n } catch (\\Exception $e) {\n if ( ! $this->exists())\n throw new FileNotFoundException(\"File '$this->uri' not found.\");\n throw new FilesystemException($e->getMessage(), $e->getCode(), $e);\n }\n }", "title": "" } ]
c60d333173224920238e2cf1d62ea58e
Create a new search index.
[ { "docid": "b3ad7c6277d3c7747821298695ba2f76", "score": "0.0", "text": "public function createIndex($index = null, array $settings = [], array $mappings = null)\n {\n $indexName = $index ?: $this->getDefaultIndex();\n $params = ['index' => $indexName];\n\n // Add global analyzers to the settings.\n $analyzer = $this->getGlobalAnalyzers();\n if (! empty($analyzer)) {\n $settings = array_merge($settings, [\n 'analysis' => ['analyzer' => $analyzer],\n ]);\n }\n\n if (! empty($settings)) {\n Arr::set($params, 'body.settings', $settings);\n }\n\n if (! empty($mappings)) {\n Arr::set($params, 'body.mappings', $mappings);\n }\n\n return $this->client->indices()->create($params);\n }", "title": "" } ]
[ { "docid": "d36df4876641bf3864f4b57d88d18e1d", "score": "0.7799503", "text": "public function createIndex()\n {\n //\n }", "title": "" }, { "docid": "d5eedb6082729dba58179ab91b64cb4a", "score": "0.766278", "text": "public function buildIndexCreator();", "title": "" }, { "docid": "ca9de4db1cd090ea26b16c148fb25b55", "score": "0.75438595", "text": "public function createIndex()\n {\n $index = $this->client()->getIndex('getcandy');\n $index->create();\n }", "title": "" }, { "docid": "70a77928e9934513f321c2209173e1f7", "score": "0.7321386", "text": "public static function createIndex() {\n $params = [\n 'index' => self::docIndex(),\n 'body' => [\n 'settings' => new stdClass(), // emtpy settings object\n 'mappings' => self::getMappings()\n ]\n ];\n return self::client()->indices()->create($params);\n }", "title": "" }, { "docid": "638c933148f7c5a51dfab239fee72c3d", "score": "0.73040694", "text": "public function buildIndex();", "title": "" }, { "docid": "bdaf1a70dd2392128a5066a9c620e536", "score": "0.72589064", "text": "public function makeIndex(){\n $setting_and_mapping['settings'] = ['number_of_shards' => 1, 'number_of_replicas' => 1];\n $setting_and_mapping['mappings']['properties'] = [\n 'id' => ['type' => 'long'],\n 'goods_id' => ['type' => 'long'],\n 'goods_no' => ['type' => 'keyword'],\n \"goods_name\"=> [ //需要分词的字段这样写\n 'analyzer'=> \"ik_max_word\", //ik_smart粗粒度分词 ik_max_word精细分词\n 'type'=> \"text\",\n 'fields'=> [\n 'keyword'=> [\n \"type\"=> \"keyword\",\n \"ignore_above\"=> 256\n ]\n ]\n ],\n 'create_time' => ['type' => 'long'],\n ];\n $my_es = new MyElasticSearch();\n $index = 'tea_goods';\n //这个方法会报 索引不存在错误,待修复,不过建议用kibana 命令行那里去新建。。。\n $res = $my_es->createIndex($index, $setting_and_mapping);\n pr($res);\n\n }", "title": "" }, { "docid": "902f023b5adde70d0f5f2367a7d69a08", "score": "0.7123466", "text": "function create()\n\t{\n\t\t// TODO: Some sort of site spidering process to add the entire site to the index.\n \n\t\t$index = Zend_Search_Lucene::create(APPPATH . 'search/index');\n \n \t\t$doc = Zend_Search_Lucene_Document_Html::loadHTMLFile('http://www.andrewrowland.com');\n \n \t\t$index->addDocument($doc);\n \n\t\techo '<p>Index created</p>';\n\t}", "title": "" }, { "docid": "287fe5155de6ecefc59d37c5fcb9941a", "score": "0.69588536", "text": "public function generateSearchIndex()\n {\n try {\n // remove index\n Elasticsearch::indices()->delete([\n 'index' => 'booking',\n ]);\n }\n catch (Missing404Exception $e) {\n\n }\n\n // create index\n Elasticsearch::indices()->create([\n 'index' => 'booking',\n ]);\n\n // set mappings before adding any data\n Jobs::putMappings();\n\n Jobs::addAllToIndex([\n 'field' => 'published',\n 'operator' => '=',\n 'value' => 1\n ]);\n\n\n Notification::success('The search index has been successfully rebuilt');\n\n return Redirect::route('comasy.dashboard');\n }", "title": "" }, { "docid": "a472900f6040e932400ba4534a74b8b8", "score": "0.68045264", "text": "public function create_index() {\n try {\n $res = api_call('PUT', $this->index_url);\n if ($res->status == 204) {\n throw new IndexAlreadyExists('An index for the given name already exists');\n }\n } catch (HttpException $e) {\n if ($e->getCode() == 409) {\n throw new TooManyIndexes($e->getMessage());\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "07a3117c7b4cafab94746f50c2886f6f", "score": "0.6801212", "text": "public function testCreateAndListSearchIndexes(): void\n {\n $collection = $this->createCollection($this->getDatabaseName(), $this->getCollectionName());\n $name = 'test-search-index';\n $mapping = ['mappings' => ['dynamic' => false]];\n\n $createdName = $collection->createSearchIndex(\n $mapping,\n ['name' => $name, 'comment' => 'Index creation test'],\n );\n $this->assertSame($name, $createdName);\n\n $indexes = $this->waitForIndexes($collection, fn ($indexes) => $this->allIndexesAreQueryable($indexes));\n\n $this->assertCount(1, $indexes);\n $this->assertSame($name, $indexes[0]->name);\n $this->assertSameDocument($mapping, $indexes[0]->latestDefinition);\n }", "title": "" }, { "docid": "d9f3ca1ab3ab8929ea2439bb3c5b3a64", "score": "0.67202735", "text": "function createOrUpdateIndexStructures();", "title": "" }, { "docid": "31560b871f73febe020e9b4ff595a1f0", "score": "0.6701794", "text": "function createIndex($name): Query\n {\n return $this->create(\"index $name\");\n }", "title": "" }, { "docid": "fb6e7e4c2da555fe117e2de0537a1cc1", "score": "0.6542115", "text": "protected function createIndex($index)\n {\n $index->create(\n array(\n 'number_of_shards' => 4,\n 'number_of_replicas' => 1,\n 'analysis' => array(\n 'analyzer' => array(\n 'indexAnalyzer' => array(\n 'type' => 'custom',\n 'tokenizer' => 'standard',\n 'filter' => array('lowercase', 'mySnowball')\n ),\n 'searchAnalyzer' => array(\n 'type' => 'custom',\n 'tokenizer' => 'standard',\n 'filter' => array('standard', 'lowercase', 'mySnowball')\n )\n ),\n 'filter' => array(\n 'mySnowball' => array(\n 'type' => 'snowball',\n 'language' => 'Dutch'\n )\n )\n )\n ),\n true\n );\n }", "title": "" }, { "docid": "96215fb8b6cc84b337c5ffeb92f40421", "score": "0.6531044", "text": "public function create()\n {\n return $this->index();\n }", "title": "" }, { "docid": "ca2a844a005d81d1e665067219a9862d", "score": "0.65167314", "text": "protected function createIndexDefinitionItem() : AST\\CreateIndexDefinitionItem {}", "title": "" }, { "docid": "aa2b345569f39e16912b5d8c6bbc82aa", "score": "0.6512929", "text": "protected function generate_index(){}", "title": "" }, { "docid": "f06c9c9bc6082ab691af39f94141b455", "score": "0.6494056", "text": "public function updateSearchIndex();", "title": "" }, { "docid": "995cfaf22942393292e5b92007e603cd", "score": "0.6420157", "text": "static function createSearchTable() {\n // default otherwise\n $sql = \"select count(*) from information_schema.tables where\n table_schema='information_schema' and table_name =\n 'INNODB_FT_CONFIG'\";\n $mysql56 = db_result(db_query($sql));\n\n $sql = \"show status like 'wsrep_local_state'\";\n $galera = db_result(db_query($sql));\n\n if ($galera && !$mysql56)\n throw new Exception('Galera cannot be used with MyISAM tables. Upgrade to MariaDB 10 / MySQL 5.6 is required');\n $engine = $galera ? 'InnodB' : ($mysql56 ? '' : 'MyISAM');\n if ($engine)\n $engine = 'ENGINE='.$engine;\n\n $sql = 'CREATE TABLE IF NOT EXISTS '.TABLE_PREFIX.\"_search (\n `object_type` varchar(8) not null,\n `object_id` int(11) unsigned not null,\n `title` text collate utf8_general_ci,\n `content` text collate utf8_general_ci,\n primary key `object` (`object_type`, `object_id`),\n fulltext key `search` (`title`, `content`)\n ) $engine CHARSET=utf8\";\n if (!db_query($sql))\n return false;\n\n // Start rebuilding the index\n $config = new MySqlSearchConfig();\n $config->set('reindex', 1);\n return true;\n }", "title": "" }, { "docid": "ad11edf71107c83f000d645f23c61d5c", "score": "0.6410145", "text": "public function indexNewDocument() {\n }", "title": "" }, { "docid": "69ebbc2c540f46fc5e8984a30fb2eb51", "score": "0.6405591", "text": "public function __construct() {\n\t\t$this->oSearchService = SearchService::getInstance();\n\n\t\t$this->sFilePathIndexProgTxt = BSDATADIR.DS.'index_prog.txt';\n\t\t$this->sFilePathIndexLogFile = BSDATADIR.DS.'ExtendedSearchIndex.log';\n\t\t$this->sFilePathLockFile = BSDATADIR.DS.'ExtendedSearch.lock';\n\n\t\t//Possible values of PHP_SAPI (not all): apache, cgi (until PHP 5.3), cgi-fcgi, cli\n\t\t$this->bCommandLineMode = ( PHP_SAPI === 'cli' );\n\n\t\t$this->sCustomerId = BsConfig::get( 'MW::ExtendedSearch::CustomerID' );\n\n\t\t// Set major types to be indexed\n\t\t$this->aTypes['wiki'] = (bool)BsConfig::get( 'MW::ExtendedSearch::IndexTypesWiki' );\n\t\t$this->aTypes['special'] = (bool)BsConfig::get( 'MW::ExtendedSearch::IndexTypesSpecial' );\n\t\t$this->aTypes['repo'] = (bool)BsConfig::get( 'MW::ExtendedSearch::IndexTypesRepo' );\n\t\t$this->aTypes['linked'] = (bool)BsConfig::get( 'MW::ExtendedSearch::IndexTyLinked' );\n\t\t$this->aTypes['special-linked'] = (bool)BsConfig::get( 'MW::ExtendedSearch::IndexTypesSpecialLinked' );\n\t}", "title": "" }, { "docid": "a395741abe85890b96f505c563900b87", "score": "0.6391901", "text": "public static function createIndex($index){\r\n\t\t$params = ['index' => $index];\r\n\t\treturn self::getClientInstance()->indices()->create($params);\r\n\t}", "title": "" }, { "docid": "7ef563a155092266925c651f472b4dc2", "score": "0.636312", "text": "public function createIndex($className)\n {\n //Get meta info for the class\n $meta = $this->metaRepository->fromClass($className);\n\n //Create a node index\n if($meta instanceof NodeMeta)\n {\n return new NodeIndex($this->client, $className);\n }\n\n else\n {\n return new RelationshipIndex($this->client, $className);\n }\n\n }", "title": "" }, { "docid": "35e863a51f5b55c9618c89b7ce9967b2", "score": "0.6342531", "text": "public function __construct(SearchApiIndex $index, array $options = array());", "title": "" }, { "docid": "38b29d6b019bfb326b8da6372c1a071b", "score": "0.63229936", "text": "public function testUpdateSearchIndex(): void\n {\n $collection = $this->createCollection($this->getDatabaseName(), $this->getCollectionName());\n $name = 'test-search-index';\n $mapping = ['mappings' => ['dynamic' => false]];\n\n $createdName = $collection->createSearchIndex(\n $mapping,\n ['name' => $name],\n );\n $this->assertSame($name, $createdName);\n\n $indexes = $this->waitForIndexes($collection, fn ($indexes) => $this->allIndexesAreQueryable($indexes));\n $this->assertCount(1, $indexes);\n\n $mapping = ['mappings' => ['dynamic' => true]];\n $collection->updateSearchIndex($name, $mapping);\n\n $indexes = $this->waitForIndexes($collection, fn ($indexes) => $this->allIndexesAreQueryable($indexes));\n\n $this->assertCount(1, $indexes);\n $this->assertSame($name, $indexes[0]->name);\n $this->assertSameDocument($mapping, $indexes[0]->latestDefinition);\n }", "title": "" }, { "docid": "dd33d0b5a055c71793be2c5ee9f6db1a", "score": "0.6316099", "text": "public function createSearchPluginsForIndex($index_id);", "title": "" }, { "docid": "177f56a41327429b73cdad6d743de864", "score": "0.6299354", "text": "public function index() {\n $indexDir = APP_PATH. '/' . self::INDEX_DIR;\n is_dir($indexDir) || mkdir($indexDir, 0777, true);\n $index = self::create($indexDir);\n\n $inputDir = APP_PATH. '/' . self::INPUT_DIR;\n is_dir($inputDir) || mkdir($inputDir, 0777, true);\n echo sprintf(\"Create index for %s \\n\\n\", $inputDir);\n foreach (new DirectoryIterator($inputDir) as $fileInfo) {\n if ($fileInfo->isDot()) {\n continue;\n }\n echo sprintf(\"File : %s \\n\", $fileInfo->getFilename());\n $doc = Zend_Search_Lucene_Document_Docx::loadDocxFile($inputDir . $fileInfo->getFilename());\n $index->addDocument($doc);\n }\n echo \"\\n###Done###\\n\";\n }", "title": "" }, { "docid": "590651a8793de5f43ea62918e1d8993f", "score": "0.6285452", "text": "public function buildIndexes();", "title": "" }, { "docid": "a02a01e560585ebdb6ba6acb6cff3e22", "score": "0.62059534", "text": "public function fullindex()\n {\n try\n {\n ini_set('memory_limit', isys_settings::get('system.memory-limit.searchindex', '4G'));\n\n $time_start = microtime(true);\n\n $observers = [];\n if ($GLOBALS['argc'])\n {\n // Attach self to retrieve status updates for cli commands\n $observers['Handler'] = $this;\n }\n\n $indexer = $this->createIndex($observers);\n\n // Sum it all up\n $time_end = microtime(true);\n $time = number_format($time_end - $time_start, 2);\n\n verbose(\n sprintf(\n \"\\nFinished indexing in \" . C__COLOR__GREEN . \"%s\" . C__COLOR__NO_COLOR . \" seconds. Indexed %s properties from %s objects(s).\",\n $time,\n $indexer->getIndexedItems(),\n $indexer->getIndexedDocuments()\n ) . ' ' . sprintf(\n 'Memory peak usage: ' . C__COLOR__RED . '%s' . C__COLOR__NO_COLOR . ' mb.',\n number_format(memory_get_peak_usage(true) / 1024 / 1024, 2)\n ) . \"\\n\"\n );\n\n }\n catch (Exception $e)\n {\n //var_dump($e);\n error($e->getMessage());\n }\n }", "title": "" }, { "docid": "b8594503c0093bfb1436580b37fce05c", "score": "0.6189678", "text": "public function new_search_query();", "title": "" }, { "docid": "e19970d91545adcc3fe3378c209766e6", "score": "0.616312", "text": "protected function _index()\n {\n $rows = $this->solr->driver->get_all();\n\n $client = Solr::getClient(null, $this->solr->config->index_name());\n $client->ping();\n\n $i = 1;\n foreach ($rows as $row)\n {\n $doc = $this->solr->create_model_document($row);\n $client->addDocument($doc);\n // todo remove this\n if ($i++ == 50) break;\n }\n $client->commit();\n $client->optimize();\n }", "title": "" }, { "docid": "e6ecc5e26c60c5c94a28b94c4dc56d43", "score": "0.61310905", "text": "function _cp_setup_build_search_index() {\n\tif ( ! current_theme_supports( 'app-search-index' ) ) {\n\t\treturn;\n\t}\n\n\tappthemes_add_instance( 'APP_Build_Search_Index' );\n}", "title": "" }, { "docid": "c2b3e7d3db8a621dc7cbc033d794bc65", "score": "0.6124189", "text": "function doCreateIndex() {\n\t\t$this->db = x(\"db\");\n\t\t$this->collection = x(\"collection\");\n\t\t$this->nativeFields = MCollection::fields($this->_mongo->selectDB($this->db), $this->collection);\n\t\tif ($this->isPost()) {\n\t\t\t$db = new MongoDB($this->_mongo, $this->db);\n\t\t\t$collection = $this->_mongo->selectCollection($db, $this->collection);\n\t\t\t\n\t\t\t$fields = xn(\"field\");\n\t\t\tif (!is_array($fields)) {\n\t\t\t\t$this->message = \"Index contains one field at least.\";\n\t\t\t\t$this->display();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$orders = xn(\"order\");\n\t\t\t$attrs = array();\n\t\t\tforeach ($fields as $index => $field) {\n\t\t\t\t$field = trim($field);\n\t\t\t\tif (!empty($field)) {\n\t\t\t\t\t$attrs[$field] = ($orders[$index] == \"asc\") ? 1 : -1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (empty($attrs)) {\n\t\t\t\t$this->message = \"Index contains one field at least.\";\n\t\t\t\t$this->display();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t//if is unique\n\t\t\t$options = array();\n\t\t\tif (x(\"is_unique\")) {\n\t\t\t\t$options[\"unique\"] = 1;\n\t\t\t\tif (x(\"drop_duplicate\")) {\n\t\t\t\t\t$options[\"dropDups\"] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$options[\"background\"] = 1;\n\t\t\t$options[\"safe\"] = 1;\n\t\t\t\n\t\t\t//name\n\t\t\t$name = trim(xn(\"name\"));\n\t\t\tif (!empty($name)) {\n\t\t\t\t$options[\"name\"] = $name;\n\t\t\t}\n\t\t\t$collection->ensureIndex($attrs, $options);\n\t\t\t\n\t\t\t$this->redirect(\"collectionIndexes\", array(\n\t\t\t\t\"db\" => $this->db,\n\t\t\t\t\"collection\" => $this->collection\n\t\t\t));\n\t\t}\n\t\t\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "768052739bb1237766174263e334997f", "score": "0.61117315", "text": "public function createSearch()\n\t{\n\t\t$conn = $this->dbm->acquire( $this->dbname );\n\t\t$search = new \\Aimeos\\MW\\Criteria\\SQL( $conn );\n\t\t$this->dbm->release( $conn, $this->dbname );\n\n\t\treturn $search;\n\t}", "title": "" }, { "docid": "84ee80689a9cc58728b12f37ef9b2fb1", "score": "0.61047846", "text": "function hook_search_api_index_insert(\\Drupal\\search_api\\Index\\IndexInterface $index) {\n db_insert('example_search_index')\n ->fields(array(\n 'index' => $index->id(),\n 'insert_time' => REQUEST_TIME,\n ))\n ->execute();\n}", "title": "" }, { "docid": "336b301028156cd6a6f3d45226c54339", "score": "0.610259", "text": "public function getSearchIndex()\n {\n if ($this->_searchIndex === null) {\n $options = $this->_getOptions('lucene');\n try {\n $this->_searchIndex = \\Zend_Search_Lucene::open($options['basepath']);\n } catch (\\Zend_Search_Lucene_Exception $e) {\n $this->_searchIndex = \\Zend_Search_Lucene::create($options['basepath']);\n }\n }\n return $this->_searchIndex;\n }", "title": "" }, { "docid": "279e1390bfe8f82b72140bccaa72bdc9", "score": "0.6096935", "text": "public function createIndex($keys, array $options = array()) {\n return $this->collection->createIndex($keys, $options);\n }", "title": "" }, { "docid": "972c3add93bd4723d2dd9516515bfe6c", "score": "0.60856414", "text": "public function buildIndex(DocumentIndex $index)\n {\n foreach ($this->documents as $document) {\n $index->addDocument($document);\n }\n\n return $index;\n }", "title": "" }, { "docid": "cfbea907850a0fc27bc60ff20c8cf267", "score": "0.6077756", "text": "public function buildindextable()\n {\n\n return $this;\n }", "title": "" }, { "docid": "96c0e52f1e7603f24651c82a188b6c06", "score": "0.60373217", "text": "protected function ensureIndex()\n {\n $index = $this->getIndex();\n if (!$index->exists())\n {\n $index->create();\n }\n }", "title": "" }, { "docid": "d0f36f797cb538306bacc75e73f2f070", "score": "0.603481", "text": "public function getIndex($name)\n {\n return new Index($this, $name);\n }", "title": "" }, { "docid": "d573ab41e52e93de6d9335ddd36df45b", "score": "0.6020859", "text": "public function solrIndex() {\n\t\t$stage = null;\n\t\t// if it's being written and a versionable, then save only in the draft\n\t\t// repository. \n\t\tif (Object::has_extension($this->owner, 'Versioned')) {\n\t\t\t$stage = 'Stage';\n\t\t}\n\n\t\tif (class_exists('SolrIndexItemJob')) {\n\t\t\t$this->createIndexJob($this->owner, $stage);\n\t\t} else {\n\t\t\t// make sure only the fields that are highlighted in searchable_fields are included!!\n\t\t\tsingleton('SolrSearchService')->index($this->owner, $stage);\n\t\t}\n\t}", "title": "" }, { "docid": "d781fe8d9337da0be1451ba9f6dc1dae", "score": "0.5972874", "text": "public function index()\n {\n $params = [\n 'index' => 'custom-users', // The name of the index.\n 'body' => [\n // Withing the body of an index we can set analyzers, filters, settings.\n // For now we are going to map properties.\n 'mappings' => [\n // In prior versions < 7.0, we would specify a type. As of 7.0 this is no longer allowed.\n 'properties' => [\n 'name' => [\n 'type' => 'keyword', // We can define what kind of type the property has, e.g. 'keyword', 'integer', 'string' *1.\n ],\n 'email' => [\n 'type' => 'text' // This can be an integer, text, etc.\n ]\n ]\n ]\n ]\n ];\n\n return $this->elasticSearchClient->indices()->create($params);\n }", "title": "" }, { "docid": "ae6d606fe2b32bc500d76956a3aac451", "score": "0.5972461", "text": "public function create($className, $arguments = [])\n {\n $structure = $this->objectManager->create($className, $arguments);\n if (!$structure instanceof IndexStructureInterface) {\n throw new \\InvalidArgumentException(\n $className . ' doesn\\'t implement \\Magento\\Framework\\Indexer\\IndexStructureInterface'\n );\n }\n\n return $structure;\n }", "title": "" }, { "docid": "dfcb23157ddb6a15673830527210ee0d", "score": "0.59631693", "text": "public function search(string $index, array $query): SearchResults;", "title": "" }, { "docid": "fb40a1dad36ac12cc1d2fe315e7c2e16", "score": "0.5951175", "text": "public function createSearch($connection=\"icinga\") {\n return $this->model->createSearch($connection);\n }", "title": "" }, { "docid": "7f59242c6b3a6da95f016bf78891f67a", "score": "0.59439623", "text": "public function define() {\n\t\t$index = $this->getIndex();\n\n\t\t# Recreate the index\n if ($index->exists()) {\n $index->delete();\n\t\t}\n $index->create();\n\n\t\tforeach ($this->getIndexedClasses() as $class) {\n\t\t\t/** @var $sng Searchable */\n\t\t\t$sng = singleton($class);\n\n\t\t\t$mapping = $sng->getElasticaMapping();\n\t\t\t$mapping->setType($index->getType($sng->getElasticaType()));\n\t\t\t$mapping->send();\n\t\t}\n\t}", "title": "" }, { "docid": "05297ba184aa6400641c9c4194ae9e2a", "score": "0.59346056", "text": "public function addToIndex()\n {\n return $this->onSearchConnection(function($model){\n $query = $model->newQueryWithoutScopes();\n\n return $query->insert($model->toSearchableArray());\n }, $this);\n }", "title": "" }, { "docid": "7193af06d169816f997a6938a9d014cf", "score": "0.5927385", "text": "public static function initiate_search_index_rebuild() {\n\n\t\tcheck_ajax_referer( __FILE__ );\n\n\t\t// Flag for the request to check it came from us, can't use nonce API as it relies on the user being logged in\n\t\t$nonce = wp_create_nonce( __FILE__ );\n\t\tset_transient( 'fss_build_index_token', $nonce, 5 );\n\n\t\t$response = wp_remote_post( admin_url( 'admin-ajax.php' ), array(\n\t\t\t'timeout' => 1,\n\t\t\t'blocking' => false,\n\t\t\t'sslverify' => false,\n\t\t\t'headers' => array(),\n\t\t\t'body' => array(\n\t\t\t\t'action' => 'fss_rebuild_search_index',\n\t\t\t\t'token' => $nonce\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\tdie();\n\t}", "title": "" }, { "docid": "4aa2710756fa1b8a50ec0d1baae822dd", "score": "0.5920028", "text": "protected function addToSearchIndex()\n\t{\n\t\t/** @var \\PageModel $objPage */\n\t\tglobal $objPage;\n\n\t\t// Index page if searching is allowed and there is no back end user\n\t\tif (\\Config::get('enableSearch') && $objPage->type == 'regular' && !BE_USER_LOGGED_IN && !$objPage->noSearch)\n\t\t{\n\t\t\t// Index protected pages if enabled\n\t\t\tif (\\Config::get('indexProtected') || (!FE_USER_LOGGED_IN && !$objPage->protected))\n\t\t\t{\n\t\t\t\t$blnIndex = true;\n\n\t\t\t\t// Do not index the page if certain parameters are set\n\t\t\t\tforeach (array_keys($_GET) as $key)\n\t\t\t\t{\n\t\t\t\t\tif (in_array($key, $GLOBALS['TL_NOINDEX_KEYS']) || strncmp($key, 'page_', 5) === 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$blnIndex = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($blnIndex)\n\t\t\t\t{\n\t\t\t\t\t$arrData = array\n\t\t\t\t\t(\n\t\t\t\t\t\t'url' => \\Environment::get('base') . \\Environment::get('request'),\n\t\t\t\t\t\t'content' => $this->strBuffer,\n\t\t\t\t\t\t'title' => $objPage->pageTitle ?: $objPage->title,\n\t\t\t\t\t\t'protected' => ($objPage->protected ? '1' : ''),\n\t\t\t\t\t\t'groups' => $objPage->groups,\n\t\t\t\t\t\t'pid' => $objPage->id,\n\t\t\t\t\t\t'language' => $objPage->language\n\t\t\t\t\t);\n\n\t\t\t\t\t\\Search::indexPage($arrData);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b9d83fac43ef1e4638d8e787f8e992aa", "score": "0.5862091", "text": "function hook_search_api_index_reindex(\\Drupal\\search_api\\Index\\IndexInterface $index, $clear = FALSE) {\n db_insert('example_search_index_reindexed')\n ->fields(array(\n 'index' => $index->id(),\n 'clear' => $clear,\n 'update_time' => REQUEST_TIME,\n ))\n ->execute();\n}", "title": "" }, { "docid": "e8961bdf3e1c5db3818f440832f6948a", "score": "0.58516663", "text": "function hook_search_api_index_reindex(\\Drupal\\search_api\\IndexInterface $index, $clear = FALSE) {\n \\Drupal\\Core\\Database\\Database::getConnection()->insert('example_search_index_reindexed')\n ->fields(array(\n 'index' => $index->id(),\n 'clear' => $clear,\n 'update_time' => REQUEST_TIME,\n ))\n ->execute();\n}", "title": "" }, { "docid": "e6bdfed4678b9c9df978a1b859eb1ae7", "score": "0.5846575", "text": "public function create()\n {\n $has_indices = User_Has_Index::all();\n\n return view ('has_indices.create', compact('has_indices'));\n }", "title": "" }, { "docid": "4bb96280faccd73b72755e517dbb1a3c", "score": "0.5832685", "text": "public function createSearch(array $parameters, array $data = null);", "title": "" }, { "docid": "657fc7d9e0dc088cbae388a1a153f7d3", "score": "0.5821595", "text": "public function testSearchIndex()\n {\n }", "title": "" }, { "docid": "bfea67c3fb7023f1396a9c751d407b55", "score": "0.58153635", "text": "protected function _addIndex($index_cols, $search_cols, $unique, $length)\n {\n if (!is_array($index_cols))\n $index_cols = array($index_cols);\n $quotedCols = array_map(array($this->db, 'quotekey'), $index_cols);\n if (preg_match('/mysql/', $this->db->driver()))\n foreach($quotedCols as $i=>&$col)\n if(strtoupper($search_cols[$index_cols[$i]]['type']) == 'TEXT')\n $col.='('.$length.')';\n $cols = implode(',', $quotedCols);\n $name = $this->assembleIndexKey($index_cols,$this->name);\n $name = $this->db->quotekey($name);\n $table = $this->db->quotekey($this->name);\n $index = $unique ? 'UNIQUE INDEX' : 'INDEX';\n $cmd = array(\n 'pgsql|sqlite2?|ibm|mssql|sybase|dblib|odbc|sqlsrv' =>\n \"CREATE $index $name ON $table ($cols);\",\n 'mysql' => //ALTER TABLE is used because of MySQL bug #48875\n \"ALTER TABLE $table ADD $index $name ($cols);\",\n );\n $query = $this->findQuery($cmd);\n $this->queries[] = $query;\n }", "title": "" }, { "docid": "660d9ac841822f03d3aea280a0cb575e", "score": "0.5793728", "text": "public function initialize()\n {\n // attributes\n $this->setName('custindex');\n $this->setPhpName('Custindex');\n $this->setIdentifierQuoting(false);\n $this->setClassName('\\\\Custindex');\n $this->setPackage('');\n $this->setUseIdGenerator(false);\n // columns\n $this->addPrimaryKey('recno', 'Recno', 'INTEGER', true, 10, null);\n $this->addColumn('date', 'Date', 'INTEGER', true, 8, null);\n $this->addColumn('time', 'Time', 'INTEGER', true, 8, null);\n $this->addColumn('splogin1', 'Splogin1', 'VARCHAR', true, 12, null);\n $this->addColumn('splogin2', 'Splogin2', 'VARCHAR', true, 12, null);\n $this->addColumn('splogin3', 'Splogin3', 'VARCHAR', true, 12, null);\n $this->addColumn('custid', 'Custid', 'VARCHAR', true, 6, null);\n $this->addColumn('shiptoid', 'Shiptoid', 'VARCHAR', true, 6, null);\n $this->addColumn('name', 'Name', 'VARCHAR', true, 30, null);\n $this->addColumn('addr1', 'Addr1', 'VARCHAR', true, 30, null);\n $this->addColumn('addr2', 'Addr2', 'VARCHAR', true, 30, null);\n $this->addColumn('city', 'City', 'VARCHAR', true, 30, null);\n $this->addColumn('state', 'State', 'VARCHAR', true, 2, null);\n $this->addColumn('zip', 'Zip', 'VARCHAR', true, 10, null);\n $this->addColumn('phone', 'Phone', 'VARCHAR', true, 20, null);\n $this->addColumn('cellphone', 'Cellphone', 'VARCHAR', true, 20, null);\n $this->addColumn('contact', 'Contact', 'VARCHAR', true, 35, null);\n $this->addColumn('source', 'Source', 'VARCHAR', true, 2, null);\n $this->addColumn('extension', 'Extension', 'VARCHAR', true, 7, null);\n $this->addColumn('email', 'Email', 'VARCHAR', true, 50, null);\n $this->addColumn('typecode', 'Typecode', 'VARCHAR', true, 45, null);\n $this->addColumn('faxnbr', 'Faxnbr', 'VARCHAR', true, 20, null);\n $this->addColumn('title', 'Title', 'VARCHAR', true, 45, null);\n $this->addColumn('arcontact', 'Arcontact', 'VARCHAR', true, 1, null);\n $this->addColumn('dunningcontact', 'Dunningcontact', 'VARCHAR', true, 1, null);\n $this->addColumn('buyingcontact', 'Buyingcontact', 'VARCHAR', true, 1, null);\n $this->addColumn('certcontact', 'Certcontact', 'VARCHAR', true, 1, null);\n $this->addColumn('ackcontact', 'Ackcontact', 'VARCHAR', true, 1, null);\n $this->addColumn('dummy', 'Dummy', 'VARCHAR', true, 1, null);\n }", "title": "" }, { "docid": "64be97b6c0f58aab6410c8af7e1bc7b1", "score": "0.5788721", "text": "function addIndextank($indexType,$id,$data){\n\t\t$client = $this->createIndextankClient();\n\t\t$index = $client->get_index($indexType);\n\t\t$doc_id = $id;\n\t\t$index->add_document($doc_id, $data);\n\t}", "title": "" }, { "docid": "1a1fc0f76ff1729e2bac3f0e4e4ae8e3", "score": "0.57611704", "text": "public function &addIndex() {\n\t\t\t$nb = func_num_args();\n\t\t\tif ($nb == 1)\n\t\t\t\tarray_push($this->indexes, array(\"index\".count($this->indexes),func_get_arg(0)));\n\t\t\telse {\n\t\t\t\t$a = array(\"index\".count($this->indexes));\n\t\t\t\tfor ($i = 0; $i < $nb; $i++)\n\t\t\t\t\tarray_push($a, func_get_arg($i));\n\t\t\t\tarray_push($this->indexes, $a);\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "title": "" }, { "docid": "7f4d0b6634955a202d5a85755ad48a3a", "score": "0.5753904", "text": "function &getIndex($force=FALSE) { \n\n\t\t$indexPath = BASE_DIR .'/var/search_cache/tickets';\n\t\tif (!file_exists($indexPath) || $force===TRUE) {\n $this->index = new Zend_Search_Lucene($indexPath,true); \n\t\t\t$this->rebuildIndex();\n\t\t}\n\n if(!$this->index) { \n $this->index = new Zend_Search_Lucene($indexPath); \n } \n return $this->index; \n }", "title": "" }, { "docid": "22444758577999d17e623378ee5cae82", "score": "0.5741913", "text": "abstract public function AddIndex( $theIndex, $theOptions = Array() );", "title": "" }, { "docid": "d72b89fcd4edc451c2860fbb768b3faa", "score": "0.57069826", "text": "public function testAddingIndex()\n\t{\n\t\tR::nuke();\n\t\t$sql = 'CREATE TABLE song (\n\t\t\tid SERIAL PRIMARY KEY,\n\t\t\talbum_id INTEGER,\n\t\t\tcategory VARCHAR(255)\n\t\t)';\n\t\tR::exec( $sql );\n\t\t$indexes = R::getAll( \" SELECT * FROM pg_indexes WHERE schemaname = 'public' AND tablename = 'song' \");\n\t\tasrt( count( $indexes ), 1 );\n\t\t$writer = R::getWriter();\n\t\t$writer->addIndex( 'song', 'index1', 'album_id' );\n\t\t$indexes = R::getAll( \" SELECT * FROM pg_indexes WHERE schemaname = 'public' AND tablename = 'song' \");\n\t\tasrt( count( $indexes ), 2 );\n\t\t//Cant add the same index twice\n\t\t$writer->addIndex( 'song', 'index1', 'album_id' );\n\t\t$indexes = R::getAll( \" SELECT * FROM pg_indexes WHERE schemaname = 'public' AND tablename = 'song' \");\n\t\tasrt( count( $indexes ), 2 );\n\t\t$writer->addIndex( 'song', 'index2', 'category' );\n\t\t$indexes = R::getAll( \" SELECT * FROM pg_indexes WHERE schemaname = 'public' AND tablename = 'song' \");\n\t\tasrt( count( $indexes ), 3 );\n\t\t//Dont fail, just dont\n\t\ttry {\n\t\t\t$writer->addIndex( 'song', 'index3', 'nonexistant' );\n\t\t\tpass();\n\t\t} catch( \\Exception $e ) {\n\t\t\tfail();\n\t\t}\n\t\t$indexes = R::getAll( \" SELECT * FROM pg_indexes WHERE schemaname = 'public' AND tablename = 'song' \");\n\t\tasrt( count( $indexes ), 3 );\n\t\ttry {\n\t\t\t$writer->addIndex( 'nonexistant', 'index4', 'nonexistant' );\n\t\t\tpass();\n\t\t} catch( \\Exception $e ) {\n\t\t\tfail();\n\t\t}\n\t\t$indexes = R::getAll( \" SELECT * FROM pg_indexes WHERE schemaname = 'public' AND tablename = 'song' \");\n\t\tasrt( count( $indexes ), 3 );\n\t}", "title": "" }, { "docid": "2acdef046bad9b4f03c48ab3bfb51055", "score": "0.5706593", "text": "function getCreateIndexSQLQuery(Schema\\Index $index, $table);", "title": "" }, { "docid": "c20a87f9e0737012f4a10837145c41b5", "score": "0.56860983", "text": "public function createMangoIndex($fields, $ddoc = null, $name = null)\n {\n $documentPath = '/'.$this->databaseName.'/_index';\n\n $params = ['index'=>['fields'=>$fields]];\n\n if ($ddoc) {\n $params['ddoc'] = $ddoc;\n }\n if ($name) {\n $params['name'] = $name;\n }\n\n return $this->httpClient->request('POST', $documentPath, json_encode($params));\n }", "title": "" }, { "docid": "38cc0d9b741cd1b74e497d06c9e5bbcb", "score": "0.5668087", "text": "public function getSearchIndex()\n {\n return $this->searchIndex ?? $this->getTable();\n }", "title": "" }, { "docid": "5a084f85c0aacb5625fddb3af036ad3d", "score": "0.566374", "text": "public function makeIndexMetadata($class)\n {\n return new IndexMetadata($class);\n }", "title": "" }, { "docid": "cb48010e6b88cc2656f096feb15fa675", "score": "0.5662491", "text": "public function addIndex() {\n if($this->_currentTable == null) return false;\n $this->addKey(\"INDEX\", func_get_args());\n\n // fluent interface\n return $this;\n }", "title": "" }, { "docid": "3ce16516b6a381d088ebecd6a15b6545", "score": "0.56396097", "text": "function cp_register_search_index_items() {\n\tif ( ! current_theme_supports( 'app-search-index' ) || isset( $_GET['firstrun'] ) ) {\n\t\treturn;\n\t}\n\n\t// Ad listings\n\t$listing_custom_fields = array_merge( cp_custom_search_fields(), array( 'cp_sys_ad_conf_id' ) );\n\n\t$listing_index_args = array(\n\t\t'meta_keys' => $listing_custom_fields,\n\t\t'taxonomies' => array( APP_TAX_CAT, APP_TAX_TAG ),\n\t);\n\tAPP_Search_Index::register( APP_POST_TYPE, $listing_index_args );\n\n\t// Blog posts\n\t$post_index_args = array(\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t);\n\tAPP_Search_Index::register( 'post', $post_index_args );\n\n\t// Pages\n\tAPP_Search_Index::register( 'page' );\n}", "title": "" }, { "docid": "62113d2e6d6f29f31348be54c54f7bdd", "score": "0.56379926", "text": "function buildIndex() {\n\t\t$journalDao = &DAORegistry::getDAO('JournalDAO');\n\t\t$articleDao = &DAORegistry::getDAO('ArticleDAO');\n\t\t\n\t\t$journals = &$journalDao->getJournals();\n\t\twhile (!$journals->eof()) {\n\t\t\t$journal = &$journals->next();\n\t\t\t$numIndexed = 0;\n\t\t\t\n\t\t\techo \"Indexing \\\"\", $journal->getTitle(), \"\\\" ... \";\n\t\t\t\n\t\t\t$articles = &$articleDao->getArticlesByJournalId($journal->getJournalId());\n\t\t\twhile (!$articles->eof()) {\n\t\t\t\tif ($this->indexArticle($articles->next())) {\n\t\t\t\t\t$numIndexed++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\techo $numIndexed, \" articles indexed\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "8eff56eb323624a4240637548dc2b475", "score": "0.5627085", "text": "public function getIndexDefinition()\n {\n return [\n 'value' => new Search\\FieldType\\StringField(),\n ];\n }", "title": "" }, { "docid": "85ce44da3470b230a2af341a8afdc099", "score": "0.5612857", "text": "public function indexNewVersion() {\n }", "title": "" }, { "docid": "12f49782f8dfe78975247840142f0f85", "score": "0.56080765", "text": "public function init_index($settings = false)\n {\n $cached_index = $this->get_cached_index();\n\n // cache found, set stored value to class\n if ($cached_index) {\n // $this->log->info('Use cached index');\n\n $this->index = $cached_index;\n\n if($settings) {\n $this->index->setSettings($this->index_settings['config']);\n }\n\n return;\n\n // no cache is set, create index with settings\n }\n\n // init index in Algolia\n $this->index = $this->algolia_client->initIndex($this->index_name);\n\n // set settings\n if($settings) {\n $this->index->setSettings($this->index_settings['config']);\n }\n\n // trigger cache storage\n $this->cache_index();\n }", "title": "" }, { "docid": "58c6d0bf7b96f9936bddb46329824e0d", "score": "0.5606282", "text": "public function buildIndex() {\n\t\t// defaults to false; script execution is terminated if client disconnects\n\t\tignore_user_abort( true );\n\n\t\tflush();\n\n\t\tlibxml_use_internal_errors( true );\n\n\t\tob_start();\n\n\t\tif ( !$this->bCommandLineMode ) header( \"Content-Encoding: none\" );\n\n\t\t// todo: what if zlib.output_compression = On in php.ini\n\n\t\tif ( file_exists( $this->sFilePathLockFile ) ) {\n\t\t\treturn wfMessage( 'bs-extendedsearch-indexinginprogress' )->plain();\n\t\t}\n\n\t\t// create lock file\n\t\t$this->lockFile( 'createLock' );\n\t\t// create log file\n\t\t$this->logFile();\n\t\t// create progress file\n\t\t$this->progressFile( 'create' );\n\n\t\t$this->write( '', date( \"d.m.Y H:i:s\" ) . \"\\n\" );\n\n\t\t$sRes = '';\n\t\ttry {\n\t\t\t$this->buildIndexWiki( wfMessage( 'bs-extendedsearch-indexing-wiki-articles' )->plain() );\n\t\t\t$this->buildIndexSpecial( wfMessage( 'bs-extendedsearch-indexing-specialpages' )->plain() );\n\t\t\t$this->buildIndexRepo( wfMessage( 'bs-extendedsearch-indexing-files-in-repo' )->plain() );\n\t\t\t$this->buildIndexLinked( wfMessage( 'bs-extendedsearch-indexing-linked-files' )->plain() );\n\t\t\t$this->buildIndexExternalRepo( wfMessage( 'bs-extendedsearch-indexing-external-files-in-repo' )->plain() );\n\n\t\t\twfRunHooks( 'BSExtendedSearchBuildIndex', array( $this ) );\n\t\t} catch ( BsException $e ) {\n\t\t\t$this->lockFile( 'deleteLock' );\n\t\t\t$sRes .= \"Instance ExtendedSearchBase returned following BsException in procedure buildIndex(): {$e->getMessage()}\";\n\t\t}\n\n\t\t$this->commitAndOptimize( true );\n\n\t\t$this->write(\n\t\t\twfMessage( 'bs-extendedsearch-finished' )->plain(),\n\t\t\t$this->iDocsInIndex . ' ' . wfMessage( 'bs-extendedsearch-docs-in-index' )->plain(),\n\t\t\t100\n\t\t);\n\t\t$this->write( '', date( \"d.m.Y H:i:s\" ) );\n\n\t\t// delete progress file\n\t\t$this->progressFile( 'delete' );\n\t\t// delete lock file\n\t\t$this->lockFile( 'deleteLock' );\n\n\t\tob_end_clean();\n\n\t\tlibxml_clear_errors();\n\n\t\treturn $sRes;\n\t}", "title": "" }, { "docid": "07e4303e7b474e1e5940c40d69fca38e", "score": "0.5596027", "text": "protected function getSearchIndex()\n\t{\n\t\t// Will be a service name in 2.0 and returned via injector\n\t\t/** @var CwpSearchIndex $index */\n\t\t$index = null;\n\t\tif (self::$search_index_class) {\n\t\t\t$index = Object::singleton(self::$search_index_class);\n\t\t}\n\t\treturn $index;\n\t}", "title": "" }, { "docid": "cc80c34989892f378f485ebdcfae826b", "score": "0.55718845", "text": "public function createIndex($index, $settings)\n {\n $this->getClient()->indices()->create([\n 'index' => $index,\n 'body' => $settings,\n ]);\n }", "title": "" }, { "docid": "fee8fad21a6a085e25f51927cda3a29a", "score": "0.5570328", "text": "public function getIndex($index);", "title": "" }, { "docid": "7b2d3e3f3481419d1c957e2d73909c59", "score": "0.55700564", "text": "function create( string $_group_key, IIndexedEntity $_entity ): IIndexedEntity;", "title": "" }, { "docid": "3a168e14664f9b437150fc899800c8ea", "score": "0.55647224", "text": "public function store($indexname)\n {\n $inputs = array(\n 'index' => $indexname\n );\n\n $validator = Validator::make($inputs, array(\n 'index' => 'required|alpha_num'\n ));\n\n if ($validator->fails())\n {\n $errors = $validator->messages()->all(':message');\n\n return API::createResponse(compact('errors'), 400);\n }\n\n $default = array(\n 'index' => array(\n 'number_of_shards' => 1,\n 'number_of_replicas' => 0\n )\n );\n\n $index = $this->client->getIndex($indexname);\n $index->create($default, true);\n\n $indexing = array(\n 'index' => $indexname\n );\n\n return API::createResponse($indexing, 201);\n }", "title": "" }, { "docid": "a23ffea6e7668f64f29282236feebe3a", "score": "0.5558936", "text": "public function __construct(\\nano\\models\\index $model)\n {\n $this->model = $model;\n }", "title": "" }, { "docid": "143195f368aa05df08eeec7546955eaf", "score": "0.5538141", "text": "public function getIndex($name = null)\n {\n $index = $this->client()->getIndex($name);\n\n if (!$this->hasIndex($name)) {\n $index->create([\n 'analysis' => [\n 'analyzer' => [\n 'trigram' => [\n 'type' => 'custom',\n 'tokenizer' => 'standard',\n 'filter' => ['standard', 'shingle']\n ],\n 'candy' => [\n 'tokenizer' => 'standard',\n 'filter' => [\"standard\", \"lowercase\", \"stop\", \"porter_stem\"]\n ]\n ],\n 'filter' => [\n 'shingle' => [\n 'type' => 'shingle',\n 'min_shingle_size' => 2,\n 'max_shingle_size' => 3\n ]\n ]\n ]\n ]);\n $index->addAlias($name . '_alias');\n // ...and update the mappings\n $this->updateMappings($index);\n }\n return $index;\n }", "title": "" }, { "docid": "05dca488026b64266ea3af1c72c4b808", "score": "0.5504692", "text": "public function create()\n {\n $tags = Tag::all();\n return view('search.create', ['tags' => $tags]);\n }", "title": "" }, { "docid": "a4b504694f7f1dd027369c2d0abd7511", "score": "0.5504406", "text": "public function createIndex(array $columnNames, $unique = false, $name = null)\n {\n $index = new Index($name, $columnNames, $unique);\n $this->addIndex($index);\n\n return $index;\n }", "title": "" }, { "docid": "79f342e7b098cbbcc6184b5c3d08d768", "score": "0.55012125", "text": "protected function createSiteMapIndexFile()\n {\n $siteMapFile = new IndexFile();\n $siteMapFile->fileBasePath = $this->getTestFilePath();\n\n return $siteMapFile;\n }", "title": "" }, { "docid": "97cb2ba9fb8d9227e83d02132a82e436", "score": "0.5496908", "text": "public function updateLuceneIndex()\n {\n $culture = sfConfig::get('sf_default_culture', 'en');\n $title = $this->getTitle();\n $body = $this->getBody();\n $categoryName = $this->getCategory()->getName();\n $tags = $this->getTags();\n $summary = $this->getSearchSummary();\n $link = $this->getPermalink();\n // For reasons I don't understand it's not letting me search for stuff that\n // appears in the title field when I pass the indexed fields individually\n $text = $title . ' ' . $body . ' ' . $categoryName . ' ' . implode(\", \", $tags);\n pkZendSearch::updateLuceneIndex($this, array(\n 'text' => $text\n// 'title' => $title,\n// 'body' => $body,\n// 'category' => $categoryName,\n// 'tags' => implode(\", \", $tags)\n ), $culture, array(\n 'title' => $title,\n 'summary' => $summary,\n 'url' => $link));\n }", "title": "" }, { "docid": "1600cbf107a93146fa33fca9ee4d3b08", "score": "0.5492089", "text": "public function createIndex($settings = null, $mappings = null)\n {\n\n $nextIndexNumber = 1;\n $lastIndexName = $this->getLastIndexName();\n\n if (null != $lastIndexName) {\n $lastIndexNameArr = explode('_', $lastIndexName);\n $nextIndexNumber = array_pop($lastIndexNameArr) + 1;\n }\n\n $nextIndexName = $this->getIndexName() . '_' . date('Y') . '_' . $nextIndexNumber;\n\n // Create new index\n $params['index'] = $nextIndexName;\n if (null != $settings) {\n $params['body']['settings'] = $settings;\n }\n if (null != $mappings) {\n $params['body']['mappings'] = $mappings;\n }\n\n $this->client->indices()->create($params);\n\n // Update aliases\n $params = [];\n $params['body'] = [\n 'actions' => [\n [\n 'add' => [\n 'index' => $nextIndexName,\n 'alias' => $this->getIndexNameCurrent()\n ]\n ],\n [\n 'add' => [\n 'index' => $nextIndexName,\n 'alias' => $this->getIndexName()\n ]\n ]\n ]\n ];\n\n if (null != $lastIndexName) {\n array_unshift($params['body']['actions'], [\n 'remove' => [\n 'index' => $lastIndexName,\n 'alias' => $this->getIndexNameCurrent()\n ]\n ]);\n }\n\n $this->client->indices()->updateAliases($params);\n\n return $nextIndexName;\n }", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.5468979", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.5468979", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.5468979", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.546806", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.546806", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.546806", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.546806", "text": "public function getIndex() {}", "title": "" }, { "docid": "dfc4dad5cd7c1ebdf47a867292807c9d", "score": "0.5467695", "text": "public function getIndex()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.54665846", "text": "public function getIndex() {}", "title": "" }, { "docid": "2c3098fe80abde3b757a92258d50fc8e", "score": "0.546244", "text": "public function __construct(Index $connection)\n {\n // call parent construct\n return parent::__construct($connection);\n }", "title": "" }, { "docid": "875b66689dc0b247d6a8d3b12a069906", "score": "0.54527456", "text": "public function indices(): self\n {\n return new self($this->implementation->indices());\n }", "title": "" }, { "docid": "927eb97c5b59a86cee37416dcc9115e0", "score": "0.54441667", "text": "public function addIndex($index) {\n if (!is_string($index)) {\n throw new SphinxQLException (\"index is not string\");\n }\n\n if (in_array($index, $this->_indexes)) {\n throw new SphinxQLException (\"index with the same name already exists\");\n }\n $index = $this->_escapeQuery($index);\n\n $this->_indexes[] = $index;\n\n return $this;\n }", "title": "" }, { "docid": "651ac23f1a79fa51c6f63f1efc63db33", "score": "0.54424804", "text": "public function db_create_index($table_name, $index_name, $_fields, $db, $raw_table_name, $unique_key_fields)\n {\n if ($index_name[0] == '#') {\n $index_name = substr($index_name, 1);\n $type = 'FULLTEXT';\n } else {\n $type = 'INDEX';\n }\n return array('ALTER TABLE ' . $table_name . ' ADD ' . $type . ' ' . $index_name . ' (' . $_fields . ')');\n }", "title": "" }, { "docid": "15cffe326479b31462ef0ea9b8c238cf", "score": "0.5436305", "text": "private function onCreate(SearchableInterface $object)\n {\n// $object\n// );\n \n// $this->entityManager->persist($searchIndex);\n }", "title": "" }, { "docid": "3f73081e1b840531ea979a30a20c667e", "score": "0.54354507", "text": "public function __construct(ElasticSearch $search) {\n $this->search = $search;\n }", "title": "" }, { "docid": "1a4a9256045bed2e51dba1b7501c1cf2", "score": "0.5431202", "text": "public function search()\n {\n return new SearchBuilder($this, $this->getDSLQuery());\n }", "title": "" }, { "docid": "6e057556a802b5dfe439ff75d07a2245", "score": "0.54265094", "text": "public function addIndex(\\Doctrine\\DBAL\\Schema\\Index $index) {\n // Get the name of this index, this is used as the key\n $name = $index->getName();\n\n // Add a DifferDB index object to the table\n $this->indices[$name] = new Index($name, $index->isUnique(), $index->isPrimary(), $index->getColumns());\n }", "title": "" } ]
2b246d825c89fa13d53fe9908feacf7d
Method to set the value of field password
[ { "docid": "7fd9cb75b09cf4c9d80f13fd0da2604b", "score": "0.0", "text": "public function setPassword($password)\n {\n $this->password = $password;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "76efabd0b3eb7a69f84e446460da42ae", "score": "0.8803719", "text": "public function setPassword($value) { $this->password = $value; }", "title": "" }, { "docid": "a71cd8cfc597175c61b7b44b79d1a8da", "score": "0.8667988", "text": "public function setPassword(string $value);", "title": "" }, { "docid": "ebe5019a025e8dfa5b322b9d3ee5a639", "score": "0.8330917", "text": "public function setPassword($value)\r\n\t{\r\n\t\t$this->_password = $value;\r\n\t}", "title": "" }, { "docid": "c88e6ab3f418d6df602f3c57e4ef850f", "score": "0.8253683", "text": "abstract public function setPassword($value, $id);", "title": "" }, { "docid": "c43c58536291977a985deeab669d033b", "score": "0.8208822", "text": "public function setPassword($password) {}", "title": "" }, { "docid": "27bc7a39ed69ed098452c40b75075092", "score": "0.8139462", "text": "abstract public function setPassword($pass);", "title": "" }, { "docid": "cd2c446823c671854369172ffa2959b0", "score": "0.8049726", "text": "public function setPassword($password);", "title": "" }, { "docid": "cd2c446823c671854369172ffa2959b0", "score": "0.8049726", "text": "public function setPassword($password);", "title": "" }, { "docid": "10d025b9873c1406169128e860c4d4b6", "score": "0.8004947", "text": "public function setPassword(string $newPassword): void;", "title": "" }, { "docid": "0f57e49d47f88289ffc9a6dd1122def2", "score": "0.79529345", "text": "abstract public function setPassword( string $password ): self;", "title": "" }, { "docid": "edd23d1fd352a87237862954a97d3cca", "score": "0.78671765", "text": "public function setPassword($var_password = null) {\n\t\t$this->_password = $var_password;\n\t}", "title": "" }, { "docid": "5205889c3e1e1669ccb12e9678e556ac", "score": "0.77951944", "text": "function setPass($thing){\n $this->password = $thing;\n }", "title": "" }, { "docid": "f47c69987169b56437363058239a0ee4", "score": "0.7762948", "text": "function setPassword($spassword = '')\n {\n $this->spassword = $spassword;\n }", "title": "" }, { "docid": "794ee987c5feb6272fde7518c54e1d63", "score": "0.77288866", "text": "protected function setPassword($password){\n $this->attributes['password'] = password_hash($password,PASSWORD_DEFAULT);\n }", "title": "" }, { "docid": "f28b9d4a3a8b8846319a0179fb6de182", "score": "0.7724986", "text": "function setPassword($password) {\n $this->password = $password;\n }", "title": "" }, { "docid": "40907c6b1ad16b1b8151ce89e2f26ac5", "score": "0.7701965", "text": "private function setPassword($password) {\n $this->password = $password;\n }", "title": "" }, { "docid": "cf25643699b4efabd132a121914487ca", "score": "0.7666009", "text": "function setPassword($password) {\n $this->password = $password;\n }", "title": "" }, { "docid": "32fba7d6a27450faf97dfe36b9beaa93", "score": "0.76030165", "text": "function setPassword (string $password)\n {\n $this->password=$password;\n }", "title": "" }, { "docid": "d70ae2da14153c5bcd1bc9fdd90b51d8", "score": "0.7567685", "text": "public function setPassword()\n {\n $data = array('memberList' => $this->ctcModel->getAllMembersForPasswordSetting());\n return $this->loadPage('selectMemberForPasswordSetting', 'CTCDB: Select Member', $data);\n }", "title": "" }, { "docid": "bd0699ca34ada0ebf2b2d7f3607fd0f5", "score": "0.7564944", "text": "public function setPassword($password){\r\n $this->password = $password;\r\n }", "title": "" }, { "docid": "fe7dd0735fab91e6a1828eb6123df3ed", "score": "0.7562645", "text": "public function setPasswordAttribute($value){\n $this->attributes['password'] = Hash::make($value);\n }", "title": "" }, { "docid": "67fe8f7d941205ce42a056712a06f666", "score": "0.7543765", "text": "public function setPasswordAttribute($value){\n $this->attributes['password'] = Hash::make($value);\n }", "title": "" }, { "docid": "63be897c603c110e4d5bde3d5cb6a9b1", "score": "0.7541204", "text": "private static function setPassword(string $password) : void {\n self::$password = (string) $password; \n }", "title": "" }, { "docid": "47d58e925288e2c7df6e30e88e281353", "score": "0.75298244", "text": "public function setPasswordAttribute( $value )\n\t{\n\n\n\t\t//$this->attributes['password_hash'] = Hash::make( $value );\n\t\t$this->attributes['password_hash'] = $this->generatePassword( $value );\n\t}", "title": "" }, { "docid": "563494f70625c57210d4805bcead46e3", "score": "0.74855065", "text": "public function testSetPassword()\n {\n echo 'Test SetPassword' . \"\\n\";\n $user = self::getUser('[email protected]');\n $return = $user->setPassword('fusdhfh271qwaASDA23!_dea');\n $this->assertEquals('fusdhfh271qwaASDA23!_dea', $user->getPassword());\n $this->assertInstanceOf('IBW\\WebsiteBundle\\Entity\\User', $return);\n }", "title": "" }, { "docid": "a0b457502f1028cd4ae5534e8e0bef47", "score": "0.7483925", "text": "public static function setPassword($value) \n\t{\n\t\tself::$db_passwd[self::$conn_id] = $value;\n\t}", "title": "" }, { "docid": "250556dff52ab0c11c5b5d0139d9c780", "score": "0.7473993", "text": "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Password::hash($value);\n }", "title": "" }, { "docid": "4524c690b41179270c2f4491465333ab", "score": "0.74621785", "text": "public function setPassword($password) {\n\n\t \t\t $this->password = $password;\n\t }", "title": "" }, { "docid": "f34608a8f9af8294a8e1d31c7dd87a1f", "score": "0.7461707", "text": "public function setPasswordAttribute($value)\r\n {\r\n $this->attributes['password'] = Hash::make($value);\r\n }", "title": "" }, { "docid": "1c4d4902287d5be68bc13e8940d58a77", "score": "0.74551445", "text": "public function setPassword($password = \"\")\n\t{\n\t\t$this->_password = $password;\n\t}", "title": "" }, { "docid": "32def0b6988f2a0dd865303fff402a4b", "score": "0.74436074", "text": "public function setPasswordAttribute($value)\n\t{\n\t\t$this->attributes['password'] = Hash::make($value);\n\t}", "title": "" }, { "docid": "e22416fc4c39fa8b1906c6780da0ed11", "score": "0.7432677", "text": "public function setPassword($password){\n $this->auth_pass = $password;\n }", "title": "" }, { "docid": "55d63f6fc8f0a4ad671b36e825ef817b", "score": "0.7426511", "text": "public function password($password) {\n $this->password = $password;\n }", "title": "" }, { "docid": "62564d7a49aeebd371960657badada88", "score": "0.7424762", "text": "public function setPassword( $pPassword )\n {\n $this->strPassword = $pPassword;\n }", "title": "" }, { "docid": "091560e5fd94ff95bd761fc75727b45e", "score": "0.7423876", "text": "public function setPasswordAttribute(string $value)\n {\n $this->attributes['password'] = $value ? Hash::make($value) : '';\n }", "title": "" }, { "docid": "d5f2d31725626cf100706ed27c821a00", "score": "0.7408216", "text": "public function setpassAction() {\n print t(\"Username\").\": \";\n $name = trim(fgets(STDIN));\n $User = $this->getEntity(\"User\");\n $User->loadByName($name);\n if (!$User->id())\n return \"User not found\";\n print t(\"Password\").\": \";\n system(\"stty -echo\");\n $pass = trim(fgets(STDIN));\n system(\"stty echo\");\n print PHP_EOL;\n $User->set(\"pass\", $pass);\n $User->save();\n return t(\"Password changed for :name\", \"en\", [\":name\" => $name]);\n }", "title": "" }, { "docid": "f7ea606dc1ccd1081907b13a7729f109", "score": "0.7401856", "text": "public function setPassword($password)\r\n {\r\n $this->_password = $password;\r\n }", "title": "" }, { "docid": "f7ea606dc1ccd1081907b13a7729f109", "score": "0.7401856", "text": "public function setPassword($password)\r\n {\r\n $this->_password = $password;\r\n }", "title": "" }, { "docid": "b8142b601c65be761f64c57987ab71bd", "score": "0.74013317", "text": "public function setPasswordAttribute($value)\n\t{\n\t\t$this->attributes['password'] = \\Hash::make($value);\n\t}", "title": "" }, { "docid": "4fcb570c3a6befe3a0319e5d05014805", "score": "0.73809195", "text": "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::make($value);\n }", "title": "" }, { "docid": "4fcb570c3a6befe3a0319e5d05014805", "score": "0.73809195", "text": "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::make($value);\n }", "title": "" }, { "docid": "4fcb570c3a6befe3a0319e5d05014805", "score": "0.73809195", "text": "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::make($value);\n }", "title": "" }, { "docid": "85abeb75d92b96a662ffe6d87acd0a30", "score": "0.73643476", "text": "function get_password($password){\n\t\t$this->password = $password;\n\t}", "title": "" }, { "docid": "c7c88f09f8ecc3e75f9b277e2db2438f", "score": "0.73525953", "text": "public function setPassword($password)\r\n\t{\r\n\t\t$this->password-$password;\r\n\t}", "title": "" }, { "docid": "663966bd75af40140cca64c73492a05c", "score": "0.73293585", "text": "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = \\Hash::make($value);\n }", "title": "" }, { "docid": "287aeef8c2336995959b86d96ff943cc", "score": "0.73290956", "text": "public function setPassword($password) {\r\n\t\t$this->password = $password;\r\n\t}", "title": "" }, { "docid": "bb46fc89d7d359154c003c46ae9968e8", "score": "0.73142815", "text": "public function set_password($password)\n\t{\n\t\t$this->set_attribute('password', Hash::make($password));\n\t}", "title": "" }, { "docid": "ad8d784af45eee458db7a21680fb2387", "score": "0.7304716", "text": "public function changePassword(string $password);", "title": "" }, { "docid": "23665c8c6d9cf0d532daea619b3c0fb7", "score": "0.7302997", "text": "public function set_password( $password ) {\n\t\t$this->password = $password;\n\t}", "title": "" }, { "docid": "3e5dbbdb953747d0469d1915bb33be29", "score": "0.7292287", "text": "protected function changePassword()\n {\n // TODO: Implement ChangePassword() method.\n }", "title": "" }, { "docid": "d00a83e25a6eb3c1a36e5c9087bbd1d0", "score": "0.7286127", "text": "public function settings_field_api_password()\n\t\t{\n\t\t\t$setting = isset($this->settings['bullhorn_api_password']) ? $this->settings['bullhorn_api_password'] : '';\n\t\t\techo '<input type=\"password\" size=\"40\" name=\"bullpen_settings[bullhorn_api_password]\" value=\"' . esc_attr($setting) . '\" />';\n\t\t\t// echo '<input type=\"text\" size=\"40\" name=\"bullpen_settings[bullhorn_api_password]\" value=\"' . esc_attr( $setting ) . '\" />';\n\t\t}", "title": "" }, { "docid": "a285ca3c9a3e51e73b779e665f0cb4b9", "score": "0.72761893", "text": "public function SetPassword($password)\n {\n $this->password = $password;\n }", "title": "" }, { "docid": "0bbe83a5893f28795d3cab4dd08f2634", "score": "0.727372", "text": "public function change_password(){\n change_password();\n }", "title": "" }, { "docid": "58d8cf01a0fa816701af164bbdd6fcc6", "score": "0.72734034", "text": "public function setPassword(string $password): void\n {\n $this->password= $password;\n }", "title": "" }, { "docid": "6424cbefebe34e76a395f206deb81d14", "score": "0.7265938", "text": "public function setPassword($password) {\n $this->password = $password;\n }", "title": "" }, { "docid": "6424cbefebe34e76a395f206deb81d14", "score": "0.7265938", "text": "public function setPassword($password) {\n $this->password = $password;\n }", "title": "" }, { "docid": "6424cbefebe34e76a395f206deb81d14", "score": "0.7265938", "text": "public function setPassword($password) {\n $this->password = $password;\n }", "title": "" }, { "docid": "4b0bc1175b8380d9bcdaf6b4a88d402b", "score": "0.7259006", "text": "public function setPassword($password) {\n\t\t$this->password = $password;\n\t}", "title": "" }, { "docid": "4b0bc1175b8380d9bcdaf6b4a88d402b", "score": "0.7259006", "text": "public function setPassword($password) {\n\t\t$this->password = $password;\n\t}", "title": "" }, { "docid": "af7d3e39d588cebd99f61b4bff1ef545", "score": "0.72320104", "text": "public function setPasswordAttribute($value)\n {\n if (!empty($value)) {\n $this->attributes['clave_us_LI'] = \\Hash::make($value);\n }\n }", "title": "" }, { "docid": "5c0957a94e038c911dbfc7ebe845cae0", "score": "0.722979", "text": "public final function setPassword($password) {\n\t\t\t$this->password = (string)$password;\n\t\t}", "title": "" }, { "docid": "8899bcb64ddd7448eab2f58934840510", "score": "0.7226518", "text": "public function setPassword($password)\n {\n $this->password = $password;\n }", "title": "" }, { "docid": "8899bcb64ddd7448eab2f58934840510", "score": "0.7226518", "text": "public function setPassword($password)\n {\n $this->password = $password;\n }", "title": "" }, { "docid": "8899bcb64ddd7448eab2f58934840510", "score": "0.7226518", "text": "public function setPassword($password)\n {\n $this->password = $password;\n }", "title": "" }, { "docid": "8899bcb64ddd7448eab2f58934840510", "score": "0.7226518", "text": "public function setPassword($password)\n {\n $this->password = $password;\n }", "title": "" }, { "docid": "8899bcb64ddd7448eab2f58934840510", "score": "0.7226518", "text": "public function setPassword($password)\n {\n $this->password = $password;\n }", "title": "" }, { "docid": "62bd28c672eaa5cbf6ffdb1546f59a13", "score": "0.7217571", "text": "public function setPasswordAttribute($value){\n $this->attributes['password'] = bcrypt($value);\n }", "title": "" }, { "docid": "90e8f08222a7c849311004af4140df35", "score": "0.7206345", "text": "public function setNewPassword()\n {\n $this->attributes['password'] = env('PW_CRYPT') ? bcrypt(Str::random(10)) : Str::random(10);\n return $this->attributes['password'];\n }", "title": "" }, { "docid": "3b2027b473bea53b757e2bfa86a01cdb", "score": "0.71964717", "text": "public function setPassword($password)\n\t{\n\t\t$this->setField('password', $password);\n\t}", "title": "" }, { "docid": "16165d72e0cc4b655e25bffc8a3e3081", "score": "0.71951467", "text": "public function setPasswordAttribute(string $value): void\n {\n $this->attributes['password'] = app('hash')->make($value);\n }", "title": "" }, { "docid": "eb63ab8ae2b2a81d73884dcb7cf7a5c0", "score": "0.719314", "text": "function setPassword($sNewValue) {\n $this->sPassword = $sNewValue;\n $this->bPasswordChanged = true;\n }", "title": "" }, { "docid": "5a2954899382bd73e59e020879477d64", "score": "0.71925354", "text": "public function getPassword() {}", "title": "" }, { "docid": "5a0fc8cd42e8e7dfaa407ac4df0cf8a9", "score": "0.7192397", "text": "public function setPassword($value) {\n if (\n (isset($this->_aDataValidation['password']) && preg_match($this->_aDataValidation['password'], $value))\n || !isset($this->_aDataValidation['password'])\n ) {\n $this->_aData['password'] = self::_crypt($value);\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "57abf38ea2a78f99be740c8a00af42ab", "score": "0.718996", "text": "public function setTPassword($password) {\n $this->t_password = $password;\n }", "title": "" }, { "docid": "045c62594f1836025a33414f056abe32", "score": "0.7183391", "text": "public function setPassword(string $password) {\n $this->_data['password'] = $password;\n $this->_hashPassword = true;\n }", "title": "" }, { "docid": "d3475eb55fe1900daeb6d3d82f2150df", "score": "0.71648294", "text": "public function setPassword($password)\n {\n $this->PASSWORD = Yii::$app->security->generatePasswordHash($password);\n }", "title": "" }, { "docid": "0cefcab16d9d8368237bf2d48a5b7b26", "score": "0.7164442", "text": "public function setPassword ( String $password ) {\n $this->password = $password;\n }", "title": "" }, { "docid": "19b5d1430f4c9e89c961a26a52ee9da1", "score": "0.7163009", "text": "public function getPassword(){ return $this->password; }", "title": "" }, { "docid": "1a486c9c9ef78f80e757f8978b7537dc", "score": "0.71389425", "text": "public function setPassword($password) {\n if ($this->scenario != 'import')\n $this->password = md5($password);\n else\n $this->password = $password;\n }", "title": "" }, { "docid": "fb2e981693c02644adf9541c0d0f1c8a", "score": "0.71383417", "text": "public function setPassword($password)\n\t{\n\t\t$this->password = $password;\n\t}", "title": "" }, { "docid": "1bc0fdcac3e0d040077bc400af59be05", "score": "0.71367586", "text": "public function processPassword()\n {\n\n if (Tools::strlen(Configuration::get(Config::SECRET_KEY)) > 0) {\n $passwordPlaceholder = $this->getPasswordPlaceholder();\n } else {\n $passwordPlaceholder = '';\n }\n\n $this->fields_options[Config::MAIN_SETTINGS_FIELDS_OPTION_NAME]['fields'][Config::SECRET_KEY]['value'] =\n $passwordPlaceholder;\n }", "title": "" }, { "docid": "3fe3a9fed3a0aa5c28934a12eb75197c", "score": "0.71348596", "text": "public function changePassword($old_pass, $new_pass) {\r\n \r\n }", "title": "" }, { "docid": "b820115c9b2a5bbb99a3cf476c73f221", "score": "0.7131162", "text": "public function setPasswordAttribute($value)\n {\n if (!is_null($value))\n $this->attributes['password'] = bcrypt($value);\n else\n $this->attributes['password'] = $value;\n }", "title": "" }, { "docid": "9cc4ed5bfcf990304e86235e10f7a73a", "score": "0.7121683", "text": "private function setPassword()\n {\n if ( ! isset( $_POST['pass'] ) ) {\n return false;\n }\n \n $value = trim( $_POST['pass'] );\n\n $this->password = $value;\n \n if ( $_POST['pass'] == null ) {\n $this->error = true;\n $this->data['error']['password'] = 'Please enter your password.';\n return false;\n }\n \n return true;\n }", "title": "" }, { "docid": "8a8b4107123ac0514f6e8b168743e2b1", "score": "0.71208817", "text": "function setPassword($user, $password) \n\t {\n\t return true;\n\t }", "title": "" }, { "docid": "e3363ab1d0eb32730fc74f3525f06541", "score": "0.7119559", "text": "public function setPassword($password)\n {\n if ($password) {\n $this->plainPassword = $password;\n $this->password_encryption = \\Yii::$app->security->generatePasswordHash($password); \n }\n }", "title": "" }, { "docid": "7bb0bc7366a5430f60f153022def9ad1", "score": "0.71162844", "text": "function getPassword(){\n return $this->password;\n }", "title": "" }, { "docid": "52ef05831676b4b69064f841486431d9", "score": "0.7115152", "text": "public function setPassword(String $valor){\n\t\t\t$this->password = $valor;\n\t\t\treturn $this;\n\t\t}", "title": "" }, { "docid": "c59fc41ab31ef590f1f7745cde35b32a", "score": "0.710208", "text": "public function setPassword($value)\n {\n if (!isset($this->data['fields']['password'])) {\n if (!$this->isNew()) {\n $this->getPassword();\n if ($this->isFieldEqualTo('password', $value)) {\n return $this;\n }\n } else {\n if (null === $value) {\n return $this;\n }\n $this->fieldsModified['password'] = null;\n $this->data['fields']['password'] = $value;\n return $this;\n }\n } elseif ($this->isFieldEqualTo('password', $value)) {\n return $this;\n }\n\n if (!isset($this->fieldsModified['password']) && !array_key_exists('password', $this->fieldsModified)) {\n $this->fieldsModified['password'] = $this->data['fields']['password'];\n } elseif ($this->isFieldModifiedEqualTo('password', $value)) {\n unset($this->fieldsModified['password']);\n }\n\n $this->data['fields']['password'] = $value;\n\n return $this;\n }", "title": "" }, { "docid": "08581492121f3a084197ccbfa2e5a862", "score": "0.70989335", "text": "public function setPassword($password = null)\n {\n\tif ($password)\n\t{\n\t $this->password = $password;\n\t}\n }", "title": "" }, { "docid": "3ac802239888a9385295bf7d1775fad1", "score": "0.7098136", "text": "abstract public function getPassword();", "title": "" }, { "docid": "4880a3e73f7eb5335ec866f645a7a171", "score": "0.7093783", "text": "protected function setPassword(string $password)\n {\n $this->attributes['password'] = password_hash($password, PASSWORD_DEFAULT);\n }", "title": "" }, { "docid": "5aa9674c80b56b6c8fc72299c0d2ca57", "score": "0.7085077", "text": "public function setPassword($password)\n {\n $this->password = md5($password);\n }", "title": "" }, { "docid": "4a5d8631212d860c5a1ce9c09b80a6bb", "score": "0.70836437", "text": "private function setPassword($password)\n {\n $this->password_hash = Yii::$app->security->generatePasswordHash($password);\n }", "title": "" }, { "docid": "4a5d8631212d860c5a1ce9c09b80a6bb", "score": "0.70836437", "text": "private function setPassword($password)\n {\n $this->password_hash = Yii::$app->security->generatePasswordHash($password);\n }", "title": "" }, { "docid": "e63e59ce27e044bacffcb2340dc93d9d", "score": "0.70836425", "text": "public function setPassword($password) {\r\n $this->password = $this->hashPassword($password);\r\n }", "title": "" }, { "docid": "4540b5fd386badd16946c3a25775c7f2", "score": "0.7083598", "text": "public function setPasswordAttribute($value)\n {\n $salt = $this->randString(8);\n $password = $salt.md5($salt.$value);\n $this->attributes['password'] = $password;\n }", "title": "" }, { "docid": "bd20022afde59a4f23fee2bc24dbcd15", "score": "0.70774466", "text": "public function setPassword($password)\n {\n $this->password = Yii::$app->security->generatePasswordHash($password);\n }", "title": "" }, { "docid": "bd20022afde59a4f23fee2bc24dbcd15", "score": "0.70774466", "text": "public function setPassword($password)\n {\n $this->password = Yii::$app->security->generatePasswordHash($password);\n }", "title": "" }, { "docid": "bd20022afde59a4f23fee2bc24dbcd15", "score": "0.70774466", "text": "public function setPassword($password)\n {\n $this->password = Yii::$app->security->generatePasswordHash($password);\n }", "title": "" }, { "docid": "bd20022afde59a4f23fee2bc24dbcd15", "score": "0.70774466", "text": "public function setPassword($password)\n {\n $this->password = Yii::$app->security->generatePasswordHash($password);\n }", "title": "" } ]
e29dde868b5f951ae9e78a53d510a361
Saves contents to a new file
[ { "docid": "183bd830b0b9be3770e387c2686ca8f3", "score": "0.5902837", "text": "protected function saveFile($supplier, $contents) {\r\n \t// Once we have the contents save it to the directory\r\n\t\t$supplier_filename = SUPPLIERS_DIR_PATH . '/' . $supplier->id . '/' . $this->getFileName($supplier);\r\n\t\t\r\n\t\t// Make sure dir exists\r\n\t\tif(!is_dir(SUPPLIERS_DIR_PATH . '/' . $supplier->id)) {\r\n\t\t\tif(!@mkdir(SUPPLIERS_DIR_PATH . '/' . $supplier->id, 0777)) {\r\n\t\t\t\t$this->errorMessage('Could not create supplier files folder.');\r\n \t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// rename previous file\r\n\t\t$this->renameOldFile($supplier);\r\n\t\t\r\n\t\t$this->echoMessage(sprintf(\"Saving file to '%s'\", $supplier_filename));\r\n\t\t\r\n\t\t// Save new file\r\n\t\treturn file_put_contents($supplier_filename, $contents);\r\n }", "title": "" } ]
[ { "docid": "cc3f453509264ba447fdbb805a20e97f", "score": "0.80937636", "text": "public function saveNewFileContents()\n {\n $this->backupFile();\n\n //at the end replace whole method with new content\n File::put($this->filepath, $this->newFileContents);\n }", "title": "" }, { "docid": "61f0eda7fb6e5b3849e5f4010697e1a6", "score": "0.72957194", "text": "public function save($filename, $content);", "title": "" }, { "docid": "61ee007f01ee49fa129020647188e8ef", "score": "0.7208698", "text": "function save($file){}", "title": "" }, { "docid": "e47b9318363f8520e77ca338c6482275", "score": "0.7005781", "text": "public function save(File $file, $content);", "title": "" }, { "docid": "e3242151ca6b1ced430630f92f987467", "score": "0.6861197", "text": "public function save($file, $content)\r\n\t{\r\n\t\tfile_put_contents($file, $content);\r\n\t}", "title": "" }, { "docid": "59e349549ffb2ceff6fa914ef4dbf714", "score": "0.6831996", "text": "public function write()\n {\n $fileHandler = new FileProcessing($this->fileName);\n $fileHandler->writeFile($this->content, true, $this->overwrite);\n }", "title": "" }, { "docid": "f5f8a0e10b88c140ef7e004f560ca813", "score": "0.6772503", "text": "public function save($filename);", "title": "" }, { "docid": "0972549f1de96d50db168c088729caf7", "score": "0.674606", "text": "public function save($filename){}", "title": "" }, { "docid": "701451b8a930453d4f39a5d3f111711e", "score": "0.6732319", "text": "public function saveToFile($filename){}", "title": "" }, { "docid": "701451b8a930453d4f39a5d3f111711e", "score": "0.6732319", "text": "public function saveToFile($filename){}", "title": "" }, { "docid": "701451b8a930453d4f39a5d3f111711e", "score": "0.6732319", "text": "public function saveToFile($filename){}", "title": "" }, { "docid": "701451b8a930453d4f39a5d3f111711e", "score": "0.6731792", "text": "public function saveToFile($filename){}", "title": "" }, { "docid": "1b6f26a4164c556f77ef20815a89146c", "score": "0.66918707", "text": "public function save() {\n\t\t$text = $this->get_text();\n\t\t//die($text);\n\t\t//atribuindo um nome do arquivo\n\t\tif($this->getFilename() == '') {\n\t\t\t$this->setFilename('CB' . date('dm') . 'A1');\n\t\t}\n\t\t\n\t\tfile_put_contents($this->getFilename() . '.REM', $text);\n\t}", "title": "" }, { "docid": "e74cf89cf31c3c41e3e162c1bbd7371f", "score": "0.66290677", "text": "public function save()\n\t{\n\t\tif($file = fopen($this->filename, \"w\"))\n\t\t{\n\t\t\tfputs($file, \"<?php\\n\");\n\t\t\tforeach($this->data as $item)\n\t\t\t{\n\t\t\t\tfputs($file, \"\t\\$this->data['\".$item->field().\"'] = new Entry('\".$item->field().\"', '\".$item->value().\"');\\n\");\n\t\t\t}\n\t\t\tfputs($file, \"?>\\n\");\n\t\t\tfclose($file);\n\t\t}\n\t}", "title": "" }, { "docid": "c94dd7b8ede0a989455b27229148073d", "score": "0.66007555", "text": "function writeToFile($contents,$filename)\n{\n\t$fh = fopen($filename, 'w') or die(\"can't open file\");\n\tfwrite($fh, $contents);\n\tfclose($fh);\n}", "title": "" }, { "docid": "614640ca91811aa7e3f976daa730b62a", "score": "0.65971977", "text": "static function write( $filename, $contents )\n {\n file_put_contents($filename, $contents);\n }", "title": "" }, { "docid": "a2b0c1ab9e82f22adef7dceb1110b245", "score": "0.6568299", "text": "public function save()\n {\n $this->file->store($this->parkedFiles);\n }", "title": "" }, { "docid": "8ac05de9ea30df2ffa662a0813d9bba4", "score": "0.65651995", "text": "function magic_write_to_file($file_path, $new_content_to_write)\r\n{\r\n\r\n\tglobal $final_file_content;\r\n \r\n \t$file_to_write = fopen($file_path, 'w') or die(\"can't open file\");\r\n\tfwrite($file_to_write, $new_content_to_write);\r\n\tfclose($file_to_write);\r\n\r\n\r\n\t$final_file_content=file_get_contents($file_path);\r\n\r\n\r\n\treturn $final_file_content;\r\n\r\n}", "title": "" }, { "docid": "89f5641900a113666013cc9140a52a46", "score": "0.65632993", "text": "public function save()\n {\n $results\n = \"<?php \\n return \" . var_export(self::getResults(), true) . \";\";\n file_put_contents($this->file, $results);\n }", "title": "" }, { "docid": "dbed3cb3c90111dbc7d1fa822553a54d", "score": "0.65619624", "text": "public function save($content)\n\t{\n\t\t$fh = fopen($this->file, 'w+');\n\n\t\tfwrite($fh, serialize($content));\n\t\tfclose($fh);\t\t\n\t}", "title": "" }, { "docid": "16aac8c88b0454fd52e7cce66b087ec0", "score": "0.65091234", "text": "public function save(File $file);", "title": "" }, { "docid": "a93eaa123f5884d10d8fb39d4acaf656", "score": "0.6504676", "text": "function save_to_file($file_path, $data)\n{\n\t$fh = fopen($file_path, 'w');\n\tfwrite($fh, $data);\n\tfclose($fh);\n}", "title": "" }, { "docid": "33b755c3aceeae56a4a6e8027beca5c8", "score": "0.6459459", "text": "function storeHtml( $htmlContent, $filename ){\n\n $file = fopen($filename.\".html\",'a');\n fseek($file, 0);\n fputs($file, $htmlContent);\n fclose($file);\n }", "title": "" }, { "docid": "4346a72c98d56fe88e25d3bf4576c98b", "score": "0.6449884", "text": "public static function write($file,$contents){\n\n\t\t}", "title": "" }, { "docid": "8c2ca681710776397edf71ac9873d093", "score": "0.6449881", "text": "public function write($contents) {}", "title": "" }, { "docid": "79afe728a31f4dd986277b038aaf0653", "score": "0.6447803", "text": "public function save()\n {\n if ($this->operation === self::OP_CREATE) {\n $dir = dirname($this->path);\n if (!is_dir($dir)) {\n $mask = @umask(0);\n $result = @mkdir($dir, $this->newDirMode, true);\n @umask($mask);\n if (!$result) {\n return \"Unable to create the directory '$dir'.\";\n }\n }\n }\n if (@file_put_contents($this->path, $this->content) === false) {\n return \"Unable to write the file '{$this->path}'.\";\n } else {\n $mask = @umask(0);\n @chmod($this->path, $this->newFileMode);\n @umask($mask);\n }\n\n return true;\n }", "title": "" }, { "docid": "134e4a789ecb9d18ddf38d96cc46ad21", "score": "0.64406025", "text": "function write_file($filename,$content) {\n\t$file = fopen($filename, \"w\") or die(\"Unable to open file!\");\t\n\tfwrite($file, $content);\n\tfclose($file);\n}", "title": "" }, { "docid": "837ae7ae16d802716f730a100e32cff3", "score": "0.63868207", "text": "function writeFile($path,$content) {\n\n $file = fopen($path,'w');\n fwrite($file,$content);\n fclose($file);\n }", "title": "" }, { "docid": "a612320d2fe8ab58eb60619cc50f80c2", "score": "0.63858783", "text": "public function write(string $path, string $contents): void;", "title": "" }, { "docid": "830ad6979718c2500cefae957bed661a", "score": "0.63566566", "text": "public function write($filename){}", "title": "" }, { "docid": "19c6880e9f73b13132666e7f096729e6", "score": "0.62936854", "text": "public function save($path) {\n\n $file = fopen($path, \"w+\");\n fwrite($file, $this->output);\n fclose($file);\n }", "title": "" }, { "docid": "5190d19427e61d67fe73e8acfe0ef817", "score": "0.6272492", "text": "protected function writeFile(){\n\n\t\t$this->checkName();\n\t\t\n\t\t$this->fH = @fopen($this->name,$this->mode);\n\n\t\tif($this->fH){\n\t\t\t\n\t\t\tfwrite($this->fH, $this->buffer);\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t//error opening file handle\n\t\t}\n\n\t\t@fclose($this->fH);\n\t}", "title": "" }, { "docid": "99b3b364b4999d7d57764a0fedbb60e0", "score": "0.624128", "text": "public function write($contents);", "title": "" }, { "docid": "20a10880177494b2666966de7a19ed45", "score": "0.62366116", "text": "function writeToFile() {\n $jsonData = array(\n \"id\" => $this->id,\n \"name\" => $this->name,\n \"hostname\" => $this->hostname,\n \"location\" => $this->location, \n \"tags\" => $this->tags, \n \"ressources\" => $this->ressources, \n \"provider\" => $this->provider, \n \"ips\" => $this->ips,\n \"price\" => $this->price,\n \"type\" => $this->type,\n \"os\" => $this->os, \n \"notes\" => $this->notes,\n \"status\" => \"false\"\n );\n // Create new json file to store data\n $file = fopen(\"data/\" . $this->id . \".json\", \"w\");\n fwrite($file, json_encode($jsonData));\n }", "title": "" }, { "docid": "f5d7a721e44edc7e153e8b203b0bb93b", "score": "0.6220117", "text": "public function save()\n {\n $this->download();\n $this->zip->close();\n }", "title": "" }, { "docid": "96c4efb32e1ff22b41b18913b4a56809", "score": "0.6198868", "text": "private function save() {\n $file = $this->saveLocation . $this->data['sessionID'];\n /* Serialize data array */\n $serdate = serialize($this->data);\n /* Open file and write serialized array to file */\n $fh = fopen($file, 'w') or die(\"can't open file\");\n fwrite($fh, $serdate);\n fclose($fh);\n }", "title": "" }, { "docid": "3d71ee3844bd857d052aa7bb6d212e51", "score": "0.61968464", "text": "public function saveFile()\n\t{\n\t\tif (($fp = @fopen($this->file,'w')) !== false)\n\t\t{\n\t\t\tif (@fwrite($fp,$this->content,strlen($this->content)) !== false) {\n\t\t\t\t$res = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$res = false;\n\t\t\t}\n\n\t\t\tfclose($fp);\n\t\t\treturn $res;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "4bc7926064e91112aa2c21a120c0a494", "score": "0.6190605", "text": "public function save($content, $name)\n {\n $this->file_path = sprintf(\n self::FILE_LOCATION_FORMAT,\n $this->get_tmp_directory(),\n $name\n );\n\n $this->file_open_mode = self::W_PLUS;\n\n if (is_readable($this->file_path)) {\n Error::set(Error::ERROR_READABLE, [$this->file_path], Error::ERROR);\n }\n\n $this->open_handler();\n\n $content = iconv(\n 'utf-8',\n 'utf-8//TRANSLIT//IGNORE',\n $content\n );\n\n fwrite($this->file_handler, $content);\n\n $this->file_path = $this->get_real_path($this->file_path);\n\n return $this->file_path;\n }", "title": "" }, { "docid": "e6ac06eb94a6e4084bcb826334b7997f", "score": "0.6182534", "text": "public function save(IFile $file);", "title": "" }, { "docid": "52ba565d1865320bd14b79b84dc90868", "score": "0.61520916", "text": "public function writeFile($data);", "title": "" }, { "docid": "2d3f17a57093a89be964221f19cff3aa", "score": "0.6139815", "text": "public function save()\n {\n $this->fullPath = '/tmp/'. md5(microtime()). \".\" . $this->file->getExtension();\n\n return $this->file->saveAs($this->fullPath);\n }", "title": "" }, { "docid": "a47e29c4bf2583dac9b65df5729a9c3e", "score": "0.61251056", "text": "private function writeFile() {\n if ($this->cache === null) {\n return;\n }\n\n $parent = $this->file->getParent();\n $parent->create();\n\n $output = serialize($this->cache);\n $this->file->write($output);\n }", "title": "" }, { "docid": "64784702cb09bca4ade99cd66a5d9e32", "score": "0.6117098", "text": "function savetofile ($pline) {\n\t\t$file=\"saved.txt\";\n\t\tfile_put_contents($file, $pline, FILE_APPEND | LOCL_EX);\t\n\t}", "title": "" }, { "docid": "5a6e8180a7c07b25d21e5faa54ca9cce", "score": "0.6092233", "text": "function writeFile( $path, $file, $content, $operation = 'w' ) {\n\n\t$fp = fopen( $path.\"/\".$file, $operation);\n\tfwrite($fp, $content); \n\tfclose($fp);\n\n\n\n}", "title": "" }, { "docid": "510a6ea229b78b6908050b6f9f60078f", "score": "0.6082425", "text": "public function saveFile($filename, $content)\r\n\t{\r\n\t\t$File = $this->BaseFolder . $this->PATH . \"/\" . $filename;\r\n\t\t//chdir()\r\n\t\t$gestor = @fopen($File, \"w\");\r\n\t\tif ($gestor!==false)\r\n\t\t{\r\n\t\t\tfwrite($gestor, $content);\r\n\t\t\tfclose($gestor);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "a1f4279e9346249507a07936d6cd61c5", "score": "0.6071164", "text": "private function writeToFile($filename, $content) {\n\t\t$fp = fopen($filename, 'w');\n\t\tfwrite($fp, $content);\n\t\tfclose($fp);\n\t}", "title": "" }, { "docid": "b31fcaf7bc7929333e8d1f7a61a8a561", "score": "0.606714", "text": "function save_as ( $fn ) {\n\t\n\t\t$this->output_file_name = $fn;\n\t\tfile_put_contents($this->output_file_name, $this->xml_template);\n\t\n\t}", "title": "" }, { "docid": "54ac561fd6cbc1864e4ad86bb7b0495c", "score": "0.60639864", "text": "private function writeOut($file,$content)\n {\n $fh = fopen($file, 'w');\n fwrite($fh, $content);\n fclose($fh);\n }", "title": "" }, { "docid": "465914209b61bca6ec02aaf20d1b5d10", "score": "0.6029905", "text": "protected function newFile(): void\n {\n $this->close();\n $this->open();\n }", "title": "" }, { "docid": "e3e04192cebc289b63148c2dfee77a80", "score": "0.60127956", "text": "function to_file($the_file,$content,$type)\n{\n\t//$content=trim($content);\n\t$con = fopen($the_file, \"$type\");\n\tfputs($con, stripslashes($content));\n\tfclose($con);\n}", "title": "" }, { "docid": "59f757b910e793740b207638299c27fd", "score": "0.6002224", "text": "public function save()\n {\n $this->files->put(\n $this->path, json_encode(static::$presenters, JSON_PRETTY_PRINT)\n );\n }", "title": "" }, { "docid": "aa0df9ba895b7985d4dc9eb15dffc1cc", "score": "0.60013855", "text": "public function writeToFile($filename, $contents) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('writeToFile', func_get_args()));\n }", "title": "" }, { "docid": "50efdef8a6918d88a45eb66a80d3ce61", "score": "0.5996577", "text": "function writeFile($filename, $content)\n{\n if (!$fp = @fopen($filename, \"a\")) {\n die(\"无法打开文件\" . $filename);\n }\n @fwrite($fp, $content);\n @fclose($fp);\n}", "title": "" }, { "docid": "120226829abfffd01a5d8f263d757917", "score": "0.5978698", "text": "public function file_put_contents($filePath, $data);", "title": "" }, { "docid": "d0f66217fb403eced8bc0186b1aeb1f2", "score": "0.5977977", "text": "public static function write($filename, $content){\r\n //return TRUE if file is not exist\r\n if(!is_file($filename)){\r\n $file = fopen($filename, \"w\");\r\n fwrite($file, $content);\r\n fclose($file); \r\n }\r\n }", "title": "" }, { "docid": "21fd1e8fe03ba6f0705a094cced09460", "score": "0.59691995", "text": "private function write()\n {\n file_put_contents($this->path, Yaml::dump(self::$settings));\n }", "title": "" }, { "docid": "b4d96480ca0b53182ab9d67c5b329c38", "score": "0.59638786", "text": "public function save_as($path) {\n return IO_FS::File($path)->update(Net_HTTP::Agent()->send($this->request->method(Net_HTTP::POST))->body);\n }", "title": "" }, { "docid": "1c201c4213a4f2faebae9199b29dc773", "score": "0.59384704", "text": "public function newFile($fileName, $contents = '')\n {\n $fileName = $this->getOsPath(ltrim($fileName, '/\\\\'));\n if ($this->isfileNameInDirectory($fileName)) {\n $this->createDirectoriesFirst($fileName);\n }\n $file = fopen($this->getPath($fileName), 'w+b');\n fwrite($file, $contents);\n fclose($file);\n }", "title": "" }, { "docid": "f2cd37ad544f4a9c5cc65387c3a8588a", "score": "0.5934119", "text": "public function file_put_contents($file, $content)\n\t{\n\t\t$object = $this->container()->DataObject();\n\t\t$object->SetData($content);\n\t\t$object->name = $file;\n\t\t$object->content_type = 'text/plain';\n\t\t$object->Create();\n\t}", "title": "" }, { "docid": "ae0eb34a0dd340312a461fcab6688ee1", "score": "0.5930778", "text": "public function save(): self\n {\n $this->isFileWritable($this->path);\n file_put_contents($this->path, $this->content);\n\n return $this;\n }", "title": "" }, { "docid": "68034229d915ca80e3bbcca011e0a7fe", "score": "0.5926923", "text": "public function store($contents, $path, $fileName, $type = '', $siteID, $timestamp)\n {\n\t\t\n\t\t$fileName = ($type == 'HTML' && $fileName == '')? \"index.html\" : $fileName;\n\t\t\n\t\tif( substr($path, -1) != '/' ) {\n\t\t\t$path .= '/';\n\t\t}\n\t\t \t\n \twrite_file('./sites/'.$siteID.'/'.$timestamp.'/'.$path.$fileName, $contents);\n \n }", "title": "" }, { "docid": "79d4ae01bf14639910af54c53e6278f3", "score": "0.5913971", "text": "Function file_put_contents($file, $data){\n\t\tif($tmp = fopen($file, \"w\")){\n\t\t\tfwrite($tmp, $data);\n\t\t\tfclose($tmp);\n\t\t\treturn true;\n\t\t}\n\t\techo \"<b>file_put_contents:</b> Cannot create file $file<br>\";\n\t\treturn false;\n\t}", "title": "" }, { "docid": "1e340bc46df479c7564c089296227322", "score": "0.59094787", "text": "function writeToIncidentFile($fileWrite, $content)\n{\n //d($content);\n // d($fileWrite->isWritable());\n if($fileWrite->isWritable()){\n $readContent = trim($content, '[]');\n $writeContent = getFileCOntents($fileWrite);\n //d($writeContent);\n $comma = ($writeContent === '')\n ? ''\n : $comma = ',';\n $writeContent = trim($writeContent, '[]');\n $writeContent = \"[\" . $readContent . $comma . $writeContent .\"]\";\n // d(\"1\");\n //d($writeContent);\n $writeContent = preg_replace(array('/[\\t\\r\\n]+/','/ {2,}/'), '', $writeContent);\n //d(\"2\");\n // d($writeContent);\n // d($fileWrite->getRealPath());\n $test = file_put_contents($fileWrite->getRealPath(), $writeContent);\n // d($test);\n }\n}", "title": "" }, { "docid": "345e7f01cd565f0e4a446b0983de3631", "score": "0.588494", "text": "public function saveContents($contents)\n\t{\n\t\treturn Storage::put($this->getStoragePathname(), $contents);\n\t}", "title": "" }, { "docid": "dd298a34553b8f23f0d2b1267dffefbf", "score": "0.58564395", "text": "public function write()\n {\n if ($this->directory->exists() === false) {\n $this->directory->create();\n }\n\n $written = file_put_contents($this->fileName, $this->contents);\n\n if ($written === false) {\n throw new \\UnexpectedValueException(\n \"Error during writing file: '\" . $this->fileName . \"'.\"\n );\n }\n }", "title": "" }, { "docid": "8a26f2ac9536fc5016a72358ec8530c3", "score": "0.5856276", "text": "function write_file($to_write,$contents)\n\t{\n\t\t$filename=array_pop($to_write);\n\t\t$meta_dir=array();\n\t\t$meta_root_node='';\n\t\t$meta_root_node_type='';\n\t\t$this->_discern_meta_dir($meta_dir,$meta_root_node,$meta_root_node_type,$to_write);\n\n\t\tif (!is_null($meta_root_node))\n\t\t{\n\t\t\t//We're underneath a meta root node (a directory which is generated dynamically)\n\t\t\trequire_code('hooks/modules/admin_occle_fs/'.filter_naughty_harsh($meta_root_node_type));\n\t\t\t$object=object_factory('Hook_'.filter_naughty_harsh($meta_root_node_type));\n\t\t\treturn $object->write_file($meta_dir,$meta_root_node,$filename,$contents,$this)!==false;\n\t\t}\n\t\telse return false;\n\t}", "title": "" }, { "docid": "55f90a0c13d91e233a1b695414a73528", "score": "0.58556587", "text": "private function write()\n {\n try {\n file_put_contents($this->path, $this->content);\n } catch (Exception $ex) {\n $message = sprintf(\"Permission denied to '%s'\", $this->path);\n throw new Exception($message);\n }\n }", "title": "" }, { "docid": "23b21ea508df057e50c9e2476b535c61", "score": "0.5850718", "text": "private function _writeFileContents($file, $contents)\n\t {\n\t \treturn file_put_contents($file, $contents);\n\t }", "title": "" }, { "docid": "d5a665312e28aba640f31ea7f43ecf5d", "score": "0.58370054", "text": "public function SaveToFile($filename, $remember){}", "title": "" }, { "docid": "3bc6f4bfba5dd8ee8d9b21206c3b9c25", "score": "0.5832607", "text": "public function write($contents)\r\n {\r\n $file = $this->getFile();\r\n if ($file->isFile() && !$file->isWritable()) {\r\n throw FileException::shouldBeWriteable((string) $file);\r\n }\r\n file_put_contents((string) $file, $contents);\r\n }", "title": "" }, { "docid": "8f191511a2bf00c9398ff8a82082985d", "score": "0.5813964", "text": "public static function save()\n {\n return self::getWriteFile()->save();\n }", "title": "" }, { "docid": "75c68b1a25d5cadf9859a0d412d4b4f0", "score": "0.5800415", "text": "public function save($filename, $options){}", "title": "" }, { "docid": "adaeda2a8c4de24cbbe7caa6992f1464", "score": "0.57957566", "text": "function save_page($fileName)\n {\n $page = $this->get_page();\n \n // If file already exists, delete it to make\n // new one\n if (file_exists($fileName)){ \n unlink($fileName);\n }\n \n $fhandle = fopen($fileName,\"w\"); \n fwrite($fhandle, $page);\n fclose($fhandle); \n }", "title": "" }, { "docid": "de62296a172b16f6648e3f66905d8b34", "score": "0.57948303", "text": "public static function save(string $file, string $content): string\n {\n $dir = \\dirname($file);\n if (!\\is_dir($dir)) {\n \\mkdir($dir, 0700, true);\n }\n \\file_put_contents($file, $content);\n\n return $file;\n }", "title": "" }, { "docid": "48139cc6d8a0c3d0205280f5f3867432", "score": "0.57880855", "text": "function save($filepath = ''){\n $ret = $this->root->innertext();\n if ($filepath !== '') {\n @file_put_contents($filepath, $ret);\n }\n return $ret;\n }", "title": "" }, { "docid": "abe97728e8623cf9275fc4becdcbcf5f", "score": "0.57827455", "text": "private function createFile() {\n $name = md5($this->_name);\n $this->_file = $filename = APPLICATION_MODEL_PATH . '/' . $name . '.txt';\n\n if (!is_file($filename)) {\n $this->saveFile(\"\");\n }\n }", "title": "" }, { "docid": "e94a71e656dd8a46a3a33293a7e5059d", "score": "0.57800347", "text": "private function write_to_file()\n {\n $this->file->write(trim(self::$main_block->get_css_to_save()));\n $this->clear_css_cache();\n }", "title": "" }, { "docid": "264d99868c555337086909af4f58ca65", "score": "0.5778927", "text": "public function saveAs($path, array $config = []);", "title": "" }, { "docid": "2996fd158680152de302299255556751", "score": "0.5771372", "text": "private function save()\n\t{\n\t\tfile_put_contents(PATH_JAIL, '<?php'.PHP_EOL.'$jail='.var_export($this->jail, TRUE).';'.PHP_EOL.'?>');\n\t}", "title": "" }, { "docid": "0d245a2f7c6541c5f2daecd40f814c70", "score": "0.5759082", "text": "abstract protected function _filePutContents($path, $content);", "title": "" }, { "docid": "dd127e38e07ac0f03ba9df32f211111f", "score": "0.5753425", "text": "public function write($filename, $content)\n {\n return file_put_contents($this->resource($filename), $content, FILE_APPEND);\n }", "title": "" }, { "docid": "ce42da8616bb1fc12978c2df2b8256e4", "score": "0.57533103", "text": "public function saveOrderTxt($content){\n $oFile = fopen( $this->data_order_path . date('Y_d_m_His', time() ).'.txt', \"w\") or die(\"Unable to open file!\");\n fwrite($oFile, $content);\n fclose($oFile);\n }", "title": "" }, { "docid": "49574f80e5e4da1d44bda4cd421760fe", "score": "0.573464", "text": "public function newFile($path);", "title": "" }, { "docid": "64228461b32f3f66b51ad6f3205277b9", "score": "0.5722145", "text": "public function write_to_file($name, $content) {\n $bytes_written = file_put_contents(\n dirname(__FILE__) . DIRECTORY_SEPARATOR . $name,\n $content,\n LOCK_EX\n );\n if (!$bytes_written) {\n return self::ERR;\n } else {\n return self::OK;\n }\n }", "title": "" }, { "docid": "415c10131b50706d0a0ae17cf937c85d", "score": "0.57163846", "text": "function DFW_UTILS_WRITE_FILE($file_path,$content){\n\t\t\tif (!$gestor = fopen($file_path, 'w')) {\n\t\t\t\t return false;\n\t\t\t}\n\n\t\t\t// Escribir contenido a nuestro archivo abierto.\n\t\t\tif (fwrite($gestor, $content) === false){\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfclose($gestor);\n\t\t\treturn true;\n\t}", "title": "" }, { "docid": "7a6983f4de146726e88dea39d3973fee", "score": "0.57130426", "text": "public function write($content){}", "title": "" }, { "docid": "5aad73224beabf3c53bec80c675fa2a2", "score": "0.57123756", "text": "public function save(ReturnsFileEventInterface $file);", "title": "" }, { "docid": "0319ab17bbbbed244de9a9cdc773cde0", "score": "0.5711172", "text": "private function saveFile()\n\t{\n\t\treturn FALSE;\n\t\t/* The following worked for file writes, but needs modifying for db.\n\t\tif (!$this->bolChangesToSave)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\tif (!$this->urlParts[self::FDBP_URL_RESOURCE_ID])\n\t\t{\n\t\t\treturn $this->createFile();\n\t\t}\n\n\t\t// try to save the changed contents *** WIP ***\n\t\t$savedOK = TRUE;\n\n\n\n\t\t// This should be replaced by a suitable database update statement...\n\t\t$padId = substr(str_repeat(\"0\", 20).$this->urlParts[self::FDBP_URL_RESOURCE_ID], -20);\n\t\t$cgDir = \"resources/\" . $this->urlParts[self::FDBP_URL_CUSTOMER_GROUP_ID] . \"/\";\n\t\tif (!file_exists($cgDir)) mkdir($cgDir);\n\t\t$phDir = $cgDir . \"/\" . $this->urlParts[self::FDBP_URL_PLACEHOLDER_NAME] . \"/\";\n\t\tif (!file_exists($phDir)) mkdir($phDir);\n\t\t$rsFile = fopen($phDir . $this->urlParts[self::FDBP_URL_EFFECTIVE_DATE] . \".\" . $padId, \"w\");\n\t\tfwrite($rsFile, $this->strFileContents);\n\t\tfclose($rsFile);\n\n\n\n\t\t$this->bolChangesToSave = !$savedOK;\n\t\treturn $savedOK;\n\t\t*/\n\t}", "title": "" }, { "docid": "1eda502a3fc989bce8cbb5854ae07fb1", "score": "0.570602", "text": "public function putFile(string $path, mixed $contents): void;", "title": "" }, { "docid": "d6f7736501b2ae1dc08f0a933c165a91", "score": "0.57040495", "text": "private function _write($path, $content)\n {\n // If replace has been ordedered\n if($this->assertion('replace'))\n $replace = true;\n else\n $replace = false;\n \n // Writes and displays\n $res = FileSystem::put_file($path, $content, $replace);\n\n // Result message\n if(!$res)\n {\n $this->putline(\" > Exists $path\");\n return;\n }\n\n $this->putline(\" > Create $path\");\n }", "title": "" }, { "docid": "23402ac3b7cd9d06fe60309f905f7af1", "score": "0.5695902", "text": "function WriteFile($file,$tekst){\n\n $myfile = fopen($file, \"w\");\n if (fwrite($myfile, $tekst))\n {\n fclose($myfile);\n return true;\n }\n else\n {\n return false;\n }\n\n}", "title": "" }, { "docid": "1c30d8f0dfe13b57a6ee814adec3f017", "score": "0.5695857", "text": "public static function writeFile($filename, $content)\n {\n self::prepareDirectory($filename);\n\n $fs = new Filesystem();\n $fs->dumpFile($filename, $content);\n }", "title": "" }, { "docid": "ca545cd434f572a0b0668201aa769ccd", "score": "0.569557", "text": "public function save()\r\n {\r\n $fullPath = $this->toPath($this->namespace . \"\\\\\" . $this->fileName) . \".php\";\r\n if (file_exists($fullPath)) {\r\n throw new \\Exception('TestClass already exists');\r\n }\r\n $testClass = new \\SplFileObject($fullPath, 'w+');\r\n $testClass->fwrite($this->template());\r\n }", "title": "" }, { "docid": "6f5f106fb9e0acbef57b72bde3305216", "score": "0.56869626", "text": "public function write($filename, $contents) {\n\t\t$json = Json::encode($contents, Json::PRETTY_PRINT | Json::UNESCAPED_SLASHES);\n\t\t$json = str_replace(' ', \"\\t\", $json);\n\n\t\t$file = new File($filename);\n\t\tif ($file->exists()) {\n\t\t\t$file->setMode(0755);\n\t\t}\n\t\t$file->write($json);\n\t}", "title": "" }, { "docid": "2b4b747c8afdbe4789f251f107f3baf2", "score": "0.5685829", "text": "public function saveOnDisk($path) {\n\t\t$file = new File($path, 'w');\n\t\t$file->write($this->getSourceCode());\n\t\t$file->close();\n\t}", "title": "" }, { "docid": "480838fd8b85e3b037cec9a4272cf18f", "score": "0.56830704", "text": "private function putContents($contents) {\r\n if (strlen($contents) > 25) {\n ftruncate($this->handle, 0);\n fwrite($this->handle, $contents) or die('Could not write to file.');\n }\r\n }", "title": "" }, { "docid": "dec23603d0a955b9ae4dec2f69b52608", "score": "0.5682069", "text": "function write ( $content )\r\n {\r\n if ($hd = @fopen($this->cache_dir . $this->filename, 'w'))\r\n {\r\n fputs($hd, serialize($content));\r\n fclose($hd);\r\n }\r\n }", "title": "" }, { "docid": "3f45301ea2e89c6cf4ccbf0963bb3218", "score": "0.56753874", "text": "abstract public function write($path);", "title": "" }, { "docid": "cc466b7aa9bccc501388f2550d04a9e9", "score": "0.56691015", "text": "public function write($data, $file);", "title": "" }, { "docid": "9b9f05d29f20f1d51f9f14c0a59a8503", "score": "0.5660319", "text": "public function save()\n {\n $this->log_file_path = $this->path . DIRECTORY_SEPARATOR . 'list.json';\n $log_file = fopen($this->log_file_path,\"w\");\n fwrite($log_file,json_encode($this->data));\n fclose($log_file);\n\n }", "title": "" } ]
752efba7a61d5ac65123bd4d48c3dc53
Se hace la consulta de informacion relacionada a los lotes terreno con un saldo positivo
[ { "docid": "db67c0d80ed7e6da125c0dce8a371fd9", "score": "0.0", "text": "public function getTerrenosAdeudo(Request $request){\n $contrato = Contrato::join('creditos','contratos.id','=','creditos.id')\n ->join('personal as cliente','creditos.prospecto_id','=','cliente.id')\n ->join('cotizacion_lotes','contratos.id','=','cotizacion_lotes.num_contrato')\n ->join('lotes','creditos.lote_id','=','lotes.id')\n ->join('modelos','lotes.modelo_id','=','modelos.id')\n ->join('etapas','lotes.etapa_id','=','etapas.id')\n ->leftJoin('expedientes','contratos.id','=','expedientes.id')\n ->join('fraccionamientos','lotes.fraccionamiento_id','=','fraccionamientos.id')\n ->select(\n 'contratos.id as folio',\n 'cliente.nombre', 'cliente.apellidos',\n 'contratos.saldo',\n 'modelos.nombre as modelo',\n 'etapas.num_etapa as etapa',\n 'fraccionamientos.nombre as proyecto',\n 'lotes.num_lote',\n 'lotes.manzana',\n 'creditos.precio_venta',\n 'creditos.lote_id',\n 'contratos.status',\n 'cotizacion_lotes.id as cotizacionId',\n 'expedientes.liquidado'\n )\n ->where('modelos.nombre','=','Terreno')\n ->where('contratos.saldo','>',0) // caracteristica de la funcion principal (terreno con un saldo mayor a cero)\n ->where('contratos.status','=',3);\n\n // filtros para la busqueda por el criterio seleccionado\n if($request->proyecto != '')\n $contrato = $contrato->where('lotes.fraccionamiento_id','=',$request->proyecto);\n if($request->etapa != '')\n $contrato = $contrato->where('lotes.etapa_id','=',$request->etapa);\n if($request->manzana != '')\n $contrato = $contrato->where('lotes.manzana','like','%'.$request->manzana.'%');\n if($request->lote != '')\n $contrato = $contrato->where('lotes.num_lote','=',$request->lote);\n if($request->cliente != '')\n $contrato = $contrato->where(DB::raw(\"CONCAT(cliente.nombre,' ',cliente.apellidos)\"), 'like', '%'. $request->cliente . '%');\n\n $contrato = $contrato->orderBy('contratos.fecha','desc')->paginate(30);\n\n foreach ($contrato as $key => $c) {\n $pagos = Pagos_lotes::select(DB::raw(\"SUM(interes_monto) as interes\"))\n ->where('pagos_lotes.cotizacion_lotes_id','=',$c->cotizacionId)\n ->first();\n \n $c->interes = round($pagos->interes,2);\n }\n\n return $contrato;\n }", "title": "" } ]
[ { "docid": "685c9f67b5f1d7954fb979017792f366", "score": "0.67789936", "text": "function buscar_saldo_f810($cuenta, $asiento, $con)\r\n{\r\n\t$sql_f810=\"select cue_saldo from sgcaf810 where cue_codigo=:cuenta\";\r\n//\techo $sql_f810;\r\n\t$lacuentas=$con->prepare($sql_f810); // or die (\"<p />El usuario $usuario no pudo conseguir el saldo contable<br>\".mysql_error().\"<br>\".$sql);\r\n\t$lacuentas->execute(array(\":cuenta\"=>$cuenta));\r\n\t$lacuentas=$lacuentas->fetch(PDO::FETCH_ASSOC);\r\n\t$saldoinicial=$lacuenta['cue_saldo'];\r\n//\techo 'el asiento '.$asiento.'<br>';\r\n\t$sql_f820=\"select com_monto1, com_monto2 from sgcaf820 where com_cuenta=:cuenta\";\r\n\tif ($asiento == '')\r\n\t\t$sql_f820.=\"\";\r\n\telse\r\n\t\t$sql_f820.=\" and (com_nrocom <> '$asiento') \";\r\n\t$sql_f820.=\" order by com_fecha\";\r\n//\techo $sql_f820.'<br>';\r\n\t$lacuentas=$con->prepare($sql_f820); // or die (\"<p />El usuario $usuario no pudo conseguir los movimientos contables<br>\".mysql_error().\"<br>\".$sql);\r\n\t$lacuentas->execute(array(\":cuenta\"=>$cuenta));\r\n\twhile($lascuenta=$lacuentas->fetch(PDO::FETCH_ASSOC)) {\r\n\t\t$saldoinicial+=$lascuenta['com_monto1'];\r\n//\t\techo $saldoinicial.'<br>';\r\n\t\t$saldoinicial-=$lascuenta['com_monto2'];\r\n//\t\techo $saldoinicial.'<br>';\r\n\t}\r\n\treturn round($saldoinicial,2);\r\n}", "title": "" }, { "docid": "e829889d9816ecb0abc97802481aeefe", "score": "0.65194803", "text": "public function RegistreAbonoLibro($idLibro,$TablaAbonos,$CuentaDestino,$PageReturn,$TotalAbono,$Datos){\r\n \r\n $NomIdCentroCostos=\"idCentroCosto\"; //Nombre de las columnas, se coloca porque en algunas versiones es diferente\r\n $NomIdEmpresa=\"idEmpresa\";\r\n $Fecha=$Datos[\"Fecha\"];\r\n $TipoAbono=$Datos[\"TipoAbono\"];\r\n $idUser=$Datos[\"idUser\"];\r\n $hora=date(\"H:i\");\r\n if($TipoAbono==\"CuentasXCobrar\"){\r\n $Factor=1;\r\n $Page=\"CuentasXCobrar.php\";\r\n }\r\n if($TipoAbono==\"CuentasXPagar\"){\r\n $Factor=\"-1\";\r\n $Page=\"CuentasXPagar.php\";\r\n }\r\n $DatosLibro=$this->DevuelveValores(\"librodiario\", \"idLibroDiario\", $idLibro);\r\n $AbonosActuales=$this->Sume(\"abonos_libro\", \"Cantidad\", \"WHERE idLibroDiario='$idLibro' AND TipoAbono='$TipoAbono'\");\r\n $AbonosActuales=$AbonosActuales+$TotalAbono;\r\n $SaldoTotal=$DatosLibro[\"Neto\"]*$Factor;\r\n $NuevoSaldo=$SaldoTotal-$AbonosActuales;\r\n if($AbonosActuales>$SaldoTotal){\r\n echo \"<script>alert('Abono incorrecto, supera el saldo total')</script>\";\r\n exit(\" <a href='$Page'> Volver</a> \");\r\n }\r\n $DatosCuentasFrecuentes=$this->DevuelveValores(\"cuentasfrecuentes\", \"CuentaPUC\", $CuentaDestino);\r\n $Debitos1=0;\r\n $Creditos1=0;\r\n $Neto1=0;\r\n $Debitos2=0;\r\n $Creditos2=0;\r\n $Neto2=0;\r\n if($TipoAbono==\"CuentasXPagar\"){\r\n $Concepto=\"ABONO A LA CUENTA POR PAGAR ESPECIFICADA EN EL LIBRO DIARIO CON ID=$idLibro \"\r\n . \"del Tercero $DatosLibro[Tercero_Razon_Social] con NIT $DatosLibro[Tercero_Identificacion] \"\r\n . \"por total de: $SaldoTotal, Nuevo saldo: $NuevoSaldo\";\r\n $Debitos1=$TotalAbono;\r\n $Neto1=$TotalAbono;\r\n $Neto2=$TotalAbono*(-1);\r\n \r\n $Creditos2=$TotalAbono;\r\n }\r\n \r\n if($TipoAbono==\"CuentasXCobrar\"){\r\n $Concepto=\"ABONO A LA CUENTA POR COBRAR ESPECIFICADA EN EL LIBRO DIARIO CON ID=$idLibro \"\r\n . \"del Tercero $DatosLibro[Tercero_Razon_Social] con NIT $DatosLibro[Tercero_Identificacion] \"\r\n . \"por total de: $SaldoTotal, Nuevo saldo: $NuevoSaldo\";\r\n $Debitos1=0;\r\n $Creditos1=$TotalAbono;\r\n $Neto1=$TotalAbono*(-1);\r\n $Neto2=$TotalAbono;\r\n \r\n $Debitos2=$TotalAbono;\r\n }\r\n /*\r\n * Abro un nuevo comprobante de abono\r\n */\r\n \r\n $tab=\"comprobantes_contabilidad\";\r\n $NumRegistros=4; \r\n\r\n $Columnas[0]=\"Fecha\"; $Valores[0]=$Fecha;\r\n $Columnas[1]=\"Concepto\"; $Valores[1]=$Concepto;\r\n $Columnas[2]=\"Hora\"; $Valores[2]=$hora;\r\n $Columnas[3]=\"Usuarios_idUsuarios\"; $Valores[3]=$idUser;\r\n\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n $idComprobante=$this->ObtenerMAX($tab, \"ID\", 1, \"\");\r\n \r\n /*\r\n * Inserto los datos a la tabla de abonos correspondiente \r\n */\r\n \r\n $tab=$TablaAbonos;\r\n $NumRegistros=5;\r\n $Columnas[0]=\"Fecha\"; $Valores[0]=$Fecha;\r\n $Columnas[1]=\"Cantidad\"; $Valores[1]=$TotalAbono;\r\n $Columnas[2]=\"idLibroDiario\"; $Valores[2]=$idLibro;\r\n $Columnas[3]=\"idComprobanteContable\"; $Valores[3]=$idComprobante;\r\n $Columnas[4]=\"TipoAbono\"; $Valores[4]=$TipoAbono;\r\n \r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n \r\n /*\r\n * Se registra en el libro diario\r\n * \r\n */\r\n \r\n $DatosSucursal= $this->DevuelveValores(\"empresa_pro_sucursales\", \"Actual\", 1); \r\n \r\n $tab=\"librodiario\";\r\n $NumRegistros=27;\r\n \r\n $Columnas[0]=\"Fecha\";\t\t\t$Valores[0]=$Fecha;\r\n $Columnas[1]=\"Tipo_Documento_Intero\";\t$Valores[1]=\"COMPROBANTE CONTABLE\";\r\n $Columnas[2]=\"Num_Documento_Interno\";\t$Valores[2]=$idComprobante;\r\n $Columnas[3]=\"Tercero_Tipo_Documento\";\t$Valores[3]=$DatosLibro['Tercero_Tipo_Documento'];\r\n $Columnas[4]=\"Tercero_Identificacion\";\t$Valores[4]=$DatosLibro['Tercero_Identificacion'];\r\n $Columnas[5]=\"Tercero_DV\";\t\t$Valores[5]=$DatosLibro['Tercero_DV'];\r\n $Columnas[6]=\"Tercero_Primer_Apellido\";\t$Valores[6]=$DatosLibro['Tercero_Primer_Apellido'];\r\n $Columnas[7]=\"Tercero_Segundo_Apellido\";$Valores[7]=$DatosLibro['Tercero_Segundo_Apellido'];\r\n $Columnas[8]=\"Tercero_Primer_Nombre\";\t$Valores[8]=$DatosLibro['Tercero_Primer_Nombre'];\r\n $Columnas[9]=\"Tercero_Otros_Nombres\";\t$Valores[9]=$DatosLibro['Tercero_Otros_Nombres'];\r\n $Columnas[10]=\"Tercero_Razon_Social\";\t$Valores[10]=$DatosLibro['Tercero_Razon_Social'];\r\n $Columnas[11]=\"Tercero_Direccion\";\t$Valores[11]=$DatosLibro['Tercero_Direccion'];\r\n $Columnas[12]=\"Tercero_Cod_Dpto\";\t$Valores[12]=$DatosLibro['Tercero_Cod_Dpto'];\r\n $Columnas[13]=\"Tercero_Cod_Mcipio\";\t$Valores[13]=$DatosLibro['Tercero_Cod_Mcipio'];\r\n $Columnas[14]=\"Tercero_Pais_Domicilio\"; $Valores[14]=$DatosLibro['Tercero_Pais_Domicilio'];\r\n $Columnas[15]=\"CuentaPUC\";\t\t$Valores[15]=$DatosLibro[\"CuentaPUC\"];\r\n $Columnas[16]=\"NombreCuenta\";\t\t$Valores[16]=$DatosLibro[\"NombreCuenta\"];\r\n $Columnas[17]=\"Detalle\";\t\t$Valores[17]=$TipoAbono;\r\n $Columnas[18]=\"Debito\";\t\t\t$Valores[18]=$Debitos1;\r\n $Columnas[19]=\"Credito\";\t\t$Valores[19]=$Creditos1;\r\n $Columnas[20]=\"Neto\";\t\t\t$Valores[20]=$Neto1;\r\n $Columnas[21]=\"Mayor\";\t\t\t$Valores[21]=\"NO\";\r\n $Columnas[22]=\"Esp\";\t\t\t$Valores[22]=\"NO\";\r\n $Columnas[23]=\"Concepto\";\t\t$Valores[23]=$Concepto;\r\n $Columnas[24]=$NomIdCentroCostos; $Valores[24]=$DatosLibro[$NomIdCentroCostos];\r\n $Columnas[25]=$NomIdEmpresa;\t\t$Valores[25]=$DatosLibro[$NomIdEmpresa];\r\n $Columnas[26]=\"idSucursal\";\t\t$Valores[26]=$DatosSucursal[\"ID\"];\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n\r\n\r\n ///////////////////////Registramos contra partida del anticipo\r\n\r\n $CuentaPUC=$CuentaDestino; \r\n \r\n $Valores[15]=$CuentaPUC;\r\n $Valores[16]=$DatosCuentasFrecuentes[\"Nombre\"];\r\n $Valores[18]=$Debitos2;\r\n $Valores[19]=$Creditos2; \t\t\t//Credito se escribe el total de la venta menos los impuestos\r\n $Valores[20]=$Neto2; \t\t\t\t\t\t\t\t\t\t\t//Credito se escribe el total de la venta menos los impuestos\r\n\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n \r\n \r\n if($AbonosActuales==$SaldoTotal){\r\n $this->ActualizaRegistro(\"librodiario\", \"Estado\", \"CO\", \"idLibroDiario\", $idLibro);\r\n }\r\n \r\n return ($idComprobante);\r\n }", "title": "" }, { "docid": "ad4dd7149d6f53255f4d093de41d75f7", "score": "0.6414687", "text": "function buscaIgual_lotestrxtmp() {\n $estado = 'ERR';\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n try {\n $sql = 'SELECT * FROM invoice WHERE TxnID = :clave ';\n $stmt = $this->db->prepare($sql);\n $stmt->bindParam(':clave', $_SESSION['lotestrxtmp']['TxnID']);\n $stmt->execute();\n $registro = $stmt->fetch(PDO::FETCH_ASSOC);\n if ( ! $registro){\n $this->estado = 'OK';\n } else {\n if ($registro['TxnID'] === $_SESSION['lotestrxtmp']['TxnID']) {\n $this->estado = 'ACTUALIZA';\n }\n }\n \n } catch(PDOException $e) {\n echo $e->getMessage();\n } \n \n return $this->estado;\n }", "title": "" }, { "docid": "6347e3855ab474d618ab3bd39134496e", "score": "0.6403515", "text": "function leetodos_lotestrxtmp() {\n $estado = 'ERR';\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n try {\n $sql = 'SELECT * FROM invoice WHERE TxnID = :clave ';\n $stmt = $this->db->prepare($sql);\n $stmt->bindParam(':clave', $_SESSION['lotestrxtmp']['TxnID']);\n $stmt->execute();\n $registro = $stmt->fetchAll(PDO::FETCH_ASSOC);\n if ( ! $registro){\n $this->estado = 'OK';\n } else {\n $this->estado = 'TODOS';\n }\n \n } catch(PDOException $e) {\n echo $e->getMessage();\n } \n \n return $this->estado;\n }", "title": "" }, { "docid": "530b58fd3bce0969cb5e44f22a397c5c", "score": "0.6334252", "text": "public function BuyAction(Request $request){\n //$id=$request->get('id');\n $empresa= $request->get ('empresa');\n $acciones=$request->get('acciones');\n //$valor=$request->get ('valor');\n //$valor=$valor_action;\n $cant=$request->get('cant'); \n\n // $vista=view('inversion', compact('empresa','acciones','valor', 'cant'))->render();\n\n $id_action= Cartera::select('id','acciones')\n ->where('empresa',$empresa)\n ->limit(1)\n ->get();\n //Obtener el valor de esa accion seleccionada//\n $valor_action= Investment::select('valor')\n ->where('empresa',$empresa)\n ->get(); \n \n //Si no encuentra un registro con esa validacion debe Insertar nuevo registro en Cartera\n if (empty($id_action[0]['id']))\n { \n $compra = new Cartera;\n $compra->empresa=$empresa;\n $compra->acciones=$cant;\n $compra->valor=$valor_action[0]['valor'];\n //$compra->total=$cant*$valor;\n $compra->save();\n\n }else{ \n //Si existe actualiza el saldo de ese registro\n $compra=Cartera::find($id_action[0]['id']);\n //$compra->acciones=$cant;\n $compra->acciones=$id_action[0]['acciones']+$cant;\n $compra->save();\n }\n\n//variable que devuelve el ultimo dato de saldo ordenado por id descendiente-Limitamos a1 para que sólo traiga el ultimo \n \n $lastSaldo= Balance::select('saldo')\n ->orderBy('id', 'desc')\n ->limit(1)\n ->get();\n\n $total=$valor_action[0]['valor']*$cant;\n //Creo el objeto para guardar los datos en la tabla Balance\n $transaction=new Balance;\n $transaction->fecha=date('y-m-d');\n $transaction->tipo_op=6;\n $transaction->descrip='Compra de Acciones de '.$empresa;\n $transaction->importe=$total;\n // $transaction->saldo=ObtenerSaldo($lastSaldo)-$money;\n $transaction->saldo=$lastSaldo[0]['saldo']-$total; // a $LastSaldo le indicamos que traiga sólo el contenido de su unico campo ya q sino lo devuelve como un array\n $transaction->save();\n\n return response()->json(array('success'=>true));\n }", "title": "" }, { "docid": "cc217ceb8e71e0a8700a25df64e91872", "score": "0.6313643", "text": "public function saldo()\n {\n $theColor = ($this->saldo >= 0 ? \"black\" : \"red\");\n $saldoValor = \"<font color='{$theColor}'>R$ \" . number_format($this->saldo, 2, ',', '.') . \"</font>\";\n print \"<br>- - -<br>Agência: <b>{$this->getAgencia()}</b> - Conta: <b>{$this->getConta()}</b> <br> - Saldo: <b>{$saldoValor}</b><br>\";\n }", "title": "" }, { "docid": "89415f2a76b71b520cddf2b75a663f61", "score": "0.6306511", "text": "public function consultarcotizacion() {\n $cotizaciones = new Cotizacion($this->adapter);\n //Conseguimos todos los las cotizaciones \n\n if (isset($_POST[\"cons_cotizacion\"]) && $_POST[\"cons_cotizacion\"] != \"\") {\n //variable para guardar vector de getById\n $id = (int) $_POST[\"cons_cotizacion\"];\n //Conseguimos el metodo getbyid el cual me envia un vector y debo guardar en una variable\n $valor = $cotizaciones->getById(\"cot_codigoCotizacion\", $id);\n //Cargamos la vista index y le pasamos valores\n $allusers = $valor;\n } else {\n $valor = NULL;\n $allusers = $cotizaciones->getAll();\n }\n $this->view(\"cotizacion/mostrarcotizacion\", array(\n \"allusers\" => $allusers,\n \"valor\" => $valor\n //$cotizaciones = $cotizaciones->consultar() \n ));\n }", "title": "" }, { "docid": "3c80efc40e85f33f22487a157062c6e0", "score": "0.63028705", "text": "function reservarSaldo() {\n\n /**\n * Validamos o valor do empenho,.\n * caso o valor das retencoes seje maior que o valor do emepnho, cancelamos o procedimento\n */\n if ($this->getValorRetencao() > $this->valorempenho) {\n\n $sMessage = \"Não foi possível fazer a reserva de saldo do empenho da folha ({$this->empenhofolha}).\\n\";\n $sMessage .= \"Valor da retenção maior que o valor do Empenho.\\nContate Suporte.\";\n throw new BusinessException($sMessage);\n\n }\n\n if (!$this->temreservasaldo) {\n\n /**\n * Incluimos na tabela orcreserva caso ainda exista saldo na dotação\n */\n require_once(modification(\"libs/db_liborcamento.php\"));\n $rsDotacaoSaldo = db_dotacaosaldo(8, 2, 2, true,\n \"o58_coddot={$this->dotacao}\", db_getsession(\"DB_anousu\"));\n $oDotacaoSaldo = db_utils::fieldsMemory($rsDotacaoSaldo, 0);\n if ($oDotacaoSaldo->atual_menos_reservado - $this->valorempenho >= 0) {\n\n $oDaoReservaSaldo = db_utils::getDao(\"orcreserva\");\n $oDaoReservaSaldo->o80_anousu = db_getsession(\"DB_anousu\");\n $oDaoReservaSaldo->o80_coddot = $this->dotacao;\n $oDaoReservaSaldo->o80_dtfim = date('Y', db_getsession('DB_datausu')).\"-12-31\";\n $oDaoReservaSaldo->o80_dtini = date('Y-m-d', db_getsession('DB_datausu'));\n $oDaoReservaSaldo->o80_dtlanc = date('Y-m-d', db_getsession('DB_datausu'));\n $oDaoReservaSaldo->o80_valor = $this->valorempenho;\n $oDaoReservaSaldo->o80_descr = \"Reserva saldo empenho folha {$this->empenhofolha} \";\n $oDaoReservaSaldo->incluir(null);\n if ($oDaoReservaSaldo->erro_status == 0) {\n\n $sMessage = \"Não foi possível fazer a reserva de saldo \\n$oDaoReservaSaldo->erro_msg\";\n throw new DBException($sMessage);\n\n }\n /**\n * Vinculamos a reserva ao empenho da folha\n */\n $oDaoReservaEmpenhoFolha = new cl_orcreservarhempenhofolha;\n $oDaoReservaEmpenhoFolha->o120_orcreserva = $oDaoReservaSaldo->o80_codres;\n $oDaoReservaEmpenhoFolha->o120_rhempenhofolha = $this->empenhofolha;\n $oDaoReservaEmpenhoFolha->incluir(null);\n if ($oDaoReservaEmpenhoFolha->erro_status == 0) {\n\n $sMessage = \"Não foi possível fazer a reserva de saldo\\n$oDaoReservaEmpenhoFolha->erro_msg\";\n throw new DBException($sMessage);\n\n }\n $this->temreservasaldo = true;\n $this->reservasaldo = $oDaoReservaSaldo->o80_codres;\n } else {\n throw new BusinessException(\"Dotação {$this->dotacao} não possui saldo suficiente para empenhar.\");\n }\n\n }\n }", "title": "" }, { "docid": "15e34ff86caa11b2895389a3d5b901d2", "score": "0.6294909", "text": "public function estado_resultado($id){\n // $datos = array('VENTA','DESCUENTO DE VENTA','MANO DE OBRA','MATERIA PRIMA','GASTOS ADMINISTRATIVOS','GASTOS DE VENTA');\n $venta_de_vienes = $this->obtener_resultado('VENTA DE VIENES', $id);\n $rebajas_y_devoluciones = $this->obtener_resultado('REBAJAS Y DEVOLUCIONES EN VENTA DE VIENES', $id);\n $ventas_netas = $venta_de_vienes - $rebajas_y_devoluciones;\n\n $costo_de_venta = $this->obtener_resultado('COSTO DE VENTA', $id);\n $utilidad_bruta = $ventas_netas - $costo_de_venta;\n\n $gastos_de_operacion = $this->obtener_resultado('GASTOS DE OPERACION', $id);\n $utilidad_de_operacion = $utilidad_bruta - $gastos_de_operacion;\n\n $gastos_no_operacionales = $this->obtener_resultado('GASTOS NO OPERACIONALES', $id);\n $utilidad_antes_impuestos_reserva = $utilidad_de_operacion - $gastos_no_operacionales;\n $porcentaje_reserva = $this->reserva_legal();\n\n $reserva_legal = $utilidad_antes_impuestos_reserva* $porcentaje_reserva;\n $utilidad_antes_de_impuesto_renta = $utilidad_antes_impuestos_reserva-$reserva_legal;\n\n $porcentaje_renta = $this->renta();\n $gastos_de_impuesto_renta = $utilidad_antes_de_impuesto_renta * $porcentaje_renta;\n\n $utilidadNeta = $utilidad_antes_de_impuesto_renta - $gastos_de_impuesto_renta;\n \n\n $datos = array(\n 'VENTA DE VIENES' => $this->Dolar($venta_de_vienes),\n 'REBAJAS Y DEVOLUCIONES EN VENTA DE VIENES' => $this->Dolar($rebajas_y_devoluciones),\n 'VENTAS NETAS'=> $this->Dolar($ventas_netas),\n 'COSTO DE VENTA'=> $this->Dolar($costo_de_venta),\n 'UTILIDAD BRUTA'=> $this->Dolar($utilidad_bruta),\n 'GASTOS DE OPERACION'=> $this->Dolar($gastos_de_operacion),\n 'UTILIDAD DE OPERACION'=> $this->Dolar($utilidad_de_operacion),\n 'GASTOS NO OPERACIONALES'=> $this->Dolar($gastos_no_operacionales),\n 'UTILIDAD ANTES IMPUESTO Y RESERVA'=> $this->Dolar($utilidad_antes_impuestos_reserva),\n 'PORCENTAJE RESERVA'=> $this->Porcentaje($porcentaje_reserva),\n 'RESERVA LEGAL'=> $this->Dolar($reserva_legal),\n 'UTILIDAD ANTES DE IMPUESTO RENTA'=> $this->Dolar($utilidad_antes_de_impuesto_renta),\n 'PORCENTAJE RENTA'=> $this->Porcentaje($porcentaje_renta),\n 'GASTOS DE IMPUESTO RENTA'=> $this->Dolar($gastos_de_impuesto_renta),\n 'UTILIDAD NETA'=> $this->Dolar($utilidadNeta),\n\n );\n \n $meses = array('enero','febrero','marzo','abril','mayo','junio','julio', 'agosto','septiembre','octubre','noviembre','diciembre');\n $fecha =\"\";\n if($id == 'actual'){\n for ($i=0; $i <count($meses) ; $i++) { \n if(date('m')-1 == $i){\n $fecha = 'DEL 01 DE '. strtoupper($meses[$i]) .' AL '.$this->ultimo_dia_().' DE '.strtoupper($meses[$i]).' DE '. date('Y');\n }\n }\n }\n else{\n //otro proceso\n $fechaX = substr($id, 0,7);\n for ($i=0; $i <count($meses) ; $i++) { \n if((substr($id, 5,2)-1) == $i){\n $fecha = 'DEL 01 DE '. strtoupper($meses[$i]) .' AL '.$this->ultimo_dia_($id).' DE '.strtoupper($meses[$i]).' DE '. substr($id, 0,4);\n }\n }\n }\n\n return view('Balances.EstadoResultado', compact('datos','fecha'));\n }", "title": "" }, { "docid": "166b2a26ab93a09d82bb87aaa275a2ff", "score": "0.62823826", "text": "function ventasDetalleCliente($web) {\n\t\t//RECIBIMOS LAS DOS FECHAS\n\t\t$fecha1 = $_POST['Fecha1'];\n\t\t$fecha2 = $_POST['Fecha2'];\n\t\t\n\t\t//RECIBIMOS DATOS DEL SELECT PRODUCTOS\n\t\t$producto = explode('|', $_POST['selectProduct']);\n\t\t$_prod_ = $producto[0];\n\t\t$_tipo_ = $producto[1];\n\t\t\n\t\t//SEPARAMOS SEGUN EL TIPO DE OPCION\n\t\tif (isset($_POST['opcion']))\n\t\t\t$_tipo_ = $_POST['opcion'];\n\t\telse\n\t\t\t$_tipo_ = $producto[1];\n\t\t\n\t\t//RECIBIMOS DATOS DEL SELECT USUARIOS\n\t\t$usuario = explode('|', $_POST['selectUsuario']);\n\t\t$_usser_ = $usuario[0];\n\t\t\n\t\t//SEGUN SELECT RECIBIDO ESCOGEMOS CONSULTA\n\t\tif (isset($_POST['selectProduct']))\n\t\t\t$addSQL = \"AND productos.IdOferta = '$_prod_' AND opcionesoferta.Id = '$_tipo_'\";\n\t\telse if (isset($_POST['selectUsuario']))\n\t\t\t$addSQL = \"AND ordenes.Tramitado = '\".trim($_POST['selectUsuario']).\"'\";\n\t\t\n\t\t\t\t\n\t\trequire_once('conexion/conexion.inc.php');\n\t\t$db = DataBase::getInstance();\n\t\t\t\t\n\t\t//NOS GUARDA EN EL ARREGLO ORD LAS ORDENES SEAN ESTAS POR CONTRA-REMBOLSO PAYPLA O TARJETA Y QUE SEAN OK\n\t\t$SQL = \"SELECT ordenes.IdOrden, lineasorden.Id \";\n\t\t$SQL .= \"FROM ordenes INNER JOIN lineasorden ON ordenes.IdOrden = lineasorden.IdOrden \";\n\t\t$SQL .= \"INNER JOIN usuarios ON ordenes.IdCliente = usuarios.Id \";\n\t\t$SQL .= \"INNER JOIN productos ON lineasorden.IdProducto = productos.IdOferta \";\n\t\t$SQL .= \"INNER JOIN opcionesoferta ON lineasorden.Talla = opcionesoferta.Id \";\t\t\n\t\t$SQL .= \"WHERE lineasorden.EstadoPedido != 'Anulado' AND ordenes.EstadoPago ='ok' AND (ordenes.FormaPago = 'contra-rembolso' OR ordenes.FormaPago = 'tarjeta' OR ordenes.FormaPago = 'paypal') \";\n\t\t$SQL .= \"AND ordenes.FechaOrden >= '$fecha1' AND ordenes.FechaOrden <= '$fecha2'\";\t\t\t\t\t\t\t\t\t\n\t\t$db->setQuery($SQL);\n\t\t$row = $db->execute();\n\t\tif (mysqli_num_rows($row) > 0) {\n\t\t\t$result = $db->loadObjectList();\n\t\t\tforeach($result as $result1) {\n\t\t\t\t$ord[] = array('idorden'=>$result1->IdOrden, 'lineaorden'=>$result1->Id); \n\t\t\t}\n\t\t}\n\t\t//FIN\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t//RECORREMOS EL ARREGLO ORDENES PARA IR PRESENTANDO LOS DATOS UNO A UNO CON LAS DISTINTAS RESTRICCIONES, AQUI TENEMOS QUE APLICAR RESTRICCIONES DE BÚSQUEDA\n\t\t\t\t$contOrders = count($ord);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t//FIN\n\t\t\t\tfor ($i = 0; $i <= $contOrders; $i++) {\n\t\t\t\t$SQL = \"SELECT *, \n\t\t\t\t\tordenes.IdOrden, \n\t\t\t\t\tlineasorden.Id as lineasOrden,\n\t\t\t\t\tlineasorden.Cantidad, \n\t\t\t\t\tlineasorden.GastosEnvio, \n\t\t\t\t\topcionesoferta.Opcion, \n\t\t\t\t\topcionesoferta.Precio, \n\t\t\t\t\tordenes.Total, \n\t\t\t\t\tordenes.Hora, \n\t\t\t\t\tdirecciones.D_Nombres, \n\t\t\t\t\tdirecciones.D_Apellidos, \n\t\t\t\t\tdirecciones.TipoVia, \n\t\t\t\t\tdirecciones.Direccion, \n\t\t\t\t\tdirecciones.TipoNumero, \n\t\t\t\t\tdirecciones.Numero, \n\t\t\t\t\tdirecciones.Piso, \n\t\t\t\t\tdirecciones.Puerta, \n\t\t\t\t\tdirecciones.Telefono, \n\t\t\t\t\tdirecciones.Cp, \n\t\t\t\t\tdirecciones.Poblacion, \n\t\t\t\t\tdirecciones.Provincia, \n\t\t\t\t\tdirecciones.Fecha, \n\t\t\t\t\tdirecciones.Comentarios, \n\t\t\t\t\tdirecciones.Activo, \n\t\t\t\t\tusuarios.Dni, \n\t\t\t\t\tproductos.Nombre_Producto\n\t\t\t\t\tFROM ordenes INNER JOIN lineasorden ON ordenes.IdOrden = lineasorden.IdOrden AND ordenes.IdOrden = '\".$ord[$i]['idorden'].\"' AND lineasorden.Id = '\".$ord[$i]['lineaorden'].\"' \";\n\t\t\t\t$SQL .= \"INNER JOIN productos ON lineasorden.IdProducto = productos.IdOferta \";\n\t\t\t\t$SQL .= \"INNER JOIN opcionesoferta ON lineasorden.Talla = opcionesoferta.Id \";\n\t \t\t\t$SQL .= \"INNER JOIN usuarios ON ordenes.IdCliente = usuarios.Id \";\n\t \t\t\t$SQL .= \"INNER JOIN relordendireccion ON ordenes.IdOrden = relordendireccion.IdOrden \";\n\t\t\t\t$SQL .= \"INNER JOIN direcciones ON relordendireccion.IdDireccion = direcciones.IdDireccion AND usuarios.Id = direcciones.D_IdCliente \";\n\t\t\t\t$SQL .= \"WHERE (ordenes.FormaPago = 'contra-rembolso' OR ordenes.FormaPago = 'tarjeta' OR ordenes.FormaPago = 'paypal') \";\n\t\t\t\t$SQL .= \"AND ordenes.EstadoPago = 'ok' AND lineasorden.EstadoPedido != 'Anulado' \";\n\t\t\t\t$SQL .= \"AND ordenes.FechaOrden >= '$fecha1' AND ordenes.FechaOrden <= '$fecha2' \";\n\t\t\t\t$SQL .= $addSQL;\n\t\t\t\t$db->setQuery($SQL);\n\t\t\t\t$row = $db->execute();\n\t\t\t\t\t\n\t\t\t\tif (mysqli_num_rows($row) > 0) {\n\t\t\t\t\t$result1 = $db->loadObject();\n\t\t\t\t\t\t$nomProd_Array = explode(\" \", utf8_encode($result1->Nombre_Producto));\n\t\t\t\t\t\t$nomProducto = $nomProd_Array[0] .\" \".$nomProd_Array[1].\" \".$nomProd_Array[2].\" \".$nomProd_Array[3];\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td height=\"24px\"><label>'.$result1->IdOrden.'</label></td>\n\t\t\t\t\t\t\t\t<td height=\"24px\"><label>'.$result1->FechaOrden.' | '.$result1->Hora.'</label></td>\n\t\t\t\t\t\t\t\t<td height=\"24px\"><label>'.utf8_encode(ucwords(strtolower($result1->Nombres))).' ' .utf8_encode(ucwords(strtolower($result1->Apellidos))).'</label></td>\n\t\t\t\t\t\t\t\t<td height=\"24px\"><label>'.$nomProducto.'...</label></td>\n\t\t\t\t\t\t\t\t<td height=\"24px\">\n\t\t\t\t\t\t\t\t\t<img src=\"'.$web.'/productos/'.$result1->Nombre.'/'.$result1->Images3.'\" width=\"30px\" style=\"border: 1px solid #BDBDBD\" title=\"'.utf8_encode($result1->Nombre_Producto).'\" />\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td height=\"24px\"><label>'.$result1->Cantidad.'</label></td>\n\t\t\t\t\t\t\t\t<td height=\"24px\">';\n\t\t\t\t\t\t\t\t\tif ($result1->OptActiva == 1) echo '<label>'.utf8_encode($result1->Opcion).'</label>';\n\t\t\t\t\t\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td>'.number_format($result1->GastosEnvio,2,',','.').'</td>\n\t\t\t\t\t\t\t\t\t\t<td>'.number_format($result1->Precio,2,',','.').'</td>\n\t\t\t\t\t\t\t\t\t\t<td>'.number_format((($result1->Precio * $result1->Cantidad) + $result1->GastosEnvio),2,',','.').'</td>\t\t\n\t\t\t\t\t\t\t\t\t\t<td>';\n\t\t\t\t\t\t\t\t\t\t\t//VERIFICAMOS QUE LOS IMPORTES DE LA TRANSACCION SEAN CORRECTOS EN LINEASORDEN Y EN ORDEN\n\t\t\t\t\t\t\t\t\t\t\t(int)$valid1 = ($result1->Precio * $result1->Cantidad)*100;\n\t\t\t\t\t\t\t\t\t\t\t(int)$valid2 = ($result1->Subtotal)*100;\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif (number_format($valid1) === number_format($valid2))\n\t\t\t\t\t\t\t\t\t\t\t\t$imagenValid = 'icon_ok.png';\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t$imagenValid = 'icon_error.png';\n\t\t\t\t\t\t\t\t\t\t\techo '\t\n\t\t\t\t\t\t\t\t\t\t\t<img title=\"'.($valid1/100).'&euro; = '.($valid2/100).'&euro;\" src=\"images/'.$imagenValid.'\" />\n\t\t\t\t\t\t\t\t\t\t</td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</tr>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$facturacionSinGastos = $facturacionSinGastos + ($result1->Precio * $result1->Cantidad);\n\t\t\t\t\t\t\t$Gastos = $Gastos + $result1->GastosEnvio;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($result1->EstadoPedido == trim('Devuelto') || $result1->EstadoPedido == trim('No-entregado'))\n\t\t\t\t\t\t\t\t$totalDevolucion = $totalDevolucion + ($result1->Precio * $result1->Cantidad);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$cantidad = $cantidad + $result1->Cantidad;\n\t\t\t\t\t\t\t$array_orders_fecha[] = array('nombres'=>utf8_encode($result1->D_Nombres).' '.utf8_encode($result1->D_Apellidos), 'dni'=>$result1->Dni, 'email'=>$result1->Email,\n\t\t\t\t\t\t\t\t\t\t\t\t 'direccion'=>utf8_encode($result1->TipoVia).' '.utf8_encode($result1->Direccion).','.$result1->TipoNumero.','.utf8_encode($result1->Numero).','.utf8_encode($result1->Piso).\n\t\t\t\t\t\t\t\t\t\t\t\t ','.utf8_encode($result1->Puerta), 'cp'=>$result1->Cp, 'poblacion'=>utf8_encode($result1->Poblacion), 'provincia'=>utf8_encode($result1->Provincia),\n\t\t\t\t\t\t\t\t\t\t\t\t 'telefono'=>utf8_encode($result1->Telefono), 'producto'=>utf8_encode($result1->Nombre_Producto), 'tipo'=>utf8_encode($result1->Opcion),\n\t\t\t\t\t\t\t\t\t\t\t\t 'precio'=>$result1->Precio, 'gastosenvio'=>$result1->GastosEnvio, 'cantidad'=>$result1->Cantidad, 'total'=>$result1->Total, 'referencias'=>$result1->Referencias,\n\t\t\t\t\t\t\t\t\t\t\t\t 'mensaje'=>$result1->Comentarios, 'idorden'=>$result1->IdOrden, 'pesoreal'=>$result1->PesoReal); \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t } \t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\techo '<tr height=\"25px\" style=\"font-size: 14px; font-variant:small-caps;\" >\n\t\t\t\t \t<td bgcolor=\"#1F88A7\"></td><td bgcolor=\"#1F88A7\"></td>\n\t\t\t\t\t<td bgcolor=\"#1F88A7\"></td><td bgcolor=\"#1F88A7\"></td>\n\t\t\t\t\t<td bgcolor=\"#1F88A7\"><strong style=\"font-size:14px; color:#FFF;\">Pedidos</strong></td>\n\t\t\t\t\t<td bgcolor=\"#1F88A7\"><strong style=\"font-size: 14px; color: #FFF\">'.$cantidad.'</strong></td>\n\t\t\t\t\t<td bgcolor=\"#1F88A7\"></td><td bgcolor=\"#1F88A7\"></td>\n\t\t\t\t\t<td bgcolor=\"#1F88A7\"></td><td bgcolor=\"#1F88A7\"></td>\n\t\t\t\t\t<td bgcolor=\"#1F88A7\"></td><td bgcolor=\"#1F88A7\"></td>\n\t\t\t\t </tr><tr><td colspan=\"11\" bgcolor=\"#FFF\">&nbsp;</td></tr>';\n\t\t\t\t \n\t\t\techo '<tr height=\"25px\">\n\t\t\t\t\t<th bgcolor=\"#EBEFF2\"></th>\n\t\t\t\t\t<th bgcolor=\"#EBEFF2\">Descripción</th>\n\t\t\t\t\t<th bgcolor=\"#EBEFF2\">Totales</th>\n\t\t\t\t </tr>\n\t\t\t\t <tr height=\"22px\">\n\t\t\t\t \t<td bgcolor=\"#FFF\"></td>\n\t\t\t\t\t<td bgcolor=\"#FFF\"><label>Facturación sin Gastos</label></td>\n\t\t\t\t\t<td bgcolor=\"#FFF\"><label>'.number_format($facturacionSinGastos,2,',','.').'</label></td>\n\t\t\t\t </tr>\n\t\t\t\t <tr height=\"22px\">\n\t\t\t\t \t<td bgcolor=\"#EBEFF2\"></td>\n\t\t\t\t\t<td bgcolor=\"#EBEFF2\"><label>Gastos de Envío</label></td>\n\t\t\t\t\t<td bgcolor=\"#EBEFF2\">'.number_format($Gastos,2,',','.').'</td>\n\t\t\t\t </tr>\n\t\t\t\t <!--\n\t\t\t\t <tr height=\"22px\">\n\t\t\t\t \t<td bgcolor=\"#EBEFF2\"></td>\n\t\t\t\t\t<td bgcolor=\"#EBEFF2\"><label>Devoluciones</label></td>\n\t\t\t\t\t<td bgcolor=\"#EBEFF2\">'.number_format($totalDevolucion,2,',','.').'</td>\n\t\t\t\t </tr>\n\t\t\t\t -->\n\t\t\t\t <tr height=\"25px\">\n\t\t\t\t \t<td bgcolor=\"#1F88A7\"></td>\n\t\t\t\t\t<th bgcolor=\"#1F88A7\" style=\"color: white\">Total</th>\n\t\t\t\t\t<td bgcolor=\"#1F88A7\" style=\"color: white\">'.number_format((($facturacionSinGastos+$Gastos)-$totalDevolucion),2,',','.').' &euro;</td>\n\t\t\t\t </tr>\n\t\t\t\t ';\n\t\t\t\t\t\t\n\t}", "title": "" }, { "docid": "022321e4d8631e16bad916d4a7833494", "score": "0.6271598", "text": "function informePedidos($db, $comisionPrensa) {\n\t//echo '<tr><td colspan=\"10\"><table cellpadding=\"1\" cellspacing=\"1\" bordercolor=\"#666666\" style=\"border-collapse:collapse;\" class=\"clsTabla\">';\n\techo '<tbody id=\"dataCustomer\">';\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t$fecha1 = $_POST['Fecha1'];\n\t$fecha2 = $_POST['Fecha2'];\n\t\n\t//GUARDAMOS LOS USUARIOS EN UN ARREGLO\n\t$SQL = \"SELECT Usuario FROM administrador\";\n\t$db->setQuery($SQL);\n\t$result = $db->loadObjectList();\n\tforeach($result as $result1) \n\t\t$administradores[] = trim($result1->Usuario);\n\t\t\t\t\t\n\t$SQL = \"SELECT productos.IdOferta, opcionesoferta.Id, SUM(lineasorden.Cantidad) as Unidades, productos.Nombre_Producto \";\n\t$SQL .= \"FROM ordenes \";\n\t$SQL .= \"INNER JOIN lineasorden ON ordenes.IdOrden = lineasorden.IdOrden \";\n\t$SQL .= \"INNER JOIN opcionesoferta ON lineasorden.Talla = opcionesoferta.Id \";\n\t$SQL .= \"INNER JOIN productos ON lineasorden.IdProducto = productos.IdOferta \";\n\t$SQL .= \"WHERE TRIM(ordenes.EstadoPago) = '\".trim('ok').\"' AND TRIM(lineasorden.EstadoPedido) <> '\".trim('Anulado').\"' AND ordenes.FechaOrden >= '$fecha1' AND ordenes.FechaOrden <= '$fecha2' \";\n\t$SQL .= \"GROUP BY opcionesoferta.Id ORDER BY productos.IdOferta ASC\";\n\t$db->setQuery($SQL);\n\t$result = $db->loadObjectList();\n\tforeach($result as $result1) {\n\t\t$arreglo[] = array('IdOferta'=>$result1->IdOferta, 'Tipo'=>$result1->Id);\n\t}\n\t$totalOfertas = count($arreglo);\n\t//print_r($arreglo);\n\t\t\t\t\t\t\t\t\t\n\tfor($i = 0; $i <= $totalOfertas - 1; $i++ ) {\t\t\t\t\t\t\t\n\t\t$SQL = \"SELECT productos.IdOferta, productos.Nombre_Producto, opcionesoferta.Id, opcionesoferta.Opcion, opcionesoferta.Precio, opcionesoferta.PrecioSesion, \";\n\t\t$SQL .= \"opcionesoferta.Iva, SUM(lineasorden.Cantidad) AS Unidades,SUM(lineasorden.Subtotal) as SubTotal, SUM(lineasorden.GastosEnvio) AS GastosEnvio, ordenes.Tramitado \";\n\t\t$SQL .= \"FROM ordenes \";\n\t\t$SQL .= \"INNER JOIN lineasorden ON ordenes.IdOrden = lineasorden.IdOrden \";\n\t\t$SQL .= \"INNER JOIN opcionesoferta ON lineasorden.Talla = opcionesoferta.Id \";\n\t\t$SQL .= \"INNER JOIN productos ON lineasorden.IdProducto = productos.IdOferta \";\n\t\t$SQL .= \"WHERE TRIM(ordenes.EstadoPago) = '\".trim('ok').\"' AND TRIM(lineasorden.EstadoPedido) <> '\".trim('Anulado').\"' AND ordenes.FechaOrden >= '$fecha1' AND ordenes.FechaOrden <= '$fecha2' \";\n\t\t$SQL .= \"AND productos.IdOferta = \".$arreglo[$i]['IdOferta'].\" AND opcionesoferta.Id = \".$arreglo[$i]['Tipo'].\" \";\n\t\t$SQL .= \"GROUP BY opcionesoferta.Id, ordenes.Tramitado ORDER BY productos.IdOferta ASC\";\n\t\t$db->setQuery($SQL);\n\t\t$row = $db->execute();\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t$ordenWeb = 0;\n\t\t$ordenCall = 0;\n\t\t$ordenOfi = 0;\n\t\tif (mysqli_num_rows($row) > 0) {\n\t\t\t$result = $db->loadObjectList();\n\t\t\tforeach($result as $result1) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$ordenTramitada = rtrim($result1->Tramitado);\n\t\t\t\t$totalSubtotal = $totalSubtotal;\n\t\t\t\t\n\t\t\t\t//if ($ordenTramitada == rtrim('call-center')) {\n\t\t\t\tif(in_array($ordenTramitada, $administradores)) {\n\t\t\t\t\tif($ordenTramitada == trim('usuario-web'))\n\t\t\t\t\t\t$ordenWeb = $ordenWeb + $result1->Unidades;\t\n\t\t\t\t\telse if ($ordenTramitada == 'call-center')\n\t\t\t\t\t\t$ordenCall = $ordenCall + $result1->Unidades;\n\t\t\t\t\telse\n\t\t\t\t\t\t$ordenOfi = $ordenOfi + $result1->Unidades;\n\t\t\t\t} else {\n\t\t\t\t\t$errores = $errores + 1;\n\t\t\t\t}\n\t\t\t\t$subtotal = $subtotal + $result1->SubTotal;\n\t\t\t\t$comision = $comision + (($result1->SubTotal) * ($comisionPrensa));\n\t\t\t}\n\t\t\t$totalOrdersCall = $totalOrdersCall + $ordenCall;\n\t\t\t$totalOrdersWeb = $totalOrdersWeb + $ordenWeb;\t\n\t\t\t$totalOrdersOfi = $totalOrdersOfi + $ordenOfi;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t$facturacion = ($ordenCall + $ordenWeb + $ordenOfi)*$result1->Precio;\n\t\t\techo '\n\t\t\t\t<tr height=\"20px\">\n\t\t\t\t\t<td width=\"50px\"><label>'.$result1->IdOferta.'</label></td>\n\t\t\t\t\t<td width=\"300px\"><label>'.utf8_encode($result1->Nombre_Producto).'</label></td>\n\t\t\t\t\t<td width=\"150px\"><label>'.utf8_encode($result1->Opcion).'</label></td>\n\t\t\t\t\t<td width=\"100px\"><label>'.$ordenOfi.'</label></td>\n\t\t\t\t\t<td width=\"100px\"><label>'.$ordenCall.'</label></td>\n\t\t\t\t\t<td width=\"100px\"><label>'.$ordenWeb.'</label></td>\n\t\t\t\t\t<td width=\"100px\"><label>'.($ordenCall + $ordenWeb + $ordenOfi).'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format($result1->Precio,2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"75px\" bgcolor=\"#71BA00\"><label style=\"color: white; font-family: tahoma\">'.number_format($result1->PrecioSesion,2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"100px\"><label>'.number_format($facturacion,2,',', '').'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format((($facturacion)*($comisionPrensa)),2,',','').'</label></td>\n\t\t\t\t</tr>\n\t\t\t';\t\t\t\n\t\t} \n\t}\n\t\n\t$graphInforme[] = array('fact_total'=>$subtotal, 'aport_bruta'=>$aportBruta, 'comision_patner'=>$comision, 'aport_neta'=>$aportNeta);\n\t\n\techo '\n\t\t</tbody>\n\t\t<tfoot style=\"color: white; font-size: 14px; font-variant:small-caps; background: #1F88A7\">\n \t<tr height=\"30px\" style=\"color: white; font-size: 14px; font-variant:small-caps;\">\n\t\t\t\t<td bgcolor=\"#1F88A7\"></td>\n \t<td bgcolor=\"#1F88A7\" align=\"center\"><span>TOTALES</span></td>\n\t\t\t\t<td bgcolor=\"#1F88A7\"></td>\n\t\t\t\t<td bgcolor=\"#1F88A7\"><span>'.$totalOrdersOfi.'</span></td>\n <td bgcolor=\"#1F88A7\"><span>'.$totalOrdersCall.'</span></td>\n <td bgcolor=\"#1F88A7\"><span>'.$totalOrdersWeb.'</span></td>\n <td bgcolor=\"#1F88A7\"><span>'.($totalOrdersWeb + $totalOrdersCall + $totalOrdersOfi).'</span></td>\n <td bgcolor=\"#1F88A7\"></td><td bgcolor=\"#1F88A7\"></td>\n \t <td bgcolor=\"#1F88A7\"><span>'.number_format($subtotal,2,',','.').'</span></td>\n <td bgcolor=\"#1F88A7\"><span>'.number_format($comision,2,',','.').'</span></td>\n \t</tr>\n\t </tfoot>\t\n\t';\n\techo '</table></td></tr>';\n\tprint_r($err);\n\t\n\treturn $graphInforme;\n}", "title": "" }, { "docid": "9b69a1f40cf457aaee7124697bb2f745", "score": "0.6265054", "text": "function consultarEstudiante() {\r\n //$nivelDocente = $this->nivel;\r\n \r\n \r\n if($this->nivel!=80){\r\n $this->mostrarEnlaceRegresar(); \r\n }\r\n $this->datosEstudiante= $this->consultarDatosEstudiante((isset($_REQUEST['codEstudiante'])?$_REQUEST['codEstudiante']:''));\r\n //$this->datosDocente= $this->buscarDatosDocente($codDocente);\r\n\r\n\r\n if (is_array($this->datosEstudiante)) {\r\n $this->mostrarDatosEstudiante();\r\n $reglamentoEstudiante = $this->consultarReglamentoEstudiante($this->datosEstudiante['CODIGO']); \r\n if($this->datosEstudiante['NIVEL']=='PREGRADO'){\r\n $this->mostrarReglamentoEstudiante($reglamentoEstudiante,$this->datosEstudiante['ESTADO']);\r\n }\r\n $this->espaciosCursados= $this->buscarNotasDefinitivas();\r\n $notaAprobatoria=$this->consultarNotaAprobatoria();\r\n $this->espaciosAprobados= $this->buscarEspaciosAprobados($notaAprobatoria,$this->espaciosCursados);\r\n $this->espaciosReprobados= $this->buscarEspaciosReprobados($notaAprobatoria,$this->espaciosCursados);\r\n $espaciosCursadosSinAprobar=$this->buscarEspaciosCursadosSinAprobar();\r\n if(is_array($espaciosCursadosSinAprobar)){\r\n $datosEspaciosReprobados=$this->buscarDatosEspaciosReprobados($espaciosCursadosSinAprobar,$this->espaciosCursados);\r\n $this->mostrarEnacabezadoEspaciosPerdidos();\r\n $this->mostrarEspaciosReprobados($datosEspaciosReprobados); \r\n }\r\n else{\r\n $this->mostrarEnacabezadoEspaciosPerdidos();\r\n ?>\r\n <table class='sigma centrar' width=\"100%\">\r\n <tr class='centrar'>\r\n <td class='sigma centrar'>\r\n <b>ACTUALMENTE NO TIENE ESPACIOS ACADEMICOS REPROBADOS</b>\r\n </td>\r\n </tr>\r\n </table>\r\n <?\r\n }\r\n $this->mostrarHorarioEstudiante();\r\n $this->mostrarNotasParciales(); \r\n $this->mostrarEnacabezadoNotasDefinitivas();\r\n $this->mostrarNotasDefinitivas($this->espaciosCursados);\r\n?>\r\n\r\n\r\n<?\r\n } else {\r\n?>\r\n <table class=\"contenidotabla centrar\">\r\n <tr>\r\n <td class=\"cuadro_brownOscuro centrar\">\r\n NO SE ENCONTRARON LOS DATOS DEL ESTUDIANTE!\r\n </td>\r\n </tr>\r\n </table>\r\n<?\r\n }\r\n }", "title": "" }, { "docid": "94f4017370c249ac75711f861a34536d", "score": "0.6257403", "text": "function expositores_salva(){\n global $db;\n $_SESSION['dados']['titulo']='Erro - Verifique Dados';\n $_SESSION['view']='list';\n $pr[':NID']=filter_input(INPUT_POST, 'nId', FILTER_SANITIZE_NUMBER_INT);\n $pr[':CNAME']=filter_input(INPUT_POST, 'cName', FILTER_SANITIZE_STRING);\n $pr[':CADDRESS']=filter_input(INPUT_POST, 'cAddress', FILTER_SANITIZE_STRING);\n $pr[':CCOUNTRY']=filter_input(INPUT_POST, 'cCountry', FILTER_SANITIZE_STRING);\n $pr[':CPOSTCODE']=filter_input(INPUT_POST, 'cPostCode', FILTER_SANITIZE_STRING);\n $pr[':CPHONE1']=filter_input(INPUT_POST, 'cPhone1', FILTER_SANITIZE_STRING);\n $pr[':CPHONE2']=filter_input(INPUT_POST, 'cPhone2', FILTER_SANITIZE_STRING);\n $pr[':CEMAIL']=filter_input(INPUT_POST, 'cEmail', FILTER_SANITIZE_STRING);\n $pr[':CWEB']=filter_input(INPUT_POST, 'cWeb', FILTER_SANITIZE_STRING);\n $pr[':EPERSON']=filter_input(INPUT_POST, 'ePerson', FILTER_UNSAFE_RAW,FILTER_DEFAULT);\n $pr[':CPERSONALNAME']=filter_input(INPUT_POST, 'cPersonalName', FILTER_SANITIZE_STRING);\n $pr[':CCARGO']=filter_input(INPUT_POST, 'cCargo', FILTER_SANITIZE_STRING);\n $pr[':CPERSONALEMAIL']=filter_input(INPUT_POST, 'cPersonalEmail', FILTER_SANITIZE_STRING);\n $pr[':CPERSONALPHONE']=filter_input(INPUT_POST, 'cPersonalPhone', FILTER_SANITIZE_STRING);\n $pr[':NBUSINESSTYPE']=filter_input(INPUT_POST, 'nBusinessType', FILTER_SANITIZE_NUMBER_INT);\n $pr[':NBUSINESSTYPEOTHER']=filter_input(INPUT_POST, 'nBusinessTypeOther', FILTER_SANITIZE_STRING);\n $pr[':NBLI']=filter_input(INPUT_POST, 'nBLI', FILTER_SANITIZE_STRING);\n $pr[':DBLI']=filter_input(INPUT_POST, 'dBLI', FILTER_UNSAFE_RAW,FILTER_DEFAULT);\n $pr[':CVAT']=filter_input(INPUT_POST, 'cVAT', FILTER_SANITIZE_STRING);\n $pr[':CCNR']=filter_input(INPUT_POST, 'cCNR', FILTER_SANITIZE_STRING);\n $pr[':CTAXID']=filter_input(INPUT_POST, 'cTaxID', FILTER_SANITIZE_STRING);\n $pr[':CTAXADDR']=filter_input(INPUT_POST, 'cTaxAddr', FILTER_SANITIZE_STRING);\n $pr[':CCOUNTRYR']=filter_input(INPUT_POST, 'cCountryR', FILTER_SANITIZE_STRING);\n $pr[':PHONE1R']=filter_input(INPUT_POST, 'Phone1R', FILTER_SANITIZE_STRING);\n $pr[':MAILR']=filter_input(INPUT_POST, 'MailR', FILTER_SANITIZE_STRING);\n $pr[':SI_1']=implode(';',filter_var_array($_POST['SI_1'],FILTER_SANITIZE_NUMBER_INT));\n $pr[':SL_2']=implode(';',filter_var_array($_POST['SL_1'],FILTER_SANITIZE_NUMBER_INT));\n $pr[':SL_3']=implode(';',filter_var_array($_POST['SL_3'],FILTER_SANITIZE_NUMBER_INT));\n $pr[':SL_4']=implode(';',filter_var_array($_POST['SL_4'],FILTER_SANITIZE_NUMBER_INT));\n $pr[':SL_5']=implode(';',filter_var_array($_POST['SL_5'],FILTER_SANITIZE_NUMBER_INT));\n $pr[':SL_6']=implode(';',filter_var_array($_POST['SL_6'],FILTER_SANITIZE_NUMBER_INT));\n $pr[':CCOUNTRYMK1']=filter_input(INPUT_POST, 'cCountryMk1', FILTER_SANITIZE_STRING);\n $pr[':CCOUNTRYMK2']=filter_input(INPUT_POST, 'cCountryMk2', FILTER_SANITIZE_STRING);\n $pr[':CCOUNTRYMK3']=filter_input(INPUT_POST, 'cCountryMk3', FILTER_SANITIZE_STRING);\n $pr[':TDESCRIPTION']=filter_input(INPUT_POST, 'tDescription', FILTER_SANITIZE_STRING);\n $pr[':SI_1_OUTROS']=filter_input(INPUT_POST, 'SI_1_outros', FILTER_SANITIZE_STRING);\n $pr[':SL_2_OUTROS']=filter_input(INPUT_POST, 'SL_2_outros', FILTER_SANITIZE_STRING);\n $pr[':SL_3_OUTROS']=filter_input(INPUT_POST, 'SL_3_outros', FILTER_SANITIZE_STRING);\n $pr[':SL_4_OUTROS']=filter_input(INPUT_POST, 'SL_4_outros', FILTER_SANITIZE_STRING);\n $pr[':SL_5_OUTROS']=filter_input(INPUT_POST, 'SL_5_outros', FILTER_SANITIZE_STRING);\n $pr[':SL_6_OUTROS']=filter_input(INPUT_POST, 'SL_6_outros', FILTER_SANITIZE_STRING);\n //FAZ AS VERIFICAÇÕES \n $r=SqlQuery(\"SELECT cName, nId from expositores where cName='\".$pr[':CNAME'].\"' and nId<>'\".$pr[':NID'].\"' limit 1\");\n if($r->rowCount()>0){\n //se JÁ EXISTE wNome\n $_SESSION['view']='form';\n $_SESSION['erro_no']=2;\n $_SESSION['erro']='<h3>NÃO SALVO</h3>Já existe um expositores com estes dados cadastrados, tente novamente - cName';\n return array_merge(expositores_novo(),$_SESSION['dados']);\n }\n $r=SqlQuery(\"SELECT cEmail, nId from expositores where cEmail='\".$pr[':CEMAIL'].\"' and nId<>'\".$pr[':NID'].\"' limit 1\");\n if($r->rowCount()>0){\n //se JÁ EXISTE cEmail\n $_SESSION['view']='form';\n $_SESSION['erro_no']=2;\n $_SESSION['erro']='<h3>NÃO SALVO</h3>Já existe um expositores com estes dados cadastrados, tente novamente - cEmail';\n return array_merge(expositores_novo(),$_SESSION['dados']);\n }\n $r=SqlQuery(\"SELECT cWeb, nId from expositores where cWeb='\".$pr[':CWEB'].\"' and nId<>'\".$pr[':NID'].\"' limit 1\");\n if($r->rowCount()>0){\n //se JÁ EXISTE cWeb\n $_SESSION['view']='form';\n $_SESSION['erro_no']=2;\n $_SESSION['erro']='<h3>NÃO SALVO</h3>Já existe um expositores com estes dados cadastrados, tente novamente - cWeb';\n return array_merge(expositores_novo(),$_SESSION['dados']);\n }\n $r=SqlQuery(\"SELECT cPersonalName, nId from expositores where cPersonalName='\".$pr[':CPERSONALNAME'].\"' and nId<>'\".$pr[':NID'].\"' limit 1\");\n if($r->rowCount()>0){\n //se JÁ EXISTE cPersonalName\n $_SESSION['view']='form';\n $_SESSION['erro_no']=2;\n $_SESSION['erro']='<h3>NÃO SALVO</h3>Já existe um expositores com estes dados cadastrados, tente novamente - cPersonalName';\n return array_merge(expositores_novo(),$_SESSION['dados']);\n }\n $r=SqlQuery(\"SELECT nBLI, nId from expositores where nBLI='\".$pr[':NBLI'].\"' and nId<>'\".$pr[':NID'].\"' limit 1\");\n if($r->rowCount()>0){\n //se JÁ EXISTE nBLI\n $_SESSION['view']='form';\n $_SESSION['erro_no']=2;\n $_SESSION['erro']='<h3>NÃO SALVO</h3>Já existe um expositores com estes dados cadastrados, tente novamente - nBLI';\n return array_merge(expositores_novo(),$_SESSION['dados']);\n }\n $r=SqlQuery(\"SELECT cVAT, nId from expositores where cVAT='\".$pr[':CVAT'].\"' and nId<>'\".$pr[':NID'].\"' limit 1\");\n if($r->rowCount()>0){\n //se JÁ EXISTE cVAT\n $_SESSION['view']='form';\n $_SESSION['erro_no']=2;\n $_SESSION['erro']='<h3>NÃO SALVO</h3>Já existe um expositores com estes dados cadastrados, tente novamente - cVAT';\n return array_merge(expositores_novo(),$_SESSION['dados']);\n }\n if(filter_var($_SESSION['route'][2])==0){\n // SE 0 INSERT\n $sql=\"INSERT into expositores (nId ,cName ,cAddress ,cCountry ,cPostCode ,cPhone1 ,cPhone2 ,cEmail ,cWeb ,ePerson ,cPersonalName ,cCargo ,cPersonalEmail ,cPersonalPhone ,nBusinessType ,nBusinessTypeOther ,nBLI ,dBLI ,aBLI ,cVAT ,aVAT ,aLogo ,cCNR ,cTaxID ,cTaxAddr ,cCountryR ,Phone1R ,MailR ,SI_1 ,SL_2 ,SL_3 ,SL_4 ,SL_5 ,SL_6 ,cCountryMk1 ,cCountryMk2 ,cCountryMk3 ,tDescription ,SI_1_ourtros ,SL_2_outros ,SL_3_outros ,SL_4_outros ,SL_5_outros ,SL_6_outros, cPassw) values ('', '\".$pr[':CNAME'].\"', '\".$pr[':CADDRESS'].\"', '\".$pr[':CCOUNTRY'].\"', '\".$pr[':CPOSTCODE'].\"', '\".$pr[':CPHONE1'].\"', '\".$pr[':CPHONE2'].\"', '\".$pr[':CEMAIL'].\"', '\".$pr[':CWEB'].\"', '\".$pr[':EPERSON'].\"', '\".$pr[':CPERSONALNAME'].\"', '\".$pr[':CCARGO'].\"', '\".$pr[':CPERSONALEMAIL'].\"', '\".$pr[':CPERSONALPHONE'].\"', '\".$pr[':NBUSINESSTYPE'].\"', '\".$pr[':NBUSINESSTYPEOTHER'].\"', '\".$pr[':NBLI'].\"', '\".$pr[':DBLI'].\"', '\".$pr[':ABLI'].\"', '\".$pr[':CVAT'].\"', '\".$pr[':AVAT'].\"', '\".$pr[':ALOGO'].\"', '\".$pr[':CCNR'].\"', '\".$pr[':CTAXID'].\"', '\".$pr[':CTAXADDR'].\"', '\".$pr[':CCOUNTRYR'].\"', '\".$pr[':PHONE1R'].\"', '\".$pr[':MAILR'].\"', '\".$pr[':SI_1'].\"', '\".$pr[':SL_2'].\"', '\".$pr[':SL_3'].\"', '\".$pr[':SL_4'].\"', '\".$pr[':SL_5'].\"', '\".$pr[':SL_6'].\"', '\".$pr[':CCOUNTRYMK1'].\"', '\".$pr[':CCOUNTRYMK2'].\"', '\".$pr[':CCOUNTRYMK3'].\"', '\".$pr[':TDESCRIPTION'].\"', '\".$pr[':SI_1_OUTROS'].\"', '\".$pr[':SL_2_OUTROS'].\"', '\".$pr[':SL_3_OUTROS'].\"', '\".$pr[':SL_4_OUTROS'].\"', '\".$pr[':SL_5_OUTROS'].\"', '\".$pr[':SL_6_OUTROS'].\"', '\".$pr[':CPASSW'].\"')\";\n $r=SqlQuery($sql);\n $IID=$db->lastInsertId();\n } else {\n // SE >0 UPDATE\n $sql=\"UPDATE expositores set cName='\".$pr[':CNAME'].\"', cAddress='\".$pr[':CADDRESS'].\"', cCountry='\".$pr[':CCOUNTRY'].\"', cPostCode='\".$pr[':CPOSTCODE'].\"', cPhone1='\".$pr[':CPHONE1'].\"', cPhone2='\".$pr[':CPHONE2'].\"', cEmail='\".$pr[':CEMAIL'].\"', cWeb='\".$pr[':CWEB'].\"', ePerson='\".$pr[':EPERSON'].\"', cPersonalName='\".$pr[':CPERSONALNAME'].\"', cCargo='\".$pr[':CCARGO'].\"', cPersonalEmail='\".$pr[':CPERSONALEMAIL'].\"', cPersonalPhone='\".$pr[':CPERSONALPHONE'].\"', nBusinessType='\".$pr[':NBUSINESSTYPE'].\"', nBusinessTypeOther='\".$pr[':NBUSINESSTYPEOTHER'].\"', nBLI='\".$pr[':NBLI'].\"', dBLI='\".$pr[':DBLI'].\"', cVAT='\".$pr[':CVAT'].\"', cCNR='\".$pr[':CCNR'].\"', cTaxID='\".$pr[':CTAXID'].\"', cTaxAddr='\".$pr[':CTAXADDR'].\"', cCountryR='\".$pr[':CCOUNTRYR'].\"', Phone1R='\".$pr[':PHONE1R'].\"', MailR='\".$pr[':MAILR'].\"', SI_1='\".$pr[':SI_1'].\"', SL_2='\".$pr[':SL_2'].\"', SL_3='\".$pr[':SL_3'].\"', SL_4='\".$pr[':SL_4'].\"', SL_5='\".$pr[':SL_5'].\"', SL_6='\".$pr[':SL_6'].\"', cCountryMk1='\".$pr[':CCOUNTRYMK1'].\"', cCountryMk2='\".$pr[':CCOUNTRYMK2'].\"', cCountryMk3='\".$pr[':CCOUNTRYMK3'].\"', tDescription='\".$pr[':TDESCRIPTION'].\"', SI_1_ourtros='\".$pr[':SI_1_OUTROS'].\"', SL_2_outros='\".$pr[':SL_2_OUTROS'].\"', SL_3_outros='\".$pr[':SL_3_OUTROS'].\"', SL_4_outros='\".$pr[':SL_4_OUTROS'].\"', SL_5_outros='\".$pr[':SL_5_OUTROS'].\"', SL_6_outros='\".$pr[':SL_6_OUTROS'].\"' where nId='\".$pr[':NID'].\"' limit 1\";\n $r=SqlQuery($sql);\n $IID=$pr[':NID'];\n }\n $_SESSION['view']='list';\n $_SESSION['erro_no']=1;\n $_SESSION['erro']='<h3>SALVO COM SUCESSO</h3>expositores ID:'.$IID;\n return expositores_list();\n}", "title": "" }, { "docid": "1fe13f14c8283f98d3308ec417387c2d", "score": "0.62522495", "text": "public static function mdlConsultarNotas($idAsignatura, $idCurso)\n {\n\n\n $concatenar = \"\";\n\n $objRespuestaNombreNotas = notaModelo::cargarNotas($idAsignatura, $idCurso);\n $objPerido = new notaModelo;\n $periodo = $objPerido->retornarIdPeriodo();\n\n\n if($periodo==false){\n\n $mensaje=\"No se ha realizado la creacion del periodo\";\n return $mensaje;\n\n\n\n }else{\n\n $idPeriodo = $periodo[0][0];\n\n\n }\n\n\n \n $ciclosNotas = count($objRespuestaNombreNotas);\n $contado = 0;\n\n\n\n foreach ($objRespuestaNombreNotas as $key => $value) {\n\n if ($contado + 1 != $ciclosNotas) {\n $concatenar .= \"sum(case when Nnota ='\" . $value[\"nombreNota\"] . \"' then Calificacion else 0 end )as '\" . $value[\"nombreNota\"] . \"',\";\n } else {\n $concatenar .= \"sum(case when Nnota ='\" . $value[\"nombreNota\"] . \"' then Calificacion else 0 end )as '\" . $value[\"nombreNota\"] . \"'\";\n }\n $contado++;\n }\n\n\n $objConsultaNotas = conexion::conectar()->prepare(\"select idAsignaturaNota, idCursoF,idAsignaturaF,cod_Estudiante, Nombre,Apellidos,\" . $concatenar . \" from (select asignaturanota.idAsignaturaNota as idAsignaturaNota, nota.idCurso as idCursoF ,asignatura.idasignatura as idAsignaturaF,estudiante.idEstudiante as cod_Estudiante, estudiante.nombres as Nombre,estudiante.apellidos as Apellidos,asignatura.nombreAsignatura as Asignatura,nota.nombreNota as Nnota,asignaturanota.nota as Calificacion from asignaturanota inner join estudiante on asignaturanota.idEstudiante=estudiante.idEstudiante inner join nota on asignaturanota.idNota=nota.idNota inner join asignatura on nota.idAsignatura=asignatura.idAsignatura where nota.idCurso=\" . $idCurso . \" and nota.idAsignatura=\" . $idAsignatura . \" and nota.idPeriodo=\" . $idPeriodo . \") as tb group by Nombre \");\n\n try {\n $objConsultaNotas->execute();\n\n $lista = $objConsultaNotas->fetchAll();\n $objConsultaNotas = null;\n\n return $lista;\n } catch (Exception $e) {\n $nada = \"No hay notas\";\n\n return $nada;\n }\n }", "title": "" }, { "docid": "3dc212dbd9c2541cdbaa1f9e110a009f", "score": "0.62520313", "text": "static public function mdlIngresarVenta($tabla, $datos){\r\n\t\t$pdo = Conexion::conectar();\r\n\t\t$pdo->beginTransaction();\r\n\r\n\t\t$stmt = $pdo->prepare(\"INSERT INTO $tabla(codigo, id_cliente, id_vendedor, productos, impuesto, neto, total, metodo_pago) VALUES (:codigo, :id_cliente, :id_vendedor, :productos, :impuesto, :neto, :total, :metodo_pago)\");\r\n\t\t$stmt->bindParam(\":codigo\", $datos[\"codigo\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":id_cliente\", $datos[\"id_cliente\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":id_vendedor\", $datos[\"id_vendedor\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":productos\", $datos[\"productos\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":impuesto\", $datos[\"impuesto\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":neto\", $datos[\"neto\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":total\", $datos[\"total\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":metodo_pago\", $datos[\"metodo_pago\"], PDO::PARAM_STR);\r\n\r\n\t\t// ES UNA VENTA A CREDITO\r\n\t\tif (isset($datos['financiamiento'])) {\r\n\t\t\tif ($stmt->execute()) {\r\n\t\t\t\t$id_venta = $pdo->lastInsertId();\r\n\t\t\t\t$financiamiento = $datos['financiamiento'];\r\n\t\t\t\t$stmt2 = $pdo->prepare(\"INSERT INTO ventas_credito(id_venta, metodo_pago_inicial, codigo_transaccion, monto_pago_inicial, monto_financiado, monto_cada_pago, frecuencia_pagos, cantidad_pagos, fecha_primer_pago) VALUES (:id_venta, :metodo_pago_inicial, :codigo_transaccion, :monto_pago_inicial, :monto_financiado, :monto_cada_pago, :frecuencia_pagos, :cantidad_pagos, :fecha_primer_pago)\");\r\n\t\t\t\t\r\n\t\t\t\t$stmt2->bindParam(\":id_venta\", $id_venta, PDO::PARAM_INT);\r\n\t\t\t\t$stmt2->bindParam(\":metodo_pago_inicial\", $financiamiento[\"metodo_pago_inicial\"], PDO::PARAM_STR);\r\n\t\t\t\t$stmt2->bindParam(\":codigo_transaccion\", $financiamiento[\"codigo_transaccion\"], PDO::PARAM_STR);\r\n\t\t\t\t$stmt2->bindParam(\":monto_pago_inicial\", $financiamiento[\"monto_pago_inicial\"], PDO::PARAM_STR);\r\n\t\t\t\t$stmt2->bindParam(\":monto_financiado\", $financiamiento[\"monto_financiado\"], PDO::PARAM_STR);\r\n\t\t\t\t$stmt2->bindParam(\":monto_cada_pago\", $financiamiento[\"monto_cada_pago\"], PDO::PARAM_STR);\r\n\t\t\t\t$stmt2->bindParam(\":frecuencia_pagos\", $financiamiento[\"frecuencia_pagos\"], PDO::PARAM_STR);\r\n\t\t\t\t$stmt2->bindParam(\":cantidad_pagos\", $financiamiento[\"cantidad_pagos\"], PDO::PARAM_INT);\r\n\t\t\t\t$stmt2->bindParam(\":fecha_primer_pago\", $financiamiento[\"fecha_primer_pago\"], PDO::PARAM_STR);\r\n\t\t\t\t\r\n\t\t\t\tif (!$stmt2->execute()) {\r\n\t\t\t\t\t$pdo->rollback();\r\n\t\t\t\t\t$error = $stmt2->errorInfo();\r\n\t\t\t\t\treturn \"Error (1): ({$error[0]} - {$error[1]}) {$error[2]}\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$id_venta_credito = $pdo->lastInsertId();\r\n\t\t\t\t\tfor ($i = 0; $i < $financiamiento[\"cantidad_pagos\"]; $i++) {\r\n\t\t\t\t\t\t$stmt_pagos = $pdo->prepare(\"INSERT INTO ventas_credito_pagos(\r\n\t\t\t\t\t\t\tid_venta_credito,\r\n\t\t\t\t\t\t\tmonto,\r\n\t\t\t\t\t\t\tfecha_cobro_original\r\n\t\t\t\t\t\t) VALUES (\r\n\t\t\t\t\t\t\t:id_venta_credito,\r\n\t\t\t\t\t\t\t:monto,\r\n\t\t\t\t\t\t\t:fecha_cobro_original\r\n\t\t\t\t\t\t)\");\r\n\r\n\t\t\t\t\t\tif ($i == 0) {\r\n\t\t\t\t\t\t\t$fecha_cobro_original = $financiamiento['fecha_primer_pago'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t$dias = '';\r\n\t\t\t\t\t\t\tif ($financiamiento['frecuencia_pagos'] == 'semanal') {\r\n\t\t\t\t\t\t\t\t$dias = '+7 day';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif ($financiamiento['frecuencia_pagos'] == 'quincenal') {\r\n\t\t\t\t\t\t\t\t$dias = '+14 day';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif ($financiamiento['frecuencia_pagos'] == 'mensual') {\r\n\t\t\t\t\t\t\t\t$dias = '+28 day';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$fecha_cobro_original = strtotime($dias, strtotime($fecha_cobro_original));;\r\n\t\t\t\t\t\t\t$fecha_cobro_original = date('Y-m-d', $fecha_cobro_original);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$stmt_pagos->bindParam(\":id_venta_credito\", $id_venta_credito, PDO::PARAM_INT);\r\n\t\t\t\t\t\t$stmt_pagos->bindParam(\":monto\", $financiamiento['monto_cada_pago'], PDO::PARAM_STR);\r\n\t\t\t\t\t\t$stmt_pagos->bindParam(\":fecha_cobro_original\", $fecha_cobro_original, PDO::PARAM_STR);\r\n\t\t\t\t\t\tif (!$stmt_pagos->execute()) {\r\n\t\t\t\t\t\t\t$pdo->rollback();\r\n\t\t\t\t\t\t\t$error = $stmt_pagos->errorInfo();\r\n\t\t\t\t\t\t\treturn \"Error (2): ({$error[0]} - {$error[1]}) {$error[2]}\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$pdo->commit();\r\n\t\t\t\t\treturn \"ok\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$pdo->rollback();\r\n\t\t\t\t$error = $stmt->errorInfo();\r\n\t\t\t\treturn \"Error (3): ({$error[0]} - {$error[1]}) {$error[2]}\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ($stmt->execute()) {\r\n\t\t\t\t$pdo->commit();\r\n\t\t\t\treturn \"ok\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$pdo->rollback();\r\n\t\t\t$error = $stmt->errorInfo();\r\n\t\t\treturn \"Error (4): ({$error[0]} - {$error[1]}) {$error[2]}\";\r\n\t\t}\r\n\r\n\t\t$stmt->close();\r\n\t\t$stmt = null;\r\n\r\n\t}", "title": "" }, { "docid": "bd55390799f61e1ec0c55f365b1c72fc", "score": "0.62392104", "text": "function informePedidos($db, $comisionPrensa) {\n\techo '<tr><td colspan=\"10\"><table cellpadding=\"1\" cellspacing=\"1\" bordercolor=\"#666666\" style=\"border-collapse:collapse;\">';\n\techo '<tbody id=\"dataCustomer\">';\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t$fecha1 = $_POST['Fecha1'];\n\t$fecha2 = $_POST['Fecha2'];\n\t\n\t//GUARDAMOS LOS USUARIOS EN UN ARREGLO\n\t$SQL = \"SELECT Usuario FROM administrador\";\n\t$db->setQuery($SQL);\n\t$result = $db->loadObjectList();\n\tforeach($result as $result1) \n\t\t$administradores[] = trim($result1->Usuario);\n\t\t\t\t\t\n\t$SQL = \"SELECT productos.IdOferta, opcionesoferta.Id, SUM(lineasorden.Cantidad) as Unidades, productos.Nombre_Producto \";\n\t$SQL .= \"FROM ordenes \";\n\t$SQL .= \"INNER JOIN lineasorden ON ordenes.IdOrden = lineasorden.IdOrden \";\n\t$SQL .= \"INNER JOIN opcionesoferta ON lineasorden.Talla = opcionesoferta.Id \";\n\t$SQL .= \"INNER JOIN productos ON lineasorden.IdProducto = productos.IdOferta \";\n\t$SQL .= \"WHERE TRIM(ordenes.EstadoPago) = '\".trim('ok').\"' AND TRIM(lineasorden.EstadoPedido) <> '\".trim('Anulado').\"' AND ordenes.FechaOrden >= '$fecha1' AND ordenes.FechaOrden <= '$fecha2' \";\n\t$SQL .= \"GROUP BY opcionesoferta.Id ORDER BY productos.IdOferta ASC\";\n\t$db->setQuery($SQL);\n\t$result = $db->loadObjectList();\n\tforeach($result as $result1) {\n\t\t$arreglo[] = array('IdOferta'=>$result1->IdOferta, 'Tipo'=>$result1->Id);\n\t}\n\t$totalOfertas = count($arreglo);\n\t//print_r($arreglo);\n\t\t\t\t\t\t\t\t\t\n\tfor($i = 0; $i <= $totalOfertas - 1; $i++ ) {\t\t\t\t\t\t\t\t\n\t\t$SQL = \"SELECT productos.IdOferta, productos.Nombre_Producto, opcionesoferta.Id, opcionesoferta.Opcion, opcionesoferta.Precio, opcionesoferta.PrecioSesion, \";\n\t\t$SQL .= \"opcionesoferta.Iva, SUM(lineasorden.Cantidad) AS Unidades,SUM(lineasorden.Subtotal) as SubTotal, SUM(lineasorden.GastosEnvio) AS GastosEnvio, ordenes.Tramitado \";\n\t\t$SQL .= \"FROM ordenes \";\n\t\t$SQL .= \"INNER JOIN lineasorden ON ordenes.IdOrden = lineasorden.IdOrden \";\n\t\t$SQL .= \"INNER JOIN opcionesoferta ON lineasorden.Talla = opcionesoferta.Id \";\n\t\t$SQL .= \"INNER JOIN productos ON lineasorden.IdProducto = productos.IdOferta \";\n\t\t$SQL .= \"WHERE TRIM(ordenes.EstadoPago) = '\".trim('ok').\"' AND TRIM(lineasorden.EstadoPedido) <> '\".trim('Anulado').\"' AND ordenes.FechaOrden >= '$fecha1' AND ordenes.FechaOrden <= '$fecha2' AND productos.IdOferta = \".$arreglo[$i]['IdOferta'].\" AND opcionesoferta.Id = \".$arreglo[$i]['Tipo'].\" \";\n\t\t$SQL .= \"GROUP BY opcionesoferta.Id, ordenes.Tramitado ORDER BY productos.IdOferta ASC\";\n\t\t$db->setQuery($SQL);\n\t\t$row = $db->execute();\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t$ordenWeb = 0;\n\t\t$ordenCall = 0;\n\t\tif (mysqli_num_rows($row) > 0) {\n\t\t\t$result = $db->loadObjectList();\n\t\t\tforeach($result as $result1) {\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$ordenTramitada = rtrim($result1->Tramitado);\n\t\t\t\t$totalSubtotal = $totalSubtotal;\n\t\t\t\t\n\t\t\t\t//if ($ordenTramitada == rtrim('call-center')) {\n\t\t\t\tif(in_array($ordenTramitada, $administradores)) {\n\t\t\t\t\tif($ordenTramitada == trim('usuario-web'))\n\t\t\t\t\t\t$ordenWeb = $ordenWeb + $result1->Unidades;\t\n\t\t\t\t\telse \n\t\t\t\t\t\t$ordenCall = $ordenCall + $result1->Unidades;\n\t\t\t\t} else {\n\t\t\t\t\t$errores = $errores + 1;\n\t\t\t\t}\n\t\t\t\t$subtotal = $subtotal + $result1->SubTotal;\n\t\t\t\t$comision = $comision + ($result1->SubTotal* ($comisionPrensa));\n\t\t\t}\n\t\t\t$totalOrdersCall = $totalOrdersCall + $ordenCall;\n\t\t\t$totalOrdersWeb = $totalOrdersWeb + $ordenWeb;\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t$facturacion = ($ordenCall + $ordenWeb)*$result1->Precio;\n\t\t\techo '\n\t\t\t\t<tr height=\"20px\">\n\t\t\t\t\t<td width=\"50px\"><label>'.$result1->IdOferta.'</label></td>\n\t\t\t\t\t<td width=\"300px\"><label>'.utf8_encode($result1->Nombre_Producto).'</label></td>\n\t\t\t\t\t<td width=\"150px\"><label>'.utf8_encode($result1->Opcion).'</label></td>\n\t\t\t\t\t<td width=\"100px\"><label>'.$ordenCall.'</label></td>\n\t\t\t\t\t<td width=\"100px\"><label>'.$ordenWeb.'</label></td>\n\t\t\t\t\t<td width=\"100px\"><label>'.($ordenCall + $ordenWeb).'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format($result1->Precio,2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format($result1->PrecioSesion,2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"100px\"><label>'.number_format($facturacion,2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format((($facturacion)*($comisionPrensa)),2,',','.').'</label></td>\n\t\t\t\t</tr>\n\t\t\t';\n\t\t} \n\t}\n\t\n\t$graphInforme[] = array('fact_total'=>$subtotal, 'aport_bruta'=>$aportBruta, 'comision_patner'=>$comision, 'aport_neta'=>$aportNeta);\n\t\n\techo '\n\t\t</tbody>\n\t\t<tfoot style=\"color: white; font-size: 14px; font-variant:small-caps; background: #1F88A7\">\n \t<tr height=\"30px\" style=\"color: white; font-size: 14px; font-variant:small-caps;\">\n \t<td bgcolor=\"#1F88A7\" colspan=\"3\" align=\"center\"><span>TOTALES</span></td>\n <td bgcolor=\"#1F88A7\"><span>'.$totalOrdersCall.'</span></td>\n <td bgcolor=\"#1F88A7\"><span>'.$totalOrdersWeb.'</span></td>\n <td bgcolor=\"#1F88A7\"><span>'.($totalOrdersWeb + $totalOrdersCall).'</span></td>\n <td bgcolor=\"#1F88A7\"></td><td bgcolor=\"#1F88A7\"></td>\n \t <td bgcolor=\"#1F88A7\"><span>'.number_format($subtotal,2,',','.').'</span></td>\n <td bgcolor=\"#1F88A7\"><span>'.number_format($comision,2,',','.').'</span></td>\n \t</tr>\n\t </tfoot>\t\n\t';\n\techo '</table></td></tr>';\n\t\n\treturn $graphInforme;\n}", "title": "" }, { "docid": "688799a71ba8139851962cf6d7bbf81c", "score": "0.6228813", "text": "public function confirmarOrdenIngreso($datos){\n // aqui es donde tienes que confirmar la transaccion del producto\n $query = 'SELECT * FROM alm_prod_detalle WHERE alm_prod_det_id_unico=\"'.$datos['codigo_prod'].'\"';\n $producto = $this->mysql->query($query);\n //print_r($producto);\n $val['alm_prod_det_cantidad'] = ($datos['cantidad_prod']+$producto[0]['alm_prod_detalle']['alm_prod_det_cantidad']);\n $controlInventario = new ControlInventarioPEPS();\n $condicion = 'alm_prod_det_id_unico=\"'.$datos['codigo_prod'].'\"';\n $res = false;\n if($this->mysql->update('alm_prod_detalle', $val, $condicion)){\n $value['alm_ing_egr_det_estado'] = 2;\n $cond = 'alm_ing_egr_det_nro_unico=\"'.$datos['num_unico_det'].'\"';\n if($this->mysql->update('alm_ing_egr_det', $value, $cond)){\n $query = 'SELECT * FROM alm_ing_egr_det WHERE alm_ing_egr_det_nro_unico=\"'.$datos['num_unico_det'].'\"';\n $detalle = $this->mysql->query($query);\n $v['alm_cab_ing_egr_motivo_registro'] = 2;\n $cond = 'alm_cab_ing_nro_unico=\"'.$detalle[0]['alm_ing_egr_det']['alm_ing_egr_det_cod_unico_cab'].'\"';\n if($this->mysql->update('alm_ing_egr_cab',$v, $cond)){\n $controlInvetario->registrarIngresoInvetario($detalle[0]['alm_ing_egr_det']['alm_ing_egr_det_cod_unico_cab'],$datos['num_unico_det']);\n $res = true; \n }else{\n $res = false;\n }\n }else{\n $res = false;\n }\n }else{\n $res = false;\n }\n return $res;\n }", "title": "" }, { "docid": "0bdf576c9d94732aa5fc429bdac1a5ca", "score": "0.6196869", "text": "function ConsultarEstudiante(){\n $oConexion= new conectar();\n //se establece conexión con la base de datos\n $conexion=$oConexion->conexion();\n //consulta para retornar un solo registro\n $sql=\"SELECT * FROM estudiante WHERE id=$this->id\";\n //se ejecuta la consulta\n $result=mysqli_query($conexion,$sql);\n $result=mysqli_fetch_all($result,MYSQLI_ASSOC);\n foreach($result as $registro){\n //se registra la consulta en los parametros\n $this->id=$registro['id'];\n $this->tipoDocumento=$registro['tipoDocumento'];\n $this->documento=$registro['documentoIdentidad'];\n $this->nombres=$registro['nombres'];\n $this->apellidos=$registro['apellidos'];\n $this->direccion=$registro['direccion'];\n $this->telefono=$registro['telefono'];\n }\n }", "title": "" }, { "docid": "6c3a31b80431a7a625643ecaf004c680", "score": "0.61957616", "text": "function calcular($codigo)\n {\n global $db; \n $sql = \" select r.*, a.dateReception, a.tipoTrans,a.tipoComprobante,a.tipoCambio, i.prioridad \";\n $sql.= \" FROM reception_product r, almacen_reception a , product_item i \"; \n $sql.= \" WHERE a.itemId = r.itemId \"; \n $sql.= \" and r.productId = '$codigo' \";\n $sql.= \" and i.productId = r.productId \";\n $sql.= \" and a.almacenId = \".$_SESSION[\"almacenId\"]; //18-02\n //$sql.= \" order by a.dateReception asc, a.ordenTipo \"; \n $sql.= \" order by a.dateReception asc, a.ordenTipo asc ,a.comprobante asc,r.ingresoId asc \";\n \n \n// $db->debug = true;\n $db->SetFetchMode(ADODB_FETCH_ASSOC);\n\t\t$info = $db->execute($sql);\n \t\t$item = $info->GetRows();\n $saldoCantidad = 0;\n $saldoMonto = 0; \n $ponderado = 0;\n $saldoDolar = 0;\n for ($i=0; $i<count($item); $i++)\n {\n $inventario[\"orden\"] = $i+1; \n if ( $item[$i][\"tipoComprobante\"] == \"I\") // inventario inicial\n {\n \n $costoUnitario = $item[$i][\"price\"];\n $costoTotal = $item[$i][\"montoTotal\"]; // total ingreso\n \n $costoTotalDolar = $item[$i][\"costoTotalDolar\"]; //total dolar\n $costoUnitarioDolar = $item[$i][\"costoDolar\"]; //\n \n \n \n $saldoCantidad+= $item[$i][\"amount\"];\n $saldoMonto+= $item[$i][\"montoTotal\"];\n $saldoDolar+= $item[$i][\"costoTotalDolar\"];\n } \n else if ($item[$i][\"tipo\"] == \"I\") //ingreso\n {\n $costoUnitario = $item[$i][\"price\"];\n $costoTotal = $item[$i][\"montoTotal\"];\n \n //calcular montos en dolar segun tipo de cambio\n \n $costoTotalDolar = $costoTotal/$item[$i][\"tipoCambio\"];//calculo del monto total USD \n $costoUnitarioDolar = $costoTotalDolar/$item[$i][\"amount\"]; //calculo costo unitario en Dolar \n \n /*$costoTotalDolar = $item[$i][\"costoTotalDolar\"];\n $costoUnitarioDolar = $item[$i][\"costoDolar\"];*/\n \n /* $saldoCantidad+= $item[$i][\"amount\"];\n $saldoMonto+= $item[$i][\"montoTotal\"];\n $saldoDolar+= $item[$i][\"costoTotalDolar\"];*/\n $saldoCantidad+= $item[$i][\"amount\"];\n $saldoMonto+= $item[$i][\"montoTotal\"];\n $saldoDolar+= $costoTotalDolar;\n \n }\n else if ($item[$i][\"tipoTrans\"] == \"S\") //salidas\n { \n \n if ($item[$i][\"prioridad\"] == 1) \n $costoUnitario = $ponderado; // al boliviano\n \n else if ($item[$i][\"prioridad\"] == 2) \n {\n $costoUnitario = $ponderadoDolar*$item[$i][\"tipoCambio\"]; // al dolar\n $costoUnitario = round($costoUnitario,4);\n }\n \n $costoTotal = round(($costoUnitario*$item[$i][\"amount\"]),4); //Bolivianos \n $costoTotalDolar = round(($costoTotal/$item[$i][\"tipoCambio\"]),4);//dolar\n $costoUnitarioDolar = round(($costoTotalDolar/$item[$i][\"amount\"]),4); //dolar\n \n $saldoCantidad-= $item[$i][\"amount\"]; //saldo cantidad\n $saldoMonto-= $costoTotal; //monto saldo Bolivianos\n $saldoDolar-= $costoTotalDolar; //monto saldo Dolares\n } \n else if ($item[$i][\"tipoTrans\"] == \"A\" ) //ajuste \n { \n $costoUnitario = $item[$i][\"price\"];\n $costoTotal = $item[$i][\"montoTotal\"]; // total ingreso\n \n $costoTotalDolar = $item[$i][\"costoTotalDolar\"]; //total dolar\n $costoUnitarioDolar = $item[$i][\"costoDolar\"]; //\n \n \n \n $saldoCantidad+= $item[$i][\"amount\"];\n $saldoMonto+= $item[$i][\"montoTotal\"];\n $saldoDolar+= $item[$i][\"costoTotalDolar\"];\n \n \n //$costoUnitario = round($costoUnitario,4);\n \n if ($item[$i][\"tipoComprobante\"] == \"A\")// ajuste automatico\n {\n $costoUnitario = $saldoMonto/$saldoCantidad; // al boliviano\n $costoUnitarioDolar = $saldoDolar/$saldoCantidad; // al dolar\n }\n \n \n } \n \n if ($saldoCantidad == 0)\n {\n $ponderado = 0;\n $ponderadoDolar = 0;\n }\n else\n {\n $ponderado = round(($saldoMonto/$saldoCantidad),4); \n $ponderadoDolar = round(($saldoDolar/$saldoCantidad),4); \n \n } \n $inventario[\"price\"] = $costoUnitario;\n $inventario[\"montoTotal\"] = $costoTotal; \n \n $inventario[\"costoDolar\"] = $costoUnitarioDolar;\n $inventario[\"costoTotalDolar\"] = $costoTotalDolar;\n \n $inventario[\"ponderado\"] = $ponderado;\n $inventario[\"ponderadoDolar\"] = $ponderadoDolar;\n \n $inventario[\"amountSaldo\"] = $saldoCantidad;\n $inventario[\"montoSaldo\"] = $saldoMonto;\n $inventario[\"saldoDolar\"] = $saldoDolar; \n \n $this->updateItemComprobante($item[$i][\"ingresoId\"],$inventario,$item[$i][\"tipoComprobante\"]);\n $this->updateStock($codigo, $saldoCantidad, $saldoMonto,$ponderado,$saldoDolar,$ponderadoDolar);\n } \n return $saldo; //saldo actual del item\n }", "title": "" }, { "docid": "1fd6a8142049e9a738609d57bb6d8d68", "score": "0.6191706", "text": "function setAtrasado(){\t\n\t$sql = \"SELECT Id_Trabalho, Versao FROM TRABALHOS WHERE NOT EXISTS (SELECT * FROM ACOMPANHAMENTO WHERE Id_Trabalho = TRABALHOS.Id_Trabalho AND Id_Status_Trabalho >5) ORDER BY `Id_Trabalho`;\";\n\t$qry = T_query($sql);\t\n\tif ($qry){\t\n\t\twhile ($row = T_fetch_array($qry)){\t\n\t\t\t/* Pega o ultimo status (pela data de operacao */\t\t\n\t\t\t$sqlS = \"SELECT Data_Cobranca, Data_Operacao,`Id_Status_Trabalho`,`Data_Limite` FROM `ACOMPANHAMENTO` WHERE `Id_Trabalho` = '\".$row[\"Id_Trabalho\"].\"' ORDER BY `Data_Operacao` DESC LIMIT 1;\";\n\t\t\t$qryS = T_query($sqlS);\n\t\t\tif ($rowS = T_fetch_array($qryS)){\t\n\t\t\t\t$data_atual = strtotime(date(\"Y-m-d\"));\n\t\t\t\t/*Se estiver em revisao*/\t\t\t\t\t\t\t\n\t\t\t\tif ($rowS[\"Id_Status_Trabalho\"] == 2){\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$data_limite = strtotime($rowS[\"Data_Limite\"]);\t\t\t\t\t\n\t\t\t\t\t/* Verifica se esta atrasado */\n\t\t\t\t\tif ($data_atual > $data_limite){\n\t\t\t\t\t\t//echo \"EM REVISAO E ATRASADO<br>\";\n\t\t\t\t\t /* Muda status do acompanhamento */\n\t\t\t\t\t\t$sqlC = \"INSERT INTO ACOMPANHAMENTO (Data_Operacao, Id_Trabalho, Id_Status_Trabalho, Data_Limite) VALUES (now(),'\".$row[\"Id_Trabalho\"].\"',5,'\".$rowS[\"Data_Limite\"].\"');\";\n\t\t\t\t\t\t$qryC = T_query($sqlC);\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* Verifica a versao do trabalho */\n\t\t\t\t\t\tif($row['Versao'] > 1){\n\t\t\t\t\t\t\t//manda so pro relator atrasado\n\t\t\t\t\t\t\t$cond = \" AND Relator = 1 \";\n\t\t\t\t\t\t\techo \"So pro relator<br>\";\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t}else{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//manda pra todos os atrasados\n\t\t\t\t\t\t\t$cond = \"\";\n\t\t\t\t\t\t\techo \"Pra todos<br>\";\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* Envia e-mail de cobrança para revisores que estao em atraso */\n\t\t\t\t\t\t$sqlRev = \"SELECT Id_Usr FROM REVISORES WHERE Id_Trabalho = '\".$row[0].\"' {$cond} AND NOT EXISTS (SELECT * FROM REVISOES WHERE Id_Usr = REVISORES.Id_Usr AND Data_Operacao = '\".$rowS[\"Data_Operacao\"].\"' AND Id_Trabalho = '\".$row[0].\"')\";\n\t\t\t\t\t\t$qryRev = T_query($sqlRev);\n\t\t\t\t\t\tif (T_num_rows($qryRev)){\n\t\t\t\t\t\t\twhile ($rowRev = T_fetch_array($qryRev)){\n\t\t\t\t\t\t\t\tmailThem($row[0],5,$rowRev[0]);\n\t\t\t\t\t\t\t\t//echo \"EMAIL COM DADOS -> TRABALHO: {$row[0]} | PARA REVISOR: {$rowRev[0]}<br>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t}else if($rowS[\"Id_Status_Trabalho\"] == 5 && (($data_atual - strtotime($rowS[\"Data_Operacao\"])) % 259200) == 0){\n\t\t\t\t\t/* Verifica a versao do trabalho */\n\t\t\t\t\t\tif($row['Versao'] > 1){\n\t\t\t\t\t\t\t//manda so pro relator atrasado\n\t\t\t\t\t\t\t$cond = \" AND Relator = 1 \";\n\t\t\t\t\t\t\techo \"So pro relator<br>\";\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t}else{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//manda pra todos os atrasados\n\t\t\t\t\t\t\t$cond = \"\";\n\t\t\t\t\t\t\techo \"Pra todos<br>\";\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* Envia e-mail de cobrança para revisores que estao em atraso */\n\t\t\t\t\t\t$sqlRev = \"SELECT Id_Usr FROM REVISORES WHERE Id_Trabalho = '\".$row[0].\"' {$cond} AND NOT EXISTS (SELECT * FROM REVISOES WHERE Id_Usr = REVISORES.Id_Usr AND Data_Operacao = '\".$rowS[\"Data_Operacao\"].\"' AND Id_Trabalho = '\".$row[0].\"')\";\n\t\t\t\t\t\t$qryRev = T_query($sqlRev);\n\t\t\t\t\t\tif (T_num_rows($qryRev)){\n\t\t\t\t\t\t\twhile ($rowRev = T_fetch_array($qryRev)){\n\t\t\t\t\t\t\t\tmailThem($row[0],5,$rowRev[0]);\n\t\t\t\t\t\t\t\t//echo \"EMAIL COM DADOS -> TRABALHO: {$row[0]} | PARA REVISOR: {$rowRev[0]}<br>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t\t//echo \"<br><br>SOMENTE ATRASADO<br>\";\n\t\t\t\t\t$query = \"SELECT Data_Operacao,`Id_Status_Trabalho`,`Data_Limite` FROM `ACOMPANHAMENTO` WHERE `Id_Trabalho` = '\".$row[\"Id_Trabalho\"].\"' AND Id_Status_Trabalho = '2' ORDER BY `Data_Operacao` DESC LIMIT 1;\";\n\t\t\t\t\t$result = T_query($query);\n\t\t\t\t\t$campo = T_fetch_array($result);\n\t\t\t\t\t$data_date = date(\"Y-m-d\");\n\t\t\t\t\t$data_atual = strtotime($data_date);\t\t\t\t\t\t\n\t\t\t\t\t$data_cobranca = strtotime($rowS[\"Data_Cobranca\"]);\t\t\t\t\t\t\n\t\t\t\t\t//Se faz 3 ou mais dias que enviou o aviso, envia-o novamente\t\t\t\n\t\t\t\t\tif($data_atual >= $data_cobranca + 259200){\n\t\t\t\t\t\t// Verifica a versao do trabalho \n\t\t\t\t\t\tif($row['Versao'] > 1){\n\t\t\t\t\t\t\t//manda so pro relator atrasado\n\t\t\t\t\t\t\t$cond = \" AND Relator = 1 \";\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t}else{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//manda pra todos os atrasados\n\t\t\t\t\t\t\t$cond = \"\";\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$sqlRev = \"SELECT Id_Usr FROM REVISORES WHERE Id_Trabalho = '\".$row[0].\"' {$cond} AND NOT EXISTS (SELECT * FROM REVISOES WHERE Id_Usr = REVISORES.Id_Usr AND Data_Operacao = '\".$campo[\"Data_Operacao\"].\"' AND Id_Trabalho = '\".$row[0].\"')\";\n\t\t\t\t\t\t$sqlRev2 = \"SELECT Id_Usr FROM REVISORES WHERE Id_Trabalho = '\".$row[0].\"' {$cond} AND NOT EXISTS (SELECT * FROM REVISOES WHERE Id_Usr = REVISORES.Id_Usr AND Data_Operacao = '\".$rowS[\"Data_Operacao\"].\"' AND Id_Trabalho = '\".$row[0].\"')\";\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$qryRev = T_query($sqlRev);\n\t\t\t\t\t\t$flag_bd = 0;\n\t\t\t\t\t\tif (T_num_rows($qryRev) || T_num_rows($qryRev2)){\n\t\t\t\t\t\t\twhile ($rowRev = T_fetch_array($qryRev)){\n\t\t\t\t\t\t\t\t$qryRev2 = T_query($sqlRev2);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\twhile($rowRev2 = T_fetch_array($qryRev2)){\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif($rowRev['Id_Usr'] == $rowRev2['Id_Usr']){//se estiver nos dois\n\t\t\t\t\t\t\t\t\t\tmailThem($row[0],5,$rowRev[0]);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//echo \"EMAIL COM DADOS -> TRABALHO: {$row[0]} | PARA REVISOR: {$rowRev[0]}<br>\";\n\t\t\t\t\t\t\t\t\t\t$flag_bd = 1;\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}\t\t\t\t\t\n\t\t\t\t\tif($flag_bd == 1){\n\t\t\t\t\t\t$query_update = \"UPDATE `ACOMPANHAMENTO` SET Data_Cobranca = '{$data_date}' WHERE Id_Trabalho = '\".$row[0].\"' AND Id_Status_Trabalho = '5' AND Data_Operacao = '\".$rowS[\"Data_Operacao\"].\"'\";\t\t\t\t\t\t\t\n\t\t\t\t\t\t$result_update = T_query($query_update);\n\t\t\t\t\t\t//echo \"ATUALIZANDO ACOMPANHAMENTO EM Id_Trabalho = '\".$row[0].\" AND Id_Status_Trabalho = '5' AND Data_Operacao = '\".$rowS[\"Data_Operacao\"].\"'<br><br>\";\n\t\t\t\t\t\t$flag_bd = 0; \n\t\t\t\t\t}\n\t\t\t\t\t*/\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\t\n\t}\n\t\n}", "title": "" }, { "docid": "e2014432502fce428756e3eeadabcf90", "score": "0.6184995", "text": "function pedido_status($id_item_pedido) {\n $sql = \"SELECT `qtde`, `id_pedido` \n FROM `itens_pedidos` \n WHERE `id_item_pedido` = '$id_item_pedido' LIMIT 1 \";\n $campos = bancos::sql($sql);\n $qtde_solicitada = $campos[0]['qtde'];\n $id_pedido = $campos[0]['id_pedido'];\n//Verifica a qtde total que chegou do produto em todas as notas fiscais ...\n $sql = \"SELECT SUM(`qtde_entregue`) AS total_entregue \n FROM `nfe_historicos` \n WHERE `id_item_pedido` = '$id_item_pedido' \";\n $campos = bancos::sql($sql);\n $total_entregue = $campos[0]['total_entregue'];\n if($total_entregue < 0) {//significa que o controle é negativo\n if($total_entregue == $qtde_solicitada) {//Entrega Total ...\n $status = 2;\n }else {//Entrega Parcial ...\n $status = 1;\n }\n }else if($total_entregue == 0) {//Nada Entregue ...\n $status = 0;\n }else if($total_entregue < $qtde_solicitada) {//Entrega Parcial ...\n $status = 1;\n }else if($total_entregue >= $qtde_solicitada) {//Entrega Total ...\n $status = 2;\n }\n //Atualizando o id_item_pedido ...\n $sql = \"UPDATE `itens_pedidos` SET `status` = '$status' WHERE `id_item_pedido` = '$id_item_pedido' LIMIT 1 \";\n bancos::sql($sql);\n \n //Aqui eu atualizo o \"status\" do id_os_item se é que este id_item_pedido esteja vinculado a este ...\n $sql = \"UPDATE `oss_itens` SET `status` = '$status' WHERE `id_item_pedido` = '$id_item_pedido' LIMIT 1 \";\n bancos::sql($sql);\n \n//Situacao do pedido\n $sql = \"SELECT `id_item_pedido` \n FROM `itens_pedidos` \n WHERE `id_pedido` = '$id_pedido' \n AND `status` < '2' LIMIT 1 \";\n $campos = bancos::sql($sql);\n if(count($campos) == 0) {\n //Verifica se o Pedido possui Antecipações em Pendência ou Liberada - que é quando não foi importada p/ NF ...\n $sql = \"SELECT `id_antecipacao` \n FROM `antecipacoes` \n WHERE `id_pedido` = '$id_pedido' LIMIT 1 \";\n $campos_antecipacao = bancos::sql($sql);\n/*Atualizando o status do Pedido para parcial, porque mesmo tendo fechado todos os Itens, \nexistem Antecipações em Pendência ...*/\n if(count($campos_antecipacao) == 1) {\n $sql = \"UPDATE `pedidos` SET `status` = '1' WHERE `id_pedido` = '$id_pedido' LIMIT 1 \";\n//Atualizando o status do Pedido para concluido, significa que todos os Itens de Pedido estão concluidos ...\n }else {\n $sql = \"UPDATE `pedidos` SET `status` = '2' WHERE `id_pedido` = '$id_pedido' LIMIT 1 \";\n }\n }else {\n $sql = \"UPDATE `pedidos` SET `status` = '1' WHERE `id_pedido` = '$id_pedido' LIMIT 1 \";\n }\n bancos::sql($sql);\n }", "title": "" }, { "docid": "a400ebfa1d47cedc7875dc0b2746e3aa", "score": "0.61826426", "text": "function select_lotestrxtmp()\n{\n\n$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\ttry {\n$sql = 'SELECT * FROM lotestrxtmp WHERE TxnLineID = :clave'; \n$stmt = $this->db->prepare($sql);\n $stmt->bindParam(\":clave\", $_SESSION['lotestrxtmp']['TxnID']);\n $stmt->execute();\n\t$registro = $stmt->fetch(PDO::FETCH_ASSOC);\n\tif ( ! $registro) {\n\t\t$this->estado = 'OK';\n\t\treturn $this->estado;\n\t} else {\n \n\t\tif ($registro['TxnID'] === $_SESSION['invoice']['TxnID']) {\n $this->estado = 'ACTUALIZA';\n }\n }\n \n } catch(PDOException $e) {\n echo $e->getMessage();\n }\n \n\t\t$this->TxnLineID = $registro['TxnLineID'];\n\n\t\t$this->TimeCreated = $registro['TimeCreated'];\n\n\t\t$this->TimeModified = $registro['TimeModified'];\n\n\t\t$this->EditSequence = $registro['EditSequence'];\n\n\t\t$this->TxnDate = $registro['TxnDate'];\n\n\t\t$this->RefNumber = $registro['RefNumber'];\n\n\t\t$this->ItemRef_ListID = $registro['ItemRef_ListID'];\n\n\t\t$this->ItemRef_FullName = $registro['ItemRef_FullName'];\n\n\t\t$this->Memo = $registro['Memo'];\n\n\t\t$this->MemoTrx = $registro['MemoTrx'];\n\n\t\t$this->NumeroTrx = $registro['NumeroTrx'];\n\n\t\t$this->FechaTrx = $registro['FechaTrx'];\n\n\t\t$this->TipoTrx = $registro['TipoTrx'];\n\n\t\t$this->OrigenTrx = $registro['OrigenTrx'];\n\n\t\t$this->DestinoTrx = $registro['DestinoTrx'];\n\n\t\t$this->OrigenDesc = $registro['OrigenDesc'];\n\n\t\t$this->DestinoDesc = $registro['DestinoDesc'];\n\n\t\t$this->QtyTrx = $registro['QtyTrx'];\n\n\t\t$this->Name = $registro['Name'];\n\n\t\t$this->Sales_Desc = $registro['Sales_Desc'];\n\n\t\t$this->Disponible = $registro['Disponible'];\n\n\t\t$this->Estado = $registro['Estado'];\n\n\n}", "title": "" }, { "docid": "f38bcbb1543fbfb7125cfbb7d1254a41", "score": "0.61797893", "text": "public function obtener_saldo();", "title": "" }, { "docid": "db5ad5f309e1219f10341ff8ad783565", "score": "0.617944", "text": "function descontar_inventarios($enlaceCon,$cod_salida, $cod_almacen, $cod_material, $cantidad, $precio, $descuento, $montoparcial, $orden){\n\t$cantidadPivote=$cantidad;\n\t\n\t$banderaError=1;\n\t\n\t$sqlExistencias=\"select id.cod_material, id.cantidad_restante, id.lote, id.fecha_vencimiento, id.cod_ingreso_almacen \n\t\tfrom ingreso_almacenes i, ingreso_detalle_almacenes id \n\t\twhere i.cod_ingreso_almacen=id.cod_ingreso_almacen and i.cod_almacen='$cod_almacen' and i.ingreso_anulado=0 \n\t\tand id.cod_material='$cod_material' and id.cantidad_restante>0 order by id.lote, id.fecha_vencimiento asc\";\n\t\n\t//AQUI SE DEBE CORREGIR EL DATO DE CANTIDAD RESTANTE >0 OJO\n\t\n\t//echo $sqlExistencias.\"<br>\";\n\t$respExistencias=mysqli_query($enlaceCon,$sqlExistencias);\n\twhile($datExistencias=mysqli_fetch_array($respExistencias)){\n\t\tif($cantidadPivote>0){\n\t\t\t$codMaterial=$datExistencias[0];\n\t\t\t$cantidadRestante=$datExistencias[1];\n\t\t\t$loteProducto=$datExistencias[2];\n\t\t\t$fechaVencProducto=$datExistencias[3];\n\t\t\t$codIngreso=$datExistencias[4];\n\t\t\t\n\t\t\t//echo $codMaterial.\" \".$cantidadRestante.\" \".$loteProducto.\" \".$fechaVencProducto.\"<br>\";\n\t\t\t\n\t\t\tif($cantidadPivote<=$cantidadRestante){\n\t\t\t\t$cantidadInsert=$cantidadPivote;\n\t\t\t\t$cantidadPivote=0;\n\t\t\t}else{\n\t\t\t\t$cantidadPivote=$cantidadPivote-$cantidadRestante;\n\t\t\t\t$cantidadInsert=$cantidadRestante;\n\t\t\t}\n\t\t\t$montoparcial=$cantidadInsert*$precio;\n\t\t\t\n\t\t\t$sqlInsert=\"insert into salida_detalle_almacenes (cod_salida_almacen, cod_material, cantidad_unitaria, lote, fecha_vencimiento, precio_unitario,\n\t\t\tdescuento_unitario, monto_unitario, cod_ingreso_almacen, orden_detalle) values ('$cod_salida', '$codMaterial', '$cantidadInsert', '$loteProducto', '$fechaVencProducto',\n\t\t\t'$precio','$descuento','$montoparcial','$codIngreso','$orden')\";\n\t\t\t\n\t\t\t//echo $sqlInsert;\n\t\t\t$respInsert=mysqli_query($enlaceCon,$sqlInsert);\n\t\t\t\n\t\t\t//AQUI DAMOS DE BAJA EL DESCUENTO POR SI HUBIERAN DOS REGISTROS O MAS\n\t\t\t$descuento=0;\n\t\t\t\t\t\t\n\t\t\tif($respInsert!=1){\n\t\t\t\t$banderaError=2;\n\t\t\t}\n\t\t\t\n\t\t\t$sqlUpd=\"update ingreso_detalle_almacenes set cantidad_restante=cantidad_restante-$cantidadInsert where \n\t\t\tcod_ingreso_almacen='$codIngreso' and lote='$loteProducto' and cod_material='$codMaterial'\";\n\t\t\t$respUpd=mysqli_query($enlaceCon,$sqlUpd);\n\t\t\t\n\t\t\tif($respUpd!=1){\n\t\t\t\t$banderaError=3;\n\t\t\t}\n\t\t}\n\t}\n\t//recalculaCostos($codMaterial, $cod_almacen);\n\treturn($banderaError);\n}", "title": "" }, { "docid": "514b79d9aa76cdf27111490414ed5d04", "score": "0.6167256", "text": "public static function inventario($id,$nor){\n $ts=DivisionProducto::busquedaTipo($nor);\n $ultimo=Inventario::where('f_divisionproducto',$id)->where('localizacion',$ts)->get()->last();\n if($ultimo!=null){\n return $ultimo->existencia_nueva;\n }else{\n return 0;\n }\n $cc=0;\n \n $dec=DivisionProducto::filtroDetalles(1,$ts,$id);//Compras\n foreach($dec as $dc){\n if($dc->f_producto==$id){\n $restar=DetalleDevolucion::total($dc->id);\n $aux=$dc->cantidad-$restar;\n $cc=$cc+$aux;\n }\n }\n $cv=0;\n $dev=DivisionProducto::filtroDetalles(2,$ts,$id);//Ventas \n foreach($dev as $dv){\n if($dv->f_producto==$id){\n $restar=DetalleDevolucion::total($dv->id);\n $aux=$dv->cantidad-$restar;\n $cv=$cv+$aux;\n }\n }\n $contrario=Transacion::contrario($ts);\n $ce=0;\n $dee=DivisionProducto::filtroDetalles(5,$contrario,$id);//Envios al contrario no confirmados \n foreach($dee as $de){\n if($de->f_producto==$id){\n $ce=$ce+$de->cantidad;\n }\n }\n $cr=0;\n $der=DivisionProducto::filtroDetalles(6,$ts,$id);//Recibidos del contrario asignados \n foreach($der as $dr){\n if($dr->f_producto==$id){\n $restar=DetalleDevolucion::total($dr->id);\n $aux=$dr->cantidad-$restar;\n $cr=$cr+$aux;\n }\n }\n $crc=0;\n $derc=DivisionProducto::filtroDetalles(6,$contrario,$id);//envios el contrario confirmados \n foreach($derc as $drc){\n if($drc->f_producto==$id){\n $crc=$crc+$drc->cantidad;\n }\n }\n $cm=0;\n $dem=DivisionProducto::filtroDetalles(7,$ts,$id);//movidos ya sea por vencimiento o próximos a vencer\n foreach($dem as $dm){\n if($dm->f_producto==$id){\n $cm=$cm+$dm->cantidad;\n }\n }\n $ci=0;\n $dei=DivisionProducto::filtroDetalles(10,$ts,$id);//Entradas por cambio o reingreso\n foreach($dei as $di){\n if($di->f_producto==$id){\n $restar=DetalleDevolucion::total($di->id);\n $aux=$di->cantidad-$restar;\n $ci=$ci+$aux;\n }\n }\n return $cc-$cv+$cr-$ce-$crc-$cm+$ci;\n }", "title": "" }, { "docid": "cdaff9cbcaaa70772928719c640e0b1d", "score": "0.61657053", "text": "public function verificarDisponibilidade(){\n\n\t\t\n\t\t/*Codigo da oficina*/\n\t\t$id = $_GET[\"id\"];\n\t\t\n\t\t\n\t\tif ( !isset( $_SESSION ) ){\n\t session_start();\n\t }\n\t \n\t if ($_SESSION['atividade']){\n\t\t\t $atividade = $_SESSION['atividade']; \n\t\t }else{ \n\t\t \t//Nesse caso, nenhuma atividade no banco, bate horario com a oficina escolhida.\n\t\t\t\t$this->adicionarAtividade($id);\n\t\t\t\techo '3|'.$id; exit;\n\t\t }\t\n\t\t\n\n\t\t\n\t\t$resultado = $this->model->obterDadosAtividade($id);\n\t\t\n\t\twhile($dado = mysql_fetch_object($resultado)){\n\t\t\t$horario_inicio = $dado->horario_inicio;\n\t\t\t$horario_termino = $dado->horario_termino;\n\t\t\t$data_inicio = $dado->data_inicio;\n\t\t\t$data_termino = $dado->data_termino;\n\t\t\t$vagas = $dado->n_vagas;\n\t\t\t$total = $dado->total;\t\n\t\t}\t\t\n\t\t\n\t\t/*Verifica se a oficina ainda tem vagas*/\n\t\tif($total >= $vagas){\n\t\t\t\n\t\t\t/*Adiciona essa oficina para o aluno. Porem, na fila de espera*/\n\t\t\t$this->adicionarAtividade($id);\n\t\t\techo '2|'.$id; exit;\n\t\t}\n\t\t\n\t\t//----------------------Verificando se bate horário--------------//\n\t\t\n\t\t$resultado = $this->model->verificarHorario($id, $horario_inicio, $horario_termino, $data_inicio, $data_termino);\n\t\t\n\t\t//------------------------verificado-----------------------------//\n\t\t\n\t\tif(mysql_num_rows($resultado) == 0){\n\t\t\t\n\t\t\t//Nesse caso, nenhuma oficna no banco, bate horario com a oficina escolhida.\n\t\t\t$this->adicionarAtividade($id);\n\t\t\techo '3|'.$id;\n\t\t\n\t\t}else{\n\t\t\t/*Existem oficinas que batem horario com a oficina selecionada. \n\t\t\tBasta checar, se o usuario ja está matriculado em alguma delas.*/\n\t\t\t\n\t\t\t$aux = $this->verificacao($resultado);\n\t\t\tif (!empty($aux)){\n\t\t\t\techo \"Não é possível se inscrever nessa oficina. Existe um conflito de horário com a oficina \".$aux.\"|\".$id;\n\t\t\t}else{\n\t\t\t\t//Nesse caso, nenhuma oficna no banco, bate horario com a oficina escolhida.\n\t\t\t\t$this->adicionarAtividade($id);\n\t\t\t\techo '3|'.$id;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "90140572bf1a03382067543b067ac70b", "score": "0.6160636", "text": "function leetodos_modelos() {\n $estado = 'ERR';\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n try {\n $sql = 'SELECT * FROM invoice WHERE TxnID = :clave ';\n $stmt = $this->db->prepare($sql);\n $stmt->bindParam(':clave', $_SESSION['modelos']['TxnID']);\n $stmt->execute();\n $registro = $stmt->fetchAll(PDO::FETCH_ASSOC);\n if ( ! $registro){\n $this->estado = 'OK';\n } else {\n $this->estado = 'TODOS';\n }\n \n } catch(PDOException $e) {\n echo $e->getMessage();\n } \n \n return $this->estado;\n }", "title": "" }, { "docid": "67540134eacff769bbc63561e66aa643", "score": "0.6121691", "text": "protected function dias_trabajados_total($param) {\n $sql = \"select t.nro_legaj,t.nro_cargo,\n --t.codn_area,t.codn_subar,\n c.fec_alta,c.fec_baja,c.codc_categ,c.codc_uacad ,b.tipo_escal,\n t.dias_trabajados as dias_trabajados,\n t.dias_retro as dias_retro,\n t.dias_trabajados+t.dias_retro as dias_trabajados_total,\n t.bruto as bruto,\n t.aportes as aportes,\n t.bruto+t.aportes as costo\n from\n (select trabajados.nro_legaj,trabajados.nro_cargo,\n trabajados.dias_trab AS dias_trabajados,\n case when dias_retro is Null THEN 0 ELSE dias_retro END AS dias_retro,\n CASE WHEN bruto is Null THEN 0 ELSE bruto END AS bruto,\n CASE WHEN aportes.aportes is Null THEN 0 ELSE aportes.aportes END AS aportes\n\n from \n (select a.nro_legaj,a.nro_cargo,\n sum(a.dias_trab) as dias_trab,\n sum(a.dias_retro) as dias_retro,\n sum(a.tot_haber) as bruto --ver desglosar bruto de aguinaldo\n from mapuche.dhr2 a, mapuche.dh22 b\n where a.nro_liqui=b.nro_liqui\n and a.nro_liqui>={$param['id_liqui_ini']}\n and a.nro_liqui<={$param['id_liqui_fin']}\n and a.nro_liqui<>{$param['id_liqui_1sac']} --sin contar dias de aguinaldo\n and a.nro_liqui<>{$param['id_liqui_2sac']}\n \n group by a.nro_legaj,a.nro_cargo\n )trabajados\n\nfull outer join (select a.nro_legaj,a.nro_cargo, sum(a.impp_conce ) as aportes\n from mapuche.dh21h a, mapuche.dh12 c\n where --a.nro_liqui=b.nro_liqui\n --and ((b.per_liano=2014 and b.per_limes>=2) or (b.per_liano=2015 and b.per_limes=1))\n a.nro_liqui>={$param['id_liqui_ini']}\n and a.nro_liqui<={$param['id_liqui_fin']}\n \n --and a.nro_liqui=b.nro_liqui\n and a.codn_conce=c.codn_conce\n and c.nro_orimp>0\n and c.tipo_conce='A'\n group by a.nro_legaj,a.nro_cargo\n )aportes\n on trabajados.nro_cargo=aportes.nro_cargo \n) t \n\ninner join dh03 c on t.nro_cargo=c.nro_cargo\n\ninner join dh11 b on c.codc_categ=b.codc_categ\n\n--group by t.nro_legaj,t.nro_cargo,c.codc_categ,c.codc_uacad ,b.tipo_escal\n \";\n return $sql;\n }", "title": "" }, { "docid": "a50cc0972c20b55007b64d13b13ec7ae", "score": "0.6111829", "text": "function consultaA($coneccion,$sql){\n\n\t\t//Dentro de la funcion agregamos las siguientes\n\t\t//variables que nos serviranpara el control de las\n\t\t//salidas de datos...\n\t\t$ejecutor = $coneccion;\n\t\t$msgok = NULL;\n\t\t$msgerror = NULL;\n\n\t\t//Insertaremos un bloque try catch que nos servirá\n\t\t//para el manejo de excepciones.\n\n\t\ttry {\n\t\t\t//agregemos una variable para identificar de sql de accion vamos a utilizar\n\n\t\t\t$condicion = strstr (trim($sql),\" \",TRUE);\n\n\t\t\t/*Agregamos una condicion switch para definir los msg que enviemos\n\t\t\tcon relacion al valor devuelto por la variable $condicion para cada\n\t\t\tsentencia sql de accion*/\n\n\t\t\tswitch ($condicion)\n\t\t\t{\n\t\t\t\tcase 'INSERT':\n\t\t\t\t\t$msgerror = \"No se ha Podido Insertar los Datos\";\n\t\t\t\t\t$msgok = \"Datos Insertados\";\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'DELETE':\n\t\t\t\t\t\t$msgerror = \"No se ha Podido Eliminar los Datos\";\n\t\t\t\t\t\t$msgok = \"Datos Eliminados\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'UPDATE':\n\t\t\t\t\t\t\t$msgerror = \"No se ha Podido Actualizar los Datos\";\n\t\t\t\t\t\t\t$msgok = \"Datos Actualizados\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$msgerror = \"Es posible que no use un estandar de consulta SQL\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$ejecutor->beginTransaction();\n\t\t\t$fila = $ejecutor->exec($sql);\n\t\t\t$ejecutor->commit();\n\n\t\t\t/* Agregamos instrucciones para saber cuántas filas fueron afectadas por la acción\n\t\t\ty si no se afectaron definimos un mensaje de error alertando que no han habido\n\t\t\tfilas afectadas por la ejecución. */\n\n\t\t\tif ($fila == 0) {\n\t\t\t\t$msgok = $msgerror.\"<br> No existe coincidencia para la accion sobre los .....__\";\n\n\t\t\t}\n\n\t\t\t//Retornamos el valor del msg y numero de filas afectadas\n\n\t\t\treturn $msgok.\" Filas Afectadas \".$fila;\n\n\n\n\t\t} catch (Exception $exc) {\n\n\t\t\t//codigo para controlar un mensaje de error por si\n\t\t\t//no se pudo ejecutar las acciones de forma correcta.\n\n\t\t\t$ejecutor->rollBack();\n\t\t\treturn $msgerror. \":(<br>\".$exc->getMessage();\n\n\t\t}\n}", "title": "" }, { "docid": "62a93eb900ed411c8b46912a14a108b7", "score": "0.6104338", "text": "public function getDadosBalanceteReceita($sDataInicial, $sDataFinal, $iAnoInicio) {\n \n list ($iAnoUsuFim, $iMesUsuFim, $iDiaUsuFim ) = explode(\"-\", $sDataInicial);\n $iAno = $iAnoUsuFim;\n $oInstituicao = db_stdClass::getDadosInstit(db_getsession(\"DB_instit\"));\n $sListaInstit = db_getsession(\"DB_instit\");\n $sWhere = \" o70_instit in ({$sListaInstit})\";\n \n $sSqlDadosBalancete = db_receitasaldo(11, 1, 3, true, $sWhere, $iAno, $sDataInicial, $sDataFinal, true);\n\n $sSqlBalancete = \" select case when {$iAno} <= 2007 then \";\n $sSqlBalancete .= \" substr(o57_fonte,2,14) \"; \n $sSqlBalancete .= \" else \";\n $sSqlBalancete .= \" case when fc_conplano_grupo({$iAno}, substr(o57_fonte,1,1) || '%', 9000 ) is false then \"; \n $sSqlBalancete .= \" substr(o57_fonte, 2, 14) \"; \n $sSqlBalancete .= \" else \";\n $sSqlBalancete .= \" substr(o57_fonte,1,15) \"; \n $sSqlBalancete .= \" end \";\n $sSqlBalancete .= \" end as o57_fonte, \";\n $sSqlBalancete .= \" max(o57_descr) as o57_descr, \";\n $sSqlBalancete .= \" round(sum(saldo_inicial),2) as saldo_inicial, \";\n $sSqlBalancete .= \" round(sum(saldo_arrecadado),2) as saldo_arrecadado, \"; \n $sSqlBalancete .= \" max(o15_codigo) as o70_codigo, \";\n $sSqlBalancete .= \" max(x.o70_codrec) as o70_codrec, \";\n $sSqlBalancete .= \" max(coalesce(o70_instit,0)) as o70_instit, \";\n $sSqlBalancete .= \" max(fc_nivel_plano2005(rpad(x.o57_fonte,20,'0'))) as nivel, \";\n $sSqlBalancete .= \" round(sum(saldo_prevadic_acum),2) as saldo_prevadic_acum \";\n $sSqlBalancete .= \" from ({$sSqlDadosBalancete}) as x \";\n $sSqlBalancete .= \" left join orcreceita on orcreceita.o70_codrec = x.o70_codrec and o70_anousu={$iAno} \";\n $sSqlBalancete .= \" left join orctiporec on orcreceita.o70_codigo = o15_codigo \";\n $sSqlBalancete .= \" group by o57_fonte \";\n $sSqlBalancete .= \" order by o57_fonte asc \";\n\n $rsBalancete = db_query($sSqlBalancete);\n $iTotalLinhas = pg_num_rows($rsBalancete);\n if (PostgreSQLUtils::isTableExists(\"work_receita\")) {\n db_query(\"drop table if exists work_receita\");\n }\n\n $aContas = array();\n for ($i = 0; $i < $iTotalLinhas; $i++) {\n\n $oConta = new stdClass();\n $oContaReceita = db_utils::fieldsMemory($rsBalancete, $i);\n\n $oConta->reg = 'L200';\n $oConta->exerc = $iAno; \n $oConta->cod_cta_receita = $oContaReceita->o57_fonte;\n $oConta->cod_org_un_orc = $oInstituicao->codtrib;\n $oConta->vl_rec_orcada = number_format($oContaReceita->saldo_inicial,'2', \",\",\"\");\n $oConta->vl_rec_realizada = number_format($oContaReceita->saldo_arrecadado,'2', \",\",\"\");\n $oConta->cod_rec_vinc = $oContaReceita->o70_codigo;\n $oConta->desc_receita = $oContaReceita->o57_descr;\n $oConta->ind_tipo_conta = \"S\";\n if ($oContaReceita->o70_codrec > 0) {\n $oConta->ind_tipo_conta = \"A\";\n }\n $oConta->nm_nivel_conta = $oContaReceita->nivel;\n\n $aContas[] = $oConta;\n\n }\n return $aContas;\n }", "title": "" }, { "docid": "dc8e0b4f99c9653aad351c72fa598b51", "score": "0.6097889", "text": "public function Depositar(){\n if($this->getstatus()){\n \n Echo(\"Deposito feito!\");\n }\n else{\n echo(\"Conta fechada!\");\n }\n }", "title": "" }, { "docid": "d868d944ed4a9d3792f43f636f8e0aca", "score": "0.6096892", "text": "public function rechazarDenunciaRespuesta()\n\t{\n\t\ttry \n\t\t{\n\t\t\t\\DB::beginTransaction();\n\n\t\t\t// Si la denuncia es falsa se reactiva la respuesta y se abre un historial al denunciante\n\t\t\t// Se abre el historial al denunciante para incrementar sus denuncias falsas\n\n\t\t\t# historial para el denunciante, sus denuncias falsas incrementan\n\t\t\t$historialDenunciante = $this->historialRepo->nuevoHistorial(\\Input::get('denunciante_id'));\n\t\t\t$historialDenunciante->denunciasfalsas++;\n\t\t\t$this->historialRepo->save($historialDenunciante);\n\n\t\t\t\n\t\t\t$respuesta_id = \\Input::get('respuesta_id');\n\n\t\t\tif($this->respuestaRepo->reactivarRespuestaId($respuesta_id))\n\t\t\t{\n\t\t\t\t# se elimina la denuncia una vez se ha revisado y gestionado\n\t\t\t\t$this->denunciaRepo->eliminarDenunciaTipoRespuesta($respuesta_id);\n\n\t\t\t\t# se requiere la configuracion del sistema para conocer el contadorDeDenuncias del sistema permitido\n\t\t\t\t$configuracion = $this->configuracionRepo->cargarConfiguracionActual();\n\t\t\t\t$contadorDeDenuncias = $configuracion->contadordedenuncias;\n\n\t\t\t\t# contadordedenuncias del denunciante\n\t\t\t\t$contadordenuncias= $historialDenunciante->denunciasfalsas - $historialDenunciante->denunciasverdaderas;\n\n\t\t\t\t// el contadordedenuncias almacena la diferencia entre las denuncias falsas y verdaderas\n\t\t\t\t// denuncias falsas - denuncias verdaderas\n\t\t\t\t// Si el contadordedenuncias del denunciante supera el número máximo permitido por el sistema, \n\t\t\t\t// se bloquea al usuario por abusar del sistema de denuncias \n\n\t\t\t\t# si contadordedenuncias del denunciante es >= al contadorDeDenuncias del sistema se bloquea denunciante\n\t\t\t\t\n\t\t\t\tif($contadordenuncias >= $contadorDeDenuncias )\n\t\t\t\t{\n\t\t\t\t\t$this->usuarioRepo->bloquearUsuario($historialDenunciante->usuario_id);\n\t\t\t\t}\n\n\t\t\t\t\\DB::commit();\n\n\t\t\t\treturn \\Redirect::route('admin.revisar.respuestas.denunciadas')->with('status_ok', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Respuesta revisada y \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t reactivada correctamente');\n\t\t\t}\n\n\t\t\treturn \\Redirect::route('admin.revisar.respuestas.denunciadas')->with('status_error', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'La respuesta no pudo ser \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t reactivada');\n\t\t}\n\t\tcatch (\\Exception $ex)\n\t\t{\n\t\t\t\\DB::rollback();\n\t\t\t\\Session::flash('error_de_servidor',1);\n\t\t\treturn \\Redirect::back();\n\t\t}\t\t\t\n\t}", "title": "" }, { "docid": "84ecf409260c1277e4a7ddc8add1acc0", "score": "0.6094526", "text": "static public function mdlMostrarGastosCajaUsuario($usuario){\n\n if($usuario == \"Joel Medrano\" || $usuario == \"Johana Requelme\" || $usuario == \"Yudy Rosales\" || $usuario == \"Judith Condor\"){\n\n $stmt = Conexion::conectar()->prepare(\"SELECT \n g.id,\n DATE(g.fecha) AS fecha,\n g.recibo,\n g.ruc_proveedor,\n g.proveedor,\n g.sucursal,\n s.des_larga AS nom_sucursal,\n g.cod_caja,\n cc.descripcion AS nom_caja,\n cc.tipo_gasto,\n cc.nombre_gasto,\n cc.cod_area,\n cc.nombre_area,\n g.total,\n g.tipo_documento,\n d.descripcion AS nombre_documento,\n g.documento,\n g.solicitante,\n g.descripcion AS desc_salida,\n g.rubro_cancelacion,\n g.usureg,\n g.estado,\n g.visible,\n g.estado\n FROM\n gastos_caja g \n LEFT JOIN \n (SELECT \n cod_argumento,\n des_larga \n FROM\n tabla_m_detalle \n WHERE cod_tabla = 'tsuc') s \n ON g.sucursal = s.cod_argumento \n LEFT JOIN centro_costos cc \n ON g.cod_caja = cc.cod_caja \n LEFT JOIN \n (SELECT \n codigo,\n descripcion \n FROM\n maestrajf \n WHERE tipo_dato = 'tdoc' \n AND codigo IN ('01', '03', '09', '99')) AS d \n ON g.tipo_documento = d.codigo \n WHERE YEAR(g.fecha) = YEAR(NOW()) \n AND g.estado IN ('2','3','4') \n AND g.visible = 1\");\n\n$stmt->bindParam(\":usuario\", $usuario, PDO::PARAM_STR);\n\n$stmt -> execute();\n\nreturn $stmt -> fetchAll();\n\n }else{\n\n $stmt = Conexion::conectar()->prepare(\"SELECT \n g.id,\n DATE(g.fecha) AS fecha,\n g.recibo,\n g.ruc_proveedor,\n g.proveedor,\n g.sucursal,\n s.des_larga AS nom_sucursal,\n g.cod_caja,\n cc.descripcion AS nom_caja,\n cc.tipo_gasto,\n cc.nombre_gasto,\n cc.cod_area,\n cc.nombre_area,\n g.total,\n g.tipo_documento,\n d.descripcion AS nombre_documento,\n g.documento,\n g.solicitante,\n g.descripcion AS desc_salida,\n g.rubro_cancelacion,\n g.estado,\n g.usureg\n FROM\n gastos_caja g \n LEFT JOIN \n (SELECT \n cod_argumento,\n des_larga \n FROM\n tabla_m_detalle \n WHERE cod_tabla = 'tsuc') s \n ON g.sucursal = s.cod_argumento \n LEFT JOIN centro_costos cc \n ON g.cod_caja = cc.cod_caja \n LEFT JOIN \n (SELECT \n codigo,\n descripcion \n FROM\n maestrajf \n WHERE tipo_dato = 'tdoc' \n AND codigo IN ('01', '03', '09', '99')) AS d \n ON g.tipo_documento = d.codigo \n WHERE YEAR(g.fecha) = YEAR(NOW()) \n AND g.estado IN ('2','3') \n AND g.visible = 1 \n AND g.usureg = :usuario\");\n \n $stmt->bindParam(\":usuario\", $usuario, PDO::PARAM_STR);\n \n $stmt -> execute();\n \n return $stmt -> fetchAll();\n\n }\n\n $stmt -> close();\n\n $stmt = null;\n\n }", "title": "" }, { "docid": "ec2d671da20cef15993225c035841c1f", "score": "0.6087397", "text": "public function totaliza_orcamento()\r\n {\r\n\r\n $valor_desconto = 0;\r\n $valor_orcamento = 0;\r\n $valor_ipi = 0;\r\n $valor_total = 0;\r\n $desconto = $this->mgt_orcamento_cliente_desconto->Text;\r\n $frete = $this->mgt_orcamento_valor_frete->Text;\r\n\r\n if($desconto < 0)\r\n {\r\n $desconto = 0;\r\n }\r\n\r\n if($frete < 0)\r\n {\r\n $frete = 0;\r\n }\r\n\r\n $this->mgt_orcamento_valor_desconto->Text = '0.00';\r\n $this->mgt_orcamento_valor_pedido->Text = '0.00';\r\n $this->mgt_orcamento_valor_ipi->Text = '0.00';\r\n $this->mgt_orcamento_valor_total->Text = '0.00';\r\n\r\n $Comando_SQL = \"select * from mgt_orcamentos_produtos where mgt_orcamento_produto_numero_pedido = \" . trim($this->mgt_orcamento_numero->Text) . \" order by mgt_orcamento_produto_numero\";\r\n\r\n GetConexaoPrincipal()->SQL_MGT_Orcamentos_Produtos->Close();\r\n GetConexaoPrincipal()->SQL_MGT_Orcamentos_Produtos->SQL = $Comando_SQL;\r\n GetConexaoPrincipal()->SQL_MGT_Orcamentos_Produtos->Open();\r\n\r\n if((GetConexaoPrincipal()->SQL_MGT_Orcamentos_Produtos->EOF) != 1)\r\n {\r\n while((GetConexaoPrincipal()->SQL_MGT_Orcamentos_Produtos->EOF) != 1)\r\n {\r\n $valor_ipi = $valor_ipi + GetConexaoPrincipal()->SQL_MGT_Orcamentos_Produtos->Fields['mgt_orcamento_produto_valor_ipi'];\r\n $valor_orcamento = $valor_orcamento + GetConexaoPrincipal()->SQL_MGT_Orcamentos_Produtos->Fields['mgt_orcamento_produto_valor_total'];\r\n\r\n GetConexaoPrincipal()->SQL_MGT_Orcamentos_Produtos->Next();\r\n }\r\n }\r\n\r\n if($desconto > 0)\r\n {\r\n $valor_desconto = (($valor_orcamento * $desconto) / 100);\r\n }\r\n else\r\n {\r\n $valor_desconto = 0;\r\n }\r\n\r\n $valor_total = ((($valor_orcamento + $valor_ipi) + $frete) - $valor_desconto);\r\n\r\n $this->mgt_orcamento_valor_desconto->Text = number_format($valor_desconto, \"2\", \".\", \"\");\r\n $this->mgt_orcamento_valor_pedido->Text = number_format($valor_orcamento, \"2\", \".\", \"\");\r\n $this->mgt_orcamento_valor_ipi->Text = number_format($valor_ipi, \"2\", \".\", \"\");\r\n $this->mgt_orcamento_valor_total->Text = number_format($valor_total, \"2\", \".\", \"\");\r\n }", "title": "" }, { "docid": "978d73437a824cab62742a7a7e2f4708", "score": "0.6079871", "text": "function insertarLoteNotaCredito(){\n $link = new My();\n $respuesta = array();\n $f_nro = $_POST['f_nro'];\n $n_nro = $_POST['n_nro'];\n $lote = $_POST['lote'];\n $ticketSalida = $_POST['ticketSalida'];\n $ticketEntrada = $_POST['ticketEntrada'];\n $loteSalida = $_POST['loteSalida'];\n $cantSalida = $_POST['cantSalida'];\n\n $link->Query(\"INSERT INTO nota_credito_det (n_nro, codigo, lote, um_prod, descrip, cantidad, precio_unit, subtotal, estado_venta) SELECT $n_nro,d.codigo,d.lote,d.um_prod, d.descrip, d.cantidad, d.subtotal/d.cantidad,d.subtotal,d.estado_venta from fact_vent_det d left join nota_credito_det n on d.lote = n.lote left join nota_credito nn on n.n_nro=nn.n_nro and d.f_nro=nn.f_nro where d.f_nro = $f_nro and d.lote=$lote and n.lote is null\");\n \n if($link->AffectedRows() > 0){\n $link->Query(\"UPDATE nota_credito as n INNER JOIN (SELECT n_nro,sum(subtotal) as suma from nota_credito_det group by n_nro) as d on n.n_nro=d.n_nro\n SET n.total=d.suma, n.saldo=d.suma where n.n_nro = $n_nro\");\n\n $insertarFactVendedor = \"INSERT INTO fact_vent_det (f_nro, codigo, um_prod, descrip, um_cod, cantidad, cod_falla, cant_falla, cod_falla_e, falla_real, precio_venta, descuento, precio_neto, subtotal, gramaje, ancho, kg_calc, kg_med, cant_med, sis_med, fuera_rango, dif, tipo_desc, precio_costo, estado, estado_venta)\n SELECT $ticketEntrada,codigo, um_prod, descrip, um_cod, $cantSalida, cod_falla, cant_falla, cod_falla_e, falla_real, precio_venta, descuento, precio_neto, subtotal, gramaje, ancho, kg_calc, kg_med, cant_med, sis_med, fuera_rango, dif, tipo_desc, precio_costo, estado, estado_venta FROM fact_vent_det WHERE f_nro=$ticketSalida AND lote=$loteSalida\";\n\n $respuesta['ok'] = \"Se inserto el lote $lote, en la Nota de Credito $n_nro\";\n }else{\n $respuesta['error'] = \"No se pudo insertar el lote $lote, en la Nota de Credito $n_nro\";\n }\n\n echo json_encode($respuesta,JSON_FORCE_OBJECT);\n}", "title": "" }, { "docid": "758912fc3833ee79c3d329702fd7ac85", "score": "0.607635", "text": "function Cuerpo($acceso,$where,$deuda,$desde,$hasta,$titulo_list,$salto_p,$cobrador,$obser_all,$login_resp,$ubica_all)\n\t{\n\t\n\t\n\t\n\t\t$dato=lectura($acceso,$where);\n\t\t\n\t\t$cont=1;\n\t\t\n\t\t$fecha_act=date(\"Y-m-d\");\n\t\t$salto=0;\n\t\t$f_act=date(\"d/m/Y\");\n\t\t$h_act=date(\"h:i:s A\");\n\t\t$nombre_mun=utf8_decode(trim($dato[0][\"nombre_mun\"]));\n\t\t$nombre_zona=utf8_decode(trim($dato[0][\"nombre_zona\"]));\n\t\t$nombre_sector=utf8_decode(trim($dato[0][\"nombre_sector\"]));\n\t\t\n\t\t$this->SetFont('Arial','B',8);\n\t\t\t$valor=explode(\"-\",trim($desde));\n\t\t\t$des = formato_mes_com1($valor[1]). \" $valor[0] \";\n\t\t\t\n\t\t\t$valor=explode(\"-\",trim($hasta));\n\t\t\t$has = formato_mes_com1($valor[1]). \" $valor[0] \";\n\t\t\t$fecha_d=_(\"Deuda\").\" \" ._(\"Desde\").\" $des \".strtoupper(_(\"hasta\")).\" $has\";\n\t\t\t$this->cabecera($nombre_mun,$nombre_zona,$nombre_sector,$fecha_d,$titulo_list,$cobrador);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t//$this->Ln();\n\n\t\t\t$w=$this->TituloCampos();\n\t\t\t$cable=conexion();\n\t\t\tsession_start();\n\t\t\t $ini_u = $_SESSION[\"ini_u\"]; \n\t\t\t$acceso->objeto->ejecutarSql(\"select *from asigna_llamada where (id_all ILIKE '$ini_u%') ORDER BY id_all desc\"); \n\t\t\t$id_all = $ini_u.verCo($acceso,\"id_all\");\n\t\t\t$login_enc=$_SESSION[\"login\"];\n\t\t\t$fecha_all=date(\"Y-m-d\");\n\t\t\t$acceso->objeto->ejecutarSql(\"insert into asigna_llamada(id_all,ubica_all,fecha_all,login_enc,login_resp,obser_all,status_all,dato) values ('$id_all','$ubica_all','$fecha_all','$login_enc','$login_resp','$obser_all','REGISTRADO','')\");\t\n\t\t//\t$acceso->objeto->ejecutarSql(\"insert into proceso_corte(id_proc,login_proc,fecha_proc,status_proc) values ('$id_proc','$login_proc','$fecha_proc','GENERADO')\");\t\n\t\t\t\n\t\tfor($i=0;$i<count($dato);$i++){\n\t\t\t\n\t\t\t$status_contrato=trim($dato[$i][\"status_contrato\"]);\n\t\t\n\t\t\t$fill=0;\n\t\t\t$this->SetTextColor(0);\n\t\t\t$this->SetFillColor(249,249,249);\n\t\t\t\n\t\t\t$id_contrato=trim($dato[$i][\"id_contrato\"]);\n\t\t\t\n\t\t\t$nombre_sector1=utf8_decode(trim($dato[$i][\"nombre_sector\"]));\n\t\t\tif($nombre_sector!=$nombre_sector1){\n\t\t\t//\techo \":$nombre_sector!=$nombre_sector1:\";\n\t\t\t//echo \"$salto_p:\";\n\t\t\t\tif($salto_p==\"SALTO\"){\n\t\t\t\t\t$this->AddPage();\t\n\t\t\t\t\t$this->cabecera($nombre_mun,$nombre_zona,$nombre_sector,$fecha_d,$titulo_list);\n\t\t\t\t\t$w=$this->TituloCampos();\n\t\t\t\t\t$salto=0;\n\t\t\t\t}else{\n\t\t\t\t\t$this->cabecera_titulo($nombre_mun,$nombre_zona,$nombre_sector,$fecha_d,$titulo_list);\n\t\t\t\t\t$w=$this->TituloCampos();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t $meses=lectura($acceso,\"SELECT distinct fecha_inst FROM contrato_servicio_deuda where fecha_inst <= '$fecha_act' and id_contrato='$id_contrato' and status_con_ser='DEUDA' order by fecha_inst\");\n\t\t\t $dato1=array();\n\t\t\t $ind=0;\n\t\t\t \n\t\t\t for($k=0;$k<count($meses);$k++){\n\t\t\t\t$fecha_inst=trim($meses[$k][\"fecha_inst\"]);\n\t\t\t\tlist($ano,$mes,$dia)=explode(\"-\",$fecha_inst);\n\t\t\t\t$fecha1=\"$ano-$mes\";\n\t\t\t\t//echo $fecha1;\n\t\t\t\tif(!in_array($fecha1,$dato1)){\n\t\t\t\t\t$dato1[$ind]=$fecha1;\n\t\t\t\t\t$ind++;\n\t\t\t\t}\n\t\t\t }\n\t\t\t $det_deuda=\"\";\n\t\t\tfor($k=0;$k<count($dato1);$k++){\n\t\t\t\t$fecha_inst=trim($dato1[$k]);\n\t\t\t\tlist($ano,$mes)=explode(\"-\",$fecha_inst);\n\t\t\t\t$anio=substr($ano, -2);\n\t\t\t\t$mes_l = \"$mes/$anio\";\n\t\t\t//\techo $mes_l;\n\t\t\t\t$ult_dia_mes=date(\"t\",mktime( 0, 0, 0, $mes, 1, $ano ));\n\t\t\t\t\n\t\t\t\t$fec_ini=\"$ano-$mes-01\";\n\t\t\t\t$fec_fin=\"$ano-$mes-$ult_dia_mes\";\n\t\t\t//\techo \"SELECT sum(costo_cobro*cant_serv) as costo_cobro FROM contrato_servicio_deuda where id_contrato='$id_contrato' and status_con_ser='DEUDA' and fecha_inst between '$fec_ini' and '$fec_fin'\" ;\n\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(costo_cobro*cant_serv) as costo_cobro FROM contrato_servicio_deuda,servicios where contrato_servicio_deuda.id_serv=servicios.id_serv and id_tipo_servicio='TSE00001' AND id_contrato='$id_contrato' and status_con_ser='DEUDA' and fecha_inst between '$fec_ini' and '$fec_fin' \");\n\t\t\t\t\n\t\t\t\t$row=row($acceso);\n\t\t\t\t$costo_cobro=trim($row[\"costo_cobro\"])+0;\n\t\t\t\t$costo_cobro=number_format(trim($row[\"costo_cobro\"])+0, 2, ',', '.');\n\t\t\t\tif($costo_cobro>0){\n\t\t\t\t\t$det_deuda = $det_deuda.\"C $mes_l: $costo_cobro; \";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(costo_cobro*cant_serv) as costo_cobro FROM contrato_servicio_deuda,servicios where contrato_servicio_deuda.id_serv=servicios.id_serv and id_tipo_servicio='AP00001' AND id_contrato='$id_contrato' and status_con_ser='DEUDA' and fecha_inst between '$fec_ini' and '$fec_fin' \");\n\n\t\t\t\t$row=row($acceso);\n\t\t\t\t$costo_cobro=trim($row[\"costo_cobro\"])+0;\n\t\t\t\t$costo_cobro=number_format(trim($row[\"costo_cobro\"])+0, 2, ',', '.');\n\t\t\t\tif($costo_cobro>0){\n\t\t\t\t\t$det_deuda = $det_deuda.\"I $mes_l: $costo_cobro; \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*\n\t\t\t//echo \"SELECT vista_convenio.fecha_ven FROM vista_convenio WHERE vista_convenio.id_contrato = '$id_contrato' AND vista_convenio.status_con_ser = 'DEUDA'::bpchar order by fecha_ven asc limit 1 OFFSET 0 \";\n\t\t\t$acceso->objeto->ejecutarSql(\"SELECT vista_convenio.fecha_ven FROM vista_convenio WHERE vista_convenio.id_contrato = '$id_contrato' AND vista_convenio.status_con_ser = 'DEUDA'::bpchar order by fecha_ven asc limit 1 OFFSET 0 \");\n\t\t\t$fecha_ven='';\n\t\t\tif($row=row($acceso)){\n\t\t\t\techo $fecha_ven;\n\t\t\t\t$fecha_ven=\"VEN. CONV. \".formatofecha(trim($row[\"fecha_ven\"]));\t\n\t\t\t}\n\t\t\t\t*/\n\t\t//\tordenDeCorte($acceso,$id_contrato,$tecnico);\n\t\t\t\n\t\t\t$this->SetX(10);\n\t\t\t\n\t\t\t$total_p=trim($dato[$i][\"deuda\"]);\n\t\t\t$porc=($por_iva/100)+1;\n\t\t\t$base=$total_p/$porc;\n\t\t\t$iva=($base*$por_iva)/100;\n\t\t\t\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->SetX(10);\n\t\t\t$this->Cell($w[0],5,$cont,\"1\",0,\"C\",$fill);\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell($w[1],5,utf8_decode(trim($dato[$i][\"nro_contrato\"])),\"1\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell($w[2],5,utf8_decode(trim($dato[$i][\"cedula\"])),\"1\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell($w[3],5,substr(utf8_decode(trim($dato[$i][\"nombre\"]).\" \".trim($dato[$i][\"apellido\"])),0,30),\"1\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$tel_a='';\n\t\t\tif(trim($dato[$i][\"telf_casa\"])!=''){\n\t\t\t\t$tel_a=$tel_a.\" / \".trim($dato[$i][\"telf_casa\"]);\n\t\t\t}\n\t\t\tif(trim($dato[$i][\"telf_adic\"])!=''){\n\t\t\t\t$tel_a=$tel_a.\" / \".trim($dato[$i][\"telf_adic\"]);\n\t\t\t}\n\t\t\t$this->Cell($w[4],5,trim($dato[$i][\"telefono\"]).\"$tel_a\",\"1\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[5],5,trim($dato[$i][\"status_contrato\"]),\"1\",0,\"R\",$fill);\n\t\t\t$deuda=number_format(trim($dato[$i][\"deuda\"])+0, 2, ',', '.');\n\t\t\t$deuda_cliente=trim($dato[$i][\"deuda\"])+0;\n\t\t\t\n\t\t\t\n\t\t\t$nombre_sector=utf8_decode(trim($dato[$i][\"nombre_sector\"]));\n\t\t\t$edificio=utf8_decode(trim($dato[$i][\"edificio\"]));\n\t\t\t$numero_piso=utf8_decode(trim($dato[$i][\"numero_piso\"]));\n\t\t\t$urbanizacion=utf8_decode(trim($dato[$i][\"urbanizacion\"]));\n\t\t\t$nombre_calle=utf8_decode(trim($dato[$i][\"nombre_calle\"]));\n\t\t\t$urbanizacion=utf8_decode(trim($dato[$i][\"urbanizacion\"]));\n\t\t\t$direc_adicional=utf8_decode(trim($dato[$i][\"direc_adicional\"]));\n\t\t\t$numero_casa=utf8_decode(trim($dato[$i][\"numero_casa\"]));\n\t\t\t$postel=utf8_decode(trim($dato[$i][\"postel\"]));\n\t\t\t$pto=utf8_decode(trim($dato[$i][\"pto\"]));\n\t\t\t$cobrador=utf8_decode(trim($dato[$i][\"cobrador\"]));\n\t\t\t\n\t\t\t\n\t\t\tif($edificio!=''){\n\t\t\t\t$edificio=\", Edif: $edificio, piso: $numero_piso ,\";\n\t\t\t}\n\t\t\tif($urbanizacion!=''){\n\t\t\t\t$urbanizacion=\", Urb: $urbanizacion , \";\n\t\t\t}\n\t\t\t//ECHO \"<BR>:$postel:\";\n\t\t\t$dir =\"CALLE: $nombre_calle $urbanizacion $edificio ; NRO CASA: $numero_casa ; REF. $direc_adicional, $postel, PUNTOS: $pto; \";\n\t\t\t$this->Ln();\n\t\t\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->MultiCell(193,5,\"$dir\",\"1\",\"J\",$fill);\n\t\t\t\n\t\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->MultiCell(193,5,\"DETALLE: $det_deuda TOTAL:$deuda \",\"1\",\"J\",$fill);\n\t\t\t$acceso->objeto->ejecutarSql(\"SELECT nombre_servicio, cant_serv FROM contrato_servicio,servicios where contrato_servicio.id_serv=servicios.id_serv and id_contrato='$id_contrato' \");\n\t\t\t$paquete='';\n\t\t\t\n\t\t\twhile ($row=row($acceso)){\n\t\t\t\t\t$paquete=$paquete.utf8_decode(trim($row[\"nombre_servicio\"])).\": \".utf8_decode(trim($row[\"cant_serv\"])).\"; \";\n\t\t\t\t//\techo $paquete;\n\t\t\t}\n\t\t\t/*\n\t\t//$this->Ln();\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->MultiCell(193,5,\"PAQUETES SUSCRITOS: $paquete\",\"1\",\"J\");\n\t\t*/\n\t\t\t\nsession_start();\n\t\t\t\t\t\t$id_fr = $_SESSION[\"id_franq\"]; \n\t\t\t\t\t\t$serie='';\n\t\t\t\t\t\tif($id_fr!='0'){\n\t\t\t\t\t\t\t$cons=\" and id_franq='$id_fr'\";\n\t\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"select serie from franquicia where id_franq='$id_fr'\");\n\t\t\t\t\t\t\t$row=row($acceso);\n\t\t\t\t\t\t\t$serie= trim($row[\"serie\"]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$cons=\" and id_franq='1'\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"select id_orden from ordenes_tecnicos, contrato,vista_ubica where ordenes_tecnicos.id_contrato = contrato.id_contrato and contrato.id_calle=vista_ubica.id_calle ORDER BY num_o desc LIMIT 1 offset 0 \"); \n\t\t\t\t\t\t$id_orden = verNumero($acceso,\"id_orden\");*/\n\t\t\t\t\t\tsession_start();\n\t\t\t\t\t\t$ini_u = $_SESSION[\"ini_u\"]; \n\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"select id_orden from ordenes_tecnicos where (id_orden ILIKE '$ini_u%') ORDER BY id_orden desc LIMIT 1 offset 0 \");\n\t\t\t\t\t\t$id_orden=$ini_u.verCodLong($acceso,\"id_orden\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t$login= $_SESSION[\"login\"];\n\t\t\t$hora=date(\"H:i:s\");\n\t\t\t$fecha_orden=date(\"Y-m-d\");\n\t\t\t/*\n\t\t\t$acceso->objeto->ejecutarSql(\"insert into ordenes_tecnicos(id_orden,id_det_orden,fecha_orden,detalle_orden,comentario_orden,status_orden,id_contrato,prioridad,login,hora) values ('$id_orden','DEO00010','$fecha_orden','PROCESO DE CORTE','','ASIGNADO','$id_contrato','NORMAL','$login','$hora')\");\n\t\t\t$acceso->objeto->ejecutarSql(\"update contrato set status_contrato='POR CORTAR' where id_contrato='$id_contrato' \");\n\t\t\t\n\t\t\t$acceso->objeto->ejecutarSql(\"select *from abo_cortados where (id_abo_c ILIKE '$ini_u%') ORDER BY id_abo_c desc\"); \n\t\t\t$id_abo_c = $ini_u.verCodlong($acceso,\"id_abo_c\");\n\t\t\t\n\t\t\t*/\n\t\t\t$acceso->objeto->ejecutarSql(\"select *from asig_lla_cli where (id_lc ILIKE '$ini_u%') ORDER BY id_lc desc\"); \n\t\t\t$id_lc = $ini_u.verCo($acceso,\"id_lc\");\n\t\t\t\n\t\t\t$acceso->objeto->ejecutarSql(\"insert into asig_lla_cli(id_lc,id_all,id_contrato,status_lc,deuda) values ('$id_lc','$id_all','$id_contrato','REGISTRADO','$deuda_cliente')\");\n\t\t\t\n\t\t\t$this->Ln(3);\n\t\t\t\n\t\t\t$fill=!$fill;\n\t\t\t\n\t\t\t$salto++;\n\t\t\tif($salto==10 && $salto!=count($dato)){\n\t\t\t\t\n\t\t\t\tif($salto_p==\"SALTO\"){\n\t\t\t\t\t$this->AddPage();\t\n\t\t\t\t\t$this->cabecera($nombre_mun,$nombre_zona,$nombre_sector,$fecha_d,$titulo_list);\n\t\t\t\t\t$w=$this->TituloCampos();\n\t\t\t\t\t$salto=0;\n\t\t\t\t}else{\n\t\t\t\t\t$this->cabecera_titulo($nombre_mun,$nombre_zona,$nombre_sector,$fecha_d,$titulo_list);\n\t\t\t\t\t$w=$this->TituloCampos();\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\t$this->AddPage();\n\t\t\t\t$this->cabecera($nombre_mun,$nombre_zona,$nombre_sector,$fecha_d,$titulo_list);\n\t\t\t\t$w=$this->TituloCampos();\n\t\t\t\t$salto=0;\n\t\t\t\t*/\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t$cont++;\n\t\t}\n\t\t$this->SetX(10);\n\t\t//$this->Cell(array_sum($w),5,'','T');\n\t\t$cad.=\"\\\\pard\\\\par\n}\n\";\n\t\treturn $cad;\n\t}", "title": "" }, { "docid": "3a00e0bf1d6d9fabd352e6acdf69c4fa", "score": "0.60683185", "text": "function totalVentasGeneral($condicionales, $condicionales2, $condicionales3)\n{\n\n try\n {\n\n\t\t\t$total_notas = 0;\n $query = \"select\n\t\t\tSUM(DOCTOS_VE.importe_neto) AS PRECIO\n\t\t\tfrom DOCTOS_VE WHERE 1=1 $condicionales AND DOCTOS_VE.importe_neto>0 AND DOCTOS_VE.TIPO_DOCTO in ('F', 'R')\n\t\t\tand DOCTOS_VE.DOCTO_VE_ID NOT IN (select dvl.docto_ve_fte_id from doctos_ve_ligas dvl)\n\t\t\t AND DOCTOS_VE.ESTATUS!='C'\";\n\n $query2 = \"select\n\t\t\tSUM(DOCTOS_PV.importe_neto) AS PRECIO\n\t\t\tfrom DOCTOS_PV WHERE 1=1 $condicionales2 AND DOCTOS_PV.importe_neto>0 AND DOCTOS_PV.TIPO_DOCTO='V' AND DOCTOS_PV.ESTATUS='N'\";\n\n\t\t\t$query3 = \"select\n\t\t\tsum(IMPORTES_DOCTOS_CC.IMPORTE) as PRECIO\n\t\t\tfrom DOCTOS_CC LEFT JOIN IMPORTES_DOCTOS_CC ON DOCTOS_CC.DOCTO_CC_ID = IMPORTES_DOCTOS_CC.DOCTO_CC_ID\n\t\t\tWHERE 1=1 and DOCTOS_CC.CONCEPTO_CC_ID='8' and DOCTOS_CC.CANCELADO='N'\".$condicionales3;\n\n $conection1 = new conexion_nexos(1);\n $result1 = ibase_query($conection1->getConexion(), $query) or die(ibase_errmsg());\n $result2 = ibase_query($conection1->getConexion(), $query2) or die(ibase_errmsg());\n\t\t\t\t$result3 = ibase_query($conection1->getConexion(), $query3) or die(ibase_errmsg());\n\n\n $data = array();\n\n $total = 0;\n\n while ($row1 = ibase_fetch_object ($result1, IBASE_TEXT)){\n $total+=$row1->PRECIO;\n }\n\n while ($row2 = ibase_fetch_object ($result2, IBASE_TEXT)){\n $total+=$row2->PRECIO;\n }\n\n\t\t\t\twhile ($row3 = ibase_fetch_object ($result3, IBASE_TEXT)){\n $total+=$row3->PRECIO;\n\t\t\t\t\t\t$total_notas += $row3->PRECIO;\n }\n\n $conection2 = new conexion_nexos($_SESSION['empresa']);\n $result4 = ibase_query($conection2->getConexion(), $query) or die(ibase_errmsg());\n $result5 = ibase_query($conection2->getConexion(), $query2) or die(ibase_errmsg());\n $result6 = ibase_query($conection2->getConexion(), $query3) or die(ibase_errmsg());\n\n $data = array();\n\n while ($row4 = ibase_fetch_object ($result4, IBASE_TEXT)){\n $total+= $row4->PRECIO;\n }\n\n while ($row5 = ibase_fetch_object ($result5, IBASE_TEXT)){\n $total+= $row5->PRECIO;\n }\n\n\t\t\t\twhile ($row6 = ibase_fetch_object ($result6, IBASE_TEXT)){\n $total+= $row6->PRECIO;\n\t\t\t\t\t\t$total_notas += $row6->PRECIO;\n }\n\n return array($total, $total_notas);\n }catch(Exception $e) {\n echo 'Excepción capturada: ', $e, \"\\n\";\n }\n\n}", "title": "" }, { "docid": "789fca2586c1fece37a5a89f3a0123c7", "score": "0.6049702", "text": "function consultarDonantes($idTipo=\"\", $idDonante=\"\", $idStatus =\"\", $nombre = \"\")\n\t{\n\t\t$conexion_bd = conectar_bd();\n\n\t\t$resultado = \"<table class='table table-hover table-striped table-responsive-md btn-table'><thead><tr><th>Nombre</th><th>Tipo</th><th>Frecuencia de donaciones</th><th colspan='3'>Acciones</th></tr></thead><tbody>\";\n\n\t\t$consulta = 'SELECT D.nombreDonante as nombre, T.nombre as tipo, D.idDonante as idDonante, F.nombre as frecuencia';\n\t\t$consulta .= ' FROM donantes as D, tipodeDonante as T, status as S, frecuenciaDonante as F';\n\t\t$consulta .= ' WHERE D.idTipo = T.idTipo AND S.idStatus = D.idStatus AND D.idFrecuencia = F.idFrecuencia';\n\n\t\tif($idTipo != \"\")\n\t\t\t$consulta .= ' AND D.idTipo = '.$idTipo;\n\n\t\tif($idDonante != \"\")\n\t\t\t$consulta .= ' AND D.idDonante = '.$idDonante;\n\n\t\tif($idStatus != \"\")\n\t\t\t$consulta .= ' AND D.idStatus = '.$idStatus;\n\n\t\tif($nombre != \"\")\n\t\t\t$consulta .= ' AND D.nombreDonante LIKE \"%'.$nombre.'%\" ';\n\n\t\t$resultados = $conexion_bd->query($consulta);\n\t\twhile ($row = mysqli_fetch_array($resultados, MYSQLI_BOTH))\n\t\t{\n\t\t\t$resultado .= \"<tr>\";\n\n\t\t\t$resultado .= \"<td>\".$row['nombre'].\"</td>\";\n\t\t\t$resultado .= \"<td>\".$row['tipo'].\"</td>\";\n\n\t\t\t$resultado .= \"<td>\".$row['frecuencia'].\"</td>\";\n\n\t\t\t//botones\n\t\t\t$resultado .= \"<td>\";\n\t\t\t$resultado .= \"<a title= 'Ver Más' href='verDetalleDonante.php?id=\".$row['idDonante'].\"' class='btn btn-outline-info'><i class='fas fa-search-plus'></i></a>\";\n\t\t\t//si tiene permisos de editar y eliminar que salgan los botones\n\t\t\tif($_SESSION[\"usuario\"] === \"Administradora\")\n\t\t\t{\n\t\t\t\t$resultado .= \"<a title='Modificar Datos' href='modificarDonante.php?id=\".$row['idDonante'];\n\n\t\t\t\tif($idStatus == \"2\")\n\t\t\t\t\t$resultado .= \"&egresado=1\";\n\n\n\t\t\t\t$resultado .= \"' class='btn btn-outline-secondary'><i class='fas fa-pencil-alt'></i></a>\";\n\n\t\t\t\tif($idStatus == \"1\")\n\t\t\t\t\t$resultado .= \"<a title='Dar de Baja' data-toggle='modal' href='#modal\".$row['idDonante'].\"' class='btn btn-outline-danger'><i class='fas fa-trash-alt'></i></a>\";\n\t\t\t}\n\t\t\t$resultado .= \"</td>\";\n\n $resultado .= \"</tr>\";\n\n include(\"donantes/modalDarDeBajaDonante.html\");\n\t\t}\n\n\t\tmysqli_free_result($resultados);\n\t\tdesconectar_bd($conexion_bd);\n\n\t\t$resultado .= \"</tbody></table>\";\n\n\t\treturn $resultado;\n\t}", "title": "" }, { "docid": "b5d1f29990bdd150035a0da640955e38", "score": "0.6045596", "text": "public function getTableProductoDetalle(){\n $obj = new OrdenTrabajoModel();\n\n $id = $_GET['id'];\n $idenP = $_GET['idenP'];\n\n // Validar si tiene resultados\n $contador = 0;\n\n if ($id==0 && (!$idenP=='')) {\n // Contador validador\n $sql=\"SELECT COUNT(1) contador FROM\n ordentrabajo o,\n proceso p,\n detalleordentrabajo dot\n where \n o.otr_codigo = dot.otr_codigo\n and dot.pro_codigo = p.pro_codigo\n AND o.otr_identificador = $idenP\n \";\n\n $resultadoCount = $obj->consult($sql);\n \n\n foreach ($resultadoCount as $rsc) {\n $contador = $rsc['contador'];\n }\n\n if($contador!= '0'){\n $sql = \"SELECT dot.dotr_codigo, \n p.pro_codigo, \n p.pro_nombre, \n dot.dotr_cantidad, \n dot.dotr_orden,\n 1 est_codigo\n FROM \n ordentrabajo o,\n proceso p,\n detalleordentrabajo dot\n WHERE \n o.otr_codigo = dot.otr_codigo\n AND dot.pro_codigo = p.pro_codigo\n AND o.otr_identificador = $idenP\n ORDER BY dot.dotr_orden ASC\";\n }\n\n \n\n \n }elseif ($id!=0 && ($idenP=='')) {\n // Contador validador\n $sql=\"SELECT COUNT(1) contador FROM\n ordentrabajo o,\n proceso p,\n detalleordentrabajo dot\n where \n o.otr_codigo = dot.otr_codigo\n and dot.pro_codigo = p.pro_codigo\n AND o.otr_codigo = $id\";\n\n $resultadoCount = $obj->consult($sql);\n\n\n foreach ($resultadoCount as $rsc) {\n $contador = $rsc['contador'];\n }\n\n if($contador != '0'){\n $sql = \"SELECT dot.dotr_codigo, \n p.pro_codigo, \n p.pro_nombre, \n dot.dotr_cantidad, \n dot.dotr_orden,\n 1 est_codigo\n FROM \n ordentrabajo o,\n proceso p,\n detalleordentrabajo dot\n WHERE \n o.otr_codigo = dot.otr_codigo\n AND dot.pro_codigo = p.pro_codigo\n AND o.otr_codigo = $id\n ORDER BY dot.dotr_orden ASC\";\n }\n\n // echo $sql;\n \n }\n\n if($contador == '0' ){\n $sql = \"SELECT -1 dotr_codigo, \n '' pro_codigo, \n 'Sin Resultados' pro_nombre, \n '' dotr_cantidad, \n '' dotr_orden,\n -1 est_codigo\n FROM DUAL\";\n }\n \n \n $procesos = $obj->consult($sql);\n //$maquinasJSON = $obj->convertirJSON($sql);\n //echo getUrl(\"maquina\",\"maquina\",\"getTable\",false,\"ajax\");\n //echo $maquinasJSON;\n\n $result_array = array();\n if (mysqli_num_rows($procesos) > 0) {\n $item_array = array();\n while($row = mysqli_fetch_assoc($procesos)) {\n if($row['pro_codigo'] != -1){\n $btnAcciones = \"<div class='form-button-action'>\";\n\n $btnAcciones=$btnAcciones.\"<button estado = '1' type='button' data-toggle='tooltip' title='Eliminar'class='eliminar btn btn-link btn-danger' data-original-title='Eliminar'><i class='fas fa-trash-alt'></i></button>\";\n \n $btnAcciones = $btnAcciones.\"</div>\";\n }else{\n $btnAcciones = \"<div class='form-button-action'>\";\n\n // $btnAcciones=$btnAcciones.\"<button estado = '1' type='button' data-toggle='tooltip' title='Eliminar'class='eliminar btn btn-link btn-danger' data-original-title='Eliminar'><i class='fas fa-trash-alt'></i></button>\";\n \n $btnAcciones = $btnAcciones.\"</div>\";\n }\n \n $row['est_codigo'] = $btnAcciones;\n $result_array[]=$row;\n }\n echo json_encode($result_array); \n }\n //return -1;\n // print_r($result_array);\n }", "title": "" }, { "docid": "4720efded206078893515c78efd591ea", "score": "0.6043659", "text": "function buscaIgual_modelos() {\n $estado = 'ERR';\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n try {\n $sql = 'SELECT * FROM invoice WHERE TxnID = :clave ';\n $stmt = $this->db->prepare($sql);\n $stmt->bindParam(':clave', $_SESSION['modelos']['TxnID']);\n $stmt->execute();\n $registro = $stmt->fetch(PDO::FETCH_ASSOC);\n if ( ! $registro){\n $this->estado = 'OK';\n } else {\n if ($registro['TxnID'] === $_SESSION['modelos']['TxnID']) {\n $this->estado = 'ACTUALIZA';\n }\n }\n \n } catch(PDOException $e) {\n echo $e->getMessage();\n } \n \n return $this->estado;\n }", "title": "" }, { "docid": "4d53eaa6a0e07c6ea2a190f29ddd6549", "score": "0.6042897", "text": "function ivaincant($cliente) {\r\n\t$conn = mysql_connect(BD_HOST, BD_USERNAME, BD_PASSWORD);\r\n\tmysql_select_db(BD_DATABASE1);\r\n\tif($cliente != '-1') {\r\n\t\t//buscamos la tarifa del cliente\r\n\t\t$ssql = 'SELECT TARCLI FROM F_CLI WHERE CODCLI=' . $cliente;\r\n\t\t$rs = mysql_query($ssql, $conn);\r\n\t\t$datos = mysql_fetch_array($rs);\r\n\t\t$tarifa = $datos['TARCLI'];\r\n\t}else{\r\n\t\t$ssql = 'SELECT * FROM F_CFG';\r\n\t\t$rs = mysql_query($ssql, $conn);\r\n\t\t$datos = mysql_fetch_array($rs);\r\n\t\t$tarifa = $datos['TCACFG'];\r\n\t}\r\n\t//dentro de la tarifa buscamos si esta o no el iva incluido\r\n\t$ssql = 'SELECT IINTAR FROM F_TAR WHERE CODTAR=' . $tarifa;\r\n\t$rs1 = mysql_query($ssql, $conn);\r\n\t$datos1 = mysql_fetch_array($rs1);\r\n\tif($datos1['IINTAR'] == 1) {\r\n\t\techo('<div align=\"right\">IVA INCLUIDO</div>');\r\n\t}else{\r\n\t\techo('<div align=\"right\">IVA NO INCLUIDO</div>');\r\n\t}\r\n}", "title": "" }, { "docid": "ef3e430ba52d984fadc68c4299a7f244", "score": "0.60408056", "text": "function verificarTiemposDocente($id){\n\t/////////////////////////\n\tglobal $dbDocentesConPermisos , $dbPresupuestoDocente , $dbGrupos;\n\n\t$cedula = $id;\n\t$totalTiempos = 0;\n\t//// verifica de la tabal docente con permisos temporales\n\t$resultad = $dbDocentesConPermisos->obtenerDocentesConPermiso();\n\twhile ($fila1 = mysqli_fetch_assoc($resultado1)) {\n\t\tif ($fila1['cedula'] == $cedula && $fila1['fk_presupuesto'] != null) {\n\t\t\t//echo $fila1['cedula'].\"string <br>\";\n\t\t\t$totalTiempos = ($totalTiempos + $fila1['jornada_docenteConPermiso']);\n\t\t}\n\t}\n\t////////////////////////////\n\n\t/// verifica la tabla de grupoDocente\n\t$resultado2 = $dbGrupos->obtenerGrupoDocentes();\n\twhile ($fila2 = mysqli_fetch_assoc($resultado2)) {\n\t\tif ($fila2['fk_docente'] == $cedula && $fila2['fk_presupuesto'] != null) {\n\t\t\t//echo $fila2['fk_docente'].\"string <br>\";\n\t\t\t$totalTiempos = ($totalTiempos + $fila2['tiempo_individual']);\n\t\t}\n\t}\n\t///////////////////////////\n\n\t////// verifica la tabla de presupuestoDocente\n\t$resultado3 = $dbPresupuestoDocente->obtenerlistadoDePresupuestoDocente();\n\twhile ($fila3 = mysqli_fetch_assoc($resultado3)) {\n\t\tif ($fila3['fk_docente'] == $cedula) {\n\t\t\techo $fila3['fk_docente'].\"string <br>\";\n\t\t\t$totalTiempos = ($totalTiempos + $fila3['jornada']);\n\t\t}\n\t}\n\t//////////////////////////\n \treturn $totalTiempos;\n}", "title": "" }, { "docid": "942bca497eff6f2e27926e20533c1129", "score": "0.6033152", "text": "function iEmpleado_dep($cve_dependencia,$noControl) {\n\t$iConn = odbc_connect(\"pensiones\",\"\",\"\",\"\");\t#Realizo Conexion\n\t\n\t$iClave = 0;\n $sNombre = \"\";\n \t$sPuesto = \"\";\n\t$sTipoTrabajador = \"\";\n\t$sTelefono = \"\";\n\t$sDomicilio = \"\";\n\t$sFechaIng = \"\";\n\t$sDependencia = \"\";\n\t\n\t###### Funcion para obtener el numero de registros que devuelve un Select, ya que no funciona la funcion de odbc\n\tfunction numRows ($result,$odbcId,$sCriterio)\n\t{\n\t\t$numRecords = odbc_num_rows ($result);\n\t\tif ($numRecords < 0)\n\t\t{\n\t\t\t$sQry = \"SELECT count(*) as results FROM \".$sCriterio;\n\t\t\t$count = odbc_exec ($odbcId, $sQry);\n\t\t\t$numRecords = odbc_result ($count, \"results\");\n\t\t}\n\t\t\n\t\treturn $numRecords;\n\t} \n\t####### Fin Funcion\n\t\n\t$sQryInf = \"SELECT e.ficha_df, e.nom_df, e.curp, e.telefono, e.domi_df, e.numint_df, e.ingreso_em, e.cve_ea, e.cve_tt, e.cve_de, e.cve_pto FROM \";\n\t$sCriterio = $sCriterio = \"empleados as e\n\t\t\t\t WHERE e.ficha_df=\".$noControl.\" AND e.cve_tt=\".$cve_dependencia;\n\t$sQryInf.= $sCriterio;\n\t\n\tif ($iConn) {\n\t\t$iRs = odbc_exec($iConn, $sQryInf);\n\t\t\n\t\t$iNumRegs = numRows($iRs, $iConn, $sCriterio);\n\t\t\n\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\t$rows = odbc_fetch_object($iRs);\n\t\t\t\n\t\t\t$sTipoTrabajador = \"\";\n\t\t\t$sDependencia = \"\";\n\t\t\t$sPuesto = \"\";\n\t\t\t\n\t\t\t$iClave = $rows->cve_ea;\n\t\t\t$iCveTT = $rows->cve_tt;\t#Clave del tipo de trabajador\n\t\t\t$iCveDep = $rows->cve_de;\t#Clave de la dependencia\n\t\t\t$iCvePu = $rows->cve_pto;\t#Clave del puesto\n\t\t\t\n\t\t\t######### Obtengo el TIPO DE TRABAJADOR\n\t\t\t$sQryTipoT = \"SELECT nom_tt FROM \";\n\t\t\t$sCriterioT = \"tipotrab WHERE cve_tt=\".$iCveTT;\n\t\t\t$sQryTipoT.= $sCriterioT;\n\t\t\t$iRsTT = odbc_exec($iConn, $sQryTipoT);\n\t\t\n\t\t\t$iNumRegs = numRows($iRsTT, $iConn, $sCriterioT);\n\t\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\t\t$aTipoT = odbc_fetch_object($iRsTT);\n\t\t\t\t$sTipoTrabajador = $aTipoT->nom_tt;\t###\n\t\t\t}\n\t\t\t\n\t\t\t######### Obtengo el Nombre de la DEPENDENCIA\n\t\t\t$sQryTipoD = \"SELECT nom_de FROM \";\n\t\t\t$sCriterioD = \"depend WHERE cve_de=\".$iCveDep;\n\t\t\t$sQryTipoD.= $sCriterioD;\n\t\t\t$iRsD = odbc_exec($iConn, $sQryTipoD);\n\t\t\n\t\t\t$iNumRegs = numRows($iRsD, $iConn, $sCriterioD);\n\t\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\t\t$aTipoD = odbc_fetch_object($iRsD);\n\t\t\t\t$sDependencia = $aTipoD->nom_de;\t###\n\t\t\t}\n\t\t\t\n\t\t\t######### Obtengo el Nombre de la PUESTO\n\t\t\t$sQryTipoP = \"SELECT nom_pto FROM \";\n\t\t\t$sCriterioP = \"puestos WHERE cve_pto=\".$iCvePu;\n\t\t\t$sQryTipoP.= $sCriterioP;\n\t\t\t$iRsP = odbc_exec($iConn, $sQryTipoP);\n\t\t\n\t\t\t$iNumRegs = numRows($iRsP, $iConn, $sCriterioP);\n\t\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\t\t$aTipoP = odbc_fetch_object($iRsP);\n\t\t\t\t$sPuesto = $aTipoP->nom_pto;\t###\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t$sNombre = $rows->nom_df;\t\t\t\t\t\t\t\t\n\t\t\t$sTelefono = $rows->telefono;\n\t\t\t$sDomicilio = $rows->domi_df;\n\t\t\t\n\t\t\t$aFechaI = explode(\"-\",$rows->ingreso_em);\n\t\t\t$sFechaIng=$aFechaI[2].\"/\".$aFechaI[1].\"/\".$aFechaI[0];\t\t\t\n\t\t}\n\t}\n\todbc_close($iConn);\n\t\n\treturn array(\"clave\" => $iClave,\n\t\t\t\t \"nombre\" => $sNombre,\n\t\t\t\t \"puesto\" => $sPuesto,\n\t\t\t\t \"tipoTrabajador\" => $sTipoTrabajador,\n\t\t\t\t \"telefono\" => $sTelefono,\n\t\t\t\t \"domicilio\" => $sDomicilio,\n\t\t\t\t \"fechaIng\" => $sFechaIng,\n\t\t\t\t \"dependencia\" => $sDependencia\n\t\t\t);\n}", "title": "" }, { "docid": "6936948f36e1b831e0aab94a8ef25255", "score": "0.60308105", "text": "public function Guardar_valoracion_visita($data){\n $modelo = new Visita();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n\n $tiporegistro = \"Valoracion de Visita T. Social\";\n $accion = \"Registra una Nueva \".$tiporegistro.\" En el Sistema (T. Social) TRABAJO SOCIAL\";\n $detalle = $_SESSION['nombre'].\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 10;\n $idusuario = $_SESSION['idUsuario'];\n \n try {\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n if($data->bandera == \"0\"){\n $sql = \"UPDATE visitas_informe_valoracion \n SET inf_val_id_usuarioR = ?,\n inf_val_nombreValoracion = ?,\n inf_val_cumpleObjetivo = ?,\n inf_val_cumpleObjetivoRespuesta = ?,\n inf_val_oportunamente = ?,\n inf_val_oportunamenteRespuesta = ?,\n inf_val_valoracionDespacho = ?,\n inf_val_observaciones = ?,\n inf_val_bool_log = ?\n WHERE inf_val_id = ?\";\n\n $this->pdo->prepare($sql)\n ->execute(\n array( \n $idusuario,\n $data->nombreValoracion,\n $data->objetivo,\n $data->res_objetivo,\n $data->oportunamente,\n $data->res_oportunamente,\n $data->valoracion,\n $data->comentarios,\n 1,\n $data->id\n )\n );\n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n }else{\n $sql = \"UPDATE visitas_informe_valoracion \n SET inf_val_id_usuarioR = ?,\n inf_val_nombreValoracion = ?,\n inf_val_cumpleObjetivo = ?,\n inf_val_cumpleObjetivoRespuesta = ?,\n inf_val_oportunamente = ?,\n inf_val_oportunamenteRespuesta = ?,\n inf_val_valoracionDespacho = ?,\n inf_val_observaciones = ?\n WHERE inf_val_id = ?\";\n\n $this->pdo->prepare($sql)\n ->execute(\n array( \n $idusuario,\n $data->nombreValoracion,\n $data->objetivo,\n $data->res_objetivo,\n $data->oportunamente,\n $data->res_oportunamente,\n $data->valoracion,\n $data->comentarios,\n $data->id\n )\n );\n } \n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "1d51faf88b0535c36d94410b85d9b57f", "score": "0.60285145", "text": "public function GuardarTrasladoDescargado($idTraslado,$VectorTraslado) {\r\n $Costo=0;\r\n $consulta=$this->ConsultarTabla(\"traslados_items\", \" WHERE idTraslado='$idTraslado'\");\r\n if($this->NumRows($consulta)){\r\n while($DatosItems= $this->FetchArray($consulta)){\r\n $fecha=$DatosItems[\"Fecha\"];\r\n $Costo=$Costo+($DatosItems[\"CostoUnitario\"]*$DatosItems[\"Cantidad\"]);\r\n $DatosProducto=$this->DevuelveValores(\"productosventa\", \"Referencia\", $DatosItems[\"Referencia\"]);\r\n if($DatosProducto[\"idProductosVenta\"]==''){\r\n $DatosProducto=$this->DevuelveValores(\"productosventa\", \"idProductosVenta\", $DatosItems[\"CodigoBarras\"]);\r\n }\r\n if(empty($DatosProducto[\"idProductosVenta\"])){\r\n $VectorPTI[\"FUT\"]=\"\";\r\n $idProducto=$this->CrearProductoFromItemTraslado($DatosItems[\"ID\"],$VectorPTI);\r\n $idProducto=$DatosItems[\"CodigoBarras\"];\r\n }else{\r\n \r\n $DatosKardex[\"Cantidad\"]=$DatosItems['Cantidad'];\r\n $DatosKardex[\"idProductosVenta\"]=$DatosProducto[\"idProductosVenta\"];\r\n $DatosKardex[\"CostoUnitario\"]=$DatosProducto['CostoUnitario'];\r\n $DatosKardex[\"Existencias\"]=$DatosProducto['Existencias'];\r\n $DatosKardex[\"Detalle\"]=\"Traslado\";\r\n $DatosKardex[\"idDocumento\"]=$idTraslado;\r\n $DatosKardex[\"TotalCosto\"]=$DatosItems['Cantidad']*$DatosProducto['CostoUnitario'];\r\n $DatosKardex[\"Movimiento\"]=\"ENTRADA\";\r\n $DatosKardex[\"CostoUnitarioPromedio\"]=$DatosProducto[\"CostoUnitarioPromedio\"];\r\n $DatosKardex[\"CostoTotalPromedio\"]=$DatosProducto[\"CostoUnitarioPromedio\"]*$DatosKardex[\"Cantidad\"];\r\n $this->InserteKardex($DatosKardex); \r\n $idProducto=$DatosProducto[\"idProductosVenta\"];\r\n $sql=\"UPDATE productosventa SET PrecioVenta='$DatosItems[PrecioVenta]',PrecioMayorista='$DatosItems[PrecioMayorista]', Departamento='$DatosItems[Departamento]',Sub1='$DatosItems[Sub1]',Sub2='$DatosItems[Sub2]',\" \r\n . \" Sub3='$DatosItems[Sub3]',Sub4='$DatosItems[Sub4]' ,Sub5='$DatosItems[Sub5]' WHERE idProductosVenta='$idProducto'\";\r\n $this->Query($sql);\r\n }\r\n $DatosCodigoBarras=$this->DevuelveValores(\"prod_codbarras\", \"CodigoBarras\", $DatosItems['CodigoBarras']);\r\n if($DatosCodigoBarras[\"CodigoBarras\"]==\"\" and $DatosItems['CodigoBarras']<>\"\"){\r\n $this->AgregueCodBarras($idProducto,$DatosItems['CodigoBarras'],\"\");\r\n }\r\n $DatosCodigoBarras=$this->DevuelveValores(\"prod_codbarras\", \"CodigoBarras\", $DatosItems['CodigoBarras1']);\r\n if($DatosCodigoBarras[\"CodigoBarras\"]==\"\" and $DatosItems['CodigoBarras1']<>\"\"){\r\n $this->AgregueCodBarras($idProducto,$DatosItems['CodigoBarras1'],\"\");\r\n }\r\n $DatosCodigoBarras=$this->DevuelveValores(\"prod_codbarras\", \"CodigoBarras\", $DatosItems['CodigoBarras2']);\r\n if($DatosCodigoBarras[\"CodigoBarras\"]==\"\" and $DatosItems['CodigoBarras2']<>\"\"){\r\n $this->AgregueCodBarras($idProducto,$DatosItems['CodigoBarras2'],\"\");\r\n }\r\n $DatosCodigoBarras=$this->DevuelveValores(\"prod_codbarras\", \"CodigoBarras\", $DatosItems['CodigoBarras3']);\r\n if($DatosCodigoBarras[\"CodigoBarras\"]==\"\" and $DatosItems['CodigoBarras3']<>\"\"){\r\n $this->AgregueCodBarras($idProducto,$DatosItems['CodigoBarras3'],\"\");\r\n }\r\n $DatosCodigoBarras=$this->DevuelveValores(\"prod_codbarras\", \"CodigoBarras\", $DatosItems['CodigoBarras4']);\r\n if($DatosCodigoBarras[\"CodigoBarras\"]==\"\" and $DatosItems['CodigoBarras4']<>\"\"){\r\n $this->AgregueCodBarras($idProducto,$DatosItems['CodigoBarras4'],\"\");\r\n }\r\n \r\n }\r\n $VectorCosto[\"Fut\"]=\"\";\r\n $this->RegistreCostoLibroDiario(\"SI\", $Costo,$fecha,$idTraslado,1,$VectorCosto);\r\n $this->update(\"traslados_mercancia\", \"Estado\", \"VERIFICADO\", \"WHERE ID='$idTraslado'\");\r\n $this->update(\"traslados_items\", \"Estado\", \"VERIFICADO\", \"WHERE idTraslado='$idTraslado'\");\r\n }\r\n }", "title": "" }, { "docid": "72c111678262c303739d70fb45cf45bb", "score": "0.6022799", "text": "public function reporte_estado_cuenta($IdCliente){\n\n\n\t\t$middleRpta = $this->valida_id_cliente($IdCliente);\n\n\t\tif($middleRpta[\"status\"]!=\"ok\"){\n\n\t\t\treturn $this->redireccion_404();\n\n\t\t}\n\n\n\t\t$query_1 = DB::select(\"SELECT * FROM consorcio\");\n\n\t\t$array_asoc = array();\n\n\t\t$array_porc = array();\n\t\t\n\n\t\tforeach ($query_1 as $value) {\n\t\t\t\n\t\t\t$id_cliente_cons = $value->IdCliente;\n\n\t\t\t$clientes_asoc = $value->clientes_asociados;\n\n\t\t\t$clientes = str_replace(\"]\",\"\",str_replace(\"[\",\"\",$clientes_asoc));\n\n\t\t\t$array_clientes = explode(\",\", $clientes);\n\n\t\t\t\n\n\t\t\t$porcentajes_asoc = $value->porcentajes_asociados;\n\n\t\t\t$porcentajes = str_replace(\"]\",\"\",str_replace(\"[\",\"\",$porcentajes_asoc));\n\t\t\t\n\t\t\t$array_porcentajes = explode(\",\", $porcentajes);\n\n\t\t\t\n\t\t\t\n\n\t\t\tif(in_array($IdCliente,$array_clientes)){\n\n\t\t\t\t$array_asoc[] = $id_cliente_cons;\n\n\t\t\t\t$key = array_search($IdCliente,$array_clientes);\n\t\t\t\t\n\t\t\t\t//buscamos el porcentaje en el arreglo respectivamente\n\n\t\t\t\t$array_porc[$id_cliente_cons] = $array_porcentajes[$key];\n\n\t\t\t}\n\t\t\t\n\n\t\t}\n\n\t\t\n\n\t\tif(count($array_asoc)==0){\n\n\t\t\t//$clientes_string = '0';\n\t\t\t//no pertenece a ningun consorcio\n\n\t\t\t$clientes_string = $IdCliente;\n\n\t\t\t$array_porc[$IdCliente] = '100';\n\n\t\t}else{\n\t\t\t//esta incluido en al menos 1 consorcio\n\t\t\t$clientes_string = implode(\",\", $array_asoc);\n\n\t\t\t//se mostraran porcentajes\n\t\t}\n\n\t\t\n\n\t\t\n\t\t$cartas = DB::select(\"SELECT o.IdObra,\n\t\t o.CodigoObra,\n\t\t o.Descripcion,\n\t\t cfd.TipoCarta,\n\t\t cfd.IdCliente,\n\t\t (SELECT Descripcion FROM tabla_maestra WHERE IdTabla=85 AND valor=cfd.TipoCarta) AS DescripcionTipoCarta,\n\t\t cfd.CodigoMoneda,\n\t\t cfd.Monto AS MontoActual,\n\n\t\t (SELECT Monto FROM carta_fianza_detalle WHERE TipoCarta=cfd.TipoCarta AND NumeroCarta=cfd.NumeroCarta ORDER BY FechaCreacionSistema ASC LIMIT 1) AS MontoOriginal,\n\n\t\t \n\t\t cfd.EstadoCF,\n\t\t (SELECT nombre FROM cliente WHERE IdCliente = cfd.IdCliente) AS fullNameCliente,\n\t\t (SELECT nombre FROM cliente WHERE IdCliente = cfd.IdFinanciera) AS fullNameFinanciera,\n\t\t cfd.IdFinanciera,\n\t\t cfd.CodigoCarta,\n\t\t cfd.CartaAnterior,\n\t\t DATE_FORMAT(cfd.FechaVence, '%d/%m/%Y') as FechaVence\nFROM carta_fianza_detalle cfd \nINNER JOIN carta_fianza cf ON cf.IdCartaFianza = cfd.IdSolicitud\nINNER JOIN obra o ON o.IdObra = cf.IdObra\nWHERE o.IdCliente IN($clientes_string) AND cfd.EstadoCF IN('VIG') order BY cfd.IdFinanciera DESC , o.CodigoObra desc ,cfd.TipoCarta asc,cfd.FechaCreacionSistema desc;\n\");\n\n\t\t//AND cfd.EstadoCF NOT IN('PRO') condicion para discriminar cartas en proceso\n\t\t\n\t\t//solo se mostraran las cartas vigentes y el monto original es el primero de todas las cartas\n\n\t\t// se quitara el if null \n\n\t\t//IFNULL((SELECT Monto FROM carta_fianza_detalle where IdCartaFianzaDetalle=cfd.CartaAnterior),cfd.Monto) AS MontoOriginal\n\n\t\tif(count($cartas)==0){\n\n\t\t\treturn $this->redireccion_404();\n\n\t\t}\n\n\n\t\t//financieras unicas - obras unicas\n\n\t\t$financieras_unicas=array();\n\t\t$obras_unicas=array();\n\n\t\tforeach ($cartas as $value) {\n\n\t\t\t$financieras_unicas[] = $value->IdFinanciera;\n\t\t\t$obras_unicas[] = $value->CodigoObra;\n\n\t\t}\n\n\t\t$financieras_unicas = array_unique($financieras_unicas);\n\t\t$obras_unicas = array_unique($obras_unicas);\n\t\t\n\t\t$final = array();\n\n\t\tforeach ($financieras_unicas as $fu) {\n\t\t\t\n\t\t\t$sum_obras = array();\n\n\t\t\t//\n\t\t\t//$detalle_cartas=array();\n\n\t\t\tforeach ($obras_unicas as $ou) {\n\t\t\t\t//valida contador\n\n\t\t\t\t$count = DB::select(\"SELECT count(*) as num_row\n\t\t\t\t\tFROM carta_fianza_detalle cfd \n\t\t\t\t\tINNER JOIN carta_fianza cf ON cf.IdCartaFianza = cfd.IdSolicitud\n\t\t\t\t\tINNER JOIN obra o ON o.IdObra = cf.IdObra\n\t\t\t\t\tWHERE o.IdCliente IN($clientes_string) AND cfd.EstadoCF IN('VIG') AND cfd.IdFinanciera =? AND o.CodigoObra=?;\",array($fu,$ou));\n\n\t\t\t\t$count = json_decode(json_encode($count), true);\n\n\t\t\t\tif($count[0]['num_row']>0){\n\n\t\t\t\t\t$query = DB::select(\"SELECT sum(cfd.Monto) as Totalizado_Actual,\n\t\t\t\t\tsum((SELECT Monto FROM carta_fianza_detalle WHERE TipoCarta=cfd.TipoCarta AND NumeroCarta=cfd.NumeroCarta ORDER BY FechaCreacionSistema ASC LIMIT 1)) as Totalizado_Original\n\t\t\t\t\tFROM carta_fianza_detalle cfd \n\t\t\t\t\tINNER JOIN carta_fianza cf ON cf.IdCartaFianza = cfd.IdSolicitud\n\t\t\t\t\tINNER JOIN obra o ON o.IdObra = cf.IdObra\n\t\t\t\t\tWHERE o.IdCliente IN($clientes_string) AND cfd.EstadoCF IN('VIG') AND cfd.IdFinanciera =? AND o.CodigoObra=?;\",array($fu,$ou));\n\n\t\t\t\t\t$query = json_decode(json_encode($query), true); \n\n\t\t\t\t\t$obra = Obra::where('CodigoObra',$ou)->first();\n\n\t\t\t\t\t$obra_name = $obra->Descripcion;\n\n\t\t\t\t\t//detale de las cartas fianzas\n\n\n\t\t\t\t\t$cartasx = DB::select(\"SELECT \n\n\t\t \t\t\t(SELECT Descripcion FROM tabla_maestra WHERE IdTabla=85 AND valor=cfd.TipoCarta) AS DescripcionTipoCarta,\n\t\t \t\t\tcfd.Monto AS MontoActual,\n\t\t \t\t\t(SELECT Monto FROM carta_fianza_detalle WHERE TipoCarta=cfd.TipoCarta AND NumeroCarta=cfd.NumeroCarta ORDER BY FechaCreacionSistema ASC LIMIT 1) AS MontoOriginal,\n\t\t \t\t\t(SELECT nombre FROM cliente WHERE IdCliente = cfd.IdCliente) AS fullNameCliente,\n\t\t \t\t\tcfd.CodigoCarta,\n\t\t \t\t\tcfd.IdCliente,\n\t\t \t\t\tDATE_FORMAT(cfd.FechaVence, '%d/%m/%Y') as FechaVence\n\t\t\t\t\tFROM carta_fianza_detalle cfd \n\t\t\t\t\tINNER JOIN carta_fianza cf ON cf.IdCartaFianza = cfd.IdSolicitud\n\t\t\t\t\tINNER JOIN obra o ON o.IdObra = cf.IdObra\n\t\t\t\t\tWHERE o.IdCliente IN($clientes_string) AND cfd.EstadoCF IN('VIG') AND cfd.IdFinanciera =? AND o.CodigoObra=? order BY cfd.TipoCarta asc,cfd.FechaCreacionSistema desc;\",array($fu,$ou));\n\n\t\t\t\t\n\n\t\t\t\t\t//fin del detalle de cartas\n\t\t\t\t\t$sum_obras[] = array(\"obra\"=>$obra_name,\"suma_actual\"=>$query[0]['Totalizado_Actual'],\"suma_original\"=>$query[0]['Totalizado_Original'],\"sub_detalle\"=>$cartasx);\n\t\t\t\t}\n\n\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\n\t\t\t//totalizado para financieras \n\n\t\t\t $sql_financieras = DB::select(\"SELECT sum(cfd.Monto) as Totalizado_Actual,\n\t\t\t \tsum((SELECT Monto FROM carta_fianza_detalle WHERE TipoCarta=cfd.TipoCarta AND NumeroCarta=cfd.NumeroCarta ORDER BY FechaCreacionSistema ASC LIMIT 1)) as Totalizado_Original\n\t\t\t\t\tFROM carta_fianza_detalle cfd \n\t\t \t\t\tINNER JOIN carta_fianza cf ON cf.IdCartaFianza = cfd.IdSolicitud\n\t\t \t\t\tINNER JOIN obra o ON o.IdObra = cf.IdObra\n\t\t \t\t\tWHERE o.IdCliente IN($clientes_string) AND cfd.EstadoCF IN('VIG') AND cfd.IdFinanciera =? ;\",array($fu));\n\n\t\t \t$sql_financieras = json_decode(json_encode($sql_financieras), true); \n\n\t\t\t$financiera = Cliente::where('IdCliente',$fu)->first();\n\n\t\t\t$final[] = array(\"financiera\"=>$financiera->Nombre,\"detalle\"=>$sum_obras,\"totalizado_financieras_actual\"=>$sql_financieras[0][\"Totalizado_Actual\"],\"totalizado_financieras_original\"=>$sql_financieras[0][\"Totalizado_Original\"]);\n\t\t}\n\t\t\n\t\t//dd($final);\n\t\t//die();\n\n\t\t$cliente = Cliente::where('IdCliente',$IdCliente)->first();\n\n\t\t$empresa = $cliente->Nombre;\n\n\t\t$identificacion = $cliente->Identificacion;\n\n\t\t$pdf = \\App::make('dompdf.wrapper');\n \n $pdf->setPaper('A4');\n $pdf->loadView('reports.reporte_estado_cuenta',compact('cartas','empresa','identificacion','final','array_porc'));\n \n return $pdf->stream();\n\n\t}", "title": "" }, { "docid": "bf6f84b0564913194b1d039d6050174b", "score": "0.60159606", "text": "public function getDados() {\n\n $aLinhasUtilizamBalanceteReceita = array(3, 4, 5, 6);\n $aLinhasUtilizamBalanceteDespesa = array(26, 27, 28, 29);\n $aLinhasUtilizamBalanceteVerificacao = array();\n \n $sWhereReceita = \" o70_instit in({$this->getInstituicoes()})\";\n $sWhereDespesa = \" o58_instit in({$this->getInstituicoes()})\";\n $sWherePlano = \" c61_instit in({$this->getInstituicoes()})\";\n\n $rsReceita = db_receitasaldo(11, 1, 3, true, $sWhereReceita, $this->iAnoUsu,\n $this->getDataInicial()->getDate(),\n $this->getDataFinal()->getDate()\n );\n\n\n\n $rsBalanceteDespesa = db_dotacaosaldo(8,2,2, true, $sWhereDespesa,\n $this->iAnoUsu,\n $this->getDataInicial()->getDate(),\n $this->getDataFinal()->getDate()\n );\n\n\n $rsBalanceteVerificacao = db_planocontassaldo_matriz($this->iAnoUsu,\n $this->getDataInicial()->getDate(),\n $this->getDataFinal()->getDate(),\n false,\n $sWherePlano,\n '',\n 'true',\n 'false'\n );\n \n $aLinhas = $this->getLinhasRelatorio();\n foreach ($aLinhas as $iLinha => $oLinha) {\n\n if ($oLinha->totalizar) {\n continue;\n }\n\n $aValoresColunasLinhas = $oLinha->oLinhaRelatorio->getValoresColunas(null, null, $this->getInstituicoes(),\n $this->iAnoUsu);\n foreach($aValoresColunasLinhas as $oValores) {\n foreach ($oValores->colunas as $oColuna) {\n $oLinha->{$oColuna->o115_nomecoluna} += $oColuna->o117_valor;\n }\n }\n\n if (in_array($iLinha, $aLinhasUtilizamBalanceteReceita)) {\n\n $oColuna = new stdClass();\n $oColuna->nome = 'vlrexatual';\n $oColuna->formula = '#saldo_arrecadado_acumulado';\n RelatoriosLegaisBase::calcularValorDaLinha($rsReceita,\n $oLinha,\n array($oColuna),\n RelatoriosLegaisBase::TIPO_CALCULO_RECEITA\n );\n continue;\n }\n\n if (in_array($iLinha, $aLinhasUtilizamBalanceteDespesa)) {\n\n $oColuna = new stdClass();\n $oColuna->nome = 'vlrexatual';\n $oColuna->formula = '#liquidado_acumulado';\n RelatoriosLegaisBase::calcularValorDaLinha($rsBalanceteDespesa,\n $oLinha,\n array($oColuna),\n RelatoriosLegaisBase::TIPO_CALCULO_DESPESA\n );\n continue;\n }\n\n $oColuna = new stdClass();\n $oColuna->nome = 'vlrexatual';\n $oColuna->formula = '#saldo_final';\n\n RelatoriosLegaisBase::calcularValorDaLinha($rsBalanceteVerificacao,\n $oLinha,\n array($oColuna),\n RelatoriosLegaisBase::TIPO_CALCULO_VERIFICACAO\n );\n }\n\n $this->processaTotalizadores($aLinhas);\n return $aLinhas;\n }", "title": "" }, { "docid": "5563254cbc0e98b45322be72e979cf28", "score": "0.6012951", "text": "public function consulta_carrito(){\n\t\t\t\n\t $this->que_dba=\"SELECT * FROM temp_pedido t, inventario i \n\t where \n\t t.inventario_cod_inv=i.cod_inv\n\t AND t.usuario_cod_usu='\".$_SESSION['cod_usu'].\"' AND t.cod_tem_ped='\".$this->cod_tem_ped.\"'; \"; \n\t\t\n\t\treturn $this->ejecutar();\n\t}", "title": "" }, { "docid": "77a4df8bcd78dc1cd2492133a87caaea", "score": "0.60027987", "text": "public function buscar_acreditacion()\n\t{\n\t\t$dato = $this->input->get('dato');\n\t\t$array = explode(',', $dato);\n\t\t$bloque = $array[0];\n\t\t$asignarea = $array[1];\n\t\t$estudiante = $array[2];\n\t\t$nivel = $array[3];\n\t\t$ciclo = date('Y-00-00');\n\n\t\tif ($nivel == 4) {\n\t\t\t$datos = $this->Puntos_model->findNotasEstudianteC($asignarea, $ciclo, $estudiante, $bloque);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($nivel == 5) {//para el nivel básico por madurez\n\t\t\t\t$datos = $this->Puntos_model->findNotasEstudianteM($asignarea, $ciclo, $estudiante, $bloque);\n\t\t\t} else {//para el resto de niveles\n\t\t\t\t$datos = $this->Puntos_model->findNotasEstudiante($asignarea, $ciclo, $estudiante, $bloque);\n\t\t\t}//fin del if else\n\n\t\t}\n\t\techo json_encode($datos);\n\t}", "title": "" }, { "docid": "f9e86afc26446cc79f795f16b1825af9", "score": "0.59869367", "text": "function comprobarSiUsuarioFinalizoTarea()\n{\n if (isset($_POST['accion']) && $_POST['accion'] === 'usuarioFinalizoTarea') {\n if (gestionarSesionyRol(0) == 1) {\n $conector = new ConectorBD();\n\n //comprobamos que el usuario tenga permisos para crear anotaciones en la tarea\n $consulta = \"SELECT * FROM `Usuarios:Tareas:PermisosNotificaciones` WHERE fk_correo ='\" . $_SESSION['correo'] . \"' AND fk_idTarea = '\" . $_POST['id'] . \"'\";\n\n\n $resultado = $conector->consultarBD($consulta)->fetchAll(PDO::FETCH_ASSOC);\n\n if (count($resultado) > 0) {\n //ahora comprobamos si el usuario le ha dado a tarea finalizada.\n\n\n if ($resultado[0]['finalizacionTarea'] == NULL || $resultado[0]['finalizacionTarea'] == 0) {\n echo 1;\n } else {\n echo 2;\n }\n } else {\n echo -1;\n }\n }\n }\n}", "title": "" }, { "docid": "e36a5f111b412430eb504a2b5930b178", "score": "0.5986439", "text": "public function Guardar_Informe_Remision($data){\n $modelo = new Visita();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n $data_usuario = $modelo->get_dato_usuario($_SESSION['idUsuario']);\n $datos_user = $data_usuario->fetch();\n $nombre_us = $datos_user['empleado'];\n \n $tiporegistro = (\"Documento Remisión Informe Visita Domiciliaria\");\n $accion = \"Registra un Nuevo \".$tiporegistro.\" En el Sistema (T. Social) TRABAJO SOCIAL\";\n $detalle = $nombre_us.\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 10;\n $idusuario = $_SESSION['idUsuario'];\n \n date_default_timezone_set('America/Bogota'); \n $fecha_remision = date('Y-m-d');\n $anio = date('Y');\n $year=date('y'); \n // DATOS LOG PARA SIGDOC\n $tiporegistroD = \"Salida de Documento\";\n $accionD = \"Registra una Nueva \".$tiporegistroD.\" En el Sistema (SIGDOC) REGISTRO DE DOCUMENTOS SALIENTES\";\n $detalleD = $nombre_us.\" \".$accionD.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipologD = 4;\n $tipodocumento = 2;\n \n //ECHO \"TIPO REg. ts \".$tiporegistro.\" detalle: \".$detalle;\n //echo \"<br> tipo reg Doc: \".$tiporegistroD.\" detalle: \".$detalleD;\n $asunto = \"REMISION INFORME SOCIAL\";\n \n try {\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n \n $listar = $this->pdo->prepare(\"SELECT MAX(di.id) AS idmaximo,di.sigla,di.contador\n FROM sigdoc_pa_consecutivo AS di\n WHERE di.idtipodocumento = '$tipodocumento'\");\n $listar->execute();\n $field = $listar->fetch();\n \n $numeroconsecutivo = $field['contador'];\n $consecutivo = $numeroconsecutivo + 1; \n\n if($consecutivo >= 0 && $consecutivo <= 9) {$consecutivo = \"00\".$consecutivo;}\n if($consecutivo > 9 && $consecutivo <= 99){$consecutivo = \"0\".$consecutivo;}\n\n echo $ndocumento = $field['sigla'].\"\".$year.\"-\".$consecutivo;\n if($data->num_oficio ==\"\"){\n $sql = \"UPDATE visitas_informe_remision \n SET inf_rem_id_usuarioReg = ?,\n inf_rem_fecha_remision = ?,\n inf_rem_num_oficio = ?,\n inf_rem_num_folios = ?,\n inf_rem_observaciones = ?,\n inf_rem_enviado = ?\n WHERE inf_rem_id = ?\";\n\n $this->pdo->prepare($sql)\n ->execute(\n array( \n $idusuario,\n $fecha_remision,\n $ndocumento,\n $data->num_folios,\n $data->comentarios,\n 0,\n $data->id\n )\n );\n $this->pdo->exec(\"UPDATE sigdoc_pa_consecutivo SET contador = '$consecutivo' WHERE idtipodocumento = '$tipodocumento'\");\n $this->pdo->exec(\"INSERT INTO sigdoc_documentos_internos (idusuario,idusuarioedita,identrada,idtipodocumento,numero,\n dirigidoa, cargo, dependencia, fechageneracion,fechaedita,asunto,contenido,aniodoc)\n VALUES (\n '$idusuario',0,0,'$tipodocumento','$ndocumento','7','JUEZ','$data->juzgadoSolicitante','$fecha_remision','0000-00-00',\n '$asunto','$data->contenidoDoc','$anio'\n )\");\n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accionD','$detalleD','$idusuario','$tipologD')\");\n }else{\n $sql = \"UPDATE visitas_informe_remision \n SET inf_rem_id_usuarioReg = ?,\n inf_rem_fecha_remision = ?,\n inf_rem_num_folios = ?,\n inf_rem_observaciones = ?,\n inf_rem_enviado = ?\n WHERE inf_rem_id = ?\";\n\n $this->pdo->prepare($sql)\n ->execute(\n array( \n $idusuario,\n $fecha_remision,\n $data->num_folios,\n $data->comentarios,\n 0,\n $data->id\n )\n );\n }\n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "7d1572d546804d7d7bc618d67bf73f91", "score": "0.59817827", "text": "function listar_contratos($id_contrato){\n //Esta validaci&oacute;n verifica si llega algun valor en el id, con el\n //fin de filtrar la consulta por un solo id de contrato\n if($id_contrato){\n $id_contrato = 'WHERE c.Pk_Id_Contrato = '.$id_contrato;\n }\n \n //Consulta\n $sql = \n 'SELECT\n c.Pk_Id_Contrato,\n c.Numero,\n tbl_terceros.Pk_Id_Terceros,\n tbl_terceros.Nombre AS Contratista,\n tbl_terceros.Documento AS Documento_Contratista,\n tbl_terceros.Telefono AS Telefono_Contratista,\n tbl_terceros.Direccion AS Direccion_Contratista,\n tbl_terceros.Representante_Legal,\n c.Objeto,\n c.Lugar,\n tbl_estados.Pk_Id_Estado,\n tbl_estados.Estado,\n c.Valor_Inicial,\n (SELECT\n IFNULL(SUM(contratos_adiciones.Valor), 0)\n FROM\n contratos_adiciones\n WHERE\n contratos_adiciones.Fk_Id_Contrato = c.Pk_Id_Contrato) AS Valor_Adiciones,\n c.Plazo AS Plazo_Inicial,\n (SELECT\n IFNULL(SUM(adiciones.Plazo), 0)\n FROM\n contratos_adiciones AS adiciones \n WHERE\n adiciones.Fk_Id_Contrato = c.Pk_Id_Contrato) AS Plazo_Adiciones,\n c.Fecha_Inicial,\n c.Fecha_Vencimiento,\n c.Porcentaje_Avance,\n c.Acta_Inicio,\n c.Fecha_Acta_Inicio,\n t.Pk_Id_Terceros AS Pk_Id_Tercero_Contratante,\n t.Nombre AS Contratante\n FROM\n contratos AS c\n INNER JOIN tbl_terceros ON c.Fk_Id_Terceros = tbl_terceros.Pk_Id_Terceros\n INNER JOIN tbl_estados ON c.Fk_Id_Estado = tbl_estados.Pk_Id_Estado\n LEFT JOIN tbl_terceros AS t ON c.Fk_Id_Terceros_Contratante = t.Pk_Id_Terceros '.\n $id_contrato; \n //Se retorna la consulta\n return $this->db->query($sql)->result(); \n }", "title": "" }, { "docid": "89c5056cae8bd34189bbb29adf03fae0", "score": "0.5980656", "text": "public function totaldetotal() {\n $request = \\Config\\Services::request();\n $validation = \\Config\\Services::validation();\n $headers = $request->getHeaders();\n\n $registroModel = new RegistrosModel($db);\n $registro = $registroModel->where('estado', 1)\n ->findAll();\n\n //$db = \\Config\\Database::connect();\n //$pager = \\Config\\Services::pager();\n foreach ($registro as $key => $value) {\n\n if (array_key_exists('Authorization', $headers) && !empty($headers['Authorization'])) {\n\n if ($request->getHeader('Authorization') == 'Authorization: Basic ' . base64_encode($value[\"cliente_id\"] . \":\" . $value[\"llave_secreta\"])) {\n\n $balanceModel = new BalanceModel($db);\n $total10 = $balanceModel->get_total_debehaber_10();\n $total12 = $balanceModel->get_total_debehaber_12();\n $total14 = $balanceModel->get_total_debehaber_14();\n $total20 = $balanceModel->get_total_debehaber_20();\n $total33 = $balanceModel->get_total_debehaber_33();\n $total40 = $balanceModel->get_total_debehaber_40();\n $total41 = $balanceModel->get_total_debehaber_41();\n $total42 = $balanceModel->get_total_debehaber_42();\n $total45 = $balanceModel->get_total_debehaber_45();\n $total46 = $balanceModel->get_total_debehaber_46();\n\n $total50 = $balanceModel->get_total_debehaber_50();\n $total59 = $balanceModel->get_total_debehaber_59();\n $total60 = $balanceModel->get_total_debehaber_60();\n $total61 = $balanceModel->get_total_debehaber_61();\n $total62 = $balanceModel->get_total_debehaber_62();\n $total63 = $balanceModel->get_total_debehaber_63();\n $total69 = $balanceModel->get_total_debehaber_69();\n $total70 = $balanceModel->get_total_debehaber_70();\n $total79 = $balanceModel->get_total_debehaber_79();\n $total94 = $balanceModel->get_total_debehaber_94();\n $total95 = $balanceModel->get_total_debehaber_95();\n // $total46 = $balanceModel->get_total_debehaber_46();\n\n \n if (!empty($total10)) {\n\n $data = array(\n \"Status\" => 200,\n \"Total_Resultados\" => count($total10),\n \"Detalle10\" => $total10,\n \"Detalle12\" => $total12,\n \"Detalle14\" => $total14,\n \"Detalle20\" => $total20,\n \"Detalle33\" => $total33,\n\n \"Detalle40\" => $total40,\n \"Detalle41\" => $total41,\n \"Detalle42\" => $total42,\n \"Detalle45\" => $total45,\n \"Detalle46\" => $total46,\n\n \"Detalle50\" => $total50,\n \"Detalle59\" => $total59,\n \"Detalle60\" => $total60,\n \"Detalle61\" => $total61,\n \"Detalle62\" => $total62,\n\n \"Detalle63\" => $total63,\n \"Detalle69\" => $total69,\n \"Detalle70\" => $total70,\n \"Detalle79\" => $total79,\n\n \"Detalle94\" => $total94,\n \"Detalle95\" => $total95\n\n //\"Paginador\"=>$paginador\n );\n return json_encode($data, true);\n } else {\n\n $data = array(\n \"Status\" => 404,\n \"Total_Resultados\" => 0,\n \"Detalle\" => \"Ningún registro cargado\"\n );\n }\n } else {\n\n $data = array(\n \"Status\" => 404,\n \"Detalle\" => \"El token es inválido\"\n );\n }\n } else {\n\n $data = array(\n \"Status\" => 404,\n \"Detalle\" => \"No está autorizado para recibir los registros\"\n );\n }\n }\n\n return json_encode($data, true);\n }", "title": "" }, { "docid": "fa3067d51b53548fc7ba80bff27f5f61", "score": "0.59744644", "text": "function _dbfetch_saleorder_details($id) {\n\t\tif (!is_numeric($id) OR $id == 0) return FALSE;\n\t\tif (!is_array($this->_aIDAlbaran)) $hay_albaranes = 0;\n\t\telse $hay_albaranes = sizeof($this->_aIDAlbaran);\n\t\t$leyenda_divisa = $this->_aDivisa['leyenda'];\n\t\t$campo_accion = $this->_aTarifa['campo_accion'];\n\t\t$campo_rec = $this->_aTarifa['campo_recomendacion'];\n\t\t$oDb = $this->_db;\n\n\t\t$cons = \"SELECT Det.id_detalle as 'id_detalle', \".\n\t\t\t\t\t\"Det.id_articulo as 'id_articulo', \".\n\t\t\t\t\t\"Det.id_pedido as 'id_pedido', \".\n\t\t\t\t\t\"Det.id_servicio as 'id_servicio', \".\n\t\t\t\t\t\"Det.cantidad_recibida as 'cantidad_recibida', \".\n\t\t\t\t\t( ($hay_albaranes) \n\t\t\t\t\t\t? \"Det.cantidad - Det.cantidad_recibida as 'cantidad_residual', \"\n\t\t\t\t\t\t: \"\" ).\n\t\t\t\t\t\"FraDet.cantidad as 'cantidad', \".\n\t\t\t\t\t\"Det.precio_articulo as 'precio_tarifa', \".\n\t\t\t\t\t\"Det.descuento as 'descuento', \".\n\t\t\t\t\t\"Det.monto as 'monto', \".\n\t\t\t\t\t\"FraDet.importe as 'base_imponible', \".\n\t\t\t\t\t// \"Det.precio_articulo - (Det.precio_articulo * Det.descuento / 100) \".\n\t\t\t\t\t // \"- Det.monto as 'precio_tarifa_descuento', \".\n\t\t\t\t\t\"IF ( (Det.descuento > 0 OR Det.monto > 0),\".\n\t\t\t\t\t\"IF(Det.descuento>0,CONCAT(Det.descuento,' %'),CONCAT(Det.monto,' $leyenda_divisa')) \".\n\t\t\t\t\t\",NULL) as 'tipo_descuento', \".\n\t\t\t\t\t\"IF ( (Det.descuento > 0 OR Det.monto > 0),\".\n\t\t\t\t\t\t\"IF(Det.descuento>0,\".\n\t\t\t\t\t\t\t\"Det.precio_articulo - (Det.precio_articulo * Det.descuento / 100),\".\n\t\t\t\t\t\t\t\t\"Det.precio_articulo - Det.monto) \".\n\t\t\t\t\t\t\",NULL) as 'precio_tarifa_descuento', \".\n\t\t\t\t\t\"FraDet.notas as 'observaciones', \".\n\t\t\t\t\t\"FraDet.iextra1 as 'iextra1', \".\n\t\t\t\t\t\"FraDet.iextra2 as 'iextra2', \".\n\t\t\t\t\t\"FraDet.iextra3 as 'iextra3', \".\n\t\t\t\t\t\"FraDet.iextra4 as 'iextra4', \".\n\t\t\t\t\t\"Det.oextra1 as 'oextra1', \".\n\t\t\t\t\t\"Det.oextra2 as 'oextra2', \".\n\t\t\t\t\t\"Det.oextra3 as 'oextra3', \".\n\t\t\t\t\t\"Det.oextra4 as 'oextra4', \".\n\t\t\t\t\t\"Det.id_servicio as 'id_servicio', \".\n\t\t\t\t\t\"Art.nombre as 'nombre', \".\n\t\t\t\t\t\"Art.referencia as 'referencia', \".\n\t\t\t\t\t\"Art.descripcion as 'descripcion', \".\n\t\t\t\t\t\"Art.id_familia as 'id_familia', \".\n\t\t\t\t\t\"Fam.nombre as 'nombre_familia', \".\n\t\t\t\t\t\"GFam.nombre as 'nombre_grupo_familia', \".\n\t\t\t\t\t\"Art.id_marca as 'id_marca', \".\n\t\t\t\t\t\"Mca.nombre as 'nombre_marca', \".\n\t\t\t\t\t\"Art.peso_unidad as 'peso_unidad', \".\n\t\t\t\t\t\"Art.id_unidad_medida as 'id_unidad_medida', \".\n\t\t\t\t\t\"Um.leyenda as 'leyenda_unidad_medida', \".\n\t\t\t\t\t\"Art.mascara_modulo as 'mascara_modulo', \".\n\t\t\t\t\t\"Cert.nombre as 'certificado', \".\n\t\t\t\t\t\"Cert.id_certificado as 'certificado_id', \".\n\t\t\t\t\t\"Det.cantidad as 'cantidad_pedida', \".\n\t\t\t\t\t\"(FraDet.cantidad*Art.peso_unidad) as 'peso', \".\n\t\t\t\t\t( (!empty($campo_rec)) \n\t\t\t\t\t ? \"Empart.$campo_rec as 'PVP_rec', \"\n\t\t\t\t\t : '').\n\t\t\t\t\t\"Empart.stock as 'control_stock', \".\n\t\t\t\t\t\"Empart.stock_ficticio as 'stock_estimado', \".\n\t\t\t\t\t\"SUM(La.cantidad) as 'stock_real', \".\n\t\t\t\t\t( ($this->_aPedido['id_factura'])\n\t\t\t\t\t\t? \"Empart.$campo_accion as 'precio_real', \"\n\t\t\t\t\t\t: \"\" ).\n\t\t\t\t\t\"Empart.dto_vol as 'dto_volumen', \".\n\t\t\t\t\t\"Empart.dto_vol_bultos as 'dto_volumen_bultos', \".\n\t\t\t\t\t\"Empart.unidades_bulto as 'unidades_bulto', \".\n\t\t\t\t\t\"Empart.bultos_capa_palet as 'bultos_capa_palet', \".\n\t\t\t\t\t\"Empart.capas_palet as 'capas_palet', \".\n\t\t\t\t\t\"Iva.id_iva as 'id_iva', \".\n\t\t\t\t\t\"Iva.porcentaje as 'porcentaje', \".\n\t\t\t\t\t\"Iva.recargo_equivalente as 'recargo_equivalente', \".\n\t\t\t\t\t\"Iva.cc_imp_repercutido as 'iva_cc_impuestos', \".\n\t\t\t\t\t\"Iva.cc_re_repercutido as 'iva_cc_recargos' \".\n\t\t\t\t\t\"FROM Lineas_detalle `Det`, Articulos `Art` LEFT JOIN Localizacion_articulos La ON (Art.id_articulo=La.id_articulo) \".\n\t\t\t\t\t\"LEFT JOIN Unidades_medida Um ON (Art.id_unidad_medida=Um.id_unidad_medida) \".\n\t\t\t\t\t\"LEFT JOIN Certificados Cert ON (Art.id_certificado=Cert.id_certificado), \".\n\t\t\t\t\t\"Familia_articulos `Fam` LEFT JOIN Grupo_familias GFam ON (Fam.id_grupo_familia=GFam.id_grupo_familia), \".\n\t\t\t\t\t\"Marcas `Mca`, Tipos_IVA `Iva`, \".\n\t\t\t\t\t\"Empresas_articulos `Empart`, Facturas `Fra`, Facturas_detalle `FraDet` \".\n\t\t\t\t\t\"WHERE Fra.id_factura = $id AND Fra.id_factura = FraDet.id_factura AND FraDet.id_detalle = Det.id_detalle AND \".\n\t\t\t\t\t\"Empart.id_articulo=Art.id_articulo AND Empart.id_empresa = Fra.id_empresa AND Art.id_marca = Mca.id_marca AND \".\n\t\t\t\t\t\"Det.id_articulo=Art.id_articulo AND Art.id_iva=Iva.id_iva AND Art.id_familia = Fam.id_familia \".\n\t\t\t\t\t\"GROUP BY id_detalle \".\n\t\t\t\t\t\"ORDER BY id_detalle asc \";\n\t\t$id_res = $oDb->query($cons);\n\t\t$this->_aIdxToAlb = array();\n\t\tif ($oDb->num_rows($id_res)) {\n\t\t\t$retval = TRUE;\n\t\t\t$this->_aDetalles = array();\n\t\t\t$total_bruto = 0;\n\t\t\t$total_peso = 0;\n\t\t\t$aPeds = array();\n\t\t\tfor($i = 1; $fila = $oDb->fetch_assoc($id_res); $i++ ) {\n\t\t\t\tif (!empty($campo_rec)) $fila['PVP_rec'] = $this->_applyRevenue($fila['PVP_rec'],$fila['porcentaje']);\n\t\t\t\tif (is_numeric($fila['id_pedido'])) $aPeds[$fila['id_pedido']] += $fila['base_imponible'];\n\t\t\t\tif ($fila['monto']>0) $fila['tipo_descuento_fmt'] = Document::format_number($fila['descuento'],$this->tot_decimals,true).\" $leyenda_divisa \";\n\t\t\t\telseif ($fila['descuento']>0) \n\t\t\t\t\t$fila['tipo_descuento_fmt'] = Document::format_number($fila['descuento'],$this->tot_decimals,true).\" % \";\n\t\t\t\t$this->_aDetalles[$i] = $fila;\n\n\t\t\t\t$aAlb = $this->getDeliveryFromDbDet($fila['id_detalle']);\n\t\t\t\tif (sizeof($aAlb))\n\t\t\t\t\tforeach ($aAlb as $ida) {\n\t\t\t\t\t\tif (!is_array($this->_aIdxToAlb[$i])) $this->_aIdxToAlb[$i] = array();\n\t\t\t\t\t\tarray_push($this->_aIdxToAlb[$i],$ida);\n\t\t\t\t\t}\n\n\t\t\t\t$this->indexFields($i);\n\n\t\t\t\t$total_bruto += $fila['base_imponible'];\n\t\t\t\t$total_peso += $fila['peso'];\n\t\t\t}\n\t\t\t$this->_adjustOrders($aPeds,true);\n\n\t\t\tif (!is_numeric($this->_aTotales['bruto']) OR $this->_aTotales['bruto']==0)\n\t\t\t\t$this->_aTotales['bruto'] = $total_bruto;\n\t\t\t$this->_aPedido['peso'] = $total_peso;\n\t\t} else $retval = FALSE;\n\n\t\treturn $retval;\n\t}", "title": "" }, { "docid": "92da631b8b8e5bc1e804353d7baeb95f", "score": "0.59693784", "text": "public function informacionTabla(){\r\n $sql=\"SELECT * FROM tbl_inventario_seguros ORDER BY idSeguros DESC\";\r\n\t\treturn ejecutarConsulta($sql); \r\n }", "title": "" }, { "docid": "79b54016dd6c53783515ff1714015332", "score": "0.59667015", "text": "public function RegistreVentaRapida($idPreventa, $idCliente, $TipoPago, $Paga, $Devuelta, $CuentaDestino, $DatosVentaRapida){\r\n \t\r\n $sql=\"SELECT * FROM preventa WHERE VestasActivas_idVestasActivas='$idPreventa'\";\r\n $Consulta=$this->Query($sql);\r\n if($this->NumRows($Consulta)<1){\r\n print(\"No hay articulos en la preventa\");\r\n exit(); \r\n }\r\n \r\n $CentroCostos=$DatosVentaRapida[\"CentroCostos\"];\r\n \r\n $ResolucionDian=$DatosVentaRapida[\"ResolucionDian\"];\r\n \r\n $Cheques=$DatosVentaRapida[\"PagaCheque\"];\r\n $Tarjetas=$DatosVentaRapida[\"PagaTarjeta\"];\r\n $idTarjetas=$DatosVentaRapida[\"idTarjeta\"];\r\n $PagaOtros=$DatosVentaRapida[\"PagaOtros\"];\r\n $Observaciones=$DatosVentaRapida[\"Observaciones\"];\r\n \r\n //$CuentaDestino=$_REQUEST[\"CmbCuentaDestino\"];\r\n //$CuentaDestino=110510;\r\n $OrdenCompra=\"\";\r\n $OrdenSalida=\"\";\r\n $ObservacionesFactura=$Observaciones;\r\n $FechaFactura=date(\"Y-m-d\");\r\n if(isset($DatosVentaRapida[\"FechaFactura\"])){\r\n $FechaFactura=$DatosVentaRapida[\"FechaFactura\"];\r\n }\r\n \r\n \r\n $Consulta=$this->DevuelveValores(\"centrocosto\", \"ID\", $CentroCostos);\r\n $EmpresaPro=$Consulta[\"EmpresaPro\"];\r\n if($TipoPago==\"Contado\"){\r\n $SumaDias=0;\r\n }else{\r\n $SumaDias=$TipoPago;\r\n }\r\n if($TipoPago==\"SisteCredito\"){\r\n $SumaDias=30;\r\n }\r\n ////////////////////////////////Preguntamos por disponibilidad\r\n ///////////\r\n ///////////\r\n $ID=\"\";\r\n $DatosResolucion=$this->DevuelveValores(\"empresapro_resoluciones_facturacion\", \"ID\", $ResolucionDian);\r\n if($DatosResolucion[\"Completada\"]==\"NO\"){ ///Pregunto si la resolucion ya fue completada\r\n $Disponibilidad=$DatosResolucion[\"Estado\"];\r\n //si entra a verificar es porque estaba ocupada y cambiará a 1\r\n while($Disponibilidad==\"OC\"){ //miro que esté disponible para facturar, esto para no crear facturas dobles\r\n print(\"Esperando disponibilidad<br>\");\r\n usleep(300);\r\n $DatosResolucion=$this->DevuelveValores(\"empresapro_resoluciones_facturacion\", \"ID\", $ResolucionDian);\r\n $Disponibilidad=$DatosResolucion[\"Estado\"];\r\n \r\n }\r\n \r\n $DatosResolucion=$this->DevuelveValores(\"empresapro_resoluciones_facturacion\", \"ID\", $ResolucionDian);\r\n if($DatosResolucion[\"Completada\"]<>\"SI\"){\r\n $this->ActualizaRegistro(\"empresapro_resoluciones_facturacion\", \"Estado\", \"OC\", \"ID\", $ResolucionDian); //Ocupo la resolucion\r\n \r\n $sql=\"SELECT MAX(NumeroFactura) as FacturaActual FROM facturas WHERE Prefijo='$DatosResolucion[Prefijo]' \"\r\n . \"AND TipoFactura='$DatosResolucion[Tipo]' AND idResolucion='$ResolucionDian'\";\r\n $Consulta=$this->Query($sql);\r\n $Consulta=$this->FetchArray($Consulta);\r\n $FacturaActual=$Consulta[\"FacturaActual\"];\r\n $idFactura=$FacturaActual+1;\r\n \r\n //Verificamos si ya se completó el numero de la resolucion y si es así se cambia su estado\r\n if($DatosResolucion[\"Hasta\"]==$idFactura){ \r\n $this->ActualizaRegistro(\"empresapro_resoluciones_facturacion\", \"Completada\", \"SI\", \"ID\", $ResolucionDian);\r\n }\r\n //Verificamos si es la primer factura que se creará con esta resolucion\r\n //Si es así se inicia desde el numero autorizado\r\n if($idFactura==1){\r\n $idFactura=$DatosResolucion[\"Desde\"];\r\n }\r\n //Convertimos los dias en credito\r\n $FormaPagoFactura=$TipoPago;\r\n if($TipoPago<>\"Contado\"){\r\n $FormaPagoFactura=\"Credito a $TipoPago dias\";\r\n }\r\n if($TipoPago==\"SisteCredito\"){\r\n $FormaPagoFactura=\"SisteCredito\";\r\n }\r\n ////////////////Inserto datos de la factura\r\n /////\r\n ////\r\n $DatosSucursal= $this->DevuelveValores(\"empresa_pro_sucursales\", \"Actual\", 1); \r\n \r\n $ID=date(\"YmdHis\").microtime(false);\r\n $ID= str_replace(\" \", \"_\", $ID);\r\n $ID= str_replace(\".\", \"_\", $ID);\r\n $tab=\"facturas\";\r\n $NumRegistros=32; \r\n \r\n $Columnas[0]=\"TipoFactura\";\t\t $Valores[0]=$DatosResolucion[\"Tipo\"];\r\n $Columnas[1]=\"Prefijo\"; $Valores[1]=$DatosResolucion[\"Prefijo\"];\r\n $Columnas[2]=\"NumeroFactura\"; $Valores[2]=$idFactura;\r\n $Columnas[3]=\"Fecha\"; $Valores[3]=$FechaFactura;\r\n $Columnas[4]=\"OCompra\"; $Valores[4]=$OrdenCompra;\r\n $Columnas[5]=\"OSalida\"; $Valores[5]=$OrdenSalida;\r\n $Columnas[6]=\"FormaPago\"; $Valores[6]=$FormaPagoFactura;\r\n $Columnas[7]=\"Subtotal\"; $Valores[7]=\"\";\r\n $Columnas[8]=\"IVA\"; $Valores[8]=\"\";\r\n $Columnas[9]=\"Descuentos\"; $Valores[9]=\"\";\r\n $Columnas[10]=\"Total\"; $Valores[10]=\"\";\r\n $Columnas[11]=\"SaldoFact\"; $Valores[11]=\"\";\r\n $Columnas[12]=\"Cotizaciones_idCotizaciones\";$Valores[12]=\"\";\r\n $Columnas[13]=\"EmpresaPro_idEmpresaPro\"; $Valores[13]=$EmpresaPro;\r\n $Columnas[14]=\"Usuarios_idUsuarios\"; $Valores[14]=$this->idUser;\r\n $Columnas[15]=\"Clientes_idClientes\"; $Valores[15]=$idCliente;\r\n $Columnas[16]=\"TotalCostos\"; $Valores[16]=\"\";\r\n $Columnas[17]=\"CerradoDiario\"; $Valores[17]=\"\";\r\n $Columnas[18]=\"FechaCierreDiario\"; $Valores[18]=\"\";\r\n $Columnas[19]=\"HoraCierreDiario\"; $Valores[19]=\"\";\r\n $Columnas[20]=\"ObservacionesFact\"; $Valores[20]=$ObservacionesFactura;\r\n $Columnas[21]=\"CentroCosto\"; $Valores[21]=$CentroCostos;\r\n $Columnas[22]=\"idResolucion\"; $Valores[22]=$ResolucionDian;\r\n $Columnas[23]=\"idFacturas\"; $Valores[23]=$ID;\r\n $Columnas[24]=\"Hora\"; $Valores[24]=date(\"H:i:s\");\r\n $Columnas[25]=\"Efectivo\"; $Valores[25]=$Paga;\r\n $Columnas[26]=\"Devuelve\"; $Valores[26]=$Devuelta;\r\n $Columnas[27]=\"Cheques\"; $Valores[27]=$Cheques;\r\n $Columnas[28]=\"Otros\"; $Valores[28]=$PagaOtros;\r\n $Columnas[29]=\"Tarjetas\"; $Valores[29]=$Tarjetas;\r\n $Columnas[30]=\"idTarjetas\"; $Valores[30]=$idTarjetas;\r\n $Columnas[31]=\"idSucursal\"; $Valores[31]=$DatosSucursal[\"ID\"];\r\n \r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n \r\n //libero la resolucion\r\n $this->ActualizaRegistro(\"empresapro_resoluciones_facturacion\", \"Estado\", \"\", \"ID\", $ResolucionDian);\r\n \r\n //////////////////////Agrego Items a la Factura desde la devolucion\r\n /////\r\n /////\r\n \r\n \r\n $Datos[\"idPreventa\"]=$idPreventa;\r\n $Datos[\"NumFactura\"]=$idFactura;\r\n $Datos[\"FechaFactura\"]=$FechaFactura;\r\n $Datos[\"ID\"]=$ID;\r\n $Datos[\"CuentaDestino\"]=$CuentaDestino;\r\n $Datos[\"EmpresaPro\"]=$EmpresaPro;\r\n $Datos[\"CentroCostos\"]=$CentroCostos;\r\n $this->InsertarItemsPreventaAItemsFactura($Datos);///Relaciono los items de la factura\r\n \r\n //$this->InsertarFacturaLibroDiario($Datos);///Inserto Items en el libro diario\r\n \r\n if($TipoPago<>\"Contado\"){ //Si es a Credito\r\n if($TipoPago==\"SisteCredito\"){\r\n $Datos[\"SisteCredito\"]=1;\r\n }\r\n $Datos[\"Fecha\"]=$FechaFactura; \r\n $Datos[\"Dias\"]=$SumaDias;\r\n $FechaVencimiento=$this->SumeDiasFecha($Datos);\r\n $Datos[\"idFactura\"]=$Datos[\"ID\"]; \r\n $Datos[\"FechaFactura\"]=$FechaFactura; \r\n $Datos[\"FechaVencimiento\"]=$FechaVencimiento;\r\n $Datos[\"idCliente\"]=$idCliente;\r\n $this->InsertarFacturaEnCartera($Datos);///Inserto La factura en la cartera\r\n }\r\n \r\n } \r\n \r\n }else{\r\n exit(\"La Resolucion de facturacion fue completada\");\r\n }\r\n\treturn ($ID);\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "9f524c6a22cf83d7c23a20a990c8c6ca", "score": "0.596145", "text": "function consultar_eventos_anual() {\n if ($this->input(\"año\")) {\n $resultado = $this->modelo->consultar_porcentajes($_POST[\"año\"]);\n if ($resultado != null) {\n $this->success($resultado);\n } else {\n $this->error(\"No hay asistencias en el año \".$_POST[\"año\"]);\n }\n }\n }", "title": "" }, { "docid": "c7d21f664b98e043640a7a4c830bf3e4", "score": "0.595988", "text": "function transaccionPendiente($val1,$val2){\n\t\tglobal $con;\n\t\t$sql=\"SELECT * FROM pedidos WHERE transactionId = '$val1'\";\n\t\t$q=mysqli_query($con, $sql);\n\t\t$data=mysqli_fetch_array($q);\n\t\t\n\t\t// Si la transacción fue aprobada, entonces pasar los libros a la biblioteca del cliente\n\t\tif($val2=='APPROVED'){\n\t\t\t$sql1=\"SELECT * FROM publicacionesxpedido WHERE pedido = '$data[id]'\";\n\t\t\t$q1=mysqli_query($con, $sql1);\n\t\t\t$n1=mysqli_num_rows($q1);\n\t\t\tif($n1>0){\n\t\t\t\twhile($pub=mysqli_fetch_assoc($q1)){\n\t\t\t\t\t$sql2=\"INSERT INTO publicacionesxusuario (usuario,publicacion) VALUES ('$data[usuario]','$pub[publicacion]')\";\n\t\t\t\t\t$q2=mysqli_query($con, $sql2);\n\t\t\t\t\tif(!$q2){\n\t\t\t\t\t\tmysqli_error($con);\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Notificar al usuario acerca del estado de la transacción, una vez esta sea aprobada o declinada\n\t\trequire_once('../phpmailer.php');\n\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t $headers .= 'Content-type: text/html; charset=UTF-8' . \"\\r\\n\";\n\t if($val2=='APPROVED'){\n\t\t $subject='Tu transacción ha sido aprobada';\n\t\t $html='<p>Hola '.getNombreUsuario($data['usuario']).'!</p><p>Queremos informarte que el proceso de pago relacionado con tu pedido No. '.$data['id'].' ha sido aprobado.</p><p>Por favor ingresa a tu biblioteca, en donde encontrarás las publicaciones que seleccionaste.</p><p><b>Un abrazo enorme del equipo de Phronesis. ¡Disfruta tus publicaciones!</b></p>';\n\t }elseif($val2=='DECLINED'){\n\t\t $subject=\"Tu transacción ha sido rechazada.\";\n\t\t $html=\"<p>Hola \".getNombreUsuario($data['usuario']).\"!</p><p>Lamentamos informarte que el proceso de pago relacionado con tu pedido No. \".$data['id'].\" ha sido rechazado.</p><p>Puedes consultar con tu banco para poder verificar la razón o también puedes intentar hacer tu compra con otro medio de pago.</p><p><b>Un abrazo enorme del equipo de Phronesis.</b></p>\";\n\t }\n\t\t$mail = new PHPMailer();\n\t\t$mail->From = '[email protected]';\n\t\t$mail->FromName = 'Phronesis | El arte de saber vivir';\n\t\t$mail->Subject = utf8_decode($subject);\n\t\t$mail->Body = utf8_decode($html);\n\t\t$mail->IsHTML(true);\n\t\t$mail->AddAddress(getEmailUsuario($data['usuario']));\n\t\t$mail->AddBCC('[email protected]');\n\t\t//$mail->AddReplyTo($_POST['']);\n\t\tif(!$sent_mail= $mail->Send()){\n\t\t\techo 'msg';\n\t\t}else{\n\t\t\techo 1;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "1a9cbf42aad4637544cce7a4daa9e385", "score": "0.59500587", "text": "function expositores_atualiza(){\n global $db;\n $_SESSION['view']='form';\n $msg['titulo']='Alterar expositores';\n $pr[':id']=filter_var($_SESSION['route'][2]);\n $sql=\"SELECT * FROM expositores where nId=\".$pr[':id'].\" limit 1\";\n $r=SqlQuery($sql);\n $l = $r->fetch(PDO::FETCH_ASSOC);\n $msg['nId']=$l['nId']; //ID Seller -- PRI.\n $msg['cName']=$l['cName']; //Seller Name -- UNI.\n $msg['cAddress']=$l['cAddress']; //Seller Address -- .\n $msg['cCountry']=$l['cCountry']; //Country -- .\n $msg['cPostCode']=$l['cPostCode']; //Post Code -- .\n $msg['cPhone1']=$l['cPhone1']; //Phone Number -- .\n $msg['cPhone2']=$l['cPhone2']; //Direct Phone Number -- .\n $msg['cEmail']=$l['cEmail']; //Mail (login) * -- UNI.\n $msg['cWeb']=$l['cWeb']; //Site * -- UNI.\n $msg['ePerson']=$l['ePerson']; //Contact Person -- .\n $msg['cPersonalName']=$l['cPersonalName']; //Complete Name (for Credential) -- UNI.\n $msg['cCargo']=$l['cCargo']; //Position -- .\n $msg['cPersonalEmail']=$l['cPersonalEmail']; //Personal Mail -- .\n $msg['cPersonalPhone']=$l['cPersonalPhone']; //Cell Phone -- .\n $msg['nBusinessType']=$l['nBusinessType']; //Business Type -- .\n $msg['nBusinessTypeOther']=$l['nBusinessTypeOther']; //Others -- .\n $msg['nBLI']=$l['nBLI']; //Business Licence Number -- UNI.\n $msg['dBLI']=$l['dBLI']; //B. L. I. Expiration Date -- .\n $msg['cVAT']=$l['cVAT']; //VAT Certificate Number -- UNI.\n $msg['cCNR']=$l['cCNR']; //Company Name for Receipt -- .\n $msg['cTaxID']=$l['cTaxID']; //Tax Id Number (13 Digits) -- .\n $msg['cTaxAddr']=$l['cTaxAddr']; //Address For Receipt -- .\n $msg['cCountryR']=$l['cCountryR']; //Country For Receipt -- .\n $msg['Phone1R']=$l['Phone1R']; //Phone For Receipt -- .\n $msg['MailR']=$l['MailR']; //Mail For Receipt -- .\n $msg['SI_1']=explode(';',$l['SI_1']); //Hotels & Resorts -- .\n $msg['SL_2']=explode(';',$l['SL_2']); //Tour Operators / Travel Agents -- .\n $msg['SL_3']=explode(';',$l['SL_3']); //Associations / Tourism Organisations -- .\n $msg['SL_4']=explode(';',$l['SL_4']); //Transportations / Carriers -- .\n $msg['SL_5']=explode(';',$l['SL_5']); // Business Travel / MICE -- .\n $msg['SL_6']=explode(';',$l['SL_6']); //Others -- .\n $msg['cCountryMk1']=$l['cCountryMk1']; //TOP3 MARKETS (COUNTRIES) 1 -- .\n $msg['cCountryMk2']=$l['cCountryMk2']; //TOP3 MARKETS (COUNTRIES) 2 -- .\n $msg['cCountryMk3']=$l['cCountryMk3']; //TOP3 MARKETS (COUNTRIES) 3 -- .\n $msg['tDescription']=$l['tDescription']; //Company Description (Describe your organisation in not more than 50 words) BLOCK -- .\n $msg['SI_1_ourtros']=$l['SI_1_ourtros']; //Others -- .\n $msg['SL_2_outros']=$l['SL_2_outros']; //Others -- .\n $msg['SL_3_outros']=$l['SL_3_outros']; //Others -- .\n $msg['SL_4_outros']=$l['SL_4_outros']; //Others -- .\n $msg['SL_5_outros']=$l['SL_5_outros']; //Others -- .\n $msg['SL_6_outros']=$l['SL_6_outros']; //Others -- .\n return array_merge(expositores_novo(),$msg);\n}", "title": "" }, { "docid": "d7bbe759de35c8b5b48df24aaa88c2e3", "score": "0.59444517", "text": "public function reservaClienteExist($data, $idt, $idrest, $a_mesa, $a_hora)\n {\n //Realizar reserva:\n $sql = \"INSERT INTO tblreserva(estadoC, numasistentes, fechareserva, sillasextra, \n idcliente, idtrabajador, idrestaurante, estado, mesas, horas)\n VALUES (?,?,?,?,?,?,?,?,?,?);\";\n try {\n $PrepareStatement = $this->cnn->getPrepareStatement($sql);\n $PrepareStatement->bindValue(1, 0, PDO::PARAM_INT);\n $PrepareStatement->bindValue(2, $data['num_a'], PDO::PARAM_INT);\n $PrepareStatement->bindValue(3, $data['fecha'], PDO::PARAM_STR);\n $PrepareStatement->bindValue(4, $data['sillas'], PDO::PARAM_INT);\n $PrepareStatement->bindValue(5, $data['idcli'], PDO::PARAM_INT);\n $PrepareStatement->bindValue(6, $idt, PDO::PARAM_INT);\n $PrepareStatement->bindValue(7, $idrest, PDO::PARAM_INT);\n $PrepareStatement->bindValue(8, 1, PDO::PARAM_INT);\n $PrepareStatement->bindValue(9, $data['mesa'], PDO::PARAM_STR);\n $PrepareStatement->bindValue(10, $data['hora'], PDO::PARAM_STR);\n $exec = $PrepareStatement->execute();\n if ($exec) {\n $sql = \"SELECT MAX(idreserva) AS idreserva FROM tblreserva\n WHERE idrestaurante=? AND idcliente=? AND fechareserva = ?\";\n $PrepareStatement = $this->cnn->getPrepareStatement($sql);\n $PrepareStatement->bindValue(1, $idrest, PDO::PARAM_INT);\n $PrepareStatement->bindValue(2, $data['idcli'], PDO::PARAM_INT);\n $PrepareStatement->bindValue(3, $data['fecha'], PDO::PARAM_INT);\n $PrepareStatement->execute();\n $idreserva = $PrepareStatement->fetch();\n\n\n $sql = \"select idhora from tblhoras WHERE hora=?;\";\n\n foreach ($a_hora as $nh => $horas) {\n\n $h = $a_hora[$nh];\n $PrepareStatement = $this->cnn->getPrepareStatement($sql);\n $PrepareStatement->bindValue(1, $h, PDO::PARAM_STR);\n $PrepareStatement->execute();\n $idh = $PrepareStatement->fetch();\n\n foreach ($a_mesa as $nm => $mesas) {\n $m = $a_mesa[$nm];\n $request = $this->resevaG($idreserva['idreserva'], $idh, $m);\n }\n }\n return $request;\n }\n } catch (PDOException $e) {\n echo \"Error: \" . $e;\n return false;\n }\n }", "title": "" }, { "docid": "1b8963bd59467f001baee3ec3e9f497a", "score": "0.59432006", "text": "public function aprobarDenunciaRespuesta()\n\t{\n\t\ttry\n\t\t{\n\t\t\t\\DB::beginTransaction();\n\n\t\t\t// Si la denuncia es verdadera se elimina la respuesta y se abre un historial al denunciado\n\t\t\t// Igualmente se abre un historial al denunciante para incrementar las denuncias verdaderas realizadas\n\t\t\n\t\t\t# historial para el denunciado, sus comentarioseliminados incrementan\n\t\t\t$historialDenunciado= $this->historialRepo->nuevoHistorial(\\Input::get('denunciado_id'));\n\t\t\t$historialDenunciado->comentarioseliminados++;\n\t\t\t$this->historialRepo->save($historialDenunciado);\n\n\t\t\t# historial para el denunciante, sus denuncias verdaderas incrementan\n\t\t\t$historialDenunciante= $this->historialRepo->nuevoHistorial(\\Input::get('denunciante_id'));\n\t\t\t$historialDenunciante->denunciasverdaderas++;\n\t\t\t$this->historialRepo->save($historialDenunciante);\n\n\t\t\t$respuesta_id = \\Input::get('respuesta_id');\n\n\t\t\tif ($this->respuestaRepo->eliminarRespuestaId($respuesta_id))\n\t\t\t{\n\t\t\t\t# se elimina la denuncia una vez se ha revisado y gestionado\n\t\t\t\t$this->denunciaRepo->eliminarDenunciaTipoRespuesta($respuesta_id);\n\n\t\t\t\t# se requiere la configuracion del sistema para conocer las respuestas bloqueadas permitidas\n\t\t\t\t// las respuestas se eliminan no se bloquean\n\t\t\t\t$configuracion = $this->configuracionRepo->cargarConfiguracionActual();\n\t\t\t\t$comentariosBloqueadosPermitidos = $configuracion->comentariosbloqueados;\n\n\t\t\t\t# si los comentarios bloqueados del denunciado es >= que comentarios bloqueados permitidos, se bloquea denunciado \n\t\t\t\t/* bloqueo de usuario */\n\t\t\t\tif($historialDenunciado->comentarioseliminados >= $comentariosBloqueadosPermitidos){\n\t\t\t\t\t$this->usuarioRepo->bloquearUsuario($historialDenunciado->usuario_id);\n\t\t\t\t}\n\n\t\t\t\t\\DB::commit();\n\n\t\t\t\treturn \\Redirect::route('admin.revisar.respuestas.denunciadas')->with('status_ok', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Respuesta revisada y bloqueada \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t correctamente');\n\t\t\t}\n\t\t\treturn \\Redirect::route('admin.revisar.respuestas.denunciadas')->with('status_error', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'No se pudo eliminar la\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t respuesta');\n\t\t}\n\t\tcatch(\\Exception $ex)\n\t\t{\n\t\t\t\\DB::rollback();\n\t\t\t\\Session::flash('error_de_servidor',1);\n\t\t\treturn \\Redirect::back();\n\t\t}\t\n\t}", "title": "" }, { "docid": "a8e358d8597abbe21005df5032b0b61c", "score": "0.59425265", "text": "static public function mdlMostrarDiario($valor){\n\n if($valor != null){\n\n $stmt = Conexion::conectar()->prepare(\"SELECT \n d.id,\n d.tipo_gasto,\n d.origen,\n d.voucher,\n d.cuenta,\n d.descripcion,\n d.debito,\n d.credito,\n d.moneda,\n d.tipo_cambio,\n d.fecha,\n d.concepto,\n d.ruc,\n d.razon_social,\n d.tipo_documento,\n d.documento,\n d.serie_doc,\n d.num_doc,\n d.fecha_emision,\n d.fecha_vencimiento,\n d.sucursal,\n d.comprobante,\n d.contribuyente,\n d.condicion,\n d.alerta \n FROM\n diario d \n WHERE YEAR(d.fecha) = YEAR(NOW()) \n AND MONTH(d.fecha) = :valor\n AND d.tipo_gasto IN ('60','92','94','95','97')\n ORDER BY d.origen,\n d.voucher \");\n\n $stmt->bindParam(\":valor\", $valor, PDO::PARAM_STR);\n\n $stmt -> execute();\n\n return $stmt -> fetchAll();\n\n }else{\n\n $stmt = Conexion::conectar()->prepare(\"SELECT \n d.id,\n d.tipo_gasto,\n d.origen,\n d.voucher,\n d.cuenta,\n d.descripcion,\n d.debito,\n d.credito,\n d.moneda,\n d.tipo_cambio,\n d.fecha,\n d.concepto,\n d.ruc,\n d.razon_social,\n d.tipo_documento,\n d.documento,\n d.serie_doc,\n d.num_doc,\n d.fecha_emision,\n d.fecha_vencimiento,\n d.sucursal,\n d.comprobante,\n d.contribuyente,\n d.condicion,\n d.alerta \n FROM\n diario d\n where d.tipo_gasto IN ('60','92','94','95','97')\n ORDER BY d.origen,\n d.voucher\");\n\n $stmt -> execute();\n\n return $stmt -> fetchAll();\n\n }\n\n $stmt -> close();\n\n $stmt = null;\n\n }", "title": "" }, { "docid": "54f6b9dab61d7c70011bd82432450314", "score": "0.593364", "text": "function buscar_info_transito($Id_inventario_material, $todos, $orden)\r\n\t{\r\n\t\t$Info = array();\r\n\t\t\r\n\t\tif($todos == 'si')\r\n\t\t{\r\n\t\t\t$SQL = '';\r\n\t\t}\r\n\t\telseif($todos == '')\r\n\t\t{\r\n\t\t\t$SQL = 'and tran.finalizado = \"n\"';\r\n\t\t}\r\n\t\t//Consulta extraer la informacion del pedido en transito solicitado.\r\n\t\t$Consulta = 'select cantidad, tran.orden, mate.numero_individual,\r\n\t\t\t\t\t\t\t\ttran.cantidad_solicitada, mate.id_inventario_material, tran.finalizado,\r\n\t\t\t\t\t\t\t\ttran.detalle, tran.tipo, mate.numero_cajas, tran.fecha_ingreso\r\n\t\t\t\t\t\t\t\tfrom inventario_material mate, pedido_transito tran\r\n\t\t\t\t\t\t\t\twhere mate.id_inventario_material = tran.id_inventario_material\r\n\t\t\t\t\t\t\t\t'.$SQL.'\r\n\t\t\t\t\t\t\t\tand tran.id_grupo = \"'.$this->session->userdata[\"id_grupo\"].'\"\r\n\t\t\t\t\t\t\t\tand mate.id_inventario_material = \"'.$Id_inventario_material.'\"\r\n\t\t\t\t\t\t\t\torder by tran.id_ped_transito asc\r\n\t\t\t\t\t\t\t\t';\r\n\t\t//echo $Consulta;\r\n\t\t//Ejecutamos la consulta.\r\n\t\t$Resultado = $this->db->query($Consulta);\r\n\t\r\n\t\tif(0 < $Resultado->num_rows())\r\n\t\t{\r\n\t\t\tforeach($Resultado->result_array() as $Datos)\r\n\t\t\t{\r\n\t\t\t\t$Orden = $Datos['orden'];\r\n\t\t\t\t$Info[$Orden]['orden'] = $Orden;\r\n\t\t\t\t$Info[$Orden]['detalle'] = $Datos['detalle'];\r\n\t\t\t\t$Info[$Orden]['cantidad_solicitada'] = $Datos['cantidad_solicitada'];\r\n\t\t\t\t$Info[$Orden]['cantidad_placas'] = number_format((($Datos['cantidad'] / $Datos['numero_individual']) / $Datos['numero_cajas']), 2);\r\n\t\t\t\t$Info[$Orden]['id_inventario_material'] = $Datos['id_inventario_material'];\r\n\t\t\t\t$Info[$Orden]['fecha_ingreso'] = $Datos['fecha_ingreso'];\r\n\t\t\t\t$Info[$Orden]['finalizado'] = $Datos['finalizado'];\r\n\t\t\t\t$Info[$Orden]['tipo'] = $Datos['tipo'];\r\n\t\t\t\t\r\n\t\t\t\t//Consulta para extraer el historial del pedido en transito.\r\n\t\t\t\t$Consulta = 'select * from\r\n\t\t\t\t\t\t\t\t\t\tpedido_transito_cantidad cant, pedido_transito trans\r\n\t\t\t\t\t\t\t\t\t\twhere cant.orden = \"'.$Orden.'\"\r\n\t\t\t\t\t\t\t\t\t\tand cant.id_inventario_material = \"'.$Id_inventario_material.'\"\r\n\t\t\t\t\t\t\t\t\t\tand cant.orden = trans.orden\r\n\t\t\t\t\t\t\t\t\t\tand trans.id_inventario_material = cant.id_inventario_material\r\n\t\t\t\t\t\t\t\t\t\torder by cant.id_ped_tran_cantidad';\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t//echo $Consulta;\t\t\t\t\t\r\n\t\t\t\t//Ejecutamos la consulta.\r\n\t\t\t\t$Resultado = $this->db->query($Consulta);\r\n\t\t\t\t$Info[$Orden]['detalles'] = array();\r\n\t\t\t\t//Asignamos la informacion a un array.\r\n\t\t\t\tforeach($Resultado->result_array() as $Datos_cantidad)\r\n\t\t\t\t{\r\n\t\t\t\t\t$Info[$Orden]['detalles'][$Datos_cantidad['id_ped_tran_cantidad']]['cant_anterior'] = $Datos_cantidad['cant_anterior'];\r\n\t\t\t\t\t$Info[$Orden]['detalles'][$Datos_cantidad['id_ped_tran_cantidad']]['cant_ingresar'] = $Datos_cantidad['cant_ingresar'];\r\n\t\t\t\t\t$Info[$Orden]['detalles'][$Datos_cantidad['id_ped_tran_cantidad']]['fecha'] = $Datos_cantidad['fecha'];\r\n\t\t\t\t\t$Info[$Orden]['detalles'][$Datos_cantidad['id_ped_tran_cantidad']]['restante'] = $Datos_cantidad['cant_anterior'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//print_r($Info);\r\n\t\treturn $Info;\r\n\t}", "title": "" }, { "docid": "95bf04f2eac70fdc639910fc5164bcb5", "score": "0.59310424", "text": "function Mis_mascotas($usu_cod_usuario)\n\t\t{\n\t\t\t\t$Conexion = floopets_BD::Connect();\n\t\t\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t\t//Crear el query que vamos a realizar\n\t\t\t\t$consulta = \"SELECT animal.*,usuario.*,solicitud_adopcion.*,raza.* FROM usuario INNER JOIN solicitud_adopcion ON usuario.usu_cod_usuario=solicitud_adopcion.usu_cod_usuario INNER JOIN animal ON solicitud_adopcion.ani_cod_animal=animal.ani_cod_animal INNER JOIN raza on animal.ra_cod_raza=raza.ra_cod_raza WHERE usuario.usu_cod_usuario=? AND animal.ani_estado='adoptado' AND solicitud_adopcion.sol_estado='Aprobado' \";\n\t\t\t\t$query = $Conexion->prepare($consulta);\n\t\t\t\t$query->execute(array($usu_cod_usuario));\n\t\t\t\t//Devolvemos el resultado en un arreglo\n\t\t\t\t//Fetch: es el resultado que arroja la consulta en forma de un vector o matriz segun sea el caso\n\t\t\t\t//Para consultar donde arroja mas de un dato el fatch debe ir acompañado con la palabra ALL\n\t\t\t\t$resultado = $query->fetchALL(PDO::FETCH_BOTH);\n\t\t\t\treturn $resultado;\n\t\t\t\tfloopets_BD::Disconnect();\n\t\t}", "title": "" }, { "docid": "891f38c451015d9b82ec416085af3417", "score": "0.5927958", "text": "function resumenLetras($txtFechaInicio = \"\", $txtFechaFinal = \"\") {\n $condicion = \"wc_detalleordencobro.numeroletra != '' and \" //ok\n . \"wc_detalleordencobro.situacion = '' and \"\n . \"wc_detalleordencobro.estado = 1 and \"\n . \"wc_ordencobro.estado = 1 and \"\n . \"(wc_categoria.`idpadrec`= 1 or wc_categoria.`idpadrec`= 2) and \"\n . \"wc_detalleordencobro.saldodoc > 0 and \"\n . \"wc_detalleordencobro.formacobro=3 and \"\n . \"wc_detalleordencobro.renovado=0\"\n . \" and wc_ordenventa.estado = 1\"\n . \" and wc_ordenventa.esanulado = 0 \";\n if (!empty($txtFechaInicio)) {\n $condicion .= \" and wc_ordenventa.fechacreacion >= '\" . $txtFechaInicio . \"'\";\n }\n if (!empty($txtFechaFinal)) {\n $condicion .= \" and wc_ordenventa.fechacreacion <= '\" . $txtFechaFinal . \"'\";\n }\n $data = $this->leeRegistro(\n \"`wc_ordenventa` wc_ordenventa\n INNER JOIN `wc_clientezona` wc_clientezona ON wc_ordenventa.`idclientezona` = wc_clientezona.`idclientezona`\n INNER JOIN `wc_zona` wc_zona ON wc_clientezona.`idzona` = wc_zona.`idzona`\n INNER JOIN `wc_categoria` wc_categoria ON wc_zona.`idcategoria` = wc_categoria.`idcategoria`\n inner join `wc_ordencobro` wc_ordencobro on wc_ordencobro.`idordenventa`=wc_ordenventa.`idordenventa` and wc_ordencobro.`estado` = 1\n inner join `wc_detalleordencobro` wc_detalleordencobro on wc_detalleordencobro.`idordencobro`=wc_ordencobro.`idordencobro` and wc_detalleordencobro.`estado`=1\", \"wc_ordenventa.idmoneda, wc_categoria.`idpadrec`, wc_detalleordencobro.recepcionletras, wc_detalleordencobro.saldodoc, wc_detalleordencobro.numerounico,wc_detalleordencobro.evaluacion\", $condicion, \"\");\n return $data;\n }", "title": "" }, { "docid": "a7d4a7d08ca5da71a04fa63a61d172d6", "score": "0.5926124", "text": "function busqueda_cantidades_simples($id_producto,$id_estado=0)\r\r\n{\r\r\n\r\r\n $estado_renglon=3;\r\r\n \r\r\n if ($id_estado)\r\r\n $condicion=\" and l.id_estado=7\";\r\r\n $sql=\" select sum(r.cantidad*p.cantidad) as cantidad,l.id_licitacion,precio_presupuesto.monto_unitario\r\r\n from licitaciones.entrega_estimada es\r\r\n join licitaciones.licitacion l on (l.id_licitacion=es.id_licitacion)\r\r\n join licitaciones.licitacion_presupuesto_new lp using(id_entrega_estimada)\r\r\n join licitaciones.renglon_presupuesto_new r using(id_licitacion_prop)\r\r\n join licitaciones.producto_presupuesto_new p using (id_renglon_prop)\r\r\n left join\r\r\n (\r\r\n select monto_unitario,id_producto_presupuesto\r\r\n from licitaciones.producto_proveedor_new\r\r\n where activo=1\r\r\n ) as precio_presupuesto using(id_producto_presupuesto)\r\r\n where p.id_producto=$id_producto $condicion\r\r\n and es.finalizada=0 and es.flag_compras_consolidadas=1 and l.es_presupuesto=0 and l.borrada='f'\r\r\n group by l.id_licitacion,monto_unitario\";\r\r\n\r\r\n $res=sql($sql) or fin_pagina();\r\r\n $datos=array();\r\r\n $cantidad=$res->recordcount();\r\r\n for($i=0;$i<$cantidad;$i++){\r\r\n $datos[]=array(\"id_licitacion\"=>$res->fields[\"id_licitacion\"],\r\r\n \"cantidad\"=>$res->fields[\"cantidad\"],\r\r\n \"monto_unitario\"=>$res->fields[\"monto_unitario\"],\r\r\n \"moneda\"=>\"U\\$S\",\r\r\n \"activo\"=>1\r\r\n );\r\r\n $res->movenext();\r\r\n }//del for\r\r\n//ya tengo todos los datos de las licitaciones\r\r\nreturn $datos;\r\r\n}", "title": "" }, { "docid": "dd4ab97b4a8ef03fcc8cd01b36d4ddf4", "score": "0.59237665", "text": "public function InsertarItemsPreventaAItemsFactura($Datos){\r\n $idUser=$this->idUser;\r\n $idPreventa=$Datos[\"idPreventa\"];\r\n $NumFactura=$Datos[\"ID\"];\r\n $FechaFactura=$Datos[\"FechaFactura\"];\r\n \r\n $sql=\"SELECT * FROM preventa WHERE VestasActivas_idVestasActivas='$idPreventa'\";\r\n $Consulta=$this->Query($sql);\r\n $TotalSubtotal=0;\r\n $TotalIVA=0;\r\n $GranTotal=0;\r\n $TotalCostos=0;\r\n $DatosOtrosImpuestos[\"ValorImpuesto\"]=0;\r\n $DatosOtrosImpuestos[\"ID\"]=0;\r\n $Entra=0;\r\n while($DatosCotizacion= $this->FetchArray($Consulta)){\r\n $TablaItem=$DatosCotizacion[\"TablaItem\"];\r\n $idTabla='idProductosVenta';\r\n \r\n if($DatosCotizacion[\"idSistema\"]>0){\r\n $idSistema=$DatosCotizacion[\"idSistema\"];\r\n \r\n $consulta=$this->ConsultarTabla(\"facturas_items\", \" WHERE idFactura='$NumFactura' AND TablaItems='sistemas' AND Referencia='$idSistema'\");\r\n $DatosItem=$this->FetchArray($consulta);\r\n if($DatosItem[\"ID\"]==''){\r\n $Entra=1;\r\n $DatosSistema=$this->DevuelveValores(\"sistemas\", \"ID\", $idSistema);\r\n $DatosCotizacionLineaSistema[\"TablaItem\"]='sistemas';\r\n $DatosCotizacionLineaSistema[\"ValorAcordado\"]=0;\r\n $DatosCotizacionLineaSistema[\"CostoUnitario\"]=0;\r\n $DatosCotizacionLineaSistema[\"TipoItem\"]='MO';\r\n $DatosCotizacionLineaSistema[\"Cantidad\"]=0;\r\n $DatosProductoLineaSistema[\"Referencia\"]=$idSistema;\r\n $DatosProductoLineaSistema[\"Nombre\"]=$DatosSistema[\"Nombre\"];\r\n $DatosProductoLineaSistema[\"Departamento\"]=0;\r\n $DatosProductoLineaSistema[\"Sub1\"]=0;\r\n $DatosProductoLineaSistema[\"Sub2\"]=0;\r\n $DatosProductoLineaSistema[\"Sub3\"]=0;\r\n $DatosProductoLineaSistema[\"Sub4\"]=0;\r\n $DatosProductoLineaSistema[\"Sub5\"]=0;\r\n $DatosProductoLineaSistema[\"CuentaPUC\"]='';\r\n \r\n $this->ItemFacturaVenta($NumFactura, $DatosCotizacionLineaSistema, $DatosProductoLineaSistema, 0, 0, 0, 0, 0, '', $DatosOtrosImpuestos, \"\");\r\n \r\n }\r\n \r\n //$idTabla='ID';\r\n \r\n }else{\r\n if($Entra==1){\r\n $Entra=0;\r\n \r\n $DatosCotizacionLineaSistema[\"TablaItem\"]='ln';\r\n $DatosCotizacionLineaSistema[\"ValorAcordado\"]=0;\r\n $DatosCotizacionLineaSistema[\"CostoUnitario\"]=0;\r\n $DatosCotizacionLineaSistema[\"TipoItem\"]='MO';\r\n $DatosCotizacionLineaSistema[\"Cantidad\"]=0;\r\n $DatosProductoLineaSistema[\"Referencia\"]=\"\";\r\n $DatosProductoLineaSistema[\"Nombre\"]=\"\";\r\n $DatosProductoLineaSistema[\"Departamento\"]=0;\r\n $DatosProductoLineaSistema[\"Sub1\"]=0;\r\n $DatosProductoLineaSistema[\"Sub2\"]=0;\r\n $DatosProductoLineaSistema[\"Sub3\"]=0;\r\n $DatosProductoLineaSistema[\"Sub4\"]=0;\r\n $DatosProductoLineaSistema[\"Sub5\"]=0;\r\n $DatosProductoLineaSistema[\"CuentaPUC\"]='';\r\n \r\n $this->ItemFacturaVenta($NumFactura, $DatosCotizacionLineaSistema, $DatosProductoLineaSistema, 0, 0, 0, 0, 0, '', $DatosOtrosImpuestos, \"\");\r\n \r\n }\r\n }\r\n $DatosProducto=$this->DevuelveValores($DatosCotizacion[\"TablaItem\"], $idTabla, $DatosCotizacion[\"ProductosVenta_idProductosVenta\"]);\r\n //Reviso si hay impuestos adicionales en los productos\r\n \r\n if($DatosCotizacion[\"TablaItem\"]=='productosventa'){\r\n $DatosOtrosImpuestos=$this->DevuelveValores(\"productos_impuestos_adicionales\",\"idProducto\",$DatosCotizacion[\"ProductosVenta_idProductosVenta\"]);\r\n \r\n }\r\n ////Empiezo a insertar en la tabla items facturas\r\n ///\r\n ///\r\n $SubtotalItem=$DatosCotizacion['ValorAcordado']*$DatosCotizacion['Cantidad'];\r\n if(isset($DatosProducto[\"Especial\"])){\r\n if($DatosProducto[\"Especial\"]=='SI'){\r\n $SubtotalItem=$DatosCotizacion['ValorAcordado'];\r\n }\r\n }\r\n $TotalSubtotal=$TotalSubtotal+$SubtotalItem; //se realiza la sumatoria del subtotal\r\n \r\n $IVAItem=($SubtotalItem*$DatosProducto[\"IVA\"]);\r\n \r\n $TotalIVA=$TotalIVA+$IVAItem; //se realiza la sumatoria del iva\r\n \r\n $TotalItem=$SubtotalItem+$IVAItem;\r\n $GranTotal=$GranTotal+$TotalItem;//se realiza la sumatoria del total\r\n \r\n $SubtotalCosto=$DatosCotizacion['Cantidad']*$DatosCotizacion[\"CostoUnitario\"];\r\n $TotalCostos=$TotalCostos+$SubtotalCosto;//se realiza la sumatoria de los costos\r\n if($DatosProducto[\"IVA\"]<>\"E\"){\r\n $PorcentajeIVA=($DatosProducto[\"IVA\"]*100).\"%\";\r\n }else{\r\n $PorcentajeIVA=\"Exc\";\r\n }\r\n $this->ItemFacturaVenta($NumFactura, $DatosCotizacion, $DatosProducto, $SubtotalItem, $IVAItem, $TotalItem, $PorcentajeIVA, $SubtotalCosto, $FechaFactura, $DatosOtrosImpuestos, \"\");\r\n \r\n }\r\n \r\n $ID=$Datos[\"ID\"]; \r\n $TotalSubtotal=round($TotalSubtotal,2);\r\n $TotalIVA=round($TotalIVA,2);\r\n $GranTotal=round($GranTotal,2);\r\n $TotalCostos=round($TotalCostos,2);\r\n $sql=\"UPDATE facturas SET Subtotal='$TotalSubtotal', IVA='$TotalIVA', Total='$GranTotal', \"\r\n . \"SaldoFact='$GranTotal', TotalCostos='$TotalCostos' WHERE idFacturas='$ID'\";\r\n $this->Query($sql);\r\n \r\n \r\n }", "title": "" }, { "docid": "bcfea4163d5e51c39fc5efeafdc1386a", "score": "0.5923267", "text": "function reporteActaConformidadTotal()\n {\n $this->procedimiento = 'tes.f_plan_pago_sel';\n $this->transaccion = 'TES_ACTCONTOTAL_SEL';\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\n $this->setCount(false);\n\n $this->setParametro('id_proceso_wf', 'id_proceso_wf', 'int4');\n\n //Definicion de la lista del resultado del query\n\n $this->captura('fecha_inicio', 'varchar');\n $this->captura('fecha_fin', 'varchar');\n $this->captura('fecha_conformidad_final', 'varchar');\n $this->captura('conformidad_final', 'text');\n $this->captura('observaciones', 'varchar');\n $this->captura('numero_tramite', 'varchar');\n $this->captura('proveedor', 'varchar');\n $this->captura('nombre_solicitante', 'text');\n $this->captura('nro_po', 'varchar');\n $this->captura('fecha_po', 'varchar');\n $this->captura('nro_cuota_vigente', 'numeric');\n $this->captura('desc_ingas', 'varchar');\n $this->captura('cantidad_adju', 'numeric');\n $this->captura('descripcion_sol', 'varchar');\n $this->captura('firma', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //echo($this->consulta);exit;\n $this->ejecutarConsulta();\n //var_dump($this->respuesta); exit;\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "42f4ce2a7def783d309a3707cfc3f828", "score": "0.5920644", "text": "function consulta($vars)\n {\n \t$print = true;\n\t$confecha=consulta_fecha($vars); //Lo paso directamente a una funcion para que saque las fechas\n\tif($confecha != \"\" && $vars['formu']!= 5)\n\t\t$con_fecha = \" and \".$confecha;\n\telse\n\t\tif($vars['formu']==5)\n\t\t\t$con_fecha = $confecha;\n\t\telse\n\t\t\t$con_fecha = \"\";\n\t/*Limite de registros*/\n\tif($vars['limite']!=0)\n\t\t\t$limite = \" LIMIT \".$vars['limite'].\" \";\n\t\t\telse\n\t\t\t$limite = \" \";\n\t/*Filtro de la categoria de la consulta*/\n\t//Seleccion de tipo de consulta\n\t\n//Consultas entre fechas de clientes\t\n\tif($vars['formu']==0) {\n\t\tif($vars['tipo']==\"acumulado\") {\n\t\t\t$sql=\"SELECT trim(h.servicio) as Servicio, \n\t\t\tsum(h.cantidad) as Unidades, sum(h.cantidad*h.unitario) as Importe, \n\t\t\tsum(h.cantidad*h.unitario*h.iva/100) Iva, \n\t\t\tsum(h.cantidad*h.unitario+h.cantidad*h.unitario*h.iva/100) as Total\n\t\t\tFROM `historico` as h \n\t\t\tINNER JOIN `regfacturas` AS c on h.factura = c.codigo \n\t\t\tINNER JOIN `clientes` AS l ON c.id_cliente = l.Id\n\t\t\tWHERE c.id_cliente like '\".$vars['cliente'].\"' \".$con_fecha.\" \n\t\t GROUP BY h.servicio\";\n\t\t} else {\n\t\t\t$sql=\"SELECT c.fecha, trim(d.servicio) as Servicio, \n\t\t\ttrim(d.obs) as Observaciones, d.cantidad as Unidades, \n\t\t\td.unitario as Importe, d.iva, \n\t\t\t((d.unitario*d.cantidad) + (d.unitario*d.cantidad)*d.iva/100) as Total\n\t\t\tFROM `historico` AS d\n\t\t\tINNER JOIN `regfacturas` AS c on c.`codigo` = d.`factura` \n\t\t\tINNER JOIN `clientes` AS s ON c.id_cliente = s.Id\n\t\t\tWHERE c.id_cliente like '\".$vars['cliente'].\"' \".$con_fecha.\" order by c.fecha\";\n\t\t}\n\t\t$subtitulo = nombre_cliente($vars['cliente']);\n\t}\n//Consultas entre fechas de Categorias\t\n\tif($vars['formu']==1) {\n\t\tif($vars['tipo']==\"acumulado\") {\n\t\t\t$sql=\"SELECT trim(h.servicio) as Servicio,\n sum(h.cantidad) as Unidades, sum(h.cantidad*h.unitario) as Importe,\n sum(h.cantidad*h.unitario*h.iva/100) Iva,\n sum(h.cantidad*h.unitario+h.cantidad*h.unitario*h.iva/100) as Total\n\t\t\tFROM `historico` as h \n\t\t\tINNER JOIN `regfacturas` AS c on h.factura = c.codigo\n INNER JOIN `clientes` AS l ON c.id_cliente = l.Id\n INNER JOIN `entradas_salidas` AS e ON e.idemp like l.Id\n WHERE ( (e.salida >= c.fecha or e.salida like '0000-00-00')\n and e.entrada <= c.fecha \n and e.Categoria like '\".$vars['categoria'].\"'\n \".$con_fecha.\") GROUP BY h.servicio\";\n\t\t} else {\n\t\t\t/*$sql=\"SELECT c.fecha, s.Nombre as Cliente, trim(d.servicio) as Servicio,\n trim(d.obs) as Observaciones, d.cantidad as Unidades, d.unitario as Importe,\n d.iva, ((d.unitario*d.cantidad) + (d.unitario*d.cantidad)*d.iva/100) as Total\n\t\t\tFROM `historico` AS d\n\t\t\tINNER JOIN `regfacturas` AS c on c.`codigo` = d.`factura`\n INNER JOIN `clientes` AS s ON c.id_cliente = s.Id\n\t\t\tWHERE s.Categoria like '\".utf8_decode($vars[categoria]).\"' \".$con_fecha.\" order by c.fecha\";\n\t\t*/\n $sql = \"SELECT c.fecha, s.Nombre, trim(d.servicio) as Servicio,\n trim(d.obs) as Observaciones, d.cantidad as Unidades, \n d.unitario as Importe, \n d.iva, ((d.unitario*d.cantidad) + (d.unitario*d.cantidad)*d.iva/100) as Total \n FROM entradas_salidas e\n inner join clientes as s on e.idemp like s.Id\n inner join regfacturas as c on e.idemp like c.id_cliente\n inner join historico as d on c.codigo like d.factura\n where ((e.salida >= c.fecha or e.salida like '0000-00-00')\n and e.entrada <= c.fecha \n and e.categoria like '\".$vars['categoria'].\"' \".$con_fecha.\")\n order by c.fecha, s.Nombre\";\n\t\t}\n $subtitulo = $vars['categoria'];\n\t}\n//Consumo mensual y acumulado entre fechas por servicios,control de almacenaje y fijos\n\tif($vars['formu']==2)\n\t{\n\t\tif($vars['tipo']==\"acumulado\") {\n\t\t\t$sql=\"SELECT sum(h.cantidad) as Unidades, \n\t\t\tsum(h.cantidad*h.unitario) as Importe, \n\t\t\tsum(h.cantidad*h.unitario*h.iva/100) Iva, \n\t\t\tsum(h.cantidad*h.unitario+h.cantidad*h.unitario*h.iva/100) as Total\n\t\t\tFROM `historico` as h \n\t\t\tINNER JOIN `regfacturas` AS c on h.factura = c.codigo \n\t\t\tINNER JOIN `clientes` AS l ON c.id_cliente = l.Id\n\t\t\tWHERE trim(h.servicio) like '\".$vars['servicios'].\"' \".$con_fecha.\" \n\t\t GROUP BY h.servicio\";\n\t\t} else {\n\t\t\t$sql=\"SELECT c.fecha, s.nombre as Cliente, d.obs as Observaciones, \n\t\t\td.cantidad as Unidades, d.unitario as Importe, d.iva, \n\t\t\t((d.unitario*d.cantidad) + (d.unitario*d.cantidad)*d.iva/100) as Total\n\t\t\tFROM `historico` AS d\n\t\t\tINNER JOIN `regfacturas` AS c on c.`codigo` = d.`factura` \n\t\t\tINNER JOIN `clientes` AS s ON c.id_cliente = s.Id\n\t\t\tWHERE trim(d.servicio) LIKE '\".$vars['servicios'].\"' \".$con_fecha.\" \n\t\t\torder by c.fecha\";\n\t\t}\n\t\t$subtitulo = $vars['servicios'];\n\t}\n//Consumo mensual y acumulados entre fechas por cliente/servicio\n\tif($vars['formu']==3)\n\t{\n\t\tif($vars['tipo']==\"acumulado\") {\n\t\t\t$sql=\"SELECT sum(h.cantidad) as Unidades, \n\t\t\tsum(h.cantidad*h.unitario) as Importe, \n\t\t\tsum(h.cantidad*h.unitario*h.iva/100) Iva, \n\t\t\tsum(h.cantidad*h.unitario+h.cantidad*h.unitario*h.iva/100) as Total\n\t\t\tFROM `historico` as h \n\t\t\tINNER JOIN `regfacturas` AS c on h.factura = c.codigo \n\t\t\tINNER JOIN `clientes` AS l ON c.id_cliente = l.Id\n\t\t\tWHERE trim(h.servicio) like '\".$vars['servicios'].\"' \".$con_fecha.\" \n\t\t and c.id_cliente LIKE '\".$vars['cliente'].\"' GROUP BY h.servicio\";\n\t\t} else {\n\t\t\t$sql=\"SELECT c.fecha, d.obs as Observaciones, d.cantidad as Unidades, \n\t\t\td.unitario as Importe, d.iva, \n\t\t\t((d.unitario*d.cantidad) + (d.unitario*d.cantidad)*d.iva/100) as Total\n\t\t\tFROM `historico` AS d\n\t\t\tINNER JOIN `regfacturas` AS c on c.`codigo` = d.`factura` \n\t\t\tINNER JOIN `clientes` AS s ON c.id_cliente = s.Id\n\t\t\tWHERE trim(d.servicio) LIKE '\".$vars['servicios'].\"' \".$con_fecha.\" \n\t\t\tand c.id_cliente LIKE '\".$vars['cliente'].\"' order by c.fecha\";\n\t\t}\n\t\t$subtitulo = nombre_cliente($vars['cliente']).\" / \".$vars['servicios'];\n\t}\n//Consumo mensual y acumulado entre fechas por categoria/servicio\n\tif($vars['formu']==4) {\n\t\tif($vars['tipo']==\"acumulado\") {\n\t\t\t$sql=\"SELECT sum(h.cantidad) as Unidades, \n\t\t\tsum(h.cantidad*h.unitario) as Importe, \n\t\t\tsum(h.cantidad*h.unitario*h.iva/100) Iva, \n\t\t\tsum(h.cantidad*h.unitario+h.cantidad*h.unitario*h.iva/100) as Total\n\t\t\tFROM `historico` as h \n\t\t\tINNER JOIN `regfacturas` AS c on h.factura = c.codigo \n\t\t\tINNER JOIN `clientes` AS l ON c.id_cliente = l.Id\n\t\t\tWHERE trim(h.servicio) like '\".$vars['servicios'].\"' \".$con_fecha.\" \n\t\t and l.Categoria LIKE '\".$vars['categoria'].\"' GROUP BY h.servicio\";\n\t\t} else {\n\t\t\t$sql=\"SELECT c.fecha, s.Nombre as Cliente, d.obs as Observaciones, \n\t\t\td.cantidad as Unidades, d.unitario as Importe, d.iva, \n\t\t\t((d.unitario*d.cantidad) + (d.unitario*d.cantidad)*d.iva/100) as Total\n\t\t\tFROM `historico` AS d\n\t\t\tINNER JOIN `regfacturas` AS c on c.`codigo` = d.`factura` \n\t\t\tINNER JOIN `clientes` AS s ON c.id_cliente = s.Id\n\t\t\tWHERE trim(d.servicio) LIKE '\".$vars['servicios'].\"' \n\t\t\t\".$con_fecha.\" and s.Categoria LIKE '\".$vars['categoria'].\"' \n\t\t\torder by c.fecha\";\n\t\t}\n\t\t$subtitulo = nombre_cliente($vars['categoria']).\" / \".$vars['servicios'];\n\t}\n//Servicios por volumen de facturacion + facturados\n\tif($vars['formu']==5){\n\t\tif($vars['tipo']==\"acumulado\") {\n\t\t\t$sql=\"SELECT trim(h.servicio) as Servicio, sum(h.cantidad) as Unidades, \n\t\t\tsum(h.cantidad*h.unitario) as Importe, sum(h.cantidad*h.unitario*h.iva/100) as Iva,\n\t\t\tsum(h.cantidad*h.unitario+h.cantidad*h.unitario*h.iva/100) as Total\n\t\t\tFROM `historico` as h \n\t\t\tINNER JOIN `regfacturas` AS c on h.factura = c.codigo \n\t\t\tINNER JOIN `clientes` AS l ON c.id_cliente = l.Id\n\t\t\t\".$con_fecha.\" GROUP BY trim(h.servicio) order by Total desc\";\n\t\t} else {\n\t\t\tif ( $vars['tipo'] == \"detallado\" ) {\n\t\t\t $sql=\"SELECT c.fecha, trim(d.servicio) as Servicio, \n\t\t\t trim(d.obs) as Observaciones, s.Nombre as Cliente, \n\t\t\t d.cantidad as Unidades, d.unitario as Importe, d.iva, \n\t\t\t ((d.unitario*d.cantidad) + (d.unitario*d.cantidad)*d.iva/100) as Total\n\t\t\t FROM `historico` AS d\n\t\t\t INNER JOIN `regfacturas` AS c on c.`codigo` = d.`factura` \n\t\t\t INNER JOIN `clientes` AS s ON c.id_cliente = s.Id\n\t\t\t \".$con_fecha.\" order by c.fecha\";\n\t\t\t} else {\n\t\t\t\tif($vars['servicios']!=\"0\") {\n\t\t\t\t\t$filtra_servicio = \" and trim(h.servicio) \n\t\t\t\t\tlike trim('\".$vars['servicios'].\"') \";\n\t\t\t\t} else {\n\t\t\t\t\t$filtra_servicio = \" \";\n\t\t\t\t}\n\t\t\t\t$rango=array_de_rangos($vars);\n\t\t\t\tforeach($rango as $rangillo) {\n\t\t\t\t $esql[]=\"SELECT trim(h.servicio) as Servicio,\n\t\t\t\t sum(h.cantidad*h.unitario+h.cantidad*h.unitario*h.iva/100) as Total\n\t\t\t\t FROM `historico` as h \n\t\t\t\t INNER JOIN `regfacturas` AS c on h.factura = c.codigo \n\t\t\t\t INNER JOIN `clientes` AS l ON c.id_cliente = l.Id\n\t\t\t\t \".$rangillo.\" \".$filtra_servicio.\" GROUP BY trim(h.servicio) \n\t\t\t\t order by Total desc \".$limite;\n\t\t\t\t}\n\t\t\t//$cadena.=$vars[servicios];\n\t\t\t}\n\t\t}\n\t\t$subtitulo = \"\";\n\t}\n\t//Clientes por volumen de facturacion + facturados\n\tif($vars['formu']==6)\n\t{\n\t\tif($vars['tipo']==\"acumulado\")\n\t\t$sql=\"SELECT l.Nombre as Cliente, sum(h.cantidad) as Unidades, \n\t\tsum(h.cantidad*h.unitario) as Importe, sum(h.cantidad*h.unitario*h.iva/100) as Iva,\n\t\tsum(h.cantidad*h.unitario+h.cantidad*h.unitario*h.iva/100) as Total\n\t\tFROM `historico` as h \n\t\tINNER JOIN `regfacturas` AS c on h.factura = c.codigo \n\t\tINNER JOIN `clientes` AS l ON c.id_cliente = l.Id\n\t\t\".$con_fecha.\" GROUP BY l.Nombre order by Total desc\";\n\t\telse\n\t\t\tif($vars['tipo']==\"detallado\")\n\t\t$sql=\"SELECT c.fecha, s.Nombre as Cliente, \n\t\ttrim(d.servicio) as Servicio, trim(d.obs) as Observaciones, \n\t\td.cantidad as Unidades, d.unitario as Importe, d.iva, \n\t\t((d.unitario*d.cantidad) + (d.unitario*d.cantidad)*d.iva/100) as Total\n\t\tFROM `historico` AS d\n\t\tINNER JOIN `regfacturas` AS c on c.`codigo` = d.`factura` \n\t\tINNER JOIN `clientes` AS s ON c.id_cliente = s.Id\n\t\t\".$con_fecha.\" order by c.fecha\";\n\t\t\telse /*Comparativa entre rangos*/\n\t\t\t{\n\t\t\t\tif($vars['cliente']!=0)\n\t\t\t\t\t$filtra_cliente = \" and c.id_cliente like \".$vars['cliente'].\" \";\n\t\t\t\telse\n\t\t\t\t\t$filtra_cliente = \"\";\n\t\t\t\t$rango=array_de_rangos($vars);\n\t\t\t\tforeach($rango as $rangillo)\n\t\t\t\t\t$esql[]=\"SELECT l.Nombre as Cliente, \n\t\t\t\t\tsum(h.cantidad*h.unitario+h.cantidad*h.unitario*h.iva/100) as Total\n\t\t FROM `historico` as h \n\t\t INNER JOIN `regfacturas` AS c on \n\t\t h.factura = c.codigo INNER JOIN `clientes` AS l ON c.id_cliente = l.Id\n\t\t \".$rangillo.\" \".$filtra_cliente.\" \n\t\t\t\t GROUP BY l.Nombre order by Total desc \".$limite;\n\t\t\t}\n\t\t$subtitulo = \"\";\n\t}\n\t//THIS IS THE MOTHER OF THE LAMB - Nueva seccion Comparativas\n\tif($vars['formu']==7) {\n\t\tswitch($vars['tipo_comparativa']) {\n\t\t\t//Clientes\n\t\t\tcase 1:\n\t\t\t$sql=\"SELECT l.Nombre as Cliente, \n\t\t\tsum(h.cantidad*h.unitario+h.cantidad*h.unitario*h.iva/100) as Total\n\t\t FROM `historico` as h \n\t\t INNER JOIN `regfacturas` AS c on h.factura = c.codigo \n\t\t INNER JOIN `clientes` AS l ON c.id_cliente = l.Id\";\n\t\t\tif($vars['cliente']!=0) {\n\t\t\t\t$filtro = \" and c.id_cliente like \".$vars['cliente'].\" \";\n\t\t\t\t$grupo = \" GROUP BY l.Nombre\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\t$sql = ereg_replace(\"l.Nombre as Cliente,\",\" 1 ,\",$sql);\n\t\t\t\t$filtro = \" \";\n\t\t\t}\n\t\t\tif($vars['servicios']!=\"0\")\n\t\t\t\t$filtro .= \" and trim(h.servicio) like trim('\".$vars['servicios'].\"') \";\t\n\t\t\tbreak;\n\t\t\t\n\t\t\t//Servicios\n\t\t\tcase 2:\n\t\t\t$sql=\"SELECT trim(h.servicio) as Servicio, \n\t\t\t sum(h.cantidad*h.unitario+h.cantidad*h.unitario*h.iva/100) as Total\n\t\t\t\tFROM `historico` as h \n\t\t\t\tINNER JOIN `regfacturas` AS c on h.factura = c.codigo \n\t\t\t\tINNER JOIN `clientes` AS l ON c.id_cliente = l.Id\";\n\t\t\tif($vars['servicios']!=\"0\") {\n\t\t\t\t$filtro = \" and trim(h.servicio) like trim('\".$vars['servicios'].\"') \";\n\t\t\t\t$grupo = \" GROUP BY trim(h.servicio)\";\n\t\t\t} else {\n\t\t\t $sql=\"SELECT 1, sum(h.cantidad*h.unitario+h.cantidad*h.unitario*h.iva/100) as Total\n\t\t\t\tFROM `historico` as h \n\t\t\t\tINNER JOIN `regfacturas` AS c on h.factura = c.codigo \n\t\t\t INNER JOIN `clientes` AS l ON c.id_cliente = l.Id\";\n\t\t\t $filtro = \" \";\n\t\t\t}\n\t\t\tbreak;\t\t\n\t\t\t\n\t\t\t//Categorias\n\t\t\tcase 3:\n\t\t\t$sql=\"SELECT 1, sum(h.cantidad*h.unitario+h.cantidad*h.unitario*h.iva/100) as Total\n\t\t\tFROM `historico` as h \n\t\t\tINNER JOIN `regfacturas` AS c on h.factura = c.codigo INNER JOIN `clientes` AS l ON c.id_cliente = l.Id\";\n\t\t\tif($vars['categoria']!=\"0\")\n\t\t\t{\n\t\t\t\t$filtro = \" and l.Categoria like '\".$vars['categoria'].\"' \";\n\t\t\t\t$grupo = \" GROUP BY l.Categoria\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sql = ereg_replace(\"l.Categoria as Categoria,\",\" 1 ,\",$sql);\n\t\t\t\t$filtro = \" \";\n\t\t\t}\n\t\t\tif($vars['servicios']!=\"0\")\n\t\t\t\t$filtro .= \" and trim(h.servicio) like trim('\".$vars['servicios'].\"') \";\t\n\t\t\tbreak;\n\t\t}\n\t\t//Rango de fechas de la comparativa\n\t\t$rangete_a = genera_consultas($vars['fecha_inicio_a'],$vars['fecha_fin_a']);\n\t\t//echo $sql.\" \".$filtro.\" \".$grupo.$vars[servicios];\n\t\t$subtitulo = \"Datos del \".$vars['fecha_inicio_a'].\" al \".$vars['fecha_fin_a'].\" de \";\n\t\tif(is_array($rangete_a))\n\t\tforeach($rangete_a as $rango)\n\t\t{\n\t\t\t$rango.=\"-1\";\n\t\t\t$esql[]=$sql.\" where year('$rango') like year(c.Fecha) \n\t\t\tand month('$rango') like month(c.fecha) \".$filtro.$grupo;\n\t\t}\n\t\tif($vars['fecha_inicio_b']!='' && $vars['fecha_fin_b']!='')\n\t\t{\n\t\t\t$rangete_b = genera_consultas($vars['fecha_inicio_b'],$vars['fecha_fin_b']);\n\t\t\t$subtitulo2 = \"Datos del \".$vars['fecha_inicio_b'].\" al \".$vars['fecha_fin_b'];\n\t\t\tif(is_array($rangete_b))\n\t\t\tforeach($rangete_b as $rango)\n\t\t\t{\n\t\t\t\t$rango.=\"-1\";\n\t\t\t\t$esql2[]=$sql.\" where year('$rango') like year(c.Fecha) \n\t\t\t\tand month('$rango') like month(c.fecha) \".$filtro.$grupo;\n\t\t\t}\n\t\t}\n\t}\n//EJECUTAMOS LAS CONSULTAS\nif($vars['formu']!=7)\n{\n\t$_SESSION['consulta']=$sql;//Almacenamos la consulta como variable de sesion\n\t$_SESSION['titulo']=$vars['titulo'].\" - \".$subtitulo;\n\tif(is_array($esql))\n\t{\n\t\t$cadena.=genera_la_tabla_chunga($esql,$vars,$subtitulo);//multiarray\n\t\t$print = false;\n\t}\n\telse\n\t\t$cadena=genera_la_tabla($sql,$vars,$subtitulo);\n// \t$cadena.=\"<br/><span class='boton' \n// \tonclick='window.open(\\\"print.php?sql=\".urlencode($sql).\"\\\",\\\"_self\\\")'>Imprimir</span>\";\n\t$_SESSION['sqlQuery'] = $sql;\n\tif ( $print ) {\n \t$cadena .= \"<br/><span class='boton' \n \tonclick='window.open(\\\"print.php\\\",\\\"_self\\\")'>Imprimir</span>\";\n\t}\n}\nelse\n{\n\tif(is_array($esql))\n\t{\n\t\t$cadena.=genera_la_tabla_comparativas($esql,$vars,$subtitulo);//multiarray\n\t\t$print = false;\n\t\tif(is_array($esql2))\n\t\t{\n\t\t$cadena.=\"</tr></table><br/>\";\n\t\t$cadena.=genera_la_tabla_comparativas($esql2,$vars,$subtitulo2);//multiarray\n\t\t$print = false;\n\t\t}\n\t}\n\t$cadena.=\"</tr></table>\";\n\t$_SESSION['sqlQuery'] = $sql;\n// \t$cadena.=\"<br/><span class='boton' \n// \tonclick='window.open(\\\"print.php?sql=\".urlencode($sql).\"\\\",\\\"_self\\\")'>Imprimir</span>\";\n\tif ( $print ) {\n\t\t$cadena .= \"<br/><span class='boton'\n\t\t\tonclick='window.open(\\\"print.php\\\",\\\"_self\\\")'>Imprimir</span>\";\n\t}\n\t//session_start();\n\tunset($_SESSION['acumulado']);\n\tunset($_SESSION['datos_ant']);\n}\n return $cadena;\n}", "title": "" }, { "docid": "b6d0fb577405fb3ee45aa3926832947a", "score": "0.5920042", "text": "public function RegistreSeparado($fecha,$Hora,$idPreventa,$idCliente,$Abono,$DatosSeparado) {\r\n ////Creo el Separado\r\n \r\n $DatosSucursal= $this->DevuelveValores(\"empresa_pro_sucursales\", \"Actual\", 1); \r\n $tab=\"separados\";\r\n $NumRegistros=9;\r\n $Columnas[0]=\"ID\"; $Valores[0]=\"\";\r\n $Columnas[1]=\"Fecha\"; $Valores[1]=$fecha;\r\n $Columnas[2]=\"Hora\"; $Valores[2]=$Hora;\r\n $Columnas[3]=\"idCliente\"; $Valores[3]=$idCliente;\r\n $Columnas[4]=\"Saldo\"; $Valores[4]=0;\r\n $Columnas[5]=\"Estado\"; $Valores[5]=\"Abierto\";\r\n $Columnas[6]=\"Total\"; $Valores[6]=0;\r\n $Columnas[7]=\"idUsuarios\"; $Valores[7]= $this->idUser;\r\n $Columnas[8]=\"idSucursal\"; $Valores[8]=$DatosSucursal[\"ID\"];\r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n $idSeparado=$this->ObtenerMAX($tab, \"ID\", 1, \"\");\r\n \r\n $Total=0;\r\n //Inserto los items\r\n $tab=\"separados_items\";\r\n $NumRegistros=25;\r\n $Columnas[0]=\"ID\"; $Valores[0]=\"\";\r\n $Columnas[1]=\"idSeparado\"; $Valores[1]=$idSeparado;\r\n \r\n $consulta=$this->ConsultarTabla(\"preventa\", \"WHERE VestasActivas_idVestasActivas='$idPreventa' \"); \r\n \r\n while ($DatosPreventa=$this->FetchArray($consulta)){\r\n \r\n $DatosProducto= $this->DevuelveValores($DatosPreventa[\"TablaItem\"], \"idProductosVenta\", $DatosPreventa[\"ProductosVenta_idProductosVenta\"]);\r\n $Total=$Total+$DatosPreventa['TotalVenta'];\r\n $SubtotalCosto=$DatosPreventa['CostoUnitario']*$DatosPreventa['Cantidad'];\r\n \r\n $Columnas[2]=\"TablaItems\"; $Valores[2]=$DatosPreventa[\"TablaItem\"];\r\n $Columnas[3]=\"Referencia\"; $Valores[3]=$DatosProducto[\"Referencia\"];\r\n $Columnas[4]=\"Nombre\"; $Valores[4]=$DatosProducto[\"Nombre\"];\r\n $Columnas[5]=\"Departamento\"; $Valores[5]=$DatosProducto[\"Departamento\"];\r\n $Columnas[6]=\"SubGrupo1\"; $Valores[6]=$DatosProducto['Sub1'];\r\n $Columnas[7]=\"SubGrupo2\"; $Valores[7]=$DatosProducto['Sub2'];\r\n $Columnas[8]=\"SubGrupo3\"; $Valores[8]=$DatosProducto['Sub3'];\r\n $Columnas[9]=\"SubGrupo4\"; $Valores[9]=$DatosProducto['Sub4'];\r\n $Columnas[10]=\"SubGrupo5\"; $Valores[10]=$DatosProducto['Sub5'];\r\n $Columnas[11]=\"ValorUnitarioItem\"; $Valores[11]=$DatosPreventa['ValorAcordado'];\r\n $Columnas[12]=\"Cantidad\"; $Valores[12]=$DatosPreventa['Cantidad'];\r\n $Columnas[13]=\"Multiplicador\"; $Valores[13]=1;\r\n $Columnas[14]=\"SubtotalItem\"; $Valores[14]=$DatosPreventa['Subtotal'];\r\n $Columnas[15]=\"IVAItem\"; $Valores[15]=$DatosPreventa['Impuestos'];\r\n $Columnas[16]=\"TotalItem\"; $Valores[16]=$DatosPreventa['TotalVenta'];\r\n $Columnas[17]=\"PorcentajeIVA\";\t$Valores[17]=($DatosProducto['IVA']*100).\"%\";\r\n $Columnas[18]=\"PrecioCostoUnitario\";$Valores[18]=$DatosPreventa['CostoUnitario'];\r\n $Columnas[19]=\"SubtotalCosto\";\t$Valores[19]=$SubtotalCosto;\r\n $Columnas[20]=\"TipoItem\";\t\t$Valores[20]=$DatosPreventa[\"TipoItem\"];\r\n $Columnas[21]=\"CuentaPUC\";\t\t$Valores[21]=$DatosProducto['CuentaPUC'];\r\n $Columnas[22]=\"GeneradoDesde\"; $Valores[22]=\"cotizacionesv5\";\r\n $Columnas[23]=\"NumeroIdentificador\"; $Valores[23]=\"\";\r\n $Columnas[24]=\"Fecha\"; $Valores[24]=$fecha;\r\n //$Columnas[25]=\"idClientes\"; $Valores[25]=$idCliente;\r\n \r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n \r\n if($DatosPreventa[\"TipoItem\"]==\"PR\"){\r\n \r\n $DatosKardex[\"Cantidad\"]=$DatosPreventa['Cantidad'];\r\n $DatosKardex[\"idProductosVenta\"]=$DatosProducto[\"idProductosVenta\"];\r\n $DatosKardex[\"CostoUnitario\"]=$DatosProducto['CostoUnitario'];\r\n $DatosKardex[\"Existencias\"]=$DatosProducto['Existencias'];\r\n $DatosKardex[\"Detalle\"]=\"Separado\";\r\n $DatosKardex[\"idDocumento\"]=$idSeparado;\r\n $DatosKardex[\"TotalCosto\"]=$SubtotalCosto;\r\n $DatosKardex[\"Movimiento\"]=\"SALIDA\";\r\n $DatosKardex[\"CostoUnitarioPromedio\"]=$DatosProducto[\"CostoUnitarioPromedio\"];\r\n $DatosKardex[\"CostoTotalPromedio\"]=$DatosProducto[\"CostoUnitarioPromedio\"]*$DatosKardex[\"Cantidad\"];\r\n $this->InserteKardex($DatosKardex);\r\n }\r\n }\r\n $idComprobanteAbono=$DatosSeparado[\"idCompIngreso\"];\r\n $tab=\"separados_abonos\";\r\n $NumRegistros=8;\r\n $Columnas[0]=\"ID\"; $Valores[0]=\"\";\r\n $Columnas[1]=\"Fecha\"; $Valores[1]=$fecha;\r\n $Columnas[2]=\"Hora\"; $Valores[2]=$Hora;\r\n $Columnas[3]=\"idSeparado\"; $Valores[3]=$idSeparado;\r\n $Columnas[4]=\"Valor\"; $Valores[4]=$Abono;\r\n $Columnas[5]=\"idCliente\"; $Valores[5]=$idCliente;\r\n $Columnas[6]=\"idUsuarios\"; $Valores[6]=$this->idUser;\r\n $Columnas[7]=\"idComprobanteIngreso\"; $Valores[7]=$idComprobanteAbono;\r\n \r\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\r\n \r\n $Saldo=$Total-$Abono;\r\n $sql=\"UPDATE separados SET Total='$Total', Saldo='$Saldo' WHERE ID='$idSeparado'\";\r\n $this->Query($sql);\r\n $this->BorraReg(\"preventa\", \"VestasActivas_idVestasActivas\", $idPreventa);\r\n return($idSeparado);\r\n \r\n }", "title": "" }, { "docid": "56a93704285bcefdba338b56db771731", "score": "0.5915182", "text": "function LiberarPartidasNoRecibidas($doco, $id_preoc, $pxr, $par){\n \t\tif(substr($doco,0,3) == 'AAA'){\n \t\t\t\t$doco = substr($doco,3,10);\n \t\t\t\techo 'Se ha Cancelado el ID: '.$id_preoc;\n \t\t\t\t\t$this->query=\"SELECT * FROM PREOC01 WHERE ID = $id_preoc\";\n\t\t\t\t \t$rs=$this->QueryObtieneDatosN();\n\t\t\t\t \t//echo $this->query.'<p>';\n\t\t\t\t \t$row= ibase_fetch_object($rs);\n\t\t\t\t \t$co= $row->CANT_ORIG;\n\t\t\t\t \t$cs= $row->CANTI;\n\n\t\t\t\t \tif ($cs > $co){\n\t\t\t\t \t\t$this->query = \"SELECT iif(sum(cant) is null, 0, sum(cant)) as cantpedida FROM FTC_POC_DETALLE WHERE IDPREOC = $id_preoc and status = '2'\";\n\t\t\t\t \t\t$rs=$this->QueryObtieneDatosN();\n\t\t\t\t \t\t$row=ibase_fetch_object($rs);\n\t\t\t\t \t\t$cp = $row->CANTPEDIDA;\n\t\t\t\t \t\t$this->query=\"UPDATE preoc01 set canti= ($co-$cp), rest=($co-$cp), ordenado=$cp, status = 'F' where id=$id_preoc\";\n\t\t\t\t \t\t$rs= $this->EjecutaQuerySimple();\n\t\t\t\t \t\t$this->query=\"UPDATE FTC_POC_DETALLE set pxr = 0, status = 4, status_real = 'Cancelada' where idpreoc = $id_preoc and oc = '$doco'\";\n\t\t\t\t \t\t$rs=$this->EjecutaQuerySimple();\n\t\t\t\t \t\tthrow new Exception(\"Se esta tratando de solicitar mas de lo debido, se reporta a Direccion\");\n\t\t\t\t \t\treturn $rs;\n\t\t\t\t \t}\n\t\t\t\t \techo 'Cantidad de los pendientes pxr: '.$pxr.' valor de Cantidad Original: '.$co.'<p>';\n\t\t\t\t \tif ($pxr <= $co){\n\t\t\t\t \t\t$query = \"UPDATE FTC_POC_DETALLE SET\";\n\t\t\t\t\t \t\t$query .= \" pxr= (pxr - $pxr) ,\";\n\t\t\t\t\t \t\t$query .= \" status = 5, \";\n\t\t\t\t\t \t\t$query .= \" status_log2 = 'Cancelado'\";\n\t\t\t\t\t \t\t$query .= \" WHERE idpreoc = $id_preoc and oc = '$doco'\";\n\t\t\t\t\t \t\t$this->query = $query;\n\t\t\t\t\t \t\t$result = $this->EjecutaQuerySimple();\n\t\t\t\t\t \t\techo $this->query.'<p>';\n\n\n\t\t\t\t \t\t$query = \"UPDATE PREOC01 SET\";\n\t\t\t\t\t\t\t\t$query .= \" rest= 0,\";\n\t\t\t\t\t\t\t\t$query .= \" canti= 0,\";\n\t\t\t\t\t\t\t\t$query .= \" ordenado= ordenado,\";\n\t\t\t\t\t\t\t\t$query .= \" status='C'\";\n\t\t\t\t\t\t\t\t$query .= \" WHERE id=$id_preoc\";\n\t\t\t\t\t\t\t\t$this->query = $query;\n\t\t\t\t\t\t\t\t$this->EjecutaQuerySimple();\n\n\t\t\t\t\t\t\t\techo $this->query.'<p>';\n\t\t\t\t\t\t\t\t$this->libSaldo($id_preoc, $pxr, $doco);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->query=\"SELECT sum(cantidad_REC) as cantidad FROM FTC_DETALLE_RECEPCIONES WHERE ORDEN = '$doco'\";\n\t\t \t\t$rs=$this->EjecutaQuerySimple();\n\t\t \t\t$row=ibase_fetch_object($rs);\n\n\n\t\t \t\tif($row->CANTIDAD > 0){\n\t\t \t\t\t$this->query=\"UPDATE FTC_POC SET STATUS = 'CANCELADA_PAR' WHERE OC = '$doco'\";\n\t\t \t\t\t$rs=$this->EjecutaQuerySimple();\n\t\t \t\t}else{\n\t\t \t\t\t$this->query=\"UPDATE FTC_POC SET STATUS = 'CANCELADA_TOT' where OC = '$doco'\";\n\t\t \t\t\t$rs=$this->EjecutaQuerySimple();\t\n\t\t \t\t}\t\t \n \t\t\t}\n \t\t\t\treturn;\t\n \t\t}\n \t\t\n \t\tif(substr($doco,0, 2) == 'OP' or substr($doco,0,3) =='AAA'){\n \t\t\t$this->query=\"SELECT STATUS_LOG2 as status from FTC_POC_DETALLE where oc = '$doco' and partida = $par\";\n \t\t\t$rs=$this->EjecutaQuerySimple();\n \t\t\t$row=ibase_fetch_object($rs);\n \t\t\t$status =$row->STATUS;\n \t\t}else{\n \t\t\t$this->query=\"SELECT STATUS_LOG2 as status FROM PAR_COMPO01 WHERE CVE_DOC = '$doco' and num_par = '$par'\"; \n \t \t\t$rs=$this->EjecutaQuerySimple();\n\t \t\t$row=ibase_fetch_object($rs);\n \t\t\t$status = $row->STATUS;\n \t\t}\n \t\tif($status == 'Tesoreria' and substr($doco, 0,2) <> 'OP'){\n \t\t\t\t$usuario =$_SESSION['user']->NOMBRE;\n\t\t\t\t\t$this->query=\"SELECT p.clave, p.nombre, oc.fechaelab FROM COMPO01 oc left join prov01 p on p.clave=oc.cve_clpv WHERE CVE_DOC = '$doco'\";\n\t\t\t\t\t$rs=$this->EjecutaQuerySimple();\n\t\t\t\t\t$row=ibase_fetch_object($rs);\n\t\t\t\t\t$cveprov=$row->CLAVE;\n\t\t\t\t\t$nomprov = $row->NOMBRE;\n\t\t\t\t\t$fecha = $row->FECHAELAB;\n\n\t\t\t\t\t$this->query=\"INSERT INTO LIB_PARTIDAS (ID, IDPREOC, CANTIDAD, PROVEEDOR, NOMBRE_PROVEEDOR, OC, FECHA_OC, PARTIDA_OC, USUARIO, FECHA ) \n\t\t\t\t\t\t\t\t\tVALUES (NULL, $id_preoc, $pxr,'$cveprov', '$nomprov', '$doco', '$fecha', $par, '$usuario', current_timestamp )\";\n\t\t\t\t\t$rs=$this->EjecutaQuerySimple();\n\n\t\t\t\t\tif($rs){\n\t\t\t\t\t\techo 'Entro a la liberacion';\n\t\t\t\t \t$this->query=\"SELECT * FROM PREOC01 WHERE ID = $id_preoc\";\n\t\t\t\t \t$rs=$this->QueryObtieneDatosN();\n\t\t\t\t \t//echo $this->query.'<p>';\n\t\t\t\t \t$row= ibase_fetch_object($rs);\n\t\t\t\t \t$co= $row->CANT_ORIG;\n\t\t\t\t \t$cs= $row->CANTI;\n\n\t\t\t\t \tif ($cs > $co){\n\t\t\t\t \t\t$this->query = \"SELECT iif(sum(cant) is null, 0, sum(cant)) as cantpedida FROM PAR_COMPO01 WHERE ID_PREOC = $id_preoc and status = 'E'\";\n\t\t\t\t \t\t$rs=$this->QueryObtieneDatosN();\n\t\t\t\t \t\t$row=ibase_fetch_object($rs);\n\t\t\t\t \t\t$cp = $row->CANTPEDIDA;\n\t\t\t\t \t\t$this->query=\"UPDATE preoc01 set canti= ($co-$cp), rest=($co-$cp), ordenado=$cp, status ='F' where id=$id_preoc\";\n\t\t\t\t \t\t$rs= $this->EjecutaQuerySimple();\n\t\t\t\t \t\t$this->query=\"UPDATE par_compo01 set pxr = 0, status = 'D' where id_preoc = $id_preoc and cve_doc = '$doco'\";\n\t\t\t\t \t\t$rs=$this->EjecutaQuerySimple();\n\t\t\t\t \t\tthrow new Exception(\"Se esta tratando de solicitar mas de lo debido, se reporta a Direccion\");\n\t\t\t\t \t\treturn $rs;\n\t\t\t\t \t}\n\t\t\t\t \techo 'Cantidad de los pendientes pxr: '.$pxr.' valor de Cantidad Original: '.$co.'<p>';\n\t\t\t\t \tif ($pxr <= $co){\n\t\t\t\t \t\t$query = \"UPDATE PAR_COMPO01 SET\";\n\t\t\t\t\t \t\t$query .= \" pxr= (pxr - $pxr) ,\";\n\t\t\t\t\t \t\t$query .= \" status = 'L', \";\n\t\t\t\t\t \t\t$query .= \" status_log2 = 'Cancelado'\";\n\t\t\t\t\t \t\t$query .= \" WHERE id_preoc = $id_preoc and cve_doc = '$doco'\";\n\t\t\t\t\t \t\t$this->query = $query;\n\t\t\t\t\t \t\t$result = $this->EjecutaQuerySimple();\n\n\t\t\t\t \t\t$query = \"UPDATE PREOC01 SET\";\n\t\t\t\t\t\t\t\t$query .= \" rest= (rest + $pxr),\";\n\t\t\t\t\t\t\t\t$query .= \" canti= (rest + $pxr),\";\n\t\t\t\t\t\t\t\t$query .= \" ordenado= ordenado - $pxr,\";\n\t\t\t\t\t\t\t\t$query .= \" status='F'\";\n\t\t\t\t\t\t\t\t$query .= \" WHERE id=$id_preoc\";\n\t\t\t\t\t\t\t\t$this->query = $query;\n\t\t\t\t\t\t\t\t$this->EjecutaQuerySimple();\n\t\t\t\t\t\t\t\t$this->libSaldo($id_preoc, $pxr, $doco);\n\t\t\t\t\t\t\t\techo 'Se ha liberado y registrado;'.'<p>';\n\t\t\t\t\t\t\t}\n\t \t\t} \n \t}elseif($status =='Tesoreria' and substr($doco,0,2)=='OP'){\n \t\t\t$usuario =$_SESSION['user']->NOMBRE;\n\t\t\t\t\t$this->query=\"SELECT p.clave, p.nombre, oc.fecha_elab FROM FTC_POC oc left join prov01 p on p.clave=oc.cve_prov WHERE OC = '$doco'\";\n\t\t\t\t\t$rs=$this->EjecutaQuerySimple();\n\t\t\t\t\t$row=ibase_fetch_object($rs);\n\t\t\t\t\t$cveprov=$row->CLAVE;\n\t\t\t\t\t$nomprov = $row->NOMBRE;\n\t\t\t\t\t$fecha = $row->FECHA_ELAB;\n\t\t\t\t\t$this->query=\"SELECT * FROM FTC_POC_DETALLE ftd left join ftc_poc ftc on ftc.oc = ftd.oc where ftd.OC = '$doco' AND ftd.PARTIDA = $par\";\n\t\t\t\t\t$res=$this->EjecutaQuerySimple();\n\t\t\t\t\t$row2=ibase_fetch_object($res);\n\t\t\t\t\t//var_dump($row2);\n\t\t\t\t\t$this->query=\"INSERT INTO LIB_PARTIDAS (ID, IDPREOC, CANTIDAD, PROVEEDOR, NOMBRE_PROVEEDOR, OC, FECHA_OC, PARTIDA_OC, USUARIO, FECHA ) \n\t\t\t\t\t\t\t\t\tVALUES (NULL, \n\t\t\t\t\t\t\t\t\t\t$row2->IDPREOC, \n\t\t\t\t\t\t\t\t\t\t$row2->PXR , \n\t\t\t\t\t\t\t\t\t\t(SELECT CVE_PROV FROM FTC_POC WHERE CVE_DOC = '$doco'), \n\t\t\t\t\t\t\t\t\t(SELECT NOMBRE FROM PROV01 WHERE CLAVE = (SELECT CVE_PROV FROM FTC_POC WHERE CVE_DOC = '$doco')), \n\t\t\t\t\t\t\t\t\t'$doco', \n\t\t\t\t\t\t\t\t\t'$row2->FECHA_OC', \n\t\t\t\t\t\t\t\t\t$par, \n\t\t\t\t\t\t\t\t\t'$usuario', \n\t\t\t\t\t\t\t\t\tcurrent_timestamp\n\t\t\t\t\t\t\t\t)\";\n\n\t\t\t\t\t$rs=$this->EjecutaQuerySimple();\n\t\t\t\t\t//echo $this->query;\n\t\t\t\t\tif($rs){\n\t\t\t\t\t\techo 'Entro a la liberacion';\t\n\t\t\t\t\t\t\t$dao = new idpegaso;\n\t\t\t\t\t\t\t$idp = $dao->revisaDuplicado($id_preoc);\n\t\t\t\t\t\t\tvar_dump($idp);\n\n\t\t\t\t\t\t\t$co = $idp['original'];\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t[\"ordenado\"]=>\n\t\t\t\t\t\t\t\t float(200)\n\t\t\t\t\t\t\t\t [\"recibido\"]=>\n\t\t\t\t\t\t\t\t float(162)\n\t\t\t\t\t\t\t\t [\"pendiente\"]=>\n\t\t\t\t\t\t\t\t float(0)\n\t\t\t\t\t\t\t\t [\"original\"]=>\n\t\t\t\t\t\t\t\t float(200)\n\t\t\t\t\t\t\t\t [\"status\"]=>\n\t\t\t\t\t\t\t\t string(1) \"B\"\n\t\t\t\t\t\t\t\t [\"ID\"]=>\n\t\t\t\t\t\t\t\t string(6) \"159863\"\n\t\t\t\t\t\t\t*/\t\t\t\t\t\t\t\n\t\t\t\t \tif (($row2->PXR + $idp['recibido']) <= $co ){\n\t\t\t\t \t\t$canti = $co - ($idp['ordenado'] - $row2->PXR);\n\t\t\t\t \t\t$rest = $co - ($idp['ordenado'] - $row2->PXR);\n\t\t\t\t \t\t$ordenado= $idp['ordenado'] - $row2->PXR;\n\t\t\t\t \t\techo 'entra a liberacion a devolver: '.$pxr.' recibido al momento'.$idp['recibido'].' original '.$idp['original'].'<br/>';\n\t\t\t\t \t\t$this->query = \"SELECT iif(sum(cantidad) is null, 0, sum(cantidad)) as cantpedida FROM FTC_POC_DETALLE WHERE IDPREOC = $id_preoc and status = '2'\";\n\t\t\t\t \t\t$rs=$this->QueryObtieneDatosN();\n\t\t\t\t \t\t$row=ibase_fetch_object($rs);\n\t\t\t\t \t\t$cp = $row->CANTPEDIDA;\n\t\t\t\t \t\t$this->query=\"UPDATE preoc01 set canti= $canti, rest=$rest, ordenado= $ordenado, status= 'F' where id=$id_preoc\";\n\t\t\t\t \t\t$rs= $this->EjecutaQuerySimple();\n\t\t\t\t \t\techo $this->query;\n\t\t\t\t \t\t$this->query=\"UPDATE FTC_POC_DETALLE set pxr = 0, status = 4, status_real = 'Cancelada' where idpreoc = $id_preoc and oc = '$doco' and partida = $row2->PARTIDA\";\n\t\t\t\t \t\t$rs=$this->EjecutaQuerySimple();\n\t\t\t\t \t\t//throw new Exception(\"Se esta tratando de solicitar mas de lo debido, se reporta a Direccion\");\n\t\t\t\t \t\treturn $rs;\n\t\t\t\t \t}\n\t\t\t\t \techo 'Cantidad de los pendientes pxr: '.$pxr.' valor de Cantidad Original: '.$co.'<p>';\n\t\t\t\t \t/*if ($pxr <= $co){\n\t\t\t\t \t\t$query = \"UPDATE FTC_POC_DETALLE SET\";\n\t\t\t\t\t \t\t$query .= \" pxr= (pxr - $pxr) ,\";\n\t\t\t\t\t \t\t$query .= \" status = 3, \";\n\t\t\t\t\t \t\t$query .= \" status_log2 = 'Cancelado'\";\n\t\t\t\t\t \t\t$query .= \" WHERE idpreoc = $id_preoc and oc = '$doco'\";\n\t\t\t\t\t \t\t$this->query = $query;\n\t\t\t\t\t \t\t$result = $this->EjecutaQuerySimple();\n\n\t\t\t\t \t\t$query = \"UPDATE PREOC01 SET\";\n\t\t\t\t\t\t\t\t$query .= \" rest= (rest + $pxr),\";\n\t\t\t\t\t\t\t\t$query .= \" canti= (rest + $pxr),\";\n\t\t\t\t\t\t\t\t$query .= \" ordenado= ordenado - $pxr,\";\n\t\t\t\t\t\t\t\t$query .= \" status='F'\";\n\t\t\t\t\t\t\t\t$query .= \" WHERE id=$id_preoc\";\n\t\t\t\t\t\t\t\t$this->query = $query;\n\t\t\t\t\t\t\t\t$this->EjecutaQuerySimple();\n\t\t\t\t\t\t\t\t$this->libSaldo($id_preoc, $pxr, $doco);\n\t\t\t\t\t\t\t\techo 'Se ha liberado y registrado;'.'<p>';\n\t\t\t\t\t\t\t}*/\n\t \t\t} \n\n \t\t$this->query=\"SELECT sum(cantidad_REC) as cantidad FROM FTC_DETALLE_RECEPCIONES WHERE ORDEN = '$doco'\";\n \t\t$rs=$this->EjecutaQuerySimple();\n \t\t$row=ibase_fetch_object($rs);\n \t\tif($row->CANTIDAD > 0){\n \t\t\t$this->query=\"UPDATE FTC_POC SET STATUS = 'CANCELADA_PAR' WHERE OC = '$doco'\";\n \t\t\t$rs=$this->EjecutaQuerySimple();\n \t\t}else{\n \t\t\t$this->query=\"UPDATE FTC_POC SET STATUS = 'CANCELADA_TOT' where OC = '$doco'\";\n \t\t\t$rs=$this->EjecutaQuerySimple();\t\n \t\t}\n\n \t}\n\t\t\treturn;\n\t}", "title": "" }, { "docid": "4a987d45b9f1ca246c6a0bd292c0ed88", "score": "0.591263", "text": "public function listarConsultas($CONTRATO)\n {\n try\n {\n date_default_timezone_set(\"America/Mexico_city\");\n $dao=new ConsultasDAO();\n $lista= $dao->listarConsultas($CONTRATO);\n $hoy = new Datetime();\n\t $al = strftime(\"%d - %B - %y\");\n $hoy = new Datetime($al);\n foreach($lista as $key=>$value)\n {\n // $dias = 0;\n // if($value[\"fecha_inicio\"] != \"0000-00-00\")\n // {\n $fecha_inicio = new Datetime($value[\"fecha_inicio\"]);\n $frecuencia = $value[\"frecuencia\"];\n \n if($frecuencia == \"DIARIO\")\n {\n $dias = strtotime(strftime(\"%d-%B-%y\",$hoy -> getTimestamp())) - strtotime(strftime(\"%d-%B-%y\",$fecha_inicio -> getTimestamp()));\n $diario = $dias / 86400;\n // $lista[$key][\"CANTIDAD_REALIZAR\"] = $year;\n $lista[$key][\"evidencias_realizar\"] = $diario+1;\n }\n\n if($frecuencia == \"SEMANAL\")\n {\n $dias = strtotime(strftime(\"%d-%B-%y\",$hoy -> getTimestamp())) - strtotime(strftime(\"%d-%B-%y\",$fecha_inicio -> getTimestamp()));\n $dias = $dias / 86400;\n $semanas = $dias/7;\n $lista[$key][\"evidencias_realizar\"] = floor($semanas);\n }\n\n if($frecuencia == \"MENSUAL\")\n {\n $cantidad_a_realizar = 0;\n $dias = strtotime(strftime(\"%d-%B-%y\",$hoy -> getTimestamp())) - strtotime(strftime(\"%d-%B-%y\",$fecha_inicio -> getTimestamp()));\n $dias = $dias / 86400;\n $mesInicio = strftime(\"%m\",$fecha_inicio->getTimestamp());\n $yearInicio = strftime(\"%Y\",$fecha_inicio->getTimestamp());\n $finWhile=true;\n while($finWhile)\n {\n $mensual = cal_days_in_month(CAL_GREGORIAN,$mesInicio,$yearInicio);\n if($mesInicio==12)\n {\n $mesInicio=0;\n $yearInicio++;\n }\n if($dias > 0)\n {\n $cantidad_a_realizar++;\n }\n if($dias < 0)\n {\n $finWhile=false;\n }\n if($dias == 0)\n {\n $finWhile=false;\n $cantidad_a_realizar++;\n }\n $mesInicio++;\n $dias = $dias - $mensual;\n };\n $lista[$key][\"evidencias_realizar\"] = $cantidad_a_realizar;\n }\n\n if($frecuencia == \"BIMESTRAL\")\n {\n $cantidad_a_realizar = 0;\n $dias = strtotime(strftime(\"%d-%B-%y\",$hoy -> getTimestamp())) - strtotime(strftime(\"%d-%B-%y\",$fecha_inicio -> getTimestamp()));\n $dias = $dias / 86400;\n $mesInicio = strftime(\"%m\",$fecha_inicio->getTimestamp());\n $yearInicio = strftime(\"%Y\",$fecha_inicio->getTimestamp());\n $finWhile=true;\n while($finWhile)\n {\n $mensual = cal_days_in_month(CAL_GREGORIAN,$mesInicio,$yearInicio);\n $mensual = $mensual + cal_days_in_month(CAL_GREGORIAN,$mesInicio+1,$yearInicio);\n\n if($mesInicio==11)\n {\n $mesInicio=-1;\n $yearInicio++;\n }\n else\n {\n if($mesInicio==12)\n {\n $mesInicio=0;\n $yearInicio++;\n }\n }\n if($dias > 0)\n {\n $cantidad_a_realizar++;\n }\n if($dias < 0)\n {\n $finWhile=false;\n }\n if($dias == 0)\n {\n $finWhile=false;\n $cantidad_a_realizar++;\n }\n $mesInicio+=2;\n $dias = $dias - $mensual;\n };\n $lista[$key][\"evidencias_realizar\"] = $cantidad_a_realizar;\n }\n\n if($frecuencia == \"ANUAL\")\n {\n $cantidad_a_realizar = 1;\n $yearInicio = strftime(\"%Y\",$fecha_inicio->getTimestamp());\n $yearHoy = strftime(\"%Y\",$hoy->getTimestamp());\n // $diasInicio = strftime(\"%d\",$fecha_inicio->getTimestamp());\n // $diasHoy = strftime(\"%d\",$hoy->getTimestamp());\n // if($diasInicio < $diasHoy)\n // {\n // $cantidad_a_realizar++;\n // $yearInicio++;\n // }\n // if($diasInicio == $diasHoy)\n // {\n // $cantidad_a_realizar++;\n // }\n $finWhile=true;\n while($finWhile)\n {\n if($yearInicio >= $yearHoy)\n {\n $finWhile=false;\n }\n else\n {\n $yearInicio++;\n $cantidad_a_realizar++;\n }\n }\n $lista[$key][\"evidencias_realizar\"] = $cantidad_a_realizar;\n // echo $diasInicio.\"\\n\";\n // echo $diasHoy.\"\\n\";\n // echo $yearInicio.\"\\n\";\n // echo $yearHoy.\"\\n\";\n // echo $cantidad_a_realizar.\"\\n\";\n }\n\n if($frecuencia == \"INDEFINIDO\")\n {\n $lista[$key][\"evidencias_realizar\"] = -1;\n }\n\n if($frecuencia == \"POR EVENTO\")\n {\n $lista[$key][\"evidencias_realizar\"] = -1;\n }\n // }\n // else\n // {\n // $lista[$key][\"evidencias_realizar\"] = \"X\";\n // }\n \n if($value[\"id_registro\"]==null)\n {\n $lista[$key][\"evidencias_realizar\"] = \"X\";\n }\n\n if($lista[$key][\"evidencias_realizar\"]==0)\n $lista[$key][\"cumplimiento_evidencias\"] = 100;\n\n if($lista[$key][\"evidencias_realizar\"]>0)\n $lista[$key][\"cumplimiento_evidencias\"] = ($lista[$key][\"evidencias_validadas\"]/$lista[$key][\"evidencias_realizar\"])*100;\n\n if($lista[$key][\"evidencias_realizar\"]==-1)\n {\n if( $lista[$key][\"evidencias_totales\"] == $lista[$key][\"evidencias_validadas\"] && $lista[$key][\"evidencias_totales\"]>0)\n $lista[$key][\"cumplimiento_evidencias\"] = 100;\n else\n if( $lista[$key][\"evidencias_totales\"]>0 )\n {\n $lista[$key][\"cumplimiento_evidencias\"] = ($lista[$key][\"evidencias_validadas\"]/$lista[$key][\"evidencias_totales\"])*100;\n }\n else\n $lista[$key][\"cumplimiento_evidencias\"] = 0;\n }\n\n if($lista[$key][\"evidencias_realizar\"]==\"X\")\n $lista[$key][\"cumplimiento_evidencias\"] = \"X\";\n }\n // var_dump($lista);\n return $lista;\n } catch (Exception $ex)\n {\n throw $ex;\n return-1;\n }\n }", "title": "" }, { "docid": "33d10815e72bdbbd9b555d34fba89c6d", "score": "0.59105253", "text": "private function actualizarEstadoCliente($poliza){\n\n //DAO\n /** @var EntityManager $em */\n $em = $this->getDoctrine()->getManager();\n $polizaDAO = DoctrineFactoryDAO::getFactory()->getPolizaDAO($em);\n $clienteDAO = DoctrineFactoryDAO::getFactory()->getClienteDAO($em);\n $estadoClienteDAO = DoctrineFactoryDAO::getFactory()->getEnumEstadoClienteDAO($em);\n $estadoPolizaDAO = DoctrineFactoryDAO::getFactory()->getEnumEstadoPolizaDAO($em);\n $cuotaDAO = DoctrineFactoryDAO::getFactory()->getCuotaDAO($em);\n\n $cliente = $poliza->getCliente();\n\n if(is_null($cliente)){\n\n return $cliente;\n\n }\n\n //Revisa la cantidad de polizas del cliente.\n // Si la unica poliza asociada fue la dada de alta recien (la referencia a poliza anterior es nula, quiere decir que es la primera asociada).\n // El cliente pasa a estado normal.\n if(is_null($poliza->getIdPoliza())){\n\n //Busca estado Normal en la BD y se lo agrega al cliente.\n $cliente->setEnumEstadocliente($estadoClienteDAO->getObj(2));\n //Almacena los cambios realizados\n $clienteDAO->save($cliente);\n\n return $cliente;\n\n }\n\n\n //Buscar polizas que estén vigentes. Si retorna 0, el cliente pasa a estado Normal\n //Estado de poliza de id 1 es estado Vigente\n $estado = $estadoPolizaDAO->getObj(1);\n $cantPolizaVig = $polizaDAO->countPolizaPorEstado($cliente, $estado);\n\n if($cantPolizaVig==0){\n //Busca estado Normal en la BD y se lo agrega al cliente.\n $cliente->setEnumEstadocliente($estadoClienteDAO->getObj(2));\n //Almacena los cambios realizados\n $clienteDAO->save($cliente);\n\n return $cliente;\n\n }\n\n\n\n //Si posee siniestros en el ultimo año\n $siniestros = $poliza->getSiniestroFC();\n\n //Tiene al menos un siniestro este año (la recientemente dada de alta)\n if($siniestros->getId() != 4){\n\n //Busca estado Normal en la BD y se lo agrega al cliente.\n $cliente->setEnumEstadocliente($estadoClienteDAO->getObj(2));\n //Almacena los cambios realizados\n $clienteDAO->save($poliza->getCliente());\n\n return $cliente;\n\n }\n\n //Comienza a buscar en las polizas anteriores a la que fue dada de alta recien cuya fecha de fin de vigencia sea en el ultimo año\n $now = new DateTime('today');\n $diferencia = $now->diff($poliza->getIdPoliza()->getFechaFinVigencia());\n $dias = (int)$diferencia->format('%R%a');\n\n $p = $poliza->getIdPoliza();\n\n //Si la diferencia entre la fecha fin vigencia y la fecha de hoy, en días, es menor a 365, quiere decir que la poliza anterior estuvo vigente en el mismo año\n\n while((-1)*$dias<=365 && !is_null($p)){\n\n //Revisar si tiene siniestros\n //Si es distinto de 4, tiene siniestros en el ultimo año. Pasa a estado normal el cliente\n if($p->getSiniestroFC()->getId()!=4){\n\n //Busca estado Normal en la BD y se lo agrega al cliente.\n $cliente->setEnumEstadocliente($estadoClienteDAO->getObj(2));\n //Almacena los cambios realizados\n $clienteDAO->save($poliza->getCliente());\n\n return $cliente;\n\n }\n\n $p = $p->getIdPoliza();\n if(!is_null($p)){\n //Calcula la diferencia entre la fecha de fin de vigencia de poliza y la fecha de hoy para ver si esta o no en el rango de un año\n $diferencia = $now->diff($p->getFechaFinVigencia());\n $dias = (int)$diferencia->format('%R%a');\n }\n\n }\n\n //Si lo anterior no anda, probar buscar en la BD directamente y recorrer la lista. Puede ser problema de referencias.\n //Busco las polizas con fecha de inicio de vigencia dentro de un año.\n //Las agrego a una lista\n //Recorro la lista y veo si hay siniestros. Si hay una poliza en esa lista que tenga siniestros, pasa a normal y termina\n //normal\n\n\n\n //Si pasa el while, es porque no tiene siniestros en el ultimo año.\n //Cliente no posee siniestros en el ultimo año (supera el recorrido poliza por poliza)\n\n\n //Si posee una cuota impaga normal\n //return $cuotaDAO->countCuotasImpagas($cliente, $estadoPolizaDAO->getObj(4));\n //Si es distinto de cero, es porque el cliente tiene cuotas impagas.\n if((int)$cuotaDAO->countCuotasImpagas($cliente, $estadoPolizaDAO->getObj(4)) != 0){\n\n //Busca estado Normal en la BD y se lo agrega al cliente.\n $cliente->setEnumEstadocliente($estadoClienteDAO->getObj(2));\n //Almacena los cambios realizados\n $clienteDAO->save($poliza->getCliente());\n\n return $cliente;\n }\n\n\n //Cliente no posee cuotas impagas, pasa a la ultima evaluación\n\n\n //Solo comparo las fechas de vigencia entre polizas.\n //Cliente activo en los ultimos dos años de forma ininterrumpida.\n //\"no estuvo activo ininterrumpido\": si, por ejemplo, contrata una poliza por año, se considera que esta inactivo desde el mes 7 al 12.\n\n //Condiciones de corte:la diferencia entre la fecha de fin de vigencia y la actual es menor a 2*365 días (dos años)\n //que poliza id_llegue a null\n\n $p2 = $poliza;\n $p1 = $poliza->getIdPoliza();\n\n $lapso = (int)($p2->getFechaInicioVigencia()->diff($p1->getFechaFinVigencia()))->format('%R%a');\n //return $lapso;\n if(abs($lapso)-1>0){\n\n //Busca estado Normal en la BD y se lo agrega al cliente.\n $cliente->setEnumEstadocliente($estadoClienteDAO->getObj(2));\n //Almacena los cambios realizados\n $clienteDAO->save($poliza->getCliente());\n\n return $cliente;\n }\n\n $now = new DateTime('today');\n $diferencia = $now->diff($p1->getFechaFinVigencia());\n $dias = abs((int)$diferencia->format('%R%a'));\n\n $p2=$p1;\n $p1=$p2->getIdPoliza();\n\n $lapso = (int)($p2->getFechaInicioVigencia()->diff($p1->getFechaFinVigencia()))->format('%R%a');\n\n while(abs($dias)<730 && !is_null($p1)){\n\n //Si la fecha de inicio de vigencia de p2 (poliza actual)\n //NO está dentro del rango de p1 (poliza anterior, fecha inicio a fin)\n //quiere decir que hubo un periodo en el que la poliza no fue renovada\n //o no hubo una poliza vigente, por lo que pierde continuidad y deja de ser\n //\"activo\" ininterrumpido. Pasa a normal\n if(abs($lapso)-1>0){\n\n //Quiere decir que entre la fecha de inicio vigencia de poliza y la\n //fecha de fin de vigencia de la anterior, hubo un periodo (dias o meses)\n //en los que no estuvo activo, por lo que pasa a estado normal\n\n //Busca estado Normal en la BD y se lo agrega al cliente.\n $cliente->setEnumEstadocliente($estadoClienteDAO->getObj(2));\n //Almacena los cambios realizados\n $clienteDAO->save($poliza->getCliente());\n\n return $cliente;\n }\n\n $p2=$p1;\n $p1=$p2->getIdPoliza();\n\n if(!is_null($p1)){\n $lapso = (int)($p2->getFechaInicioVigencia()->diff($p1->getFechaFinVigencia()))->format('%R%a');\n\n $diferencia = $now->diff($p1->getFechaFinVigencia());\n $dias = (int)$diferencia->format('%R%a');\n }\n\n\n }\n\n //Dadas estas tres condiciones, con un AND, el estado pasa a ser Plata\n //Plata\n\n //Busca estado Plata en la BD y se lo agrega al cliente.\n $cliente->setEnumEstadocliente($estadoClienteDAO->getObj(1));\n //Almacena los cambios realizados\n $clienteDAO->save($poliza->getCliente());\n\n return $cliente;\n\n }", "title": "" }, { "docid": "0e033352af87931ec3102a528ca45d6e", "score": "0.5907601", "text": "function EFICACIA($cant,$dato,$ID,$op,$llave,$cod,$tarea){\n \n echo \"TIEMPO EN HORAS QUE SE DEBE DEMORAR EN HACER LA OP: \".$dato;\n \n $d = new entradasalida();\n $d->totaltime($ID,$dato,$op,$cant,$llave,$cod,$tarea);\n }", "title": "" }, { "docid": "09f55e0ddbda75db09e579719e22f7ca", "score": "0.5903289", "text": "function requisiciones()\n {\n $resultReq = $this->ComprasModel->getPeriodoFecha();\n if($resultReq->num_rows>0){\n $periodoFecha = $resultReq->fetch_assoc();\n\n $ano=$periodoFecha['ano'];\n $mes=$periodoFecha['mes'];\n $cerrado=$periodoFecha['cerrado'];\n $pc=$periodoFecha['permitir_cerrados'];\n $pa=$periodoFecha['periodos_abiertos'];\n $diaActual=date('d');\n if(strlen($mes)==1){ $mes='0'.$mes; }\n\n if($cerrado==1 && $pc==0){\n $sd=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed=$ano.\"-\".$mes.\"-\".$diaActual;\n\n $sd2=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed2=$ano.\"-\".$mes.\"-\".$diaActual;\n }\n\n if($cerrado==1 && $pc==1 && $pa==1){\n $sd=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed=($ano+1).\"-\".$mes.\"-\".$diaActual;\n\n $sd2=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed2=($ano+1).\"-\".$mes.\"-\".$diaActual;\n }\n\n if($cerrado==1 && $pc==1 && $pa==0){\n $sd=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed=($ano+1).\"-\".$mes.\"-31\";\n\n $sd2=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed2=($ano+1).\"-\".$mes.\"-31\";\n }\n\n if($cerrado==1 && $pc==0 && $pa==1){\n $sd=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed=($ano+1).\"-\".$mes.\"-\".$diaActual;\n\n $sd2=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed2=($ano+1).\"-\".$mes.\"-\".$diaActual;\n }\n\n if($cerrado==0 && $pa==0){\n $sd=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed=$ano.\"-\".$mes.\"-31\";\n\n $sd2=$ano.\"-\".$mes.\"-\".$diaActual;\n $ed2=($ano+1).\"-12-31\";\n }\n\n if($cerrado==0 && $pa==1){\n $sd=$ano.\"-\".$mes.\"-01\";\n $ed=($ano).\"-12-31\";\n\n $sd2=$ano.\"-\".$mes.\"-01\";\n $ed2=($ano+1).\"-12-31\";\n }\n\n //$sd=$ano.\"-\".$mes.\"-\".$diaActual;\n //echo '<br>';\n //$ed=$ano.\"-\".$mes.\"-31\";\n\n \n\n\n\n }else{\n $periodoFecha=0;\n }\n\n $resultReq = $this->ComprasModel->getAlmacen();\n if($resultReq->num_rows>0){\n while ($r = $resultReq->fetch_assoc()) {\n $almacenes[]=$r;\n }\n }else{\n $almacenes=0;\n }\n\n $resultReq = $this->ComprasModel->getEmpleados();\n if($resultReq->num_rows>0){\n while ($r = $resultReq->fetch_assoc()) {\n $empleados[]=$r;\n }\n }else{\n $empleados=0;\n }\n\n $resultReq = $this->ComprasModel->getTipoGasto();\n if($resultReq->num_rows>0){\n while ($r = $resultReq->fetch_assoc()) {\n $tipoGasto[]=$r;\n }\n }else{\n $tipoGasto=0;\n }\n\n $resultReq = $this->ComprasModel->getProveedores();\n if($resultReq->num_rows>0){\n while ($r = $resultReq->fetch_assoc()) {\n $proveedores[]=$r;\n }\n }else{\n $proveedores=0;\n }\n\n $resultReq = $this->ComprasModel->getProductos();\n if($resultReq->num_rows>0){\n while ($r = $resultReq->fetch_assoc()) {\n $productos[]=$r;\n }\n }else{\n $productos=0;\n }\n\n $resultReq = $this->ComprasModel->getMonedas();\n if($resultReq->num_rows>0){\n while ($r = $resultReq->fetch_assoc()) {\n $monedas[]=$r;\n }\n }else{\n $monedas=0;\n }\n\n $resultReq = $this->ComprasModel->getUsuario();\n if($resultReq->num_rows>0){\n $set = $resultReq->fetch_assoc();\n $username=$set['username'];\n $iduser=$set['idempleado'];\n }else{\n $username='Favor de salir y loguearse nuevamente';\n $iduser='0';\n }\n\n require('views/compras/requisiciones.php');\n }", "title": "" }, { "docid": "2ef7fa33e4649dcbfc8788666858ae11", "score": "0.59029937", "text": "public function consultaSaldoTransportista(){\r\n $idPerson = Auth::user()->personid;\r\n $dataPerson=Person::find($idPerson);\r\n if(count($dataPerson)>0){\r\n if($dataPerson->isshipper==true){\r\n $idShipper=0;\r\n $datosChofer= Shipper::where(\"personid\",$idPerson)->get();\r\n foreach($datosChofer as $chofer){\r\n $idShipper= $chofer->id;\r\n }\r\n $saldoActual= ShipperAccount::where(\"shipperid\",$idShipper)->get();\r\n $vSaldo=0.00;\r\n $vDisponible=0.00;\r\n foreach($saldoActual as $rSaldo){\r\n $vSaldo=Funciones::formato_numeros($rSaldo->balance, \",\", \".\");\r\n $vDisponible=Funciones::formato_numeros($rSaldo->available, \",\", \".\");\r\n }\r\n\r\n $cadenaSaldo=\"<li>\r\n <a href='\".url('/transportista/estadoCuenta').\"'><font style='color:#b9261e'><b>\".trans(\"leng.Saldo disponible\").\": S/ $vDisponible</b></font></a></li>\";\r\n \r\n return $cadenaSaldo;\r\n \r\n \r\n }\r\n }else{\r\n Auth::logout();\r\n return redirect('login/inicio');\r\n }\r\n }", "title": "" }, { "docid": "3793d43262285c9b14aa3f987531a00a", "score": "0.59021026", "text": "function AfficheRemis($object, $accounts )\n{\n\tglobal $db, $langs , $sortfield, $sortorder; \n\t$accountlinestatic=new AccountLine($db);\n\t$paymentstatic=new Paiement($db);\n\t// List of paiements\n\t$sql = \"SELECT b.rowid, b.amount, b.num_chq, b.emetteur,\";\n\t$sql.= \" b.dateo as date, b.datec as datec, b.banque,\";\n\t$sql.= \" p.rowid as pid, ba.rowid as bid, p.statut\";\n\t$sql.= \" FROM \".MAIN_DB_PREFIX.\"bank_account as ba\";\n\t$sql.= \" LEFT JOIN \".MAIN_DB_PREFIX.\"bank as b ON (b.fk_account = ba.rowid)\";\n\t$sql.= \" LEFT JOIN \".MAIN_DB_PREFIX.\"paiement as p ON p.fk_bank = b.rowid\";\n\t$sql.= \" WHERE ba.entity IN (\".getEntity('bank_account').\")\";\n\t$sql.= \" AND b.fk_bordereau = \".$object->id;\n\t\n\tif (! $sortfield) $sortfield=\"b.dateo,b.rowid\";\t\n\tif (! $sortorder) $sortorder=\"ASC\";\n\t$sql.= $db->order($sortfield, $sortorder);\n\n\t$resql = $db->query($sql);\n\tif ($resql)\n\t{\n\t\t$num = $db->num_rows($resql);\n\n\t print '<div class=\"div-table-responsive\">';\n\t\tprint '<table class=\"noborder\" width=\"100%\">';\n\n\t\t$param=\"&amp;id=\".$object->id;\n\t\t\n\t\tprint '<tr class=\"liste_titre\">';\n\t\tprint_liste_field_titre(\"Cheques\",'','','','','width=\"30\"');\n\t\tprint_liste_field_titre(\"DateReceived\",$_SERVER[\"PHP_SELF\"],\"b.dateo,b.rowid\", \"\",$param,'align=\"center\"',$sortfield,$sortorder);\n\t\tprint_liste_field_titre(\"Numero\",$_SERVER[\"PHP_SELF\"],\"b.num_chq\", \"\",$param,'align=\"center\"',$sortfield,$sortorder);\n\t\tprint_liste_field_titre(\"CheckTransmitter\",$_SERVER[\"PHP_SELF\"],\"b.emetteur\", \"\",$param,\"\",$sortfield,$sortorder);\n\t\tprint_liste_field_titre(\"Bank\",$_SERVER[\"PHP_SELF\"],\"b.banque\", \"\",$param,\"\",$sortfield,$sortorder);\n\t\tprint_liste_field_titre(\"Amount\",$_SERVER[\"PHP_SELF\"],\"b.amount\", \"\",$param,'align=\"right\"',$sortfield,$sortorder);\n\t\tprint_liste_field_titre(\"Payment\",$_SERVER[\"PHP_SELF\"],\"p.rowid\", \"\",$param,'align=\"center\"',$sortfield,$sortorder);\n\t\tprint_liste_field_titre(\"LineRecord\",$_SERVER[\"PHP_SELF\"],\"b.rowid\", \"\",$param,'align=\"center\"',$sortfield,$sortorder);\n\t\tprint_liste_field_titre('');\n\t\tprint \"</tr>\\n\";\n\t\t$i=1;\n if ($num > 0)\n {\n\t\t\twhile ($objp = $db->fetch_object($resql))\n\t\t\t{\n\t\t\t\t$account_id = $objp->bid;\n\t\t\t\t/* pôurquoi ?\n\t\t\t\tif (! isset($accounts[$objp->bid]))\n\t\t\t\t\t$accounts[$objp->bid]=0;\n\t\t\t\t$accounts[$objp->bid] += 1;*/\n\n\t\t\t\tprint '<tr class=\"oddeven\">';\n\t\t\t\tprint '<td align=\"center\">'.$i.'</td>';\n\t\t\t\tprint '<td align=\"center\">'.dol_print_date($db->jdate($objp->date),'day').'</td>';\t// Date operation\n\t\t\t\tprint '<td align=\"center\">'.($objp->num_chq?$objp->num_chq:'&nbsp;').'</td>';\n\t\t\t\tprint '<td>'.dol_trunc($objp->emetteur,24).'</td>';\n\t\t\t\tprint '<td>'.dol_trunc($objp->banque,24).'</td>';\n\t\t\t\tprint '<td align=\"right\">'.price($objp->amount).'</td>';\n\t\t\t\t// Link to payment\n\t\t\t\tprint '<td align=\"center\">';\n\t\t\t\t$paymentstatic->id=$objp->pid;\n\t\t\t\t$paymentstatic->ref=$objp->pid;\n\t\t\t\tif ($paymentstatic->id)\n\t\t\t\t{\n\t\t\t\t\tprint $paymentstatic->getNomUrl(1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tprint '&nbsp;';\n\t\t\t\t}\n\t\t\t\tprint '</td>';\n\t\t\t\t// Link to bank transaction\n\t\t\t\tprint '<td align=\"center\">';\n\t\t\t\t$accountlinestatic->rowid=$objp->rowid;\n\t\t\t\tif ($accountlinestatic->rowid)\n\t\t\t\t{\n\t\t\t\t\tprint $accountlinestatic->getNomUrl(1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tprint '&nbsp;';\n\t\t\t\t}\n\t\t\t\tprint '</td>';\n\t\t\t\t// Action button\n\t\t\t\tprint '<td align=\"right\">';\n\t\t\t\tif ($object->statut == 0)\n\t\t\t\t{\n\t\t\t\t\tprint '<a href=\"'.$_SERVER[\"PHP_SELF\"].'?id='.$object->id.'&amp;action=remove&amp;lineid='.$objp->rowid.'\">'.img_delete().'</a>';\n\t\t\t\t}\n\t\t\t\tif ($object->statut == 1 && $objp->statut != 2)\n\t\t\t\t{\n\t\t\t\t\tprint '<a href=\"'.$_SERVER[\"PHP_SELF\"].'?id='.$object->id.'&amp;action=reject_check&amp;lineid='.$objp->rowid.'\">'.img_picto($langs->trans(\"RejectCheck\"),'disable').'</a>';\n\t\t\t\t}\n\t\t\t\tif ($objp->statut == 2) \n\t\t\t\t{\n\t\t\t\t\tprint ' &nbsp; '.img_picto($langs->trans('CheckRejected'),'statut8').'</a>';\n\t\t\t\t}\n\t\t\t\tprint '</td>';\n\t\t\t\tprint '</tr>';\n\t\t\t\t$i++;\n\t\t\t} \n\t\t}\n else\n {\n print '<td colspan=\"8\" class=\"opacitymedium\">';\n print $langs->trans(\"None\");\n print '</td>';\n }\n\n\t\tprint \"</table>\";\n\t\tprint \"</div>\";\n\t}\n\telse\n\t{\n\t\tdol_print_error($db);\n\t}\n\n}", "title": "" }, { "docid": "bf4ea7bdf181df8c8bdea5d706f5314d", "score": "0.5899534", "text": "function Guardar_Datos_Generales($sender=\"\",$params=\"\")\n {\n global $sContrato,$sIdConvenioAct;\n $Estimacion =$params;\n\n $sql = \" select dFechaFinal, dAvanceFisicoReal, dAvanceFisicoProgramado\n from estimacionperiodo\n where sContrato = '$sContrato'\n and iNumeroEstimacion = '$Estimacion' \";\n $rs = mysql_query($sql);\n $row = mysql_fetch_array($rs);\n $AvanceFisicoReal = $row['dAvanceFisicoReal'];\n $AvanceFisicoProg = $row['dAvanceFisicoProgramado'];\n $FechaFinal = $row['dFechaFinal'];\n\n // Acumulados Mensuales del Anexo DE\n $sql = \" select sum(DEmn) as dMontoMN,\n sum(DEdll) as dMontoDLL\n from anexosmensuales\n Where sContrato = '$sContrato'\n And sIdConvenio = '$sIdConvenioAct'\n and dIdFecha = '$FechaFinal'\n group by sContrato\";\n $rs = mysql_query($sql);\n $total = mysql_num_rows($rs);\n if ($total > 0)\n { $row = mysql_fetch_array($rs);\n $MontoProgMensualMN = $row['dMontoMN'];\n $MontoProgMensualDLL = $row['dMontoDLL'];\n }\n // Acumulados Mensuales del Anexo DE\n $sql = \" select sum(DEmn) as dMontoMN,\n sum(DEdll) as dMontoDLL\n from anexosmensuales\n Where sContrato = '$sContrato'\n And sIdConvenio = '$sIdConvenioAct'\n And dIdFecha <= '$FechaFinal'\n group by sContrato\";\n $rs = mysql_query($sql);\n $total = mysql_num_rows($rs);\n if ($total > 0)\n { $row = mysql_fetch_array($rs);\n $MontoProgAcumMN = $row['dMontoMN'];\n $MontoProgAcumDLL = $row['dMontoDLL'];\n }\n // datos restantes....\n $sql = \"select sElementoPEP, sFondo,\n sPosicionFinanciera, sCuentaMayor,\n sCentroGestor, sCentroCosto,\n sCentroBeneficio, sProyecto\n from estimacionperiodo\n Where sContrato = '$sContrato'\n and iNumeroEstimacion < '$Estimacion'\n Order By iNumeroEstimacion DESC\";\n $rs = mysql_query($sql);\n $total = mysql_num_rows($rs);\n if ($total > 0)\n { $row = mysql_fetch_array($rs);\n $ElementoPEP = $row['sElementoPEP'];\n $Fondo = $row['sFondo'];\n $PosFinanz = $row['sPosicionFinanciera'];\n $CuentaMayor = $row['sCuentaMayor'];\n $CentroGestor = $row['sCentroGestor'];\n $CentroCosto = $row['sCentroCosto'];\n $CentroBenef = $row['sCentroBeneficio'];\n $Proyecto = $row['sProyecto'];\n }\n $sql = \" Select Sum(dMontoMN) as dMontoMN,\n Sum(dMontoDLL) as dMontoDLL\n From actividadesxestimacion\n Where sContrato = '$sContrato'\n And iNumeroEstimacion = '$Estimacion'\n and sTipoActividad = 'Actividad'\n Group By sContrato\";\n $rs = mysql_query($sql);\n $total = mysql_num_rows($rs);\n if ($total > 0)\n { $row = mysql_fetch_array($rs);\n $MontoMN = $row['dMontoMN'];\n $MontoDLL = $row['dMontoDLL'];\n }else\n {\n $MontoMN = 0;\n $MontoDLL = 0;\n }\n // Obtener el monto acumulado de todas las estimaciones aplicadas ...\n $sql = \" Select Sum(a.dMontoMN) as dMontoMN,\n Sum(a.dMontoDLL) as dMontoDLL\n From actividadesxestimacion a\n inner join estimacionperiodo e\n on ( a.sContrato = e.sContrato\n and a.iNumeroEstimacion = e.iNumeroEstimacion)\n Where a.sContrato = '$sContrato'\n And a.iNumeroEstimacion <= '$Estimacion'\n and a.sTipoActividad = 'Actividad'\n Group By a.sContrato\";\n $rs = mysql_query($sql);\n $total = mysql_num_rows($rs);\n if ($total > 0)\n { $row = mysql_fetch_array($rs);\n $MontoAcumMN = $row['dMontoMN'];\n $MontoAcumDLL = $row['dMontoDLL'];\n }else\n {\n $MontoAcumMN = 0;\n $MontoAcumDLL = 0;\n }\n $sql = \" select dFechaInicio, dFechaFinal,\n dMontoMN, dMontoDLL\n from convenios\n Where sContrato = '$sContrato'\n and sIdConvenio = '$sIdConvenioAct'\";\n $rs = mysql_query($sql);\n $total = mysql_num_rows($rs);\n if ($total > 0)\n { $row = mysql_fetch_array($rs);\n $FechaIContrato = $row['dFechaInicio'];\n $FechaFContrato = $row['dFechaFinal'];\n $MontoContratoMN = $row['dMontoMN'];\n $MontoContratoLL = $row['dMontoDLL'];\n }else\n {\n $FechaIContrato = date(\"Y-m-d\");\n $FechaFContrato = date(\"Y-m-d\");\n $MontoContratoMN = 0;\n $MontoContratoLL = 0;\n }\n $sql = \" update estimacionperiodo\n set dAvanceFisicoProgramado = '$AvanceFisicoProg',\n dAvanceFisicoReal = '$AvanceFisicoReal',\n dMontoProgramadoMensualMN = '$MontoProgMensualMN',\n dMontoProgramadoMensualDLL = '$MontoProgMensualDLL',\n dMontoProgramadoAcumuladoMN = '$MontoProgAcumMN',\n dMontoProgramadoAcumuladoDLL = '$MontoProgAcumDLL',\n sElementoPEP = '$ElementoPEP',\n sFondo = '$Fondo',\n sPosicionFinanciera = '$PosFinanz',\n sCuentaMayor = '$CuentaMayor',\n sCentroGestor = '$CentroGestor',\n sCentroCosto = '$CentroCosto',\n sCentroBeneficio = '$CentroBenef',\n sProyecto = '$Proyecto',\n dMontoMN = '$MontoMN',\n dMontoDLL = '$MontoDLL',\n dMontoAcumuladoMN = '$MontoAcumMN',\n dMontoAcumuladoDLL = '$MontoAcumDLL',\n dFechaInicioContrato = '$FechaIContrato',\n dFechaFinalContrato = '$FechaFContrato',\n dMontoContratoMN = '$MontoContratoMN',\n dMontoContratoDLL = '$MontoContratoLL'\n where sContrato = '$sContrato'\n and iNumeroEstimacion = '$Estimacion'\";\n mysql_query($sql);\n }", "title": "" }, { "docid": "7770fc8e3d5037fa24fc871a8bcfbd06", "score": "0.58956516", "text": "public function obtenerSaldotarjeta();", "title": "" }, { "docid": "aeac3ac787ebca848a853eb26f02bb74", "score": "0.58956194", "text": "static public function mdlMostrarDiarioAlerta(){\n\n\n $stmt = Conexion::conectar()->prepare(\"SELECT \n CASE\n WHEN MONTH(d.fecha) = '1' \n THEN 'Ene' \n WHEN MONTH(d.fecha) = '2' \n THEN 'Feb' \n WHEN MONTH(d.fecha) = '3' \n THEN 'Mar' \n WHEN MONTH(d.fecha) = '4' \n THEN 'Abr' \n WHEN MONTH(d.fecha) = '5' \n THEN 'May' \n WHEN MONTH(d.fecha) = '6' \n THEN 'Jun' \n WHEN MONTH(d.fecha) = '7' \n THEN 'Jul' \n WHEN MONTH(d.fecha) = '8' \n THEN 'Ago' \n WHEN MONTH(d.fecha) = '9' \n THEN 'Sep' \n WHEN MONTH(d.fecha) = '10' \n THEN 'Oct' \n WHEN MONTH(d.fecha) = '11' \n THEN 'Nov' \n ELSE 'Dic' \n END AS mes,\n d.id,\n d.tipo_gasto,\n d.origen,\n d.voucher,\n d.cuenta,\n d.descripcion,\n d.debito,\n d.credito,\n (d.debito - d.credito) AS total,\n d.moneda,\n d.tipo_cambio,\n d.fecha,\n d.concepto,\n d.ruc,\n d.razon_social,\n d.tipo_documento,\n d.documento,\n d.serie_doc,\n d.num_doc,\n d.fecha_emision,\n d.fecha_vencimiento,\n d.sucursal,\n d.comprobante,\n d.contribuyente,\n d.condicion,\n d.alerta \n FROM\n diario d \n WHERE d.tipo_gasto IN ('60', '92', '94', '95', '97') \n AND (\n d.alerta = '1' \n OR d.comprobante IN ('NO EXISTE', 'ANULADO') \n OR d.contribuyente IN ('-') \n OR condicion IN ('-')\n ) \n ORDER BY d.origen,\n d.voucher\");\n\n $stmt -> execute();\n\n return $stmt -> fetchAll();\n\n $stmt -> close();\n\n $stmt = null;\n\n }", "title": "" }, { "docid": "32cf2f3ae2c346bcf753ce29e0ed7157", "score": "0.5892854", "text": "function agregar_cant_transito($Orden, $Cantidad_original, $Cantidad_ingresar)\r\n\t{\r\n\t\t$Fecha = date(\"Y-m-d\");\r\n\t\t$SQL = '';\r\n\t\t//Consulta extraer la informacion del material solicitado.\r\n\t\t$Consulta = 'INSERT INTO\r\n\t\t\t\t\t\t\t\tpedido_transito_cantidad values(\"null\", \"'.$Orden.'\",\r\n\t\t\t\t\t\t\t\t\"'.$Cantidad_original.'\", \"'.$Cantidad_ingresar.'\", \"'.$Fecha.'\"\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t';\r\n\t\t//echo $Consulta;\r\n\t\t//Ejecutamos la consulta.\r\n\t\t$Resultado = $this->db->query($Consulta);\r\n\t\t\r\n\t\tif($Cantidad_ingresar > $Cantidad_original)\r\n\t\t{\r\n\t\t\treturn 'cant';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$Total = $Cantidad_original - $Cantidad_ingresar;\r\n\t\t\t\r\n\t\t\tif($Total == 0)\r\n\t\t\t{\r\n\t\t\t\t$SQL = ', finalizado = \"s\" ';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$Consulta_update = 'UPDATE pedido_transito set cantidad = \"'.$Total.'\" '.$SQL.'\r\n\t\t\t\t\t\t\t\t\twhere orden = \"'.$Orden.'\"\r\n\t\t\t\t\t\t\t\t\tand finalizado = \"n\"';\r\n\t\t\t//echo $Consulta;\r\n\t\t\t$Resultado = $this->db->query($Consulta_update);\r\n\t\t\t\r\n\t\t\treturn 'ok';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8f9478c6140de8a59adb86392043ec6e", "score": "0.5883798", "text": "static public function mdlIngresarVenta($tabla, $datos){\n\n $dbh = Conexion::conectar();\n\n try { \n $dbh->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION );\n $dbh -> beginTransaction();\n \n /*$cliente = $datos[\"Ven_Cli_Id\"];\n $vendedor = $datos[\"Ven_Vnrs_Id\"];\n $factura = $datos[\"Ven_Factura\"];\n $total = $datos[\"Ven_Total\"];\n\n $stmt = \"INSERT INTO $tabla(Ven_Cli_Id, Ven_Vnrs_Id, Ven_Factura, Ven_Total) VALUES ('$cliente', '$vendedor', '$factura', '$total')\";\n \n $dbh -> exec ( $stmt );*/\n\n $stmt = $dbh->prepare(\"INSERT INTO $tabla(Ven_Cli_Id, Ven_Vnrs_Id, Ven_Factura, Ven_Total) VALUES (:Ven_Cli_Id, :Ven_Vnrs_Id, :Ven_Factura, :Ven_Total)\");\n\n $stmt->bindParam(\":Ven_Cli_Id\", $datos[\"Ven_Cli_Id\"], PDO::PARAM_INT);\n $stmt->bindParam(\":Ven_Vnrs_Id\", $datos[\"Ven_Vnrs_Id\"], PDO::PARAM_INT);\n $stmt->bindParam(\":Ven_Factura\", $datos[\"Ven_Factura\"], PDO::PARAM_INT);\n $stmt->bindParam(\":Ven_Total\", $datos[\"Ven_Total\"], PDO::PARAM_STR);\n $stmt->execute();\n\n $lastinsertid = $dbh->lastInsertId();\n\n $listaProductos = json_decode($datos[\"listaProductos\"], true);\n\n foreach ($listaProductos as $key => $value) {\n $prodId = $value[\"VenD_Prod_Id\"];\n $cantidad = $value[\"VenD_Cantidad\"];\n $total = $value[\"VenD_Total\"];\n $stmt = \"INSERT INTO ventas_detalle(VenD_Ven_Id, VenD_Prod_Id, VenD_Cantidad, VenD_Total) VALUES ('$lastinsertid', '$prodId', '$cantidad', '$total')\";\n $dbh -> exec ( $stmt );\n }\n \n $listaPagos = json_decode($datos[\"metodos_pago\"], true);\n\n foreach ($listaPagos as $key => $value) {\n $metodo = $value[\"MPD_MP_Id\"];\n $importe = $value[\"MPD_Importe\"];\n $stmt = \"INSERT INTO medios_de_pago_detalle(MPD_Ven_Id, MPD_MP_Id, MPD_Importe) VALUES ('$lastinsertid', '$metodo', '$importe')\";\n $dbh -> exec ( $stmt );\n }\n\n $dbh -> commit ();\n\n return \"ok\";\n } catch ( Exception $e ) {\n $dbh -> rollBack ();\n return \"error\";\n } \n \n // finally {\n // $dbh->close();\n // $dbh = null;\n // }\n\n $dbh->close();\n $dbh = null;\n\n }", "title": "" }, { "docid": "e880126d550dd73d63294888acc1c82d", "score": "0.5882503", "text": "public function calculoDias($idTramite){\n\t\t//error_log(\"ENTRA A CALCULO DE DIAS\");\n\t\t$totalDias=0;\n\t\t$tipoViaje=\"\";\n\t\t$FechaSalida=0;\n\t\t$FechaLlegada=0;\n\n\t\t//checamos si el tipo de viaje es Redondo para poder sumarle un dia a su calculo de fechas.\n\t\t$query=\"SELECT sv_viaje FROM solicitud_viaje WHERE sv_tramite = $idTramite\";\n\t\t$rst = parent::consultar($query);\n\t\twhile ($fila = mysql_fetch_assoc($rst)) {\n\t\t\t$tipoViaje=$fila['sv_viaje'];\n\t\t}\n\t\t\n\t\tif($tipoViaje == \"Multidestinos\"){\n\t\t\t$query=\"SELECT svi_fecha_salida AS fechaLlegada,MAX(svi_fecha_salida) AS fechaSalida\n\t\t\tFROM sv_itinerario INNER JOIN solicitud_viaje ON (sv_itinerario.svi_solicitud=solicitud_viaje.sv_id) \n\t\t\tINNER JOIN tramites ON (tramites.t_id=solicitud_viaje.sv_tramite) \n\t\t\tINNER JOIN etapas ON etapas.et_etapa_id = tramites.t_etapa_actual AND tramites.t_flujo = etapas.et_flujo_id\n\t\t\tLEFT JOIN cat_cecos ON (sv_ceco_paga = cc_id)\n\t\t\tWHERE t_id={$idTramite} \n\t\t\tORDER BY svi_fecha_salida ASC\n\t\t\tLIMIT 0, 1\";\n\t\t}else{\n\t\t\t$query=\"SELECT sum(svi_dias_viaje) as svi_dias_viaje,svi_fecha_salida AS fechaSalida ,svi_fecha_llegada AS fechaLlegada\n\t\t\tFROM sv_itinerario INNER JOIN solicitud_viaje ON (sv_itinerario.svi_solicitud=solicitud_viaje.sv_id)\n\t\t\tINNER JOIN tramites ON (tramites.t_id=solicitud_viaje.sv_tramite)\n\t\t\tINNER JOIN etapas ON etapas.et_etapa_id = tramites.t_etapa_actual AND tramites.t_flujo = etapas.et_flujo_id\n\t\t\tLEFT JOIN cat_cecos ON (sv_ceco_paga = cc_id)\n\t\t\tWHERE t_id={$idTramite}\";\n\t\t}\t\t\t\t\n\t\t$rst = parent::consultar($query);\n\t\t\n\t\twhile ($fila = mysql_fetch_assoc($rst)) {\n\t\t\tif($tipoViaje == \"Sencillo\"){\n\t\t\t\t$totalDias=$fila['svi_dias_viaje'];\n\t\t\t}\t\t\t\n\t\t\t$FechaLlegada=$fila['fechaLlegada'];\n\t\t\t$FechaSalida=$fila['fechaSalida'];\n\t\t}\t\t\n\t\t\n\t\tif($tipoViaje == \"Multidestinos\"){\t\t\t\n\t\t\t$queryDias=\"SELECT DATEDIFF('{$FechaSalida}','{$FechaLlegada}') AS svi_dias_viaje;\";\n\t\t\t$rst = parent::consultar($queryDias);\n\t\t\twhile ($fila = mysql_fetch_assoc($rst)) {\n\t\t\t\t$totalDias=$fila['svi_dias_viaje'];\n\t\t\t\t$totalDias = $totalDias + 1;\n\t\t\t}\n\t\t}else if($tipoViaje == \"Redondo\"){\n\t\t\t$queryDias=\"SELECT DATEDIFF('{$FechaLlegada}','{$FechaSalida}') AS svi_dias_viaje;\";\n\t\t\t//error_log($queryDias);\n\t\t\t$rst = parent::consultar($queryDias);\n\t\t\twhile ($fila = mysql_fetch_assoc($rst)) {\n\t\t\t\t$totalDias=$fila['svi_dias_viaje'];\t\t\t\t\n\t\t\t\t$totalDias = $totalDias + 1;\n\t\t\t}\t\n\t\t}\t\t\n\t\t //error_log(\"Dias de Viaje redondo\".$totalDias);\n\t\t return $totalDias;\n\t}", "title": "" }, { "docid": "08c5d4a99a604cc753b80cbd195fbd5c", "score": "0.5881918", "text": "public static function ObtenerDiferencias($solicitud,$extra){\n $dif_quincenal_1=null;\n $porc_diferencia_1=null;\n $dif_quincenal_2=null;\n $porc_diferencia_2=null;\n $compensacion_salario=null;\n if(strcmp($solicitud->TIPO_SOLICITUD_SOLICITUD, 'CONTRATACIÓN')==0){\n //dd('Entra');\n $dif_quincenal_2 = (double)((($solicitud->SALARIO_PROPUESTO_SF)?$solicitud->SALARIO_PROPUESTO_SF:0) - (($solicitud->SALARIO_SOLICITUD)?$solicitud->SALARIO_SOLICITUD:0));\n $porc_diferencia_2 = (($solicitud->SALARIO_SOLICITUD!=0)?(round((($dif_quincenal_2/$solicitud->SALARIO_SOLICITUD)*100),1)).'%':'');\n\n }else if(strcmp($solicitud->TIPO_SOLICITUD_SOLICITUD, 'CONTRATACIÓN POR SUSTITUCIÓN')==0){\n $dif_quincenal_1 = (double)($extra->NUEVO_SALARIO - $solicitud->SALARIO_SOLICITUD);\n $porc_diferencia_1=round(($dif_quincenal_1/$solicitud->SALARIO_SOLICITUD)*100,1).'%';\n\n $dif_quincenal_2 = (double)((($solicitud->SALARIO_PROPUESTO_SF)?$solicitud->SALARIO_PROPUESTO_SF:0) - (($solicitud->SALARIO_SOLICITUD)?$solicitud->SALARIO_SOLICITUD:0));\n $porc_diferencia_2 = (($solicitud->SALARIO_SOLICITUD!=0)?(round((($dif_quincenal_2/$solicitud->SALARIO_SOLICITUD)*100),1)).'%':'');\n\n }else if(strcmp($solicitud->TIPO_SOLICITUD_SOLICITUD, 'PROMOCION')==0){\n //dd()\n $dif_quincenal_1 = (double)(($extra->NUEVO_SALARIO-$solicitud->SALARIO_SOLICITUD));\n $porc_diferencia_1=round(($dif_quincenal_1/$solicitud->SALARIO_SOLICITUD)*100,1).'%';\n\n $dif_quincenal_2 = (double)((($solicitud->SALARIO_PROPUESTO_SF)?$solicitud->SALARIO_PROPUESTO_SF:0) - (($solicitud->SALARIO_SOLICITUD)?$solicitud->SALARIO_SOLICITUD:0));\n //dd(round((($dif_quincenal_2 / $solicitud->SALARIO_SOLICITUD)*100),1));\n $porc_diferencia_2 = (($solicitud->SALARIO_SOLICITUD!=0)?(round((($dif_quincenal_2 / $solicitud->SALARIO_SOLICITUD)*100),1)).'%':'');\n //dd($porc_diferencia_2);\n }else{\n\n }\n\n if($dif_quincenal_1<0){\n $dif_quincenal_1 ='-$'.number_format(($dif_quincenal_1*(-1)),2);\n }else{\n $dif_quincenal_1 = '$'.number_format($dif_quincenal_1,2);\n }\n\n if($dif_quincenal_2<0){\n $dif_quincenal_2 ='-$'.number_format(($dif_quincenal_2*(-1)),2);\n }else{\n $dif_quincenal_2 = '$'.number_format($dif_quincenal_2,2);\n }\n\n if($solicitud->COMPENSACION_SOLICITUD){\n $compensacion_salario = number_format(($solicitud->COMPENSACION_SOLICITUD + $solicitud->SALARIO_PROPUESTO_SF),2);\n }\n \n $diferencias = array(\n 'dif_quincenal_1' => $dif_quincenal_1,\n 'porc_diferencia_1' => $porc_diferencia_1,\n 'dif_quincenal_2' => $dif_quincenal_2,\n 'porc_diferencia_2' => $porc_diferencia_2,\n 'compensacion_salario' => $compensacion_salario\n );\n //dd($diferencias);\n return (object)$diferencias;\n }", "title": "" }, { "docid": "3b8b189942724088fb2d6a6c4391636e", "score": "0.58785796", "text": "public function notificacion($cedula) {\n $consulsol = paraTodos::arrayConsulta(\"ID, TP_PREST, ESTATUS\", \"solict_prest\", \"CEDULA='$cedula' and ESTATUS<>'ELIMINADO'\");\n foreach ($consulsol as $row){\n\t\t\t/*De poseerlo se obtiene la ultima notificacion que tuvo el cliente con el prestamo selccionado*/\n\t\t\t\t$consulnotifnum = paraTodos::arrayConsultanum(\"*\", \"notificacion\", \"notif_cedula='$cedula' and notif_tipprest=$row[TP_PREST] order by notif_codigo desc limit 1\");\n\t\t\tif ($consulnotifnum>0){\n\t\t\t\t$consulnotif = paraTodos::arrayConsulta(\"*\", \"notificacion\", \"notif_cedula='$cedula' and notif_tipprest=$row[TP_PREST] order by notif_codigo desc limit 1\");\n\t\t\t\tforeach ($consulnotif as $notif){\n\t\t\t\t\t$datoscredito = paraTodos::arrayConsulta(\"*\", \"tp_prest\", \"ID=$row[TP_PREST]\");\n\t\t\t\t\tforeach($datoscredito as $rowdatosc){\n\t\t\t\t\t\t$credito = $rowdatosc[NAME];\n\t\t\t\t\t}\n\t\t\t\t\t$estatusant= $notif[notif_estatusprest];\n\t\t\t\t\t$colaant= $notif[notif_cola];\n\t\t\t\t\t$estatus = $row[ESTATUS];\n\t\t\t\t\tif ($estatusant != $estatus){\n\t\t\t\t\t\tif ($estatus=='APROBADO'){\n\t\t\t\t\t\t\t$descripcion = \"Su solicitud para el prestamo $credito ha sido aprobada.\";\n\t\t\t\t\t\t\t$icono = \"glyphicon glyphicon-ok text-red\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($estatus=='RECHAZADO'){\n\t\t\t\t\t\t\t$descripcion = \"Su solicitud para el prestamo $credito ha sido rechazada.\";\n\t\t\t\t\t\t\t$icono = \"glyphicon glyphicon-remove text-red\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/*Se guarda la notificacion con la fecha actual y la bandera de leido en 0 para false y 1 para true*/\n\t\t\t\t\t\tparaTodos::arrayInserte(\"notif_cedula, notif_descripcion, notif_tipprest, notif_estatusprest, notif_cola, notif_icono, notif_fecha, notif_leido\", \"notificacion\", \"'$cedula', '$descripcion', $row[TP_PREST], '$estatus', 0, '$icono', current_date, 0\");\n\t\t\t\t\t}\n\t\t\t\t\t/*Se verifican cuantas personas tienen solicitudes mas antiguas a la del cliente consultado*/\n\t\t\t\t\t$consulpersonas = paraTodos::arrayConsultanum(\"*\", \"solict_prest\", \"TP_PREST=$row[TP_PREST] and ID<$row[ID] and ESTATUS<>'APROBADO' and ESTATUS<>'ELIMINADO'\");\n\t\t\t\t\t/*Se consultan los datos del tipo de prestamo*/\n\t\t\t\t\tif ($consulpersonas<$colaant){\n\t\t\t\t\t\t/*Si la cantidad de personas es mayor a 0 entonces se muestra la posicion de la persona else se estima el prestamo se encuentra en revision*/\n\t\t\t\t\t\tif ($consulpersonas>0 and $estatus!='APROBADO'){\n\t\t\t\t\t\t\t$descripcion = \"Su puesto en la cola para el prestamo $credito es el Nº $consulpersonas.\";\n\t\t\t\t\t\t\t$icono = \"fa fa-users text-red\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($consulpersonas==0 and $estatus!='APROBADO'){\n\t\t\t\t\t\t\t$descripcion = \"Su prestamo $credito se encuentra en revision.\";\n\t\t\t\t\t\t\t$icono = \"fa fa-tag text-red\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/*Se guarda la notificacion con la fecha actual y la bandera de leido en 0 para false y 1 para true*/\n\t\t\t\t\t\tparaTodos::arrayInserte(\"notif_cedula, notif_descripcion, notif_tipprest, notif_estatusprest, notif_cola, notif_icono, notif_fecha, notif_leido\", \"notificacion\", \"'$cedula', '$descripcion', $row[TP_PREST], '$estatus', $consulpersonas, '$icono', current_date, 0\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t/*Se no tiene notificaciones para este tipo de prestamo se ingreso por primera vez con los datos actuales del prestamo*/\n\t\t\t\t$estatus = $row[ESTATUS];\n\t\t\t\t/*Se verifican cuantas personas tienen solicitudes mas antiguas a la del cliente consultado*/\n\t\t\t\t$consulpersonas = paraTodos::arrayConsultanum(\"*\", \"solict_prest\", \"TP_PREST=$row[TP_PREST] and ID<$row[ID] and ESTATUS<>'APROBADO' and ESTATUS<>'ELIMINADO'\");\n\t\t\t\t$consulpersonas = $consulpersonas+1;\n\t\t\t\t/*Se consultan los datos del tipo de prestamo*/\n\t\t\t\t$datoscredito = paraTodos::arrayConsulta(\"*\", \"tp_prest\", \"ID=$row[TP_PREST]\");\n\t\t\t\tforeach($datoscredito as $rowdatosc){\n\t\t\t\t\t$credito = $rowdatosc[NAME];\n\t\t\t\t}\n\t\t\t\t/*Si la cantidad de personas es mayor a 0 entonces se muestra la posicion de la persona else se estima el prestamo se encuentra en revision*/\n\t\t\t\tif ($consulpersonas>0){\n\t\t\t\t\t$descripcion = \"Su puesto en la cola para el prestamo $credito es el Nº $consulpersonas.\";\n\t\t\t\t\t$icono = \"fa fa-users text-red\";\n\t\t\t\t} else {\n\t\t\t\t\t$descripcion = \"Su prestamo para $credito se encuentra en revision.\";\n\t\t\t\t\t$icono = \"fa fa-tag text-red\";\n\t\t\t\t}\n\t\t\t\t/*Se guarda la notificacion con la fecha actual y la bandera de leido en 0 para false y 1 para true*/\n\t\t\t\tparaTodos::arrayInserte(\"notif_cedula, notif_descripcion, notif_tipprest, notif_estatusprest, notif_cola, notif_icono, notif_fecha, notif_leido\", \"notificacion\", \"'$cedula', '$descripcion', $row[TP_PREST], '$estatus', $consulpersonas, '$icono', current_date, 0\");\n\t\t\t}\n\n }\n }", "title": "" }, { "docid": "c93f78a26b3f698d3f531454ea2f6d63", "score": "0.5877597", "text": "function cuadroCompleto($db, $comisionPrensa) {\n\tif (isset($_SESSION['IdAdmin'])) {\n\t\t//echo '<tr><td colspan=\"15\"><table cellpadding=\"1\" cellspacing=\"1\" bordercolor=\"#666666\" style=\"border-collapse:collapse;\">';\t\t\n\t\techo '<tbody>';\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t$fecha1 = $_POST['Fecha1'];\n\t\t$fecha2 = $_POST['Fecha2'];\n\t\t\n\t\t//GUARDAMOS LOS USUARIOS EN UN ARREGLO\n\t\t$SQL = \"SELECT Usuario FROM administrador\";\n\t\t$db->setQuery($SQL);\n\t\t$result = $db->loadObjectList();\n\t\tforeach($result as $result1) \n\t\t\t$administradores[] = trim($result1->Usuario);\n\t\t\t\t\t\t\t\t\t\n\t\t$SQL = \"SELECT productos.IdOferta, opcionesoferta.Id, SUM(lineasorden.Cantidad) as Unidades, productos.Nombre_Producto \";\n\t\t$SQL .= \"FROM ordenes \";\n\t\t$SQL .= \"INNER JOIN lineasorden ON ordenes.IdOrden = lineasorden.IdOrden \";\n\t\t$SQL .= \"INNER JOIN opcionesoferta ON lineasorden.Talla = opcionesoferta.Id \";\n\t\t$SQL .= \"INNER JOIN productos ON lineasorden.IdProducto = productos.IdOferta \";\n\t\t$SQL .= \"WHERE TRIM(ordenes.EstadoPago) = '\".trim('ok').\"' AND TRIM(lineasorden.EstadoPedido) <> '\".trim('Anulado').\"' AND ordenes.FechaOrden >= '$fecha1' AND ordenes.FechaOrden <= '$fecha2' \";\n\t\t$SQL .= \"GROUP BY opcionesoferta.Id ORDER BY productos.IdOferta ASC\";\n\t\t$db->setQuery($SQL);\n\t\t$result = $db->loadObjectList();\n\t\tforeach($result as $result1) {\n\t\t\t$arreglo[] = array('IdOferta'=>$result1->IdOferta, 'Tipo'=>$result1->Id);\n\t\t}\n\t\t$totalOfertas = count($arreglo);\n\t\t//print_r($arreglo);\n\t\t\t\t\t\t\t\t\t\n\t\tfor($i = 0; $i <= $totalOfertas - 1; $i++ ) {\t\t\t\t\t\t\t\t\n\t\t$SQL = \"SELECT productos.IdOferta, productos.Nombre_Producto, opcionesoferta.Id, opcionesoferta.OptActiva, opcionesoferta.Opcion, opcionesoferta.Precio, opcionesoferta.PrecioSesion, opcionesoferta.Iva, \";\n\t\t$SQL .= \"SUM(lineasorden.Cantidad) AS Unidades, SUM(lineasorden.Subtotal) as SubTotal, SUM(lineasorden.GastosEnvio) AS GastosEnvio, ordenes.Tramitado \";\n\t\t$SQL .= \"FROM ordenes \";\n\t\t$SQL .= \"INNER JOIN lineasorden ON ordenes.IdOrden = lineasorden.IdOrden \";\n\t\t$SQL .= \"INNER JOIN opcionesoferta ON lineasorden.Talla = opcionesoferta.Id \";\n\t\t$SQL .= \"INNER JOIN productos ON lineasorden.IdProducto = productos.IdOferta \";\n\t\t$SQL .= \"WHERE TRIM(ordenes.EstadoPago) = '\".trim('ok').\"' AND TRIM(lineasorden.EstadoPedido) <> '\".trim('Anulado').\"' \";\n\t\t$SQL .= \"AND ordenes.FechaOrden >= '$fecha1' AND ordenes.FechaOrden <= '$fecha2' AND productos.IdOferta = \".$arreglo[$i]['IdOferta'].\" AND opcionesoferta.Id = \".$arreglo[$i]['Tipo'].\" \";\n\t\t$SQL .= \"GROUP BY opcionesoferta.Id, ordenes.Tramitado ORDER BY productos.IdOferta ASC\";\n\t\t$db->setQuery($SQL);\n\t\t$row = $db->execute();\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t$ordenWeb = 0;\n\t\t$ordenCall = 0;\n\t\t$ordenOfi = 0;\n\t\tif (mysqli_num_rows($row) > 0) {\n\t\t\t$result = $db->loadObjectList();\n\t\t\tforeach($result as $result1) {\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$ordenTramitada = $result1->Tramitado;\n\t\t\t\t$totalSubtotal = $totalSubtotal;\n\t\t\t\t\n\t\t\t\tif(in_array($ordenTramitada, $administradores)) {\n\t\t\t\t\tif($ordenTramitada == trim('usuario-web'))\n\t\t\t\t\t\t$ordenWeb = $ordenWeb + $result1->Unidades;\t\n\t\t\t\t\telse if($ordenTramitada == 'call-center')\n\t\t\t\t\t\t$ordenCall = $ordenCall + $result1->Unidades;\n\t\t\t\t\telse\n\t\t\t\t\t\t$ordenOfi = $ordenOfi + $result1->Unidades;\n\t\t\t\t} else {\n\t\t\t\t\t$errores = $errores + 1;\n\t\t\t\t}\n\t\t\t\t$subtotal = $subtotal + ($result1->SubTotal/$result1->Iva);\n\t\t\t\t$comision = $comision + (($result1->SubTotal/$result1->Iva)* ($comisionPrensa));\n\t\t\t}\n\t\t\t$totalOrdersCall = $totalOrdersCall + $ordenCall;\n\t\t\t$totalOrdersWeb = $totalOrdersWeb + $ordenWeb;\t\n\t\t\t$totalOrdersOfi = $totalOrdersOfi + $ordenOfi;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t$facturacion = (($ordenOfi + $ordenCall + $ordenWeb)*$result1->Precio)/$result1->Iva;\t\t\t\n\t\t\t$precioSesionTotal = ($result1->PrecioSesion/$result1->Iva) * ($ordenCall + $ordenWeb + $ordenOfi);\t\t\t\n\t\t\t$margenBrutoUnitario = ($result1->Precio/$result1->Iva) - ($result1->PrecioSesion/$result1->Iva);\t\t\t\n\t\t\t$aportacionBruta = (($result1->Precio/$result1->Iva) - ($result1->PrecioSesion/$result1->Iva)) * ($ordenCall + $ordenWeb + $ordenOfi);\t\t\t\n\t\t\t$comisionUnidad = ($result1->Precio/$result1->Iva) * ($comisionPrensa);\t\t\t\n\t\t\t$comisionTotal = (($result1->Precio/$result1->Iva)*($comisionPrensa)) * ($ordenCall + $ordenWeb + $ordenOfi);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\techo '\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t<tr height=\"20px\">\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t<td width=\"50px\"><label>'.$result1->IdOferta.'</label></td>\n\t\t\t\t\t<td width=\"300px\"><label>'.utf8_encode($result1->Nombre_Producto).'</label></td>\n\t\t\t\t\t<td width=\"150px\"><label>';\n\t\t\t\t\t\tif($result1->OptActiva == 1)\n\t\t\t\t\t\t echo utf8_encode($result1->Opcion);\t\t\t\t\t\t\n\t\t\t\t\techo '\n\t\t\t\t\t</label></td>\n\t\t\t\t\t<td width=\"100px\"><label>'.$ordenOfi.'</label></td>\n\t\t\t\t\t<td width=\"100px\"><label>'.$ordenCall.'</label></td>\n\t\t\t\t\t<td width=\"100px\"><label>'.$ordenWeb.'</label></td>\n\t\t\t\t\t<td width=\"100px\"><label>'.($ordenCall + $ordenWeb + $ordenOfi).'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format(($result1->Precio/$result1->Iva),2,',','.').'</label></td>\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t<td width=\"100px\" bgcolor=\"#71BA00\"><label>'.number_format($facturacion,2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format(($result1->PrecioSesion/$result1->Iva),2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format($precioSesionTotal,2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format($margenBrutoUnitario,2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format($aportacionBruta,2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format($comisionUnidad,2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"75px\" bgcolor=\"#73DF72\"><label>'.number_format($comisionTotal,2,',','.').'</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t<td bgcolor=\"#71BA00\"><label>'.number_format(($aportacionBruta - $comisionTotal),2,',','.').'</label></td>\n\t\t\t\t</tr>\n\t\t\t';\n\t\t\t//TOTALES\n\t\t\t$aportBruta = $aportBruta + $aportacionBruta;\n\t\t\t$aportNeta = $aportNeta + ($aportacionBruta - $comisionTotal);\n\t\t} \n\t}\n\t\t\t\t\t\t\t\n\t$graph[] = array('fact_total'=>$subtotal, 'aport_bruta'=>$aportBruta, 'comision_patner'=>$comision, 'aport_neta'=>$aportNeta);\n\t\t\t\t\t\t\t\t\t\n\techo '\n\t\t</tbody>\n\t\t<tfoot style=\"color: white; font-size: 14px; font-variant:small-caps; background: #1F88A7\">\n \t \t<tr height=\"30px\" style=\"color: white; font-size: 14px; font-variant:small-caps;\">\n \t<td colspan=\"3\" align=\"center\" bgcolor=\"#1F88A7\"><span>TOTALES</span></td>\n\t\t\t\t<td bgcolor=\"#1F88A7\"><span>'.$totalOrdersOfi.'</span></td>\n <td bgcolor=\"#1F88A7\"><span>'.$totalOrdersCall.'</span></td>\n <td bgcolor=\"#1F88A7\"><span>'.$totalOrdersWeb.'</span></td>\n <td bgcolor=\"#1F88A7\"><span>'.($totalOrdersWeb + $totalOrdersCall + $totalOrdersOfi).'</span></td>\n\t\t\t\t<td bgcolor=\"#1F88A7\"></td>\n <td bgcolor=\"#1F88A7\"><span>'.number_format($subtotal,2,',','.').'</span></td>\n\t\t\t\t<td bgcolor=\"#1F88A7\"></td><td bgcolor=\"#1F88A7\"></td>\n\t\t\t\t<td bgcolor=\"#1F88A7\"></td>\n\t\t\t\t<td bgcolor=\"#1F88A7\">'.number_format($aportBruta,2,',','.').'</td>\n\t\t\t\t<td bgcolor=\"#1F88A7\"></td>\n <td bgcolor=\"#1F88A7\"><span>'.number_format($comision,2,',','.').'</span></td>\n\t\t\t\t<td bgcolor=\"#1F88A7\"><span>'.number_format($aportNeta,2,',','.').'</span></td>\t \n </tr>\t\t\t\t\t\t\t\t\t\t\n\t </tfoot>';\n\t\techo '</table></td></tr>';\n\t} \n\treturn $graph;\n}", "title": "" }, { "docid": "4e2e14458dced670e7552a8f41bab204", "score": "0.5877135", "text": "public function verificaDados(){\r\n\t\t\t\t\r\n\t\t\t$campeonato = new modelClassCampeonato();\n\t\t\t\n\t\t\t$campeonato->setNomeCarregamento($_POST['nomeCarregamento']);\n\t\t\t$campeonato->setUsuario($_SESSION['idDono']); \r\n\t\t\t\t\r\n\t\t\t$verificaCampeonato = $campeonato->consultaNomeCarregamento($campeonato);\r\n\n\t\t\t\r\n\t\t\tif(empty($verificaCampeonato)){\r\n\t\t\t\t\t\r\n\t\t\t\t$this->cadastroCampeonato();\r\n\t\t\t\t$this->cadastroTime();\r\n\t\t\t\t$this->cadastroRodada();\r\n\t\t\t\t$this->cadastroJogo();\r\n\t\t\t\t$this->direcionaTela();\n\t\t\t\t\r\n\t\t\t}else{\n\t\t\t\theader(\"Location: ../_view/viewNomeCarregamento.php\");\n\t\t\t\t$_SESSION['cadastroNomeCarregamento'] = \"Login Sendo Utilizado !\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\r\n\r\n\t\t}", "title": "" }, { "docid": "236b17a0143d8e4189900cf4525b3e4b", "score": "0.5875948", "text": "public static function VerificaTiendaPlanCompra($temporada, $depto, $login)\r\n {\r\n // Listo las marcas del Depto\r\n $sql_marcas_depto = \"SELECT DISTINCT(COD_MARCA) \r\n FROM PLC_DEPTO_MARCA\r\n WHERE COD_DEPT = '\" . $depto . \"'\";\r\n $data_marcas_depto = \\database::getInstancia()->getFilas($sql_marcas_depto);\r\n\r\n foreach ($data_marcas_depto as $va1) {\r\n\r\n $COD_MARCA = $va1[\"COD_MARCA\"];\r\n\r\n // Bsuca si la Marca que llega de la query anterior tiene asignada internet\r\n $sql_verifica_internet = \"SELECT 1\r\n FROM PLC_SEGMENTOS_TDA\r\n WHERE cod_temporada = $temporada\r\n AND dep_depto = '\" . $depto . \"'\r\n AND COD_MARCA = $COD_MARCA \r\n AND COD_TDA = 10039\";\r\n $data_verifica_internet = (int) \\database::getInstancia()->getFilas($sql_verifica_internet);\r\n\r\n // Si no existe internet para esa marca, la inserto\r\n if ($data_verifica_internet != 1){\r\n\r\n $sql_inserta_marca = \"INSERT INTO PLC_SEGMENTOS_TDA(COD_TEMPORADA,DEP_DEPTO,NIV_JER1,COD_JER1,COD_SEG,COD_TDA,COD_MARCA)\r\n VALUES($temporada,'\".$depto.\"',0,0,4,10039,$COD_MARCA)\";\r\n $data_inserta_marca = \\database::getInstancia()->getConsulta($sql_inserta_marca);\r\n\r\n\r\n // Almacenar TXT (Agregado antes del $data para hacer traza en el caso de haber error, considerar que si la ruta del archivo no existe el código no va pasar al $data)\r\n if (!file_exists('../archivos/log_querys/' . $login)) {\r\n mkdir('../archivos/log_querys/' . $login, 0775, true);\r\n }\r\n $stamp = date(\"Y-m-d_H-i-s\");\r\n $rand = rand(1, 999);\r\n $content = $sql_inserta_marca;\r\n $fp = fopen(\"../archivos/log_querys/\" . $login . \"/INSERT-INTERNET--\" . $login . \"-\" . $stamp . \" R\" . $rand . \".txt\", \"wb\");\r\n fwrite($fp, $content);\r\n fclose($fp);\r\n\r\n if($data_inserta_marca){$mensaje = \"OK\";}else{$mensaje = \"ERROR\";}\r\n // Acción: Crear / Eliminar / Actualizar\r\n LogTransaccionClass::GuardaLogTransaccion($login, $temporada, $depto, 'Mantenedor Tienda', 'Crear', $sql_inserta_marca, $mensaje );\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n $sql = \"SELECT * FROM PLC_SEGMENTOS_TDA\r\n WHERE COD_TEMPORADA = $temporada\r\n AND DEP_DEPTO = '\" . $depto . \"'\r\n AND COD_SEG <> 4\";\r\n $data = \\database::getInstancia()->getFilas($sql);\r\n return $data;\r\n\r\n }", "title": "" }, { "docid": "2f8c42395501e1226b3915906337e9a7", "score": "0.5875404", "text": "public function consultOtDetalle(){\n $obj = new OrdenTrabajoModel();\n $sql =\"SELECT * FROM `ordentrabajo` o WHERE o.est_codigo = 1 ORDER BY o.otr_identificador ASC\";\n // $sql = \"SELECT * FROM producto p WHERE p.est_codigo = 1 ORDER BY p.prod_descripcion ASC\";\n $ordenTrabajo = $obj->consult($sql);\n\n // Consultar procesos\n $sql = \"SELECT p.pro_codigo, upper(p.pro_nombre) AS pro_nombre\n FROM\n proceso p\n WHERE\n p.est_codigo = 1\n ORDER BY p.pro_nombre ASC\";\n\n $dotrproceso = $obj->consult($sql);\n\n\n include_once '../view/ordentrabajo/OtDetalle/consultar.php';\n }", "title": "" }, { "docid": "1de40285d3cb18e89bec4c7d5365a60b", "score": "0.5874489", "text": "public function hasil($idPaket)\n {\n $id = $idPaket;\n\n /**\n * check token\n * \n */\n if(!isset($_SESSION['elenka_token_soal'])) \n header('location:'.BASEURL);\n\n $result = $this->model('ButirSoalModel')->show($id);\n // var_dump($result[0]);die();\n\n $totalSoal = 0;\n $benar = 0;\n foreach ($result as $d) { $totalSoal++;\n if($d['jawaban'] == $d['kunciJawaban'])\n {\n $benar++;\n }\n // $idMapel = $d['idMatapelajaran'];\n // $idSoal = $d['id'];\n }\n $nilai = $benar/$totalSoal*100;\n // var_dump($nilai);\n\n $dataNilai = [\n 'idPaketSoal'=>$id,\n 'idSiswa' =>$_SESSION['elenka_usersession'],\n 'nilai' =>$nilai\n ];\n \n \n /**\n * \n * store data into\n * tampil nilai\n */\n $res = $this->model('PaketSoalModel')->show('soalsiswa',$id);\n switch ($res['id']) {\n case '1':\n $keyNilai = 'ppkn';\n break;\n case '2':\n $keyNilai = 'bindo';\n break;\n case '3':\n $keyNilai = 'matematika';\n break;\n case '4':\n $keyNilai = 'sbdp';\n break;\n case '5':\n $keyNilai = 'pjok';\n break;\n case '6':\n $keyNilai = 'ipa';\n break;\n case '7':\n $keyNilai = 'ips';\n break;\n }\n $data = [\n 'idSiswa' => $_SESSION['elenka_usersession'],\n 'idKelas' => $_SESSION['elenka_userkelas'],\n 'idBagian' => $_SESSION['elenka_userbagian'],\n $keyNilai => $nilai\n ];\n \n $checkTampilNilai = $this->model('TampilNilaiModel')->show($data['idSiswa']);\n\n if($checkTampilNilai===NULL){\n $res = $this->model('TampilNilaiModel')->store($data);\n }else{\n $res = $this->model('TampilNilaiModel')->update($checkTampilNilai['id'],$data);\n }\n\n if($res===TRUE){\n\n $res = $this->model('NilaiModel')->store($dataNilai);\n if($res===TRUE)\n {\n header('location:'.BASEURL.'soal/view_hasil/'.$id);\n }\n }\n \n }", "title": "" }, { "docid": "ec144f3ef5ab9cd51c9f51c741c9f058", "score": "0.58730906", "text": "function infoEmpleado($curp,$noControl) {\t\t######### Metodo para obtener los datos del empleado\n\t$iConn = odbc_connect(\"pensiones\",\"\",\"\",\"\");\t#Realizo Conexion\n\t\n\t$iClave = 0;\n $sNombre = \"\";\n \t$sPuesto = \"\";\n\t$sTipoTrabajador = \"\";\n\t$sTelefono = \"\";\n\t$sDomicilio = \"\";\n\t$sFechaIng = \"\";\n\t$sDependencia = \"\";\n\t\n\t###### Funcion para obtener el numero de registros que devuelve un Select, ya que no funciona la funcion de odbc\n\tfunction numRows ($result,$odbcId,$sCriterio)\n\t{\n\t\t$numRecords = odbc_num_rows ($result);\n\t\tif ($numRecords < 0)\n\t\t{\n\t\t\t$sQry = \"SELECT count(*) as results FROM \".$sCriterio;\n\t\t\t$count = odbc_exec ($odbcId, $sQry);\n\t\t\t$numRecords = odbc_result ($count, \"results\");\n\t\t}\n\t\t\n\t\treturn $numRecords;\n\t} \n\t####### Fin Funcion\n\t\n\t$sQryInf = \"SELECT e.ficha_df, e.nom_df, e.curp, e.telefono, e.domi_df, e.numint_df, e.ingreso_em, e.cve_ea, e.cve_tt, e.cve_de, e.cve_pto FROM \";\n\t$sCriterio = \"empleados as e\n\t\t\t\t WHERE e.ficha_df=\".$noControl.\" AND ltrim(upper(e.curp))='\".trim(strtoupper($curp)).\"'\";\n\t$sQryInf.= $sCriterio;\n\t\n\tif ($iConn) {\n\t\t$iRs = odbc_exec($iConn, $sQryInf);\n\t\t\n\t\t$iNumRegs = numRows($iRs, $iConn, $sCriterio);\n\t\t\n\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\t$rows = odbc_fetch_object($iRs);\n\t\t\t\n\t\t\t$sTipoTrabajador = \"\";\n\t\t\t$sDependencia = \"\";\n\t\t\t$sPuesto = \"\";\n\t\t\t\n\t\t\t$iClave = $rows->cve_ea;\n\t\t\t$iCveTT = $rows->cve_tt;\t#Clave del tipo de trabajador\n\t\t\t$iCveDep = $rows->cve_de;\t#Clave de la dependencia\n\t\t\t$iCvePu = $rows->cve_pto;\t#Clave del puesto\n\t\t\t\n\t\t\t######### Obtengo el TIPO DE TRABAJADOR\n\t\t\t$sQryTipoT = \"SELECT nom_tt FROM \";\n\t\t\t$sCriterioT = \"tipotrab WHERE cve_tt=\".$iCveTT;\n\t\t\t$sQryTipoT.= $sCriterioT;\n\t\t\t$iRsTT = odbc_exec($iConn, $sQryTipoT);\n\t\t\n\t\t\t$iNumRegs = numRows($iRsTT, $iConn, $sCriterioT);\n\t\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\t\t$aTipoT = odbc_fetch_object($iRsTT);\n\t\t\t\t$sTipoTrabajador = $aTipoT->nom_tt;\t###\n\t\t\t}\n\t\t\t\n\t\t\t######### Obtengo el Nombre de la DEPENDENCIA\n\t\t\t$sQryTipoD = \"SELECT nom_de FROM \";\n\t\t\t$sCriterioD = \"depend WHERE cve_de=\".$iCveDep;\n\t\t\t$sQryTipoD.= $sCriterioD;\n\t\t\t$iRsD = odbc_exec($iConn, $sQryTipoD);\n\t\t\n\t\t\t$iNumRegs = numRows($iRsD, $iConn, $sCriterioD);\n\t\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\t\t$aTipoD = odbc_fetch_object($iRsD);\n\t\t\t\t$sDependencia = $aTipoD->nom_de;\t###\n\t\t\t}\n\t\t\t\n\t\t\t######### Obtengo el Nombre de la PUESTO\n\t\t\t$sQryTipoP = \"SELECT nom_pto FROM \";\n\t\t\t$sCriterioP = \"puestos WHERE cve_pto=\".$iCvePu;\n\t\t\t$sQryTipoP.= $sCriterioP;\n\t\t\t$iRsP = odbc_exec($iConn, $sQryTipoP);\n\t\t\n\t\t\t$iNumRegs = numRows($iRsP, $iConn, $sCriterioP);\n\t\t\tif ($iNumRegs > 0 ){\t#Valido que exista al menos un registro\n\t\t\t\t$aTipoP = odbc_fetch_object($iRsP);\n\t\t\t\t$sPuesto = $aTipoP->nom_pto;\t###\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t$sNombre = $rows->nom_df;\t\t\t\t\t\t\t\t\n\t\t\t$sTelefono = $rows->telefono;\n\t\t\t$sDomicilio = $rows->domi_df;\n\t\t\t\n\t\t\t$aFechaI = explode(\"-\",$rows->ingreso_em);\n\t\t\t$sFechaIng=$aFechaI[2].\"/\".$aFechaI[1].\"/\".$aFechaI[0];\t\t\t\n\t\t}\n\t}\n\todbc_close($iConn);\n\t\n\treturn array(\"clave\" => $iClave,\n\t\t\t\t \"nombre\" => $sNombre,\n\t\t\t\t \"puesto\" => $sPuesto,\n\t\t\t\t \"tipoTrabajador\" => $sTipoTrabajador,\n\t\t\t\t \"telefono\" => $sTelefono,\n\t\t\t\t \"domicilio\" => $sDomicilio,\n\t\t\t\t \"fechaIng\" => $sFechaIng,\n\t\t\t\t \"dependencia\" => $sDependencia\n\t\t\t);\n}", "title": "" }, { "docid": "b11d949be25817e1a4a6be97f360a064", "score": "0.58703774", "text": "function _reprogramacion($condicion_post) {\n// echo\"<pre>\";print_r($condicion_post);exit;\n $this->conectar();\n\n $query = $this->consulta(\"update proceso_cobro set letra='\" . $condicion_post['ncuota'] . \"',credito='\" . $condicion_post['ncredito'] . \"',num_cuotas='\" . $condicion_post['nmeses'] . \"',a_partir_de='\" . $condicion_post['nfecha'] . \"' WHERE idproceso_cobro='\" . $condicion_post['idprocesoC'] . \"' \");\n\n //----------------------------poner datos a la nueva tabla acuerdo_pago\n // -------------------- buscamos si el dni esta o no ------------ \n $query2 = $this->consulta(\" SELECT\n proceso_cobro.dni\n FROM\n proceso_cobro\n WHERE proceso_cobro.idproceso_cobro='\" . $condicion_post['idprocesoC'] . \"' \");\n $datos2 = array();\n while ($row = mysql_fetch_array($query2)) {\n $datos2[] = $row;\n }\n\n\n $querya_p1 = $this->consulta(\" SELECT\n COUNT(acuerdo_pago.dni) as midni\n FROM\n acuerdo_pago\n WHERE acuerdo_pago.dni='\" . $datos2[0]['dni'] . \"' \");\n $datosa_p1 = array();\n while ($row = mysql_fetch_array($querya_p1)) {\n $datosa_p1[] = $row;\n }\n\n //--------------------------suma el total de credito\n $queryc_a1 = $this->consulta(\" SELECT\n SUM(proceso_cobro.credito) as totcredito,\n SUM(proceso_cobro.abono) as totabono,\n COUNT(proceso_cobro.producto) as tpro\n FROM\n proceso_cobro\n WHERE proceso_cobro.dni='\" . $datos2[0]['dni'] . \"' \");\n $datosc_a1 = array();\n while ($row = mysql_fetch_array($queryc_a1)) {\n $datosc_a1[] = $row;\n }\n\n //-------------------\n if ($datosa_p1[0]['midni'] == 1) {\n\n $query = $this->consulta(\"UPDATE `acuerdo_pago` SET `tcredito`='\" . $datosc_a1[0]['totcredito'] . \"',`tabono`='\" . $datosc_a1[0]['totabono'] . \"',`tproductos`='\" . $datosc_a1[0]['tpro'] . \"'\n WHERE `dni`='\" . $datos2[0]['dni'] . \"'\");\n } else {\n $query = $this->consulta(\"INSERT INTO `acuerdo_pago` (`dni`,`tcredito`,`tabono`,`tproductos`) \n VALUES ('\" . $datos2[0]['dni'] . \"','\" . $datosc_a1[0]['totcredito'] . \"','\" . $datosc_a1[0]['totabono'] . \"','\" . $datosc_a1[0]['tpro'] . \"')\");\n }\n\n $this->disconnect();\n }", "title": "" }, { "docid": "2f823017f0d3a3b039cb61d36ddde28b", "score": "0.5869448", "text": "function LPedidosTodos(){\n\t\t\n\t\t$l = $_SESSION['user']->LETRA;\n\t\t$l2 = $_SESSION['user']->LETRA2;\n\t\t$l3 = $_SESSION['user']->LETRA3;\n\t\t$l4 = $_SESSION['user']->LETRA4;\n\t\t$l5 = $_SESSION['user']->LETRA5;\n\t\t$n = $_SESSION['user']->NUMERO_LETRAS;\n\n\t\tif ($n == 1){\n\t\t$this ->query = \" SELECT cotiza, max(nom_cli) as cliente,max (urgente) as urgente, max(fechasol) as fecha, sum (cant_orig) as piezas, sum(ordenado) as Ordenado, count (prod) as productos, MAX(current_timestamp) as HOY, MAX(datediff(day, fechasol, current_date )) as Dias, MAX(FACTURA) as factura, max (importe) as importe\n from preoc01 a\n where letra_v = '$l' \n group by cotiza\";\n echo $l.\" \".$n;\n }elseif($n == 2){\n\t\t$this ->query = \" SELECT cotiza, max(nom_cli) as cliente,max (urgente) as urgente, max(fechasol) as fecha, sum (cant_orig) as piezas, sum(ordenado) as Ordenado, count (prod) as productos, MAX(current_timestamp) as HOY, MAX(datediff(day, fechasol, current_date )) as Dias, MAX(FACTURA) as factura, max (importe) as importe\n from preoc01 a\n where letra_v = '$l' or letra_v = '$l2' \n group by cotiza\";\n echo $l;\n \n }elseif($n == 3){\n\t\t$this ->query = \" SELECT cotiza, max(nom_cli) as cliente,max (urgente) as urgente, max(fechasol) as fecha, sum (cant_orig) as piezas, sum(ordenado) as Ordenado, count (prod) as productos, MAX(current_timestamp) as HOY, MAX(datediff(day, fechasol, current_date )) as Dias, MAX(FACTURA) as factura, max (importe) as importe\n from preoc01 a\n where letra_v = '$l' or letra_v = '$l2' or letra_v = '$l3' \n group by cotiza\";\n echo $l;\n }elseif($n==5){\n $this ->query = \" SELECT cotiza, max(nom_cli) as cliente,max (urgente) as urgente, max(fechasol) as fecha, sum (cant_orig) as piezas, sum(ordenado) as Ordenado, count (prod) as productos, MAX(current_timestamp) as HOY, MAX(datediff(day, fechasol, current_date )) as Dias, MAX(FACTURA) as factura, max (importe) as importe\n from preoc01 a\n where letra_v = '$l' or letra_v = '$l2' or letra_v = '$l3' or letra_v = '$l4' or letra_v = '$l5' \n group by cotiza\"; \n }elseif($n==6){\n $this ->query = \" SELECT cotiza, max(nom_cli) as cliente,max (urgente) as urgente, max(fechasol) as fecha, sum (cant_orig) as piezas, sum(ordenado) as Ordenado, count (prod) as productos, MAX(current_timestamp) as HOY, MAX(datediff(day, fechasol, current_date )) as Dias, MAX(FACTURA) as factura, max (importe) as importe\n from preoc01 a\n where letra_v = '$l' or letra_v = '$l2' or letra_v = '$l3' or letra_v = '$l4' or letra_v = '$l5' or letra_v = '$l6' \n group by cotiza\"; \n }elseif($n==99){ $this ->query = \" SELECT cotiza, max(nom_cli) as cliente,max (urgente) as urgente, max(fechasol) as fecha, sum (cant_orig) as piezas, sum(ordenado) as Ordenado, count (prod) as productos, MAX(current_timestamp) as HOY, MAX(datediff(day, fechasol, current_date )) as Dias, MAX(FACTURA) as factura, max (importe) as importe\n from preoc01 a\n group by cotiza\"; \n }\n //status_ventas is null or (status_ventas ='') and '\n\t\t$result = $this->EjecutaQuerySimple();\n\t\tif($this->NumRows($result)>0){\n\t\t\twhile ( $tsArray = $this->FetchAs($result))\n\t\t\t\t$data[]=$tsArray;\n\t\t\n\t\t\t\treturn $data;\n\t\t}\t\n\treturn 0;\t\n\t}", "title": "" }, { "docid": "a0aebd9a2bf16707b677f9a462fd6225", "score": "0.5867962", "text": "public function consultaNextMonto(dto_cartera $dtoCartera, dto_usuario_servicio $dtoUsuarioServicio, dto_cliente_cartera $dtoClienteCartera, $sord, $item, $filtro_estado) {\r\n//\t\t\t\tTRIM(CONCAT_WS(' ',cli.nombre,cli.paterno,cli.materno)) as 'nombre',\r\n//\t\t\t\tCOALESCE(TRIM(cli.numero_documento),'') AS 'numero_documento',\r\n//\t\t\t\tCOALESCE(TRIM(cli.tipo_documento),'') AS 'tipo_documento',\r\n//\t\t\t\tIF( clicar.idusuario_servicio = 0, 'SIN GESTOR', ( SELECT CONCAT_WS(' ',usu.nombre,usu.paterno,usu.materno) FROM ca_usuario_servicio ususer INNER JOIN ca_usuario usu ON usu.idusuario=ususer.idusuario WHERE ususer.idusuario_servicio = clicar.idusuario_servicio ) ) AS 'gestor'\r\n//\t\t\t\tFROM ca_cliente cli INNER JOIN ca_cliente_cartera clicar\r\n//\t\t\t\tON clicar.codigo_cliente=cli.codigo WHERE cli.estado=1 AND cli.idservicio = ? AND clicar.idcartera=? AND clicar.estado=1 AND clicar.idusuario_servicio=? \r\n//\t\t\t\tAND clicar.idcliente_cartera=( \r\n//\t\t\t\t\tSELECT clic.idcliente_cartera\r\n//\t\t\t\t\tFROM ca_cuenta cu INNER JOIN ca_cliente_cartera clic ON clic.codigo_cliente = cu.codigo_cliente\r\n//\t\t\t\t\tWHERE cu.idcartera = ? AND clic.idcartera = ? AND clic.idusuario_servicio = ? AND clic.idcliente_cartera > ?\r\n//\t\t\t\t\tGROUP BY cu.codigo_cliente ORDER BY cu.total_deuda $sord LIMIT 1 \r\n//\t\t\t\t) \";\r\n\r\n $sql = \" SELECT clicar.idcliente_cartera,cli.idcliente,cli.idservicio, clicar.idcartera, cli.codigo, \r\n \t\tclicar.estado, clicar.retiro, clicar.motivo_retiro, \r\n\t\t\t\tTRIM(cli.nombre || ' ' || cli.paterno || ' ' || cli.materno)) as nombre,\r\n\t\t\t\tCOALESCE(TRIM(cli.numero_documento),'') AS numero_documento,\r\n\t\t\t\tCOALESCE(TRIM(cli.tipo_documento),'') AS tipo_documento,\r\n\t\t\t\tCASE \r\n\t\t\t\tWHEN clicar.idusuario_servicio = 0 THEN 'SIN GESTOR'\r\n\t\t\t\tELSE ( SELECT CONCAT_WS(' ',usu.nombre,usu.paterno,usu.materno) FROM ca_usuario_servicio ususer INNER JOIN ca_usuario usu ON usu.idusuario=ususer.idusuario WHERE ususer.idusuario_servicio = clicar.idusuario_servicio ) \r\n\t\t\t\tEND AS gestor\r\n\t\t\t\tFROM ca_cliente cli INNER JOIN ca_cliente_cartera clicar\r\n\t\t\t\tON clicar.codigo_cliente=cli.codigo WHERE cli.estado=1 AND cli.idservicio = ? AND clicar.idcartera=? AND clicar.idusuario_servicio=? $filtro_estado\r\n\t\t\t\tAND clicar.idcliente_cartera=( \r\n\t\t\t\t\r\n\t\t\t\t\tSELECT t2.idcliente_cartera \r\n\t\t\t\t\tFROM\r\n\t\t\t\t\t(\r\n\t\t\t\t\tSELECT @rownum:=@rownum+1 AS 'item', t1.idcliente_cartera\r\n\t\t\t\t\tFROM\r\n\t\t\t\t\t(\r\n\t\t\t\t\tSELECT DISTINCT clicar.idcliente_cartera \r\n\t\t\t\t\tFROM ca_cuenta cu INNER JOIN ca_cliente_cartera clicar ON clicar.codigo_cliente = cu.codigo_cliente\r\n\t\t\t\t\tWHERE cu.idcartera = ? AND clicar.idcartera = ? AND clicar.idusuario_servicio = ? $filtro_estado \r\n\t\t\t\t\tGROUP BY cu.codigo_cliente ORDER BY cu.total_deuda $sord \r\n\t\t\t\t\t) t1 , ( SELECT @rownum:=0 ) r\r\n\t\t\t\t\t) t2 WHERE t2.item = ? LIMIT 1\r\n\t\t\t\t\t\r\n\t\t\t\t) \";\r\n\r\n $servicio = $dtoUsuarioServicio->getIdServicio();\r\n $cartera = $dtoCartera->getId();\r\n $tramo = $dtoCartera->getTramo();\r\n $UsuarioServicio = $dtoUsuarioServicio->getId();\r\n $ClienteCartera = $dtoClienteCartera->getId();\r\n\r\n $factoryConnection = FactoryConnection::create('postgres_pdo');\r\n $connection = $factoryConnection->getConnection();\r\n\r\n ////$connection->beginTransaction();\r\n\r\n $pr = $connection->prepare($sql);\r\n $pr->bindParam(1, $servicio, PDO::PARAM_INT);\r\n $pr->bindParam(2, $cartera, PDO::PARAM_INT);\r\n $pr->bindParam(3, $UsuarioServicio, PDO::PARAM_INT);\r\n $pr->bindParam(4, $cartera, PDO::PARAM_INT);\r\n $pr->bindParam(5, $cartera, PDO::PARAM_INT);\r\n $pr->bindParam(6, $UsuarioServicio, PDO::PARAM_INT);\r\n //$pr->bindParam(7,$ClienteCartera,PDO::PARAM_INT);\r\n $pr->bindParam(7, $item, PDO::PARAM_INT);\r\n if ($pr->execute()) {\r\n ////$connection->commit();\r\n return $pr->fetchAll(PDO::FETCH_ASSOC);\r\n } else {\r\n ////$connection->rollBack();\r\n return array();\r\n }\r\n }", "title": "" }, { "docid": "d4a851e6df4a8e0351307ad09e17a3a7", "score": "0.5866193", "text": "function listarBoletosObservados(){\r\n $this->procedimiento='obingresos.ft_boletos_observados_sel';\r\n $this->transaccion='OBING_BOBS_SEL';\r\n $this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_boletos_observados','int4');\r\n $this->captura('estado_reg','varchar');\r\n $this->captura('pnr','varchar');\r\n $this->captura('nro_autorizacion','varchar');\r\n $this->captura('moneda','varchar');\r\n $this->captura('importe_total','numeric');\r\n $this->captura('fecha_emision','date');\r\n $this->captura('estado_p','varchar');\r\n $this->captura('forma_pago','varchar');\r\n $this->captura('medio_pago','varchar');\r\n $this->captura('instancia_pago','varchar');\r\n $this->captura('office_id_emisor','varchar');\r\n $this->captura('pnr_prov','varchar');\r\n $this->captura('nro_autorizacion_prov','varchar');\r\n $this->captura('office_id_emisor_prov','varchar');\r\n $this->captura('importe_prov','numeric');\r\n $this->captura('moneda_prov','varchar');\r\n $this->captura('estado_prov','varchar');\r\n $this->captura('fecha_autorizacion_prov','date');\r\n $this->captura('tipo_error','varchar');\r\n $this->captura('tipo_validacion','varchar');\r\n $this->captura('prov_informacion','varchar');\r\n //$this->captura('id_instancia_pago','int4');\r\n $this->captura('id_usuario_reg','int4');\r\n $this->captura('fecha_reg','timestamp');\r\n $this->captura('id_usuario_ai','int4');\r\n $this->captura('usuario_ai','varchar');\r\n $this->captura('id_usuario_mod','int4');\r\n $this->captura('fecha_mod','timestamp');\r\n $this->captura('usr_reg','varchar');\r\n $this->captura('usr_mod','varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "52f55e19153dbef12f6c2eef0331ee99", "score": "0.5865715", "text": "public function comenta(){\n //preparo la query -> un insert\n\t\t$sql=\"SELECT * from interactllibre where id_lector='{$this->getId_lector()}' and id_llibre='{$this->getId_llibre()}'\";\n\t\t\t$resultat=$this->db->query($sql);\n\t\t\tif(mysqli_num_rows($resultat) > 0){\n\t\t\t\t$sql = \"UPDATE interactllibre SET critica='{$this->getCritica()}' where id_lector='{$this->getId_lector()}' and id_llibre='{$this->getId_llibre()}'\";\n\t\t\t\t$save = $this->db->query($sql);\n\t\t\t}else{\n\t\t\t\t$sql = \"INSERT INTO interactllibre VALUES('{$this->getId_lector()}', '{$this->getId_llibre()}', NULL, 0, NULL, '{$this->getCritica()}', NULL)\";\n\t\t\t\t$save = $this->db->query($sql);\n\t\t\t}\n\t\t\t\n $result = false;\n if($save){\n $result = true;\n }\n return $result;\n }", "title": "" }, { "docid": "bee416ad26a1539832d43922e5e00cb1", "score": "0.5864903", "text": "public function getStatesBandeauClientCaTotalCommercial($commercial, $metiers, $dateDebutN, $dateFinN, $dateDebutN1, $dateFinN1, $dossier): array\n {\n $dateDebutN2 = date_create($dateDebutN1);\n $dateDebutN2 = date_modify($dateDebutN2, '-1 Year');\n $dateDebutN2 = $dateDebutN2->format('Y') . '-' . $dateDebutN2->format('m') . '-' . $dateDebutN2->format('d');\n $dateFinN2 = date_create($dateFinN1);\n $dateFinN2 = date_modify($dateFinN2, '-1 Year');\n $dateFinN2 = $dateFinN2->format('Y') . '-' . $dateFinN2->format('m') . '-' . $dateFinN2->format('d');\n\n $conn = $this->getEntityManager()->getConnection();\n $sql = \"SELECT SUM(MontantSignN2) As CATotalN2, SUM(MontantSignN1) As CATotalN1, SUM(MontantSignN) As CATotalN\n FROM(\tSELECT ART.FAM_0001 AS FamArticle,\n CASE\n WHEN ART.FAM_0002 IN ('EV', 'HP') AND CLI.STAT_0002 = 'EV' THEN 'EV'\n WHEN ART.FAM_0002 IN ('EV', 'HP') AND CLI.STAT_0002 = 'HP' AND CLI.STAT_0001 NOT IN ('ASSO', 'MARAICHE', 'AGRICULT') THEN 'HP'\n WHEN ART.FAM_0002 IN ('EV', 'HP') AND CLI.STAT_0002 = 'HP' AND CLI.STAT_0001 IN ('ASSO', 'MARAICHE', 'AGRICULT') THEN 'MA'\n WHEN ART.FAM_0002 IN ('ME', 'MO') THEN 'ME'\n WHEN ART.FAM_0002 IN ('RB', 'D', 'RG', 'RL', 'S', 'BL') THEN 'RB'\n ELSE 'WTF !'\n END AS SecteurMouvement,\n CASE\n WHEN MOUV.OP IN('C','CD') AND MOUV.FADT >= '$dateDebutN2' AND MOUV.FADT <= '$dateFinN2' THEN (MOUV.MONT)+(-1 * MOUV.REMPIEMT_0004)\n WHEN MOUV.OP IN('DD','D') AND MOUV.FADT >= '$dateDebutN2' AND MOUV.FADT <= '$dateFinN2' THEN (-1 * MOUV.MONT)+(MOUV.REMPIEMT_0004)\n\t\t\t\tELSE 0\n END AS MontantSignN2,\n CASE\n WHEN MOUV.OP IN('C','CD') AND MOUV.FADT >= '$dateDebutN1' AND MOUV.FADT <= '$dateFinN1' THEN (MOUV.MONT)+(-1 * MOUV.REMPIEMT_0004)\n WHEN MOUV.OP IN('DD','D') AND MOUV.FADT >= '$dateDebutN1' AND MOUV.FADT <= '$dateFinN1'THEN (-1 * MOUV.MONT)+(MOUV.REMPIEMT_0004)\n\t\t\t\tELSE 0\n END AS MontantSignN1,\n CASE\n WHEN MOUV.OP IN('C','CD') AND MOUV.FADT >= '$dateDebutN' AND MOUV.FADT <= '$dateFinN' THEN (MOUV.MONT)+(-1 * MOUV.REMPIEMT_0004)\n WHEN MOUV.OP IN('DD','D') AND MOUV.FADT >= '$dateDebutN' AND MOUV.FADT <= '$dateFinN' THEN (-1 * MOUV.MONT)+(MOUV.REMPIEMT_0004)\n\t\t\t\tELSE 0\n END AS MontantSignN\n FROM MOUV\n LEFT JOIN ART ON MOUV.REF = ART.REF AND MOUV.DOS = ART.DOS\n LEFT JOIN CLI ON MOUV.TIERS = CLI.TIERS AND MOUV.DOS = CLI.DOS\n WHERE MOUV.DOS = $dossier AND MOUV.TICOD = 'C' AND MOUV.PICOD = 4 AND ART.REF NOT IN($this->artBan) AND (CLI.REPR_0001 = $commercial OR CLI.REPR_0002 = $commercial )\n\n AND CLI.STAT_0002 IN('EV','HP','RB') AND ART.FAM_0002 IN( 'EV','HP','ME','MO','RB', 'D', 'RG', 'RL', 'S', 'BL' )\n AND ( (MOUV.FADT >= '$dateDebutN' AND MOUV.FADT <= '$dateFinN' ) OR (MOUV.FADT >= '$dateDebutN1' AND MOUV.FADT <= '$dateFinN1' ) OR (MOUV.FADT >= '$dateDebutN2' AND MOUV.FADT <= '$dateFinN2' ) ) )reponse\n WHERE SecteurMouvement IN( $metiers )\";\n $stmt = $conn->prepare($sql);\n $resultSet = $stmt->executeQuery();\n return $resultSet->fetchAllAssociative();\n }", "title": "" }, { "docid": "71d5f61f0a497a2d49d13ea6c953afda", "score": "0.58606076", "text": "function listar_comandas_pendientes($objeto) {\n\t// Si viene el id del la comanda Filtra por el id de la comanda\n\t\t$condicion .= (!empty($objeto['id'])) ? ' AND c.id = \\'' . $objeto['id'] . '\\'' : '';\n\t// Si viene el individual Filtra por la manera en que se cerro la comanda(1->todo junto, 2->individual, 3->mandar a caja)\n\t\t$condicion .= ($objeto['individual'] != '*' && $objeto['individual'] != '') ? \n\t\t\t' AND c.individual = \\'' . $objeto['individual'] . '\\'' : '';\n\t// Filtra por el status(default 2 -> comanda cerrada)\n\t\t$condicion .= (!empty($objeto['status'])) ? ' AND c.status = ' . $objeto['status'] : ' AND c.status = 2';\n\n\t// Agrupa la consulta por los parametros indicados si existe, si no la agrupa por id\n\t\t$condicion .= (!empty($objeto['agrupar'])) ? ' GROUP BY ' . $objeto['agrupar'] : ' GROUP BY c.id';\n\n\t// Ordena la consulta por los parametros indicados si existe, si no la ordena por id Descendente\n\t\t$orden .= (!empty($objeto['orden'])) ? ' ' . $objeto['orden'] : ' c.codigo DESC';\n\t\t\n\t\tsession_start();\n\t\t$sucursal = \"\tSELECT \n\t\t\t\t\t\t\tmp.idSuc AS id \n\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\tadministracion_usuarios au \n\t\t\t\t\t\tINNER JOIN \n\t\t\t\t\t\t\t\tmrp_sucursal mp \n\t\t\t\t\t\t\tON \n\t\t\t\t\t\t\t\tmp.idSuc = au.idSuc \n\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\tau.idempleado = \" . $_SESSION['accelog_idempleado'] . \" \n\t\t\t\t\t\tLIMIT 1\";\n\t\t$sucursal = $this -> queryArray($sucursal);\n\t\t$sucursal = $sucursal['rows'][0]['id'];\n\t\t\n\t\t$sql = \"SELECT \n\t\t\t\t\tCOUNT(c.id) AS comandas, c.id, c.idmesa, c.personas, c.total, \n\t\t\t\t\tc.id_venta AS venta, m.nombre AS nombre_mesa,\n\t\t\t\t\t(CASE m.tipo \n\t\t\t\t\t\tWHEN 0 THEN\n\t\t\t\t\t\t\t'Mesa'\n\t\t\t\t\t\tWHEN 1 THEN\n\t\t\t\t\t\t\t'Para llevar'\n\t\t\t\t\t\tWHEN 2 THEN\n\t\t\t\t\t\t\t'A domicilio'\n\t\t\t\t\t\tELSE '---' END) as tipo,\n\t\t\t\t\t(CASE c.status \n\t\t\t\t\t\tWHEN 0 THEN\n\t\t\t\t\t\t\t'Abierta'\n\t\t\t\t\t\tWHEN 1 THEN\n\t\t\t\t\t\t\t'Cerrada / Pagada'\n\t\t\t\t\t\tWHEN 2 THEN\n\t\t\t\t\t\t\t'Cerrada / Sin pago'\n\t\t\t\t\t\tWHEN 3 THEN\n\t\t\t\t\t\t\t'Eliminada'\n\t\t\t\t\t\tELSE '---' END) as status,\n\t\t\t\t\tu.usuario,c.codigo,c.timestamp,c.total, c.fin, \n\t\t\t\t\tSUM(promedioComensal) AS promedioComensal, GROUP_CONCAT(s.id) AS sub_comandas, suc.nombre AS sucursal, \n\t\t\t\t\tcli.celular AS tel\n\t\t\t\tFROM \n\t\t\t\t\t accelog_usuarios u, com_comandas c\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tcom_mesas m\n\t\t\t\t\tON\n\t\t\t\t\t\tc.idmesa = m.id_mesa\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tcomun_cliente cli\n\t\t\t\t\tON\n\t\t\t\t\t\tcli.nombre = m.nombre\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tcom_sub_comandas s\n\t\t\t\t\tON\n\t\t\t\t\t\ts.idpadre = c.id\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tmrp_sucursal suc\n\t\t\t\t\tON\n\t\t\t\t\t\tsuc.idSuc = m.idSuc\n\t\t\t\tWHERE \n\t\t\t\t\tc.idempleado = u.idempleado\n\t\t\t\tAND \n\t\t\t\t\tm.idSuc = \" . $sucursal . \" \" . \n\t\t\t\t$condicion . \" \n\t\t\t\tORDER BY \" . $orden;\n\t\t// return $sql;\n\t\t$result = $this -> queryArray($sql);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c657646a0af5734cbb81e1fa71be42f8", "score": "0.5858819", "text": "public function obtenerDialogosDesbalanceados() {\r\n//Dialogo[]\r\n $_ret = Array();\r\n $conexion = ConnectionManager::ObtenerConexion();\r\n\r\n try {\r\n\r\n $_exito = $conexion->abrirConexion();\r\n\r\n if ($_exito) {\r\n// $_query = new Query($conexion, \"dialogo\");\r\n// $_query->addCampo(\"n_id_dialogo\");\r\n// $_query->addCampo(\"x_titulo_dialogo\");\r\n// $_query->addCampo(\"x_id_usuario_creador\");\r\n// $_query->addCampo(\"x_id_usuario_facilitador\");\r\n// $_query->addCampo(\"d_fecha_creacion\");\r\n//\r\n// $_query->addCondicionAND(\"n_dialogo_desbalanceado=1\");\r\n// $_tabla = $conexion->consultar($_query->QuerySelect());\r\n\r\n $_q = 'select d.n_id_dialogo,x_titulo_dialogo,x_id_usuario_creador,';\r\n $_q .= 'd_fecha_creacion,x_id_usuario_facilitador,';\r\n $_q .= '(select max(d_fecha_creacion) from intervencion i where i.n_id_dialogo = d.n_id_dialogo) d_fecha_ultima_intervencion';\r\n $_q .= ' from dialogo d where d.n_dialogo_desbalanceado=1';\r\n\r\n $_tabla = $conexion->consultar($_q);\r\n $conexion->cerrarConexion();\r\n\r\n if (count($_tabla) > 0) {\r\n $_ret = Array();\r\n $i = 0;\r\n foreach ($_tabla as $dr) {\r\n try {\r\n $_nueva = new Dialogo();\r\n $_nueva->idDialogo = $dr[\"n_id_dialogo\"];\r\n $_nueva->Titulo = $dr[\"x_titulo_dialogo\"];\r\n\r\n $_f = new DateTime($dr[\"d_fecha_creacion\"]);\r\n $_nueva->FechaCreacion = date_format($_f, \"d-m-Y\");\r\n //$_nueva->FechaCreacion = $dr[\"d_fecha_creacion\"];\r\n\r\n $_usuarioCreador = new Usuario();\r\n $_usuarioCreador->nombreUsuario = $dr[\"x_id_usuario_creador\"];\r\n $_nueva->usuarioCreador = $_usuarioCreador;\r\n\r\n $_usuarioFacilitador = new Usuario();\r\n $_usuarioFacilitador->nombreUsuario = $dr[\"x_id_usuario_facilitador\"];\r\n $_nueva->usuarioFacilitador = $_usuarioFacilitador;\r\n\r\n try {\r\n $_f = new DateTime($dr[\"d_fecha_ultima_intervencion\"]);\r\n $_nueva->FechaUltimaIntervencion = date_format($_f, \"d-m-Y H:i:s\");\r\n } catch (Exception $e) {\r\n \r\n }\r\n//$_ret[0] = $_nueva;\r\n array_push($_ret, $_nueva);\r\n } catch (Exception $e) {\r\n//filas con datos corruptos no son agregadas.\r\n }\r\n }\r\n }\r\n }\r\n } catch (Exception $e) {\r\n \r\n }\r\n return $_ret;\r\n }", "title": "" }, { "docid": "e54bf76a1cb04ab7a30b54f6ad6a0e48", "score": "0.58569056", "text": "function cuadroCompleto($db, $comisionPrensa) {\n\tif (isset($_SESSION['IdAdmin'])) {\n\t\techo '<tr><td colspan=\"15\"><table cellpadding=\"1\" cellspacing=\"1\" bordercolor=\"#666666\" style=\"border-collapse:collapse;\">';\t\t\n\t\techo '<tbody>';\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t$fecha1 = $_POST['Fecha1'];\n\t\t$fecha2 = $_POST['Fecha2'];\n\t\t\n\t\t//GUARDAMOS LOS USUARIOS EN UN ARREGLO\n\t\t$SQL = \"SELECT Usuario FROM administrador\";\n\t\t$db->setQuery($SQL);\n\t\t$result = $db->loadObjectList();\n\t\tforeach($result as $result1) \n\t\t\t$administradores[] = trim($result1->Usuario);\n\t\t\t\t\t\t\t\t\t\n\t\t$SQL = \"SELECT productos.IdOferta, opcionesoferta.Id, SUM(lineasorden.Cantidad) as Unidades, productos.Nombre_Producto \";\n\t\t$SQL .= \"FROM ordenes \";\n\t\t$SQL .= \"INNER JOIN lineasorden ON ordenes.IdOrden = lineasorden.IdOrden \";\n\t\t$SQL .= \"INNER JOIN opcionesoferta ON lineasorden.Talla = opcionesoferta.Id \";\n\t\t$SQL .= \"INNER JOIN productos ON lineasorden.IdProducto = productos.IdOferta \";\n\t\t$SQL .= \"WHERE TRIM(ordenes.EstadoPago) = '\".trim('ok').\"' AND TRIM(lineasorden.EstadoPedido) <> '\".trim('Anulado').\"' AND ordenes.FechaOrden >= '$fecha1' AND ordenes.FechaOrden <= '$fecha2' \";\n\t\t$SQL .= \"GROUP BY opcionesoferta.Id ORDER BY productos.IdOferta ASC\";\n\t\t$db->setQuery($SQL);\n\t\t$result = $db->loadObjectList();\n\t\tforeach($result as $result1) {\n\t\t\t$arreglo[] = array('IdOferta'=>$result1->IdOferta, 'Tipo'=>$result1->Id);\n\t\t}\n\t\t$totalOfertas = count($arreglo);\n\t\t//print_r($arreglo);\n\t\t\t\t\t\t\t\t\t\n\t\tfor($i = 0; $i <= $totalOfertas - 1; $i++ ) {\t\t\t\t\t\t\t\t\n\t\t$SQL = \"SELECT productos.IdOferta, productos.Nombre_Producto, opcionesoferta.Id, opcionesoferta.Opcion, opcionesoferta.Precio, opcionesoferta.PrecioSesion, opcionesoferta.Iva, SUM(lineasorden.Cantidad) AS Unidades, SUM(lineasorden.Subtotal) as SubTotal, SUM(lineasorden.GastosEnvio) AS GastosEnvio, ordenes.Tramitado \";\n\t\t$SQL .= \"FROM ordenes \";\n\t\t$SQL .= \"INNER JOIN lineasorden ON ordenes.IdOrden = lineasorden.IdOrden \";\n\t\t$SQL .= \"INNER JOIN opcionesoferta ON lineasorden.Talla = opcionesoferta.Id \";\n\t\t$SQL .= \"INNER JOIN productos ON lineasorden.IdProducto = productos.IdOferta \";\n\t\t$SQL .= \"WHERE TRIM(ordenes.EstadoPago) = '\".trim('ok').\"' AND TRIM(lineasorden.EstadoPedido) <> '\".trim('Anulado').\"' AND ordenes.FechaOrden >= '$fecha1' AND ordenes.FechaOrden <= '$fecha2' AND productos.IdOferta = \".$arreglo[$i]['IdOferta'].\" AND opcionesoferta.Id = \".$arreglo[$i]['Tipo'].\" \";\n\t\t$SQL .= \"GROUP BY opcionesoferta.Id, ordenes.Tramitado ORDER BY productos.IdOferta ASC\";\n\t\t$db->setQuery($SQL);\n\t\t$row = $db->execute();\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t$ordenWeb = 0;\n\t\t$ordenCall = 0;\n\t\tif (mysqli_num_rows($row) > 0) {\n\t\t\t$result = $db->loadObjectList();\n\t\t\tforeach($result as $result1) {\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$ordenTramitada = $result1->Tramitado;\n\t\t\t\t$totalSubtotal = $totalSubtotal;\n\t\t\t\t\n\t\t\t\tif(in_array($ordenTramitada, $administradores)) {\n\t\t\t\t\tif($ordenTramitada == trim('usuario-web'))\n\t\t\t\t\t\t$ordenWeb = $ordenWeb + $result1->Unidades;\t\n\t\t\t\t\telse \n\t\t\t\t\t\t$ordenCall = $ordenCall + $result1->Unidades;\n\t\t\t\t} else {\n\t\t\t\t\t$errores = $errores + 1;\n\t\t\t\t}\n\t\t\t\t$subtotal = $subtotal + $result1->SubTotal;\n\t\t\t\t$comision = $comision + ($result1->SubTotal* ($comisionPrensa));\n\t\t\t}\n\t\t\t$totalOrdersCall = $totalOrdersCall + $ordenCall;\n\t\t\t$totalOrdersWeb = $totalOrdersWeb + $ordenWeb;\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t$facturacion = ($ordenCall + $ordenWeb)*$result1->Precio;\n\t\t\t$precioSesionTotal = $result1->PrecioSesion * ($ordenCall + $ordenWeb);\n\t\t\t$margenBrutoUnitario = $result1->Precio - $result1->PrecioSesion;\n\t\t\t$aportacionBruta = ($result1->Precio - $result1->PrecioSesion) * ($ordenCall + $ordenWeb);\n\t\t\t$comisionUnidad = $result1->Precio * ($comisionPrensa);\n\t\t\t$comisionTotal = ($result1->Precio*($comisionPrensa)) * ($ordenCall + $ordenWeb);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\techo '\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t<tr height=\"20px\">\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t<td width=\"50px\"><label>'.$result1->IdOferta.'</label></td>\n\t\t\t\t\t<td width=\"300px\"><label>'.utf8_encode($result1->Nombre_Producto).'</label></td>\n\t\t\t\t\t<td width=\"150px\"><label>'.utf8_encode($result1->Opcion).'</label></td>\n\t\t\t\t\t<td width=\"100px\"><label>'.$ordenCall.'</label></td>\n\t\t\t\t\t<td width=\"100px\"><label>'.$ordenWeb.'</label></td>\n\t\t\t\t\t<td width=\"100px\"><label>'.($ordenCall + $ordenWeb).'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format($result1->Precio,2,',','.').'</label></td>\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t<td width=\"100px\"><label>'.number_format($facturacion,2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format($result1->PrecioSesion,2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format($precioSesionTotal,2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format($margenBrutoUnitario,2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format($aportacionBruta,2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format($comisionUnidad,2,',','.').'</label></td>\n\t\t\t\t\t<td width=\"75px\"><label>'.number_format($comisionTotal,2,',','.').'</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t<td><label>'.number_format(($aportacionBruta - $comisionTotal),2,',','.').'</label></td>\n\t\t\t\t</tr>\n\t\t\t';\n\t\t\t//TOTALES\n\t\t\t$aportBruta = $aportBruta + $aportacionBruta;\n\t\t\t$aportNeta = $aportNeta + ($aportacionBruta - $comisionTotal);\n\t\t} \n\t}\n\t\t\t\t\t\t\t\n\t$graph[] = array('fact_total'=>$subtotal, 'aport_bruta'=>$aportBruta, 'comision_patner'=>$comision, 'aport_neta'=>$aportNeta);\n\t\t\t\t\t\t\t\t\t\n\techo '\n\t\t</tbody>\n\t\t<tfoot style=\"color: white; font-size: 14px; font-variant:small-caps; background: #1F88A7\">\n \t \t<tr height=\"30px\" style=\"color: white; font-size: 14px; font-variant:small-caps;\">\n \t<td colspan=\"3\" align=\"center\" bgcolor=\"#1F88A7\"><span>TOTALES</span></td>\n <td bgcolor=\"#1F88A7\"><span>'.$totalOrdersCall.'</span></td>\n <td bgcolor=\"#1F88A7\"><span>'.$totalOrdersWeb.'</span></td>\n <td bgcolor=\"#1F88A7\"><span>'.($totalOrdersWeb + $totalOrdersCall).'</span></td>\n <td bgcolor=\"#1F88A7\"></td>\n <td bgcolor=\"#1F88A7\"><span>'.number_format($subtotal,2,',','.').'</span></td>\n\t\t\t\t<td bgcolor=\"#1F88A7\"></td><td bgcolor=\"#1F88A7\"></td>\n\t\t\t\t<td bgcolor=\"#1F88A7\"></td>\n\t\t\t\t<td bgcolor=\"#1F88A7\">'.number_format($aportBruta,2,',','.').'</td>\n\t\t\t\t<td bgcolor=\"#1F88A7\"></td>\n <td bgcolor=\"#1F88A7\"><span>'.number_format($comision,2,',','.').'</span></td>\n\t\t\t\t<td bgcolor=\"#1F88A7\"><span>'.number_format($aportNeta,2,',','.').'</span></td>\n </tr>\t\t\t\t\t\t\t\t\t\t\n\t </tfoot>';\n\t\techo '</table></td></tr>';\n\t} \n\treturn $graph;\n}", "title": "" }, { "docid": "8f31c2014c11298727274f9a97aea996", "score": "0.5849638", "text": "function obtenerSolicitudesPorAsignar($f1,$f2,$ad,$cod_are_em,$id_emple){\n \n $cnn = new conexion();\n \t\t$con = $cnn->conectarsql();\n\n /*ESTA VALIDACION LLEGA VERIFICANDO QUE EL EMPLEADO QUE\n * INGRESA ES JEFE DEL AREA INDICADA... Y SOLO LOS TRAMIES\n * ASIGNADOS A ESA AREA*/\n \n $sql = \"SELECT tb_1.*\n \n FROM (SELECT cod_tramite,\n (SELECT Rtrim(Ltrim(nom + ' ' + ape_pat + ' ' + ape_mat))\n FROM tb_administrado AS a\n WHERE a.cod_administrado = t.cod_administrado) AS administrado,\n \n t.des_tramite,\n \n CONVERT(VARCHAR(10), t.fec_recepcion, 101) AS fec_recepcion,\n \n (SELECT des_exp\n FROM tb_tip_expediente te\n WHERE te.cod_tip_expediente = t.cod_exp) AS desexpediente,\n \n t.cod_exp,\n \n DAY(GETDATE()-t.fec_recepcion) AS diasTrans\n \n FROM tb_tramite AS t\n \n WHERE \n t.cod_estado = 'EST004') tb_1 \n \n inner join \n tb_tramite_area_asignada as tra \n on \n tb_1.cod_tramite = tra.cod_tramite\n \n\t\tinner join tb_area as are \n on \n are.cod_area = tra.cod_area\n \n WHERE tb_1.administrado LIKE '%\".$ad.\"%'\n AND tra.cod_area LIKE '%\".$cod_are_em.\"%'\n AND are.cod_jefe LIKE '%\".$id_emple.\"%'\n AND convert(date,tb_1.fec_recepcion) BETWEEN convert(date,'\".$f1.\"') AND convert(date,'\".$f2.\"') \n AND tb_1.cod_exp='' \n \n ORDER BY tb_1.diasTrans\";\n\n $consulta = sqlsrv_query ($con,$sql);\n \n //echo $sql;\n\n\n while( $row = sqlsrv_fetch_array( $consulta, SQLSRV_FETCH_ASSOC) ) {\n $this->lt_Tramite[] = $row;\n }\n\n sqlsrv_free_stmt( $consulta);\n\n return($this->lt_Tramite);\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "4bac3188558c3acab53dd8d5175c1d4e", "score": "0.0", "text": "public function show($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e273034885bffd94845673642335bb27", "score": "0.7371966", "text": "public function show(Resource $resource)\n {\n try {\n return $this->respondWithSuccess('Resource Loaded.', ['resource' => new ResourceResource($resource)]);\n } catch (Exception $e) {\n return $this->respondWithError($e->getMessage());\n }\n }", "title": "" }, { "docid": "11c1101c510d050789a63b228d82f91d", "score": "0.69214535", "text": "public function show(Resource $resource)\n {\n return view('resource.show', ['resource' => $resource]);\n }", "title": "" }, { "docid": "69e7043fb313b27715d4fd190fa0a47b", "score": "0.66724765", "text": "public function show(Resource $resource)\n {\n //\n $this->authorize('view', $resource);\n $pages= Page::all();\n return view('resource.show', compact('resource','pages'));\n }", "title": "" }, { "docid": "9b8d2c73bfa22d48146bec75330e17c2", "score": "0.6625154", "text": "public function showResource($id) {\n $resource = Resource::find($id);\n return view('update_resource', ['resource' => $resource]);\n }", "title": "" }, { "docid": "e72d7ee458278f6123e38cb93b88d1de", "score": "0.65666723", "text": "public function preview(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b6006c75ae679ecef360bdf7fe8a47c4", "score": "0.6452477", "text": "public function showButton()\n {\n $present = $this;\n $entity = $present->entity;\n\n if ($this->getShowUrl()) {\n if (method_exists($this, 'canShow') && !$this->canShow()) {\n return null;\n }\n\n return new HtmlString(\n view(\n 'Presenters::resource.show',\n compact('present', 'entity')\n )->render()\n );\n }\n }", "title": "" }, { "docid": "498e076230fe8f4d7404c0ed69d0193e", "score": "0.63486195", "text": "public function view($id){\n $resource = Resources::where('id', $id)->firstOrFail();\n\n return view('members.resources.resourceView', compact('resource'));\n }", "title": "" }, { "docid": "c61b289805e21ce014f2ebabb95fa293", "score": "0.6227368", "text": "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('AppBundle:ressource:show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "9140feb756393a883fcf6e2f605e8f9a", "score": "0.62140113", "text": "public function show($id)\n {\n $fields = $this->parseFields();\n $data = $this->getResource($id, $fields);\n if ($this->title) {\n $data['title'] = $this->title;\n }\n return self::getResponse()->setResType('view')\n ->setHeader(DefaultController::$defaultViewHeaders)\n ->setView($this->viewShow)\n ->setData($data)\n ->send();\n }", "title": "" }, { "docid": "08eb337d640dd82312a21b6c247ae6c3", "score": "0.62135386", "text": "function detail($resource_id)\n\t{\n\t\t$data['title'] = 'Resource DB: record detail';\n $data['heading'] = 'Resource DB: record detail';\n\t\t$data['query'] = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\t\t$this->load->view('resourcedb/recordview', $data);\n\t}", "title": "" }, { "docid": "0e77dafbf9425d4df343ecf92a60e68b", "score": "0.60997695", "text": "function display() {\n // Disable main template\n JRequest::setVar('tmpl', 'component');\n\n $user = JFactory::getUser();\n if ($user->guest) {\n echo JText::_('NOT_ALLOWED');\n jexit();\n } else {\n $uri = parse_url(JRequest::getUri());\n $info = pathinfo($uri['path']);\n\n $filepath = JPATH_BASE.$info['dirname'].DS.$info['basename'];\n if (!file_exists($filepath)) {\n echo JText::_('RESOURCE_DOES_NOT_EXIST');\n jexit();\n }\n if (is_readable($filepath)\n && is_file($filepath)) {\n $this->_writeHeaders($filepath, $info['basename']);\n } else {\n echo JText::_('RESOURCE_IS_NOT_AVAILABLE');\n jexit();\n }\n }\n }", "title": "" }, { "docid": "dc0458824f3a2b628e964bf7c61ad443", "score": "0.60300314", "text": "public function getResourcedetail($id)\n {\n if (Auth::user()->is_admin) {\n $resource = Resource::find($id);\n return view('admin.resourceDetail',compact('resource'));\n } else {\n abort(403, 'Unauthorized action.');\n }\n }", "title": "" }, { "docid": "9924ebe42d891fc52d2d624c42738080", "score": "0.60218257", "text": "public function show($imageResource) {\n\t\theader('Content-type: image/gif');\n\t\theader('Content-disposition: inline');\n\t\timagegif($imageResource, null);\n\t}", "title": "" }, { "docid": "9668df4ac88536ccf4da767d212203b0", "score": "0.6016775", "text": "public function show($id)\n {\n $resource = Resource::findOrFail($id);\n\n return view('resources.show', compact('resource'));\n }", "title": "" }, { "docid": "772b693ecb08ba335d0fc2aa0c534ae6", "score": "0.6006036", "text": "public function getAction()\n {\n $this->view->id = $this->_getParam('id');\n $this->view->resource = new stdClass;\n $this->getResponse()->setHttpResponseCode(200);\n }", "title": "" }, { "docid": "a2d4d54ea0f197ee16be50430b6d0aea", "score": "0.5994898", "text": "function display()\n\t{\n\t\techo $this->get();\n\t\t\n\t}", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "e943948b6a11bc29b2f266d55c7ee5a5", "score": "0.5944242", "text": "public function show() {\n\t\t$this->getImageStrategy()->show($this->getImage());\n\t}", "title": "" }, { "docid": "8172ae2b3e517fb12d98874eaa22fd0b", "score": "0.5922458", "text": "public function show()\n {\n $user = Auth::user();\n $resources_template = Lang::get('common/resources');\n $resources = [];\n\n // Iterate through resource files, and push link type array into resources array.\n if ($user->isUpgradedManager() || $user->isHrAdvisor()) {\n $files = Resource::all();\n foreach ($files as $file) {\n array_push($resources, [\n 'link' => asset(Storage::url($file->file)),\n 'title' => '',\n 'text' => $file->name,\n ]);\n }\n\n // Sort the list alphabetically.\n usort($resources, function ($filenameA, $filenameB) {\n return strcmp($filenameA['text'], $filenameB['text']);\n });\n }\n\n $portal = WhichPortal::isHrPortal() ? 'hr' : 'manager';\n\n return view('common/resources', [\n // Localized strings.\n 'resources_template' => $resources_template,\n 'portal' => $portal,\n // List of resource downloads.\n 'resources' => $resources,\n ]);\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5aa279313a3a2ed339dbfab0f2c848e3", "score": "0.58987516", "text": "public function show(Request $request, $client, $resource)\n\t{\n\t\t$resource = Resource::findBySlug($client, $resource);\n\n\t\tif (!$resource) {\n\t\t\treturn response(view('resources.404'), 404);\n\t\t}\n\n\t\t$this->authorize('view', $resource);\n\n\t\t$request->user()->pushToHistory($resource)->save();\n\n\t\t$resource->load('client', 'tags', 'type');\n\n\t\tif ($resource->hasCorrectlyEncryptedMetadata()) {\n\t\t\ttry {\n\t\t\t\t$resource->metadata = Crypt::decrypt($resource->metadata);\n\t\t\t} catch (DecryptException $e) {\n\t\t\t\tSession::flash('alert-danger', 'There was a problem decrypting this resource\\'s metadata.');\n\t\t\t\tLog::notice('Could not decrypt resource metadata', ['exception' => $e]);\n\t\t\t}\n\t\t} else {\n\t\t\tSession::flash('alert-info', 'This resource\\'s metadata is not encrypted (or is encrypted incorrectly).');\n\t\t}\n\n\t\treturn view('resources.show', ['resource' => $resource]);\n\t}", "title": "" }, { "docid": "00d244ef3a763ccdbae14ec11bf19cd4", "score": "0.5898524", "text": "public function show(int $id)\n {\n if (auth()->user()->user_type_id == 0){\n $model = $this->Resource->GetByID($id);\n if ($model == null) {\n return redirect('/admin/resources')->with(['error' => 'Resources not found!']);\n }\n return view(\"student.cresources.details\")->with(['active'=>'resource', 'subactive'=>'resource', 'model'=>$model]);\n }else{\n $model = $this->Resource->GetByID($id);\n if ($model == null) {\n return redirect('/admin/resources')->with(['error' => 'Resources not found!']);\n }\n return view(\"admin.cresources.details\")->with(['active'=>'resource', 'subactive'=>'resource', 'model'=>$model]);\n }\n }", "title": "" }, { "docid": "488b2f71d703803d51ef92125cfccb32", "score": "0.5866671", "text": "public function display()\n {\n $uri = new SolarLite_Uri();\n $uri->set();\n \n if (!isset($uri->path[0])) {\n $controller = SolarLite_Config::get('default_controller', false);\n if ($controller) {\n $uri->path[0] = $controller;\n } else {\n $uri->path[0] = '';\n }\n }\n \n // pass through router\n $uri->path = $this->route($uri->path);\n \n $class = 'App_Controller_' . ucfirst($uri->path[0]);\n $file = self::classToPath($class, '.php');\n \n if (!file_exists($file) && SolarLite_Config::get('default_controller', false) !== false) {\n $controller = SolarLite_Config::get('default_controller');\n array_unshift($uri->path, $controller);\n $class = 'App_Controller_' . ucfirst($controller);\n $file = self::classToPath($class, '.php');\n if (!file_exists($file)) {\n $class = 'SolarLite_Controller';\n }\n } elseif (!file_exists($file)) {\n $class = 'SolarLite_Controller';\n }\n $class = new $class();\n $class->display($uri);\n }", "title": "" }, { "docid": "7c25d9175a0b8f2be9a3f3b0c4a64c29", "score": "0.5860501", "text": "public function showAction()\r\n\t{\r\n\t\t$this->loadLayout()->renderLayout();\r\n\t}", "title": "" }, { "docid": "96adc772bb49436d8b214bbd7d2c63f8", "score": "0.5829649", "text": "public function resources()\n {\n if($this->input->post('resource_id', false)) {\n $this->auth->restrict('DM_Preparedness.Content.Create');\n $this->addOrEditResourceLink();\n $id = $this->input->post('resource_id');\n\n Template::redirect($this->resourceResourcesUrl.'/'.$id);\n } else {\n $this->auth->restrict('DM_Preparedness.Content.View');\n $id = $this->uri->segment(5);\n $listView = $this->showResourceResourcesList($id);\n\n Template::set('backUrl', $this->homeScreenUrl);\n Template::set('listView', $listView);\n Template::render();\n }\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "6d96f17caa0523cc80db2c2bb885b9c1", "score": "0.57844186", "text": "private function _resource($data, $name)\n {\n $data = get_resource_type($data);\n $this->_renderNode('Resource', $name, $data);\n }", "title": "" }, { "docid": "b3a855f1dce17dcc8d02e34d8071388d", "score": "0.5780657", "text": "public function display()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->_load()->display($this->_data);\n\t\t}\n\t\tcatch(Twig_Error_Loader $e)\n\t\t{\n\t\t\tshow_error($e->getRawMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "765678d75db620af12e826ffe74dec55", "score": "0.57683015", "text": "public function display()\n {\n parent::display();\n }", "title": "" }, { "docid": "24c63cc758a7c6c6fe61053136124e16", "score": "0.57606494", "text": "public function viewAction()\n { \n $this->loadLayout();\n try {\n $id = $this->getRequest()->getParam('id', $this->getRequest()->getParam('id', false));\n \n if($manufacturer = Mage::helper('mybrand/manufacturer')->renderLink($this, $id)) {\n //register current manufacturer\n Mage::register('current_manufacturer', $manufacturer);\n \n }\n } catch(Exception $e) {\n \n }\n \n $this->renderLayout();\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.5756713", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.5756713", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "c856c8e6e792c30d33f8b653e21e8dd3", "score": "0.57502717", "text": "public function display( $object = null ) {\n\t\techo $this->render( $object );\n\t}", "title": "" }, { "docid": "66e03ced3a1ae0b6545066542c4db145", "score": "0.5740594", "text": "public function show($id)\n {\n // NOT CURRENTLY IN USE\n }", "title": "" }, { "docid": "78932871c36f6a29063b014a4f04161e", "score": "0.5735597", "text": "public function show(Supplier $supplier)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "c27b7f061b14b3c5c61c337e63783752", "score": "0.57220376", "text": "public function edit(Resource $resource)\n {\n $tags = convert_tags_to_string($resource);\n\n return view('resource.edit', ['resource' => $resource, 'tags' => $tags]);\n }", "title": "" }, { "docid": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57208323", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57208323", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "f66e5d8754a0233237013bb8c45e0377", "score": "0.57202315", "text": "public function show($id)\n\t{\n\t\t//\n\t\t \n\t}", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "f810559c966a6f2c87d7e75698b80a8e", "score": "0.56954175", "text": "public function edit(Resource $resource)\n {\n //\n $this->authorize('update', $resource);\n $pages = Page::all();\n return view('resource.edit', compact('resources','pages'));\n }", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
2d5aed74c12bf766261939fbe41f7c5d
/ Load PayPal IPN
[ { "docid": "344feb9f35cd4e3aab79e6c7a6d0de6e", "score": "0.6691232", "text": "function load_paypal_ipn_handle(){\n $icredit = new WC_Gateway_ICredit;\n add_action( \"valid-paypal-standard-ipn-request\",array($icredit, 'icredit_valid_paypal_standard_ipn_request'), 10, 1 );\n add_action( \"woocommerce_paypal_express_checkout_valid_ipn_request\",array($icredit, 'icredit_valid_paypal_standard_ipn_request'), 10, 1 );\n }", "title": "" } ]
[ { "docid": "9a92622e71ac4ecb6718dd170fdf2b5b", "score": "0.7139209", "text": "public function _ipn(){\r\n\t\t\r\n\t\t// Reading POSTed data directly from $_POST causes serialization issues with array data in the POST.\r\n\t\t// Instead, read raw POST data from the input stream.\r\n\t\t$raw_post_data = file_get_contents('php://input');\r\n\t\t$raw_post_array = explode('&', $raw_post_data);\r\n\t\t$myPost = array();\r\n\t\tforeach ($raw_post_array as $keyval) {\r\n\t\t\t$keyval = explode ('=', $keyval);\r\n\t\t\tif (count($keyval) == 2)\r\n\t\t\t\t$myPost[$keyval[0]] = urldecode($keyval[1]);\r\n\t\t}\r\n\t\t// read the IPN message sent from PayPal and prepend 'cmd=_notify-validate'\r\n\t\t$req = 'cmd=_notify-validate';\r\n\t\tif(function_exists('get_magic_quotes_gpc')) {\r\n\t\t\t$get_magic_quotes_exists = true;\r\n\t\t}\r\n\t\tforeach ($myPost as $key => $value) {\r\n\t\t\tif($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) {\r\n\t\t\t\t$value = urlencode(stripslashes($value));\r\n\t\t\t} else {\r\n\t\t\t\t$value = urlencode($value);\r\n\t\t\t}\r\n\t\t\t$req .= \"&$key=$value\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// STEP 2: POST IPN data back to PayPal to validate\r\n\t\t\r\n\t\t$ch = curl_init('https://www.sandbox.paypal.com/cgi-bin/webscr');\r\n\t\tcurl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\r\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\r\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $req);\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\r\n\t\tcurl_setopt($ch, CURLOPT_FORBID_REUSE, 1);\r\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));\r\n\t\t\r\n\t\t// In wamp-like environments that do not come bundled with root authority certificates,\r\n\t\t// please download 'cacert.pem' from \"http://curl.haxx.se/docs/caextract.html\" and set\r\n\t\t// the directory path of the certificate as shown below:\r\n\t\t// curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');\r\n\t\tif( !($res = curl_exec($ch)) ) {\r\n\t\t\t// error_log(\"Got \" . curl_error($ch) . \" when processing IPN data\");\r\n\t\t\tcurl_close($ch);\r\n\t\t\t$this->parse_ipn();\r\n\t\t\texit;\r\n\t\t}\r\n\t\tcurl_close($ch);\r\n\t\t$this->parse_ipn($res);\r\n\t}", "title": "" }, { "docid": "50a9a95dac3f87b3132439834c221834", "score": "0.70941484", "text": "public function paypalipn($sandbox = false) {\n $this->autoRender = false;\n $model = TableRegistry::get('Paypalipns');\n $row = $model -> newEntity();\n\n // this automatically sets fields like mc_gross, tx, .. as soon as they're setup in db table\n $model->patchEntity($row, $this -> request -> getData());\n\n $row -> rawrequest = json_encode($_REQUEST);\n $row -> sandbox = $sandbox;\n \n $ipn = new PaypalIPN();\n //$ipn->useSandbox(); // remove me for production\n $row -> verified = $ipn->verifyIPN();\n\n $row -> server = print_r($_SERVER, true);\n $model->save($row);\n $this->updatebookings($row->id);\n\n // Reply with an empty 200 response to indicate to paypal the IPN was received correctly.\n // header(\"HTTP/1.1 200 OK\");\n // armin: this is done by cake per default\n }", "title": "" }, { "docid": "bb45a2f70cb335faa57589b281c09de5", "score": "0.7064261", "text": "public function paypalipnsandbox() {\n $this->paypalipn(true);\n }", "title": "" }, { "docid": "962d1b9b18652ff585a216446302f3db", "score": "0.693469", "text": "function ipn() {\n $paypalInfo = $this->input->post();\n\n $data['user_id'] = $paypalInfo['custom'];\n $data['product_id'] = $paypalInfo[\"item_number\"];\n $data['txn_id'] = $paypalInfo[\"txn_id\"];\n $data['payment_gross'] = $paypalInfo[\"payment_gross\"];\n $data['currency_code'] = $paypalInfo[\"mc_currency\"];\n $data['payer_email'] = $paypalInfo[\"payer_email\"];\n $data['payment_status'] = $paypalInfo[\"payment_status\"];\n\n $paypalURL = $this->paypal_lib->paypal_url;\n $result = $this->paypal_lib->curlPost($paypalURL, $paypalInfo);\n\n //check whether the payment is verified\n if (preg_match(\"/VERIFIED/i\", $result)) {\n //insert the transaction data into the database\n $this->common->insert_data($data, 'payments');\n }\n }", "title": "" }, { "docid": "f77e15691a01244aa30c348b3a67cfbc", "score": "0.686849", "text": "function ipn(){\r\n\t\t$paypalInfo\t= $this->input->post();\r\n\t\t$data['user_id'] = $paypalInfo['custom'];\r\n\t\t$data['product_id']\t= $paypalInfo[\"item_number\"];\r\n\t\t$data['txn_id']\t= $paypalInfo[\"txn_id\"];\r\n\t\t$data['payment_gross'] = $paypalInfo[\"payment_gross\"];\r\n\t\t$data['currency_code'] = $paypalInfo[\"mc_currency\"];\r\n\t\t$data['payer_email'] = $paypalInfo[\"payer_email\"];\r\n\t\t$data['payment_status']\t= $paypalInfo[\"payment_status\"];\r\n\r\n\t\t$paypalURL = $this->paypal_lib->paypal_url;\t\t\r\n\t\t$result\t= $this->paypal_lib->curlPost($paypalURL,$paypalInfo);\r\n\t\t\r\n\t\t//check whether the payment is verified\r\n\t\tif(eregi(\"VERIFIED\",$result))\r\n\t\t{\r\n\t\t\t//insert the transaction data into the database\r\n\t\t\t$this->product->insertTransaction($data);\r\n\t\t}\r\n }", "title": "" }, { "docid": "02c37733af1549426c507b42a9f68ba4", "score": "0.6765386", "text": "public function ipn_url()\n\n\t{\t\t\n\n\t\t# STEP 1: Read POST data\n\n \n\n\t\t# reading posted data from directly from $_POST causes serialization \n\n\t\t# issues with array data in POST\n\n\t\t# reading raw POST data from input stream instead. \n\n\t\t$raw_post_data = file_get_contents('php://input');\n\n\t\t$raw_post_array = explode('&', $raw_post_data);\n\n\t\t$myPost = array();\n\n\t\tforeach ($raw_post_array as $keyval) \n\n\t\t{\n\n\t\t $keyval = explode ('=', $keyval);\n\n\t\t if (count($keyval) == 2)\n\n\t\t $myPost[$keyval[0]] = urldecode($keyval[1]);\n\n\t\t}\n\n\t\t# read the post from PayPal system and add 'cmd'\n\n\t\t$req = 'cmd=_notify-validate';\n\n\t\tif(function_exists('get_magic_quotes_gpc')) \n\n\t\t{\n\n\t\t $get_magic_quotes_exists = true;\n\n\t\t} \n\n\t\tforeach ($myPost as $key => $value) \n\n\t\t{ \n\n\t\t if($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) \n\n\t\t { \n\n\t\t $value = urlencode(stripslashes($value)); \n\n\t\t } \n\n\t\t else \n\n\t\t {\n\n\t\t $value = urlencode($value);\n\n\t\t }\n\n\t\t $req .= \"&$key=$value\";\n\n\t\t}\n\n\t\t \n\n\t\t \n\n\t\t# STEP 2: Post IPN data back to paypal to validate\n\n\n\n\t\t$action = (get_settings('paypal_settings','enable_sandbox_mode','No')=='Yes')?'https://www.sandbox.paypal.com/cgi-bin/webscr':'https://www.paypal.com/cgi-bin/webscr';\n\n\t\t \n\n\t\t$ch = curl_init($action);\n\n\t\tcurl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $req);\n\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n\n\t\tcurl_setopt($ch, CURLOPT_FORBID_REUSE, 1);\n\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));\n\n\t\t \n\n\t\t# In wamp like environments that do not come bundled with root authority certificates,\n\n\t\t# please download 'cacert.pem' from \"http://curl.haxx.se/docs/caextract.html\" and set the directory path \n\n\t\t# of the certificate as shown below.\n\n\t\t# curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');\n\n\t\tif( !($res = curl_exec($ch)) ) {\n\n\t\t # $this->write_log(\"Got \" . curl_error($ch) . \" when processing IPN data\");\n\n\t\t curl_close($ch);\n\n\t\t //$this->send_notification_mail('Curl error');\n\n\t\t //$this->write_log('curl error');\n\n\t\t exit;\n\n\t\t}\n\n\t\tcurl_close($ch);\n\n\t\t \n\n\t\t//$this->send_notification_mail('After curl');\n\n\t\t\n\n\t\t# STEP 3: Inspect IPN validation result and act accordingly\n\n\n\t\tif (strcmp ($res, \"VERIFIED\") == 0) \n\n\t\t{\n\n\t\t\t$str = explode(\"&\", $_POST['custom']);\n\n\n\n\t\t\t$custom_val = array();\n\n\n\n\t \tforeach ($str as $value) \n\n\t \t{\n\n\t \t\t$get \t= explode(\"=\",$value);\t\n\n\t \t\t$custom_val[$get[0]] = (isset($get[1]))?$get[1]:'';\n\n\t \t}\n\n\t\t\t# assign posted variables to local variables\n\n\t\t $uniqid \t\t\t= $custom_val['id'];\n\n\t\t $item_name \t\t\t= $_POST['item_name'];\n\n\t\t $item_number \t\t= $_POST['item_number'];\n\n\t\t $payment_status \t= $_POST['payment_status'];\n\n\t\t $payment_amount \t= $_POST['mc_gross'];\n\n\t\t $payment_currency \t= $_POST['mc_currency'];\n\n\t\t $txn_id \t\t\t= $_POST['txn_id'];\n\n\t\t $txn_type \t\t\t= $_POST['txn_type'];\n\n\t\t $receiver_email \t= $_POST['receiver_email'];\n\n\t\t $payer_email \t\t= $_POST['payer_email'];\n\n\t\t\t# check whether the payment_status is Completed\n\n\t\t # check that txn_id has not been previously processed\n\n\t\t # check that receiver_email is your Primary PayPal email\n\n\t\t # check that payment_amount/payment_currency are correct\n\n\t\t //$this->send_notification_mail('verified');\n\n\t\t //$this->send_notification_mail('verified post data : '.serialize($_POST));\n\n\t\t $order = $this->payment_model->get_post_payment_data_by_unique_id($uniqid);\n\n\t\t \n\t\t if($order->num_rows()>0)\n\n\t\t {\n\n\t\t \t$order \t\t= $order->row();\n\n\t\t \t$order_id \t= $order->id;\n\n\t\t \t$post_id \t= $order->post_id;\n\n\t\t \t//$this->send_notification_mail('within valid order block');\n\n\n\n\t\t\t $my_receiver_email = get_settings('paypal_settings','email','none');\n\n\t\t\t \n\n\t\t\t $msg = 'Status : '.$payment_status.'|'.\n\n\t\t\t \t\t'emails :'.$my_receiver_email.' = '.$receiver_email.\n\n\t\t\t \t\t'amount : '.$order->amount.' = '.$payment_amount.\n\n\t\t\t \t\t'curr :'.$payment_currency.' = '.get_settings('paypal_settings','currency','USD');\n\n\n\n\t\t\t //$this->send_notification_mail($msg);\n\n\t\t \tif($payment_status=='Completed' /*&& $this->register_model->check_txn_id($txn_id)==TRUE*/ && \n\n\t\t \t $my_receiver_email==$receiver_email && $order->amount==$payment_amount && $payment_currency==get_settings('paypal_settings','currency','USD'))\n\n\t\t \t{\n\n\t\t \t\t# process payment\n\n\t\t \t\t$response = serialize($_POST);\n\n\t\t \t\t#$this->send_notification_mail('before update');\n\n\t\t \t\tif($txn_type=='web_accept')\n\n\t\t \t\t{\n\n\t\t \t\t\t#$this->send_notification_mail('within update');\n\n\t\t \t\t\t$this->load->model('admin/package_model');\n\n\t\t \t\t\t$package \t= $this->package_model->get_package_by_id($order->package_id);\n\n\t\t \t\t\t$this->load->helper('date');\n\n\t\t \t\t\t$datestring = \"%Y-%m-%d\";\n\n\t\t\t\t\t\t$time = time();\n\n\t\t\t\t\t\t$activation_date = mdate($datestring, $time);\n\n\t\t\t\t\t\t$expirtion_date = strtotime('+'.$package->expiration_time.' days',$time);\n\n\t\t \t\t\t$expirtion_date = mdate($datestring, $expirtion_date);\n\n\n\n\t\t \t\t\t$data = array();\n\n\t\t \t\t\t$data['is_active'] \t\t \t= 1;\n\n\t\t \t\t\t$data['activation_date'] \t= $activation_date;\n\n\t\t \t\t\t$data['expiration_date'] \t= $expirtion_date;\n\n\t\t \t\t\t$data['response_log']\t\t= $response;\n\n\n\n\t\t \t\t\t$this->payment_model->update_post_payment_data_by_unique_id($data,$uniqid);\n\n\n\n\t\t \t\t\t#update post table -- pending sc\n\n\n\n\t\t \t\t\t// $this->load->model('user/user_model');\n\n\t\t \t\t\t// $user = $this->user_model->get_user_data_array_by_id($order->user_id);\n\n\n\n\t\t\t\t\t\t//send_payment_confirmation_email($user);\n\n\t\t\t\t\t\t$data = array();\n\n\t\t\t\t\t\tif(isset($custom_val['renew']) && $custom_val['renew']=='renew') { // if the payment was done to renew the post package we don't check for admin approval since it was approved previously\n\n\t\t\t\t\t\t\t$data['expirtion_date']\t\t= $expirtion_date;\n\t\t\t\t\t\t\t$data['activation_date'] \t= $activation_date;\n\t\t\t\t\t\t\t$data['last_update_time'] \t= $time;\n\t\t\t\t\t\t\t$data['status'] \t\t\t= 1;\n\n\t\t\t\t\t\t\t$this->load->model('admin/business_model');\n\t\t\t\t\t\t\t$this->business_model->update_post_by_id($data,$post_id);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif(get_settings('business_settings','publish_directly','Yes')=='Yes') {\n\n\t\t\t\t\t\t\t\t$data['expirtion_date']\t\t= $expirtion_date;\n\t\t\t\t\t\t\t\t$data['activation_date'] \t= $activation_date;\n\t\t\t\t\t\t\t\t$data['last_update_time'] \t= $time;\n\t\t\t\t\t\t\t\t$data['status'] \t\t\t= 1;\n\n\t\t\t\t\t\t\t\t$this->load->model('admin/business_model');\n\t\t\t\t\t\t\t\t$this->business_model->update_post_by_id($data,$post_id);\n\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\t\t$data['expirtion_date']\t\t= $expirtion_date;\n\t\t\t\t\t\t\t\t$data['activation_date'] \t= $activation_date;\n\t\t\t\t\t\t\t\t$data['last_update_time'] \t= $time;\n\t\t\t\t\t\t\t\t$data['status'] \t\t\t= 2;\n\n\t\t\t\t\t\t\t\t$this->load->model('admin/business_model');\n\t\t\t\t\t\t\t\t$this->business_model->update_post_by_id($data,$post_id);\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t \t\t}\n\n\t\t \t\t\n\n\t\t \t\t//$this->write_log($txn_type.' from '.$username);\n\n\t\t \t}\n\n\t\t \t\n\n\t\t \tif($txn_type=='subscr_cancel') \n\n\t\t \t{\n\n\t\t \t\t//$this->send_notification_mail('subscriber cancel');\n\n\t\t \t}\n\n\t\t \telse if($txn_type=='subscr_eot' || $txn_type=='subscr_failed')\n\n\t\t \t{\n\n\t\t \t\t//$this->send_notification_mail('subscriber failed');\n\n\t\t \t}\n\n\t\t }\n\n\t\t \n\n\t\t}\n\n\t\telse if (strcmp ($res, \"INVALID\") == 0) \n\n\t\t{\n\n\t\t //$this->write_log('invalid payment');\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "4422fa4c8e0eb266eaa810b27c2d5c36", "score": "0.66021925", "text": "public function feature_payment_ipn_url()\n\n\t{\n\n\t\t//$this->send_notification_mail('Got to feature ipn');\n\n\t\t# STEP 1: Read POST data\n\n \n\n\t\t# reading posted data from directly from $_POST causes serialization \n\n\t\t# issues with array data in POST\n\n\t\t# reading raw POST data from input stream instead. \n\n\t\t$raw_post_data = file_get_contents('php://input');\n\n\t\t$raw_post_array = explode('&', $raw_post_data);\n\n\t\t$myPost = array();\n\n\t\tforeach ($raw_post_array as $keyval) \n\n\t\t{\n\n\t\t $keyval = explode ('=', $keyval);\n\n\t\t if (count($keyval) == 2)\n\n\t\t $myPost[$keyval[0]] = urldecode($keyval[1]);\n\n\t\t}\n\n\t\t# read the post from PayPal system and add 'cmd'\n\n\t\t$req = 'cmd=_notify-validate';\n\n\t\tif(function_exists('get_magic_quotes_gpc')) \n\n\t\t{\n\n\t\t $get_magic_quotes_exists = true;\n\n\t\t} \n\n\t\tforeach ($myPost as $key => $value) \n\n\t\t{ \n\n\t\t if($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) \n\n\t\t { \n\n\t\t $value = urlencode(stripslashes($value)); \n\n\t\t } \n\n\t\t else \n\n\t\t {\n\n\t\t $value = urlencode($value);\n\n\t\t }\n\n\t\t $req .= \"&$key=$value\";\n\n\t\t}\n\n\t\t \n\n\t\t \n\n\t\t# STEP 2: Post IPN data back to paypal to validate\n\n\n\n\t\t$action = (get_settings('paypal_settings','enable_sandbox_mode','No')=='Yes')?'https://www.sandbox.paypal.com/cgi-bin/webscr':'https://www.paypal.com/cgi-bin/webscr';\n\n\t\t \n\n\t\t$ch = curl_init($action);\n\n\t\tcurl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $req);\n\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n\n\t\tcurl_setopt($ch, CURLOPT_FORBID_REUSE, 1);\n\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));\n\n\t\t \n\n\t\t# In wamp like environments that do not come bundled with root authority certificates,\n\n\t\t# please download 'cacert.pem' from \"http://curl.haxx.se/docs/caextract.html\" and set the directory path \n\n\t\t# of the certificate as shown below.\n\n\t\t# curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');\n\n\t\tif( !($res = curl_exec($ch)) ) {\n\n\t\t # $this->write_log(\"Got \" . curl_error($ch) . \" when processing IPN data\");\n\n\t\t curl_close($ch);\n\n\t\t //$this->send_notification_mail('Curl error');\n\n\t\t //$this->write_log('curl error');\n\n\t\t exit;\n\n\t\t}\n\n\t\tcurl_close($ch);\n\n\t\t \n\n\t\t//$this->send_notification_mail('After curl');\n\n\t\t\n\n\t\t# STEP 3: Inspect IPN validation result and act accordingly\n\n\t\t \n\n\t\tif (strcmp ($res, \"VERIFIED\") == 0) \n\n\t\t{\n\n\t\t\t$str = explode(\"&\", $_POST['custom']);\n\n\n\n\t\t\t$custom_val = array();\n\n\n\n\t \tforeach ($str as $value) \n\n\t \t{\n\n\t \t\t$get \t= explode(\"=\",$value);\t\n\n\t \t\t$custom_val[$get[0]] = (isset($get[1]))?$get[1]:'';\n\n\t \t}\n\n\n\n\t\t\t# assign posted variables to local variables\n\n\t\t $uniqid \t\t\t= $custom_val['id'];\n\n\t\t $item_name \t\t\t= $_POST['item_name'];\n\n\t\t $item_number \t\t= $_POST['item_number'];\n\n\t\t $payment_status \t= $_POST['payment_status'];\n\n\t\t $payment_amount \t= $_POST['mc_gross'];\n\n\t\t $payment_currency \t= $_POST['mc_currency'];\n\n\t\t $txn_id \t\t\t= $_POST['txn_id'];\n\n\t\t $txn_type \t\t\t= $_POST['txn_type'];\n\n\t\t $receiver_email \t= $_POST['receiver_email'];\n\n\t\t $payer_email \t\t= $_POST['payer_email'];\n\n\t\t\t# check whether the payment_status is Completed\n\n\t\t # check that txn_id has not been previously processed\n\n\t\t # check that receiver_email is your Primary PayPal email\n\n\t\t # check that payment_amount/payment_currency are correct\n\n\t\t //$this->send_notification_mail('verified:'.$uniqid);\n\n\t\t //$this->send_notification_mail('verified post data : '.serialize($_POST));\n\n\t\t $this->load->model('user/payment_model');\n\n\t\t $order = $this->payment_model->get_post_payment_data_by_unique_id($uniqid);\n\n\t\t \n\n\t\t if($order->num_rows()>0)\n\n\t\t {\n\t\t \t//$this->send_notification_mail('within valid order block:'.$order->package_id);\n\t\t \t\n\t\t \t$order \t\t= $order->row();\n\n\t\t \t$order_id \t= $order->id;\n\n\t\t \t$post_id \t= $order->post_id;\n\n\n\t\t \t$this->load->model('admin/package_model');\n\n\t\t \t\n\t\t \t$package = $this->package_model->get_package_by_id($order->package_id);\n\n\t\t\t $my_receiver_email = get_settings('paypal_settings','email','none');\n\n\t\t\t \n\n\t\t\t $msg = 'Status : '.$payment_status.'|'.\n\n\t\t\t \t\t'emails :'.$my_receiver_email.' = '.$receiver_email.\n\n\t\t\t \t\t'amount : '.$order->amount.' = '.$payment_amount.\n\n\t\t\t \t\t'curr :'.$payment_currency.' = '.get_settings('paypal_settings','currency','USD');\n\n\n\n\t\t\t //$this->send_notification_mail($msg);\n\n\t\t \tif($payment_status=='Completed' /*&& $this->register_model->check_txn_id($txn_id)==TRUE*/ && \n\n\t\t \t $my_receiver_email==$receiver_email && $order->amount==$payment_amount && $payment_currency==get_settings('paypal_settings','currency','USD'))\n\n\t\t \t{\n\n\t\t \t\t# process payment\n\n\t\t \t\t$response = serialize($_POST);\n\n\n\t\t \t\tif($txn_type=='web_accept')\n\n\t\t \t\t{\n\t\t \t\t\n\n\t\t \t\t\t$this->load->helper('date');\n\n\t\t \t\t\t$datestring = \"%Y-%m-%d\";\n\n\t\t\t\t\t\t$time = time();\n\n\t\t \t\t\t$activation_date = mdate($datestring, $time);\n\n\t\t \t\t\t$expirtion_date = strtotime('+'.$package->expiration_time.' days',$time);\n\n\t\t \t\t\t$expirtion_date = mdate($datestring, $expirtion_date);\n\n\t\t \t\t\t//$this->send_notification_mail('before update web accept : '.$expirtion_date);\n\n\t\t \t\t\t$data = array();\n\n\t\t \t\t\t$data['is_active'] \t\t \t= 1;\n\n\t\t \t\t\t$data['activation_date'] \t= $activation_date;\n\n\t\t \t\t\t$data['expiration_date'] \t= $expirtion_date;\n\n\t\t \t\t\t$data['response_log']\t\t= 'Success package unique id:'.$uniqid;\n\n\n\n\t\t \t\t\t$this->payment_model->update_post_payment_data_by_unique_id($data,$uniqid);\n\n\t\t \t\t\t$this->load->model('user/post_model');\n\n\t\t \t\t\tif(isset($custom_val['renew']) && $custom_val['renew']=='renew') {\n\n\t\t \t\t\t\t\n\n\t\t \t\t\t\tif($this->post_model->increment_featured_date($package->expiration_time,$post_id)==TRUE)\n\n\t\t \t\t\t\t\t$this->session->set_flashdata('msg','<div class=\"alert alert-success\">'.lang_key('feature_renewed').'</div>');\n\n\t\t \t\t\t\telse\n\n\t\t \t\t\t\t\t$this->session->set_flashdata('msg','<div class=\"alert alert-danger\">Error! Feature not renewed.</div>');\n\n\t\t \t\t\t}\n\n\t\t \t\t\telse {\n\n\t\t \t\t\t\t$data = array();\n\n\t\t \t\t\t\t$data['featured_expiration_date'] \t= $expirtion_date;\n\n\t\t \t\t\t\t$data['featured']\t\t\t\t\t= 1;\n\n\t\t \t\t\t\t$this->post_model->update_post($data,$post_id);\n\n\n\n\t\t \t\t\t\t$this->session->set_flashdata('msg','<div class=\"alert alert-success\">'.lang_key('post_featured').'</div>');\n\n\t\t \t\t\t}\n\n\n\n\t\t \t\t\t$this->session->unset_userdata('feature_post_id');\n\n\t\t \t\t\t$this->session->unset_userdata('feature_post_type');\n\n\n\n\t\t \t\t\t$this->session->set_flashdata('msg','<div class=\"alert alert-success\">'.lang_key('post_featured').'</div>');\n\n\t\t \t\t\tredirect(site_url('admin/business/allposts'));\n\n\t\t \t\t\t\n\n\t\t \t\t}\n\n\t\t \t\t\n\n\t\t \t\t//$this->write_log($txn_type.' from '.$username);\n\n\t\t \t}\n\n\t\t \t\n\n\t\t \tif($txn_type=='subscr_cancel') \n\n\t\t \t{\n\n\t\t \t\t//$this->send_notification_mail('subscriber cancel');\n\n\t\t \t}\n\n\t\t \telse if($txn_type=='subscr_eot' || $txn_type=='subscr_failed')\n\n\t\t \t{\n\n\t\t \t\t//$this->send_notification_mail('subscriber failed');\n\n\t\t \t}\n\n\t\t }\n\n\t\t \n\n\t\t}\n\n\t\telse if (strcmp ($res, \"INVALID\") == 0) \n\n\t\t{\n\n\t\t //$this->write_log('invalid payment');\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "253ff395e5e5fb2066adbc8819cf866d", "score": "0.65989774", "text": "public function listen_for_paypal_ipn() {\n\t\t// Regular PayPal IPN\n\t\tif ( isset( $_GET['pmgw-callback'] ) && $_GET['pmgw-callback'] == 'Opalmembership_Pp_standard_IPN' ) {\n\t\t\tdo_action( 'opalmembership_legacy_paypal_ipn' ); exit;\n\t\t}\n\t}", "title": "" }, { "docid": "da2410d49ea07f1b4ee6484eb4db03ba", "score": "0.6540116", "text": "function ipn(){\n // Paypal posts the transaction data\n $paypalInfo = $this->input->post();\n \n if(!empty($paypalInfo)){\n // Validate and get the ipn response\n $ipnCheck = $this->paypal_lib->validate_ipn($paypalInfo);\n\n // Check whether the transaction is valid\n if($ipnCheck){\n // Insert the transaction data in the database\n $data = array();\n $db_columns = array('payment_gateway','payer_email','payer_id','payer_status','first_name','last_name','address_name','address_street','address_city','address_state','address_country_code','address_zip','residence_country','txn_id','mc_currency','mc_gross','protection_eligibility','payment_gross','payment_status','pending_reason','payment_type','handling_amount','shipping','item_name','item_number','quantity','txn_type','payment_date','notify_version','verify_sign','order_id');\n if ( isset($paypalInfo['payment_status']) ) {\n foreach ($paypalInfo as $key => $value) {\n if(in_array($key, $db_columns)){\n $data[$key] = $value;\n }\n }\n if( !empty($data) ){\n $data['payment_gateway'] = 'paypal';\n $data['report_id'] = $paypalInfo['item_number'];\n $data['order_id'] = $paypalInfo['custom'];\n $transaction_id = $this->Paypal_model->insertTransaction($data);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "6fba3a8d38cfae2befe31e2cd03975db", "score": "0.6512363", "text": "function validate_ipn()\n\t{\n \n\t\t$url_parsed = parse_url($this->paypal_url);\n\n\t\t// generate the post string from the _POST vars aswell as load the\n\t\t// _POST vars into an arry so we can play with them from the calling\n\t\t// script.\n\t\t$post_string = '';\n\tif (isset($_POST))\n {\n foreach ($_POST as $field=>$value)\n { // str_replace(\"\\n\", \"\\r\\n\", $value)\n // put line feeds back to CR+LF as that's how PayPal sends them out\n // otherwise multi-line data will be rejected as INVALID\n\n $value = str_replace(\"\\n\", \"\\r\\n\", $value);\n $this->ipn_data[$field] = $value;\n $post_string .= $field.'='.urlencode(stripslashes($value)).'&';\n\n }\n }\n\n\n\n\t\t$post_string.=\"cmd=_notify-validate\"; // append ipn command\n\n\t\t// open the connection to paypal\n\t\t//$fp = fsockopen($url_parsed['host'],\"443\",$err_num,$err_str,30);\n\t\t//$fp = fsockopen('https://www.sandbox.paypal.com',443,$err_num,$err_str,30);\n\t\t$fp = fsockopen('ssl://www.paypal.com',443,$err_num,$err_str,30);\n\t\tif(!$fp)\n\t\t{\n\t\t\t// could not open the connection. If loggin is on, the error message\n\t\t\t// will be in the log.\n\t\t\t$this->last_error = \"fsockopen error no. $errnum: $errstr\";\n\t\t\t$this->log_ipn_results(false);\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Post the data back to paypal\n\t\t\tfputs($fp, \"POST $url_parsed[path] HTTP/1.1\\r\\n\");\n\t\t\tfputs($fp, \"Host: $url_parsed[host]\\r\\n\");\n\t\t\tfputs($fp, \"Content-type: application/x-www-form-urlencoded\\r\\n\");\n\t\t\tfputs($fp, \"Content-length: \".strlen($post_string).\"\\r\\n\");\n\t\t\tfputs($fp, \"Connection: close\\r\\n\\r\\n\");\n\t\t\tfputs($fp, $post_string . \"\\r\\n\\r\\n\");\n\n\t\t\t// loop through the response from the server and append to variable\n\t\t\twhile(!feof($fp))\n\t\t\t\t$this->ipn_response .= fgets($fp, 1024);\n\n\t\t\tfclose($fp); // close connection\n\t\t}\n\n\t\tif (eregi(\"VERIFIED\",$this->ipn_response))\n\t\t{\n\t\t\t// Valid IPN transaction.\n\t\t\t$this->log_ipn_results(true);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Invalid IPN transaction. Check the log for details.\n\t\t\t$this->last_error = 'IPN Validation Failed.';\n\t\t\t$this->log_ipn_results(false);\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "3ceb3b950640f83a5e2cde6d7d86ee95", "score": "0.64930147", "text": "public static function ipn()\n {\n // only accept post data\n if (Request::method() !== 'POST') return false;\n \n // if production mode...\n if (Config::get('paypal.production_mode'))\n {\n // use production endpoint\n $endpoint = 'https://www.paypal.com/cgi-bin/webscr';\n }\n \n // if sandbox mode...\n else\n {\n // use sandbox endpoint\n $endpoint = 'https://www.sandbox.paypal.com/cgi-bin/webscr';\n }\n \n // build response\n $fields = http_build_query(array('cmd' => '_notify-validate') + Input::all());\n \n // curl request\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $endpoint);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);\n $response = curl_exec($ch);\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n \n // if errors...\n if (curl_errno($ch))\n {\n #$errors = curl_error($ch);\n curl_close($ch);\n \n // return false\n return false;\n }\n \n // if NO errors...\n else\n {\n // close connection\n curl_close($ch);\n \n // if success...\n if ($code === 200 and $response === 'VERIFIED')\n {\n return true;\n }\n \n // if NOT success...\n else\n {\n return false;\n }\n }\n }", "title": "" }, { "docid": "8e38fe6a6998dfe56e054eebb941d26b", "score": "0.64033926", "text": "function wp_aff_validate_ipn() {\n $url_parsed = parse_url($this->paypal_url);\n\n // generate the post string from the _POST vars aswell as load the _POST vars into an arry\n $post_string = '';\n foreach ($_POST as $field => $value) {\n $this->ipn_data[\"$field\"] = $value;\n $post_string .= $field . '=' . urlencode(stripslashes($value)) . '&';\n }\n\n $this->post_string = $post_string;\n $this->debug_log('Post string : ' . $this->post_string, true);\n\n $post_string.=\"cmd=_notify-validate\"; // append ipn command\n // open the connection to paypal\n if ($this->sandbox_mode) {//connect to PayPal sandbox\n $uri = 'ssl://' . $url_parsed['host'];\n $port = '443';\n $fp = fsockopen($uri, $port, $err_num, $err_str, 30);\n } else {//connect to live PayPal site using standard approach\n $fp = fsockopen($url_parsed['host'], \"80\", $err_num, $err_str, 30);\n }\n //$fp = fsockopen($url_parsed['host'],\"80\",$err_num,$err_str,30);\n\n if (!$fp) {\n // could not open the connection. If loggin is on, the error message\n // will be in the log.\n $this->debug_log('Connection to ' . $url_parsed['host'] . \" failed.fsockopen error no. $errnum: $errstr\", false);\n return false;\n } else {\n // Post the data back to paypal\n fputs($fp, \"POST $url_parsed[path] HTTP/1.1\\r\\n\");\n fputs($fp, \"Host: $url_parsed[host]\\r\\n\");\n fputs($fp, \"Content-type: application/x-www-form-urlencoded\\r\\n\");\n fputs($fp, \"Content-length: \" . strlen($post_string) . \"\\r\\n\");\n fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n fputs($fp, $post_string . \"\\r\\n\\r\\n\");\n\n // loop through the response from the server and append to variable\n while (!feof($fp)) {\n $this->ipn_response .= fgets($fp, 1024);\n }\n\n fclose($fp); // close connection\n\n $this->debug_log('Connection to ' . $url_parsed['host'] . ' successfuly completed.', true);\n }\n\n if (eregi(\"VERIFIED\", $this->ipn_response)) {\n // Valid IPN transaction.\n $this->debug_log('IPN successfully verified.', true);\n return true;\n } else {\n // Invalid IPN transaction. Check the log for details.\n $this->debug_log('IPN validation failed.', false);\n return false;\n }\n }", "title": "" }, { "docid": "944472e33bd2b401aeac1e864b7ee0f5", "score": "0.6328851", "text": "public function ipn_link( Request $request ) {\n\n // Check to see if we have been sent a debug IPN.\n if ($debugIPN = $request->get('debugIPN')) {\n $ipn = $debugIPN;\n }\n else {\n // Continue handling for non-debugging mode.\n $ipn = $request->all();\n\n // Start preparing the array to POST back to PayPal to validate the IPN.\n $variables = array('cmd=_notify-validate');\n foreach($ipn as $key => $value) {\n $variables[] = $key .'=' . urlencode($value);\n }\n\n // Next we need to determine the correct PayPal server to respond to.\n if (!empty($ipn['test_ipn']) && $ipn['test_ipn'] == 1) {\n $host = 'https://www.sandbox.paypal.com/cgi-bin/webscr';\n }\n else {\n $host = 'https://www.paypal.com/cgi-bin/webscr';\n }\n\n // Now send back the process request to validate the IPN\n $client = \\Drupal::httpClient();\n try {\n $response = $client->request($host, [ 'data' => implode('&', $variables) ] );\n\n // @TODO: Come back to this when we are setup for testing.\n // we need to update from the old Drupal 7 method of using drupal_http_response.\n // I have not found clear documentation for a upgrade path yet but will soon.\n\n }\n catch ( RequestException $e) {\n watchdog_exception('wembassy_paypal', $e);\n }\n\n }\n\n return [\n '#markup' => print \"Test results:\" . print_r($ipn, true)\n ];\n }", "title": "" }, { "docid": "38ebd0d8f4309cc4381e23e3bed3f294", "score": "0.6154231", "text": "public function validateIpn() {\n\n\t\tif (!count($_POST)) {\n\t\t\tfile_put_contents($this->ipnLogFile, \"Missing POST Data\", FILE_APPEND);\n return false;\n }\n\n $raw_post_data = file_get_contents('php://input');\n $raw_post_array = explode('&', $raw_post_data);\n $myPost = array();\n foreach ($raw_post_array as $keyval) {\n $keyval = explode('=', $keyval);\n if (count($keyval) == 2) {\n // Since we do not want the plus in the datetime string to be encoded to a space, we manually encode it.\n if ($keyval[0] === 'payment_date') {\n if (substr_count($keyval[1], '+') === 1) {\n $keyval[1] = str_replace('+', '%2B', $keyval[1]);\n }\n }\n $myPost[$keyval[0]] = urldecode($keyval[1]);\n }\n }\n // Build the body of the verification post request, adding the _notify-validate command.\n $req = 'cmd=_notify-validate';\n $get_magic_quotes_exists = false;\n if (function_exists('get_magic_quotes_gpc')) {\n $get_magic_quotes_exists = true;\n }\n foreach ($myPost as $key => $value) {\n \t$this->ipnData[\"$key\"] = $value;\n if ($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) {\n $value = urlencode(stripslashes($value));\n } else {\n $value = urlencode($value);\n }\n $req .= \"&$key=$value\";\n }\n\n\t\t// Post the data back to PayPal, using curl. Throw exceptions if errors occur.\n $ch = curl_init($this->gatewayUrlIPN);\n curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $req);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n // This is often required if the server is missing a global cert bundle, or is using an outdated one.\n // curl_setopt($ch, CURLOPT_CAINFO, __DIR__ . \"/cert/cacert.pem\");\n\n curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));\n\n if (!($res = curl_exec($ch))) {\n file_put_contents($this->ipnLogFile, \"Got \" . curl_error($ch) . \" when processing IPN data\", FILE_APPEND);\n curl_close($ch);\n return false;\n }\n\n $info = curl_getinfo($ch);\n $http_code = $info['http_code'];\n if ($http_code != 200) {\n \tfile_put_contents($this->ipnLogFile, \"PayPal responded with http code $http_code\", FILE_APPEND);\n \t\treturn false;\n }\n curl_close($ch);\n\n // Check if PayPal verifies the IPN data, and if so, return true.\n if (strcmp ($res, \"VERIFIED\") == 0) {\n\t\t \t// The IPN is verified, process it\n \treturn true;\n\t\t} else if (strcmp ($res, \"INVALID\") == 0) {\n\t\t \t// IPN invalid, log for manual investigation\n\t\t\t$this->lastError = \"IPN Validation Failed . $urlParsed[path] : $urlParsed[host] : $this->ipnResponse\";\n\t\t\tfile_put_contents($this->ipnLogFile, $this->lastError, FILE_APPEND);\n return false;\n\t\t}\n\n\t}", "title": "" }, { "docid": "1aa08a63f7047bd8e79b595fe31c09f9", "score": "0.61090076", "text": "function paypal_ipn()\n {\n if ($this->paypal->validate_ipn() == true) {\n\n $payment_id = $_POST['custom'];\n $payment = $this->db->get_where('advertisement_payment',array('advertisement_payment_id' => $payment_id))->row();\n\n $data['payment_details'] = json_encode($_POST);\n $data['payment_timestamp'] = time();\n $data['payment_type'] = 'Paypal';\n $data['payment_status'] = 'paid';\n $data['expire'] = 'no';\n switch ($payment->package_id) {\n case '1':\n $data['expire_timestamp'] = $data['payment_timestamp']+604800;\n break;\n case '2':\n $data['expire_timestamp'] = $data['payment_timestamp']+2592000;\n break;\n case '3':\n $data['expire_timestamp'] = $data['payment_timestamp']+15552000;\n break;\n case '4':\n $data['expire_timestamp'] = $data['payment_timestamp']+31536000;\n break;\n\n default:\n $data2['expire_timestamp'] = time();\n break;\n }\n $this->db->where('advertisement_payment_id', $payment_id);\n $this->db->update('advertisement_payment', $data);\n\n $data1['user_id'] = $payment->user_id;\n $data1['availability'] = 'booked';\n $data1['approval'] = 'ok';\n\n $this->db->where('advertisement_id', $payment->advertisement_id);\n $this->db->update('advertisement',$data1);\n $this->Email_model->purchase_packages_for_advertisement($payment_id);\n }\n }", "title": "" }, { "docid": "412029c1d03e09ce0126410faf572f14", "score": "0.60418975", "text": "public function verifyIPN()\n {\n if ( ! count($_POST)) {\n //throw new Exception(\"Missing POST Data\");\n }\n\n $raw_post_data = file_get_contents('php://input');\n $raw_post_array = explode('&', $raw_post_data);\n $myPost = array();\n foreach ($raw_post_array as $keyval) {\n $keyval = explode('=', $keyval);\n if (count($keyval) == 2) {\n // Since we do not want the plus in the datetime string to be encoded to a space, we manually encode it.\n if ($keyval[0] === 'payment_date') {\n if (substr_count($keyval[1], '+') === 1) {\n $keyval[1] = str_replace('+', '%2B', $keyval[1]);\n }\n }\n $myPost[$keyval[0]] = urldecode($keyval[1]);\n }\n }\n\n // Build the body of the verification post request, adding the _notify-validate command.\n $req = 'cmd=_notify-validate';\n $get_magic_quotes_exists = false;\n if (function_exists('get_magic_quotes_gpc')) {\n $get_magic_quotes_exists = true;\n }\n foreach ($myPost as $key => $value) {\n if ($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) {\n $value = urlencode(stripslashes($value));\n } else {\n $value = urlencode($value);\n }\n $req .= \"&$key=$value\";\n }\n\n // Post the data back to PayPal, using curl. Throw exceptions if errors occur.\n $ch = curl_init($this->getPaypalUri());\n curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $req);\n curl_setopt($ch, CURLOPT_SSLVERSION, 6);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n\n // This is often required if the server is missing a global cert bundle, or is using an outdated one.\n if ($this->use_local_certs) {\n curl_setopt($ch, CURLOPT_CAINFO, APP . \"/3rdparty/paypal/cacert.pem\");\n }\n curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));\n $res = curl_exec($ch);\n if ( ! ($res)) {\n $errno = curl_errno($ch);\n $errstr = curl_error($ch);\n curl_close($ch);\n echo(\"cURL error: [$errno] $errstr\");\n }\n\n $info = curl_getinfo($ch);\n $http_code = $info['http_code'];\n if ($http_code != 200) {\n //throw new Exception(\"PayPal responded with http code $http_code\");\n }\n\n curl_close($ch);\n\n // Check if PayPal verifies the IPN data, and if so, return true.\n if ($res == self::VALID) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "d7c44b5ca3bccb8f67ea64974bda49f3", "score": "0.6033163", "text": "function ipn_postback() {\n $info = '';\n $postdata = '';\n $scheme = 'http://';\n if (ENABLE_SSL == 'true') $scheme = 'http://';\n //Parse url\n $web = parse_url($scheme . (defined('MODULE_PAYMENT_paysolutions_HANDLER') ? MODULE_PAYMENT_paysolutions_HANDLER : 'www.paysolutions.com/cgi-bin/webscr'));\n if (isset($_POST['test_ipn']) && $_POST['test_ipn'] == 1) {\n $web = parse_url($scheme . 'www.sandbox.paysolutions.com/cgi-bin/webscr');\n }\n //build post string\n $postdata = '';\n foreach($_POST as $i=>$v) {\n $postdata .= $i . \"=\" . urlencode(stripslashes($v)) . \"&\";\n }\n\n if ($postdata == '=&') {\n ipn_debug_email('IPN FATAL ERROR::No POST data to process -- Bad IPN data');\n return array('info' => $info, 'postdata' => $postdata );\n }\n\n $postdata .= \"cmd=_notify-validate\";\n\n if (MODULE_PAYMENT_paysolutions_TESTING == 'Test') {\n $info = \"VERIFIED\";\n } else {\n //Set the port number\n if($web['scheme'] == \"https\") {\n $web['port']=\"443\"; $ssl=\"ssl://\";\n } else {\n $web['port']=\"80\"; $ssl = \"\";\n }\n\n //Create paysolutions connection\n $fp=@fsockopen($ssl . $web['host'],$web['port'],$errnum,$errstr,30);\n\n if(!$fp) {\n ipn_debug_email('IPN FATAL ERROR::Could not establish fsockopen. Host Details = ' . $ssl . $web['host'] . ':' . $web['port']);\n die();\n }\n\n //Post Data\n fputs($fp, \"POST $web[path] HTTP/1.1\\r\\n\");\n fputs($fp, \"Host: $web[host]\\r\\n\");\n fputs($fp, \"Content-type: application/x-www-form-urlencoded\\r\\n\");\n fputs($fp, \"Content-length: \".strlen($postdata).\"\\r\\n\");\n fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n fputs($fp, $postdata . \"\\r\\n\\r\\n\");\n\n // for debug+certification purposes:\n $postback = \"POST $web[path] HTTP/1.1\\r\\n\";\n $postback .= \"Host: $web[host]\\r\\n\";\n $postback .= \"Content-type: application/x-www-form-urlencoded\\r\\n\";\n $postback .= \"Content-length: \".strlen($postdata).\"\\r\\n\";\n $postback .= \"Connection: close\\r\\n\\r\\n\";\n $postback .= $postdata . \"\\r\\n\\r\\n\";\n\n //loop through the response from the server\n while(!feof($fp)) {\n $info[]=@fgets($fp, 1024);\n }\n\n //close fp - we are done with it\n fclose($fp);\n\n //break up results into a string\n $info = implode(\",\",$info);\n }\n\n ipn_debug_email('IPN INFO - POST VARS received: ' . \"\\n\" . str_replace('&', \" \\n&\", urldecode($postdata)));\n ipn_debug_email('IPN INFO - POST VARS sent back: ' . \"\\n\" . str_replace('&', \" \\n&\", urldecode($postback)));\n ipn_debug_email('IPN INFO - CURL INFO confirmation report ' . \"\\n\" . $info);\n\n\n if (SEND_paysolutions_TRANS_DETAILS == 'Yes') ipn_debug_email('IPN INFO::Transaction Details # ' . $info, '', true);\n\n return array('info' => $info, 'postdata' => $postdata );\n\n }", "title": "" }, { "docid": "c683cc183a3129de8238525c56d87685", "score": "0.601905", "text": "public function stripe_ipn() {\n\n if( !empty($_GET['client_secret']) ) {\n $status = $GLOBALS['stripe_obj']->status;\n\n // canceled == payment was canceled\n // pending == payment method can take up to a few days to be processed\n // chargeable == waiting for bank to process payment\n // failed == canceled by user or due to other reason\n // consumed == completed\n\n ?>\n <div class=\"verifying-payment\">\n <div class=\"wrapper\">\n <svg width=\"84px\" height=\"84px\" viewBox=\"0 0 84 84\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xlink=\"http://www.w3.org/1999/xlink\">\n <circle class=\"border\" cx=\"42\" cy=\"42\" r=\"40\" stroke-linecap=\"round\" stroke-width=\"4\" stroke=\"#000\" fill=\"none\"></circle>\n </svg>\n <div class=\"caption verifying\">\n <div class=\"title\">\n <svg width=\"34px\" height=\"34px\" viewBox=\"0 0 84 84\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xlink=\"http://www.w3.org/1999/xlink\"></svg>\n <span>Verifying payment...</span>\n </div>\n </div>\n </div>\n </div>\n <?php\n die();\n }\n\n if ((isset($_GET['page'])) && ($_GET['page'] == 'super_stripe_ipn')) {\n require_once( 'stripe-php/init.php' );\n // Set your secret key: remember to change this to your live secret key in production\n // See your keys here: https://dashboard.stripe.com/account/apikeys\n \\Stripe\\Stripe::setApiKey('sk_test_CczNHRNSYyr4TenhiCp7Oz05');\n // You can find your endpoint's secret in your webhook settings\n $endpoint_secret = 'whsec_ghatJ98Av3MmvhHiWHZ9DJfaJ8qEGj6n';\n $payload = file_get_contents('php://input');\n //error_log( \"Stripe IPN Payload: \" . json_encode($payload), 0 );\n\n $sig_header = $_SERVER['HTTP_STRIPE_SIGNATURE'];\n $event = null;\n try {\n $event = \\Stripe\\Webhook::constructEvent(\n $payload, $sig_header, $endpoint_secret\n );\n } catch(\\UnexpectedValueException $e) {\n // Invalid payload\n http_response_code(400);\n exit();\n } catch(\\Stripe\\Error\\SignatureVerification $e) {\n // Invalid signature\n http_response_code(400);\n exit();\n }\n\n\n // WebHook responses:\n // source.chargeable - A Source object becomes chargeable after a customer has authenticated and verified a payment. \n // @Todo: Create a Charge.\n\n // source.failed - A Source object failed to become chargeable as your customer declined to authenticate the payment. \n // @Todo: Cancel the order and optionally re-engage the customer in your payment flow.\n\n // source.canceled - A Source object expired and cannot be used to create a charge. \n // @Todo: Cancel the order and optionally re-engage the customer in your payment flow.\n\n // charge.pending - The Charge is pending (asynchronous payments only). \n // @Todo: Nothing to do.\n\n // charge.succeeded - The Charge succeeded and the payment is complete.\n // @Todo: Finalize the order and send a confirmation to the customer over email.\n \n // charge.failed - The Charge has failed and the payment could not be completed.\n // @Todo: Cancel the order and optionally re-engage the customer in your payment flow.\n\n // Handle the event\n do_action( 'super_stripe_' . str_replace('.', '_', $event->type), array( 'event'=>$event ) );\n\n $event = $event->__toArray(true);\n $payload = json_decode($payload, true);\n $metadata = $payload['data']['object']['metadata'];\n\n if($event['type']==='source.chargeable'){\n // A Source object becomes chargeable after a customer has authenticated and verified a payment. \n // @Todo: Create a Charge. Create Transaction\n // @Message: Your order was received and is awaiting payment confirmation.\n\n // Create transaction\n $post = array(\n 'post_status' => 'publish', // 'awaiting_payment_confirmation',\n 'post_type' => 'super_stripe_txn',\n 'post_title' => $event['data']['object']['id'],\n 'post_parent' => absint($metadata['_super_form_id']),\n 'post_author' => absint($metadata['_super_author_id'])\n );\n $post_id = wp_insert_post($post);\n // Right after creating a post, add the post_id to the meta data\n $metadata['_super_txn_id'] = $post_id;\n $count = get_option( 'super_stripe_txn_count', 0 );\n update_option( 'super_stripe_txn_count', ($count+1) );\n // Connect transaction to contact entry if an Entry was created\n if(!empty($metadata['_super_contact_entry_id'])){\n $contact_entry_id = absint($metadata['_super_contact_entry_id']);\n update_post_meta( $contact_entry_id, '_super_contact_entry_stripe_txn_id', $post_id );\n // Update contact entry status after succesfull payment\n if( !empty($settings['stripe_completed_entry_status']) ) {\n update_post_meta( $contact_entry_id, '_super_contact_entry_status', $settings['stripe_completed_entry_status'] );\n }\n }\n // Update post status after succesfull payment (only used for Front-end Posting add-on)\n if( (!empty($settings['stripe_completed_post_status'])) && (!empty($metadata['_super_stripe_post_id'])) ) {\n wp_update_post( \n array(\n 'ID' => absint($metadata['_super_stripe_post_id']),\n 'post_status' => $settings['stripe_completed_post_status']\n )\n );\n }\n // Update user status after succesfull payment (only used for Front-end Register & Login add-on)\n if( (!empty($settings['register_login_action'])) && ($settings['register_login_action']=='register') && (!empty($metadata['_super_stripe_user_id'])) ) {\n $user_id = absint($metadata['_super_stripe_user_id']);\n if( ($user_id!=0) && (!empty($settings['stripe_completed_signup_status'])) ) {\n update_user_meta( $user_id, 'super_user_login_status', $settings['stripe_completed_signup_status'] );\n }\n }\n // Save all transaction data\n add_post_meta( $post_id, '_super_txn_event_data', $event );\n add_post_meta( $post_id, '_super_txn_payload_data', $payload );\n\n // A Source object becomes chargeable after a customer has authenticated and verified a payment. \n // @Todo: Create a Charge.\n // @Message: Your order was received and is awaiting payment confirmation.\n $charge = \\Stripe\\Charge::create([\n\n // amount\n // REQUIRED\n // A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).\n 'amount' => $event['data']['object']['amount'], // e.g: 1099,\n\n // currency\n // REQUIRED\n // Three-letter ISO currency code, in lowercase. Must be a supported currency.\n 'currency' => $event['data']['object']['currency'], // e.g: 'eur',\n\n // application_fee_amount\n // optional\n // A fee in cents that will be applied to the charge and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation.\n //'application_fee_amount' => 1*100,\n\n // capture\n // optional\n // Whether to immediately capture the charge. Defaults to true. When false, the charge issues an authorization (or pre-authorization), and will need to be captured later. Uncaptured charges expire in seven days. For more information, see the authorizing charges and settling later documentation.\n\n // customer\n // optional\n // The ID of an existing customer that will be charged in this request.\n\n // description\n // optional\n // An arbitrary string which you can attach to a Charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the description of the charge(s) that they are describing. This can be unset by updating the value to null and then saving.\n 'description' => '1 year license for Super Forms',\n\n // metadata\n // optional associative array\n // Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.\n // 'metadata' => array(\n // 'custom1' => 'Custom 1',\n // 'custom2' => 'Custom 2',\n // 'custom3' => 'Custom 3'\n // ),\n 'metadata' => $metadata,\n\n // on_behalf_of\n // optional\n // The Stripe account ID for which these funds are intended. Automatically set if you use the destination parameter. For details, see Creating Separate Charges and Transfers.\n\n // receipt_email\n // optional\n // The email address to which this charge’s receipt will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a Customer, the email address specified here will override the customer’s email address. If receipt_email is specified for a charge in live mode, a receipt will be sent regardless of your email settings.\n 'receipt_email' => '[email protected]',\n\n // shipping\n // optional associative array\n // Shipping information for the charge. Helps prevent fraud on charges for physical goods.\n 'shipping' => array(\n 'address' => array(\n 'line1' => 'Korenweg 25',\n 'city' => 'Silvolde',\n 'country' => 'the Netherlands',\n 'line2' => '',\n 'postal_code' => '7064BW',\n 'state' => 'Gelderland'\n ),\n 'name' => 'Rens Tillmann',\n 'carrier' => 'USPS',\n 'phone' => '0634441193',\n 'tracking_number' => 'XXX-XXX-XXXXXX'\n ),\n\n // Hide child arguments\n // shipping.address\n // REQUIRED\n // Shipping address.\n\n // Hide child arguments\n // shipping.address.line1\n // REQUIRED\n // shipping.address.city\n // optional\n // shipping.address.country\n // optional\n // shipping.address.line2\n // optional\n // shipping.address.postal_code\n // optional\n // shipping.address.state\n // optional\n // shipping.name\n // REQUIRED\n // Recipient name. This can be unset by updating the value to null and then saving.\n\n // shipping.carrier\n // optional\n // The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. This can be unset by updating the value to null and then saving.\n\n // shipping.phone\n // optional\n // Recipient phone (including extension). This can be unset by updating the value to null and then saving.\n\n // shipping.tracking_number\n // optional\n // The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. This can be unset by updating the value to null and then saving.\n\n // source\n // optional\n // A payment source to be charged. This can be the ID of a card (i.e., credit or debit card), a bank account, a source, a token, or a connected account. For certain sources—namely, cards, bank accounts, and attached sources—you must also pass the ID of the associated customer.\n 'source' => $event['data']['object']['id'], // e.g: 'src_18eYalAHEMiOZZp1l9ZTjSU0',\n\n // statement_descriptor\n // optional\n // An arbitrary string to be used as the dynamic portion of the full descriptor displayed on your customer’s credit card statement. This value will be prefixed by your account’s statement descriptor. As an example, if your account’s statement descriptor is RUNCLUB and the item you’re charging for is a race ticket, you may want to specify a statement_descriptor of 5K RACE, so that the resulting full descriptor would be RUNCLUB* 5K RACE. The full descriptor may be up to 22 characters. This value must contain at least one letter, may not include <>\"' characters, and will appear on your customer’s statement in capital letters. Non-ASCII characters are automatically stripped. While most banks display this information consistently, some may display it incorrectly or not at all.\n \n // Charges on single-use sources of type `ideal` do not support the `statement_descriptor` attribute. \n // Use the `source[ideal][statement_descriptor]` attribute instead\n //'statement_descriptor' => '1 year license' \n\n // transfer_data\n // optional associative array\n // An optional dictionary including the account to automatically transfer to as part of a destination charge. See the Connect documentation for details.\n\n // Hide child arguments\n // transfer_data.destination\n // REQUIRED\n // ID of an existing, connected Stripe account.\n\n // transfer_data.amount\n // optional\n // The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.\n\n // transfer_group\n // optional\n // A string that identifies this transaction as part of a group. For details, see Grouping transactions.\n\n ]);\n // Check for errors, if any errors where found log them\n if( !empty($charge->error) ) {\n // Delete the post\n wp_delete_post( $post_id, true );\n error_log( \"Stripe Charge Error: \" . $charge->error->message, 0 );\n }\n }else{\n // Update order data\n if(isset($metadata['_super_txn_id'])){\n $post_id = absint($metadata['_super_txn_id']);\n if($post_id!==0){\n // Save all transaction data\n update_post_meta( $post_id, '_super_txn_event_data', $event );\n update_post_meta( $post_id, '_super_txn_payload_data', $payload );\n }\n }\n }\n\n // switch ($event['type']) {\n // case 'source.chargeable':\n // break;\n // // Save Stirpe Transaction t\n // // $contact_entry_id = absint($custom[2]);\n\n // // // Save stripe order ID to contact entry\n // // update_post_meta( $contact_entry_id, '_super_contact_entry_stripe_order_id', $post_id );\n\n // //$event->data->object->metadata\n\n // // if( $_POST['txn_type']=='subscr_signup' ) {\n // // $post_status = 'publish';\n // // $post_type = 'super_stripe_sub';\n // // $post_title = $_POST['subscr_id'];\n // // }else{\n // // $post_status = $_POST['payment_status'];\n // // $post_title = $_POST['txn_id'];\n // // }\n // // $post = array(\n // // 'post_status' => sanitize_text_field($post_status),\n // // 'post_type' => $post_type,\n // // 'post_title' => sanitize_text_field($post_title),\n // // 'post_parent' => absint($custom[0]),\n // // 'post_author' => absint($custom[3])\n // // );\n // // $post_id = wp_insert_post($post);\n // // if(isset($_POST['subscr_id'])){\n // // add_post_meta($post_id, '_super_sub_id', $_POST['subscr_id']);\n // // }\n // // if(isset($_POST['recurring_payment_id'])){\n // // add_post_meta($post_id, '_super_sub_id', $_POST['recurring_payment_id']);\n // // }\n // // add_post_meta( $post_id, '_super_txn_data', $_POST );\n // // if( $_POST['txn_type']=='subscr_signup' ) {\n // // $count = get_option( 'super_stripe_sub_count', 0 );\n // // update_option( 'super_stripe_sub_count', ($count+1) );\n // // }else{\n // // $count = get_option( 'super_stripe_txn_count', 0 );\n // // update_option( 'super_stripe_txn_count', ($count+1) );\n // // }\n // // if( (isset($custom[2])) && ($custom[2]!=0) ) {\n // // $contact_entry_id = absint($custom[2]);\n\n // // // Save stripe order ID to contact entry\n // // update_post_meta( $contact_entry_id, '_super_contact_entry_stripe_order_id', $post_id );\n\n // // // Update contact entry status after succesfull payment\n // // if( !empty($settings['stripe_completed_entry_status']) ) {\n // // update_post_meta( $contact_entry_id, '_super_contact_entry_status', $settings['stripe_completed_entry_status'] );\n // // }\n // // }\n // // // Update post status after succesfull payment (only used for Front-end Posting add-on)\n // // $post_id = absint($custom[4]);\n // // if( ($post_id!=0) && (!empty($settings['stripe_completed_post_status'])) ) {\n // // wp_update_post( \n // // array(\n // // 'ID' => $post_id,\n // // 'post_status' => $settings['stripe_completed_post_status']\n // // )\n // // );\n // // }\n // // // Update user status after succesfull payment (only used for Front-end Register & Login add-on)\n // // if( !empty($settings['register_login_action']) ) {\n // // if( $settings['register_login_action']=='register' ) {\n // // $user_id = absint($custom[5]);\n // // if( ($user_id!=0) && (!empty($settings['stripe_completed_signup_status'])) ) {\n // // update_user_meta( $user_id, 'super_user_login_status', $settings['stripe_completed_signup_status'] );\n // // }\n // // }\n // // }\n // // do_action( 'super_after_stripe_ipn_payment_verified', array( 'post_id'=>$post_id, 'post'=>$_POST ) );\n // case 'source.failed':\n // // A Source object failed to become chargeable as your customer declined to authenticate the payment.\n // // @Todo: Cancel the order and optionally re-engage the customer in your payment flow.\n // // @Message: Your payment failed and your order couldn’t be processed.\n // break;\n // case 'source.canceled':\n // // A Source object expired and cannot be used to create a charge.\n // // @Todo: Cancel the order and optionally re-engage the customer in your payment flow.\n // // @Message: Your payment failed and your order couldn’t be processed.\n // break;\n // case 'source.pending':\n // // @Message: Your order was received and is awaiting payment confirmation.\n // // Occurs whenever a previously uncaptured charge is captured.\n // case 'charge.captured':\n // break;\n // // Occurs whenever an uncaptured charge expires.\n // case 'charge.expired':\n // break;\n // // Occurs whenever a failed charge attempt occurs.\n // case 'charge.failed':\n // // The Charge has failed and the payment could not be completed.\n // // @Todo: Cancel the order and optionally re-engage the customer in your payment flow.\n // // @Message: Your payment failed and your order couldn’t be processed.\n // break;\n // // Occurs whenever a pending charge is created.\n // case 'charge.pending':\n // // The Charge is pending (asynchronous payments only)\n // // @Todo: Nothing to do.\n // // @Message: Your order was received and is awaiting payment confirmation.\n // break;\n // // Occurs whenever a charge is refunded, including partial refunds.\n // case 'charge.refunded':\n // break;\n // // Occurs whenever a new charge is created and is successful.\n // case 'charge.succeeded':\n // // The Charge succeeded and the payment is complete.\n // // @Todo: Finalize the order and send a confirmation to the customer over email.\n // // @Message: Your payment is confirmed and your order is complete.\n // break;\n // // Occurs whenever a charge description or metadata is updated.\n // case 'charge.updated':\n // break;\n // // Occurs when a dispute is closed and the dispute status changes to lost, warning_closed, or won.\n // case 'charge.dispute.closed':\n // break;\n // // Occurs whenever a customer disputes a charge with their bank.\n // case 'charge.dispute.created':\n // break;\n // // Occurs when funds are reinstated to your account after a dispute is closed. This includes partially refunded payments.\n // case 'charge.dispute.funds_reinstated':\n // break;\n // // Occurs when funds are removed from your account due to a dispute.\n // case 'charge.dispute.funds_withdrawn':\n // break;\n // // Occurs when the dispute is updated (usually with evidence).\n // case 'charge.dispute.updated':\n // break;\n // // Occurs whenever a refund is updated, on selected payment methods.\n // case 'charge.refund.updated':\n // break;\n // default:\n // // Unexpected event type\n // error_log( \"Unexpected event type: \" . $event['type'] );\n // http_response_code(400);\n // exit();\n // }\n // error_log( \"Stripe Payment1 \" . json_encode($event->data->object->id), 0 );\n // error_log( \"Stripe Payment2 \" . json_encode((array) $event->data->object), 0 );\n // error_log( \"Stripe Payment3 \" . json_encode((array) $event->data), 0 );\n\n // // For debugging purposes only:\n // SUPER_Common::email( \n // $to = '[email protected]', \n // $from = '[email protected]', \n // $from_name = 'f4d.nl', \n // $custom_reply = false, \n // $reply = '', \n // $reply_name = '', \n // $cc = '',\n // $bcc = '',\n // $subject = 'Stripe Payment ['.$event->type.']',\n // $body = 'Stripe Payment '. $event->type,\n // $settings = array(), \n // $attachments = array(), \n // $string_attachments = array() \n // );\n\n http_response_code(200);\n die();\n }\n }", "title": "" }, { "docid": "366c054ac88023d4ebd6719103177044", "score": "0.60039717", "text": "function paypalSubscriptionIPN()\n {\n $payment_system_name = 'paypal';\n $operation_name = \"purchase\";\n \n exit;\n \n /*FUNC::includeFile(PATH_2_GLOBALS.'modules/payment/events.class.php'); \n $oEvents = new events();\n $oEvents->registerEvent(0, 'paypalSubscriptionIPN response', FUNC::prepare_to_sql(var_export($_POST, true))); \n exit;*/\n \n /*\n FUNC::includeFile(PATH_2_GLOBALS.'modules/payment/paymentSystemOperationFactory.class.php'); \n $oPaymentSystemOperationFactory = new paymentSystemOperationFactory();\n $oPaymentSystemOperation = $oPaymentSystemOperationFactory->createPaymentSystemOperation($payment_system_name, $operation_name);\n \n $res = $oPaymentSystemOperation->recurringOperation();\n */\n \n return;\n }", "title": "" }, { "docid": "c5cfc729de8246636064afc5bdd84ec9", "score": "0.6003305", "text": "public function ipn_pay($order=NULL) {\n\t\t\n $raw_post_data = file_get_contents('php://input');\n $raw_post_array = explode('&', $raw_post_data);\n $myPost = array();\n foreach ($raw_post_array as $keyval) {\n $keyval = explode('=', $keyval);\n if (count($keyval) == 2)\n $myPost[$keyval[0]] = urldecode($keyval[1]);\n }\n $req = 'cmd=_notify-validate';\n if (function_exists('get_magic_quotes_gpc')) {\n $get_magic_quotes_exists = true;\n }\n foreach ($myPost as $key => $value) {\n if ($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) {\n $value = urlencode(stripslashes($value));\n } else {\n $value = urlencode($value);\n }\n $req .= \"&$key=$value\";\n }\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, \"https://www.sandbox.paypal.com/cgi-bin/webscr\");\n curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $req);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));\n $res = curl_exec($ch);\n $err = curl_error($ch);\n if (!($res = curl_exec($ch))) {\n curl_close($ch);\n // redirect and show failure message\n// $err = \"Curl fail\";\n }\n \n\n if (strcmp($res, \"VERIFIED\") == 0) {\n //update transaction and order_status in orders table here \n //$this->checkout_model->update_order($order);\n $text .= \"SUCCESS!\\n\";\n } else if (strcmp($res, \"INVALID\") == 0) {\n $text .= 'FAIL: ' . \"\\n\";\n }\n $text = '[' . date('m/d/Y g:i A') . '] - ';\n $text .= \"IPN POST Vars from Paypal:\\n\";\n \n\t \n\t\t\n\t\t//@@@@@@@@@@@@@@@@@@@@@ ADD USER ID TO RECORD ALSO \n $ipn_data = $_POST;\n foreach ($ipn_data as $key => $value){\n\t\t\t/*if($key == 'txn_id') {\n $txn = $value;\n }*/\n $text .= \"$key=$value\\n \";\n }\n \n //update orders table \n \t/*$emailarr[\"to\"] = \"[email protected]\";\n\t $emailarr[\"subject\"] = \"IPN\";\n\t $emailarr[\"message\"] = $text.'---'.$txn.'------*******************************'.$order;\n\t $this->email_model->sendIndividualEmail($emailarr);*/\n ////////////////////////////////////////////////////////////\n\t\t$data['text'] = $text;\n $log_data = array(\n 'paypal_log_data' => serialize($data),\n 'paypal_log_created' => date('Y-m-d H:i:s'),\n 'user_id' => \"1\",\n 'cause_donations_id' => $order,\n );\n\t\t\n $this->checkout_model->ipn_update_order($order,$_POST['txn_id']);//inside checkout model \n $this->checkout_model->ipn_log_transaction($log_data);//inside checkout model \n }", "title": "" }, { "docid": "fb514aa881e57eefeaa66218628cabca", "score": "0.5997947", "text": "static function ipnCheck($amount=NULL, $currency=NULL, $order_id=NULL,\n $customer_email=NULL, $account_email=NULL)\n {\n global $objDatabase;\n\n//DBG::log(\"ipnCheck($amount, $currency, $order_id, $customer_email, $account_email): Entered\");\n//DBG::log(\"Paypal::ipnCheck(): Checking POST\");\n if ( empty ($_POST['mc_gross'])\n || empty ($_POST['mc_currency'])\n || empty ($_POST['custom'])\n || empty ($_POST['payer_email'])\n || empty ($_POST['business'])) {\n//DBG::log(\"Paypal::ipnCheck(): Incomplete IPN parameter values:\");\n//DBG::log(var_export($_POST, true));\n return false;\n }\n // Copy the post from PayPal and prepend 'cmd'\n $encoded = 'cmd=_notify-validate';\n // Mind: It is absolutely necessary to clear keys not required for\n // the verification. Otherwise, PayPal comes up with... nothing!\n unset ($_POST['section']);\n unset ($_POST['cmd']);\n foreach($_POST as $name => $value) {\n $encoded .= '&'.urlencode($name).'='.urlencode($value);\n }\n//DBG::log(\"Paypal::ipnCheck(): Made parameters: $encoded\");\n// 20120530 cURL version\n $host = (\\Cx\\Core\\Setting\\Controller\\Setting::getValue('paypal_active','Shop')\n ? 'www.paypal.com'\n : 'www.sandbox.paypal.com');\n $uri = 'https://'.$host.'/cgi-bin/webscr?'.$encoded;\n $res = $ch = '';\n if (function_exists('curl_init')) {\n $ch = curl_init();\n }\n if ($ch) {\n curl_setopt($ch, CURLOPT_URL, $uri);\n // Return the received data as a string\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $res = curl_exec($ch);\n if (curl_errno($ch)) {\n//DBG::log(\"Paypal::ipnCheck(): ERROR: cURL: \".curl_errno($ch).\" - \".curl_error($ch));\n return false;\n }\n curl_close($ch);\n } else {\n $res = file_get_contents($uri);\n if (!$res) {\n $res = Socket::getHttp10Response($uri);\n }\n if (!$res) {\n//DBG::log(\"Paypal::ipnCheck(): ERROR: failed to connect to PayPal\");\n return false;\n }\n }\n//DBG::log(\"Paypal::ipnCheck(): PayPal response: $res\");\n if (preg_match('/^VERIFIED/', $res)) {\n//DBG::log(\"Paypal::ipnCheck(): PayPal IPN verification successful (VERIFIED)\");\n return true;\n }\n if (preg_match('/^INVALID/', $res)) {\n // The payment failed.\n//DBG::log(\"Paypal::ipnCheck(): PayPal IPN verification failed (INVALID)\");\n return false;\n }\n//DBG::log(\"Paypal::ipnCheck(): WARNING: PayPal IPN verification unclear (none of the expected results)\");\n return NULL;\n }", "title": "" }, { "docid": "9f2c9463fc12d3009750cee9e3cedc73", "score": "0.59553933", "text": "public function ipnAction(){\n\n\t\t\ttry{\n\n\t\t\t\t/** \n\t\t\t\t * We are only interested in the payment topic, by default\n\t\t\t\t * mercadopago will send both merchant_order and payment.\n\t\t\t\t */\n\n\t\t\t\tif($this->Request()->get('topic') == 'merchant_order'){\n\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\t$pid\t\t\t=\t$this->Request()->get('pid');\n\n\t\t\t\t$response\t=\t$this->getService()\n\t\t\t\t->createIPNResponse($this->Request());\n\n\t\t\t\t$this->savePaymentStatus($pid,$pid,$response->getStatus());\n\n\t\t\t}catch(\\Exception $e){\n\n\t\t\t\tthrow new \\Exception($e->getMessage());\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "00bf0bc4ba17347818568f6dac8fd98e", "score": "0.57232493", "text": "public function ipn(){\n $paypalInfo = $this->input->post();\n\n //$data['user_id'] = $paypalInfo['custom'];\n $data['product_id'] = $_POST[\"item_number\"];\n $data['txn_id'] = $_POST[\"txn_id\"];\n $data['payment_gross'] = $_POST[\"payment_gross\"];\n $data['currency_code'] = $_POST[\"mc_currency\"];\n $data['payer_email'] = $_POST[\"payer_email\"];\n $data['payment_status'] = $_POST[\"payment_status\"];\n\n $paypalURL = $this->paypal_lib->paypal_url; \n $result = $this->paypal_lib->curlPost($paypalURL,$paypalInfo);\n \n //check whether the payment is verified\n if(eregi(\"VERIFIED\",$result)){\n\t\t\t\n\t\t\t$new_deposit = $_POST[\"payment_amount\"];\n\t\t\t$transactionID = $_POST[\"txn_id\"];\n\t\t\t$receiver_email = $_POST[\"receiver_email\"];\n\t\t\t$payer_email = $_POST[\"payer_email\"];\n\t\t\t$payment_status = $_POST[\"payment_status\"];\n\t\t\t$payment_currency = $_POST[\"mc_currency\"];\n\t\t\t\n\t\t\t$mypaypalemail = $this->session->userdata('business_email');;\n\t\t\t\t\t\n\t\t\tif (($payment_status == 'Completed') && ($receiver_email == $mypaypalemail) && ($payment_currency == 'USD') && ($this->Transactions->is_unique_ref($transactionID))) \n\t\t\t{\n\t\t\t\t// do your stuff here... if nothing else you must check that // do your stuff here... if nothing else you must check that $payment_status=='Completed'\n\t\t\t\t//$new_deposit = $this->input->post('amount');\n\t\t\t\t//remove non-numbers from post\n\t\t\t\t$amount = preg_replace(\"/[^\\d-.]+/\",\"\", $new_deposit);\n\t\t\t\t\t\t\t\t\n\t\t\t\t//$maskedPaypal = $this->session->userdata('maskedPaypal');\n\t\t\t\t$maskedPaypal = $this->Paypal_accounts->email_mask($payer_email);\n\t\t\t\t\t\t\t\t\n\t\t\t\t$email_address = $this->session->userdata('email_address');\n\t\t\t\t\t\t\n\t\t\t\t$deposit_date = date('Y-m-d H:i:s');\n\n\t\t\t\t//array of post value from add credit card form\n\t\t\t\t$deposit_data = array(\n\t\t\t\t\t'payment_info' => $maskedPaypal,\n\t\t\t\t\t'deposit_amount' => $amount,\n\t\t\t\t\t'user_email' => $email_address,\n\t\t\t\t\t'deposit_date' => $deposit_date,\n\t\t\t\t);\n\t\t\t\t\t\t\t\n\n\t\t\t\t$trans = array(\n\t\t\t\t\t'reference' => $transactionID,\n\t\t\t\t\t'amount' => '+ $'.number_format($amount, 2),\n\t\t\t\t\t'transaction' => $maskedPaypal,\n\t\t\t\t\t'note' => 'Deposit',\n\t\t\t\t\t'user_email' => $email_address,\n\t\t\t\t\t'date' => $deposit_date,\n\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t//\techo json_encode($result);\n\t\t\t\tif ($this->Deposits->paypal_deposit($amount, $deposit_data, $trans)){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//instant notification div\n\t\t\t\t\t$notification = ' <p>Hello '.$first_name.',</p>';\n\t\t\t\t\t$notification .= '<p>You have successfully added to $'.$amount.' your account!</p>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$this->session->set_flashdata('deposit_message', '<script type=\"text/javascript\" language=\"javascript\">setTimeout(function() { $(\".ccustom-alert-box\").fadeOut(\"slow\"); }, 5000);</script><div class=\"custom-alert-box text-center\"><i class=\"fa fa-check-circle\"></i>'.$notification.'</div>');\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t//send email\n\t\t\t\t\t$ci = get_instance();\n\t\t\t\t\t$ci->load->library('email');\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$config['protocol'] = \"smtp\";\n\t\t\t\t\t$config['validate'] = 'FALSE';\n\t\t\t\t\t$config['smtp_host'] = \"ssl://cp-in-1.webhostbox.net\";\n\t\t\t\t\t$config['smtp_port'] = \"465\";\n\t\t\t\t\t$config['smtp_user'] = \"[email protected]\"; \n\t\t\t\t\t$config['smtp_pass'] = \"1234567\";\n\t\t\t\t\t$config['charset'] = \"utf-8\";\n\t\t\t\t\t$config['mailtype'] = \"html\";\n\t\t\t\t\t$config['newline'] = \"\\r\\n\";\n\n\t\t\t\t\t$ci->email->initialize($config);\n\n\t\t\t\t\t//setup email function\n\t\t\t\t\t$ci->email->from('[email protected]', 'Auto9ja');\n\t\t\t\t\t$ci->email->to($email_address);\n\t\t\t\t\t$this->email->reply_to('[email protected]', 'Auto9ja');\n\t\t\t\t\t$ci->email->subject('PayPal depost');\n\t\t\t\t\t\t\t\n\t\t\t\t\t//$url = 'https://vrqhxykxwa.localtunnel.me/websites/getextra/';\n\t\t\t\t\t//img('assets/images/get.png')\n\t\t\t\t\t//compose email message\n\t\t\t\t\t$message = \"<div style='font-size: 1.0em; border: 1px solid #D0D0D0; border-radius: 3px; margin: 5px; padding: 10px; '>\";\n\t\t\t\t\t$message .= '<div align=\"center\" id=\"logo\"><a href=\"'.base_url().'\" title=\"Auto9ja\"><img src=\"'.base_url('assets/images/logo/logo2.png').'\" ></a></div><br/>';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$message .= '<p>Hello ';\n\t\t\t\t\t$message .= $first_name. ',</p>';\n\t\t\t\t\t$message .= '<p>You have successfully made a deposit of $ '.$amount.' via PayPal.</p>';\n\t\t\t\t\t$message .= '</div>';\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$ci->email->message($message);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$ci->email->send();\n\t\t\t\t\t//End email notification\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//message admin\n\t\t\t\t\t$ci->email->from('[email protected]', 'Auto9ja');\n\t\t\t\t\t$ci->email->to('[email protected]');\n\t\t\t\t\t$this->email->reply_to('[email protected]', 'Auto9ja');\n\t\t\t\t\t$ci->email->subject('Verified IPN');\n\t\t\t\t\t$ci->email->message($listener->getTextReport());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$ci->email->send();\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n //insert the transaction data into the database\n // $this->product->insertTransaction($data);\n }\n }", "title": "" }, { "docid": "f56b104901bda193fe7e14d9bd6bd747", "score": "0.57131124", "text": "function send_response()\r\n {\r\n if ($fp = fsockopen('www.paypal.com', 80, $errno, $errstr, $this->timeout))\r\n {\r\n if (!empty($this->paypal_post_vars) AND is_array($this->paypal_post_vars))\r\n {\r\n foreach ($this->paypal_post_vars AS $key => $value)\r\n {\r\n $values[] = \"$key\" . \"=\" . urlencode(stripslashes($value));\r\n }\r\n \r\n $response = @implode('&', $values);\r\n $response .= '&cmd=_notify-validate';\r\n \r\n fputs($fp, \"POST /cgi-bin/webscr HTTP/1.0\\r\\n\");\r\n fputs($fp, \"Host: https://www.paypal.com\\r\\n\");\r\n fputs($fp, \"User-Agent: \" . USERAGENT .\"\\r\\n\");\r\n fputs($fp, \"Accept: */*\\r\\n\");\r\n fputs($fp, \"Accept: image/gif\\r\\n\");\r\n fputs($fp, \"Accept: image/x-xbitmap\\r\\n\");\r\n fputs($fp, \"Accept: image/jpeg\\r\\n\");\r\n fputs($fp, \"Content-Type: application/x-www-form-urlencoded\\r\\n\");\r\n fputs($fp, \"Content-Length: \" . mb_strlen($response) . \"\\r\\n\\n\");\r\n fputs($fp, \"$response\\n\\r\");\r\n fputs($fp, \"\\r\\n\");\r\n \r\n $this->send_time = time();\r\n $this->paypal_response = ''; \r\n while (!feof($fp))\r\n {\r\n $this->paypal_response .= fgets($fp, 1024);\r\n if ($this->send_time < time() - $this->timeout)\r\n {\r\n $this->error_out('Timed out waiting for a response from PayPal. (' . $this->timeout . ' seconds)');\r\n }\r\n }\r\n fclose($fp);\r\n \r\n // #### WRITE PAYPAL IPN RESPONSE TO LOG FILE IN CACHE FOLDER ######\r\n $fp2 = fopen(DIR_TMP . 'paypal-ipn-' . date('Y-m-d-H-i-s') . '.log', 'a');\r\n fwrite($fp2, \"BEGIN \" . date('Y-m-d h:i:s') . \"\\n\");\r\n fwrite($fp2, \"PAYPAL SENT: \" . $response . \"\\n\");\r\n fwrite($fp2, \"END \" . date('Y-m-d h:i:s') . \"\\n\");\r\n fclose($fp2); \r\n }\r\n }\r\n else\r\n {\r\n $this->error_out('Warning: could not communicate with Paypal.com via PHP function: fsockopen() error: ' . $errstr); \r\n } \r\n }", "title": "" }, { "docid": "b08d0681b8d12580f6f479f7189635d3", "score": "0.56908137", "text": "public function ipnAction()\n {\n try {\n // Retrieves params\n $params = $this->getHelper()->getParams(true);\n if ($params === false) {\n return $this->defaultAction();\n }\n\n // Payment type\n $type = isset($_GET['t']) ? $_GET['t'] : 's';\n switch ($type) {\n case '3':\n $type = 'threetime';\n break;\n case 's':\n default:\n $type = 'standard';\n }\n\n // [3.0.8] Try to retrieve Card from IPN params to process mixed payment methods\n if (array_key_exists('cardType', $params)) {\n\n // [3.0.11] Mixed payment fixes on IPN calls\n // ANCV: Sleep on CB for next payments\n if ('LIMOCB' == $params['cardType']) {\n sleep(6);\n }\n\n $cardType = $this->getHelper()->getRealPaymentMethodName($params['cardType']);\n $method = $this->getHelper()->getPaymentMethod($cardType);\n if (false !== $method) {\n if (isset($method['mixte'])) {\n if (1 == $method['mixte']) {\n $type = 'mixed';\n }\n }\n }\n }\n // [3.0.8] Try to check Z (paymentIndex) param for mixed payments\n if ('mixed' !== $type && array_key_exists('paymentIndex', $params)) {\n if (3 <= strlen($params['paymentIndex'])) {\n // Z=1-2 (Index of payment - Count of payments)\n $indexData = explode('-', $params['paymentIndex']);\n if (1 < count($indexData)) {\n // Check if several payments are expected\n if ('1' <= $indexData[1]) {\n $type = 'mixed';\n\n // [3.0.11] Check if it is an additionnal payment to make it processed after the real mixed one\n $mixedPaymentMethods = $this->getHelper()->getMixedPaymentMethods();\n $isMainMixed = false;\n if (false !== $mixedPaymentMethods) {\n foreach ($mixedPaymentMethods as $mixedPaymentMethod) {\n if ($cardType == $mixedPaymentMethod['type_card']) {\n $isMainMixed = true;\n break;\n }\n }\n }\n\n if (!$isMainMixed) {\n sleep(10);\n }\n }\n }\n }\n }\n\n // Load cart\n $cart = $this->getHelper()->untokenizeCart($params['reference']);\n\n /** [3.0.0] Removal of IPN IP control\n // IP not allowed\n $allowedIps = $this->getConfig()->getAllowedIps();\n $currentIp = $this->getHelper()->getClientIp();\n if (!in_array($currentIp, $allowedIps)) {\n $message = $this->l('IPN call from %s not allowed.');\n $message = sprintf($message, $currentIp);\n $this->logFatal(sprintf('Cart %d: (IPN) %s', $cart->id, $message));\n // TODO no way to associate this message to an order...\n throw new Exception($message);\n }\n */\n\n // Check required parameters\n $requiredParams = array('amount', 'transaction', 'error', 'reference', 'sign', 'date', 'time');\n foreach ($requiredParams as $requiredParam) {\n if (!isset($params[$requiredParam])) {\n $message = sprintf($this->l('Missing %s parameter in Verifone e-commerce call'), $requiredParam);\n $this->logFatal(sprintf('Cart %d: (IPN) %s', $cart->id, $message));\n // TODO no way to associate this message to an order...\n throw new Exception($message);\n }\n }\n\n // Fix context\n $this->context->cart = $cart;\n $this->context->customer = new Customer($cart->id_customer);\n $this->context->language = new Language($cart->id_lang);\n $this->context->shop = new Shop($cart->id_shop);\n $id_currency = (int)$cart->id_currency;\n $this->context->currency = new Currency($id_currency, null, $this->context->shop->id);\n\n if (in_array($params['error'], array('00000', '00200', '00201', '00300', '00301', '00302', '00303'))) {\n if ($this->getHelper()->hasCartLocker($cart->id, $params['transaction'])) {\n $message = sprintf('Cart %d: (IPN) Cart already being validated as order with the transaction %s.', $cart->id, $params['transaction']);\n $this->logDebug($message);\n } else {\n if ($this->getHelper()->createCartLocker($cart->id, $params['transaction'])) {\n // Payment success\n switch ($type) {\n case 'standard':\n $this->getModule()->onStandardIPNSuccess($cart, $params);\n break;\n\n case 'mixed':\n $this->getModule()->onMixedIPNSuccess($cart, $params);\n break;\n\n case 'threetime':\n $this->getModule()->onThreetimeIPNSuccess($cart, $params);\n break;\n\n default:\n $message = $this->l('Unexpected type %s');\n $message = sprintf($message, $type);\n // TODO no way to associate this message to an order...\n throw new Exception($message);\n }\n } else {\n $message = sprintf('Cart %d: (IPN) \"CartLocker\" creation failed, cart probably already being validated as order.', $cart->id);\n $this->logDebug($message);\n }\n }\n } else {\n // Payment refused\n $message = sprintf('Cart %d: (IPN) Payment was refused by Verifone e-commerce (%d).', $cart->id, $params['error']);\n $this->logDebug($message);\n // TODO no way to associate this message to an order...\n }\n } catch (Exception $e) {\n $message = sprintf('(IPN) Exception %s (%s %d).', $e->getMessage(), $e->getFile(), $e->getLine());\n $this->logFatal($message);\n header('Status: 500 Error', true, 500);\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "ef5fe75693c23ef67eff5fe57f6afba3", "score": "0.56383127", "text": "public function receive_clickbank_ipn() {\r\n\t\t\r\n\t\t// Check that the query var is set and is the correct value.\r\n\t\tif (get_query_var( 'clickbank' ) == 'IPN') {\r\n\t\t\t$_POST = stripslashes_deep($_POST);\r\n\t\t\t\r\n\t\t\t// Try to validate the response to make sure it's from clickbank\r\n\t\t\r\n\t\t\tif ($this->clickbank_ipn_verification($_POST)) {\r\n\t\t\t\t$this->process_clickbank_message();\r\n\t\t\t}\r\n\t\t\texit;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e93f0992a51ac298b4d476a1a4c9d303", "score": "0.5511755", "text": "public function getIpnUrl() {\n return $this->_ipnUrl;\n }", "title": "" }, { "docid": "64aa3e4706126ee3604252e11f152cc2", "score": "0.54951906", "text": "public function validateIpn (Request $request)\n {\n try {\n /** @var Ipn $ipn */\n $ipn = \\Coinpayments::validateIPNRequest($request);\n\n\n // if the ipn came from the API side of coinpayments merchant\n if ($ipn->isApi()) {\n\n /*\n * If it makes it into here then the payment is complete.\n * So do whatever you want once the completed\n */\n\n // do something here\n // Payment::find($ipn->txn_id);\n }\n } catch (IpnIncompleteException $e) {\n $ipn = $e->getIpn();\n /*\n * Can do something here with the IPN model if desired.\n */\n }\n }", "title": "" }, { "docid": "39a43944115955242aa138978834b001", "score": "0.54939544", "text": "function incoming_ipn()\n\t{\n\t\t// Send incoming post data if debugging required\n\t\tif ($this->debug_incoming_ipn)\n\t\t{\n\t\t\tob_start();\n\t\t\tprint_r($_POST);\n\t\t\t$msg = ob_get_contents();\n\t\t\tob_end_clean();\n\n\t\t\tee()->load->library('email');\n\t\t\t$debug_to = ($this->debug_email_address == '') ? ee()->config->item('webmaster_email') : $this->debug_email_address;\n\n\t\t\tee()->email->from(ee()->config->item('webmaster_email'),\n\t\t\t\t\t\t\t\t\t\tee()->config->item('site_name'));\n\t\t\tee()->email->to($debug_to);\n\t\t\tee()->email->subject('EE Debug: Incoming IPN Response');\n\t\t\tee()->email->message($msg);\n\t\t\tee()->email->mailtype = ee()->config->item('mail_format');\n\t\t\tee()->email->send();\n\t\t\tee()->email->EE_initialize();\n\n\t\t}\n\n\t\tif (empty($_POST))\n\t\t{\n\t\t\t@header(\"HTTP/1.0 404 Not Found\");\n\t\t\t@header(\"HTTP/1.1 404 Not Found\");\n\t\t\texit('No Data Sent');\n\t\t}\n\t\telseif($this->debug !== TRUE && isset($_POST['test_ipn']) && $_POST['test_ipn'] == 1)\n\t\t{\n\t\t\t@header(\"HTTP/1.0 404 Not Found\");\n\t\t\t@header(\"HTTP/1.1 404 Not Found\");\n\t\t\texit('Not Debugging Right Now');\n\t\t}\n\n\n\t\t$paypal_account = ( ! ee()->config->item('sc_paypal_account')) ? ee()->config->item('webmaster_email') : ee()->config->item('sc_paypal_account');\n\n\t\t/** ----------------------------------------\n\t\t/** Prep, Prep, Prep\n\t\t/** ----------------------------------------*/\n\n\t\tforeach($this->possible_post as $value)\n\t\t{\n\t\t\t$this->post[$value] = '';\n\t\t}\n\n\t\tforeach($_POST as $key => $value)\n\t\t{\n\t\t\t$this->post[$key] = ee('Security/XSS')->clean($value);\n\t\t}\n\n\t\tif ($this->debug === TRUE)\n\t\t{\n\t\t\t$url = ( ! function_exists('openssl_open')) ? 'http://www.sandbox.paypal.com/cgi-bin/webscr' : 'https://www.sandbox.paypal.com/cgi-bin/webscr';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$url = ( ! function_exists('openssl_open')) ? 'http://www.paypal.com/cgi-bin/webscr' : 'https://www.paypal.com/cgi-bin/webscr';\n\t\t}\n\n\t\t/** ----------------------------------------\n\t\t/** Ping Them Back For Confirmation\n\t\t/** ----------------------------------------*/\n\n\t\tif ( function_exists('curl_init'))\n\t\t{\n\t\t\t$result = $this->curl_process($url);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result = $this->fsockopen_process($url);\n\t\t}\n\n\n\t\t/** ----------------------------------------\n\t\t/** Evaluate PayPal's Response\n\t\t/** ----------------------------------------*/\n\n\t\t/* -------------------------------------\n\t\t/* 'simple_commerce_evaluate_ipn_response' hook.\n\t\t/* - Take over processing of PayPal's response to an\n\t\t/* - IPN confirmation\n\t\t/* - Added EE 1.5.1\n\t\t*/\n\t\t\tif (ee()->extensions->active_hook('simple_commerce_evaluate_ipn_response') === TRUE)\n\t\t\t{\n\t\t\t\t$result = ee()->extensions->call('simple_commerce_evaluate_ipn_response', $this, $result);\n\t\t\t\tif (ee()->extensions->end_script === TRUE) return;\n\t\t\t}\n\t\t/*\n\t\t/* -------------------------------------*/\n\n\n\t\tif (stristr($result, 'VERIFIED'))\n\t\t{\n\n\t\t\t// 'subscr_eot' type should be used to cancel the subscription. This is sent when the user's subscription period has expired.\n\t\t\t// subscr_eot is confusing: https://www.x.com/thread/43174\n\t\t\t// http://stackoverflow.com/questions/1061683/subscriptions-with-paypal-ipn\n\n\t\t\t// 'subscr_signup' - subscription bought payment pending\n\t\t\t// Subscription start and end pings have no payment status, so that check not included\n\n\t\t\t// Not our paypal account receiving money, so invalid -\n\t\t\t// and we key off txn_type for our conditional handling\n\n\t\t\tif (trim(strtolower($paypal_account)) != trim(strtolower($this->post['receiver_email'])) OR ! isset($this->post['txn_type']))\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\t// User Valid?\n\t\t\t$query = ee()->db->select('screen_name')\n\t\t\t\t\t\t->where('member_id', $this->post['custom'])\n\t\t\t\t\t\t->get('members');\n\n\t\t\tif ($query->num_rows() == 0) return FALSE;\n\n\t\t\t$this->post['screen_name'] = $query->row('screen_name');\n\n \t\t/** --------------------------------------------\n\t\t\t/** The Subscription Types We Care About\n\t\t\t/** - According to numerous posts around the internet, these are the only two we should really care about\n\t\t\t/** --------------------------------------------*/\n\n\t\t\tif (in_array($this->post['txn_type'], array('subscr_signup', 'subscr_eot', 'subscr_payment')))\n\t\t\t{\n\t\t\t\tif ( ! isset($this->post['subscr_id']))\n\t\t\t\t{\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\n\t \t\t// Successful Subscription Data- send it on!\n \t\t\tif (isset($this->post['item_number']) && $this->post['item_number'] != '')\n \t\t\t{\n \t\t\t\t$this->perform_actions($this->post['item_number'], '', '', '', $this->post['txn_type']);\n \t\t\t}\n \t\t}\n \t\telseif (in_array($this->post['txn_type'], array('cart', 'web_accept')))\n \t\t{\n\n\t\t\t\t// Is this a repeat, perhaps?\n\t\t\t\t// Note- subscription signups do not have a txn_id so we check only non-subscriptions\n\n\t\t\t\tee()->db->where('txn_id', $this->post['txn_id']);\n\t\t\t\tee()->db->from('simple_commerce_purchases');\n\n\t\t\t\tif (ee()->db->count_all_results() > 0) return FALSE;\n\n\t\t\t\t//A regular purchase should be completed at this point\n\t\t\t\tif (trim($this->post['payment_status']) != 'Completed')\n\t\t\t\t{\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\n\t\t\t\tif ($this->post['num_cart_items'] != '' && $this->post['num_cart_items'] > 0 && isset($_POST['item_number1']))\n\t\t\t\t{\n\t\t\t\t\tfor($i=1; $i <= $this->post['num_cart_items']; ++$i)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (($item_id = ee()->input->get_post('item_number'.$i)) !== FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$qnty\t = (isset($_POST['quantity'.$i]) && is_numeric($_POST['quantity'.$i])) ? $_POST['quantity'.$i] : 1;\n\t\t\t\t\t\t\t$subtotal = (isset($_POST['mc_gross_'.$i]) && is_numeric(str_replace('.', '', $_POST['mc_gross_'.$i]))) ? $_POST['mc_gross_'.$i] : 0;\n\n\t\t\t\t\t\t\tif ($subtotal == 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->perform_actions($item_id, $qnty, $subtotal, $i);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif(isset($this->post['item_number']) && $this->post['item_number'] != '' && is_numeric($this->post['mc_gross']) && $this->post['mc_gross'] > 0)\n\t\t\t\t{\n\n\t\t\t\t\t$this->perform_actions($this->post['item_number'], $this->post['quantity'], $this->post['mc_gross']);\n\t\t\t\t}\n\n \t\t}\n \t\telse\n \t\t{\n\t\t\t\treturn FALSE;\n \t\t}\n\n\n\t\t\t/** ------------------------------\n\t\t\t/** Paypal Suggests Sending a 200 OK Response Back\n\t\t\t/** ------------------------------*/\n\n\t\t\t@header(\"HTTP/1.0 200 OK\");\n\t\t\t@header(\"HTTP/1.1 200 OK\");\n\n\t\t\texit('Success');\n\t\t}\n\t\telseif (stristr($result, 'INVALID'))\n\t\t{\n\t\t\t// Error Checking?\n\n\t\t\t@header(\"HTTP/1.0 200 OK\");\n\t\t\t@header(\"HTTP/1.1 200 OK\");\n\n\t\t\texit('Invalid');\n\t\t}\n\t}", "title": "" }, { "docid": "f12ca35b1a618f0551963dca9e08c104", "score": "0.5451581", "text": "public function validateIpn()\n {\n\n }", "title": "" }, { "docid": "c6ac2b5042c235237097975e35f3fdc6", "score": "0.54029197", "text": "function paybox_url_directplus($config){\n\t// pas de sandbox ni de host de repli ?\n\treturn \"https://ppps.paybox.com/PPPS.php\";\n}", "title": "" }, { "docid": "eec06fb3e9a5a8258f5b7e0b2ec95e94", "score": "0.5389747", "text": "public function notify()\n {\n Yii::log('MESSAGE', CLogger::LEVEL_ERROR, \"*** PayPal.php > notify() ***\");\n $logCat = 'paypal';\n $listener = new IpnListener();\n $listener->use_sandbox = PAYPAL_SANDBOX;\n \n try {\n $listener->requirePostMethod();\n // Save RAW data\n $rawPayment = PaymentsRaw::model()->findAllByAttributes(array(\n 'txn_id' => $_POST['txn_id']\n ));\n Yii::log('MESSAGE', CLogger::LEVEL_ERROR, \"Txn (\".$_POST['txn_id'].\") exists? \" . count($rawPayment));\n if (count($rawPayment) == 0) {\n\n \t$rawPayment = new PaymentsRaw();\n $rawPayment->item_name = $_POST['item_name'];\n $rawPayment->item_number = $_POST['item_number'];\n $rawPayment->payment_status = $_POST['payment_status'];\n $rawPayment->payment_amount = $_POST['mc_gross'];\n $rawPayment->payment_currency = $_POST['mc_currency'];\n $rawPayment->txn_id = $_POST['txn_id'];\n $rawPayment->receiver_email = $_POST['receiver_email'];\n $rawPayment->payer_email = $_POST['payer_email'];\n $rawPayment->memberId = $_POST['custom'];\n $rawPayment->payment_fee = $_POST['mc_fee'];\n $rawPayment->payment_type = $_POST['payment_type'];\n $rawPayment->payment_date = $_POST['payment_date'];\n $rawPayment->invoice = $_POST['invoice'];\n $rawPayment->last_name = $_POST['last_name'];\n $rawPayment->first_name = $_POST['first_name'];\n \n $rawPayment->save(false);\n \n Yii::log('MESSAGE', CLogger::LEVEL_ERROR, \"Raw payment info saved\");\n \n /*\n foreach ($_POST as $key => $value){\n\t if ( ($key != 'verify_sign') &&\n\t\t (strstr($key, 'shipping') == FALSE) &&\n\t\t ($key != 'insurance_amount') &&\n\t\t ($key != 'charset') &&\n\t\t ($key != 'tax') &&\n\t\t ($key != 'business') &&\n\t\t ($key != 'notify_version') &&\n\t\t ($key != 'handling_amount') &&\n\t\t ($key != 'transaction_subject') &&\n\t\t ($key != 'payment_gross') &&\n\t\t ($key != 'payment_fee') &&\n\t\t ($key != 'receiver_id') &&\n\t\t ($key != 'payer_id') &&\n\t\t ($key != 'custom') ){\n\t\t \n\t\t $more_detail .= $key . \"=\" .$value .\" \";\n\t }\n }\n \n $rawPayment->more_detail = $more_detail;\n */\n if ($rawPayment->payment_status === 'Completed') {\n\n \tYii::log('MESSAGE', CLogger::LEVEL_ERROR, \"Payment status is '\" . $rawPayment->payment_status).\"'\";\n\n if (isset($rawPayment->invoice)) {\n $tokens = explode(\"-\", $rawPayment->invoice);\n if (count($tokens) > 1)\n $paymentNumber = $tokens[1] + 0;\n else\n $paymentNumber = 1;\n }\n \n // Get the current member\n $member = Member::model()->findByAttributes(array('id'=>$rawPayment->memberId));\n \n $tokens = explode(\"-\", $rawPayment->item_name);\n $pkg_id = $tokens[0];\n $pkg_name = $token[1];\n \n $packages = RefSubscriptionPackage::model()->findAllByAttributes(array('id' => $pkg_id));\n $newStartDate;\n $newEndDate;\n \n \n \n if (isset($member)) {\n \t\n \tYii::log('MESSAGE', CLogger::LEVEL_ERROR, \"Member exists\");\n\n \t$term = $packages[0]->exp_length_in_days;\n $oldEndDate = strtotime($member->subscription_end_date);\n if ($member->subscription_end_date == '0000-00-00 00:00:00') {\n $newStartDate = strtotime(\"now\");\n $newEndDate = strtotime(\"+ \" . $term . \" days\", $newStartDate);\n } else {\n /* Previously was a member */\n $oldEndDate;\n if (strtotime($member->subscription_end_date) > strtotime(\"now\")) {\n $oldEndDate = strtotime($member->subscription_end_date);\n } else {\n $oldEndDate = strtotime(\"now\");\n }\n $newStartDate = strtotime(\"+ 1 day\", $oldEndDate);\n $newEndDate = strtotime(\"+ \" . $term . \" days\", $oldEndDate);\n }\n }\n $subDetails = new SubscriptionDetails();\n $subDetails->member_id = $rawPayment->memberId;\n $subDetails->invoice = $rawPayment->invoice;\n $subDetails->payment_number = $paymentNumber;\n $subDetails->payment_date = date(Yii::app()->params['dbDateFormat']);\n $subDetails->package_name = $rawPayment->item_name;\n $subDetails->payment = $rawPayment->payment_amount;\n $subDetails->start_date = date(Yii::app()->params['dbDateFormat'], $newStartDate);\n $subDetails->end_date = date(Yii::app()->params['dbDateFormat'], $newEndDate);\n $subDetails->coupon_id = $rawPayment->item_number;\n $subDetails->save(false);\n Yii::log('MESSAGE', CLogger::LEVEL_ERROR, \"Subscription details saved\");\n \n $member->step = \"999\";\n $member->subscription_end_date = date(Yii::app()->params['dbDateFormat'], $newEndDate);\n $member->save(false);\n Yii::log('MESSAGE', CLogger::LEVEL_ERROR, \"Member saved\");\n\n if (isset($rawPayment->item_number) && ($rawPayment->item_number != '')) {\n $coupon = RefSubscriptionCoupon::model()->findAllByAttributes(array('id' => $rawPayment->item_number));\n \n if (isset($coupon)) {\n \n \t$coupon->times_used = $coupon->times_used + 1;\n $coupon->last_used_by_mid = $rawPayment->memberId;\n if ($coupon->times_used >= $coupon->max_use) {\n $coupon->active = 'N';\n }\n $coupon->save(false);\n\t\t Yii::log('MESSAGE', CLogger::LEVEL_ERROR, \"Coupon saved\"); \n }\n }\n\n } else {\n Yii::log('invalid ipn', CLogger::LEVEL_ERROR, $logCat);\n }\n }\n }\n catch (Exception $e) {\n Yii::log($e->getMessage(), CLogger::LEVEL_ERROR, $logCat);\n }\n }", "title": "" }, { "docid": "986d9df0b67c9a5e9a6fbdce6852ae41", "score": "0.5360888", "text": "public function setIpnUrl($ipnUrl) {\n $this->_ipnUrl = $ipnUrl;\n\n return $this;\n }", "title": "" }, { "docid": "3534829ad54b2f5c99a9978448c1b284", "score": "0.53568655", "text": "public function execute()\n { //load model\n #/* @var $paymentMethod \\Magento\\Authorizenet\\Model\\DirectPost */\n #$paymentMethod = $this->_objectManager->create('Sslcommerz\\Payment\\Model\\Sslcommerznew');\n\n if (!empty($this->getRequest()->getPostValue())) {\n $data = $this->getRequest()->getPostValue();\n //$resp = $paymentMethod->ipnAction($data);\n //$resp = $this->sslcommerznewData->ipnAction($data);\n $resp = $this->ipnHandler->ipnAction($data);\n\n\n $ipn_log = fopen(\"SSLCOM_IPN_LOG.txt\", \"a+\") or die(\"Unable to open file!\");\n $ipn_result = array('Transaction ID:' => $data['tran_id'], 'Date Time:' => $data['tran_date'], 'Val ID:' => $data['val_id'], 'Amount:' => $data['amount'], 'Card Type:' => $data['card_type'], 'Card Type:' => $data['card_type'], 'Currency:' => $data['currency'], 'Card Issuer:' => $data['card_issuer'], 'Store ID:' => $data['store_id'], 'Status:' => $data['status'], 'IPN Response:' => $resp);\n\n fwrite($ipn_log, json_encode($ipn_result) . PHP_EOL);\n fclose($ipn_log);\n } else {\n echo \"<span align='center'><h2>IPN only accept POST request!</h2>\n <p>Remember, We have set an IPN URL in first step so that your server can listen at the right moment when payment is done at Bank End. So, It is important to validate the transaction notification to maintain security and standard.As IPN URL already set in script. All the payment notification will reach through IPN prior to user return back. So it needs validation for amount and transaction properly.</p></span>\";\n }\n }", "title": "" }, { "docid": "ea8514a55754fc9e010c084958de7c97", "score": "0.53542244", "text": "public function _pdt(){\r\n\t\t$pp_hostname = \"www.sandbox.paypal.com\";\r\n\t\t\r\n\t\t// read the post from PayPal system and add 'cmd'\r\n\t\t$req = 'cmd=_notify-synch';\r\n\t\t\r\n\t\t$tx_token = \"\";\r\n\t\tif (isset($_GET['tx'])){\r\n\t\t\t$tx_token = $_GET['tx'];\r\n\t\t}\r\n\t\t$auth_token = \"IFGVi9E-s_NDPYO4HcifpACcMJuFPOvHoup8QhPe73VlrDLd8zCiFRz15-q\";\r\n\t\t$req .= \"&tx=$tx_token&at=$auth_token\";\r\n\t\t\r\n\t\t$ch = curl_init();\r\n\t\tcurl_setopt($ch, CURLOPT_URL, \"https://$pp_hostname/cgi-bin/webscr\");\r\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\r\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $req);\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\r\n\t\t//set cacert.pem verisign certificate path in curl using 'CURLOPT_CAINFO' field here,\r\n\t\t//if your server does not bundled with default verisign certificates.\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\r\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Host: $pp_hostname\"));\r\n\t\t$result = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\t\t$this->parse_pdt($result);\r\n\t}", "title": "" }, { "docid": "6d2bc81cd3e5c3675409ad57d90de224", "score": "0.53517246", "text": "public function ipn()\n {\n $credentials = new AccountCredentials($this->getParam('email'), $this->getParam('token'));\n\n $type = $_POST['notificationType']; \n $code = $_POST['notificationCode']; \n\n if ($type === 'transaction') { \n $transaction = NotificationService::checkTransaction( \n $credentials,\n $code\n );\n\n $tr = new Box_Payment_Transaction();\n $tr->setIsValid(true);\n $tr->setInvoiceNumber($transaction->getReference());\n $tr->setAmount($transaction->getGrossAmount());\n $tr->setCurrency($this->getParam('currency'));\n\n $status = $transaction->getStatus()->getValue();\n switch ($status) {\n case TransactionStatus::PAID:\n $tr->setPaymentStatus(Box_Payment_Transaction::STATUS_COMPLETE);\n break;\n case TransationStatus::REFUNDED:\n $tr->setPaymentStatus(Box_Payment_Transaction::TXTYPE_REFUND);\n break;\n default:\n $tr->setIsValid(false);\n break;\n }\n\n return $tr;\n }\n }", "title": "" }, { "docid": "a19519325a3ba13488e2476929bd975d", "score": "0.5318016", "text": "public function __construct()\n\t{\n parent::__construct();\n\n // Some default values of the class\n\t\t$this->gatewayUrl = 'https://www.paypal.com/cgi-bin/webscr';\n\t\t$this->gatewayUrlIPN = 'https://ipnpb.paypal.com/cgi-bin/webscr';\n\t\t$this->ipnLogFile = 'paypal.ipn_results.log';\n\n\t\t// Populate $fields array with a few default\n\t\t$this->addField('rm', '2'); // Return method = POST\n\t\t$this->addField('cmd', '_xclick');\n\t}", "title": "" }, { "docid": "e58d64bd61bf75afb63d82081f121f29", "score": "0.53112906", "text": "public function __construct() {\n\t\t$this->PayPalApi = new PayPalApi(true);\n\t}", "title": "" }, { "docid": "b3b462c49e6448db2ad9ea8318f368a3", "score": "0.5308295", "text": "private function processDirectIPN()\n\t{\n\t\ttry {\n\t\t\t/** @var \\Genesis\\API\\Notification $notification */\n\t\t\t$notification = new \\Genesis\\API\\Notification($_POST);\n\n\t\t\tif ( $notification->isAuthentic() ) {\n\t\t\t\t$notification->initReconciliation();\n\n $reconcile = $notification->getReconciliationObject();\n\n\t\t\t\tif (isset($reconcile->unique_id)) {\n\n $transaction = EComProcessingTransaction::getByUniqueId( $reconcile->unique_id );\n\n if (isset( $transaction->id_unique ) && $transaction->id_unique == $reconcile->unique_id) {\n if (in_array($reconcile->transaction_type, $this->types)) {\n $status = $this->module->getPrestaStatus($reconcile->status);\n } else {\n $status = $this->module->getPrestaBackendStatus($reconcile->transaction_type);\n }\n\n $transaction->importResponse( $reconcile );\n $transaction->updateOrderHistory( $status, true );\n $transaction->save();\n }\n\n $notification->renderResponse();\n }\n\t\t\t}\n\t\t}\n\t\tcatch (\\Exception $exception) {\n\t\t\tif (class_exists('Logger')) {\n\t\t\t\tLogger::addLog( $exception->getMessage(), 4, $exception->getCode(), $this->module->displayName, $this->module->id, true );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1b64bccc0ac0d3d467b344b0e145bf7e", "score": "0.5300034", "text": "public function get_id() {\n\t\treturn 'paypal';\n\t}", "title": "" }, { "docid": "61ae65338e7cebe07f38c01681f5d502", "score": "0.52669364", "text": "function ipn(& $BL)\n {\n $sqlSELECT = \"SELECT * FROM {$BL->props->tbl_payment_processors} WHERE `pp_name` ='twocheckout'\";\n $temp = $BL->dbL->executeSELECT($sqlSELECT);\n $pp_vals = $temp[0];\n\n if($pp_vals['tco_params'] != \"Authorize.net\")\n {\n $this->transaction_id = $_POST['order_number'];\n $this->item_number = $_POST['cart_order_id'];\n $this->payment_status = $_POST['credit_card_processed'];\n $ref = $_POST[\"Ref\"];\n $key = $_POST['key'];\n $amount = $_POST[\"total\"];\n }\n else\n {\n $this->transaction_id = $_POST['x_trans_id'];\n $this->item_number = $_POST['x_invoice_num'];\n $this->payment_status = $_POST['x_2checked'];\n $ref = $_POST['x_invoice_num'];\n $key = $_POST['x_MD5_Hash'];\n $amount = $_POST[\"x_amount\"];\n }\n\n $md5hash = md5($pp_vals['tco_secret_word'].$pp_vals['tco_id'].$this->item_number.number_format($amount,2));\n if($this->demo_mode)\n {\n $md5hash = md5($pp_vals['tco_secret_word'].$pp_vals['tco_id'].\"1\".number_format($amount,2));\n }\n\n if ((empty($pp_vals['tco_secret_word']) || strtoupper($key)==strtoupper($md5hash)) && $_POST['gateway'] == \"twocheckout\" && !empty ($this->item_number) && !empty ($this->transaction_id) && ($this->payment_status == \"Y\" || $this->payment_status == \"K\"))\n {\n if ($this->payment_status == \"K\")\n {\n $_POST['skip_auto_creation'] = 1;\n }\n $BL->invoices->processTransaction($this->item_number, $this->transaction_id);\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "390a4170a887d6116c8544e6bda8226c", "score": "0.5247637", "text": "function showVariables($paypal) {\n\n\t//global $paypal;\n\t//print_r($paypal);\n?>\n\t\n\t<!-- PayPal Configuration -->\n\t<input\n\t\ttype=\"hidden\" name=\"business\" value=\"<?php echo $paypal[business]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"cmd\" value=\"<?php echo $paypal[cmd]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"image_url\"\n\t\tvalue=\"<?php echo $paypal[site_url].$paypal[image_url]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"return\"\n\t\tvalue=\"<?php echo $paypal[site_url].$paypal[success_url]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"cancel_return\"\n\t\tvalue=\"<?php echo $paypal[site_url].$paypal[cancel_url]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"notify_url\"\n\t\tvalue=\"<?php echo $paypal[site_url].$paypal[notify_url]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"rm\" value=\"<?php echo $paypal[return_method]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"currency_code\"\n\t\tvalue=\"<?php echo $paypal[currency_code]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"lc\" value=\"<?php echo $paypal[lc]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"bn\" value=\"<?php echo $paypal[bn]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"cbt\"\n\t\tvalue=\"<?php echo $paypal[continue_button_text]; ?>\">\n\t\n\t<!-- Payment Page Information -->\n\t<input\n\t\ttype=\"hidden\" name=\"no_shipping\"\n\t\tvalue=\"<?php echo $paypal[display_shipping_address]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"no_note\"\n\t\tvalue=\"<?php echo $paypal[display_comment]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"cn\" value=\"<?php echo $paypal[comment_header]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"cs\"\n\t\tvalue=\"<?php echo $paypal[background_color]; ?>\">\n\t\n\t<!-- Product Information -->\n\t<input\n\t\ttype=\"hidden\" name=\"item_name\"\n\t\tvalue=\"<?php echo $paypal[item_name]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"amount\" value=\"<?php echo $paypal[amount]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"quantity\" value=\"<?php echo $paypal[quantity]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"item_number\"\n\t\tvalue=\"<?php echo $paypal[item_number]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"undefined_quantity\"\n\t\tvalue=\"<?php echo $paypal[edit_quantity]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"on0\" value=\"<?php echo $paypal[on0]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"os0\" value=\"<?php echo $paypal[os0]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"on1\" value=\"<?php echo $paypal[on1]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"os1\" value=\"<?php echo $paypal[os1]; ?>\">\n\t\n\t<!-- Shipping and Misc Information -->\n\t<input\n\t\ttype=\"hidden\" name=\"shipping\"\n\t\tvalue=\"<?php echo $paypal[shipping_amount]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"shipping2\"\n\t\tvalue=\"<?php echo $paypal[shipping_amount_per_item]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"handling\"\n\t\tvalue=\"<?php echo $paypal[handling_amount]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"tax\" value=\"<?php echo $paypal[tax]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"custom\"\n\t\tvalue=\"<?php echo $paypal[custom_field]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"invoice\" value=\"<?php echo $paypal[invoice]; ?>\">\n\t\n\t<!-- Customer Information -->\n\t<input\n\t\ttype=\"hidden\" name=\"first_name\"\n\t\tvalue=\"<?php echo $paypal[firstname]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"last_name\" value=\"<?php echo $paypal[lastname]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"address1\" value=\"<?php echo $paypal[address1]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"address2\" value=\"<?php echo $paypal[address2]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"city\" value=\"<?php echo $paypal[city]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"state\" value=\"<?php echo $paypal[state]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"zip\" value=\"<?php echo $paypal[zip]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"email\" value=\"<?php echo $paypal[email]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"night_phone_a\"\n\t\tvalue=\"<?php echo $paypal[phone_1]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"night_phone_b\"\n\t\tvalue=\"<?php echo $paypal[phone_2]; ?>\">\n\t<input\n\t\ttype=\"hidden\" name=\"night_phone_c\"\n\t\tvalue=\"<?php echo $paypal[phone_3]; ?>\">\n\n<?php\n}", "title": "" }, { "docid": "7a684d0abd70c9b100468a33ba309cb2", "score": "0.52193224", "text": "public function processIpnRequest()\n {\n $this->addDebugData('ipn', $this->getRequestData());\n $this->builder->setQuoteAsOrder($this->getQuote());\n $this->validateNotificationRequest();\n try {\n switch ($this->getRequestData('sq_state')) {\n case 'needs_review':\n if (!$this->onHoldInSequra()) {\n return;\n }\n $this->createOrderFromQuote();\n $this->setOrderInPaymentReview();\n $this->sendOrderRefToSequra();\n break;\n case 'approved':\n if (!$this->approvedInSequra()) {\n return;\n }\n if (!$this->orderAlreadyExists()) {\n $this->createOrderFromQuote();\n $this->sendOrderRefToSequra();\n }\n $this->processOrder();\n break;\n }\n } catch (Exception $e) {\n $this->addDebugData('exception', $e->getMessage());\n $this->debug();\n throw $e;\n }\n $this->debug();\n }", "title": "" }, { "docid": "5351a08a243fcda37e71dcc5a377c5cb", "score": "0.52174205", "text": "public function paypal_setup()\n\t{\n\t\tglobal $template;\n\t\t// Assign the variables to the template (MVC)\n\t\t$template->assign_vars(array(\n\t\t\t'S_DONATE_ACTION' => $this->u_paypal,\n\t\t\t'S_HIDDEN_FIELDS' => build_hidden_fields($this->fields),\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "7664cd659011686ba89e9e6da0bcc05c", "score": "0.5210912", "text": "private function _paypal_nvp_call ($methodName,$nvpStr)\n {\n if (isset($_REQUEST['ken_debug'])\n || ($this->flavor == 'reference'))\n {\n $err_msg = \"\\n\\nEnter _paypal_nvp_call with \"\n .\"\\n\\n **** methodName = \".var_export($methodName, TRUE)\n .\"\\n\\n **** nvpStr = \".var_export($nvpStr, TRUE);\n watchdog('ken_debug',$err_msg.\"\\n\\n\\n\");\n }\n\n // form header string\n $this->nvpheader=$this->_nvpHeader();\n //setting the curl parameters.\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL,$this->endpoint);\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n\n //turning off the server and peer verification(TrustManager Concept).\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n curl_setopt($ch, CURLOPT_POST, 1);\n\n\n $nvpStr=$this->nvpheader.$nvpStr;\n\n //check if version is included in $nvpStr else include the version.\n if(strlen(str_replace('VERSION=', '', strtoupper($nvpStr))) == strlen($nvpStr)) {\n $nvpStr = \"&VERSION=\" . urlencode($this->version) . $nvpStr;\n }\n\n $nvpreq=\"METHOD=\".urlencode($methodName).$nvpStr;\n\n if (isset($_REQUEST['ken_debug'])\n || ($this->flavor == 'reference'))\n {\n $err_msg = \"\\n\\nIn _paypal_nvp_call about to curl \"\n .\"\\n\\n **** nvpreq = \".var_export($nvpreq, TRUE)\n .\"\\n\\n **** nvpStr = \".var_export($nvpStr, TRUE);\n watchdog('ken_debug',$err_msg.\"\\n\\n\\n\");\n }\n\n\n\n //setting the nvpreq as POST FIELD to curl\n curl_setopt($ch,CURLOPT_POSTFIELDS,$nvpreq);\n\n //getting response from server\n $response = curl_exec($ch);\n\n if (curl_errno($ch) == 60) {\n\n curl_setopt($ch, CURLOPT_CAINFO,\n dirname(__FILE__) . '/cacert.pem');\n $response = curl_exec($ch);\n }\n\n //converting NVPResponse to an Associative Array\n $resArray=$this->_deformatNVP($response);\n $reqArray=$this->_deformatNVP($nvpreq);\n $this->reqArray=$reqArray;\n $this->resArray=$resArray;\n\n if (curl_errno($ch)) {\n // capture and log the curl error.\n $this->curl_error_number['curl_error_no']=curl_errno($ch) ;\n $this->curl_error_message['curl_error_msg']=curl_error($ch);\n $log_message =\n \"Curl error \"\n .($this->curl_error_message['curl_error_no'])\n .\": \"\n .($this->curl_error_message['curl_error_msg'])\n ;\n if (isset($_REQUEST['ken_debug'])\n || ($this->id == 'tycoon_cc_pay_paypal_reference'))\n { watchdog('ken_debug','\\n\\n**** Curl log message ='.$log_message);\n }\n //\t\t watchdog('curl', $log_message);\n return NULL;\n\n } else {\n //closing the curl\n curl_close($ch);\n }\n\n if (isset($_REQUEST['ken_debug'])\n || ($this->flavor == 'reference')){\n watchdog('ken_debug',$methodName.\" Results: \".var_export($resArray,true));\n }\n\n $this->paypal_nvp_ack = strtoupper($resArray[\"ACK\"]);\n\n if($this->paypal_nvp_ack == 'SUCCESS' || $this->paypal_nvp_ack == 'SUCCESSWITHWARNING'){\n return $resArray;\n }\n else {\n // Paypal returned an error, Set the paypal error array\n $this->paypal_nvp_error['ack'] = $resArray['ACK'];\n $this->paypal_nvp_error['timestamp'] = $resArray['TIMESTAMP'];\n for ($i = 0; $i < 10; $i++) {\n if (isset($resArray['L_ERRORCODE'.$i])) {\n $this->paypal_nvp_error['error'][$i]['code'] = $resArray['L_ERRORCODE'.$i];\n $this->paypal_nvp_error['error'][$i]['short_message'] = $resArray['L_SHORTMESSAGE'.$i];\n $this->paypal_nvp_error['error'][$i]['long_message'] = $resArray['L_LONGMESSAGE'.$i];\n $this->paypal_nvp_error['error'][$i]['severity'] = $resArray['L_SEVERITYCODE'.$i];\n if(isset($resArray['L_ERRORPARAMID'.$i])) {\n $this->paypal_nvp_error['error'][$i]['param_id'] = $resArray['L_ERRORPARAMID'.$i];\n $this->paypal_nvp_error['error'][$i]['param_value'] = $resArray['L_ERRORPARAMVALUE'.$i];\n }\n $log_message = $this->paypal_nvp_error['error'][$i]['code'].\" -- \".$this->paypal_nvp_error['error'][$i]['short_message'];\n if (isset($_REQUEST['ken_debug'])){ watchdog('ken_debug',$log_message); }\n //\t\t watchdog('paypal', $log_message);\n }\n }\n\n return NULL;\n }\n\n\n return $resArray;\n }", "title": "" }, { "docid": "77a133795d9dd7e04c8ace218d2d325c", "score": "0.51922446", "text": "function hash_call($methodName,$nvpStr, $membership)\r\n {\r\n global $API_Endpoint, $version, $API_UserName, $API_Password, $API_Signature;\r\n global $USE_PROXY, $PROXY_HOST, $PROXY_PORT;\r\n global $gv_ApiErrorURL;\r\n global $sBNCode;\r\n global $PAYPAL_URL;\r\n\r\n $PROXY_HOST = '127.0.0.1';\r\n $PROXY_PORT = '808';\r\n\r\n $SandboxFlag = true;\r\n\r\n //'------------------------------------\r\n //' PayPal API Credentials\r\n //' Replace <API_USERNAME> with your API Username\r\n //' Replace <API_PASSWORD> with your API Password\r\n //' Replace <API_SIGNATURE> with your Signature\r\n //'------------------------------------\r\n $API_UserName=$membership->apiuser;\r\n $API_Password=$membership->apipassword;\r\n $API_Signature=$membership->apisignature;\r\n\r\n // BN Code \tis only applicable for partners\r\n $sBNCode = \"PP-ECWizard\";\r\n\r\n\r\n /*\t\r\n ' Define the PayPal Redirect URLs. \r\n ' \tThis is the URL that the buyer is first sent to do authorize payment with their paypal account\r\n ' \tchange the URL depending if you are testing on the sandbox or the live PayPal site\r\n '\r\n ' For the sandbox, the URL is https://www.sandbox.paypal.com/webscr&cmd=_express-checkout&token=\r\n ' For the live site, the URL is https://www.paypal.com/webscr&cmd=_express-checkout&token=\r\n */\r\n\r\n if ($SandboxFlag == true) \r\n {\r\n $API_Endpoint = \"https://api-3t.sandbox.paypal.com/nvp\";\r\n $PAYPAL_URL = \"https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token=\";\r\n }\r\n else\r\n {\r\n $API_Endpoint = \"https://api-3t.paypal.com/nvp\";\r\n $PAYPAL_URL = \"https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=\";\r\n }\r\n\r\n $USE_PROXY = false;\r\n $version=\"64\";\r\n\r\n\r\n //setting the curl parameters.\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL,$API_Endpoint);\r\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\r\n\r\n //turning off the server and peer verification(TrustManager Concept).\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\r\n\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\r\n curl_setopt($ch, CURLOPT_POST, 1);\r\n\r\n //if USE_PROXY constant set to TRUE in Constants.php, then only proxy will be enabled.\r\n //Set proxy name to PROXY_HOST and port number to PROXY_PORT in constants.php \r\n if($USE_PROXY)\r\n curl_setopt ($ch, CURLOPT_PROXY, $PROXY_HOST. \":\" . $PROXY_PORT); \r\n\r\n //NVPRequest for submitting to server\r\n $nvpreq=\"METHOD=\" . urlencode($methodName) . \"&VERSION=\" . urlencode($version) . \"&PWD=\" . urlencode($API_Password) . \"&USER=\" . urlencode($API_UserName) . \"&SIGNATURE=\" . urlencode($API_Signature) . $nvpStr . \"&BUTTONSOURCE=\" . urlencode($sBNCode);\r\n\r\n var_dump($nvpreq);\r\n //setting the nvpreq as POST FIELD to curl\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);\r\n\r\n //getting response from server\r\n $response = curl_exec($ch);\r\n\r\n //convrting NVPResponse to an Associative Array\r\n $nvpResArray=$this->deformatNVP($response);\r\n $nvpReqArray=$this->deformatNVP($nvpreq);\r\n $_SESSION['nvpReqArray']=$nvpReqArray;\r\n\r\n if (curl_errno($ch)) \r\n {\r\n // moving to display page to display curl errors\r\n $_SESSION['curl_error_no']=curl_errno($ch) ;\r\n $_SESSION['curl_error_msg']=curl_error($ch);\r\n\r\n //Execute the Error handling module to display errors. \r\n } \r\n else \r\n {\r\n //closing the curl\r\n curl_close($ch);\r\n }\r\n\r\n return $nvpResArray;\r\n }", "title": "" }, { "docid": "3922c9ec14ed5cbaf4c688c4ce277c67", "score": "0.5167872", "text": "protected function getPayPal($url){\n return $this->callPayPal($url);\n}", "title": "" }, { "docid": "59901919f455ebfd960fe4793c109c32", "score": "0.5157991", "text": "function ipn(& $BL)\n {\n $this->item_number = $_POST['x_invoice_num'];\n $this->transaction_id = $_POST['x_trans_id'];\n $this->payment_status = $_POST['x_response_code'];\n $verifyamount = $BL->verifyAmount($this->item_number,$_POST[\"x_amount\"]);\n if (!empty ($this->item_number) && !empty ($this->transaction_id) && $this->payment_status == 1 && $verifyamount && $_POST['gateway'] == \"Authorizenet\")\n {\n $BL->invoices->processTransaction($this->item_number, $this->transaction_id);\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "13b51e1a01991b5fc2313688e9eae114", "score": "0.5150295", "text": "private function __sendVerifyRequest(){\n\n\t\t$req = 'cmd=_notify-validate';\n\t\t\n\t\tforeach ($this->paymentData as $key => $value) {\n\t\t\t$value = urlencode($value);\n\t\t\t$req .= \"&$key=$value\";\n\t\t}\n\n\t\ttry {\n\t\t\t$Responce = $this->Downloader->request('Post', $this->_verifyUrl,\n\t\t\t\t[\n\t\t\t\t\t'headers' => [\n\t\t\t\t\t\t'User-Agent: PHP-IPN-Verification-Script',\n\t\t\t\t\t\t'Connection: Close',\n\t\t\t\t\t],\n\t\t\t\t\t'query' => $req\n\t\t\t\t]);\n\n\t\t\tif ($Responce->getStatusCode() != 200) {\n\t\t\t\tthrow new Exception(\"PayPal responded with http code \" . $Responce->getHeader());\n\t\t\t}\n\t\t} catch (AppException $e) {\n\t\t\tL::error($e->getMessage(), $this->log);\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($Responce->getBody()->getContents() == self::VALID_IPN) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "0804432967fa8be2ec3b625f303b386f", "score": "0.5119185", "text": "private function getPaypalResponse(string $form_data):string{\n // Without this step anyone can fake IPN data\n if(Config::get('IsSandbox') == true) {\n $paypal_url = Config::get('test_url');\n } else {\n $paypal_url = Config::get('prod_url');\n }\n $ch = curl_init($paypal_url);\n if ($ch == FALSE) {\n return FALSE;\n }\n curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $form_data);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);\n if(DEBUG == true) {\n curl_setopt($ch, CURLOPT_HEADER, 1);\n curl_setopt($ch, CURLINFO_HEADER_OUT, 1);\n }\n // CONFIG: Optional proxy configuration\n //curl_setopt($ch, CURLOPT_PROXY, $proxy);\n //curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);\n // Set TCP timeout to 30 seconds\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));\n // CONFIG: Please download 'cacert.pem' from \"http://curl.haxx.se/docs/caextract.html\" and set the directory path\n // of the certificate as shown below. Ensure the file is readable by the webserver.\n // This is mandatory for some environments.\n //$cert = __DIR__ . \"./cacert.pem\";\n //curl_setopt($ch, CURLOPT_CAINFO, $cert);\n $res = curl_exec($ch);\n if (curl_errno($ch) != 0) // cURL error\n {\n if(DEBUG == true) {\t\n error_log(date('[Y-m-d H:i e] '). \"Can't connect to PayPal to validate IPN message: \" . curl_error($ch) . PHP_EOL, 3, LOG_FILE);\n }\n curl_close($ch);\n exit;\n } else {\n // Log the entire HTTP response if debug is switched on.\n if(DEBUG == true) {\n error_log(date('[Y-m-d H:i e] '). \"HTTP request of validation request:\". curl_getinfo($ch, CURLINFO_HEADER_OUT) .\" for IPN payload: $form_data\" . PHP_EOL, 3, LOG_FILE);\n error_log(date('[Y-m-d H:i e] '). \"HTTP response of validation request: $res\" . PHP_EOL, 3, LOG_FILE);\n }\n curl_close($ch);\n }\n // Inspect IPN validation result and act accordingly\n // Split response headers and payload, a better way for strcmp\n \n $tokens = explode(\"\\r\\n\\r\\n\", trim($res));\n return (trim(end($tokens)));\n }", "title": "" }, { "docid": "336635bf7eaa2ec731daf9602bb3bf87", "score": "0.51183426", "text": "function get_address()\n {\n if($this->isTest == TRUE)\n {\n return 'www.sandbox.paypal.com';\n } \n else \n {\n return 'www.paypal.com';\n }\n }", "title": "" }, { "docid": "2d553663d76a5f0d8fe9ff31f71b0500", "score": "0.5112365", "text": "public function ipn(SS_HTTPRequest $request) {\n\t\tif ($request->isPost()) {\n\t\t\tif (ClickBankManager::validate_ipn_request($request->postVars())) {\n\t\t\t\tClickBankManager::process_ipn_request($request->postVars());\n\t\t\t\treturn Director::get_status_code();\n\t\t\t}\n\t\t}\n\t\treturn ErrorPage::response_for(404); \t\t\n\t}", "title": "" }, { "docid": "d2dd745b245b05776185f7fbf35066b0", "score": "0.51102585", "text": "function plugin_autoinstall_paypal($pi_name)\n{\t\n $pi_name = 'paypal';\n $pi_display_name = 'Paypal';\n $pi_admin = $pi_display_name . ' Admin';\n $pi_user = $pi_display_name . ' User';\n $pi_viewer = $pi_display_name . ' Viewer';\n\t\n $info = array(\n 'pi_name' => $pi_name,\n 'pi_display_name' => $pi_display_name,\n 'pi_version' => '1.6.2',\n 'pi_gl_version' => '1.8.0',\n 'pi_homepage' => 'http://www.geeklog.fr'\n );\n\n $groups = array(\n $pi_admin => 'Users in this group can administer the '\n . $pi_display_name . ' plugin',\n\t\t$pi_user => 'Users in this group can access to the '\n . $pi_display_name . ' plugin',\n\t\t$pi_viewer => 'Users in this group can view the '\n . $pi_display_name . ' plugin'\n );\n\n $features = array(\n $pi_name . '.admin' => 'Full access to ' . $pi_display_name\n . ' plugin',\n $pi_name . '.user' => 'People who can shop with the ' . $pi_display_name\n . ' plugin',\n $pi_name . '.viewer' => 'People who can browse (but not buy) with the ' . $pi_display_name\n . ' plugin',\n );\n\n $mappings = array(\n $pi_name . '.admin' => array($pi_admin),\n $pi_name . '.user' => array($pi_admin, $pi_user),\t\t\n $pi_name . '.viewer' => array($pi_admin, $pi_user, $pi_viewer),\n\n\t);\n\t\n $tables = array(\n 'paypal_ipnlog',\n\t\t'paypal_downloads',\n\t\t'paypal_products',\n\t\t'paypal_purchases',\n\t\t'paypal_images',\n\t\t'paypal_categories',\n\t\t'paypal_subscriptions',\n\t\t'paypal_users',\n\t\t'paypal_attributes',\n\t\t'paypal_attribute_type',\n\t\t'paypal_product_attribute',\n\t\t'paypal_stock',\n\t\t'paypal_delivery',\n\t\t'paypal_stock_movements',\n\t\t'paypal_providers',\n\t\t'paypal_shipper_service',\n\t\t'paypal_shipping_to',\n\t\t'paypal_shipping_cost',\n\t\t'paypal_recurrent',\n );\n\n $inst_parms = array(\n 'info' => $info,\n 'groups' => $groups,\n 'features' => $features,\n 'mappings' => $mappings,\n 'tables' => $tables\n );\n\n return $inst_parms;\n}", "title": "" }, { "docid": "2e6b9b157f7e0ab4894166bd243bfa85", "score": "0.5102199", "text": "public function getIPN() {\n\t\treturn $this->IPN;\n\t}", "title": "" }, { "docid": "91985af40695385beb0c9814d5e84d99", "score": "0.50887734", "text": "public function IPN()\n {\n $arr = &$this->dataArr;\n $arr = Yii::$app->request->post();\n\n foreach ($this->IPNcell as $name) {\n if (!isset($arr[$name])) {\n die(\"Incorrect data\");\n }\n }\n\n $hash = $arr[\"HASH\"];\n\n unset($arr[\"HASH\"]);\n\n $sign = $this->Signature($arr);\n\n if ($hash != $sign) {\n die(\"Incorrect hash\");\n }\n\n $datetime = date(\"YmdHis\");\n $sign = $this->Signature([\n \"IPN_PID\" => $arr[\"IPN_PID\"][0],\n \"IPN_PNAME\" => $arr[\"IPN_PNAME\"][0],\n \"IPN_DATE\" => $arr[\"IPN_DATE\"],\n \"DATE\" => $datetime\n ]);\n $this->answer = \"<!-- <EPAYMENT>$datetime|$sign</EPAYMENT> -->\";\n\n return $this;\n }", "title": "" }, { "docid": "999869461747e6d26828cb6b6d5bb913", "score": "0.50813705", "text": "public function __construct()\n\t{\n\t\tglobal $plugin_config;\n\n\t\t// Set the PayPal URL depending on if the board is using the PayPal sandbox (used for debugging and testing)\n\t\t//$this->u_paypal = ($plugin_config['donations_paypal_sandbox'] || $plugin_config['donations_debug']) ? 'http://www.sandbox.paypal.com/cgi-bin/webscr' : 'http://www.paypal.com/cgi-bin/webscr';\n\t\t$this->u_paypal = ($plugin_config['donations_paypal_sandbox'] || $plugin_config['donations_debug']) ? 'https://www.sandbox.paypal.com/cgi-bin/webscr' : 'https://www.paypal.com/cgi-bin/webscr';\n\t\t$this->u_paypal_ver = ($plugin_config['donations_paypal_sandbox'] || $plugin_config['donations_debug']) ? 'https://www.sandbox.paypal.com/cgi-bin/webscr' : 'https://www.paypal.com/cgi-bin/webscr';\n\n\t\t$this->obtain_exchange_data();\n\t\t$this->currency = $this->currency_data();\n\t}", "title": "" }, { "docid": "34d5fee9d5464c41263b859c6368504e", "score": "0.50731647", "text": "public function __construct()\n {\n // unfortunately, the PayPal API was not made for PHP 5\n // so, we need to disable some error checks\n error_reporting(E_ERROR | E_WARNING | E_PARSE);\n \n // append the PayPal API base dir to the include path\n ini_set('include_path', ini_get('include_path').PATH_SEPARATOR\n .sfConfig::get('sf_lib_dir').'/vendor/PayPal/');\n \n require_once 'PayPal.php';\n require_once 'PayPal/Profile/Handler/Array.php';\n require_once 'PayPal/Profile/API.php';\n }", "title": "" }, { "docid": "ecb8525fc79b31b8e9a368f73187644c", "score": "0.5062884", "text": "protected function _initIp()\n\t{\n\t\t$ipInfo = new Varien_Object();\n\t\tif ($ip = $this->getrequest()->getParam('ip')) {\n\t\t\t$info = Mage::helper('cecropia_advancedoc/geoloc')->getInfoByIp($ip);\n\t\t\t$ipInfo->setXmlInfo($info);\n\t\t}\n\t\t\n\t\tMage::register('ip_info', $ipInfo);\n\t}", "title": "" }, { "docid": "d1cb01d9a313195b06badba3aaeeaf79", "score": "0.50573826", "text": "function get_payPalURL(){\n return $this->payPalURL;\n }", "title": "" }, { "docid": "e9fc1c7ff5c5b986c4bbfdf19509aad3", "score": "0.5055424", "text": "public function processIpnRequest(array $request, Zend_Http_Client_Adapter_Interface $httpAdapter = null)\r\n {\r\n\t\tMage::log('process IPN Request',null,'vendorspaypal.log');\r\n $this->_request = $request;\r\n $this->_debugData = array('ipn' => $request);\r\n ksort($this->_debugData['ipn']);\r\n\r\n try {\r\n if (isset($this->_request['txn_type']) && 'recurring_payment' == $this->_request['txn_type']) {\r\n $this->_getRecurringProfile();\r\n if ($httpAdapter) {\r\n $this->_postBack($httpAdapter);\r\n }\r\n $this->_processRecurringProfile();\r\n } else {\r\n $this->_getOrders();\r\n if ($httpAdapter) {\r\n $this->_postBack($httpAdapter);\r\n }\r\n\t\t\t\tMage::log('Process order',null,'vendorspaypal.log');\r\n $this->_processOrder();\r\n }\r\n } catch (Exception $e) {\r\n $this->_debugData['exception'] = $e->getMessage();\r\n $this->_debug();\r\n throw $e;\r\n }\r\n $this->_debug();\r\n }", "title": "" }, { "docid": "db16aec5d9bc86d83acf8d67c2eed253", "score": "0.5054362", "text": "function we_tag_paypal($attribs) {\n\tglobal $DB_WE;\n\t$name = we_getTagAttribute(\"name\",$attribs);\n\t$foo = attributFehltError($attribs,\"pricename\",\"PayPal\");\n\tif($foo)\n\t return $foo;\n\tif(!$name)\n\t\t$foo = attributFehltError($attribs,\"shopname\",\"PayPal\");\n\tif($foo)\n\t\treturn $foo;\n\n\t$shopname = we_getTagAttribute(\"shopname\",$attribs);\n\t$shopname = $shopname ? $shopname : $name;\n\t$pricename = we_getTagAttribute(\"pricename\",$attribs);\n\n\n\n\t$netprices = we_getTagAttribute(\"netprices\",$attribs,'true', true, true);\n\n\t\t$useVat = we_getTagAttribute(\"usevat\",$attribs,'true', true);\n\n\tif ($useVat) {\n\t\trequire_once(WE_SHOP_MODULE_DIR . 'weShopVatRule.class.php');\n\n\t\tif (isset($_SESSION['webuser'])) {\n\t\t\t$_customer = $_SESSION['webuser'];\n\t\t} else {\n\t\t\t$_customer = false;\n\t\t}\n\n\t\t$weShopVatRule = weShopVatRule::getShopVatRule();\n\t\t$calcVat = $weShopVatRule->executeVatRule($_customer);\n\t}\n\n\n\n // var_dump($attribs);\n if (isset($GLOBALS[$shopname])) {\n \t\t$basket = $GLOBALS[$shopname];\n\n\t\t$shoppingItems = $basket->getShoppingItems();\n\t\t$cartFields = $basket->getCartFields();\n\n\t\tif (sizeof($shoppingItems) == 0) {\n\t\t\treturn;\n\t\t}\n\n/* PHP Paypal IPN Integration Class Demonstration File\n *\n * This file demonstrates the usage of paypal.class.php, a class designed\n * to aid in the interfacing between your website, paypal, and the instant\n * payment notification (IPN) interface. This single file serves as 4\n * virtual pages depending on the \"action\" varialble passed in the URL. It's\n * the processing page which processes form data being submitted to paypal, it\n * is the page paypal returns a user to upon success, it's the page paypal\n * returns a user to upon canceling an order, and finally, it's the page that\n * handles the IPN request from Paypal.\n*/\n\n\n $DB_WE = !isset($DB_WE) ? new DB_WE : $DB_WE;\n\n\t//\tNumberFormat - currency and taxes\n\t$DB_WE->query(\"SELECT strFelder from \".ANZEIGE_PREFS_TABLE.\" where strDateiname = 'shop_pref'\");\n\t$DB_WE->next_record();\n\t$feldnamen = explode(\"|\",$DB_WE->f(\"strFelder\"));\n\tif( isset($feldnamen[0])){ // determine the currency\n\t\tif($feldnamen[0]==\"$\" || $feldnamen[0]==\"USD\"){\n\t\t $currency = \"USD\";\n\t }elseif ($feldnamen[0]==\"?\" || $feldnamen[0]==\"EUR\"){\n\t\t $currency = \"EUR\";\n\t }elseif ($feldnamen[0]==\"�\" || $feldnamen[0]==\"GBP\"){\n\t\t $currency = \"GBP\";\n\t\t}elseif ($feldnamen[0]==\"AUD\"){\n\t\t $currency = \"AUD\";\n\t }else{\n\t $currency = \"EUR\";\n\t }\n\t}else{\n\t\t$currency = \"EUR\";\n\t}\n\n\t$DB_WE->query(\"SELECT strFelder from \".ANZEIGE_PREFS_TABLE.\" where strDateiname = 'payment_details'\");\n\t$DB_WE->next_record();\n\t$formField = explode(\"|\",$DB_WE->f(\"strFelder\"));\n\tif( isset($formField[0])){ // determine the Forename\n\t\t$sendForename = $_SESSION['webuser'][$formField[0]];\n\t}\n\tif( isset($formField[1])){ // determine the Surename\n\t\t$sendSurname = $_SESSION['webuser'][$formField[1]];\n\t}\n\tif( isset($formField[2])){ // determine the Street\n\t\t$sendStreet = $_SESSION['webuser'][$formField[2]];\n\t}\n\tif( isset($formField[3])){ // determine the Zip\n\t\t$sendZip = $_SESSION['webuser'][$formField[3]];\n\t}\n\tif( isset($formField[4])){ // determine the City\n\t\t$sendCity = $_SESSION['webuser'][$formField[4]];\n\t}\n\tif( isset($formField[18]) && $formField[18]){ // determine the City\n\t\t$sSendEmail = $_SESSION['webuser'][$formField[18]];\n\t}\n\t\n\tif( isset($formField[5])){ // determine the country code\n\t\t$lc = $formField[5];\n\t}\n\n\tif( isset($formField[6])){ // determine the paypal business email\n\t\t$paypalEmail = $formField[6];\n\t}\n\tif( isset($formField[7])){ // todo\n\n\t\tif ($formField[7]==\"default\"){\n\t\t\t$paypalURL = \"https://www.paypal.com/cgi-bin/webscr\";\n\n\t\t}else{\n\t\t\t$paypalURL = \"https://www.sandbox.paypal.com/cgi-bin/webscr\";\n\t\t}\n\t}else{\n\t\t $paypalURL = \"https://www.paypal.com/cgi-bin/webscr\";\n\t}\n\n// Setup class\n$p = new paypal_class; // initiate an instance of the class\n$p->paypal_url = $paypalURL; // testing paypal url\n//$p->paypal_url = 'https://www.paypal.com/cgi-bin/webscr'; // paypal url\n\n// setup a variable for this script (ie: 'http://www.webEdition.de/shop/paypal.php')\n$this_script = getServerProtocol(true) . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];\n\n// if there is not action variable, set the default action of 'process'\nif (empty($_GET['action'])) $_GET['action'] = 'process';\n\nswitch ($_GET['action']) {\n\n case 'process': // Process and order...\n\n // There should be no output at this point. To process the POST data,\n // the submit_paypal_post() function will output all the HTML tags which\n // contains a FORM which is submited instantaneously using the BODY onload\n // attribute. In other words, don't echo or printf anything when you're\n // going to be calling the submit_paypal_post() function.\n\n // This is where you would have your form validation and all that jazz.\n // You would take your POST vars and load them into the class like below,\n // only using the POST values instead of constant string expressions.\n\n // For example, after ensureing all the POST variables from your custom\n // order form are valid, you might have:\n //\n // $p->add_field('first_name', $_POST['first_name']);\n // $p->add_field('last_name', $_POST['last_name']);\n\n\n\n\n\n\t$i = 0;\n\t$summit = 0;\n\tforeach ( $shoppingItems as $key => $item) {\n\t\t$i++; // loop through basket\n\n $p->add_field('business', $paypalEmail);\n $p->add_field('return', $this_script.'?action=success');\n $p->add_field('cancel_return', $this_script.'?action=cancel');\n $p->add_field('notify_url', $this_script.'?action=ipn');\n $p->add_field('currency_code', $currency);\n $p->add_field('lc', $lc);\n // get user details\n $p->add_field('first_name', $sendForename);\n $p->add_field('last_name', $sendSurname);\n $p->add_field('address1', $sendStreet);\n $p->add_field('zip', $sendZip);\n $p->add_field('city', $sendCity);\n $p->add_field('country', $lc);\n \n if (isset($sSendEmail) && we_check_email($sSendEmail)) {\n\t\t$p->add_field('email', $sSendEmail);\n\t\t$p->add_field('receiver_email', $sSendEmail);\n }\n \n // determine the basket data\n $p->add_field('item_name_'.$i, $itemTitle = (isset($item['serial']['we_shoptitle']) ? $item['serial']['we_shoptitle'] : $item['serial']['shoptitle']) );\n $p->add_field('quantity_'.$i, $item['quantity']);\n \n $itemPrice = (isset($item['serial'][\"we_\".$pricename]) ? $item['serial'][\"we_\".$pricename] : $item['serial'][$pricename]);\n \n // correct price, if it has more than one \".\"\n // bug #8717\n $itemPrice = we_util::std_numberformat($itemPrice);\n \n $p->add_field('amount_'.$i, $itemPrice);\n\n // foreach article we must determine the correct tax-rate\n\t\t\trequire_once(WE_SHOP_MODULE_DIR . 'weShopVats.class.php');\n\t\t\t$vatId = isset($item['serial'][WE_SHOP_VAT_FIELD_NAME]) ? $item['serial'][WE_SHOP_VAT_FIELD_NAME] : 0;\n\t\t\t$shopVat = weShopVats::getVatRateForSite($vatId, true, false);\n\t\t\tif ($shopVat) { // has selected or standard shop rate\n\t\t\t\t$item['serial'][WE_SHOP_VAT_FIELD_NAME] = $shopVat;\n\t\t\t} else { // could not find any shoprates, remove field if necessary\n\t\t\t\tif (isset($shoppingItem['serial'][WE_SHOP_VAT_FIELD_NAME])) {\n\t\t\t\t\tunset($shoppingItem['serial'][WE_SHOP_VAT_FIELD_NAME]);\n\t\t\t\t}\n\t\t\t}\n\n\n\t if($netprices){\n\t \t $totalVat = $itemPrice / 100 * $shopVat;\n\t \t $totalVats = number_format($totalVat,2);\n\t\t\t // add the polychronic taxes\n $p->add_field('tax_'.$i, $totalVats);\n\t }\n\n // determine the shipping cost by accumulating the total\n $summit += ($itemPrice*$item['quantity']);\n\n }\n\n\n\t //get the shipping costs\n\t require_once(WE_SHOP_MODULE_DIR . 'weShippingControl.class.php');\n\t require_once($_SERVER['DOCUMENT_ROOT'] . '/webEdition/we/include/we_tags/we_tag_ifRegisteredUser.inc.php');\n\n\t\t\t$weShippingControl = weShippingControl::getShippingControl();\n\n\t\t\tif (we_tag_ifRegisteredUser(array(), '')) { // check if user is registered\n\t\t\t $customer = $_SESSION['webuser'];\n\t\t } else {\n\t\t\t $customer = false;\n\t\t }\n\t\t\t$cartField[WE_SHOP_SHIPPING] = array(\n\t\t\t\t'costs' => $weShippingControl->getShippingCostByOrderValue($summit, $customer),\n\t\t\t\t'isNet' => $weShippingControl->isNet,\n\t\t\t\t'vatRate' => $weShippingControl->vatRate\n\t\t\t );\n\n\t\t\t $shippingCosts = $cartField[WE_SHOP_SHIPPING]['costs'];\n\t\t \t$isNet = $cartField[WE_SHOP_SHIPPING]['isNet'];\n\t\t \t$vatRate = $cartField[WE_SHOP_SHIPPING]['vatRate'];\n\t\t \t$shippingCostVat = $shippingCosts / 100 * $vatRate;\n\t\t \t$shippingFee = $shippingCosts + $shippingCostVat;\n\t\t \t\n\t\t\t\t\tif ($isNet) { // net prices\n\t\t\t\t\t\t$shippingCostVat = $shippingCosts / 100 * $vatRate;\n\t\t\t\t\t\t$shippingFee = $shippingCosts + $shippingCostVat;\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$shippingFee = $shippingCosts;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\t/*\n\t \t\t\t\t\tif($isNet != 0){\n\t \t\t\t\t\t$p->add_field('shipping_1', $shippingCosts);\n \t\t\t\t\t}else{\n \t\t\t\t\tprint \" null \";\n\t\t\t\t\t }\n \t\t\t\t\t\t */\n\t $p->add_field('shipping_1', $shippingFee);\n\t $p->add_field('upload', 1);\n\n\n\t //p_r($p);\n\t// var_dump($shopVat);\n\n\t// exit;\n \n \t$p->submit_paypal_post(); // submit the fields to paypal\n break;\n\n case 'success': // Order was successful...\n\n // This is where you would probably want to thank the user for their order\n // or what have you. The order information at this point is in POST\n // variables. However, you don't want to \"process\" the order until you\n // get validation from the IPN. That's where you would have the code to\n // email an admin, update the database with payment status, activate a\n // membership, etc.\n include_once($_SERVER[\"DOCUMENT_ROOT\"].\"/webEdition/we/include/we_tags/we_tag_writeShopData.inc.php\");\n\n we_tag_writeShopData($attribs);\n\n // You could also simply re-direct them to another page, or your own\n // order status page which presents the user with the status of their\n // order based on a database (which can be modified with the IPN code\n // below).\n\n\n\n break;\n\n case 'cancel': // Order was canceled...\n\n // The order was canceled before being completed.\n\n\n\n break;\n\n case 'ipn': // Paypal is calling page for IPN validation...\n\n // It's important to remember that paypal calling this script. There\n // is no output here. This is where you validate the IPN data and if it's\n // valid, update your database to signify that the user has payed. If\n // you try and use an echo or printf function here it's not going to do you\n // a bit of good. This is on the \"backend\". That is why, by default, the\n // class logs all IPN data to a text file.\n\n if ($p->validate_ipn()) {\n\n // Payment has been recieved and IPN is verified. This is where you\n // update your database to activate or process the order, or setup\n // the database with the user's order details, email an administrator,\n // etc. You can access a slew of information via the ipn_data() array.\n\n // Check the paypal documentation for specifics on what information\n // is available in the IPN POST variables. Basically, all the POST vars\n // which paypal sends, which we send back for validation, are now stored\n // in the ipn_data() array.\n\n // For this example, we'll just email ourselves ALL the data.\n /*$subject = 'Instant Payment Notification - Recieved Payment';\n $to = '[email protected]'; // your email\n $body = \"An instant payment notification was successfully recieved\\n\";\n $body .= \"from \".$p->ipn_data['payer_email'].\" on \".date('m/d/Y');\n $body .= \" at \".date('g:i A').\"\\n\\nDetails:\\n\";\n foreach ($p->ipn_data as $key => $value) { $body .= \"\\n$key: $value\"; }\n mail($to, $subject, $body);*/\n }\n break;\n }\n\n\t}\n\treturn;\n}", "title": "" }, { "docid": "9f376f8d51684155aff66c6fa9af6d3d", "score": "0.5038081", "text": "function check_ipn_response()\n {\n @ob_clean();\n\n $this->log_message('Received response from BB Payments');\n $resp = $this->check_ipn_request_is_valid($_GET);\n if ($resp[0]) {\n header('HTTP/1.1 200 OK');\n do_action(\"valid_bb_payments_ipn_request\", $_GET);\n } else {\n wp_die(\"BB Payment Request Failure: \" . $resp[1]);\n }\n }", "title": "" }, { "docid": "83434932c9494b816088f61e7857bd3d", "score": "0.50270975", "text": "public function getOrderFromPaypal()\n{\n $this->app->loadClass('paypal', true);\n $paypal = new paypal($this->config->paypal->mode);\n $result = $paypal->check();\n if(!$result) return false;\n if($result['result'] == 'paid') \n {\n $orderID = $this->getRawOrder($result['invoice']);\n $order = $this->getByID($orderID); \n if(empty($order)) return false;\n $order->sn = $result['txn_id'];\n return $order;\n }\n\n return false;\n}", "title": "" }, { "docid": "c5e84896bb1b416055fa6923dc07850c", "score": "0.50226176", "text": "private function processCheckoutIPN()\n\t{\n\t\ttry {\n\t\t\t/** @var \\Genesis\\API\\Notification $notification */\n\t\t\t$notification = new \\Genesis\\API\\Notification($_POST);\n\n\t\t\tif ( $notification->isAuthentic() ) {\n\t\t\t\t$notification->initReconciliation();\n\n $checkout_reconcile = $notification->getReconciliationObject();\n\n\t\t\t\tif (isset($checkout_reconcile->unique_id)) {\n\n\t\t\t\t\t$checkout_transaction = EComProcessingTransaction::getByUniqueId($checkout_reconcile->unique_id);\n\n\t\t\t\t\tif (isset($checkout_transaction->id_unique)) {\n\n $checkout_transaction->type = 'checkout';\n $checkout_transaction->importResponse($checkout_reconcile);\n\n\t\t\t\t\t\tif ( isset( $checkout_reconcile->payment_transaction ) ) {\n $payment_reconcile = $checkout_reconcile->payment_transaction;\n\n /** @var EComProcessingTransaction $transaction */\n\t\t\t\t\t\t\t$payment_transaction = EComProcessingTransaction::getByUniqueId( $payment_reconcile->unique_id );\n\n\t\t\t\t\t\t\tif ( $payment_transaction ) {\n\t\t\t\t\t\t\t\t$payment_transaction->importResponse( $payment_reconcile );\n\t\t\t\t\t\t\t\t$payment_transaction->save();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$payment_transaction = new EComProcessingTransaction();\n\n\t\t\t\t\t\t\t\t$payment_transaction->id_parent = $checkout_transaction->id_unique;\n\t\t\t\t\t\t\t\t$payment_transaction->ref_order = $checkout_transaction->ref_order;\n\t\t\t\t\t\t\t\t$payment_transaction->importResponse( $payment_reconcile );\n\t\t\t\t\t\t\t\t$payment_transaction->add();\n\t\t\t\t\t\t\t}\n\n if (in_array($payment_reconcile->transaction_type, $this->types)) {\n $status = $this->module->getPrestaStatus($payment_reconcile->status);\n } else {\n $status = $this->module->getPrestaBackendStatus($payment_reconcile->transaction_type);\n }\n\n $checkout_transaction->updateOrderHistory( $status, true );\n\t\t\t\t\t\t}\n\n $checkout_transaction->save();\n\n\t\t\t\t\t\t$notification->renderResponse();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $exception) {\n\t\t\tif (class_exists('Logger')) {\n\t\t\t\tLogger::addLog( $exception->getMessage(), 4, $exception->getCode(), $this->module->displayName, $this->module->id, true );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "384253186432deddf2ebd5cd28588961", "score": "0.5022054", "text": "function paypal_init_from_db_record() {\n\n if (isset($_REQUEST['ken_debug'])){ watchdog('ken_debug',\"In paypal_init_from_db_record with db_record = \".var_export($this->db_record,true)); }\n $this->ppid = $this->db_record['ppid'];\n $this->txid = $this->db_record['txid'];\n $this->token = $this->db_record['token'];\n $this->donation_amount = $this->db_record['donation_amount'];\n $this->paypal_fee = $this->db_record['paypal_fee'];\n $this->payer_id = $this->db_record['payer_id'];\n $this->currency_code = $this->db_record['currency_code'];\n $this->payment_type = $this->db_record['payment_type'];\n $this->payment_action = $this->db_record['payment_action'];\n $this->payer_id = $this->db_record['payer_id'];\n $this->payer_last = $this->db_record['payer_last'];\n $this->payer_first = $this->db_record['payer_first'];\n $this->np_name = $this->db_record['np_name'];\n $this->linkback = $this->db_record['linkback'];\n $this->payer_email = $this->db_record['payer_email'];\n $this->form_gen = $this->db_record['form_gen'];\n $this->billing_agreement_id = $this->db_record['billing_agreement_id'];\n $this->recur = unserialize($this->db_record['recur']);\n $this->one_click = unserialize($this->db_record['one_click']);\n $this->client_covers_fees = unserialize($this->db_record['client_covers_fees']);\n $this->employer_match = unserialize($this->db_record['employer_match']);\n\n return;\n }", "title": "" }, { "docid": "111d4dd752e247d2bbe8cfe9ceabeb48", "score": "0.5001223", "text": "function paypal_test ()\n{\n\n $return_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];\n $cancel_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];\n\n $url = 'https://www.paypal.com/cgi-bin/webscr?';\n $url .= build_url_string ('cmd', '_xclick');\n $url .= build_url_string ('business', PAYPAL_ACCOUNT_EMAIL);\n $url .= build_url_string ('item_name', 'Intercon PayPal Test');\n $url .= build_url_string ('no_note', '0');\n $url .= build_url_string ('cn', 'Any notes about your payment?');\n $url .= build_url_string ('no_shipping', '1');\n // $url .= build_url_string ('invoice', $_SESSION[SESSION_LOGIN_USER_ID].' '.$name);\n $url .= build_url_string ('currency_code', 'USD');\n $url .= build_url_string ('amount', '0.05');\n $url .= build_url_string ('rm', '2');\n $url .= build_url_string ('cancel_return', $cancel_url);\n $url .= build_url_string ('return', $return_url, FALSE);\n\n\n echo \"<a href=$url>Test PayPal</a><p>\";\n}", "title": "" }, { "docid": "a329b0a0b0dbd0b10bca4cf600a245a7", "score": "0.5000649", "text": "public function indexAction()\n {\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n try {\n $data = $this->getRequest()->getPost();\n Mage::getModel('paypal/ipn')->processIpnRequest($data, new Varien_Http_Adapter_Curl());\n\n } catch (Mage_Paypal_UnavailableException $e) {\n Mage::logException($e);\n $this->getResponse()->setHeader('HTTP/1.1','503 Service Unavailable')->sendResponse();\n exit;\n } catch (Exception $e) {\n Mage::logException($e);\n $this->getResponse()->setHttpResponseCode(500);\n }\n }", "title": "" }, { "docid": "25fba61c8c14973a6055e3a8dac371f8", "score": "0.4998385", "text": "public function load_form()\n {\n // You need to set a callback URL if you want the IPN to work\n // $callbackUrl =\"https://www.boame.net/member/bitcoin/callback\";\n $callbackUrl = \"http://localhost/coinpayments-ipn-master/index.php\";\n $sucessURL = BASE_URL.'dashboard';\n \n // Create an instance of the class\n \n $CP = new \\MineSQL\\coinPayments();\n // Set the merchant ID and secret key (can be found in account settings on CoinPayments.net)\n $CP->setMerchantId('10a723ca880ce3216fe57a94faca3404');\n $CP->setSecretKey('Narola21#');\n\n // Create a payment button with item name, currency, cost, custom variable, and the callback URL\n $form = $CP->createPayment('Test Product', 'LTCT', 0.10, '123', $callbackUrl, $sucessURL);\n \n // Display the button suce\n echo $form;\n\n }", "title": "" }, { "docid": "dda9dfe0e90052759a09fc4d9acb80d8", "score": "0.49833313", "text": "function PPHttpPost($methodName_, $nvpStr_) {\n\t\t\tglobal $gateway_environment;\n\t\t\t$environment = $gateway_environment;\n\n\t\t\t$API_UserName = pmpro_getOption(\"apiusername\");\n\t\t\t$API_Password = pmpro_getOption(\"apipassword\");\n\t\t\t$API_Signature = pmpro_getOption(\"apisignature\");\n\t\t\t$API_Endpoint = \"https://api-3t.paypal.com/nvp\";\n\t\t\tif(\"sandbox\" === $environment || \"beta-sandbox\" === $environment) {\n\t\t\t\t$API_Endpoint = \"https://api-3t.$environment.paypal.com/nvp\";\n\t\t\t}\n\n $nvp_args = array(\n 'METHOD' => $methodName_,\n 'VERSION' => '72.0',\n 'bn' => PAYPAL_BN_CODE,\n );\n\n\t\t\tif ( ! empty( $API_UserName ) ) {\n\t\t\t $nvp_args['USER'] = $API_UserName;\n }\n\n\t\t\tif ( !empty( $API_Password ) ) {\n\t\t\t $nvp_args['PWD'] = $API_Password;\n }\n\n if ( !empty( $API_Signature ) ) {\n\t\t\t $nvp_args['SIGNATURE'] = $API_Signature;\n }\n\n\t\t\t$nvpreq = http_build_query( $nvp_args );\n $nvpreq = \"{$nvpStr_}&{$nvpreq}\";\n\n\t\t\t//post to PayPal\n\t\t\t$response = wp_remote_post( $API_Endpoint, array(\n\t\t\t\t\t'timeout' => 60,\n\t\t\t\t\t'sslverify' => FALSE,\n\t\t\t\t\t'httpversion' => '1.1',\n\t\t\t\t\t'body' => $nvpreq\n\t\t\t )\n\t\t\t);\n\n\t\t\tif ( is_wp_error( $response ) ) {\n\t\t\t $error_message = $response->get_error_message();\n\t\t\t die( \"{$methodName_} failed: $error_message\" );\n\t\t\t} else {\n\t\t\t\t//extract the response details\n\t\t\t\t$httpParsedResponseAr = array();\n\t\t\t\tparse_str(wp_remote_retrieve_body($response), $httpParsedResponseAr);\n\n\t\t\t\t//check for valid response\n\t\t\t\tif((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n\t\t\t\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $httpParsedResponseAr;\n\t\t}", "title": "" }, { "docid": "02a2194f3fe2fa8f0971cf827256d849", "score": "0.4977882", "text": "function invoice($param1 = '', $param2 = '', $param3 = '')\n {\n //if($this->session->userdata('student_login')!=1)redirect(base_url() , 'refresh');\n if ($param1 == 'make_payment') {\n $invoice_id = $this->input->post('invoice_id');\n $system_settings = $this->db->get_where('settings', array(\n 'type' => 'paypal_email'\n ))->row();\n $invoice_details = $this->db->get_where('invoice', array(\n 'invoice_id' => $invoice_id\n ))->row();\n \n /****TRANSFERRING USER TO PAYPAL TERMINAL****/\n $this->paypal->add_field('rm', 2);\n $this->paypal->add_field('no_note', 0);\n $this->paypal->add_field('item_name', $invoice_details->title);\n $this->paypal->add_field('amount', $invoice_details->amount);\n $this->paypal->add_field('custom', $invoice_details->invoice_id);\n $this->paypal->add_field('business', $system_settings->description);\n $this->paypal->add_field('notify_url', base_url() . 'index.php?student/invoice/paypal_ipn');\n $this->paypal->add_field('cancel_return', base_url() . 'index.php?student/invoice/paypal_cancel');\n $this->paypal->add_field('return', base_url() . 'index.php?student/invoice/paypal_success');\n \n $this->paypal->submit_paypal_post();\n // submit the fields to paypal\n }\n if ($param1 == 'paypal_ipn') {\n if ($this->paypal->validate_ipn() == true) {\n $ipn_response = '';\n foreach ($_POST as $key => $value) {\n $value = urlencode(stripslashes($value));\n $ipn_response .= \"\\n$key=$value\";\n }\n $data['payment_details'] = $ipn_response;\n $data['payment_timestamp'] = strtotime(date(\"m/d/Y\"));\n $data['payment_method'] = 'paypal';\n $data['status'] = 'paid';\n $invoice_id = $_POST['custom'];\n $this->db->where('invoice_id', $invoice_id);\n $this->db->update('invoice', $data);\n\n $data2['method'] = 'paypal';\n $data2['invoice_id'] = $_POST['custom'];\n $data2['timestamp'] = strtotime(date(\"m/d/Y\"));\n $data2['payment_type'] = 'income';\n $data2['title'] = $this->db->get_where('invoice' , array('invoice_id' => $data2['invoice_id']))->row()->title;\n $data2['description'] = $this->db->get_where('invoice' , array('invoice_id' => $data2['invoice_id']))->row()->description;\n $data2['student_id'] = $this->db->get_where('invoice' , array('invoice_id' => $data2['invoice_id']))->row()->student_id;\n $data2['amount'] = $this->db->get_where('invoice' , array('invoice_id' => $data2['invoice_id']))->row()->amount;\n $this->db->insert('payment' , $data2);\n }\n }\n if ($param1 == 'paypal_cancel') {\n $this->session->set_flashdata('flash_message', get_phrase('payment_cancelled'));\n redirect(base_url() . 'index.php?student/invoice/', 'refresh');\n }\n if ($param1 == 'paypal_success') {\n $this->session->set_flashdata('flash_message', get_phrase('payment_successfull'));\n redirect(base_url() . 'index.php?student/invoice/', 'refresh');\n }\n $student_profile = $this->db->get_where('student', array(\n 'student_id' => $this->session->userdata('student_id')\n ))->row();\n $student_id = $student_profile->student_id;\n $page_data['invoices'] = $this->db->get_where('invoice', array(\n 'student_id' => $student_id\n ))->result_array();\n $page_data['page_name'] = 'invoice';\n $page_data['page_title'] = get_phrase('manage_invoice/payment');\n $this->load->view('backend/index', $page_data);\n }", "title": "" }, { "docid": "516ae5f20d4d5202a1cc0c99dfc2ca54", "score": "0.49652085", "text": "function check_payment()\n {\n $req = 'cmd=_notify-validate';\n foreach($_POST as $key => $value) \n {\n $value = urlencode(stripslashes($value));\n $req .= \"&$key=$value\";\n }\t\t\n $url = $this->get_address();\n \n // Headers to post back to paypal\n $header .= \"POST /cgi-bin/webscr HTTP/1.0\\r\\n\";\n $header .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n $header .= \"Content-Length: \" . strlen($req) . \"\\r\\n\\r\\n\";\n $fp = fsockopen('ssl://'.$url, 443, $errno, $errstr, 30);\n \n // $fp = fsockopen ($url, 80, $errno, $errstr, 30);\n\n // If we cant open socket, we have an error\n if (!$fp) \n {\n return FALSE;\n } \n else \n {\n fputs($fp, $header . $req);\n \n // Common mistake by people is ending the loop on the first run\n // around, which only gives the header line. There for we are going\n // to wait until the loop is ended before returning anything.\n $loop = FALSE; # Start by saying the loop is false on a verified return\n while(!feof($fp)) \n {\n $res = fgets($fp, 1024);\n if(strcmp($res, \"VERIFIED\") == 0) # If line result length matches VERIFIED\n {\t\t\t\t\n $loop = TRUE; # Define the loop contained VERIFIED\n } \n }\n if($loop == TRUE)\n {\n return TRUE;\n }\n else \n {\n if($this->logFile != NULL) # If user defined a log file\n {\n $err = array();\n $err[] = '--- Start Transaction ---';\n foreach($_POST as $var)\n {\n $err[] = $var;\n }\n $err[] = '--- End Transaction ---';\n $err[] = '';\n foreach($err as $logerror)\n {\n $this->write_log($logerror); # Log for error checking\n }\n }\n return FALSE;\n }\n fclose ($fp);\n }\n return false;\n }", "title": "" }, { "docid": "6c33d95d248406d9c5747c2f811e458b", "score": "0.49362522", "text": "function PPHttpPost($methodName_, $nvpStr_) {\n\t\t\t\t$API_UserName = urlencode(PPL_API_USER);\n\t\t\t\t$API_Password = urlencode(PPL_API_PASSWORD);\n\t\t\t\t$API_Signature = urlencode(PPL_API_SIGNATURE);\n\t\t\t\t\n\t\t\t\t$paypalmode = (PPL_MODE=='sandbox') ? '.sandbox' : '';\n\t\t\n\t\t\t\t$API_Endpoint = \"https://api-3t\".$paypalmode.\".paypal.com/nvp\";\n\t\t\t\t$version = urlencode('109.0');\n\t\t\t\n\t\t\t\t// Set the curl parameters.\n\t\t\t\t$ch = curl_init();\n\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $API_Endpoint);\n\t\t\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\t\t\t//curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'TLSv1');\n\t\t\t\t\n\t\t\t\t// Turn off the server and peer verification (TrustManager Concept).\n\t\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\t\t\t\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\t\t\n\t\t\t\t// Set the API operation, version, and API signature in the request.\n\t\t\t\t$nvpreq = \"METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_\";\n\t\t\t\n\t\t\t\t// Set the request as a POST FIELD for curl.\n\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);\n\t\t\t\n\t\t\t\t// Get response from the server.\n\t\t\t\t$httpResponse = curl_exec($ch);\n\t\t\t\n\t\t\t\tif(!$httpResponse) {\n\t\t\t\t\texit(\"$methodName_ failed: \".curl_error($ch).'('.curl_errno($ch).')');\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Extract the response details.\n\t\t\t\t$httpResponseAr = explode(\"&\", $httpResponse);\n\t\t\t\n\t\t\t\t$httpParsedResponseAr = array();\n\t\t\t\tforeach ($httpResponseAr as $i => $value) {\n\t\t\t\t\t\n\t\t\t\t\t$tmpAr = explode(\"=\", $value);\n\t\t\t\t\t\n\t\t\t\t\tif(sizeof($tmpAr) > 1) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n\t\t\t\t\t\n\t\t\t\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n\t\t\t\t}\n\t\t\t\n\t\t\treturn $httpParsedResponseAr;\n\t\t}", "title": "" }, { "docid": "6c33d95d248406d9c5747c2f811e458b", "score": "0.49362522", "text": "function PPHttpPost($methodName_, $nvpStr_) {\n\t\t\t\t$API_UserName = urlencode(PPL_API_USER);\n\t\t\t\t$API_Password = urlencode(PPL_API_PASSWORD);\n\t\t\t\t$API_Signature = urlencode(PPL_API_SIGNATURE);\n\t\t\t\t\n\t\t\t\t$paypalmode = (PPL_MODE=='sandbox') ? '.sandbox' : '';\n\t\t\n\t\t\t\t$API_Endpoint = \"https://api-3t\".$paypalmode.\".paypal.com/nvp\";\n\t\t\t\t$version = urlencode('109.0');\n\t\t\t\n\t\t\t\t// Set the curl parameters.\n\t\t\t\t$ch = curl_init();\n\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $API_Endpoint);\n\t\t\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\t\t\t//curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'TLSv1');\n\t\t\t\t\n\t\t\t\t// Turn off the server and peer verification (TrustManager Concept).\n\t\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\t\t\t\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\t\t\n\t\t\t\t// Set the API operation, version, and API signature in the request.\n\t\t\t\t$nvpreq = \"METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_\";\n\t\t\t\n\t\t\t\t// Set the request as a POST FIELD for curl.\n\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);\n\t\t\t\n\t\t\t\t// Get response from the server.\n\t\t\t\t$httpResponse = curl_exec($ch);\n\t\t\t\n\t\t\t\tif(!$httpResponse) {\n\t\t\t\t\texit(\"$methodName_ failed: \".curl_error($ch).'('.curl_errno($ch).')');\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Extract the response details.\n\t\t\t\t$httpResponseAr = explode(\"&\", $httpResponse);\n\t\t\t\n\t\t\t\t$httpParsedResponseAr = array();\n\t\t\t\tforeach ($httpResponseAr as $i => $value) {\n\t\t\t\t\t\n\t\t\t\t\t$tmpAr = explode(\"=\", $value);\n\t\t\t\t\t\n\t\t\t\t\tif(sizeof($tmpAr) > 1) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n\t\t\t\t\t\n\t\t\t\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n\t\t\t\t}\n\t\t\t\n\t\t\treturn $httpParsedResponseAr;\n\t\t}", "title": "" }, { "docid": "0f83348379a194120f0ba1418c6a671c", "score": "0.49358076", "text": "public function setIPN( $IPN ) {\n\t\t$this->IPN = $IPN;\n\t}", "title": "" }, { "docid": "741005e00f9548030b0f43d4b360b999", "score": "0.49315053", "text": "function initialize_payment(){\n\n require_once 'initialize-payment.php';\n}", "title": "" }, { "docid": "33a07cf8a2f872f5016a6a87e4389b87", "score": "0.49288327", "text": "public function returnFromPayPal()\n { \n/* \n//The donation returns an url as the following\nhttp://www.bewelcome.org/bw/donations2.php?action=done&tx=0ME24142PE152304A&st=Completed&amt=5.00&cc=EUR&cm=&item_number=&sig=hYUTlSOjBeJvNqfFqc%252fZbrBA4p6c%252fe6EErVp1w18eOBR96p6hzzenPysL%252bFVPZi8YEcONFovQmYn%252b6QF%252fBYoVhGMoaQJCxBQh%252bLAlC0TdgeScs1skk0%252bpY6SyoC%252fNCV1ou69zWRrhDrtsa4SUHibLD%252f1RwGg43iaZjPhB24I6lg%253d\n*/\n // save the first immediate return values \t\t\n $tx=$tx_token = $_GET['tx'];\n $payment_amount=$_GET['amt'] ;\n $payment_currency=$_GET['cc'] ;\n\n // read the post from PayPal system and add 'cmd'\n $req = 'cmd=_notify-synch';\n\n $auth_token =\"token is not set\" ;\n if (isset($_SYSHCVOL['paypal_authtoken'])) {\n $auth_token =$_SYSHCVOL['paypal_authtoken'] ;\n }\n $req .= \"&tx=$tx_token&at=$auth_token\";\n\n/*\t\t\t \n foreach ($_POST as $key => $value) {\n $value = trim(urlencode(stripslashes($value)));\n echo \"_POST[\", $key,\"]=\",$value,\"<br />\";\n }\n\n foreach ($_GET as $key => $value) {\n $value = trim(urlencode(stripslashes($value)));\n echo \"_GET[\", $key,\"]=\",$value,\"<br />\";\n }\n*/\n // post back to PayPal system to validate\n $header = \"POST /cgi-bin/webscr HTTP/1.0\\r\\n\";\n $header .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n $header .= \"Content-Length: \" . strlen($req) . \"\\r\\n\\r\\n\";\n $fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);\n // If possible, securely post back to paypal using HTTPS\n // Your PHP server will need to be SSL enabled\n // $fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);\n \n\n if (!$fp) {\n MOD_log::get()->write(\"Failed to connect to paypal for return value while checking confirmation on paypal\",\"donation\") ;\n $error = \"A problem occured while checking confirmation with paypal\";\n return $error;\n } \n else {\n fputs ($fp, $header . $req); // sending the query to paypal\n // read the body data \n $res = '';\n $headerdone = false;\n while (!feof($fp)) { // while result not received\n $line = fgets ($fp, 1024); // reading the result\n if (strcmp($line, \"\\r\\n\") == 0) {\n // read the header\n $headerdone = true;\n }\n else if ($headerdone) {\n MOD_log::get()->write(\"Requesting paypal for confirmation (\\$tx_token=\".$tx_token.\") [\".$line.\"]\",\"donation\") ;\n // header has been read. now read the contents\n $res .= $line;\n }\n }\n\n // parse the data to read the return variables by paypal\n $lines = explode(\"\\n\", $res);\n $keyarray = array();\n if (strcmp ($lines[0], \"SUCCESS\") == 0) {\n for ($i=1; $i<count($lines);$i++){ // Retrieve the parameters\n if (strpos($lines[$i],\"=\")) {\n list($key,$val) = explode(\"=\", $lines[$i]);\n }\n $keyarray[urldecode($key)] = urldecode($val);\n }\n \n $ItsOK=true ;\n \n $txn_id = $keyarray['txn_id'];\n\n if ($payment_amount!=$keyarray['mc_gross']) { // If amount differs we will not continue\n $ItsOK=false ;\n MOD_log::get()->write(\"Problem for \\$payment_amount expected=\".$payment_amount.\" return par paypal confirmation=\".$keyarray['mc_gross'],\"donation\") ;\n }\n if ($payment_currency!=$keyarray['mc_currency']) { // If currency differs we will not continue\n $ItsOK=false ;\n MOD_log::get()->write(\"Problem for \\$payment_currency expected=\".$payment_currency.\" return par paypal confirmation=\".$keyarray['mc_currency'],\"donation\") ;\n }\n \n if ($keyarray['txn_id']!=$tx) { // If control code differs we will not continue\n $ItsOK=false ;\n MOD_log::get()->write(\"Problem for txn_id expected=\".$tx.\" return par paypal confirmation=\".$keyarray['txn_id'],\"donation\") ;\n }\n \n if (!$ItsOK) { \n $error = \"We detected a problem while checking the success of your donation on paypal\";\n return $error;\n }\n \n $IdMember=0 ; $IdCountry=0 ; // This values will remain if the user was not logged\n if (isset($_SESSION[\"IdMember\"])) {\n $IdMember=$_SESSION[\"IdMember\"] ;\n $query = <<<SQL\nSELECT geonames_cache.parentCountryId AS IdCountry\nFROM members, addresses, geonames_cache\nWHERE members.id={$IdMember}\nAND geonames_cache.geonameid = addresses.IdCity\nAND members.id = addresses.IdMember\nAND addresses.rank = 0\nSQL;\n $result = $this->dao->query($query);\n \t\t$m = $result->fetch(PDB::FETCH_OBJ);\n $IdCountry=$m->IdCountry ; \n }\n\n $referencepaypal= \"ID #\".$keyarray['txn_id'].\" payment_status=\".$keyarray['payment_status'] ;\n if ($keyarray['mc_currency']==\"USD\") {\n $payment_currency=\"$\" ;\n }\n else if ($keyarray['mc_currency']==\"EUR\") {\n $payment_currency=\"€\" ;\n }\n else {\n $payment_currency=$keyarray['mc_currency'] ;\n }\n \n $receiver_email=$keyarray['payer_email'] ;\n \n // now test if this donation was allready registrated\n $query = '\nSELECT *\nFROM donations\nWHERE IdMember='.$IdMember.'\nAND referencepaypal LIKE \"%'.$referencepaypal.'%\"';\n $result = $this->dao->query($query);\n \t\t$rr = $result->fetch(PDB::FETCH_OBJ);\n \n if (isset($rr->id)) { // If a previous version was already existing, it means a double signup\n MOD_log::get()->write(\"Same Donation Submited several times for \".$keyarray['mc_gross'].$payment_currency.\" by \".$keyarray['first_name'].\" \".$keyarray['last_name'].\"/\".$receiver_email.\" status=\".$payment_status.\" [expected\".$_SESSION[\"PaypalBW_key\"].\" received=\".$tx.\"]\",\"Donation\") ;\n $error = \"Your donation is registrated only once , not need to submit twice ;-)\";\n return $error;\n }\n \n $memo=\"\" ;\n if (isset($keyarray['memo'])) {\n $memo=$keyarray['memo'] ;\n }\n $query = '\nINSERT INTO `donations`\n( `IdMember`,`Email`,`StatusPrivate`,`created`,`Amount`,`Money`,`IdCountry`,`namegiven`,`referencepaypal`,`membercomment`,`SystemComment` )\nVALUES\n('.$IdMember.',\"'.$receiver_email.'\",\"showamountonly\",now(),'.$payment_amount.',\"'.$payment_currency.'\",'.$IdCountry.',\"'.$keyarray[\"first_name\"].' '.$keyarray[\"last_name\"].'\",\"'.$referencepaypal.'\",\"\",\"Via paypal'.' '.$keyarray[\"payment_status\"].' '.$memo.'\")\n';\n $this->dao->exec($query);\n MOD_log::get()->write(\"donation ID #\".$referencepaypal.\" recorded\",\"donation\") ;\n fclose($fp) ;\n return;\n } // end if verified\n MOD_log::get()->write(\"can't find verified in paypal return information for ID #\".$tx.\" recorded\",\"donation\");\n $error = \"not verified\";\n return $error;\n \t} // enf if fp\n }", "title": "" }, { "docid": "8741850fd150249e235279a73c431fc9", "score": "0.49236873", "text": "public function _getPaypalClientSecret(){ return $this->_getSettingsAttribute('paypal_secret'); }", "title": "" }, { "docid": "27bd32689bdb715e629965402335ed81", "score": "0.49118915", "text": "public function __construct()\n {\n // $this->paypalObject = new ExpressCheckout;\n }", "title": "" }, { "docid": "4d0a804645b9d9e6c55b1cd545b86c32", "score": "0.49109915", "text": "public function pageLoad() { \n $objCore = new Core();\n $objPaypal = new Paypal_email();\n $this->arrCountryList = $objPaypal->countryList();\n \n }", "title": "" }, { "docid": "5690fc03d64c6bace6a37500c0059e37", "score": "0.48876774", "text": "public function __construct() {\n $config = config('paypal');\n $this->paypal = new ApiContext(new OAuthTokenCredential($config['client_id'], $config['secret']));\n $this->paypal->setConfig($config['settings']);\n }", "title": "" }, { "docid": "e4c34709fef7c69e9582d7a58672e620", "score": "0.4865175", "text": "public function testDenyPaymentIpn()\n {\n $isOnline = false;\n $message = sprintf('Denied the payment online Transaction ID: \"%s\"', $this->transactionId);\n\n $this->payment->setTransactionId($this->transactionId);\n $this->payment->setNotificationResult(true);\n\n $this->mockInvoice($this->transactionId);\n $this->mockResultFalseMethods($message);\n\n $this->helper->expects($this->never())\n ->method('getMethodInstance');\n\n $this->payment->deny($isOnline);\n }", "title": "" }, { "docid": "5c74edc4fbff5f694cc22b3184241c4f", "score": "0.48640203", "text": "function ipn($data) {\t\t\n\t\t$data['cmd'] = '_notify-validate';\n\t\tif (\n\t\t\t((isset($data['test_ipn']) && !empty($this->config['testing'])) \n\t\t\t|| (!isset($data['test_ipn']) && empty($this->config['testing'])))\n\t\t\t&& parent::ipn($data) && $this->_checkEmail($data)\n\t\t) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "940f8360f9c9d1b0f16e7d83289fbe78", "score": "0.4858248", "text": "public function actionPaypalNotify()\n {\n \\Yii::info('', 'paypalNotify');\n echo 'ok';exit;\n }", "title": "" }, { "docid": "4ea0a07a740d796decdce32fa05442b3", "score": "0.48444518", "text": "public function paypalPage() {\n $this->render(\"paypal.page\", \"Monolog\");\n }", "title": "" }, { "docid": "4568419c7004631e4b56baeb2fb2781a", "score": "0.48431972", "text": "function sendVariables($path_url, $pp_vals)\n {\n global $BL;\n $tax_data = $BL->invoices->calculateTax($_POST['total_recurring_fee'],$_POST['country'],$_POST['state']);\n $this->_POST1 = array ();\n $this->_POST1['cmd'] = \"_xclick-subscriptions\";\n $this->_POST1['redirect_cmd'] = \"_xclick\";\n $this->_POST1['business'] = $pp_vals['paypal_s_email'];\n $this->_POST1['currency_code']= $pp_vals['paypal_s_currency'];\n $this->_POST1['notify_url'] = $path_url.\"/ipn.php\";\n $this->_POST1['return'] = $path_url.\"/OK.php\";\n $this->_POST1['cancel_return']= $path_url.\"/NOK.php\";\n $this->_POST1['no_shipping'] = 1;\n $this->_POST1['no_note'] = 1;\n $this->_POST1['rm'] = 2;\n $this->_POST1['item_name'] = $_POST['friendly_desc'];\n if(empty($this->_POST1['item_name']))\n {\n $this->_POST1['item_name'] = $_POST['desc'];\n }\n $next_bill_date = $BL->utils->getDateArray($_POST['next_bill_date']);\n $initial_days = $BL->utils->dateDiff(date('d'),date('m'),date('Y'),$next_bill_date['mday'],$next_bill_date['mon'],$next_bill_date['year']);\n if(!empty($_POST['total_recurring_fee']) && !empty($_POST['bill_cycle']) && $_POST['bill_cycle']!='none')\n {\n $this->_POST1['a1'] = number_format($_POST['gross_amount'],2);\n if ($BL->conf['en_prorate'])\n {\n $this->_POST1['p1'] = $_POST['bill_cycle'];\n $this->_POST1['t1'] = \"M\";\n }\n else\n {\n $this->_POST1['p1'] = $_POST['bill_cycle'];\n $this->_POST1['t1'] = \"M\";\n }\n $this->_POST1['a3'] = number_format($_POST['total_recurring_fee'] + $tax_data['total_tax_amount'],2);\n $this->_POST1['p3'] = $_POST['bill_cycle'];\n $this->_POST1['t3'] = \"M\";\n }\n elseif($_POST['gross_amount']>0 && !empty($_POST['dom_reg_year']))\n {\n $this->_POST1['a1'] = number_format($_POST['gross_amount'],2);\n if ($BL->conf['en_prorate'])\n {\n $this->_POST1['p1'] = $_POST['dom_reg_year'];\n $this->_POST1['t1'] = \"Y\";\n }\n else\n {\n $this->_POST1['p1'] = $_POST['dom_reg_year'];\n $this->_POST1['t1'] = \"Y\";\n }\n\n $this->_POST1['a3'] = number_format($_POST['gross_amount'],2);\n $this->_POST1['p3'] = $_POST['dom_reg_year'];\n $this->_POST1['t3'] = \"Y\";\n }\n\n $this->_POST1['src'] = 1;\n $this->_POST1['item_number'] = time().rand(0, 1000);\n if (isset ($_POST['force_inv_no']))\n {\n $this->_POST1['item_number'] = $_POST['force_inv_no'];\n }\n\n $array_name = array ();\n $array_name = explode(' ', $_POST['name'], 2);\n $this->_POST1['first_name']= $array_name[0];\n $this->_POST1['last_name'] = $array_name[1];\n $this->_POST1['address1'] = $_POST['address'];\n $this->_POST1['city'] = $_POST['city'];\n $this->_POST1['state'] = $_POST['state'];\n $this->_POST1['zip'] = $_POST['zip'];\n $this->_POST1['country'] = $_POST['country'];\n }", "title": "" }, { "docid": "2ea75e8af536a4f4623b2b4fe37a18fc", "score": "0.48241398", "text": "function ipn(& $BL)\n {\n $this->item_number = $_POST['item_number'];\n $this->transaction_id = $_POST['txn_id'];\n $this->payment_status =$_POST['payment_status'];\n if ($this->postBack() && !empty ($this->item_number) && !empty ($this->transaction_id) && $this->payment_status==\"Completed\")\n {\n $BL->invoices->processTransaction($this->item_number, $this->transaction_id);\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "3233323050a703c716d28701ffd41861", "score": "0.48134202", "text": "public function verifyPayPalRequest()\n\t{\n\t\t$config = leaf_get_property(array ('payment', get_class($this), ));\n\t\t$data = $this->getData();\n\t\t\n\t\t// Prepare request post data\n\t\t$postFields =\t'cmd=' . urlencode('_notify-validate');\n\t\tforeach ($_POST as $key => $value)\n\t\t{\n\t\t\t$postFields .= '&' . $key . '=' . urlencode($value);\n\t\t}\n\t\t\n\t\t// Post back to PayPal to validate \n\t\t$header = \n\t\t\t'POST /cgi-bin/webscr HTTP/1.0' . \"\\r\\n\" .\n\t\t\t'Content-Type: application/x-www-form-urlencoded' . \"\\r\\n\" . \n\t\t\t'Content-Length: ' . strlen($postFields) . \"\\r\\n\\r\\n\"; \n\t\t\n\t\t$return = false;\n\t\t// Try to connect\n\t\t$fp = fsockopen($config['IPNEndpoint'], 443, $errno, $errstr, 30);\n\t\tif (!$fp)\n\t\t{\n\t\t\t// Could not connect\n\t\t\tleafError::create(array\n\t\t\t(\n\t\t\t\t'message' => 'Could not connect to paypal: error #' . $errno . ', \"' . $errstr . '\"',\n\t\t\t\t'file' => __FILE__,\n\t\t\t\t'line' => __LINE__,\n\t\t\t\t'level' => E_ERROR,\n\t\t\t\t'context' => get_defined_vars(),\n\t\t\t));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Connected\n\t\t\t// Send request\n\t\t\tfputs($fp, $header . $postFields);\n\t\t\twhile (!feof($fp))\n\t\t\t{ \n\t\t\t\t$res = fgets($fp, 1024); \n\t\t\t\tif (strcmp($res, \"VERIFIED\") == 0)\n\t\t\t\t{ \n\t\t\t\t\t$return = true;\n\t\t\t\t}\n\t\t\t} \n\t\t\tfclose ($fp); \n\t\t}\n\t\t\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "dbc711064f70898854c31894212ddba6", "score": "0.4809317", "text": "function sendVariables($path_url, $pp_vals)\n {\n $this->_POST1 = array ();\n $this->_POST1['item_number'] = time().rand(0, 1000);\n if (isset ($_POST['force_inv_no']))\n {\n $this->_POST1['item_number']= $_POST['force_inv_no'];\n }\n $this->_POST1['gateway'] = \"twocheckout\";\n if ($this->demo_mode)\n {\n $this->_POST1['demo'] = \"Y\";\n }\n $this->_POST1['fixed'] = \"Y\";\n $this->_POST1['lang'] = \"en\";\n if($pp_vals['tco_params'] != \"Authorize.net\")\n {\n $this->_POST1['sid'] = $pp_vals['tco_id'];\n $this->_POST1['total'] = number_format($_POST['gross_amount'],2);\n $this->_POST1['cart_order_id'] = $this->_POST1['item_number'];\n $this->_POST1['return_url'] = $path_url.\"/ipn.php\";\n $this->_POST1['card_holder_name']= $_POST['name'];\n $this->_POST1['street_address'] = $_POST['address'];\n $this->_POST1['city'] = $_POST['city'];\n $this->_POST1['state'] = $_POST['state'];\n $this->_POST1['zip'] = $_POST['zip'];\n $this->_POST1['country'] = $_POST['country'];\n $this->_POST1['email'] = $_POST['email'];\n $this->_POST1['phone'] = $_POST['telephone'];\n }\n else\n {\n $this->_POST1['x_login'] = $pp_vals['tco_id'];\n $this->_POST1['x_amount'] = number_format($_POST['gross_amount'],2);\n $this->_POST1['x_invoice_num'] = $this->_POST1['item_number'];\n $this->_POST1['x_Receipt_Link_URL'] = $path_url.\"/ipn.php\";\n $array_name = array ();\n $array_name = explode(' ', $_POST['name'], 2);\n $this->_POST1['x_First_Name'] = $array_name[0];\n $this->_POST1['x_Last_Name'] = $array_name[1];\n $this->_POST1['x_Phone'] = $_POST['telephone'];\n $this->_POST1['x_Email'] = $_POST['email'];\n $this->_POST1['x_Address'] = $_POST['address'];\n $this->_POST1['x_City'] = $_POST['city'];\n $this->_POST1['x_State'] = $_POST['state'];\n $this->_POST1['x_Zip'] = $_POST['zip'];\n $this->_POST1['x_Country'] = $_POST['country'];\n $this->_POST1['x_email_merchant'] = TRUE;\n }\n $this->_POST1['c_prod'] = $this->_POST1['item_number'];\n $this->_POST1['c_name'] = $_POST['desc'];\n $this->_POST1['c_description'] = $_POST['friendly_desc'];\n $this->_POST1['c_price'] = number_format($_POST['gross_amount'],2);\n $this->_POST1['c_tangible'] = 'N';\n }", "title": "" }, { "docid": "d5772a953edf063f7a001686d99e7c1a", "score": "0.4801736", "text": "function PPHttpPost($methodName_, $nvpStr_, $PayPalApiUsername, $PayPalApiPassword, $PayPalApiSignature, $PayPalMode)\r\n\t{\r\n\t\t$API_UserName = urlencode($PayPalApiUsername);\r\n\t\t$API_Password = urlencode($PayPalApiPassword);\r\n\t\t$API_Signature = urlencode($PayPalApiSignature);\r\n\t\t$paypalmode = ($PayPalMode=='sandbox') ? '.sandbox' : '';\r\n\t\t$API_Endpoint = \"https://api-3t\".$paypalmode.\".paypal.com/nvp\";\r\n\t\t$version = urlencode('109.0');\r\n\t\t// Set the curl parameters.\r\n\t\t$ch = curl_init();\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $API_Endpoint);\r\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\r\n\t\t// Turn off the server and peer verification (TrustManager Concept).\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\r\n\t\t// Set the API operation, version, and API signature in the request.\r\n\t\t$nvpreq = \"METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_\";\r\n\t\t// Set the request as a POST FIELD for curl.\r\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);\r\n\t\t// Get response from the server.\r\n\t\t$httpResponse = curl_exec($ch);\r\n\t\tif(!$httpResponse)\r\n\t\t{\r\n\t\t\texit(\"$methodName_ failed: \".curl_error($ch).'('.curl_errno($ch).')');\r\n\t\t}\r\n\t\t// Extract the response details.\r\n\t\t$httpResponseAr = explode(\"&\", $httpResponse);\r\n\t\t$httpParsedResponseAr = array();\r\n\t\tforeach ($httpResponseAr as $i => $value) \r\n\t\t{\r\n\t\t\t$tmpAr = explode(\"=\", $value);\r\n\t\t\tif(sizeof($tmpAr) > 1)\r\n\t\t\t{\r\n\t\t\t\t$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) \r\n\t\t{\r\n\t\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\r\n\t\t}\r\n\t\treturn $httpParsedResponseAr;\r\n\t}", "title": "" }, { "docid": "45542f14b03d786e4af27bb3d9700eee", "score": "0.4781382", "text": "public function request($nvp)\n {\n $paypalmode = company()->getSuperConfigData('subscription.payment.paypal.sandbox_mode')\n ? '.sandbox'\n : '';\n \n $url = 'https://api-3t' . $paypalmode . '.paypal.com/nvp';\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n curl_setopt($ch, CURLOPT_TIMEOUT, 45);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $nvp);\n \n $result = curl_exec($ch);\n\n $httpResponse = explode(\"&\", $result);\n\n $httpParsedResponse = [];\n\n foreach ($httpResponse as $value) {\n $tmp = explode(\"=\", $value);\n\n if (sizeof($tmp) > 1) {\n $httpParsedResponse[$tmp[0]] = urldecode($tmp[1]);\n }\n }\n\n curl_close ($ch); \n\n return $httpParsedResponse;\n }", "title": "" }, { "docid": "c9a1fb273b624cc6653cfe845f953d5d", "score": "0.47756937", "text": "function paypal($paypal_post_vars = array())\r\n {\r\n if (!empty($paypal_post_vars))\r\n {\r\n $this->paypal_post_vars = $paypal_post_vars;\r\n }\r\n else\r\n {\r\n $this->paypal_post_vars = array();\r\n }\r\n }", "title": "" }, { "docid": "986e3434a34ac6ec43bd8146e1d56a9b", "score": "0.47732782", "text": "function validate_ipn() {\r\n // _POST vars into an arry so we can play with them from the calling\r\n // script.\r\n foreach ($_REQUEST as $field=>$value) { \r\n $this->ipn_data[\"$field\"] = $value;\r\n }\r\n \r\n }", "title": "" }, { "docid": "7d522ff24987e022eb673c0afa5f0d36", "score": "0.47665617", "text": "function PPHttpPost($methodName_, $nvpStr_) {\n\t\t$environment = 'live'; //or live\n\t\n\t\t// Set up your API credentials, PayPal end point, and API version.\n\t\t$API_UserName = urlencode('Dholte2391_api1.msn.com');\n\t\t$API_Password = urlencode('WQ8T9LD5AWP6NFAY');\n\t\t$API_Signature = urlencode('AfIrdy1KTmcPFtQvo6j3nUvvJlUiAsXxbtMGhxJrve76WioC9l5Fi1oi');\n\t\t$API_Endpoint = \"https://api-3t.paypal.com/nvp\";\n\n\t\t$version = urlencode('51.0');\n\t\n\t\t// Set the curl parameters.\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $API_Endpoint);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\n\t\t// Turn off the server and peer verification (TrustManager Concept).\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\t\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\t\n\t\t// Set the API operation, version, and API signature in the request.\n\t\t$nvpreq = \"METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_\";\n\t\n\t\t// Set the request as a POST FIELD for curl.\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);\n\t\t\n\t\t// Get response from the server.\n\t\t$httpResponse = curl_exec($ch);\n\t\n\t\tif(!$httpResponse) {\n\t\t\texit(\"$methodName_ failed: \".curl_error($ch).'('.curl_errno($ch).')');\n\t\t}\n\t\n\t\t// Extract the response details.\n\t\t$httpResponseAr = explode(\"&\", $httpResponse);\n\t\n\t\t$httpParsedResponseAr = array();\n\t\tforeach ($httpResponseAr as $i => $value) {\n\t\t\t$tmpAr = explode(\"=\", $value);\n\t\t\tif(sizeof($tmpAr) > 1) {\n\t\t\t\t$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];\n\t\t\t}\n\t\t}\n\t\n\t\tif((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n\t\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n\t\t}\n\t\n\t\treturn $httpParsedResponseAr;\n\t}", "title": "" }, { "docid": "e1f1a8480cd79d2cc588f4a361971f26", "score": "0.47631145", "text": "public function _getPaypalClientID(){ return $this->_getSettingsAttribute('paypal_clientid'); }", "title": "" }, { "docid": "6660b6b0740622e144ad6e030eca22a5", "score": "0.4748238", "text": "public function __construct()\n {\n if ( config('services.paypal.settings.mode') === 'live' ) {\n $this->paypalClientId = config('services.paypal.live_client_id');\n $this->paypalSecret \t= config('services.paypal.live_secret');\n } else {\n $this->paypalClientId = config('services.paypal.sandbox_client_id');\n $this->paypalSecret \t= config('services.paypal.sandbox_secret');\n }\n \n // Set the Paypal API Context/Credentials\n $this->paypalApiContext = new ApiContext( new OAuthTokenCredential($this->paypalClientId, $this->paypalSecret) );\n $this->paypalApiContext->setConfig( config('services.paypal.settings') );\n }", "title": "" }, { "docid": "83daafb25ff60aaa222b73f1228ac1da", "score": "0.4730025", "text": "function PPHttpPost($methodName_, $nvpStr_, $PayPalApiUsername, $PayPalApiPassword, $PayPalApiSignature) {\n\t\t$API_UserName = urlencode($PayPalApiUsername);\n\t\t$API_Password = urlencode($PayPalApiPassword);\n\t\t$API_Signature = urlencode($PayPalApiSignature);\n\t\t\n\t\t$paypalmode = ($PayPalMode=='sandbox') ? '.sandbox' : '';\n\t\t\n\t\t$API_Endpoint = \"https://api-3t\".$paypalmode.\"paypal.com/nvp\";\n\t\t$version = urlencode('109.0');\n\t\t\n\t\t// set the curl parameters\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $API_Endpoint);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\t\n\t\t // turning off the server and peer verification(TrustManager Concept)\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\t\n\t\t// set the API operation, NVPRequest for submitting to server\n\t\t$nvpreq = \"METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_\";\n\n\t\t// set the request(nvpreq) as a POST FIELD for curl\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);\n\t\t\n\t\t// getting response from server\n\t\t$httpResponse = curl_exec($ch);\n\n\t\tif(!$httpResponse) {\n\t\t\texit(\"$methodName_ failed: \".curl_error($ch).'('.curl_errno($ch).')');\n\t\t}\n\t\t\n\t\t// Extract the RefundTransaction response details\n\t\t$httpResponseAr = explode(\"&\", $httpResponse);\n\n\t\t$httpParsedResponseAr = array();\n\t\tforeach ($httpResponseAr as $i => $value) {\n\t\t\t$tmpAr = explode(\"=\", $value);\n\t\t\tif(sizeof($tmpAr) > 1) {\n\t\t\t\t$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];\n\t\t\t}\n\t\t}\n\n\t\tif((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n\t\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n\t\t}\n\n\t\treturn $httpParsedResponseAr;\n\t}", "title": "" }, { "docid": "f402bad76679295cf6687c29365f264c", "score": "0.47276172", "text": "function sort_ipn( array $ipn_data ){\n\n\t\t//PRELIMINARY CHECKS. CHECK USD currency and then receiver email address.\n\t\t \n\t\t$biz_email = ( $ipn_data[ 'ipn_sandbox' ] )? \"[email protected]\" : \"[email protected]\" ; //True= sandbox, False = live. \n\t\t\n \t\tif( ( !array_key_exists ( 'mc_currency', $ipn_data ) ) && ( strcmp( $ipn_data['mc_currency'], 'USD' ) !== 0 ) ){\n\t\t\t\n\t\t\temail_notice( 'Notice from IPN Relay - Currency Mismatch', \"MC_CURRENCY key did NOT exist in this transaction OR the currency was not set to USD. May be fraudulent. \\r\\n Sent from ipn_relay, Line 139. Here are the details: \\r\\n\". print_r( $ipn_data, true ) );\n\t\t\t\n\t\t\treturn false; \n\t\t} \n\t\t\n\t\tif( array_key_exists ( 'receiver_email', $ipn_data ) ){\n\t\t\t\t\t\t\n\t\t\tif( strcmp( $biz_email, $ipn_data['receiver_email'] ) !== 0 ){\n\t\t\t\t\n\t\t\t\temail_notice( 'Notice from IPN Relay - Business Email Mismatch', \"RECEIVER EMAIL key is set, however the email address doesn't fit! IPN_SANDBOX: {$ipn_data['ipn_sandbox']}, BIZ_EMAIL: $biz_email, IPN_DATA-RECEIVER EMAIL: {$ipn_data['receiver_email']}. May be fraudulent. \\r\\n Sent from ipn_relay, Line 148. Here are the details: \\r\\n\". print_r( $ipn_data, true ) );\n\t\t\t\n\t\t\t\treturn false; \n\t\t\t}\n\t\t\n\t\t} else {\n\t\t\t\n\t\t\temail_notice( 'Notice from IPN Relay - Business Email Missing', \"RECEIVER EMAIL key did NOT exist in this transaction. May be fraudulent. \\r\\n Sent from ipn_relay, Line 155. Here are the details: \\r\\n\". print_r( $ipn_data, true ) );\n\t\t\t\n\t\t\treturn false; \n\t\t} \n\t\t\n\t\t//END PRELIMINARY CHECKS\n\t\t//CHECK for TXN TYPE\n\t\t\n\t\t\n\t\t \n\t\tif( array_key_exists ( 'txn_type', $ipn_data ) ){\n\t\t\t\t\n\t\t\tswitch($ipn_data['txn_type']){\n\t\t\t\tcase 'send_money':\t\t// Payment received; source is the Send Money tab on the PayPal website\n\t\t\t\tcase 'subscr_payment':\t//Subscription payment received\n\t\t\t\tcase 'web_accept': \t\t//Payment received\n\t\t\t\t\tif( check_payment_ipn( $ipn_data ) ){\n\t\t\t\t\t\t//Perform some action to process transactions. \n\t\t\t\t\t\temail_notice( 'PASSED CHECK_PAYMENT_IPN', 'Line 178: We are here.' );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'subscr_signup':\t//Subscription started\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'subscr_cancel':\t//Subscription canceled\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'subscr_eot':\t\t//Subscription expired\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'subscr_failed': \t//Subscription payment failed\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'subscr_modify': \t//Subscription modified\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\temail_notice( 'Notice from IPN Relay - NBDT', \"TXN_TYPE key did NOT exist in this transaction. May be fraudulent. \\r\\n Here are the details: \\r\\n\". print_r( $ipn_data, true ) );\n\t\t\t\n\t\t\treturn false; //If txn_type isn't set, we shouldn't be going any further. \n\t\t}\t \n\t\t\n\t\t//error_log( \"The value of Data is: \". print_r( $data, true ) );\n\n\t\treturn true; \n}", "title": "" }, { "docid": "51df2c94cf570d040b2edff07d7e06a6", "score": "0.4712326", "text": "public function ipn(Request $request)\n {\n // skrill data - get more fields from Skrill Quick Checkout Integration Guide 7.9 (page 23)\n $transaction_id = $request->input('transaction_id');\n $mb_transaction_id = $request->input('mb_transaction_id');\n $invoice_id = $request->input('invoice_id'); // custom field\n $order_from = $request->input('order_from'); // custom field\n $customer_email = $request->input('customer_email'); // custom field\n $biller_email = $request->input('pay_from_email');\n $customer_id = $request->input('customer_id');\n $amount = $request->input('amount');\n $currency = $request->input('currency');\n $status = $request->input('status');\n\n // status message\n if ($status == '-2') {\n $status_message = 'Failed';\n } else if ($status == '2') {\n $status_message = 'Processed';\n } else if ($status == '0') {\n $status_message = 'Pending';\n } else if ($status == '-1') {\n $status_message = 'Cancelled';\n }\n\n // now store data to database\n $skrill_ipn = new SkrillPayment();\n $skrill_ipn->transaction_id = $transaction_id;\n $skrill_ipn->mb_transaction_id = $mb_transaction_id;\n $skrill_ipn->invoice_id = $invoice_id;\n $skrill_ipn->order_from = $order_from;\n $skrill_ipn->customer_email = $customer_email;\n $skrill_ipn->biller_email = $biller_email;\n $skrill_ipn->customer_id = $customer_id;\n $skrill_ipn->amount = $amount;\n $skrill_ipn->currency = $currency;\n $skrill_ipn->status = $status_message;\n $skrill_ipn->created_at = Date('Y-m-d H:i:s');\n $skrill_ipn->updated_at = Date('Y-m-d H:i:s');\n $skrill_ipn->save();\n }", "title": "" }, { "docid": "6aa1f7d3418104017d0802d70be4640b", "score": "0.4699179", "text": "function afterPaypalNotification($txnId){\n\t\t$paypal =& ClassRegistry::init('PaypalIpn.InstantPaymentNotification');\n\t\t\t\t\n\t\t$transaction = $paypal->findById($txnId);\n\t\t$paypal->id = $txnId;\n\t\t$paypal->saveField('site_id', $this->getSiteId());\n\t\t\n\t\t$this->log('IPN for txn: '.$txnId, 'paypal');\n\n\t\t//Tip: be sure to check the payment_status is complete because failure\n\t\t// are also saved to your database for review.\n\t\tswitch ($transaction['InstantPaymentNotification']['payment_status']) {\n\t\t\tcase 'Completed': case 'Pending':\n\t\t\t\t$this->log($transaction['InstantPaymentNotification']['id'].' was SUCCESSFUL', 'paypal');\t\n\t\t\t\t//Do work son\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$this->log($transaction['InstantPaymentNotification']['id'].' FAILURE!! Payment status: '.$transaction['InstantPaymentNotification']['payment_status'], 'paypal');\n\t\t\t\t//There was a problem\n\t\t\t\t$this->paypalTransactionError($transaction);\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "171222ae9786867625b2616157b15f5a", "score": "0.468374", "text": "function set_payPalURL($payPalURL){\n $this->payPalURL = $payPalURL;\n return $payPalURL;\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "dbe45efd0617f8674c30b104c8115c21", "score": "0.0", "text": "public function create($request, $response)\n {\n return $this->container->view->render($response, 'Place the appropriate view here', []);\n }", "title": "" } ]
[ { "docid": "65c7e51c557119c4523c305976c470bc", "score": "0.80575514", "text": "public function create()\n {\n return view('Admin.acl.resource.form');\n }", "title": "" }, { "docid": "bb87b5e7b03ebf8127b27e4ff14ee77c", "score": "0.7914315", "text": "public function create()\n {\n return view('Backend/Resources/addResource');\n }", "title": "" }, { "docid": "ffef4ac93b8831ae51d698379f4d9c1b", "score": "0.76836234", "text": "public function create()\n\t{\n\t\treturn view('resources.create');\n\t}", "title": "" }, { "docid": "2378dd3b14ed3946fdc33fe245647ae5", "score": "0.75997573", "text": "public function create()\n {\n $this->authorize('create', $this->resource->getModel());\n\n $this->data['data'] = [];\n $this->data['routeUrl'] = route($this->module->getName().'.store');\n $this->data['attributes'] = $this->resource->getAttributes();\n\n // $this->data['data'] = factory(\\Quill\\Post\\Models\\Post::class)->make();\n // $this->data['data']['id'] = null;\n // $this->data['data']['published_at'] = \\Carbon\\Carbon::now()->toDateTimeString();\n\n return view('vellum::form', $this->data);\n }", "title": "" }, { "docid": "4410c37acc7f709e86ccc730cb542643", "score": "0.75863165", "text": "public function create()\n {\n return view('admin.resources.create');\n }", "title": "" }, { "docid": "ee18d6d904526a51f41375d0bd093040", "score": "0.75147605", "text": "public function create()\n {\n $model = $this->resource;\n $resource = new Resource;\n $providers = User::whereType('provider')->orderby('name')->get();\n $categories = Category::where('parent_id', 0)->get();\n\n return view('backend.resources.create', compact('model', 'resource', 'providers', 'categories'));\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "14707811f9cdd58dcd07e882041856bc", "score": "0.74805194", "text": "public function create()\n\t{\n\t\treturn view('module.forms.create');\n\t}", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "ecbbca86f1ca5794847773f086d5685e", "score": "0.7357543", "text": "public function create()\n {\n return view('backend.client.formcreate');\n }", "title": "" }, { "docid": "e24406181475135438d05ab2d48d4b36", "score": "0.73556155", "text": "public function create()\n\t{\n\t\treturn view('form');\n\t}", "title": "" }, { "docid": "10d532d72b585493a6ca515a12bc3a2c", "score": "0.7321179", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/IAS/create');\n\n\t}", "title": "" }, { "docid": "517ede7d413126a1373684f8f17be2b9", "score": "0.7247568", "text": "public function create()\n {\n return view('clothing.form');\n }", "title": "" }, { "docid": "5016b1af29a2cdfd8f026421109d1142", "score": "0.7241239", "text": "public function action_new()\n\t{\n\t\t$id = $this->request->param('id');\n\n\t\tif ($id !== null)\n\t\t{\n\t\t\t$this->redirect(Route::url('supplier', array('action' => 'edit', 'id' => $id)));\n\t\t} // if\n\n\t\t$model = ORM::factory('Supplier');\n\n\t\t$this->content = View::factory('supplier/form', array(\n\t\t\t'title' => __('Create new supplier'),\n\t\t\t'supplier' => $model,\n\t\t\t'properties' => $model->get_properties(),\n\t\t\t'ajax_url' => Route::url('supplier', array('action' => 'save'))\n\t\t));\n\t}", "title": "" }, { "docid": "d777482ca48a952bda74d0486cdad76a", "score": "0.7237927", "text": "public function create()\n {\n return \"Here is the creating form page.\";\n }", "title": "" }, { "docid": "1e688bba9a7b271c2e7c26eb773383da", "score": "0.72305965", "text": "public function create()\n {\n //\n\n return view(\"student.form\");\n }", "title": "" }, { "docid": "1e47d9942ad3c42b28df121849c0197e", "score": "0.7225282", "text": "public function newAction()\n {\n $this->view->form = new PersonasForm(\n null,\n [\n 'edit' => true,\n ]\n );\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "fabe91e71192c05e656f9056b41ad668", "score": "0.72117", "text": "public function showCreateForm()\n {\n return view('admin.accounts.create');\n }", "title": "" }, { "docid": "e816b62a64c3324cff6ccbc00e52514b", "score": "0.7202654", "text": "public function frontCreate()\n {\n $resource = new Resource;\n $countries = Countries::all();\n $cities = City::orderby('name')->get();\n $categories = Category::with('subCategories')->whereParentId(0)->orderby('name')->get();\n\n return view('frontend.resources.create', compact(\n 'resource', 'countries', 'cities', 'categories'\n ));\n }", "title": "" }, { "docid": "a0f86f0603cbb921b500dd4fcb6185e6", "score": "0.71805054", "text": "public function create()\n {\n $data['action'] = 'absensi.store';\n return view('absensi.form', $data);\n }", "title": "" }, { "docid": "942a0a16c384247567b37ebeddf71971", "score": "0.7151351", "text": "public function create()\n {\n return view('Backend.student.new');\n }", "title": "" }, { "docid": "dc9ff50878e23f55a66dade7c29e9693", "score": "0.71423906", "text": "public function create()\n {\n return view('admin.trucks.forms.create');\n }", "title": "" }, { "docid": "b7f809ca4143f6da6ac8746ef0099f3a", "score": "0.71369606", "text": "public function create()\n {\n return view('backend.students.student-form-add');\n }", "title": "" }, { "docid": "0324ad3d56f56ecb8342812c78064a91", "score": "0.71342736", "text": "public function newAction()\n {\n $this->initializeScaffolding();\n\n $this->beforeNew();\n $this->view->form = $this->scaffolding->getForm();\n $this->afterNew();\n }", "title": "" }, { "docid": "871ecf60820ab50a5032377d975fc622", "score": "0.71342325", "text": "public function create()\n {\n return view('admin.ProviderCreateForm');\n }", "title": "" }, { "docid": "97209db276d73dfc71ffc10ef4a4037f", "score": "0.71315765", "text": "public function create()\n {\n return view('book.form');\n }", "title": "" }, { "docid": "1e082bee3084311021ae31460c5c0e39", "score": "0.7127698", "text": "public function create()\n {\n return view('forms.books.create');\n }", "title": "" }, { "docid": "fa54f02550ef87c9f8f5a27d06c382de", "score": "0.71258074", "text": "public function create() {\n return view('resources.edit');\n }", "title": "" }, { "docid": "33732dfef72a6d8b9b06cc792789e6df", "score": "0.71213603", "text": "public function create()\n\t{\n\t\treturn view('admin.product.form');\n\t}", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "d70c1ea684023a020e3557813873c2ca", "score": "0.70956016", "text": "public function create()\n {\n $sPageTitle = $this->sName;\n \n $aRepositories = Dataflow::getRepositories();\n \n return view($this->sPath.'/form', compact('sPageTitle', 'aRepositories'));\n }", "title": "" }, { "docid": "a5962b732b317d8491e1cd29bddb79a5", "score": "0.7095086", "text": "public function create()\n {\n //Retrieve all the otter resource names that are available\n $allResourceNames = $this->allResourceNames;\n $prettyResourceName = $this->prettyResourceName;\n $resourceName = $this->resourceName;\n $resource = $this->resource;\n $resourceFields = json_encode($resource::fields());\n $relationalFields = json_encode(Otter::getRelationalFields($resource));\n\n $validationRules = ($resource::validations() && $resource::validations()['client'] && $resource::validations()['client']['create']) ? $resource::validations()['client']['create'] : null;\n $validationFields = json_encode($validationRules);\n\n return view('otter::pages.create', compact('allResourceNames', 'prettyResourceName', 'resourceName', 'resourceFields', 'relationalFields', 'validationFields'));\n }", "title": "" }, { "docid": "4b38db6737bb3fb8f108037fd62385fc", "score": "0.70905846", "text": "public function create()\n {\n return view('enterprise.new');\n }", "title": "" }, { "docid": "a3472bb62fbfd95113a02e6ab298fb16", "score": "0.705323", "text": "public function create()\n {\n return view('admin.new.create');\n }", "title": "" }, { "docid": "0ed27c8268deedd7d778400898a3117f", "score": "0.7051436", "text": "public function create()\n\t{\n return View::make('clerks.create');\n\t}", "title": "" }, { "docid": "991f766d6ac0e5a6f0b81f6a7483c64a", "score": "0.7049206", "text": "public function create()\n {\n //\n $page_title = 'Supplier';\n $page_description = 'Supplier Add Form';\n $form_title = 'Supplier - Add';\n $form_description = 'Enter details to add new supplier , field with * are required.';\n $supplier = new Supplier();\n return view('pages.masterfiles.profiles.supplier.add', compact('page_title', 'page_description','form_title', 'form_description', 'supplier'));\n }", "title": "" }, { "docid": "9954664a9c6b9b3ab69721566e0199bc", "score": "0.7044138", "text": "public function create()\n {\n $source = $this->source();\n $category = $this->category();\n $subcategory = $this->subcategory();\n $subject = $this->subject();\n $record = $this->record();\n $media = $this->media();\n $language = $this->language();\n $location = $this->location();\n return view('website.form', compact('source', 'category', 'subcategory', 'subject', 'record', 'media', 'language', 'location'));\n }", "title": "" }, { "docid": "47df4583b4b1b0f104234ead33b0b361", "score": "0.7041365", "text": "public function create() {\n return view(\"ir.create\");\n }", "title": "" }, { "docid": "23ef4c6aae4638b7258db6105822d281", "score": "0.70397395", "text": "public function create()\n {\n $data['action'] = 'jadwalbelajar.store';\n return view ('jadwalbelajar.form', $data);\n }", "title": "" }, { "docid": "7bbb0d78cadef3c44a577d92d50a3e67", "score": "0.70380855", "text": "public function create()\n {\n $resources = Resource::all();\n return view('product.create', compact('resources'));\n }", "title": "" }, { "docid": "45f9c7429c98bc848636cf3e3af4a0b7", "score": "0.70367175", "text": "public function create()\n\t{\n\t\treturn view('admin.show.create');\n\t}", "title": "" }, { "docid": "4d21f7c9cf42b4d85338aca053e91032", "score": "0.70324284", "text": "public function create()\r\n {\r\n $title = trans('book.new');\r\n $this->generateParam();\r\n return view('layouts.create', compact('title'));\r\n }", "title": "" }, { "docid": "3be30800c76364ece9bf10bfffd9d576", "score": "0.7022247", "text": "public function create()\n {\n return view('penerbit.form');\n }", "title": "" }, { "docid": "5210b9361957c963c05861d35648076b", "score": "0.70178825", "text": "public function create()\n {\n $formInputs = $this->form();\n $formInputs['method'] = 'create';\n\n\n return view('students.create', compact('formInputs'));\n }", "title": "" }, { "docid": "804a6ca9dad7489200cc1f28102b0473", "score": "0.7002272", "text": "public function create()\n {\n return view('admin.restaurents.create');\n }", "title": "" }, { "docid": "e3189bc5490f564078b663c86cd3b554", "score": "0.69995284", "text": "public function create()\n {\n return view('admin.clubes.form')\n ->with(['action' => route('clubes.store')]);\n }", "title": "" }, { "docid": "27a713091aa62f5f81eb6b7a09310814", "score": "0.6997733", "text": "public function create()\n {\n return view('project.form');\n }", "title": "" }, { "docid": "76ecd9f94330c8bff719dad38ac5e742", "score": "0.69919205", "text": "public function create()\n {\n return view('forms.newPoetry');\n }", "title": "" }, { "docid": "75773cfa50c8a890d093cd7b4128f44b", "score": "0.6984025", "text": "public function create()\n {\n // INI REDIRECT KE HALAMAN FORM INPUT\n return view('admin.create');\n }", "title": "" }, { "docid": "c3119b97c0e321666818c6fe3e6116b4", "score": "0.697933", "text": "public function create()\n {\n return view($this->viewRoute.'.form');\n }", "title": "" }, { "docid": "7a36d29ededb118e48dc1f2b35700e81", "score": "0.697282", "text": "public function create()\n {\n //\n return view(\"billproducts.createForm\");\n }", "title": "" }, { "docid": "986fd11f3e8bfa985b902a8006b7d306", "score": "0.6968721", "text": "public function create()\n\t{\n\t\t$forms \t= $this->form_add();\n\t\t$custom_add = $disable_add = $disable_edit = $disable_delete = false;\n\n\t\tif(isset($this->disable_add))\n\t\t\t$disable_add = $this->disable_add;\n\n\t\tif(isset($this->disable_edit))\n\t\t\t$disable_edit = $this->disable_edit;\n\n\t\tif(isset($this->disable_delete))\n\t\t\t$disable_delete = $this->disable_delete;\n\n\t\tif(isset($this->custom_add))\n\t\t\t$custom_add = $this->custom_add;\n\n\t\treturn View::make('crud.create' , \n\t\t\tarray(\t\n\t\t\t\t'forms' \t\t\t=> $forms,\n\t\t\t\t'title'\t\t\t\t=> $this->title,\n\t\t\t\t'slug'\t\t\t\t=> $this->slug,\n\t\t\t\t'form_span'\t\t\t=> $this->form_span,\n\t\t\t\t'controller'\t\t=> $this->controller,\n\t\t\t\t'disable_edit'\t\t=> $disable_edit,\n\t\t\t\t'disable_delete' \t=> $disable_delete,\n\t\t\t\t'disable_add'\t\t=> $disable_add,\n\t\t\t\t'custom_add'\t\t=> $custom_add\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "8ced93e50c35698f25fcb388d463e032", "score": "0.6958418", "text": "public function create()\n {\n return view(\"pages.daftar.form\");\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6958075", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "5225b1fd92184a478b2b9762321d1c23", "score": "0.69497955", "text": "public function create()\n {\n return view('hiperbolica.create');\n }", "title": "" }, { "docid": "593fbba523a02dd32ffe7ecf4fd50435", "score": "0.6946303", "text": "public function create()\n {\n return view('admin.site.form');\n }", "title": "" }, { "docid": "5700bb5603b363af554c788e226eff17", "score": "0.6945535", "text": "public function newAction()\n {\n $entity = new Reconocimiento();\n $form = $this->createForm(new ReconocimientoType(), $entity);\n\n return $this->render('SystemAdministracionBundle:Reconocimiento:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "12fd2eae40d48367c7e6d8331f5ead34", "score": "0.69429785", "text": "public function create()\n\t{\n\t\t//\n return View::make('objects.addnew');\n\t}", "title": "" }, { "docid": "c7310471f43f53eaf4b8eff6831b36d3", "score": "0.6939984", "text": "public function create()\n {\n return view('linhas.create');\n }", "title": "" }, { "docid": "ad623548153e56c22245e48fee70a80f", "score": "0.69390464", "text": "public function create()\n {\n $data['url'] = route($this->route . '.store');\n $data['title'] = __('Add').' '. __($this->label);\n $data['resourcePath'] = $this->view;\n $data['route'] = $this->route;\n\n return view('admin.general.create')->with($data);\n }", "title": "" }, { "docid": "6339cf25fff656067a9eaf3d5b7efb2a", "score": "0.6938875", "text": "public function create()\n {\n return view('admin.banner.banner-form')->with('title','add');\n }", "title": "" }, { "docid": "517e8eef100389973418652d54a823b1", "score": "0.69366604", "text": "public function create()\n {\n //no create view as ther create form is on the index page\n }", "title": "" }, { "docid": "9dc7ce932c1b23a833528346de52d671", "score": "0.69311243", "text": "public function create()\n {\n return view('admin.electrician.add');\n }", "title": "" }, { "docid": "a44e07047efd0e153e9c966db5bdabd0", "score": "0.69306445", "text": "public function create()\n {\n return view('dashboard.student.studentForm');\n }", "title": "" }, { "docid": "0b0f0931a087bfbc6677280f914ebfda", "score": "0.69298023", "text": "public function create()\n {\n return view('hocsinh.add');\n }", "title": "" }, { "docid": "8c2948fcee8393ed6a20bf84afb9cc88", "score": "0.6928795", "text": "public function create()\n {\n return view('manage.add');\n }", "title": "" }, { "docid": "1ba5eb9946214bea84f1480b6feabe1f", "score": "0.69276893", "text": "public function create()\n {\n return view('bspyl-form');\n }", "title": "" }, { "docid": "07e409b45065624d003704ab3b447aec", "score": "0.69273114", "text": "public function create()\n {\n return view('admin.product.form');\n }", "title": "" }, { "docid": "5ed8a37a585288e035b28ed478757c41", "score": "0.6921601", "text": "public function create()\n {\n return view('elonlars.create');\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "9a0129f9c2c01a078afcdd438cc75b1f", "score": "0.69172627", "text": "public function create()\n {\n return view('vestiti.form');\n }", "title": "" }, { "docid": "92274cb7faf3de5d13f627815b8f4ba2", "score": "0.69144803", "text": "public function create()\n {\n\n //\n\n return view('addinformation');\n\n }", "title": "" }, { "docid": "8a7c33d5844900cbaaaebde7aa21e4dd", "score": "0.6911652", "text": "public function formCreateAction() {\n $this->view->form = new PartnersForm();\n }", "title": "" }, { "docid": "b43d8bd2e5fa832f2b86d77c64e5ad10", "score": "0.69116175", "text": "public function create()\n {\n $supplier = new Supplier;\n return view('supplierForm')->with('supplier',$supplier);\n }", "title": "" }, { "docid": "d6d7c0a46ec7af65d934ca4831a12435", "score": "0.6911027", "text": "public function create()\n {\n $this->authorize(__FUNCTION__);\n\n $specie = new Specie;\n\n return view('species.form')->with(['specie' => $specie]);\n }", "title": "" }, { "docid": "d0a17dffa7cd331b95da26311bfaf458", "score": "0.69106084", "text": "public function create()\n {\n return view('backend.actions.create');\n }", "title": "" }, { "docid": "bf90fc181239c9ee309df9b686f918de", "score": "0.69096845", "text": "public function create()\n {\n return view('kontraktor::create');\n }", "title": "" }, { "docid": "a8868117c6271a1bf9acf9032ad876bd", "score": "0.6908564", "text": "public function create()\n {\n return view('admin.new');\n }", "title": "" }, { "docid": "2b077d4213a9e74657f7368e00d5d96e", "score": "0.69072443", "text": "public function create()\n\t{\n\t\t$person = new Person;\n \n return view('admin.people.form', ['person' => $person]); \n\t}", "title": "" }, { "docid": "8cfed7c03b1c2f9d9fc6996ae61ff1e3", "score": "0.6906446", "text": "public function create()\n {\n return view('admin.users.forms.create');\n }", "title": "" }, { "docid": "12c04608837ced3906ffa6fd0839aefc", "score": "0.6904492", "text": "public function create()\n {\n // return view('formname.create');\n }", "title": "" }, { "docid": "6fe9753acadb65e60f24f2784b8c57e8", "score": "0.6903352", "text": "public function create()\n {\n return view('showCreate');\n }", "title": "" }, { "docid": "be0ad6355f1cd2d306c6632b0178efe9", "score": "0.69000477", "text": "public function create()\n {\n return view('comuni.add');\n }", "title": "" }, { "docid": "1b96ed3b5237de2d9b8b93a0082346de", "score": "0.6898089", "text": "public function create()\n\t{\n $theme = $this->theme;\n $theme->set('title','New Employee');\n\n return $theme->layout('form')->scope('employees.create')->render();\n\t}", "title": "" }, { "docid": "c05139fcffc8ed34edf664b1dcababe1", "score": "0.6897515", "text": "public function actionCreate()\n {\n $this->layout = 'principal2';\n $model = new Registros();\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 }", "title": "" }, { "docid": "8f937ad7c5f9325dd1c12c02346f01a1", "score": "0.6897389", "text": "public function create()\n {\n return view('Job.form');\n }", "title": "" }, { "docid": "c6e630a8785e77f2934d7509a0426ed1", "score": "0.68941396", "text": "public function newAction()\n {\n $entity = new Formations();\n $form = $this->createCreateForm($entity);\n\n\n return $this->render('FormBundle:Formations:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "f8dbbd8eb79b47b7dd8cbe07d9f8aa6c", "score": "0.68926984", "text": "public function create()\n {\n \n return view('falta.create'\n );\n }", "title": "" }, { "docid": "9d3fa77955670de89373a055d00ff3f2", "score": "0.68926096", "text": "public function create()\n {\n return view('terapis.create');\n }", "title": "" }, { "docid": "3ff70187ad516bfc1251de194f42b7f8", "score": "0.6892582", "text": "public function create()\n {\n //\n $title = 'Add Partner';\n return view('partnercompany.create_edit')->with(compact('title'));\n }", "title": "" }, { "docid": "ee157e1835fe293cefd0eceeafc16825", "score": "0.68916535", "text": "public function create()\n {\n return view('question.new');\n }", "title": "" }, { "docid": "eaeda1b26ca65d0dd32dbeb43e442328", "score": "0.6891185", "text": "public function create()\n\t{\n\t\treturn View::make('Client.newClient')->with(array('title' => 'Add Client'));\n\t}", "title": "" } ]
a7fd0db20dfc9fd23fc67168e1e6020a
Send a new message when only a raw text part.
[ { "docid": "b79e188c8e4fb328da3e61abb1dfdcaf", "score": "0.54967433", "text": "public function raw(string $text, $callback): Receipt\n {\n return $this->send(['raw' => $text], [], $callback);\n }", "title": "" } ]
[ { "docid": "bb2e4c7996055f98153408cf564f7730", "score": "0.67297775", "text": "public function sendText($text);", "title": "" }, { "docid": "d89cfb77e479ad97247a79a2ac5f3204", "score": "0.61597365", "text": "public function sendRaw($text){\n\t\tfwrite($this->server['SOCKET'], $text, strlen($text));\n\t}", "title": "" }, { "docid": "149f8f29d174c33be2ebd7804af48f8d", "score": "0.6078257", "text": "public function send($text)\n {\n $this->_params['text'] = $text;\n\n parent::send($text);\n }", "title": "" }, { "docid": "8f13bffb08318e6093849b83715dd4da", "score": "0.5941647", "text": "public function onMemberTexted(TextReceivedEvent $event)\n {\n $chat = $this->prepareChat($event->getMessage()->chat);\n $this->processTextedMember($event->getMessage()->from, $chat);\n\n // Flush changes\n $this->getDoctrine()\n ->getManager()\n ->flush();\n\n // NB: This handler SHALL NOT mark request as handled. We just update ChatMember\n // silently\n }", "title": "" }, { "docid": "47230e523b5ec1b76d91757b625ea09e", "score": "0.5900933", "text": "public function setPlainTextBody($text);", "title": "" }, { "docid": "9045e323732ffd8cd426814165437d80", "score": "0.5882679", "text": "public function msgText($text)\n {\n $this->isHTML(false);\n $text = self::html2text($text, true);\n $text = self::normalizeBreaks($text);\n $this->Body = $text;\n }", "title": "" }, { "docid": "f02126458d503f0e3ec56ae780930523", "score": "0.5834105", "text": "public function testShouldSendTextMessage()\n {\n $response = $this->client->send('some-channel', 'payload');\n\n $this->assertEquals(\n Message::text('some-channel', 'payload')->encode(),\n $response->response\n );\n }", "title": "" }, { "docid": "b523e9460586b690e5d9b63fc5cd3299", "score": "0.58300036", "text": "function process_text_request($postObj) {\n\t$textMessage = trim ( $postObj->Content );\n\terror_log ( \"The message from client is:\" . $textMessage );\n\tswitch ($textMessage) {\n\t\tcase 'T' :\n\t\tcase \"t\" :\n\t\t\ttest_post_text_interface ( $postObj, \"Hi, welcom to James Karl's club!\" );\n\t\t\tbreak;\n\t\tcase 'M' :\n\t\tcase 'm' :\n\t\t\ttest_post_music_interface ( $postObj );\n\t\t\tbreak;\n\t\tcase 'n':\n\t\tcase 'N':\n\t\t\ttest_post_news_msg($postObj);\n\t\t\tbreak;\n\t\tdefault :\n\t\t\techo post_text_msg ( $postObj->ToUserName, $postObj->FromUserName, \"Reply the character bellow to complete your request.\" . \"\\nT: text \\nM: music\\nN: article\t\n\t\t\t\t\t\");\n\t}\n}", "title": "" }, { "docid": "b6839894035b15d2877a2496aedb24c7", "score": "0.58102614", "text": "function SetTextRaw($text){}", "title": "" }, { "docid": "3c12fd36d9f0635d3d074c2cc22a14ae", "score": "0.5782024", "text": "function sendTextMessage ( $text, $isCommand = false ) {\n\n if(empty($this->receiver) && empty($this->client)) {\n return false;\n }\n\n if( $isCommand ) {\n $maxLen = 64;\n $packetType = ISP_MST;\n } else {\n $maxLen = 96;\n $packetType = ISP_MSX;\n }\n\n if(strlen($text) > $maxLen) {\n while($i < strlen($text)) {\n $string = substr($text, $i, $maxLen-1);\n\n $packet = pack(\"c\", $maxLen+4);\n $packet .= pack(\"c\", $packetType);\n $packet .= pack(\"c\", 1);\n $packet .= pack(\"c\", 0);\n $packet .= str_pad($string, $maxLen, \"\\0\");\n\n if($this->debug) echo \"sending partial message '\" . $string . \"'\\n\";\n fwrite($this->client, $packet, strlen($packet)); // Third parameter to make PHP ignore magic_quotes-setting\n $i += strlen($string);\n }\n } else {\n // Will send a text message to the server\n $packet = pack(\"c\", $maxLen+4);\n $packet .= pack(\"c\", $packetType);\n $packet .= pack(\"c\", 1);\n $packet .= pack(\"c\", 0);\n $packet .= str_pad($text, $maxLen, \"\\0\");\n // Send packet\n if($this->debug) echo \"sending message '\" . $text . \"'\\n\";\n fwrite($this->client, $packet, strlen($packet)); // Third parameter to make PHP ignore magic_quotes-setting\";\n }\n }", "title": "" }, { "docid": "4a5ec5a7a87a4a9378b62f95329234e7", "score": "0.57607603", "text": "public function onPrivateText( Event $event )\n {\n $text = $event->getMessageText();\n\n if ( preg_match( $regexp = '#^(.*), \\[([^]]+)\\]\\n(.*?)$#m', $text, $matches) )\n {\n // multi-line telegram-x format\n $text = preg_replace($regexp,'<\\1> \\3',$text); // make <name> text lines\n $text = preg_replace('#\\n+#m','\\n',$text); // change newlines to special newline\n $text = '['.$matches[2].']\\n'.trim($text); // add date\n }\n elseif (preg_match_all('#^(.*):#m', $text, $matches, PREG_OFFSET_CAPTURE))\n {\n // multi-line telegram format\n $result = [];\n foreach ($matches[1] as $num => $match)\n {\n $start = strlen($match[0])+2+$match[1]; // calculate start of message by adding length of name to start offset\n $message = isset($matches[1][$num+1][1]) // if next match exists\n ? substr( $text, $start, $matches[1][$num+1][1] - $start) // get text from start to next offset\n : substr( $text, $start) // otherwise get all\n ;\n $message = preg_replace('#\\n+#m','\\n',trim( $message )); // replace newlines with special newline\n $result[] = \"<$match[0]> $message\";\n }\n $text = implode('\\n', $result);\n }\n else\n {\n // old-school, IRC-joker format\n $text = trim($text);\n $text = preg_replace('#\\n+#m','\\n',$text); // replace newlines with special newlines\n $text = preg_replace('#\\s+#m',' ',$text); // replace long spaces to normal spaces\n }\n\n file_put_contents( $this->getOption('dir') . '/!tg.txt', PHP_EOL.$text, FILE_APPEND);\n\n // return last joke\n $joke = $this->getJoke( \"!tg\", \"last\" );\n $event->answerMessage( \"Added: $joke\" );\n return false;\n }", "title": "" }, { "docid": "238f00ccb284c8b425417ee1856f5373", "score": "0.57454526", "text": "private function addTextPart(&$message)\n {\n $params['content_type'] = 'text/plain';\n $params['encoding'] = $this->build_params['text_encoding']->getType();\n $params['charset'] = $this->build_params['text_charset'];\n\n if (!empty($message)) {\n $message->addSubpart($this->text, $params);\n } else {\n $message = new Mail_mimePart($this->text, $params);\n }\n }", "title": "" }, { "docid": "9a55ad84be40b05b935af812a9ea8a38", "score": "0.55824095", "text": "public function testShouldSendRawMessage()\n {\n $msg = new Message(\n Message::TEXT,\n \"channel\",\n ['header-key' => 'header-value'],\n ['payload-key' => 'payload-value']\n );\n\n $response = $this->client->sendMessage($msg);\n\n $this->assertEquals($msg->encode(), $response->response);\n }", "title": "" }, { "docid": "fd0c4c97fd7c8e8467d64e3dbcebd294", "score": "0.5563117", "text": "public function once()\n {\n $this->replyWithMessage([\n 'text' => $this->getText()\n ]);\n }", "title": "" }, { "docid": "58d971c68e609e7eefd7301f764c18de", "score": "0.54901624", "text": "public function raw($text, $callback)\n {\n return $this->send(['raw' => $text], [], $callback);\n }", "title": "" }, { "docid": "40d89821ebb2d6bc8c4010ed26945514", "score": "0.54597163", "text": "function handleText($answer,$senderId,$accessToken,$senderData){\n efectoTypingOn($answer,$senderId,$accessToken,$senderData);\n $response = [\n 'recipient' => ['id' => $senderId],\n 'message' => [ 'text' => $answer]\n ];\n facebookApiCall($response,$accessToken,$senderData);\n }", "title": "" }, { "docid": "4dd7fed4fb089629c4cde2251ee404a1", "score": "0.5449976", "text": "function beginText() {\n $this->_stream .= \"BT\\n\";\n }", "title": "" }, { "docid": "811118035792c5b194a8f9dc11a97c69", "score": "0.5444733", "text": "function sendText ( $to, $from, $message, $unicode=null ) {\n\t\n\t\t// Making sure strings are UTF-8 encoded\n\t\tif ( !is_numeric($from) && !mb_check_encoding($from, 'UTF-8') ) {\n\t\t\ttrigger_error('$from needs to be a valid UTF-8 encoded string');\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !mb_check_encoding($message, 'UTF-8') ) {\n\t\t\ttrigger_error('$message needs to be a valid UTF-8 encoded string');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif ($unicode === null) {\n\t\t\t$containsUnicode = max(array_map('ord', str_split($message))) > 127;\n\t\t} else {\n\t\t\t$containsUnicode = (bool)$unicode;\n\t\t}\n\t\t\n\t\t// Make sure $from is valid\n\t\t$from = $this->validateOriginator($from);\n\n\t\t// URL Encode\n\t\t$from = urlencode( $from );\n\t\t$message = urlencode( $message );\n\t\t\n\t\t// Send away!\n\t\t$post = array(\n\t\t\t'from' => $from,\n\t\t\t'to' => $to,\n\t\t\t'text' => $message,\n\t\t\t'type' => $containsUnicode ? 'unicode' : 'text'\n\t\t);\n\t\treturn $this->sendRequest ( $post );\n\t\t\n\t}", "title": "" }, { "docid": "d6d5e9202236ce07591615ddd04248a7", "score": "0.5439538", "text": "function AddTextRaw($text, $length=-1){}", "title": "" }, { "docid": "4a6489e377b3b4abe5338faaa75c09f8", "score": "0.54334813", "text": "abstract function receiveRawMessage($data);", "title": "" }, { "docid": "a04c053d2ea1393ffd76ac6335685f92", "score": "0.5398967", "text": "function sendText($from,$to,$text)\n {\n $post = array(\n 'api_key' => $this->_apikey,\n 'api_secret' => $this->_secret,\n 'from' => '',\n 'to' => '',\n 'text' => '',\n 'type' => 'unicode',\n );\n\n $ch = self::_curl_init($uri);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n $ret = self::_curl_exec($ch);\n print_r($ch);\n }", "title": "" }, { "docid": "d88b11c3fb66d9e26a82b1f562b8928f", "score": "0.5370689", "text": "protected function message($text)\n {\n if (PHP_SAPI !== 'cli') {\n $text = '<p>' . $text . '</p>' . PHP_EOL;\n }\n\n echo $text . PHP_EOL;\n }", "title": "" }, { "docid": "73064f22b456244dfb449484f77ee69e", "score": "0.53626686", "text": "public function sendLiveChatMessage()\n {\n //Get user ID\n $user = User::find(Auth::user()->id);\n //Get the message\n $textMessage = request()->textMessage;\n\n // by default inappropriate word is false;\n $inappropriateWord = $this->checkInappropriateWord($textMessage);\n\n $emptyTextMessage = $this->checkEmptyWord($textMessage);\n\n //if it contains inappropriate word, then chat should not allow to send this.\n if ($emptyTextMessage) {\n return \"empty\";\n } else if ($inappropriateWord) {\n return \"inappropriate\";\n } else {\n\n //Create a new conversation model that store the new message\n $conversation = new Conversation();\n //set message\n $conversation->message = $textMessage;\n //Set the name\n if (request()->anonymous == 0) {\n $conversation->fullName = $user->name;\n } else {\n $conversation->fullName = \"Anonymous\";\n }\n //Set the module\n //Get the first choice module from the current user\n $firstChoiceModule = FirstChoiceUserModule::where('user_id', '=', $user->id)->first()->module_id;\n $conversation->user_id = $user->id;\n $conversation->module_id = $firstChoiceModule;\n $conversation->created_at = Carbon::now()->addSeconds(1);\n //save the conversation\n $conversation->save();\n\n return $textMessage;\n }\n }", "title": "" }, { "docid": "820f8e313b1dae3d1d65f33b1167b92c", "score": "0.5345021", "text": "function AppendTextRaw($text, $length=-1){}", "title": "" }, { "docid": "1b2ce835d94f0d66d1311d6ceda1f6e9", "score": "0.5341841", "text": "public function addRawText( $data )\r\n {\tif ( strpos($this->text, $data) !== false )\r\n $this->text .= $data ;\r\n\r\n\treturn strpos($this->text, $data);\r\n }", "title": "" }, { "docid": "07873ce660484a0359c65fb97e98055a", "score": "0.532137", "text": "protected function addContent(\n MessageContract $message,\n ?string $view,\n ?string $plain,\n ?string $raw,\n array $data\n ): void {\n if ($view !== null) {\n $message->setBody($this->createView($view, $data), 'text/html');\n }\n\n if ($plain !== null) {\n $method = $view !== null ? 'addPart' : 'setBody';\n\n $message->{$method}($this->createView($plain, $data), 'text/plain');\n }\n\n if ($raw !== null) {\n $method = ($view !== null || $plain !== null) ? 'addPart' : 'setBody';\n\n $message->{$method}($raw, 'text/plain');\n }\n }", "title": "" }, { "docid": "263d2af01fafb2e7ea2e8eb1660998f1", "score": "0.5319508", "text": "function setMessageText($newText) {\r\n $this->m_Text = $newText;\r\n }", "title": "" }, { "docid": "68a74bd82332e61428636553e9028af9", "score": "0.5312688", "text": "protected function message($text)\n {\n if (!$this->isCLI()) {\n $text = '<p>' . $text . '</p>' . PHP_EOL;\n }\n\n echo $text . PHP_EOL;\n }", "title": "" }, { "docid": "ba7da26c6ac40e1b1b4419fc1e989020", "score": "0.5308315", "text": "public function sendText($text,$location,$sendAs=0){\n switch($sendAs){\n case '1':\n $protocol = \"NOTICE\";\n break;\n default:\n $protocol = \"PRIVMSG\";\n break;\n }\n self::write($protocol . \" \" . $location . \" :\" . $text);\n }", "title": "" }, { "docid": "bf386719d4c476f7dd8ec6ca4bd2a524", "score": "0.5303946", "text": "abstract public function sendDirectly(dropr_Client_Message $message);", "title": "" }, { "docid": "4a4d4d699892e1deb606734f5844f4f6", "score": "0.52975345", "text": "protected function handle_new_message($object)\n {\n $temp_file_name = __DIR__ . \"/../temp/message_{$this->peer_id}-{$this->from_id}.json\";\n $file_exists = file_exists($temp_file_name);\n $temp_data = $file_exists ?\n json_decode(file_get_contents($temp_file_name), true) : [];\n\n // Delete leading response text\n $text = preg_replace('/^.*?\\[club.+?\\][\\s,]*/uim', '', $object['text']);\n // Check for debug mode\n if (preg_match('/^--debug/ui', $text)) {\n $text = preg_replace('/^--debug\\s*/ui', '', $text);\n $this->debug_mode = true;\n }\n $text = trim($text);\n\n $msg = '';\n\n if ($this->debug_mode && isset($temp_data['func']))\n $msg .= \"Temp data function: {$temp_data['func']}\\n\";\n\n // Delete messages if requested\n if (isset($temp_data['delete_msg'])) {\n VkApi::delete_message($temp_data['delete_msg']);\n unset($temp_data['delete_msg']);\n }\n\n // Handle previous request\n if (isset($temp_data['func']) && isset($temp_data['expected']) &&\n in_array(mb_strtolower($text), $temp_data['expected'])):\n $msg = call_user_func([$this, $temp_data['func']], $text, $temp_data);\n elseif (preg_match(Phrases::REGEX['ADD_WEEKEND'], $text)):\n $msg .= $this->add_weekend($text);\n elseif (preg_match(Phrases::REGEX['REMOVE_WEEKEND'], $text)):\n $msg .= $this->delete_weekend($text);\n elseif (preg_match(Phrases::REGEX['ADD_HOMEWORK'], $text)): // Add homework\n $msg .= $this->set_homework($text);\n elseif (preg_match(Phrases::REGEX['GET_HOMEWORK'], $text)): // Get homework\n $msg .= $this->get_homework($text);\n elseif (preg_match(Phrases::REGEX['REMOVE_HOMEWORK'], $text)): // Delete homework\n $msg .= $this->delete_homework($text);\n elseif (preg_match(Phrases::REGEX['CHECK_VACATIONS'], $text)): // Check vacations\n $msg .= $this->get_vacations();\n elseif (preg_match(Phrases::REGEX['CHANGE_VACATIONS'], $text)):\n $msg .= $this->change_vacations($text);\n else:\n foreach (Phrases::PREDEFINED as $regex => $answers) if (preg_match($regex . 'ui', $text)) {\n $msg .= $answers[mt_rand(0, count($answers) - 1)];\n break;\n }\n endif;\n\n if(DEV_MODE) echo $msg.\"\\n\\n\";\n else if (trim($msg) !== '') $this->send_message($msg);\n\n // Save/clear temp data\n if(!empty($this->temp_data))\n file_put_contents($temp_file_name, json_encode(array_merge($this->temp_data, [\n 'time' => time(),\n ]), JSON_UNESCAPED_UNICODE));\n else if($file_exists)\n unlink($temp_file_name);\n\n }", "title": "" }, { "docid": "77c0ebeff62b611a68d35f51ecb51345", "score": "0.5255767", "text": "function InsertTextRaw($pos, $text){}", "title": "" }, { "docid": "00fda58a15f17a1840d371225878cf03", "score": "0.5245744", "text": "public function defineText($text)\n {\n $this->message['text'] = $text;\n }", "title": "" }, { "docid": "1d9d69cbcf2d8509aa8a0dd9f9fd1aae", "score": "0.5235969", "text": "public function update( MessageHandle $handle, $targetText );", "title": "" }, { "docid": "4d0ede98c8933d88f3f2b8fb9fefa9c7", "score": "0.5221699", "text": "public function testGetRawMessage()\n {\n $this->markTestIncomplete(\n 'Test of \"getRawMessage\" method has not been implemented yet.'\n );\n }", "title": "" }, { "docid": "d7d913022d63eb72158ca6098ef7c6e1", "score": "0.52195346", "text": "public function body($text)\n {\n $this->text = $text;\n }", "title": "" }, { "docid": "9ec39ee6b7a62f23dde9c8bcc110f07a", "score": "0.52160054", "text": "abstract function sendMessage($screenname, $body);", "title": "" }, { "docid": "8795fb9290404272112b373fb1dff50b", "score": "0.5178439", "text": "abstract public function send();", "title": "" }, { "docid": "d1563d09221eac821106537a6ccc32c1", "score": "0.51663387", "text": "private function handleWorkData($raw){\n\t\tlist($handle,$data) = explode(\"\\0\",$raw);\n\t\t$client = $this->getJobClient($handle);\n\t\tif(!empty($client) && !empty($client['connection'])){\n\t\t\t$client['connection']->sendResponse(self::WORK_DATA, $raw);\n\t\t}\n\t}", "title": "" }, { "docid": "b9b4564da5b4887db5fed3def0121426", "score": "0.51140076", "text": "public function setBody(string $text);", "title": "" }, { "docid": "1e37b1f5c3a41648c83fbf52ff85768d", "score": "0.51062155", "text": "function sendDirectMessage( $user, $text )\n\t{\n\t if( !in_array( $this->type, array( 'xml','json' ) ) )\n\t return false;\n\t \n $request = 'http://twitter.com/direct_messages/new.' . $this->type;\n $postargs = 'user=' . rawurlencode($user) . '&text=' . rawurlencode($text);\n\n\t\treturn $this->objectify( $this->process($request, $postargs) );\n\t}", "title": "" }, { "docid": "f7dc74b7e6a0d0a6850ea01a202acbb4", "score": "0.50938416", "text": "public function send()\n {\n // ignore\n }", "title": "" }, { "docid": "3dbdd39600e226bb1bda06ff767af760", "score": "0.5074766", "text": "public function returnAndSendWithMessage(TwoFactorTextInterface $user, string $text): string;", "title": "" }, { "docid": "2ab0b5254f82fd1817c4cec08ea99f82", "score": "0.5070449", "text": "function sendText($from=\"admin\", $target_type, $target, $content, $ext){\n $url=$this->url.'messages';\n $body['target_type']=$target_type;\n $body['target']=$target;\n $options['type']=\"txt\";\n $options['msg']=$content;\n $body['msg']=$options;\n $body['from']=$from;\n $body['ext']=$ext;\n $encoded_body=json_encode($body);\n $header=array($this->getToken());\n $result=$this->postCurl($url, $encoded_body, $header);\n return $result;\n }", "title": "" }, { "docid": "cfb353ac599f3baccc24ca5d3fb0ebd2", "score": "0.5042319", "text": "function setTextBody($text)\n {\n $this->text_body = $text;\n $this->mime->setTXTBody($text);\n }", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5036862", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5036862", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5036862", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5036862", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5036862", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5036862", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5036862", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5036862", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5036862", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5036862", "text": "public function send();", "title": "" }, { "docid": "f400807db0d74a319adb2eb4b6891519", "score": "0.50343716", "text": "public function prepareTextModel(){\n\t\t$id = false;\n\t\t//Если задание выполнено, то точно создавать ничего не нужно.\n\t\tif ($this -> id_text) {\n\t\t\treturn false;\n\t\t}\n\t\t$current = $this -> currentText;\n\t\tif (!$current) {\n\t\t\t$text = $this -> createText(new Text());\n\t\t\t$text -> save();\n\t\t\treturn $text;\n\t\t}\n\t\tif ($current -> accepted === null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$text = $this -> createText($current);\n\t\t\t$text -> save();\n\t\t\treturn $text;\n\t\t}\n\n\n\t\t/*if (!$this -> currentlyWrittenText) {\n\t\t\t$text = new Text;\n\t\t\t$text->id_task = $this->id;\n\t\t\tif ($old = $this -> currentText) {\n\t\t\t\t$text -> text = $old -> text;\n\t\t\t\t$text -> uniquePercent = $old -> uniquePercent;\n\t\t\t\t$text -> uid = $old -> uid;\n\t\t\t}\n\t\t\tif ($text->save()) {\n\t\t\t\t$id = $text->id;\n\t\t\t}\n\t\t} else {\n\t\t\t$text = $this -> currentlyWrittenText;\n\t\t\t$id = $this -> currentlyWrittenText -> id;\n\t\t}\n\t\t$this->toTextRedirect = Yii::app()->createUrl('task/view', array('arg' => $this -> id));\n\t\treturn $text;*/\n\t}", "title": "" }, { "docid": "5bc68b9c7bfbaa9f2441dc99c8d0f352", "score": "0.5022037", "text": "public function send_messages()\n {\n return TRUE;\n }", "title": "" }, { "docid": "d46b912d044d810ac8f3fa75efc71f15", "score": "0.5017353", "text": "public function twice()\n {\n $this->replyWithMessage([\n 'text' => $this->getText() . $this->getText()\n ]);\n }", "title": "" }, { "docid": "89a60e243356de61c2fa194542a9127b", "score": "0.50112534", "text": "public function send(array $destination, string $text);", "title": "" }, { "docid": "1ff429dd790fe34af7f1943b4243ae88", "score": "0.4999833", "text": "abstract function send();", "title": "" }, { "docid": "6dc0d46b1a5565923ab09e0321d96a77", "score": "0.49944037", "text": "protected function buildTextPart()\n {\n if ($this->body === false) {\n $result = null;\n } else {\n $result = new MimePart($this->body);\n $result->setType(Mime::TYPE_TEXT);\n $result->setCharset(APP_CHARSET);\n $result->setEncoding(Mime::ENCODING_QUOTEDPRINTABLE);\n }\n\n return $result;\n }", "title": "" }, { "docid": "aafe252a0aa78dab4cabb4547d6623c3", "score": "0.4979434", "text": "private static function smsCommandEscape($text) {\n // https://support.twitter.com/articles/14020-twitter-for-sms-basic-features\n if (preg_match('/^on$/i', $text) //ON\n || preg_match('/^on\\s+\\w+$/i', $text) //ON [name]\n || preg_match('/^off$/i', $text) //OFF\n || preg_match('/^off\\s+\\w+$/i', $text) //OFF [name]\n || preg_match('/^follow\\s+\\w+$/i', $text) //FOLLOW [name]\n || preg_match('/^f\\s+\\w+$/i', $text) //F [name]\n || preg_match('/^unfollow\\s+\\w+$/i', $text) //UNFOLLOW [name]\n || preg_match('/^leave\\s+\\w+$/i', $text) //LEAVE [name]\n || preg_match('/^l\\s+\\w+$/i', $text) //L [name]\n || preg_match('/^block\\s+\\w+$/i', $text) //BLOCK [name]\n || preg_match('/^blk\\s+\\w+$/i', $text) //BLK [name]\n || preg_match('/^unblock\\s+\\w+$/i', $text) //UNBLOCK [name]\n || preg_match('/^unblk\\s+\\w+$/i', $text) //UNBLK [name]\n || preg_match('/^report\\s+\\w+$/i', $text) //REPORT [name]\n || preg_match('/^rep\\s+\\w+$/i', $text) //REP [name]\n || preg_match('/^stop$/i', $text) //STOP\n || preg_match('/^quit$/i', $text) //QUIT\n || preg_match('/^end$/i', $text) //END\n || preg_match('/^cancel$/i', $text) //CANCEL\n || preg_match('/^unsubscribe$/i', $text) //UNSUBSCRIBE\n || preg_match('/^arret$/i', $text) //ARRET\n || preg_match('/^d\\s+/i', $text) //D [...]\n || preg_match('/^m\\s+/i', $text) //M [...]\n || preg_match('/^retweet\\s+\\w+$/i', $text) //RETWEET [name]\n || preg_match('/^rt\\s+\\w+$/i', $text) //RT [name]\n || preg_match('/^set\\s+/i', $text) //SET [...]\n || preg_match('/^whois\\s+\\w+$/i', $text) //WHOIS [name]\n || preg_match('/^w\\s+\\w+$/i', $text) //W [name]\n || preg_match('/^get\\s+\\w+$/i', $text) //GET [name]\n || preg_match('/^g\\s+\\w+$/i', $text) //G [name]\n || preg_match('/^fav\\s+\\w+$/i', $text) //FAV [name]\n || preg_match('/^fave\\s+\\w+$/i', $text) //FAVE [name]\n || preg_match('/^favorite\\s+\\w+$/i', $text) //FAVORITE [name]\n || preg_match('/^favourite\\s+\\w+$/i', $text) //FAVOURITE [name]\n || preg_match('/^\\*\\w+$/i', $text) //*[name]\n || preg_match('/^stats\\s+\\w+$/i', $text) //STATS [name]\n || preg_match('/^suggest$/i', $text) //SUGGEST\n || preg_match('/^sug$/i', $text) //SUG\n || preg_match('/^s$/i', $text) //S\n || preg_match('/^wtf$/i', $text) //WTF\n || preg_match('/^help$/i', $text) //HELP\n || preg_match('/^info$/i', $text) //INFO\n || preg_match('/^aide$/i', $text) //AIDE\n ) {\n $text = \". {$text}\";\n }\n return $text;\n }", "title": "" }, { "docid": "cceb99d4ac3f67ceb7072c60c3972c8e", "score": "0.49782658", "text": "private function handleMessage($message){\n $id = $message[\"message_id\"];\n $from = $message[\"from\"];\n $chat = $message[\"chat\"];\n $timeStamp = $message[\"date\"];\n $text = $message[\"text\"];\n $cmdName = null;\n\n $this->userId = $from[\"id\"];\n $this->chatId = $chat[\"id\"];\n $this->messageId = $id;\n $this->chatType = $message[\"chat\"][\"type\"];\n\n $this->loadPersistant();\n\n if (!$text){\n //Not a text command\n return $this->handleNonTextMessage($message);\n } elseif (substr($text,0,1) == \"/\"){\n //We have a command\n $cmdParams = explode(\" \",$text);\n $cmdNameP = explode(\"@\",substr(array_shift($cmdParams),1),2);\n if (count($cmdNameP) == 1 || $cmdNameP[1] == static::BOT_USERNAME) {\n //This command is for us\n $cmdName = \"command_\".$cmdNameP[0];\n } else {\n //Command is not for us.\n return false;\n }\n } else {\n if ($this->userVals[\"_last_\"]) {\n //It's a reply to something\n $text = $this->userVals[\"_last_\"].$text;\n $cmdParams = explode(\" \",$text);\n $cmdNameP = [array_shift($cmdParams)];\n $cmdName = $cmdNameP[0];\n } else {\n return;\n //TODO If not we set a method to handle basic text.\n }\n }\n //Get function and arguments ready\n try {\n $funcInfo = new ReflectionMethod($this,$cmdName);\n } catch (Exception $e){\n $this->userError(\"/$cmdNameP[0] is not a valid command.\");\n return;\n }\n $pCount = $funcInfo->getNumberOfParameters();\n if ($pCount === 0){\n $cmdParams = [];\n } else {\n $lastParamA = array_splice($cmdParams,$pCount-1,count($cmdParams));\n $lastParam = implode(\" \",$lastParamA);\n array_push($cmdParams,$lastParam);\n }\n //Check we have enough paramaters\n $pCountNeed = $funcInfo->getNumberOfRequiredParameters();\n $pCountGiven = count($cmdParams);\n if($pCountGiven < $pCountNeed){\n $this->userError(\"/$cmdName requires $pCountNeed paramaters but only $pCountGiven where given.\");\n } else {\n call_user_func_array([$this,$cmdName],$cmdParams);\n $this->savePersistant();\n }\n }", "title": "" }, { "docid": "1cddfc1e1a36eda4ef6a45a240041a68", "score": "0.49712455", "text": "protected function isAutoreply($txt)\n {\n if (preg_match('/[\\[\\(]?[Aa]uto[-\\s]?[Rr]e(ply|sponse)[\\]\\)]/', $txt)) {\n return true;\n } else if (preg_match('/^System: Message wasn\\'t delivered. Offline storage size was exceeded.$/', $txt)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "0f28e90a936e4f1290314055b2502b8a", "score": "0.49602154", "text": "public static function send(){}", "title": "" }, { "docid": "6cf298fc359970e440e43d8080d095a3", "score": "0.49517906", "text": "function send_event_by_inner_text($text,$exactly,$event)\n\t{\n\t\treturn $this->z_send_event_by_inner_text($text,$exactly,$event);\n\t}", "title": "" }, { "docid": "e5e50979bdb708936247b6038e6780be", "score": "0.49366987", "text": "public static function sendContent(){}", "title": "" }, { "docid": "cf7be2acdc761b44c65c63384d431ca3", "score": "0.49358597", "text": "function send_message($id, $text) {\n $text = \"(Private) $text\";\n $type = \"text\";\n \n require \"config/sql_connect.php\";\n $query = \"INSERT INTO message_queue (type, text, adventurer_id) VALUES ('$type', '$text', $id)\";\n mysqli_query($con, $query);\n mysqli_close($con);\n }", "title": "" }, { "docid": "73f724a4c53c3d68501747cf36806bb9", "score": "0.49314386", "text": "public function setMessage($text)\n {\n $this->text = $text;\n }", "title": "" }, { "docid": "8b9faed8eecf510840ebb9025594dd5d", "score": "0.49228406", "text": "protected function dispatch($from, $to, $text)\n {\n file_put_contents(\n self::dummyFile,\n sprintf('%s Sms sent From %s to %s. Message: %s', date(\"Y-m-d H:i:s\"), $from, $to, $text),\n FILE_APPEND\n );\n }", "title": "" }, { "docid": "921d2ef178e94b12ac776f03b05c7a82", "score": "0.49187627", "text": "public function onTextReceived(TextReceivedEvent $event)\n {\n // Parse command \"/start@BotName params\". We need NOT a command\n if (!preg_match(\n '/^\\/([a-z_]+)@?([a-z_]*)\\s*(.*)$/i',\n $event->getText()\n )\n ) {\n // Resolve chat and user objects\n $chat_entity = $this->resolveChat($event->getUpdate());\n $user_entity = $this->resolveUser($event->getUpdate());\n\n // Format human-readable description\n $description = sprintf(\n '\"%s\" → \"%s\": %s',\n UserHq::formatUserName($user_entity, true),\n $this->formatChatTitle($chat_entity),\n $event->getText()\n );\n\n // Write the audit log\n $this->writeAudit(\n TextReceivedEvent::NAME,\n $event->getUpdate(),\n $description,\n $chat_entity,\n $user_entity\n );\n }\n }", "title": "" }, { "docid": "8130e65e3a0e97747ee4d7d3c9334ef7", "score": "0.49142814", "text": "public function printText(string $message);", "title": "" }, { "docid": "ab4cc680b4a44003fad1412f38fb53b9", "score": "0.49080846", "text": "public function sendTextMessageExtern(array $params):WebfleetResponse;", "title": "" }, { "docid": "a4e297b35ae17db43d00ae84a86e0bef", "score": "0.49056518", "text": "function sendMessage($topic, $text, $time, $ID_Kolonie)\r\n { \t\r\n \t//Nachricht verschicken!\r\n \t$ereignis = new EREIGNIS();\r\n\t\t$ereignis->saveEreignis($text, $topic, $this->user->getUserID(), $ID_Kolonie); \r\n\t\t$ereignis->setDatum($time);\r\n }", "title": "" }, { "docid": "d4daa5b49691871570e3e265f9ffd11b", "score": "0.490473", "text": "Public function renduTextPlain()\n {\n $this->session($this->position);\n }", "title": "" }, { "docid": "af7dc1f7c0724bc25d05698c3030e88d", "score": "0.48862466", "text": "abstract public function read_message();", "title": "" }, { "docid": "dd96af8e67d2f2aef02d1b275c0fc9f6", "score": "0.48828912", "text": "public function sendMessage(){\r\n\t}", "title": "" }, { "docid": "16b8ba0f9e44ab967608f2d9adf39047", "score": "0.48791426", "text": "public function testPlainUtf8()\n {\n $this->Mail->isHTML(false);\n $this->Mail->Subject .= ': UTF-8 plain text';\n $this->Mail->CharSet = 'UTF-8';\n\n $this->Mail->Body = <<<'EOT'\nChinese text: 郵件內容為空\nRussian text: Пустое тело сообщения\nArmenian text: Հաղորդագրությունը դատարկ է\nCzech text: Prázdné tělo zprávy\nEOT;\n $this->buildBody();\n self::assertTrue($this->Mail->send(), $this->Mail->ErrorInfo);\n $msg = $this->Mail->getSentMIMEMessage();\n self::assertStringNotContainsString(\"\\r\\n\\r\\nMIME-Version:\", $msg, 'Incorrect MIME headers');\n }", "title": "" }, { "docid": "4bdbdd6cea58eeb687dcf18712c66cd1", "score": "0.4878498", "text": "function onPlayerChat($playerUid, $login, $text, $isRegistredCmd) {\n if ($playerUid != 0 && substr($text, 0, 1) != \"/\" && $this->enabled) {\n $config = Config::getInstance();\n $source_player = $this->storage->getPlayerObject($login);\n $nick = $source_player->nickName;\n $nick = str_ireplace('$w', '', $nick);\n $nick = str_ireplace('$z', '$z$s', $nick);\n /*\n $smileys = array(\"ッ\", \"ツ\", \"シ\");\n $rnd = rand(0, sizeof($smileys) - 1);\n $text = str_replace(array(\":)\", \"=)\"), $smileys[$rnd], $text); */\n \n try {\n if (\\ManiaLivePlugins\\eXpansion\\AdminGroups\\AdminGroups::hasPermission($login,\"server_admin\")) {\n $this->connection->chatSendServerMessage(\"\\$fff\" . $config->adminSign . \" $nick\\$z\\$s \" . $config->chatSeparator . $config->adminChatColor . $text);\n } elseif ($source_player->isManagedByAnOtherServer) {\n $this->connection->chatSendServerMessage(\"\\$fff$nick\\$z\\$s \" . $config->chatSeparator . $config->otherServerChatColor . $text);\n } else {\n $this->connection->chatSendServerMessage(\"\\$fff$nick\\$z\\$s \" . $config->chatSeparator . $config->publicChatColor . $text);\n }\n $nickLog = \\ManiaLib\\Utils\\Formatting::stripStyles($nick);\n\n \\ManiaLive\\Utilities\\Logger::getLog('chat')->write(\" (\" . $source_player->iPAddress . \") [\" . $login . \"] \" . $nickLog . \" - \" . $text);\n } catch (\\Exception $e) {\n Console::println(__('[eXpansion|Chat] error sending chat from %s: %s with folloing error %s', $login, $login, $text, $e->getMessage()));\n }\n }\n }", "title": "" }, { "docid": "d172cbc4d25607ad905e82e7bb0b0d0b", "score": "0.48717788", "text": "abstract public function shouldReceiveOwnMessages();", "title": "" }, { "docid": "ceb9a9a8047cf4d4c093465006b5ea44", "score": "0.48693565", "text": "protected function loadTexts() {\n\t\t// Basic short texts.\n\t\tforeach ($this->getShortTextContents() as $code => $text) {\n\t\t\t$this->newEntity(Text::class, [\n\t\t\t\t'code' => $code,\n\t\t\t\t'text' => $text,\n\t\t\t\t'enabledParameters' => NULL,\n\t\t\t]);\n\t\t}\n\t\t\n\t\t// Short texts with parameters. The sendEnabledParameters method has to be called out separately.\n\t\t$this\n\t\t\t->newEntity(Text::class, [\n\t\t\t\t'code' => 'new-order-select-products-before',\n\t\t\t\t'text' => '\n\t\t\t\t\t<p>Cégünk 25 éve a fürjtojás specialistája és az egész Európai Unióban egyedül mi működtetünk engedéllyel fürjtojás feldolgozó üzemet. Weblapunkon étkezési fürjtojás és fürj tenyésztojás rendelésére nyílik lehetősége. Étkezési fürjtojás három fajtáját kínáljuk az érdeklődőknek: nyers fürjtojás, natúr konzerv fürjtojás (sós lében) és füstölt fürjtojás étolajban, fóliatasakba, díszdobozba csomagolva.</p>\n\t\t\t\t\t<p><span style=\"color:#ee2210;\"><strong>Termékeink semmilyen tartósítószert nem tartalmaznak, ízesítéshez pedig Himalája sót használunk!</strong></span></p>\n\t\t\t\t\t<p>A rendelés nincs előzetes regisztrációhoz kötve, így szolgáltatásaink korlátozás nélkül minden látogató számára elérhetőek.</p>\n\t\t\t\t\t<h2>Tojás vásárlás menete</h2>\n\t\t\t\t\t<p>A rendelés menete a választott terméknek megfelelő formanyomtatvány értelemszerű kitöltése. A formanyomtatvány kitöltése nem minősül online vásárlásnak, csak igényleadásnak, a termékkel kapcsolatos jövőbeli vásárlási szándék kifejezésének. Az eladó tojások iránti vásárlási szándékának megerősítésére minden esetben kapcsolatba lépünk Önnel, s az adás-vételi ügylet az áru kiszállításakor realizálódik.</p>\n\t\t\t\t\t<p>A tojás rendelési űrlap kitöltése után automatikus visszajelzést küldünk email címére, majd rövid időn belük telefonon is felvesszük a kapcsolatot Önnel a megrendelés kiszállításával vagy átvételével kapcsolatban. Rendelési adatait minden esetben telefonos egyeztetés során véglegesítjük. A megrendelés szóbeli, telefonos megerősítést követően minősül csak valós vásárlásnak.</p>\n\t\t\t\t\t<p>Igényleadáskor rögzített adatait bizalmasan kezeljük, harmadik félnek nem adjuk ki.</p>\n\t\t\t\t\t<p>Ha véletlenül hibásan adta le igénylőlapját, kérjük az <strong>{{ admin-email }}</strong> email címre „Hibás igénylőlap” tárggyal jelezze felénk vagy hívjon minket telefonszámunkon.</p>\n\t\t\t\t\t<p>A megrendelt tojások kifizetése házhozszállítás esetén a termékek futártól való átvételekor történik.</p>\n\t\t\t\t\t<p><strong><span style=\"color: #ff0000;\">Futárral történő kiszállítást (házhozszállítást) csak minimum {{ minimum-order-price-to-deliver }} Ft értékű egyösszegű igénylés leadása esetén áll módunkban teljesíteni.</span>\n\t\t\t\t\tAmennyiben a rendelésének összege eléri a {{ order-no-delivery-price-above-sum }} Ft-ot,\n\t\t\t\t\ta szállítási díjat átvállaljuk Öntől, tehát nem számolunk fel házhozszállítási költséget ({{ order-delivery-price }} Ft)!</strong></p>\n\t\t\t\t\t<p><strong>\n\t\t\t\t\tA házhozszállítás futárszolgálattal történik, a kiszállítási díj országosan egységesen {{ order-delivery-price }} Ft.\n\t\t\t\t\tAz igénylőlap alján az összegben a házhozszállítás díja is benne foglaltatik, amennyiben személyesen szeretné átvenni a termékeket telephelyünkön (Tamago Kft. - 1161 Budapest, Albán utca 1.), kérjük a telefonos egyeztetés (rendelés véglegesítése) során jelezze.\n\t\t\t\t\tSzemélyes átvétel esetén a végösszeg {{ order-delivery-price }} Ft-al kevesebb lesz! </strong></p>\n\t\t\t\t\t<p>A {{ admin-phone }} telefonszámon <span style=\"text-decoration: underline;\"><em>munkanapokon 9-17 óra között</em></span> a rendelésekkel kapcsolatos kérdésekre az ügyfélszolgálat munkatársai válaszolnak.</p>\n\t\t\t\t\t',\n\t\t\t])\n\t\t\t->setEnabledParameters(['admin-email', 'admin-phone', 'minimum-order-price-to-deliver', 'order-delivery-price', 'order-no-delivery-price-above-sum']);\n\t\t\n\t\t$this\n\t\t\t->newEntity(Text::class, [\n\t\t\t\t'code' => 'new-order-select-products-after',\n\t\t\t\t'text' => '',\n\t\t\t])\n\t\t\t->setEnabledParameters(['admin-email', 'admin-phone', 'minimum-order-price-to-deliver', 'order-delivery-price', 'order-no-delivery-price-above-sum']);\n\t\t\n\t\t$this\n\t\t\t->newEntity(Text::class, [\n\t\t\t\t'code' => 'new-order-select-addresses-warning-below-delivery-limit',\n\t\t\t\t'text' => '\n\t\t\t\t\t<p>\n\t\t\t\t\tKiszállítást csak akkor tudunk vállalni, ha a vásárlás összege eléri a {{ minimum-order-price-to-deliver }} Ft-t.<br />\n\t\t\t\t\tAz ön kosarában csak {{ order-sum-price }} Ft van, így a kiszállítási címet nem tudja kiválasztani.\n\t\t\t\t\t</p>',\n\t\t\t])\n\t\t\t->setEnabledParameters(['minimum-order-price-to-deliver', 'order-sum-price']);\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d91bcb61903b01a78063926b1602c8a9", "score": "0.48684904", "text": "public function send(string $notice='') : bool {}", "title": "" }, { "docid": "ea67ba99ba79384d4d8fdf2fa3c2ccc3", "score": "0.48679432", "text": "public function setMessage($text) {\n $this->text = $text;\n }", "title": "" }, { "docid": "2d13cad1d4eeeeb65eb84ae26cbdee43", "score": "0.48608893", "text": "public static function send() {}", "title": "" }, { "docid": "2d13cad1d4eeeeb65eb84ae26cbdee43", "score": "0.48608893", "text": "public static function send() {}", "title": "" }, { "docid": "6c81364b519748dbf63223db998f694b", "score": "0.48588178", "text": "public function composeMessage() {\n\t\t\tif (!empty($this->subject) && !empty($this->from)) {\n\t\t\t\t$this->message = new Swift_Message($this->subject);\n\t\t\t\t$this->message->attach(new Swift_Message_Part($this->text));\n\t\t\t\t$this->message->attach(new Swift_Message_Part($this->html, \"text/html\"));\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\ttrigger_error('An error occurred while composing a message', E_USER_WARNING);\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "4d8ece8309fd21a5939a1215953e0aab", "score": "0.48564273", "text": "public abstract function Send();", "title": "" }, { "docid": "21c16a837ccd7d2735991b36b6be0008", "score": "0.48562258", "text": "public function handleQuote() {\n if (empty($_POST) && !empty($this->scriptProperties['quote'])) {\n $message = str_replace(array('[',']'),array('&#91;','&#93;'),$this->post->br2nl($this->post->get('message')));\n $message = '[quote author='.$this->author->get('username').' date='.strtotime($this->post->get('createdon')).']'.$message.'[/quote]'.\"\\n\";\n $this->setPlaceholder('message',$message);\n } elseif (empty($_POST) && empty($this->scriptProperties['quote'])) {\n $this->setPlaceholder('message','');\n }\n }", "title": "" }, { "docid": "1958789cff4cd7016225ced60d482f19", "score": "0.48416942", "text": "public function renderTxt()\n\t{\n\t\t$this->setHeader('Content-Type', self::$knownFormats['txt']['mime'] . '; charset=utf-8;');\n\t\t$this->body = isset($this->body) ? $this->body : $this->data;\n\t\t$this->currentFormat = 'txt';\n\t}", "title": "" }, { "docid": "f9b9d853ff5d490a2ad6b5e40d76b8ec", "score": "0.48380536", "text": "public function sendText ( $to, $from, $message, $unicode=null ) {\n\n // Making sure strings are UTF-8 encoded\n if ( !is_numeric($from) && !mb_check_encoding($from, 'UTF-8') ) {\n trigger_error('$from needs to be a valid UTF-8 encoded string');\n return false;\n }\n\n if ( !mb_check_encoding($message, 'UTF-8') ) {\n trigger_error('$message needs to be a valid UTF-8 encoded string');\n return false;\n }\n\n if ($unicode === null) {\n $containsUnicode = max(array_map('ord', str_split($message))) > 127;\n } else {\n $containsUnicode = (bool)$unicode;\n }\n\n // Make sure $from is valid\n $from = $this->validateOriginator($from);\n\n // URL Encode\n $sFrom = urlencode( $from );\n $sMessage = urlencode( $message );\n\n // Send away!\n $hPost = [\n 'from' => $sFrom,\n 'to' => !is_array($to)? $to : implode(',', $to),\n 'message' => $sMessage,\n 'type' => $containsUnicode ? 'unicode' : 'text'\n ];\n return $this->sendSmsRequest( $hPost );\n }", "title": "" }, { "docid": "92a5d75c163609375002d7799a5cb763", "score": "0.48327726", "text": "public function send(){\n\t\tif(!$this->human || !$this->human->vk_uid){\n\t\t\treturn;\n\t\t}\n\t\t$args = func_get_args();\n\t\tif(!count($args)) {\n\t\t\t$message = \"\";\n\t\t} else {\n\t\t\t$message = array_shift($args);\n\t\t\tif(count($args) > 1){\n\t\t\t\t$message = sprintf($message, ...$args);\n\t\t\t}\n\t\t}\n\n\t\t// Send chat message via VkApi\n\t\t$this->vkApi->message($this->human, $message);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d6d91c45dca6ecbee008cb19ff480799", "score": "0.4822517", "text": "public function receive($raw)\n {\n throw new \\RuntimeException('Sms Ru does not support Inbound API Calls.');\n }", "title": "" }, { "docid": "5ad7f7db2cbb7e20c5f26a98ae754dcb", "score": "0.48212978", "text": "protected function flushBuffer()\n {\n if ('' === $this->text) {\n return;\n }\n $this->events->text($this->text);\n $this->text = '';\n }", "title": "" }, { "docid": "ff8d682ca117828ad29dbda61069389e", "score": "0.48211536", "text": "public function send()\n {\n return $this->callCodApi('/texttospeech/send', $this->getData());\n }", "title": "" }, { "docid": "653910aae63d93a5502747a91e4aa772", "score": "0.48207605", "text": "public function text($text);", "title": "" }, { "docid": "d0655e15ebffbcb85a151ffe6d3a708f", "score": "0.48190975", "text": "public function onSendComplete($message){}", "title": "" }, { "docid": "23252bdfaff5b0864a12f50c72f6a6e9", "score": "0.4814378", "text": "public function testWithBody(): void\n {\n $newMessage = $this->message->withBody(new Stream(null));\n $this->assertFalse($this->message->getBody() === $newMessage->getBody());\n }", "title": "" }, { "docid": "d1b7ddc210e092fda4138522bb338434", "score": "0.4812699", "text": "function saveNewNotice()\n {\n $user = common_current_user();\n assert($user); // XXX: maybe an error instead...\n $content = $this->trimmed('status_textarea');\n $options = array();\n Event::handle('StartSaveNewNoticeWeb', array($this, $user, &$content, &$options));\n\n if (!$content) {\n // TRANS: Client error displayed trying to send a notice without content.\n $this->clientError(_('No content!'));\n return;\n }\n\n $inter = new CommandInterpreter();\n\n $cmd = $inter->handle_command($user, $content);\n\n if ($cmd) {\n if ($this->boolean('ajax')) {\n $cmd->execute(new AjaxWebChannel($this));\n } else {\n $cmd->execute(new WebChannel($this));\n }\n return;\n }\n\n $content_shortened = $user->shortenLinks($content);\n if (Notice::contentTooLong($content_shortened)) {\n // TRANS: Client error displayed when the parameter \"status\" is missing.\n // TRANS: %d is the maximum number of character for a notice.\n $this->clientError(sprintf(_m('That\\'s too long. Maximum notice size is %d character.',\n 'That\\'s too long. Maximum notice size is %d characters.',\n Notice::maxContent()),\n Notice::maxContent()));\n }\n\n $replyto = intval($this->trimmed('inreplyto'));\n if ($replyto) {\n $options['reply_to'] = $replyto;\n }\n\n $upload = null;\n $upload = MediaFile::fromUpload('attach');\n\n if (isset($upload)) {\n\n if (Event::handle('StartSaveNewNoticeAppendAttachment', array($this, $upload, &$content_shortened, &$options))) {\n //$content_shortened .= ' ' . $upload->shortUrl();\n }\n Event::handle('EndSaveNewNoticeAppendAttachment', array($this, $upload, &$content_shortened, &$options));\n\n if (Notice::contentTooLong($content_shortened)) {\n $upload->delete();\n // TRANS: Client error displayed exceeding the maximum notice length.\n // TRANS: %d is the maximum length for a notice.\n $this->clientError(sprintf(_m('Maximum notice size is %d character, including attachment URL.',\n 'Maximum notice size is %d characters, including attachment URL.',\n Notice::maxContent()),\n Notice::maxContent()));\n }\n }\n\n if ($user->shareLocation()) {\n // use browser data if checked; otherwise profile data\n if ($this->arg('notice_data-geo')) {\n $locOptions = Notice::locationOptions($this->trimmed('lat'),\n $this->trimmed('lon'),\n $this->trimmed('location_id'),\n $this->trimmed('location_ns'),\n $user->getProfile());\n } else {\n $locOptions = Notice::locationOptions(null,\n null,\n null,\n null,\n $user->getProfile());\n }\n\n $options = array_merge($options, $locOptions);\n }\n\n $author_id = $user->id;\n $text = $content_shortened;\n\n // Does the heavy-lifting for getting \"To:\" information\n\n ToSelector::fillOptions($this, $options);\n\n if (Event::handle('StartNoticeSaveWeb', array($this, &$author_id, &$text, &$options))) {\n\n $notice = Notice::saveNew($user->id, $content_shortened, 'web', $options);\n\n if (isset($upload)) {\n $upload->attachToNotice($notice);\n }\n\n Event::handle('EndNoticeSaveWeb', array($this, $notice));\n }\n Event::handle('EndSaveNewNoticeWeb', array($this, $user, &$content_shortened, &$options));\n\n if ($this->boolean('ajax')) {\n header('Content-Type: text/xml;charset=utf-8');\n $this->xw->startDocument('1.0', 'UTF-8');\n $this->elementStart('html');\n $this->elementStart('head');\n // TRANS: Page title after sending a notice.\n $this->element('title', null, _('Notice posted'));\n $this->elementEnd('head');\n $this->elementStart('body');\n $this->showNotice($notice);\n $this->elementEnd('body');\n $this->elementEnd('html');\n } else {\n $returnto = $this->trimmed('returnto');\n\n if ($returnto) {\n $url = common_local_url($returnto,\n array('nickname' => $user->nickname));\n } else {\n $url = common_local_url('shownotice',\n array('notice' => $notice->id));\n }\n common_redirect($url, 303);\n }\n }", "title": "" }, { "docid": "60919c11b8a141dce297f4bac78485d2", "score": "0.48056835", "text": "private function receive($raw)\n {\n $this->log->debug('--> ' . $raw);\n return new Request($raw);\n }", "title": "" }, { "docid": "e9fbbb092c38f5599bc002b847e1f938", "score": "0.48023978", "text": "public function send()\n {\n $result = new \\stdClass();\n $result->content = $this->getContent();\n\n error_log('Sending message:');\n error_log(var_export(json_encode($result), true));\n\n $this->getConnection()->send(json_encode($result));\n }", "title": "" } ]